1/** 2 * ê³µíµ ì¬ë¼ì´ë ëª¨ë¬ - ë¤ë¥¸ ê³³ììë ì¬ì¬ì© ê°ë¥ 3 * 4 * ì¬ì©ë²: 5 * 1. HTMLì ëª¨ë¬ ìì ì¶ê°: <div id="myModal" class="slide-modal" data-slide-overlay="#layer_shadow">...</div> 6 * 2. ì´ê¸° ë²í¼: <button data-slide-open="#myModal">ì´ê¸°</button> 7 * 3. ë«ê¸° ë²í¼: <button data-slide-close="#myModal">ë«ê¸°</button> 8 * 9 * ëë JavaScriptë¡ ì§ì í¸ì¶: 10 * window.SlideModal.open('#myModal', '#layer_shadow'); 11 * window.SlideModal.close('#myModal', '#layer_shadow'); 12 */ 13 14(function($) { 15 'use strict'; 16 17 window.SlideModal = { 18 /** 19 * ì¬ë¼ì´ë ëª¨ë¬ ì´ê¸° 20 * @param {string} modalId - ëª¨ë¬ ID (#í¬í¨) 21 * @param {string} overlayId - ì¤ë²ë ì´ ID (#í¬í¨, ì íì¬í) 22 */ 23 open: function(modalId, overlayId) { 24 var $modal = $(modalId); 25 var $overlay = overlayId ? $(overlayId) : null; 26 27 if (!$modal.length) { 28 console.warn('SlideModal: 모ë¬ì ì°¾ì ì ììµëë¤.', modalId); 29 return; 30 } 31 32 // ì¤ë²ë ì´ê° ì§ì ëì§ ììì¼ë©´ ìëì¼ë¡ 찾기 33 if (!$overlay || !$overlay.length) { 34 var autoOverlayId = $modal.data('slide-overlay'); 35 if (autoOverlayId) { 36 $overlay = $(autoOverlayId); 37 } else { 38 // 기본 ì¤ë²ë ì´ ì¬ì© 39 $overlay = $('#layer_shadow'); 40 } 41 } 42 43 // ì¤ë²ë ì´ íì 44 if ($overlay && $overlay.length) { 45 $overlay.addClass('on'); 46 } 47 48 // 모ë¬ì slide-modal í´ëì¤ ì¶ê° (ìì¼ë©´) 49 if (!$modal.hasClass('slide-modal')) { 50 $modal.addClass('slide-modal'); 51 } 52 53 // ì¦ì show í´ëì¤ ì¶ê° (ì ëë©ì´ì ìì) 54 $modal.addClass('show'); 55 56 // body ì¤í¬ë¡¤ ì ê¸ 57 $('body').addClass('hidden'); 58 59 // ëª¨ë¬ ë´ë¶ì íí° í¼ íì (ì¹´í24 모ë) 60 setTimeout(function() { 61 $modal.find('.xans-product-searchdata.typePopup .searchCondition').css({ 62 'display': 'block', 63 'position': 'static' 64 }); 65 }, 100); 66 }, 67 68 /** 69 * ì¬ë¼ì´ë ëª¨ë¬ ë«ê¸° 70 * @param {string} modalId - ëª¨ë¬ ID (#í¬í¨) 71 * @param {string} overlayId - ì¤ë²ë ì´ ID (#í¬í¨, ì íì¬í) 72 */ 73 close: function(modalId, overlayId) { 74 var $modal = $(modalId);
75 var $overlay = overlayId ? $(overlayId) : null; 76 77 if (!$modal.length) { 78 return; 79 } 80 81 // ì¤ë²ë ì´ê° ì§ì ëì§ ììì¼ë©´ ìëì¼ë¡ 찾기 82 if (!$overlay || !$overlay.length) { 83 var autoOverlayId = $modal.data('slide-overlay'); 84 if (autoOverlayId) { 85 $overlay = $(autoOverlayId); 86 } else { 87 $overlay = $('#layer_shadow'); 88 } 89 } 90 91 // ì¦ì show í´ëì¤ ì ê±° (ì ëë©ì´ì ìì) 92 $modal.removeClass('show'); 93 94 // ì´ë ¤ìë ë¤ë¥¸ ì¬ë¼ì´ë 모ë¬ì´ ìëì§ íì¸ 95 var hasOtherOpenModals = $('.slide-modal.show').length > 0; 96 97 // 구매í기 모ë¬(pdpsticky)ë íì¸ 98 var hasPdpstickyOpen = $('#pdpsticky.onfixed.show').length > 0; 99 100 // ë¤ë¥¸ 모ë¬ì´ ìì¼ë©´ ì¤ë²ë ì´ë ì ê±° 101 if ($overlay && $overlay.length && !hasOtherOpenModals && !hasPdpstickyOpen) { 102 $overlay.removeClass('on'); 103 } 104 105 // body ì¤í¬ë¡¤ ì ê¸ í´ì 106 $('body').removeClass('hidden'); 107 } 108 }; 109 110 // data ìì± ê¸°ë° ìë ë°ì¸ë© 111 $(document).ready(function() { 112 // ì´ê¸° ë²í¼ 113 $(document).on('click', '[data-slide-open]', function(e) { 114 e.preventDefault(); 115 var modalId = $(this).data('slide-open'); 116 if (modalId) { 117 if (modalId.indexOf('#') !== 0) { 118 modalId = '#' + modalId; 119 } 120 window.SlideModal.open(modalId); 121 } 122 }); 123 124 // ë«ê¸° ë²í¼ 125 $(document).on('click', '[data-slide-close]', function(e) { 126 e.preventDefault(); 127 var modalId = $(this).data('slide-close'); 128 if (modalId) { 129 if (modalId.indexOf('#') !== 0) { 130 modalId = '#' + modalId; 131 } 132 window.SlideModal.close(modalId); 133 } 134 }); 135 136 // ì¤ë²ë ì´ í´ë¦ ì ë«ê¸° 137 $(document).on('click', '#layer_shadow.on', function(e) { 138 // ì¤ë²ë ì´ ì체를 í´ë¦íì ëë§ ë«ê¸° (ë´ë¶ ìì í´ë¦ ììë ë«ì§ ìì) 139 // e.targetì´ this(#layer_shadow)ì ê°ì¼ë©´ ì¤ë²ë ì´ë¥¼ ì§ì í´ë¦í ê² 140 if (e.target === this) { 141 // 모ë ì´ë ¤ìë ì¬ë¼ì´ë ëª¨ë¬ ë«ê¸° 142 $('.slide-modal.show').each(function() { 143 var $modal = $(this); 144 var modalId = '#' + $modal.attr('id'); 145 if (modalId && modalId !== '#') { 146 // show í´ëì¤ ì ê±° 147 $modal.removeClass('show'); 148 // body ì¤í¬ë¡¤ ì ê¸ í´ì 149 $('body').removeClass('hidden'); 150 } 151 }); 152 153 // 구매í기 모ë¬ë ë«ê¸° 154 if ($('#pdpsticky.onfixed.show').length > 0) { 155 $('#pdpsticky').removeClass('show'); 156 $('#pdpsticky').removeClass('onfixed'); 157 } 158 159 // 모ë 모ë¬ì´ ë«íì¼ë¯ë¡ ì¤ë²ë ì´ë ì ê±° 160 $('#layer_shadow').removeClass('on'); 161 } 162 }); 163 164 // ESC í¤ë¡ ë«ê¸° 165 $(document).on('keydown', function(e) { 166 if (e.keyCode === 27) { // ESC 167 $('.slide-modal.show').each(function() { 168 var modalId = '#' + $(this).attr('id'); 169 window.SlideModal.close(modalId); 170 }); 171 } 172 }); 173 }); 174 175})(jQuery); 176 177 178/** 179 * ìí ëª©ë¡ íì´ì§ ê°ê²© ì°¨ì´ ê³ì° 180 * íì¬ í ê°ê²©ê³¼ íì¬ íì¬ ê°ê²©ì ì°¨ì´ë¥¼ ê³ì°íì¬ íìí©ëë¤. 181 * ë©ì¸ íì´ì§ì ëª©ë¡ íì´ì§ 모ëìì ëìí©ëë¤. 182 */ 183jQuery(document).ready(function() { 184 185 /** 186 * ì¹´í24 data-* ê°ê²© 문ìì´ìì "첫 ë²ì§¸ ê¸ì¡"ë§ ì¶ì¶í©ëë¤.
187 * {$prd_price_sale|striptag} ë±ì "50,915ì 40%"ì²ë¼ í ì¸ì¨ì´ ë¶ì¼ë©´ 188 * ì«ìë§ ì ë¶ ì´ì´ë¶ì´ë©´ 5091540ì´ ëì´ í ì¸ì¨ì´ 30%/40%ë¡ ë¤ìë ìí´ì§ëë¤. 189 */ 190 function parsePriceAttribute(raw) { 191 if (raw == null || raw === '') { 192 return 0; 193 } 194 var head = String(raw).replace(/\s+/g, ' ').trim().split('%')[0]; 195 var m = head.match(/(\d{1,3}(?:,\d{3})+)/); 196 if (m) { 197 return parseFloat(m[1].replace(/,/g, '')) || 0; 198 } 199 m = head.match(/(\d{4,})/); 200 if (m) { 201 return parseFloat(m[1]) || 0; 202 } 203 m = head.match(/(\d+)/); 204 return m ? (parseFloat(m[1]) || 0) : 0; 205 } 206 207 /** 208 * íì¬ í ê°ê²© ì°¨ì´ ê³ì° í¨ì 209 */ 210 function calculatePriceDifference() { 211 // ë©ì¸ íì´ì§ì ëª©ë¡ íì´ì§ 모ëìì ëì 212 jQuery('.price_promote_price').each(function() { 213 var $pricePromotePrice = jQuery(this); 214 215 // ì´ë¯¸ ê³ì°ë ê²½ì° ì¤íµ 216 if ($pricePromotePrice.data('calculated')) { 217 return; 218 } 219 220 // .description 컨í ì´ë 찾기 (ê³µíµ ë¶ëª¨) 221 var $description = $pricePromotePrice.closest('.description'); 222 223 // .descriptionì´ ìì¼ë©´ ë¤ë¥¸ ë¶ëª¨ ìììì 찾기 224 if ($description.length === 0) { 225 $description = $pricePromotePrice.closest('.list_item, .item_section, .box, .ec-base-product'); 226 } 227 228 // .description ììì .price ìì discount_rate 찾기 229 var $discountRate = $description.find('.price .discount_rate[data-prod-price][data-sale-price]'); 230 231 // ì°¾ì§ ëª»íë©´ ë ëì ë²ììì 찾기 232 if ($discountRate.length === 0) { 233 $discountRate = $description.find('.discount_rate[data-prod-price][data-sale-price]'); 234 } 235 236 // ì¬ì í ì°¾ì§ ëª»íë©´ íì ìììì 찾기 237 if ($discountRate.length === 0) { 238 var $promoteNotice = $pricePromotePrice.closest('.promote_notice'); 239 if ($promoteNotice.length > 0) { 240 var $siblingPrice = $promoteNotice.siblings('.price'); 241 if ($siblingPrice.length > 0) { 242 $discountRate = $siblingPrice.find('.discount_rate[data-prod-price][data-sale-price]'); 243 } 244 } 245 } 246 247 if ($discountRate.length > 0) { 248 var prodPrice = $discountRate.attr('data-prod-price'); // ìí ê°ê²© (ì«ìë§) 249 var salePrice = $discountRate.attr('data-sale-price'); // íì¬ íì¬ ê°ê²© (ì: "71,900ì 0%") 250 251 if (prodPrice && salePrice) { 252 var prodPriceNum = parsePriceAttribute(prodPrice); 253 var salePriceNum = parsePriceAttribute(salePrice); 254 255 // ì°¨ì´ ê³ì° (ìí ê°ê²© - íì¬ íì¬ ê°ê²©) 256 var difference = prodPriceNum - salePriceNum; 257 258 if (difference > 0) { 259 // ì² ë¨ì ì¼í ì¶ê° 260 var formattedDifference = difference.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); 261 $pricePromotePrice.text(formattedDifference); 262 } else { 263 $pricePromotePrice.text('0'); 264 } 265 266 // í ì¸ì¨ ê³ì° ë° íì (ë¹ì´ìë ê²½ì°ìë§) 267 var $priceContainer = $discountRate.closest('.price'); 268 var $emptyDiscountRate = $priceContainer.find('em.discount_rate').filter(function() { 269 var $el = jQuery(this); 270 // data-prod-price ìì±ì´ ìê³ , í ì¤í¸ê° ë¹ì´ìë ê²½ì°ë§ ì í 271 return !$el.attr('data-prod-price') && $el.text().trim() === ''; 272 }); 273 274 if ($emptyDiscountRate.length > 0 && prodPriceNum > 0 && salePriceNum > 0 && prodPriceNum > salePriceNum) { 275 // í ì¸ì¨ ê³ì°: ((ìê° - í ì¸ê°) / ìê°) * 100 276 var discountPercentage = Math.round(((prodPriceNum - salePriceNum) / prodPriceNum) * 100); 277 if (discountPercentage > 0) { 278 $emptyDiscountRate.text(discountPercentage + '%'); 279 } else { 280 $emptyDiscountRate.text(''); 281 } 282 } 283 284 // ê³ì° ìë£ íì 285 $pricePromotePrice.data('calculated', true); 286 } 287 } 288 }); 289 } 290 291 // ì¦ì ì¤í 292 calculatePriceDifference(); 293 294 /** 295 * ë©ì¸/목ë¡ìì ë¶íìí ê°ì(Interval/MutationObserver) ìì± ë°©ì§ 296 * - ëì ì리먼í¸(.price_promote_price)ê° ì¡´ì¬í ëë§ wat
296cher를 ì¤ì¹í©ëë¤. 297 * - observe ë²ìë document.bodyê° ìëë¼ #contents/#wrap ë±ì¼ë¡ ì íí©ëë¤. 298 */ 299 function hasTargets() { 300 return jQuery('.price_promote_price').length > 0; 301 } 302 303 function getObserveRoot() { 304 return document.getElementById('contents') || document.getElementById('wrap') || null; 305 } 306 307 function setupWatchers() { 308 // ëì ì½í ì¸ ë¡ë를 ìí´ ì¬ë¬ ë² ì¬ìë (ì§§ê²) 309 var retryCount = 0; 310 var maxRetries = 10; 311 var retryInterval = setInterval(function() { 312 retryCount++; 313 calculatePriceDifference(); 314 if (retryCount >= maxRetries) { 315 clearInterval(retryInterval); 316 } 317 }, 500); 318 319 // DOM ë³ê²½ ê°ì§ (MutationObserver) - ë²ì ì¶ì 320 var observeRoot = getObserveRoot(); 321 if (window.MutationObserver && observeRoot) { 322 var observer = new MutationObserver(function(mutations) { 323 var shouldRecalculate = false; 324 mutations.forEach(function(mutation) { 325 if (mutation.addedNodes.length > 0) { 326 for (var i = 0; i < mutation.addedNodes.length; i++) { 327 var node = mutation.addedNodes[i]; 328 if (node && node.nodeType === 1) { 329 if (jQuery(node).find('.price_promote_price').length > 0 || 330 jQuery(node).hasClass('price_promote_price') || 331 jQuery(node).hasClass('list_item')) { 332 shouldRecalculate = true; 333 break; 334 } 335 } 336 } 337 } 338 }); 339 if (shouldRecalculate) { 340 setTimeout(function() { 341 calculatePriceDifference(); 342 }, 100); 343 } 344 }); 345 346 observer.observe(observeRoot, { 347 childList: true, 348 subtree: true 349 }); 350 } 351 352 // ë보기 ë²í¼ í´ë¦ ììë ì¬ì¤í (ìí 목ë¡ì´ ì¶ê°ë ë) 353 jQuery(document).on('click', '.more_btn .more, .prd_more', function() { 354 setTimeout(function() { 355 calculatePriceDifference(); 356 }, 300); 357 }); 358 } 359 360 // ì²ìì ì¦ì ê³ì°ë§ íê³ , ëìì´ ìë ê²½ì°ìë§ watcher ì¤ì¹ 361 if (hasTargets()) { 362 setupWatchers(); 363 } else { 364 // ë©ì¸ìì 모ëì´ ë¦ê² ë¶ë ê²½ì°ë§ 커ë²(ì§§ê² 1í íì¸) 365 setTimeout(function() { 366 calculatePriceDifference(); 367 if (hasTargets()) { 368 setupWatchers(); 369 } 370 }, 1200); 371 } 372 373}); 374 375 376/*! Simple JavaScript Inheritance 377 * By John Resig http://ejohn.org/ 378 * MIT Licensed. 379 */ 380!function(){"use strict";var a=!1;window.JQClass=function(){},JQClass.classes={},JQClass.extend=function b(c){function d(){!a&&this._init&&this._init.apply(this,arguments)}var e=this.prototype;a=!0;var f=new this;a=!1;for(var g in c)if("function"==typeof c[g]&&"function"==typeof e[g])f[g]=function(a,b){return function(){var c=this._super;this._super=function(b){return e[a].apply(this,b||[])};var d=b.apply(this,arguments);return this._super=c,d}}(g,c[g]);else if("object"==typeof c[g]&&"object"==typeof e[g]&&"defaultOptions"===g){var h,i=e[g],j=c[g],k={};for(h in i)k[h]=i[h];for(h in j)k[h]=j[h];f[g]=k}else f[g]=c[g];return d.prototype=f,d.prototype.constructor=d,d.extend=b,d}}(),/*! Abstract base class for collection plugins v1.0.2. 381 Written by Keith Wood (wood.keith{at}optusnet.com.au) December 2013. 382 Licensed under the MIT license (http://keith-wood.name/licence.html). */ 383function($){"use strict";function camelCase(a){return a.replace(/-([a-z])/g,function(a,b){return b.toUpperCase()})}JQClass.classes.JQPlugin=JQClass.extend({name:"plugin",defaultOptions:{},regionalOptions:{},deepMerge:!0,_getMarker:function(){return"is-"+this.name},_init:function(){$.extend(this.defaultOptions,this.regionalOptions&&this.regionalOptions[""]||{});var a=camelCase(this.name);$[a]=this,$.fn[a]=function(b){var c=Array.prototype.slice.call(arguments,1),d=this,e=this;return this.each(function(){if("string"==typeof b){if("_"===b[0]||!$[a][b])throw"Unknown method: "+b;var f=$[a][b].apply($[a],[this].concat(c));if(f!==d&&void 0!==f)return e=f,!1}else $[a]._attach(this,b)}),e}},setDefaults:function(a){$.extend(this.defaultOptions,a||{})},_attach:function(a,b){if(a=$(a),!a.hasClass(this._getMarker())){a.addClass(this._getMarker()),b=$.extend(this.deepMerge,{},this.defaultOptions,this._getMetadata(a),b||{});var c=$.extend({name:this.name,elem:a,options:b},this._instSettings(a,b));a.data(this.name,c),this._postAttach(a,c),this.option(a,b)}},_instSettings:function(a,b){return{}},_postAttach:function(a,b){},_getMetadata:function(elem){try{var data=elem.data(this.name.toLowerCase())||"";data=data.replace(/(\\?)'/g,function(a,b){return b?"'":'"'}).replace(/([a-zA-Z0-9]+):/g,function(a,b,c){var d=data.substring(0,c).match(/"/g);return d&&d.length%2!==0?b+":":'"'+b+'":'}).replace(/\\:/g,":"),data=$.parseJSON("{"+data+"}");for(var key in data)if(data.hasOwnProperty(key)){var value=data[key];"string"==typeof value&&value.match(/^new Date\(([-0-9,\s]*)\)$/)&&(data[key]=eval(value))}return data}catch(a){return{}}},_getInst:function(a){return $(a).data(this.name)||{}},option:function(a,b,c){a=$(a);var d=a.data(this.name),e=b||{};return!b||"string"==typeof b&&"undefined"==typeof c?(e=(d||{}).options,e&&b?e[b]:e):void(a.hasClass(this._getMarker())&&("string"==typeof b&&(e={},e[b]=c),this._optionsChanged(a,d,e),$.extend(d.options,e)))},_optionsChanged:function(a,b,c){},destroy:function(a){a=$(a),a.hasClass(this._getMarker())&&(this._preDestroy(a,this._getInst(a)),a.removeData(this.name).removeClass(this._getMarker()))},_preDestroy:function(a,b){}}),$.JQPlugin={createPlugin:function(a,b){"object"==typeof a&&(b=a,a="JQPlugin"),a=camelCase(a);var c=camelCase(b.name);JQClass.classes[c]=JQClass.classes[a].extend(b),new JQClass.classes[c]}}}(jQuery); 384 385/*! http://keith-wood.name/countdown.html 386 Countdown for jQuery v2.1.0. 387 Written by Keith Wood (wood.keith{at}optusnet.com.au) January 2008. 388 Available under the MIT (http://keith-wood.name/licence.html) license. 389 Please attribute the author if you use it. */ 390!function(a){"use strict";var b="countdown",c=0,d=1,e=2,f=3,g=4,h=5,i=6;a.JQPlugin.createPlugin({name:b,defaultOptions:{until:null,since:null,timezone:null,serverSync:null,format:"dHMS",layout:"",compact:!1,padZeroes:!1,significant:0,description:"",expiryUrl:"",expiryText:"",alwaysExpire:!1,onExpiry:null,onTick:null,tickInterval:1},regionalOptions:{"":{labels:["Years","Months","Weeks","Days","Hours","Minutes","Seconds"],labels1:["Year","Month","Week","Day","Hour","Minute","Second"],compactLabels:["y","m","w","d"],whichLabels:null,digits:["0","1","2","3","4","5","6","7","8","9"],timeSeparator:":",isRTL:!1}},_rtlClass:b+"-rtl",_sectionClass:b+"-section",_amountClass:b+"-amount",_periodClass:b+"-period",_rowClass:b+"-row",_holdingClass:b+"-holding",_showClass:b+"-show",_descrClass:b+"-descr",_timerElems:[],_init:function(){function b(a){var h=a<1e12?e?window.performance.now()+window.performance.timing.navigationStart:d():a||d();h-g>=1e3&&(c._updateElems(),g=h),f(b)}var c=this;this._super(),this._serverSyncs=[];var d="function"==typeof Date.now?Date.now:function(){return(new Date).getTime()},e=window.performance&&"function"==typeof window.performance.now,f=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null,g=0;!f||a.noRequestAnimationFrame?(a.noRequestAnimationFrame=null,a.countdown._timer=setInterval(function(){c._updateElems()},1e3)):(g=window.animationStartTime||window.webkitAnimationStartTime||window.mozAnimationStartTime||window.oAnimationStartTime||window.msAnimationStartTime||d(),f(b))},UTCDate:function(a,b,c,d,e,f,g,h){"object"==typeof b&&b instanceof Date&&(h=b.getMilliseconds(),g=b.getSeconds(),f=b.getMinutes(),e=b.getHours(),d=b.getDate(),c=b.getMonth(),b=b.getFullYear());var i=new Date;return i.setUTCFullYear(b),i.setUTCDate(1),i.setUTCMonth(c||0),i.setUTCDate(d||1),i.setUTCHours(e||0),i.setUTCMinutes((f||0)-(Math.abs(a)<30?60*a:a)),i.setUTCSeconds(g||0),i.setUTCMilliseconds(h||0),i}
390,periodsToSeconds:function(a){return 31557600*a[0]+2629800*a[1]+604800*a[2]+86400*a[3]+3600*a[4]+60*a[5]+a[6]},resync:function(){var b=this;a("."+this._getMarker()).each(function(){var c=a.data(this,b.name);if(c.options.serverSync){for(var d=null,e=0;e<b._serverSyncs.length;e++)if(b._serverSyncs[e][0]===c.options.serverSync){d=b._serverSyncs[e];break}if(b._eqNull(d[2])){var f=a.isFunction(c.options.serverSync)?c.options.serverSync.apply(this,[]):null;d[2]=(f?(new Date).getTime()-f.getTime():0)-d[1]}c._since&&c._since.setMilliseconds(c._since.getMilliseconds()+d[2]),c._until.setMilliseconds(c._until.getMilliseconds()+d[2])}});for(var c=0;c<b._serverSyncs.length;c++)b._eqNull(b._serverSyncs[c][2])||(b._serverSyncs[c][1]+=b._serverSyncs[c][2],delete b._serverSyncs[c][2])},_instSettings:function(a,b){return{_periods:[0,0,0,0,0,0,0]}},_addElem:function(a){this._hasElem(a)||this._timerElems.push(a)},_hasElem:function(b){return a.inArray(b,this._timerElems)>-1},_removeElem:function(b){this._timerElems=a.map(this._timerElems,function(a){return a===b?null:a})},_updateElems:function(){for(var a=this._timerElems.length-1;a>=0;a--)this._updateCountdown(this._timerElems[a])},_optionsChanged:function(b,c,d){d.layout&&(d.layout=d.layout.replace(/</g,"<").replace(/>/g,">")),this._resetExtraLabels(c.options,d);var e=c.options.timezone!==d.timezone;a.extend(c.options,d),this._adjustSettings(b,c,!this._eqNull(d.until)||!this._eqNull(d.since)||e);var f=new Date;(c._since&&c._since<f||c._until&&c._until>f)&&this._addElem(b[0]),this._updateCountdown(b,c)},_updateCountdown:function(b,c){if(b=b.jquery?b:a(b),c=c||this._getInst(b)){if(b.html(this._generateHTML(c)).toggleClass(this._rtlClass,c.options.isRTL),"pause"!==c._hold&&a.isFunction(c.options.onT
390ick)){var d="lap"!==c._hold?c._periods:this._calculatePeriods(c,c._show,c.options.significant,new Date);1!==c.options.tickInterval&&this.periodsToSeconds(d)%c.options.tickInterval!==0||c.options.onTick.apply(b[0],[d])}var e="pause"!==c._hold&&(c._since?c._now.getTime()<c._since.getTime():c._now.getTime()>=c._until.getTime());if(e&&!c._expiring){if(c._expiring=!0,this._hasElem(b[0])||c.options.alwaysExpire){if(this._removeElem(b[0]),a.isFunction(c.options.onExpiry)&&c.options.onExpiry.apply(b[0],[]),c.options.expiryText){var f=c.options.layout;c.options.layout=c.options.expiryText,this._updateCountdown(b[0],c),c.options.layout=f}c.options.expiryUrl&&(window.location=c.options.expiryUrl)}c._expiring=!1}else"pause"===c._hold&&this._removeElem(b[0])}},_resetExtraLabels:function(a,b){var c=null;for(c in b)c.match(/[Ll]abels[02-9]|compactLabels1/)&&(a[c]=b[c]);for(c in a)c.match(/[Ll]abels[02-9]|compactLabels1/)&&"undefined"==typeof b[c]&&(a[c]=null)},_eqNull:function(a){return"undefined"==typeof a||null===a},_adjustSettings:function(b,c,d){for(var e=null,f=0;f<this._serverSyncs.length;f++)if(this._serverSyncs[f][0]===c.options.serverSync){e=this._serverSyncs[f][1];break}var g=null,h=null;if(this._eqNull(e)){var i=a.isFunction(c.options.serverSync)?c.options.serverSync.apply(b[0],[]):null;g=new Date,h=i?g.getTime()-i.getTime():0,this._serverSyncs.push([c.options.serverSync,h])}else g=new Date,h=c.options.serverSync?e:0;var j=c.options.timezone;j=this._eqNull(j)?-g.getTimezoneOffset():j,(d||!d&&this._eqNull(c._until)&&this._eqNull(c._since))&&(c._since=c.options.since,this._eqNull(c._since)||(c._since=this.UTCDate(j,this._determineTime(c._since,null)),c._since&&h&&c._since.setMilliseconds(c._since.getMilliseconds()+h)),c._until=this.UTCDate(j,this._determineTime(c.options.until,g)),h&&c._until.setMilliseconds(c._until.getMilliseconds()+h)),c._show=this._determineShow(c)},_preDestroy:function(a,b){this._removeElem(a[0]),a.empty()},pause:function(a){this._hold(a,"pause")},lap:function(a){this._hold(a,"lap")},resume:function(a){this._hold(a,null)},toggle:function(b){var c=a.data(b,this.name)||{};this[c._hold?"resume":"pause"](b)},toggleLap:function(b){var c=a.data(b,this.name)||{};this[c._hold?"resume":"lap"](b)},_hold:function(b,c){var d=a.data(b,this.name);if(d){if("pause"===d._hold&&!c){d._periods=d._savePeriods;var e=d._since?"-":"+";d[d._since?"_since":"_until"]=this._determineTime(e+d._periods[0]+"y"+e+d._periods[1]+"o"+e+d._periods[2]+"w"+e+d._periods[3]+"d"+e+d._periods[4]+"h"+e+d._periods[5]+"m"+e+d._periods[6]+"s"),this._addElem(b)}d._hold=c,d._savePeriods="pause"===c?d._periods:null,a.data(b,this.name,d),this._updateCountdown(b,d)}},getTimes:function(b){var c=a.data(b,this.name);return c?"pause"===c._hold?c._savePeriods:c._hold?this._calculatePeriods(c,c._show,c.options.significant,new Date):c._periods:null},_determineTime:function(a,b){var c=this,d=function(a){var b=new Date;return b.setTime(b.getTime()+1e3*a),b},e=function(a){a=a.toLowerCase();for(var b=new Date,d=b.getFullYear(),e=b.getMonth(),f=b.getDate(),g=b.getHours(),h=b.getMinutes(),i=b.getSeconds(),j=/([+-]?[0-9]+)\s*(s|m|h|d|w|o|y)?/g,k=j.exec(a);k;){switch(k[2]||"s"){case"s":i+=parseInt(k[1],10);break;case"m":h+=parseInt(k[1],10);break;case"h":g+=parseInt(k[1],10);break;case"d":f+=parseInt(k[1],10);break;case"w":f+=7*parseInt(k[1],10);break;case"o":e+=parseInt(k[1],10),f=Math.min(f,c._getDaysInMonth(d,e));break;case"y":d+=parseInt(k[1],10),f=Math.min(f,c._getDaysInMonth(d,e))}k=j.exec(a)}return new Date(d,e,f,g,h,i,0)},f=this._eqNull(a)?b:"string"==typeof a?e(a):"number"==typeof a?d(a):a;return f&&f.setMilliseconds(0),f},_getDaysInMonth:function(a,b){return 32-new Date(a,b,32).getDate()},_normalLabels:function(a){return a},_generateHTML:function(b){var j=this;b._periods=b._hold?b._periods:this._calculatePeriods(b,b._show,b.options.significant,new Date);var k=!1,l=0,m=b.options.significant,n=a.extend({},b._show),o=null;for(o=c;o<=i;o++)k=k||"?"===b._show[o]&&b._periods[o]>0,n[o]="?"!==b._show[o]||k?b._show[o]:null,l+=n[o]?1:0,m-=b._periods[o]>0?1:0;
390var p=[!1,!1,!1,!1,!1,!1,!1];for(o=i;o>=c;o--)b._show[o]&&(b._periods[o]?p[o]=!0:(p[o]=m>0,m--));var q=b.options.compact?b.options.compactLabels:b.options.labels,r=b.options.whichLabels||this._normalLabels,s=function(a){var c=b.options["compactLabels"+r(b._periods[a])];return n[a]?j._translateDigits(b,b._periods[a])+(c?c[a]:q[a])+" ":""},t=b.options.padZeroes?2:1,u=function(a){var c=b.options["labels"+r(b._periods[a])];return!b.options.significant&&n[a]||b.options.significant&&p[a]?'<span class="'+j._sectionClass+'"><span class="'+j._amountClass+'">'+j._minDigits(b,b._periods[a],t)+'</span><span class="'+j._periodClass+'">'+(c?c[a]:q[a])+"</span></span>":""};return b.options.layout?this._buildLayout(b,n,b.options.layout,b.options.compact,b.options.significant,p):(b.options.compact?'<span class="'+this._rowClass+" "+this._amountClass+(b._hold?" "+this._holdingClass:"")+'">'+s(c)+s(d)+s(e)+s(f)+(n[g]?this._minDigits(b,b._periods[g],2):"")+(n[h]?(n[g]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[h],2):"")+(n[i]?(n[g]||n[h]?b.options.timeSeparator:"")+this._minDigits(b,b._periods[i],2):""):'<span class="'+this._rowClass+" "+this._showClass+(b.options.significant||l)+(b._hold?" "+this._holdingClass:"")+'">'+u(c)+u(d)+u(e)+u(f)+u(g)+u(h)+u(i))+"</span>"+(b.options.description?'<span class="'+this._rowClass+" "+this._descrClass+'">'+b.options.description+"</span>":"")},_buildLayout:function(b,j,k,l,m,n){for(var o=b.options[l?"compactLabels":"labels"],p=b.options.whichLabels||this._normalLabels,q=function(a){return(b.options[(l?"compactLabels":"labels")+p(b._periods[a])]||o)[a]},r=function(a,c){return b.options.digits[Math.floor(a/c)%10]},s={desc:b.options.description,sep:b.options.timeSeparator,yl:q(c),yn:this._minDigits(b,b._periods[c],1),ynn:this._minDigits(b,b._periods[c],2),ynnn:this._minDigits(b,b._periods[c],3),y1:r(b._periods[c],1),y10:r(b._periods[c],10),y100:r(b._periods[c],100),y1000:r(b._periods[c],1e3),ol:q(d),on:this._minDigits(b,b._periods[d],1),onn:this._minDigits(b,b._periods[d],2),onnn:this._minDigits(b,b._periods[d],3),o1:r(b._periods[d],1),o10:r(b._periods[d],10),o100:r(b._periods[d],100),o1000:r(b._periods[d],1e3),wl:q(e),wn:this._minDigits(b,b._periods[e],1),wnn:this._minDigits(b,b._periods[e],2),wnnn:this._minDigits(b,b._periods[e],3),w1:r(b._periods[e],1),w10:r(b._periods[e],10),w100:r(b._periods[e],100),w1000:r(b._periods[e],1e3),dl:q(f),dn:this._minDigits(b,b._periods[f],1),dnn:this._minDigits(b,b._periods[f],2),dnnn:this._minDigits(b,b._periods[f],3),d1:r(b._periods[f],1),d10:r(b._periods[f],10),d100:r(b._periods[f],100),d1000:r(b._periods[f],1e3),hl:q(g),hn:this._minDigits(b,b._periods[g],1),hnn:this._minDigits(b,b._periods[g],2),hnnn:this._minDigits(b,b._periods[g],3),h1:r(b._periods[g],1),h10:r(b._periods[g],10),h100:r(b._periods[g],100),h1000:r(b._periods[g],1e3),ml:q(h),mn:this._minDigits(b,b._periods[h],1),mnn:this._minDigits(b,b._periods[h],2),mnnn:this._minDigits(b,b._periods[h],3),m1:r(b._periods[h],1),m10:r(b._periods[h],10),m100:r(b._periods[h],100),m1000:r(b._periods[h],1e3),sl:q(i),sn:this._minDigits(b,b._periods[i],1),snn:this._minDigits(b,b._periods[i],2),snnn:this._minDigits(b,b._periods[i],3),s1:r(b._periods[i],1),s10:r(b._periods[i],10),s100:r(b._periods[i],100),s1000:r(b._periods[i],1e3)},t=k,u=c;u<=i;u++){var v="yowdhms".charAt(u),w=new RegExp("\\{"+v+"<\\}([\\s\\S]*)\\{"+v+">\\}","g");t=t.replace(w,!m&&j[u]||m&&n[u]?"$1":"")}return a.each(s,function(a,b){var c=new RegExp("\\{"+a+"\\}","g");t=t.replace(c,b)}),t},_minDigits:function(a,b,c){return b=""+b,b.length>=c?this._translateDigits(a,b):(b="0000000000"+b,this._translateDigits(a,b.substr(b.length-c)))},_translateDigits:function(a,b){return(""+b).replace(/[0-9]/g,function(b){return a.options.digits[b]})},_determineShow:function(a){var b=a.options.format,j=[];return j[c]=b.match("y")?"?":b.match("Y")?"!":null,j[d]=b.match("o")?"?":b.match("O")?"!":null,j[e]=b.match("w")?"?":b.match("W")?"!":null,j[f]=b.match("d")?"?":b.match("D")?"!":null,j[g]=b.match("h")?"?":b.match("H")?"!":null,j[h]=b.match("m")?"?":b.match("M")?"!":null,j[i]=b.match("s")?"?":b.match("S")?"!":null,j}
390,_calculatePeriods:function(a,b,j,k){a._now=k,a._now.setMilliseconds(0);var l=new Date(a._now.getTime());a._since?k.getTime()<a._since.getTime()?a._now=k=l:k=a._since:(l.setTime(a._until.getTime()),k.getTime()>a._until.getTime()&&(a._now=k=l));var m=[0,0,0,0,0,0,0];if(b[c]||b[d]){var n=this._getDaysInMonth(k.getFullYear(),k.getMonth()),o=this._getDaysInMonth(l.getFullYear(),l.getMonth()),p=l.getDate()===k.getDate()||l.getDate()>=Math.min(n,o)&&k.getDate()>=Math.min(n,o),q=function(a){return 60*(60*a.getHours()+a.getMinutes())+a.getSeconds()},r=Math.max(0,12*(l.getFullYear()-k.getFullYear())+l.getMonth()-k.getMonth()+(l.getDate()<k.getDate()&&!p||p&&q(l)<q(k)?-1:0));m[c]=b[c]?Math.floor(r/12):0,m[d]=b[d]?r-12*m[c]:0,k=new Date(k.getTime());var s=k.getDate()===n,t=this._getDaysInMonth(k.getFullYear()+m[c],k.getMonth()+m[d]);k.getDate()>t&&k.setDate(t),k.setFullYear(k.getFullYear()+m[c]),k.setMonth(k.getMonth()+m[d]),s&&k.setDate(t)}var u=Math.floor((l.getTime()-k.getTime())/1e3),v=null,w=function(a,c){m[a]=b[a]?Math.floor(u/c):0,u-=m[a]*c};if(w(e,604800),w(f,86400),w(g,3600),w(h,60),w(i,1),u>0&&!a._since){var x=[1,12,4.3482,7,24,60,60],y=i,z=1;for(v=i;v>=c;v--)b[v]&&(m[y]>=z&&(m[y]=0,u=1),u>0&&(m[v]++,u=0,y=v,z=1)),z*=x[v]}if(j)for(v=c;v<=i;v++)j&&m[v]?j--:j||(m[v]=0);return m}})}(jQuery); 391 392jQuery(document).ready(function() { 393 394 /* morenvy.com íìì¸ì¼. ì í */ 395 //var today = new GetServerTime(); // íì¬ìë²ìê° each ë°ì¼ë¡ ë¹¼ì íë²ë§ ì¤í. 396 var today = new Date(); // ì»´í¨í°ìê° 397 398 jQuery( ".ec-base-product .layerDiscountPeriod .content p + p" ).each(function( index ) { 399 var date_data = jQuery(this).text(); 400 var date_start_end = date_data.split(" ~ "); // ìììê° ëìê°ì¼ë¡ ìë¦ 401 var start_time = new Date(date_start_end[0].replace(/-/g, "/")); 402 var end_time = new Date(date_start_end[1].replace(/-/g, "/")); 403 404 if (today < start_time) { 405 // ì¸ì¼ ìì ì 406 TimerStart(jQuery(this).parents('.onsale').find( ".timesale_box" ),0,start_time, end_time); 407 jQuery(this).parents('.onsale').find( ".timesale_box" ).css("display", "block"); 408 } else if ((start_time <= today ) && (today < end_time)) { 409 // íìì¸ì¼ ì¤ 410 TimerStart(jQuery(this).parents('.onsale').find( ".timesale_box" ),1,end_time); 411 jQuery(this).parents('.onsale').find( ".timesale_box" ).css("display", "block"); 412 } else { 413 jQuery(this).parents('.onsale').find( ".timesale_box" ).append(" ë§ê°ëììµëë¤."); 414 jQuery(this).parents('.onsale').find( ".timesale_box" ).css("display", "block"); 415 } 416 }); 417 418 /* promotion_date ì¹´ì´í¸ë¤ì´ */ 419 jQuery(".promotion_date").each(function() { 420 var $promotionDate = jQuery(this); 421 var text = $promotionDate.text().trim(); 422 423 // "ë¨ììê° Xì¼ HH:MM:SS" íì íì± 424 var timeMatch = text.match(/ë¨ììê°\s*(\d+)\s*ì¼\s*(\d{2}):(\d{2}):(\d{2})/); 425 426 if (timeMatch) { 427 var days = parseInt(timeMatch[1], 10) || 0; 428 var hours = parseInt(timeMatch[2], 10) || 0; 429 var minutes = parseInt(timeMatch[3], 10) || 0; 430 var seconds = parseInt(timeMatch[4], 10) || 0; 431 432 // íì¬ ìê°ì ë¨ì ìê°ì ëí´ì ì¢ ë£ ìê° ê³ì° 433 var endTime = new Date(today); 434 endTime.setDate(endTime.getDate() + days); 435 endTime.setHours(endTime.getHours() + hours); 436 endTime.setMinutes(endTime.getMinutes() + minutes); 437 endTime.setSeconds(endTime.getSeconds() + seconds); 438 439 // ì´ê¸° í ì¤í¸ ì¦ì ì ê±°íê³ ì¹´ì´í¸ë¤ì´ ìì 440 $promotionDate.html(''); 441 442 // ì¹´ì´í¸ë¤ì´ ìì 443 $promotionDate.countdown({ 444 until: endTime, 445 serverSync: today, 446 compact: true, 447 padZeroes: true, 448 onExpiry: function() { 449 jQuery(this).html(" ë§ê°ëììµëë¤."); 450 }, 451 layout: "ë¨ì í ì¸ ê¸°ê° <span>{dn}</span>ì¼ <span>{hnn}</span>:<span>{mnn}</span>:<span>{snn}</span>" 452 }); 453 454 // ì¹´ì´í¸ë¤ì´ì´ ììëë©´ íì 455 $promotionDate.addClass('countdown-active'); 456 } 457 }); 458 459 //flag = 0 ììì , flag = 1 ë§ê°ì 460 function TimerStart (obj, flag, end_time, end_time2) { 461 if (flag == 0) 462 { 463 obj.countdown({until: end_time, 464 serverSync: today, compact:true, padZeroes: true, 465 onExpiry: function() { window.location.reload();} , 466 layout: "<div class='untilEnd'>ììê¹ì§<span>{dn}</span>ì¼<span class='hour'>{hnn}</span>ì<span>{mnn}</span>ë¶<span>{snn}</span>ì´</div>" 467 }); 468 } else { 469 obj.countdown({until: end_time, 470 serverSync: today, compact:true, padZeroes: true, 471 onExpiry: function() { obj.html(" ë§ê°ëììµëë¤."); }, 472 layout: "<div class='untilStart'><span>{dn}</span>ì¼<span class='hour'>{hnn}</span>ì<span>{mnn}</span>ë¶<span>{snn}</span>ì´</div>" 473 }); 474 475 /* ì¼ì를 ìê°ì¼ë¡ ë³í */ 476 /* 477 setInterval(function(){ 478 jQuery('div.untilStart').each(function(){ 479 var day = jQuery(this).children('span').eq(0).text(); 480 var hour = jQuery(this).children('span').eq(1).text(); 481 console.log(day,hour) 482 jQuery(this).children('span').eq(1).text(day*60 + hour); 483 }) 484 },1000) 485 */ 486 } 487 488 } 489 490
491 /* ìë²ìê° ê°ì ¸ì¤ë ì¤í¬ë¦½í¸ 492 function GetServerTime (param, formula) { 493 var xmlHttp; 494 if (window.XMLHttpRequest) { 495 xmlHttp = new XMLHttpRequest(); // upper IE7, Chrome, Firefox 496 xmlHttp.open('HEAD',window.location.href.toString(),false); 497 xmlHttp.setRequestHeader("Content-Type", "text/html"); 498 xmlHttp.send(''); 499 500 //return xmlHttp.getResponseHeader("Date"); 501 502 } else if (window.ActiveXObject) { 503 //Old versions of IE supported the ability to use ActiveX controls inside the browser. 504 505 xmlHttp = new ActiveXObject('Msxml2.XMLHTTP'); 506 xmlHttp.open('HEAD',window.location.href.toString(),false); 507 xmlHttp.setRequestHeader("Content-Type", "text/html"); 508 xmlHttp.send(''); 509 //return xmlHttp.getResponseHeader("Date"); 510 } 511 //return xmlHttp.getResponseHeader("Date"); 512 var serverTime = xmlHttp.getResponseHeader("Date"); 513 514 if(param!=null) { 515 var ymd = new Date(serverTime); 516 param = param.toLowerCase().trim(); 517 518 if(formula !=null){ 519 520 if(!typeof formula=="number") { 521 console.log("ë³ì formulaë numberíì ì´ì´ì¼ í©ëë¤."); 522 } else if(param=="day"){ 523 ymd.setDate(ymd.getDate()+formula); 524 } else if(param=="week"){ 525 ymd.setDate(ymd.getDate()+(7*formula)); 526 } else if(param=="month"){ 527 ymd.setMonth(ymd.getMonth()+formula); 528 } else if(param=="year"){ 529 ymd.setFullYear(ymd.getFullYear()+formula); 530 } 531 } 532 var month = '' + (ymd.getMonth() + 1), 533 day = '' + ymd.getDate(), 534 year = ymd.getFullYear(); 535 536 if (month.length < 2) month = '0' + month; 537 if (day.length < 2) day = '0' + day; 538 539 return [year, month, day].join('-'); 540 } else { 541 return new Date(serverTime); 542 } 543 } 544 */ 545 }); 546 547/** 548 * ë¹ëì¤ ìë ì¼ìì ì§ ì¤í¬ë¦½í¸ 549 * ë¹ëì¤ íê·¸ì data-autopause ìì±ì ì¶ê°íë©´ ì¤í¬ë¡¤ ì íë©´ìì ë²ì´ëë©´ ìëì¼ë¡ ë©ì¶¥ëë¤. 550 * 551 * ì¬ì©ë²: 552 * <video data-autopause autoplay muted loop> 553 * <source src="video.mp4" type="video/mp4"> 554 * </video> 555 */ 556(function() { 557 'use strict'; 558 559 // Intersection Observerê° ì§ìëëì§ íì¸ 560 if (!('IntersectionObserver' in window)) { 561 return; 562 } 563 564 // data-autopause ìì±ì´ ìë 모ë ë¹ëì¤ ìì 찾기 565 var videos = document.querySelectorAll('video[data-autopause]'); 566 567 if (videos.length === 0) { 568 return; 569 } 570 571 // Intersection Observer ìµì ì¤ì 572 var observerOptions = { 573 root: null, // ë·°í¬í¸ë¥¼ 기ì¤ì¼ë¡ 574 rootMargin: '0px', 575 threshold: 0.5 // ë¹ëì¤ì 50%ê° ë³´ì¼ ë ì¬ì 576 }; 577 578 // ê° ë¹ëì¤ì ëí´ Observer ìì± 579 videos.forEach(function(video) { 580 var observer = new IntersectionObserver(function(entries) { 581 entries.forEach(function(entry) { 582 if (entry.isIntersecting) { 583 // íë©´ì ë³´ì´ë©´ ì¬ì 584 video.play().catch(function(error) { 585 // ìë ì¬ìì´ ì¤í¨í´ë ìë¬ë¥¼ íìíì§ ìì 586 console.log('Video autoplay failed:', error); 587 }); 588 } else { 589 // íë©´ìì ë²ì´ëë©´ ì¼ìì ì§ 590 video.pause(); 591 } 592 }); 593 }, observerOptions); 594 595 // Observer ìì 596 observer.observe(video); 597 598 // íì´ì§ ì¸ë¡ë ì Observer ì 리 599 window.addEventListener('beforeunload', function() { 600 observer.disconnect(); 601 }); 602 }); 603})(); 604 605 606/** 607 * ë¹ëì¤ ì¤í¬ë¡¤ ì ì´ ì¤í¬ë¦½í¸ 608 * 609 * íë©´ì ë³´ì´ë ë¹ëì¤ë ì¬ìíê³ , íë©´ì ë²ì´ëë©´ ì ì§ìíµëë¤. 610 * data-charlla-overlay="1" ìì±ì ê°ì§ div ë´ë¶ì video ìì를 ëìì¼ë¡ í©ëë¤. 611 */ 612 613(function($) { 614 'use strict'; 615 616 /** 617 * ë¹ëì¤ ì¤í¬ë¡¤ ì ì´ í´ëì¤ 618 */ 619 var VideoScrollControl = { 620 /** 621 * ì´ê¸°í 622 */ 623 init: function() { 624 // ì²ì ë¡ë ì ë¹ëì¤ê° ìì´ë, ì´í ëì ì¼ë¡ ì¶ê°ë ì ìì¼ë¯ë¡ ì´ê¸°íë ì ì§ 625 this.enabled = true; 626 this.setupObserver(); 627 this.handleExistingVideos(); 628 }, 629 630 /** 631 * 기존 ë¹ëì¤ ììë¤ì ëí ì²ë¦¬ 632 */ 633 handleExistingVideos: function() { 634 var self = this; 635 636 // data-charlla-overlay="1" ìì±ì ê°ì§ div ë´ë¶ì video ìì 찾기 637 $('div[data-charlla-overlay="1"] video').each(function() { 638 var $video = $(this); 639 var videoElement = this; 640 641 // ë¹ëì¤ê° ë¡ëëë©´ ì´ê¸° ìí ì¤ì 642 if (videoElement.readyState >= 2) { 643 self.setupVideo(videoElement); 644 } else { 645 $video.on('loadeddata', function() { 646 self.setupVideo(videoElement); 647 }); 648 } 649 }); 650 }, 651 652 /** 653 * Intersection Observer ì¤ì 654 */ 655 setupObserver: function() { 656 var self = this; 657 658 // Intersection Observer ìµì ì¤ì 659 var options = { 660 root: null, // ë·°í¬í¸ë¥¼ 기ì¤ì¼ë¡ 661 rootMargin: '0px', 662 threshold: 0.1 // 10% ì´ì ë³´ì´ë©´ ì¬ì 663 }; 664 665 // Observer ì½ë°± í¨ì 666 var observerCallback = function(entries) {
667 entries.forEach(function(entry) { 668 var video = entry.target; 669 670 if (entry.isIntersecting) { 671 // íë©´ì ë³´ì¼ ë ì¬ì 672 self.playVideo(video); 673 } else { 674 // íë©´ì ë²ì´ëë©´ ì ì§ 675 self.pauseVideo(video); 676 } 677 }); 678 }; 679 680 // Intersection Observer ìì± 681 this.observer = new IntersectionObserver(observerCallback, options); 682 }, 683 684 /** 685 * ë¹ëì¤ ìì ì¤ì 686 */ 687 setupVideo: function(video) { 688 var self = this; 689 690 // ì´ë¯¸ ì¤ì ë ë¹ëì¤ë ì ì¸ 691 if ($(video).data('scroll-control-setup')) { 692 return; 693 } 694 695 // ë¹ëì¤ ìì± ì¤ì 696 video.setAttribute('playsinline', ''); 697 video.setAttribute('muted', ''); 698 video.setAttribute('loop', ''); 699 video.setAttribute('preload', 'metadata'); // metadataë§ ë¡ëíì¬ ë¤í¸ìí¬ ë¶í ê°ì 700 701 // Observerì ë±ë¡ 702 if (this.observer && video && video.nodeType === 1) { 703 try { 704 this.observer.observe(video); 705 } catch(e) { 706 // ìë¬ ë¬´ì 707 } 708 } 709 710 // ì¤ì ìë£ íì 711 $(video).data('scroll-control-setup', true); 712 713 // ì´ê¸° ìí íì¸ (íë©´ì ë³´ì´ëì§ ì²´í¬) 714 if (this.isVideoVisible(video)) { 715 this.playVideo(video); 716 } else { 717 this.pauseVideo(video); 718 } 719 }, 720 721 /** 722 * ë¹ëì¤ê° íë©´ì ë³´ì´ëì§ íì¸ 723 */ 724 isVideoVisible: function(video) { 725 var rect = video.getBoundingClientRect(); 726 var windowHeight = window.innerHeight || document.documentElement.clientHeight; 727 var windowWidth = window.innerWidth || document.documentElement.clientWidth; 728 729 return ( 730 rect.top < windowHeight && 731 rect.bottom > 0 && 732 rect.left < windowWidth && 733 rect.right > 0 734 ); 735 }, 736 737 /** 738 * ë¹ëì¤ ì¬ì 739 */ 740 playVideo: function(video) { 741 if (!video) return; 742 743 var $video = $(video); 744 var hasPlayedBefore = $video.data('video-has-played'); 745 746 // ë¹ëì¤ ì¬ì 747 var promise = video.play(); 748 749 if (promise !== undefined) { 750 promise.then(function() { 751 // ì¬ì ì±ê³µ ì íì´ëì¸ ì ëë©ì´ì ì ì© 752 // 첫 ì¬ì ììë§ ì ëë©ì´ì (ì±ë¥ ìµì í) 753 if (!hasPlayedBefore) { 754 // ë¤ì íë ììì í´ëì¤ ì¶ê° (ì ëë©ì´ì í¸ë¦¬ê±°) 755 requestAnimationFrame(function() { 756 $video.addClass('video-playing'); 757 $video.data('video-has-played', true); 758 }); 759 } else { 760 // ì¬ì/ì ì§ ë°ë³µ ì ì¦ì íì (ì ëë©ì´ì ìì) 761 $video.addClass('video-playing'); 762 } 763 }).catch(function(error) { 764 // ìë ì¬ìì´ ì°¨ë¨ë ê²½ì° ë¬´ì 765 // noop 766 }); 767 } else { 768 // promiseê° ìë ê²½ì° (구í ë¸ë¼ì°ì ) 769 if (!hasPlayedBefore) { 770 requestAnimationFrame(function() { 771 $video.addClass('video-playing'); 772 $video.data('video-has-played', true); 773 }); 774 } else { 775 $video.addClass('video-playing'); 776 } 777 } 778 }, 779 780 /** 781 * ë¹ëì¤ ì ì§ 782 */ 783 pauseVideo: function(video) { 784 if (!video) return; 785 786 var $video = $(video); 787 788 video.pause(); 789 790 // ì¬ì/ì ì§ ë°ë³µ ì ì¦ì ì¨ê¹ (ì ëë©ì´ì ìì) 791 $video.removeClass('video-playing'); 792 }, 793 794 /** 795 * ëì ì¼ë¡ ì¶ê°ë ë¹ëì¤ ì²ë¦¬ 796 */ 797 handleNewVideos: function() { 798 var self = this; 799 800 // ìë¡ ì¶ê°ë ë¹ëì¤ ì°¾ê¸° 801 $('div[data-charlla-overlay="1"] video').each(function() { 802 var videoElement = this; 803 804 if (!$(videoElement).data('scroll-control-setup')) { 805 if (videoElement.readyState >= 2) { 806 self.setupVideo(videoElement); 807 } else { 808 $(videoElement).on('loadeddata', function() { 809 self.setupVideo(videoElement); 810 }); 811 } 812 } 813 }); 814 } 815 }; 816 817 /** 818 * DOM ë¡ë ìë£ ì ì´ê¸°í 819 */ 820 $(document).ready(function() { 821 VideoScrollControl.init(); 822 }); 823 824 /** 825 * ëì ì½í ì¸ ë¡ë를 ìí MutationObserver ì¤ì 826 */ 827 if (typeof MutationObserver !== 'undefined') { 828 var mutationObserver = new MutationObserver(function(mutations) { 829 if (!VideoScrollControl.enabled) return; 830 // ëì 컨í ì´ë/ë¹ëì¤ê° ìì¼ë©´ ë¶íìí ì¬íìì ì¤ì 831 if ($('div[data-charlla-overlay="1"]').length === 0) return; 832 VideoScrollControl.handleNewVideos(); 833 }); 834 835 // DOM ë³ê²½ ê°ì§ ìì 836 $(document).ready(function() { 837 // ê´ì¸¡ ë²ìë #contents/#wrapì¼ë¡ ì ííë, 컨í ì´ë/ë¹ëì¤ê° ëì¤ì ë¶ë ê²½ì°ë¥¼ ìí´ íì ê´ì¸¡ 838 var observeRoot = document.getElementById('contents') || document.getElementById('wrap'); 839 if (!observeRoot) return; 840 mutationObserver.observe(observeRoot, { childList: true, subtree: true }); 841 }); 842 } 843 844 /** 845 * ì ì ê°ì²´ë¡ ë ¸ì¶ (íìì) 846 */ 847 window.VideoScrollControl = VideoScrollControl; 848 849})(jQuery); 850 851jQuery(document).ready(function() {
852 // URLìì íì¬ sort_method íë¼ë¯¸í° ê°ì ¸ì¤ê¸° 853 function getCurrentSortMethod() { 854 var urlParams = new URLSearchParams(window.location.search); 855 return urlParams.get('sort_method') || ''; 856 } 857 858 // 기본 URL ê°ì ¸ì¤ê¸° (sort_method ì ì¸) 859 function getBaseUrl() { 860 var urlParams = new URLSearchParams(window.location.search); 861 urlParams.delete('sort_method'); 862 var queryString = urlParams.toString(); 863 return window.location.pathname + (queryString ? '?' + queryString + '&' : '?'); 864 } 865 866 // ëë¡ë¤ì´ ì´ê¸°í 867 function initDropdown() { 868 var $dropdown = jQuery('.custom_dropdown'); 869 var $btn = $dropdown.find('.dropdown_btn'); 870 var $menu = $dropdown.find('.dropdown_menu'); 871 var $items = $menu.find('a'); 872 var currentSort = getCurrentSortMethod(); 873 var baseUrl = getBaseUrl(); 874 875 // íì¬ ì íë í목 íì 876 var sortLabels = { 877 '': 'ì¸ê¸°', 878 '5': 'ìµì ', 879 '7': 'íì ' 880 }; 881 882 if (currentSort && sortLabels[currentSort]) { 883 $btn.find('.dropdown_text').text(sortLabels[currentSort]); 884 $items.filter('[data-sort="' + currentSort + '"]').addClass('active'); 885 } else { 886 // sort_methodê° ìì¼ë©´ ê¸°ë³¸ê° "ì¸ê¸°" 887 $btn.find('.dropdown_text').text('ì¸ê¸°'); 888 $items.filter('[data-sort=""]').addClass('active'); 889 } 890 891 // ëë¡ë¤ì´ ë²í¼ í´ë¦ 892 $btn.on('click', function(e) { 893 e.stopPropagation(); 894 $dropdown.toggleClass('active'); 895 }); 896 897 // ë©ë´ í목 í´ë¦ 898 $items.on('click', function(e) { 899 e.preventDefault(); 900 var sortMethod = jQuery(this).attr('data-sort'); 901 var newUrl; 902 903 if (sortMethod === '') { 904 // ì¸ê¸° ì í ì sort_method ì ê±° (기본 URL) 905 var urlParams = new URLSearchParams(window.location.search); 906 urlParams.delete('sort_method'); 907 var queryString = urlParams.toString(); 908 newUrl = window.location.pathname + (queryString ? '?' + queryString : ''); 909 } else { 910 // ë¤ë¥¸ ì ë ¬ ì í ì sort_method ì¶ê° 911 newUrl = baseUrl + 'sort_method=' + sortMethod; 912 } 913 914 // URLë¡ ì´ë 915 window.location.href = newUrl; 916 }); 917 918 // ì¸ë¶ í´ë¦ ì ëë¡ë¤ì´ ë«ê¸° 919 jQuery(document).on('click', function(e) { 920 if (!jQuery(e.target).closest('.custom_dropdown').length) { 921 $dropdown.removeClass('active'); 922 } 923 }); 924 } 925 926 // ì´ê¸°í ì¤í 927 initDropdown(); 928}); 929 930 931/** 932 * í ì¸ê¸°ê° ë ì´ì´ 933 */ 934$(function(){ 935 $(document).on('click', '.discountPeriod > a', function() { 936 $(this).parent().find('.layerDiscountPeriod').show(); 937 }); 938 939 $(document).on('click', '.btnClose, button.submit', function() { 940 $(this).parents('.layerDiscountPeriod').hide(); 941 }); 942}); 943// iProductNo 미ì ì ì¤ë¥ ë°©ì§ (ì¹´í ê³ ë¦¬/ê²ì íì´ì§ìì 63% ì¤ë¥ ìì¸) 944if (typeof iProductNo === 'undefined') { 945 var iProductNo = (function() { 946 var m = location.search.match(/product_no=(\d+)/); 947 return m ? m[1] : (document.getElementById('productId') && document.getElementById('productId').textContent) || null; 948 })(); 949} 950 951// aBasketProductOrderData 미ì ì ì¤ë¥ ë°©ì§ (ì¥ë°êµ¬ë íì´ì§) 952if (typeof aBasketProductOrderData === 'undefined') { 953 var aBasketProductOrderData = []; 954} 955if (typeof aBasketProductData === 'undefined') { 956 var aBasketProductData = []; 957} 958 959// ì¸ë¤ì¼ ì´ë¯¸ì§ ìë°ì¼ê²½ì° ê¸°ë³¸ê° ì¤ì 960$(window).on('load', function() { 961 $(".thumbnail img, img.thumbImage, img.bigImage").each(function($i,$item){ 962 var $img = new Image(); 963 $img.onerror = function () { 964 $item.src="//img.echosting.cafe24.com/thumb/img_product_big.gif"; 965 } 966 $img.src = this.src; 967 }); 968}); 969 970$(function(){ 971 // í ê¸ 972 $('div.eToggle .title').on('click', function(){ 973 var toggle = $(this).parent('.eToggle'); 974 if(toggle.hasClass('disable') == false){ 975 $(this).parent('.eToggle').toggleClass('selected') 976 } 977 }); 978 979 $('dl.eToggle dt').on('click', function(){ 980 $(this).toggleClass('selected'); 981 $(this).next('dd').toggleClass('selected'); 982 }); 983 984 //ì¥ë°êµ¬ë íì´ì§ ìëí¼ Type ë³ê²½ 985 $('[id^="quantity"]').each(function() { 986 $(this).get(0).type = 'tel'; 987 }); 988 989 // 모ë°ì¼ìì ê³µê¸ì¬ í ì´ë¸ th ê°ì ì¡°ì 990 $('.xans-mall-supplyinfo, .supplyInfo').find('table > colgroup').find('col').eq(0).width(98); 991 $('.xans-mall-supplyinfo, .supplyInfo').find('th, td').css({padding:'13px 10px 12px'}); 992 993 /** 994 * ë©ì¸ì¹´í ê³ ë¦¬ toggle 995 */ 996 $('.xans-product-listmain h2').on('click', function() { 997 var bClosed = !!$(this).data('is_closed'); 998 var sUrl; 999 if (bClosed) { 1000 sUrl = "//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_close.gif"; 1001 } else { 1002 sUrl = "//img.echosting.cafe24.com/skin/mobile_ko_KR/layout/bg_title_open.gif"; 1003 } 1004 $(this).css('background-image', 'url("'+ sUrl +'")'); 1005 $(this).siblings().toggle(); 1006 $(this).parent().find('div.ec-base-paginate').toggle(); 1007 $(this).parent().next('div.xans-product-listmore').toggle(); 1008 $(this).data('is_closed', !bClosed); 1009 }); 1010 1011 /** 1012 * ìë¨íë²í¼ 1013 */ 1014 var globalTopBtnScrollFunc = function() { 1015 // íë²í¼ ê´ë ¨ë³ì 1016 var $btnTop = $('#btnTop'); 1017 1018 $(window).on('scroll', function() { 1019 try { 1020 var iCurScrollPos = $(this).scrollTop(); 1021 1022 if (iCurScrollPos > ($(this).height() / 2)) { 1023 $btnTop.fadeIn('fast'); 1024 } else { 1025 $btnTop.fadeOut('fast'); 1026 } 1027 } catch(e) { } 1028 }); 1029 }; 1030 1031 // /** 1032 // * 구매ë²í¼ 1033 // */ 1034 // var globalBuyBtnScrollFunc = function() { 1035 // // 구매ë²í¼ ê´ë ¨ë³ì 1036 // var sFixId = $('#orderFixItem').length > 0 ? 'orderFixItem' : 'fixedActionButton', 1037 // $area = $('#orderFixArea'), 1038 // $item = $('#' + sFixId + '').not($area); 1039 1040 // $(window).on('scroll', function(){ 1041 // try { 1042 // // 구매ë²í¼ ê´ë ¨ë³ì
1043 // var iCurrentHeightPos = $(this).scrollTop() + $(this).height(), 1044 // iButtonHeightPos = $item.offset().top; 1045 1046 // if (iCurrentHeightPos > iButtonHeightPos || iButtonHeightPos < $(this).scrollTop() + $item.height()) { 1047 // if (iButtonHeightPos < $(this).scrollTop() - $item.height()) { 1048 // $area.fadeIn('fast'); 1049 // } else { 1050 // $area.hide(); 1051 // } 1052 // } else { 1053 // $area.fadeIn('fast'); 1054 // } 1055 // } catch(e) { } 1056 // }); 1057 // }; 1058 1059 globalTopBtnScrollFunc(); 1060 // globalBuyBtnScrollFunc(); // 주ì ì²ë¦¬ë¨ 1061}); 1062 1063// ê³µíµë ì´ì´íì ì¤í 1064var globalLayerOpenFunc = function(_this) { 1065 this.id = $(_this).data('id'); 1066 this.param = $(_this).data('param'); 1067 this.basketType = $('#basket_type').val(); 1068 this.url = $(_this).data('url'); 1069 this.layerId = 'ec_temp_mobile_layer'; 1070 this.layerIframeId = 'ec_temp_mobile_iframe_layer'; 1071 1072 var _this = this; 1073 1074 function paramSetUrl() { 1075 if (this.param) { 1076 // if isset param 1077 } else { 1078 this.url = this.basketType ? this.url + '?basket_type=' + this.basketType : this.url; 1079 } 1080 }; 1081 1082 if (this.url) { 1083 window.ecScrollTop = $(window).scrollTop(); 1084 $.ajax({ 1085 url : this.url, 1086 success : function (data) { 1087 if (data.indexOf('404 íì´ì§ ìì') == -1) { 1088 // ìë¤ë©´ ìì 1089 try { $(_this).remove(); } catch ( e ) { } 1090
1091 var $layer = $('<div>', { 1092 html: $("<iframe>", { src: _this.url, id: _this.layerIframeId, scrolling: 'auto', css: { width: '100%', height: '100%', overflowY: 'auto', border: 0 } } ), 1093 id: _this.layerId, 1094 css : { position: 'absolute', top: 0, left:0, width: '100%', height: $(window).height(), 'z-index': 9999 } 1095 }); 1096 1097 $('body').append($layer); 1098 $('html, body').css({'overflowY': 'hidden', height: '100%', width: '100%'}); 1099 $('#' + this.layerId).show(); 1100 } 1101 } 1102 }); 1103 } 1104}; 1105 1106// ê³µíµë ì´ì´íì ë«ê¸° 1107var globalLayerCloseFunc = function() { 1108 this.layerId = 'ec_temp_mobile_layer'; 1109 1110 if (window.parent === window) 1111 self.close(); 1112 else { 1113 parent.$('html, body').css({'overflowY': 'auto', height: 'auto', width: '100%'}); 1114 parent.$('html, body').scrollTop(parent.window.ecScrollTop); 1115 parent.$('#' + this.layerId).remove(); 1116 } 1117}; 1118 1119/** 1120 * document.location.href split 1121 * return array Param 1122 */ 1123var getQueryString = function(sKey) 1124{ 1125 var sQueryString = document.location.search.substring(1); 1126 var aParam = {}; 1127 1128 if (sQueryString) { 1129 var aFields = sQueryString.split("&"); 1130 var aField = []; 1131 for (var i=0; i<aFields.length; i++) { 1132 aField = aFields[i].split('='); 1133 aParam[aField[0]] = aField[1]; 1134 } 1135 } 1136 1137 aParam.page = aParam.page ? aParam.page : 1; 1138 return sKey ? aParam[sKey] : aParam; 1139}; 1140 1141// PCë²ì ë°ë¡ ê°ê¸° 1142var isPCver = function() { 1143 var sUrl = window.location.hostname; 1144 var aTemp = sUrl.split("."); 1145 1146 var pattern = /^(mobile[\-]{2}shop[0-9]+)$/; 1147 1148 if (aTemp[0] == 'm' || aTemp[0] == 'skin-mobile' || aTemp[0] == 'mobile') { 1149 sUrl = sUrl.replace(aTemp[0]+'.', ''); 1150 } else if (pattern.test(aTemp[0]) === true) { 1151 var aExplode = aTemp[0].split('--'); 1152 aTemp[0] = aExplode[1]; 1153 sUrl = aTemp.join('.'); 1154 } 1155 window.location.href = '//'+sUrl+'/?is_pcver=T'; 1156}; 1157 1158/* ëìë§ */ 1159$('body').on('click', '.ec-base-tooltip-area .eTip', function(e){ 1160 var findArea = $($(this).parents('.ec-base-tooltip-area')); 1161 var findTarget = $($(this).siblings('.ec-base-tooltip')); 1162 var findTooltip = $('.ec-base-tooltip'); 1163 $('.ec-base-tooltip-area').removeClass('show'); 1164 $(this).parents('.ec-base-tooltip-area').first().addClass('show'); 1165 findTooltip.hide(); 1166 findTarget.show(); 1167 e.preventDefault(); 1168}); 1169 1170$('body').on('click', '.ec-base-tooltip-area .eClose', function(e){ 1171 var findTarget = $(this).parents('.ec-base-tooltip').first(); 1172 $('.ec-base-tooltip-area').removeClass('show'); 1173 findTarget.hide(); 1174 e.preventDefault(); 1175}); 1176 1177$('.ec-base-tooltip-area').find('input').on('focusout', function() { 1178 var findTarget = $(this).parents('.ec-base-tooltip-area').find('.ec-base-tooltip'); 1179 $('.ec-base-tooltip-area').removeClass('show'); 1180 findTarget.hide(); 1181}); 1182/* ë¤ë¡ê°ê¸° ë²í¼ ì²ë¦¬ í¨ì */ 1183function handleBackButton() { 1184 // íì¤í ë¦¬ê° ìëì§ íì¸ (referrerê° ìê³ ê°ì ëë©ì¸ì´ê±°ë, history.length > 1) 1185 var hasHistory = false; 1186 1187 // document.referrer íì¸ (ì´ì íì´ì§ê° ìëì§) 1188 if (document.referrer && document.referrer.length > 0) { 1189 try { 1190 var referrerUrl = new URL(document.referrer); 1191 var currentUrl = new URL(window.location.href); 1192 // ê°ì ëë©ì¸ì´ë©´ íì¤í ë¦¬ê° ìë¤ê³ íë¨ 1193 if (referrerUrl.hostname === currentUrl.hostname) { 1194 hasHistory = true; 1195 } 1196 } catch(e) { 1197 // URL íì± ì¤í¨ ì history.lengthë¡ íì¸ 1198 hasHistory = window.history.length > 1; 1199 } 1200 } else { 1201 // referrerê° ìì¼ë©´ history.lengthë¡ íì¸ 1202 hasHistory = window.history.length > 1; 1203 } 1204 1205 if (hasHistory) { 1206 // íì¤í ë¦¬ê° ìì¼ë©´ ë¤ë¡ê°ê¸° 1207 history.back(); 1208 } else { 1209 // íì¤í ë¦¬ê° ìì¼ë©´ ìµìì ì¹´í ê³ ë¦¬ë¡ ì´ë 1210 var $topCategory = jQuery('.headcategory[module="product_headcategory"] .category_item:first a'); 1211 if ($topCategory.length > 0) { 1212 var topCategoryUrl = $topCategory.attr('href'); 1213 if (topCategoryUrl) { 1214 window.location.href = topCategoryUrl; 1215 } else { 1216 // ë§í¬ê° ìì¼ë©´ ë©ì¸ì¼ë¡ 1217 window.location.href = '/'; 1218 } 1219 } else { 1220 // ì¹´í ê³ ë¦¬ê° ìì¼ë©´ ë©ì¸ì¼ë¡ 1221 window.location.href = '/'; 1222 } 1223 } 1224} 1225 1226jQuery(document).ready(function() { 1227 1228 /* í¤ë ì 목 ëì ì¤ì */ 1229 var titleAreaH2 = jQuery('#titleArea h2'); 1230 if (titleAreaH2.length > 0) { 1231 var pageTitle = titleAreaH2.text().trim(); 1232 if (pageTitle) { 1233 jQuery('.header-title-text').text(pageTitle); 1234 } 1235 } 1236 1237 /* morenvy.com ìë¨ ì¤í¬ë¡¤ ê³ ì */ 1238 var last_scrollTop = 0; 1239 var $headerInner = jQuery('#mheader .mh_sec01 .inner'); 1240 if ($headerInner.length === 0) { 1241 $headerInner = jQuery('.mh_sec01 .inner'); 1242 } 1243 1244 if ($headerInner.length > 0) { 1245 var top = $headerInner.offset().top; 1246 var $swiperTop = jQuery('.swiper_top'); 1247 var swiper_top_height = $swiperTop.outerHeight() || 50; // swiper_top ëì´ 1248 var innerHeight = $headerInner.outerHeight(true) || 50; // inner ëì´ 1249 1250 // swiper_topì´ í¤ë ë´ë¶ì ìëì§ íì¸ (ë©ì¸ íì´ì§ì¸ ê²½ì°) 1251 var isSwiperTopInHeader = $swiperTop.closest('#mheader .mh_sec01').length > 0 || 1252 $swiperTop.closest('.mh_sec01').length > 0; 1253 1254 var scrollm = jQuery(window).scrollTop(); 1255 if( scrollm > top ){ 1256 $headerInner.addClass('fixed'); 1257 // innerê° fixedëë©´ placeholder ì¶ê° (ì í ë°©ì§) 1258 if ($headerInner.next('.inner-placeholder').length === 0) { 1259 jQuery('<div class="inner-placeholder"></div>') 1260 .css({
1261 'height': innerHeight + 'px', 1262 'width': '100%', 1263 'display': 'block' 1264 }) 1265 .insertAfter($headerInner); 1266 } 1267 // swiper_topì´ í¤ë ì¸ë¶ì ìì ëë§ margin-top ì¶ê° (ë¤ë¥¸ íì´ì§) 1268 if (!isSwiperTopInHeader && $swiperTop.length > 0) { 1269 $swiperTop.css('margin-top', swiper_top_height + 'px'); 1270 } 1271 } 1272 1273 jQuery(window).scroll(function(){ 1274 var scrollm = jQuery(window).scrollTop(); 1275 if( scrollm > top ){ 1276 if (!$headerInner.hasClass('fixed')) { 1277 $headerInner.addClass('fixed'); 1278 // innerê° fixedëë©´ placeholder ì¶ê° (ì í ë°©ì§) 1279 if ($headerInner.next('.inner-placeholder').length === 0) { 1280 jQuery('<div class="inner-placeholder"></div>') 1281 .css({ 1282 'height': innerHeight + 'px', 1283 'width': '100%', 1284 'display': 'block' 1285 }) 1286 .insertAfter($headerInner); 1287 } 1288 } 1289 jQuery('body').addClass('h_fixed'); 1290 // swiper_topì´ í¤ë ì¸ë¶ì ìì ëë§ margin-top ì¶ê° (ë¤ë¥¸ íì´ì§) 1291 if (!isSwiperTopInHeader && $swiperTop.length > 0) { 1292 $swiperTop.css('margin-top', swiper_top_height + 'px'); 1293 } 1294 1295 if (scrollm > last_scrollTop) { 1296 // íë¨ ë¤ë¹ê²ì´ì ì íì íìëëë¡ ê³ ì 1297 // jQuery('#ft_nav').removeClass('nav_visible'); 1298 jQuery('#right_quick').removeClass('up'); 1299 } else { 1300 // íë¨ ë¤ë¹ê²ì´ì ì íì íìëëë¡ ê³ ì 1301 // jQuery('#ft_nav').addClass('nav_visible'); 1302 jQuery('#right_quick').addClass('up'); 1303 } 1304 } else { 1305 if ($headerInner.hasClass('fixed')) { 1306 $headerInner.removeClass('fixed'); 1307 // placeholder ì ê±° (í¤ë ë´ë¶ì ê²ë§) 1308 $headerInner.next('.inner-placeholder').remove(); 1309 } 1310 // innerê° fixed í´ì ëë©´ margin-top ì ê±° 1311 if ($swiperTop.length > 0) { 1312 $swiperTop.css('margin-top', ''); 1313 } 1314 // íë¨ ë¤ë¹ê²ì´ì ì íì íìëëë¡ ê³ ì 1315 // jQuery('#ft_nav').removeClass('nav_visible'); 1316 jQuery('#right_quick').removeClass('up'); 1317 jQuery('body').removeClass('h_fixed'); 1318 } 1319 last_scrollTop = scrollm; 1320 }); 1321 } 1322 1323 1324 /* morenvy.com ìë¨ ë©ë´ */ 1325 // ë°±ì : ì¤ìì´í¼ ê¸°ë¥ ì ê±°ë¨ (2024) 1326 // var swiper_top = new Swiper('.swiper_top', { 1327 // slidesPerView: 'auto', 1328 // watchOverflow: 'true', 1329 // spaceBetween:0, 1330 // }); 1331 1332 // ìë¨ ë©ë´ active í´ëì¤ ì²ë¦¬ (íì¬ íì´ì§ì ë°ë¼) 1333 jQuery('.swiper_top li a').each(function() { 1334 var $link = jQuery(this); 1335 var href = $link.attr('href'); 1336 var currentPath = window.location.pathname; 1337 var currentSearch = window.location.search; 1338 1339 // ë§í¬ê° íì¬ íì´ì§ì ì¼ì¹íëì§ íì¸ 1340 if (href === currentPath || href === currentPath + currentSearch || 1341 (currentPath === '/' && href === '/') || 1342 (currentPath.includes('/product/list.html') && href.includes('/product/list.html'))) { 1343 $link.addClass('active'); 1344 $link.parent('li').addClass('active'); 1345 } 1346 }); 1347 1348 /* ì¹´í ê³ ë¦¬ ë©ë´ ì´ê¸° í¨ì */ 1349 function openCategoryMenu() { 1350 // .fold í´ë¦ì ì§ì í¸ë¦¬ê±° (ì¬ì´ëë° ì´ê¸°) 1351 var $fold = jQuery('#mheader .fold'); 1352 if ($fold.length > 0) { 1353 $fold.trigger('click'); 1354 } else { 1355 // .foldê° ìì¼ë©´ ì¬ì´ëë° ì´ê¸° ê¸°ë¥ ì§ì ì¤í (slide_menu.jsì ê¸°ë¥ ë³µì ) 1356 jQuery('#dimmedSlider').show(300); 1357 jQuery('html').addClass('expand'); 1358 // ì¬ì´ëë° íì 1359 jQuery('#aside').css({ 1360 'visibility': 'visible', 1361 'display': 'block' 1362 }); 1363 // offCover.layout() í¸ì¶ 1364 if (typeof offCover !== 'undefined' && typeof offCover.layout === 'function') { 1365 offCover.layout(); 1366 } 1367 } 1368 } 1369 1370 /* morenvy.com ìë¨ ë©ë´ ë²í¼ (íë²ê±°ë²í¼) */ 1371 jQuery(' #ft_nav ul li.cate a').click(function(e){ 1372 e.preventDefault(); 1373 openCategoryMenu(); 1374 }) 1375 1376 /* ë©ì¸ ì¹´í ê³ ë¦¬ ë©ë´ ë²í¼ í´ë¦ ì´ë²¤í¸ */ 1377 jQuery('.category-menu-link').click(function(e){ 1378 e.preventDefault(); 1379 openCategoryMenu(); 1380 }) 1381 jQuery(document).on('click', '#dimmedSlider', function(e) { 1382 $('#aside .btnClose').trigger('click'); 1383 e.preventDefault(); 1384 }); 1385 1386 1387 /* morenvy.com ê²ì íì */ 1388 jQuery('.top_search , #ft_nav ul li.search a').click(function(){ 1389 jQuery('#search_box').addClass('search_fixed'); 1390 $("body").addClass('notScroll'); 1391 }) 1392 jQuery('.search_form_empty').click(function(){ 1393 jQuery('#search_box').addClass('search_fixed'); 1394 $("body").addClass('notScroll'); 1395 }) 1396 jQuery('.search_close').click(function(){ 1397 jQuery('#search_box').removeClass('search_fixed'); 1398 $("body").removeClass('notScroll'); 1399 }) 1400 1401 /* ìë¨ ì림 ìì ì ì²´ í´ë¦ ì´ë²¤í¸ (íìê°ì ë§í¬) */ 1402 jQuery(document).on('click', '.header_notification', function(e) { 1403 e.preventDefault(); 1404
1405 // íì¬ íì´ì§ URL ê°ì ¸ì¤ê¸° (pathname + search) 1406 var currentUrl = window.location.pathname + window.location.search; 1407 1408 // returnUrl ì¸ì½ë© 1409 var returnUrl = encodeURIComponent(currentUrl); 1410 1411 // ë¡ê·¸ì¸ íì´ì§ë¡ ì´ë (noMember=1, returnUrl, delvtype=A íë¼ë¯¸í° í¬í¨) 1412 var loginUrl = '/member/agreement.html?noMember=1&returnUrl=' + returnUrl + '&delvtype=A'; 1413 window.location.href = loginUrl; 1414 }); 1415 1416 /* morenvy.com ê²ìì°½ 문구 */ 1417 jQuery('.box_inner2 .xans-layout-searchheader fieldset').each(function() { 1418 var searchheader_text = jQuery(this).attr('title'); 1419 jQuery('.xans-layout-searchheader #keyword').attr('placeholder',searchheader_text) 1420 }); 1421 1422 /* morenvy.com ê²ìì°½ 문구 ìì */ 1423 jQuery('.xans-layout-searchheader').find('button.btn_delete').on('click', function() { 1424 if (jQuery(this).closest('.withinInput').length === 0) { 1425 var oForm = jQuery(this).parents('form'); 1426 jQuery('#search_box #keyword').val('').focus(); 1427 jQuery('#search_box #keyword').val(''); 1428 jQuery('body').removeClass("eMobilePopup"); // eMobilePopup í´ëì¤ ìì 1429 jQuery('body').css("width", ""); // width:100% ìì 1430 oForm.find('#ec-product-searchdata-auto-list').hide(); 1431 } 1432 }); 1433 1434 /* ê²ììì : ì¶ì²ê²ìì´ */ 1435 var swiper_recomm_word = new Swiper('.swiper_recomm_word', { 1436 slidesPerView: 'auto', 1437 spaceBetween: 8, 1438 watchOverflow: 'true', 1439 }); 1440 1441 /* morenvy.com ê²ìì°½ ìë ì¸ê¸°ê²ìì´ ë²í¸ */ 1442 jQuery('.hot_keyword .keyword_sub a , .mm_keyword ul li').each(function(){ 1443 var num = jQuery(this).index() + 1; 1444 jQuery(this).find('.num').text(num); 1445 }) 1446 1447 /* ë©ì¸ íì´ì§ ìµê·¼ 본 ìí ëì ë¡ë ë° ì¹ì ì¨ê¹ ì²ë¦¬ */ 1448 if (jQuery('#main_recent_products').length > 0) { 1449 var $section = jQuery('.mm_recent_products'); 1450 1451 // ìí ì¡´ì¬ ì¬ë¶ ì²´í¬ í¨ì (ê²½ëí) 1452 function hasValidProducts($container) { 1453 var $slides = $container.find('ul.swiper-wrapper li.swiper-slide, ul li'); 1454 if ($slides.length === 0) return false; 1455 1456 var hasValid = false; 1457 $slides.each(function() { 1458 var $img = jQuery(this).find('img'); 1459 if ($img.length > 0) { 1460 var src = ($img.attr('src') || '').trim(); 1461 if (src && src !== 'about:blank' && src.indexOf('{$') === -1 && !src.match(/^about:/)) { 1462 hasValid = true; 1463 return false; // break 1464 } 1465 } 1466 }); 1467 return hasValid; 1468 } 1469 1470 // ì¹ì íì/ì¨ê¹ ì²ë¦¬ í¨ì 1471 function toggleSection(show) { 1472 if (show) { 1473 $section.show(); 1474 } else { 1475 $section.hide(); 1476 } 1477 } 1478 1479 // ìµê·¼ 본 ìí ë¡ë ë° ì²´í¬ í¨ì 1480 function loadAndCheckRecentProducts() { 1481 var $searchBox = jQuery('#search_box'); 1482 var $recentSection = $searchBox.find('.search_recent'); 1483 var $swiperContainer = $recentSection.find('.ms_swiper, [module="Layout_productRecent"]'); 1484 1485 // íì ìì ì²´í¬ 1486 if ($searchBox.length === 0 || $recentSection.length === 0 || $swiperContainer.length === 0) { 1487 return false; 1488 } 1489 1490 // 모ë ë ëë§ íì¸ (ì¤ì ìí ë°ì´í° ì²´í¬) 1491 if (!hasValidProducts($swiperContainer)) { 1492 // empty ë©ìì§ê° íìëì´ ìì¼ë©´ 모ëì ë ëë§ë ê²ì¼ë¡ ê°ì£¼ 1493 var $emptyMsg = $recentSection.find('.empty'); 1494 if ($emptyMsg.length === 0 || !$emptyMsg.is(':visible')) { 1495 return false; // ìì§ ë ëë§ ì ë¨ 1496 } 1497 } 1498 1499 // ì¹ì ë³µì ë° ì½ì 1500 var $clonedSection = $recentSection.clone(true); 1501 var $clonedContainer = $clonedSection.find('.ms_swiper, [module="Layout_productRecent"]'); 1502 var hasProducts = hasValidProducts($clonedContainer); 1503 1504 // ìíì´ ìì¼ë©´ ì¹ì ì¨ê¹ 1505 if (!hasProducts) { 1506 toggleSection(false); 1507 return true; 1508 } 1509 1510 // ìíì´ ìì¼ë©´ ì¹ì íì ë° ì½ì 1511 jQuery('#main_recent_products').html($clonedSection); 1512 $clonedSection.find('.empty').hide(); 1513 toggleSection(true); 1514
1515 // Swiper ì´ê¸°í 1516 setTimeout(function() { 1517 var $swiperEl = jQuery('#main_recent_products .ms_swiper'); 1518 if ($swiperEl.length > 0 && typeof Swiper !== 'undefined') { 1519 if ($swiperEl[0].swiper) { 1520 $swiperEl[0].swiper.destroy(true, true); 1521 } 1522 new Swiper($swiperEl[0], { 1523 spaceBetween: 8, 1524 roundLengths: true, 1525 observer: true, 1526 observeParents: true, 1527 slidesPerView: 'auto', 1528 speed: 500, 1529 watchOverflow: 'true' 1530 }); 1531 } 1532 }, 100); 1533 1534 return true; 1535 } 1536 1537 // ì´ê¸° ë¡ë ìë (íì´ì§ ë¡ë ì í ë²ë§ ì²´í¬) 1538 setTimeout(function() { 1539 if (!loadAndCheckRecentProducts()) { 1540 var retryCount = 0; 1541 var retryInterval = setInterval(function() { 1542 retryCount++; 1543 if (loadAndCheckRecentProducts() || retryCount >= 30) { 1544 clearInterval(retryInterval); 1545 if (retryCount >= 30) { 1546 toggleSection(false); 1547 } 1548 } 1549 }, 300); 1550 } 1551 }, 500); 1552 } 1553 1554 /* morenvy.com ê²ìì°½ ìµê·¼ 본 ìí */ 1555 var ms_swiper = new Swiper('.ms_swiper', { 1556 spaceBetween: 8, 1557 roundLengths: true, 1558 observer: true, 1559 observeParents: true, 1560 slidesPerView: 'auto', 1561 speed: 500, 1562 watchOverflow: 'true', 1563 }); 1564 1565 /* ê²ìì°½ ìµê·¼ 본 ìí - ë´ì© ìì¼ë©´ ì¨ê¹ ì²ë¦¬ */ 1566 function checkSearchRecentProducts() { 1567 var $searchRecent = jQuery('#search_box .search_recent'); 1568 if ($searchRecent.length > 0) { 1569 var $swiperContainer = $searchRecent.find('.ms_swiper, [module="Layout_productRecent"]'); 1570 var $listItems = $swiperContainer.find('ul li'); 1571 var hasProducts = $listItems.length > 0 && $listItems.filter(function() { 1572 return jQuery(this).css('display') !== 'none' && jQuery(this).is(':visible') && jQuery(this).find('img').attr('src') !== 'about:blank'; 1573 }).length > 0; 1574 1575 if (!hasProducts) { 1576 $searchRecent.hide(); 1577 } else { 1578 $searchRecent.show(); 1579 } 1580 } 1581 } 1582 1583 // ì´ê¸° ì²´í¬ ë° ëª¨ë ë¡ë í ì²´í¬ 1584 setTimeout(function() { 1585 checkSearchRecentProducts(); 1586 // 모ëì´ ëì ì¼ë¡ ì ë°ì´í¸ë ë를 ëë¹ 1587 var searchObserver = new MutationObserver(function(mutations) { 1588 checkSearchRecentProducts(); 1589 }); 1590 var $searchBox = jQuery('#search_box .search_recent'); 1591 if ($searchBox.length > 0) { 1592 searchObserver.observe($searchBox[0], { 1593 childList: true, 1594 subtree: true, 1595 attributes: true, 1596 attributeFilter: ['style', 'class'] 1597 }); 1598 } 1599 }, 500); 1600 1601 /* morenvy.com íë¨ íµë° */ 1602 jQuery(window).scroll(function(){ 1603 s_t = jQuery(this).scrollTop(); 1604 if (s_t >= jQuery(window).height() / 2){ // scrollTop ê°ì´ 100vh ëì¼ë©´ 1605 jQuery('#right_quick .q_arrow_top').stop().fadeIn(200) 1606 } else {jQuery('#right_quick .q_arrow_top').stop().fadeOut(200)} 1607 }) 1608 1609 /* morenvy.com ìíëª©ë¡ ë² ì¤í¸ ë¶ë¥ ììì¶ë ¥ */ 1610 jQuery('.list_recmd .num').each(function(index){ 1611 jQuery(this).text(index+1); 1612 }); 1613 1614 /* ì¹´í ê³ ë¦¬ ëª©ë¡ "ì ì²´" í목 ì í ìí ê´ë¦¬ (그리ë íì) */ 1615 var $menuCategory = jQuery('.list_category_grid .menuCategory, .list_menupackage .menuCategory'); 1616 if ($menuCategory.length > 0) { 1617 var $allItem = $menuCategory.find('li[data-cate="all"]'); 1618 1619 if ($allItem.length > 0) { 1620 // íì¬ URLìì cate_no íë¼ë¯¸í° ê°ì ¸ì¤ê¸° 1621 var urlParams = new URLSearchParams(window.location.search); 1622 var currentCateNo = urlParams.get('cate_no'); 1623 1624 // "ì ì²´" ë§í¬ìì ìì ì¹´í ê³ ë¦¬ ë²í¸ ì¶ì¶ 1625 var $allLink = $allItem.find('a'); 1626 var allHref = $allLink.attr('href'); 1627 var parentCateNo = null; 1628 1629 if (allHref && allHref.indexOf('cate_no=') > -1) { 1630 var allLinkParams = new URLSearchParams(allHref.split('?')[1] || ''); 1631 parentCateNo = allLinkParams.get('cate_no'); 1632 } else if (allHref && allHref.indexOf('?') === -1) { 1633 // cate_noê° ìì¼ë©´ ìì ì¹´í ê³ ë¦¬ ìì 1634 parentCateNo = null; 1635 } 1636 1637 // "ì ì²´" íëª©ì´ ì íëì´ì¼ íëì§ íì¸ 1638 // íì¬ cate_noê° ìì ì¹´í ê³ ë¦¬ì ê°ê±°ë, ì íë íëª©ì´ ìê±°ë, cate_noê° ìì¼ë©´ "ì ì²´" ì í 1639 var hasSelected = jQuery('.list_category_grid .category-item.selected, .list_menupackage .swiper-slide.selected').not('[data-cate="all"]').length > 0; 1640 var isSelected = (!currentCateNo || currentCateNo === parentCateNo) || !hasSelected; 1641 1642 if (isSelected) { 1643 $allItem.addClass('selected'); 1644 jQuery('.list_category_grid .category-item, .list_menupackage .swiper-slide').not('[data-cate="all"]').removeClass('selected'); 1645 } else { 1646 $allItem.removeClass('selected'); 1647 } 1648 } 1649 } 1650 1651 /* morenvy.com ìíëª©ë¡ ì¤ë¶ë¥ í´ë¹ ì¹´í ê³ ë¦¬ ì í (그리ë íì) */ 1652 jQuery('.list_category_grid .category-item, .list_menupackage .swiper-slide').each(function(index) { 1653 jQuery(this).attr('id', index); 1654 }); 1655 var my_paramid = jQuery('.list_category_grid .category-item.selected, .list_menupackage .swiper-slide.selected').attr('id'); 1656 if (typeof my_paramid === "undefined") { 1657 var my_paramid = 0 1658 } 1659 1660 /* morenvy.com ìíëª©ë¡ ì¶ì²ìí */ 1661 if (jQuery('.list_recmd').length > 0 && jQuery('.list_recmd').hasClass('swiper-container')) { 1662 var list_recmd = new Swiper('.list_recmd', {
1663 roundLengths: true, 1664 observer: true, 1665 observeParents: true, 1666 slidesPerView: 'auto', 1667 speed: 500, 1668 watchOverflow: 'true', 1669 }); 1670 } 1671 1672 /* morenvy.com ìíëª©ë¡ ì ìí */ 1673 var list_new = new Swiper('.list_new', { 1674 roundLengths: true, 1675 observer: true, 1676 observeParents: true, 1677 slidesPerView: 'auto', 1678 speed: 500, 1679 watchOverflow: 'true', 1680 }); 1681 1682 /* ì¹´í ê³ ë¦¬ ì 체보기 (ë°±ì : Swiper íìì©) */ 1683 //console.log(('.xans-product-menupackage .list_menupackage .swiper-wrapper').length) 1684 // if( jQuery('.xans-product-menupackage .list_menupackage .swiper-wrapper').length > 1 ){ 1685 // jQuery('.xans-product-menupackage .list_menupackage').css('padding' , '0'); 1686 // } 1687 1688 /* morenvy.com ìíëª©ë¡ ì¤ë¶ë¥ (ë°±ì : Swiper ì´ê¸°í ì ê±°ë¨ - 그리ë íìì¼ë¡ ë³ê²½) */ 1689 // var list_menupackage = new Swiper('.list_menupackage', { 1690 // slidesPerView: 'auto', 1691 // spaceBetween: 0, 1692 // }); 1693 1694 /* 리뷰ê²ìí */ 1695 var swiper_best_review = new Swiper('.swiper_best_review', { 1696 slidesPerView: '1.5', 1697 spaceBetween: 16, 1698 watchOverflow: 'true', 1699 speed:800, 1700 }); 1701 1702 /* 문ì ê²ìí Aì 공백ì ê±° */ 1703 jQuery('.xans-board-list .subject, .xans-myshop-boardlist .subject').each(function(){ 1704 jQuery(this).html(jQuery(this).html().replace(/ /gi,'')); 1705 }); 1706 1707 /* íë¡í ì´ë¯¸ì§ ë¡ë ì¤í¨ ì 기본 íë¡í SVG íì */ 1708 function setDefaultProfileImage() { 1709 // íì´ì¤ë¶ ì¤íì¼ ê¸°ë³¸ íë¡í SVG (íì ë°°ê²½ + í°ì ì¤ë£¨ì£) 1710 var defaultProfileSVG = '<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="100" cy="100" r="100" fill="#E4E6EB"/><circle cx="100" cy="75" r="35" fill="#FFFFFF"/><path d="M50 160C50 135 70 120 100 120C130 120 150 135 150 160L150 200L50 200L50 160Z" fill="#FFFFFF"/></svg>'; 1711 1712 // ì´ë¯¸ì§ ìë¬ ì²ë¦¬ í¨ì (리ì¤í¸ì©) 1713 function handleImageError(img) { 1714 var $img = jQuery(img); 1715 var $thumbnail = $img.closest('.supply_thumbnail'); 1716 1717 // ììê° ì¡´ì¬íëì§ íì¸ 1718 if (!$img.length || !$thumbnail.length) { 1719 return; 1720 } 1721 1722 // ì´ë¯¸ SVGê° ìì¼ë©´ ì²ë¦¬íì§ ìì 1723 if ($thumbnail.find('.default-profile-svg').length > 0) { 1724 return; 1725 } 1726 1727 $img.hide(); 1728 $thumbnail.prepend('<div class="default-profile-svg">' + defaultProfileSVG + '</div>'); 1729 } 1730 1731 // ì´ë¯¸ì§ ì ì ë¡ë ì²ë¦¬ í¨ì (리ì¤í¸ì©) 1732 function handleImageLoad(img) { 1733 var $img = jQuery(img); 1734 var $thumbnail = $img.closest('.supply_thumbnail'); 1735 1736 // ììê° ì¡´ì¬íëì§ íì¸ 1737 if (!$img.length || !$thumbnail.length || !$img[0]) { 1738 return; 1739 } 1740 1741 // ì´ë¯¸ì§ê° ì ì ë¡ëëë©´ SVG ì¨ê¸°ê³ ì´ë¯¸ì§ íì 1742 if ($img[0].naturalWidth > 0 && $img[0].naturalHeight > 0) { 1743 $img.show(); 1744 $thumbnail.find('.default-profile-svg').hide(); 1745 } 1746 } 1747 1748 // ì´ë¯¸ì§ ìë¬ ì²ë¦¬ í¨ì (ìì¸ íì´ì§ì©) 1749 function handleProducerImageError(img) { 1750 var $img = jQuery(img); 1751 var $thumbnail = $img.closest('.producer_image'); 1752 1753 // ììê° ì¡´ì¬íëì§ íì¸ 1754 if (!$img.length || !$thumbnail.length) { 1755 return; 1756 } 1757 1758 // ì´ë¯¸ SVGê° ìì¼ë©´ ì²ë¦¬íì§ ìì 1759 if ($thumbnail.find('.default-profile-svg').length > 0) { 1760 return; 1761 } 1762 1763 $img.hide(); 1764 $thumbnail.find('.default-profile-svg').show(); 1765 } 1766 1767 // ì´ë¯¸ì§ ë¡ë ìë¬ ì´ë²¤í¸ ì²ë¦¬ (기존 + ëì ìì 모ë) 1768 jQuery(document).on('error', '.supply_thumbnail img', function() { 1769 handleImageError(this); 1770 }); 1771 1772 // ì´ë¯¸ì§ ë¡ë ì±ê³µ ì´ë²¤í¸ ì²ë¦¬ (리ì¤í¸ì©) 1773 jQuery(document).on('load', '.supply_thumbnail img', function() { 1774 handleImageLoad(this); 1775 }); 1776 1777 // ìì¸ íì´ì§ íë¡í ì´ë¯¸ì§ ìë¬ ì²ë¦¬ 1778 jQuery(document).on('error', '.producer_image img', function() { 1779 handleProducerImageError(this); 1780 }); 1781 1782 // ìì¸ íì´ì§ íë¡í ì´ë¯¸ì§ ë¡ë ì±ê³µ ì²ë¦¬ 1783 jQuery(document).on('load', '.producer_image img', function() { 1784 var $img = jQuery(this); 1785 var $thumbnail = $img.closest('.producer_image'); 1786 1787 // ììê° ì¡´ì¬íëì§ íì¸ 1788 if (!$img.length || !$thumbnail.length || !$img[0]) { 1789 return; 1790 } 1791
1792 if ($img[0].naturalWidth > 0 && $img[0].naturalHeight > 0) { 1793 $img.css('display', 'block'); 1794 $thumbnail.find('.default-profile-svg').hide(); 1795 } 1796 }); 1797 1798 // 모ë íë¡í ì´ë¯¸ì§ ì²´í¬ (리ì¤í¸ì©) 1799 jQuery('.supply_thumbnail img').each(function() { 1800 var $img = jQuery(this); 1801 var img = this; 1802 var imgSrc = $img.attr('src'); 1803 var $thumbnail = $img.closest('.supply_thumbnail'); 1804 1805 // ì´ë¯¸ì§ê° ë¡ë ìë£ë ê²½ì° 1806 if (img.complete) { 1807 // ì´ë¯¸ì§ í¬ê¸°ê° 0ì´ê±°ë ìë¬ì¸ ê²½ì° 1808 if (img.naturalWidth === 0 || img.naturalHeight === 0) { 1809 handleImageError(img); 1810 return; 1811 } else { 1812 // ì´ë¯¸ì§ê° ì ì ë¡ëëë©´ SVG ì¨ê¸°ê³ ì´ë¯¸ì§ íì 1813 handleImageLoad(img); 1814 } 1815 } else { 1816 // ì´ë¯¸ì§ê° ìì§ ë¡ë ì¤ì¸ ê²½ì°, ë³ëë¡ ì²´í¬ 1817 var testImg = new Image(); 1818 var originalImgSrc = imgSrc; 1819 1820 testImg.onload = function() { 1821 // í ì¤í¸ ì´ë¯¸ì§ ë¡ë ì±ê³µíì§ë§, ì본 ì´ë¯¸ì§ê° ì¬ì í ë¡ë ì ëì¼ë©´ ì²´í¬ 1822 setTimeout(function() { 1823 if (img.complete && (img.naturalWidth === 0 || img.naturalHeight === 0)) { 1824 handleImageError(img); 1825 } else if (img.complete && img.naturalWidth > 0 && img.naturalHeight > 0) { 1826 // ì´ë¯¸ì§ê° ì ì ë¡ëëë©´ SVG ì¨ê¸°ê³ ì´ë¯¸ì§ íì 1827 handleImageLoad(img); 1828 } 1829 }, 100); 1830 }; 1831 1832 testImg.onerror = function() { 1833 // í ì¤í¸ ì´ë¯¸ì§ ë¡ë ì¤í¨ = ì본ë ì¤í¨í ê°ë¥ì± ëì 1834 handleImageError(img); 1835 }; 1836 1837 // í ì¤í¸ ì´ë¯¸ì§ ë¡ë ìë 1838 if (imgSrc) { 1839 testImg.src = imgSrc; 1840 } else { 1841 // srcê° ìì¼ë©´ ë°ë¡ ìë¬ ì²ë¦¬ 1842 handleImageError(img); 1843 } 1844 } 1845 }); 1846 1847 // 모ë íë¡í ì´ë¯¸ì§ ì²´í¬ (ìì¸ íì´ì§ì©) 1848 jQuery('.producer_image img').each(function() { 1849 var $img = jQuery(this); 1850 var img = this; 1851 var imgSrc = $img.attr('src'); 1852 var $thumbnail = $img.closest('.producer_image'); 1853 1854 // ì´ë¯¸ì§ê° ì²ììë ì¨ê¹ ìíë¡ ìì (CSSë¡ ì²ë¦¬) 1855 $img.hide(); 1856 1857 // ì´ë¯¸ì§ê° ë¡ë ìë£ë ê²½ì° 1858 if (img.complete) { 1859 // ì´ë¯¸ì§ í¬ê¸°ê° 0ì´ê±°ë ìë¬ì¸ ê²½ì° 1860 if (img.naturalWidth === 0 || img.naturalHeight === 0) { 1861 handleProducerImageError(img); 1862 return; 1863 } else { 1864 // ì´ë¯¸ì§ê° ì ì ë¡ëëë©´ SVG ì¨ê¸°ê³ ì´ë¯¸ì§ íì 1865 $img.css('display', 'block'); 1866 $thumbnail.find('.default-profile-svg').hide(); 1867 } 1868 } else { 1869 // ì´ë¯¸ì§ê° ìì§ ë¡ë ì¤ì¸ ê²½ì°, ë³ëë¡ ì²´í¬ 1870 var testImg = new Image(); 1871 var originalImgSrc = imgSrc; 1872 1873 testImg.onload = function() { 1874 // í ì¤í¸ ì´ë¯¸ì§ ë¡ë ì±ê³µíì§ë§, ì본 ì´ë¯¸ì§ê° ì¬ì í ë¡ë ì ëì¼ë©´ ì²´í¬ 1875 setTimeout(function() { 1876 if (img.complete && (img.naturalWidth === 0 || img.naturalHeight === 0)) { 1877 handleProducerImageError(img); 1878 } else if (img.complete && img.naturalWidth > 0 && img.naturalHeight > 0) { 1879 // ì´ë¯¸ì§ê° ì ì ë¡ëëë©´ SVG ì¨ê¸°ê³ ì´ë¯¸ì§ íì 1880 $img.css('display', 'block'); 1881 $thumbnail.find('.default-profile-svg').hide(); 1882 } 1883 }, 100); 1884 }; 1885 1886 testImg.onerror = function() { 1887 // í ì¤í¸ ì´ë¯¸ì§ ë¡ë ì¤í¨ = ì본ë ì¤í¨í ê°ë¥ì± ëì 1888 handleProducerImageError(img); 1889 }; 1890 1891 // í ì¤í¸ ì´ë¯¸ì§ ë¡ë ìë 1892 if (imgSrc) { 1893 testImg.src = imgSrc; 1894 } else { 1895 // srcê° ìì¼ë©´ ë°ë¡ ìë¬ ì²ë¦¬ 1896 handleProducerImageError(img); 1897 } 1898 } 1899 }); 1900 } 1901 1902 // ì´ê¸° ì¤í 1903 setDefaultProfileImage(); 1904 1905 // DOM ë¡ë ìë£ íìë í ë² ë ì²´í¬ 1906 jQuery(window).on('load', function() { 1907 setTimeout(function() { 1908 setDefaultProfileImage(); 1909 }, 500); 1910 }); 1911 1912 /* íí° ëª¨ë¬ ë´ë¶ ë«ê¸° ë²í¼ ì²ë¦¬ */ 1913 jQuery(document).on('click', '#filterModal .btnClose', function(e) { 1914 e.preventDefault(); 1915 if (typeof window.SlideModal !== 'undefined') { 1916 window.SlideModal.close('#filterModal'); 1917 } 1918 }); 1919 1920 /* íí° ë¦¬ì¤í¸ ìì± í¨ì */ 1921 function createFilterList() { 1922 var $filterCamera = jQuery('#filterListCamera'); 1923 var $filterItems = jQuery('.searchDataResult li:visible'); 1924 1925 $filterCamera.empty(); 1926 1927 if ($filterItems.length === 0) { 1928 return; 1929 } 1930 1931 $filterItems.each(function() { 1932 var $item = jQuery(this); 1933 var $deleteBtn = $item.find('.btnSearchDelete'); 1934 var filterText = $item.clone().find('.btnSearchDelete').remove().end().text().trim(); 1935 filterText = filterText.replace(/ /g, '').trim(); 1936 1937 // "ì¡°ë¦¬ë°©ë² :", "조리ìê° :" ê°ì ë¼ë²¨ ì ê±° (ì½ë¡ ìì í ì¤í¸ ì ê±°) 1938 filterText = filterText.replace(/^[^:]+:\s*/, ''); 1939 1940 if (!filterText || !$deleteBtn.length) { 1941 return; 1942 } 1943 1944 var searchType = $deleteBtn.attr('search_type'); 1945 var searchValue = $deleteBtn.attr('search_value'); 1946 1947 // X ìì´ì½ SVG 1948 var closeIcon = '<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" class="filter_close_icon"><path d="M9 3L3 9M3 3L9 9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'; 1949 1950 var $filterBtn = jQuery('<button>') 1951 .addClass('filter_list_btn') 1952 .attr('type', 'button') 1953 .attr('data-search-type', searchType || '') 1954 .attr('data-search-value', searchValue || '') 1955 .html('<span class="filter_btn_text">' + filterText + '</span><span class="filter_close_btn">' + closeIcon + '</span>'); 1956 1957 var $inner = jQuery('<div>').addClass('filter_list_inner').append($filterBtn); 1958 var $listItem = jQuery('<li>').addClass('filter_list_item').append($inner); 1959 1960 $filterCamera.append($listItem); 1961 }); 1962 } 1963 1964 /* íí° ê°ì ì ë°ì´í¸ í¨ì */ 1965 function updateFilterCount() { 1966 var $filterItems = jQuery('.searchDataResult li'); 1967 var visibleItems = $filterItems.filter(function() { 1968 var $item = jQuery(this); 1969 return $item.is(':visible') && $item.css('display') !== 'none' && $item.find('.btnSearchDelete').length > 0; 1970 }); 1971 var filterCount = visibleItems.length; 1972 1973 var $filterCount = jQuery('#filterCount'); 1974 var $filterBtn = jQuery('.filter_btn'); 1975 var $filterResetWrap = jQuery('#filterResetWrap'); 1976 1977 // íí° ë¦¬ì¤í¸ ìì± 1978 createFilterList(); 1979 1980 if (filterCount > 0) { 1981 $filterCount.text(filterCount).show(); 1982 $filterBtn.addClass('active'); 1983 $filterResetWrap.css('display', 'block').show(); 1984 } else { 1985 $filterCount.hide(); 1986 $filterBtn.removeClass('active'); 1987 $filterResetWrap.css('display', 'none').hide(); 1988 } 1989 } 1990 1991 // ì´ê¸° ë¡ë ì íí° ê°ì ì ë°ì´í¸ 1992 jQuery(document).ready(function() {
1993 // ì½ê°ì ì§ì°ì ëê³ ì¤í (ì¹´í24 모ë ë ëë§ ë기) 1994 setTimeout(function() { 1995 updateFilterCount(); 1996 }, 100); 1997 1998 // íí° ì¡°ê±´ ìì ë³ê²½ ê°ì§ 1999 var observer = new MutationObserver(function(mutations) { 2000 setTimeout(function() { 2001 updateFilterCount(); 2002 }, 50); 2003 }); 2004 2005 var filterArea = document.querySelector('.xans-product-searchconditiondata'); 2006 if (filterArea) { 2007 observer.observe(filterArea, { 2008 childList: true, 2009 subtree: true, 2010 attributes: true, 2011 attributeFilter: ['style'] 2012 }); 2013 } 2014 2015 // searchDataResult ììë ê°ì 2016 var searchResultArea = document.querySelector('.searchDataResult'); 2017 if (searchResultArea) { 2018 observer.observe(searchResultArea, { 2019 childList: true, 2020 subtree: true 2021 }); 2022 } 2023 }); 2024 2025 /* íí° ë¦¬ì¤í¸ ë²í¼ í´ë¦ ì´ë²¤í¸ (ìì ) */ 2026 jQuery(document).on('click', '.filter_list_btn .filter_close_btn', function(e) { 2027 e.preventDefault(); 2028 e.stopPropagation(); 2029 2030 var $btn = jQuery(this).closest('.filter_list_btn'); 2031 var searchType = $btn.attr('data-search-type'); 2032 var searchValue = $btn.attr('data-search-value'); 2033 2034 if (!searchType || !searchValue) { 2035 return; 2036 } 2037 2038 // í´ë¹ íí° ìì ë²í¼ ì°¾ìì í´ë¦ 2039 var $deleteBtn = jQuery('.btnSearchDelete[search_type="' + searchType + '"][search_value="' + searchValue + '"]'); 2040 if ($deleteBtn.length) { 2041 $deleteBtn.trigger('click'); 2042 } 2043 }); 2044 2045 /* íí° ìì ë²í¼ ì´ë²¤í¸ ì²ë¦¬ */ 2046 jQuery(document).on('click', '.btnSearchDelete', function(e) { 2047 e.preventDefault(); 2048 var $btn = jQuery(this); 2049 var searchType = $btn.attr('search_type'); 2050 var searchValue = $btn.attr('search_value'); 2051 2052 if (!searchType || !searchValue) { 2053 return; 2054 } 2055 2056 // URL íë¼ë¯¸í°ìì í´ë¹ íí° ì ê±° 2057 var urlParams = new URLSearchParams(window.location.search); 2058 var currentUrl = window.location.pathname; 2059 2060 // search_form[option_data][] ë°°ì´ìì í´ë¹ ê° ì ê±° 2061 if (searchType === 'eOptionSearch') { 2062 var optionDataParams = urlParams.getAll('search_form[option_data][]'); 2063 2064 // íí°ë§: searchValueì ì¼ì¹íë ê²ì 모ë ì ê±° 2065 var filteredParams = optionDataParams.filter(function(param) { 2066 // ì´ì¤ ì¸ì½ë©ë ê°ë ì²ë¦¬ 2067 try { 2068 // í ë² ëì½ë© 2069 var decoded1 = decodeURIComponent(param); 2070 // ë ë² ëì½ë© (ì´ì¤ ì¸ì½ë©ë ê²½ì°) 2071 var decoded2 = decodeURIComponent(decoded1); 2072 2073 // searchValueì ì¼ì¹íë©´ ì ê±° (false ë°í) 2074 if (param === searchValue || 2075 decoded1 === searchValue || 2076 decoded2 === searchValue) { 2077 return false; 2078 } 2079 2080 // ì¸ì½ë©ë ê°ê³¼ë ë¹êµ 2081 var encodedValue = encodeURIComponent(searchValue); 2082 if (param === encodedValue || decoded1 === encodedValue) { 2083 return false; 2084 } 2085 2086 return true; // ì¼ì¹íì§ ìì¼ë©´ ì ì§ 2087 } catch(e) { 2088 // ëì½ë© ì¤í¨ ì ì본과 ë¹êµ 2089 return param !== searchValue && param !== encodeURIComponent(searchValue); 2090 } 2091 }); 2092 2093 // 모ë search_form[option_data][] íë¼ë¯¸í° ì ê±° 2094 urlParams.delete('search_form[option_data][]'); 2095 2096 // íí°ë§ë íë¼ë¯¸í° ë¤ì ì¶ê° 2097 filteredParams.forEach(function(param) { 2098 urlParams.append('search_form[option_data][]', param); 2099 }); 2100 } 2101 2102 // ì URLë¡ ì´ë 2103 var newQueryString = urlParams.toString(); 2104 var newUrl = currentUrl + (newQueryString ? '?' + newQueryString : ''); 2105 window.location.href = newUrl; 2106 }); 2107 2108 /* ê²ì ê²°ê³¼ empty ë©ìì§ íì/ì¨ê¹ ì²ë¦¬ */ 2109 function updateSearchEmptyMessage() { 2110 var $searchData = jQuery('.xans-product-searchdata'); 2111 if ($searchData.length === 0) return; 2112 2113 var $emptyMsg = $searchData.find('.empty'); 2114 if ($emptyMsg.length === 0) return; 2115 2116 // ìí 리ì¤í¸ íì¸ (ì¬ë¬ 모ë íì¸) 2117 var $productList = jQuery('.ec-base-product[module="product_listnormal"] .prdList li, .ec-base-product[module="product_listrecommend"] .prdList li, .ec-base-product[module="Search_Result"] .prdList li'); 2118 var hasProducts = $productList.length > 0 && $productList.filter(function() { 2119 return jQuery(this).css('display') !== 'none' && jQuery(this).is(':visible'); 2120 }).length > 0; 2121 2122 if (hasProducts) { 2123 $emptyMsg.removeClass('show').hide(); 2124 } else { 2125 $emptyMsg.addClass('show').show(); 2126 } 2127 } 2128 2129 // ì´ê¸° ì¤í 2130 updateSearchEmptyMessage(); 2131 2132 // ìí 리ì¤í¸ ë³ê²½ ê°ì§ (MutationObserver) 2133 var productListObserver = new MutationObserver(function(mutations) { 2134 updateSearchEmptyMessage(); 2135 }); 2136 2137 // ìí 리ì¤í¸ 컨í ì´ëë¤ ê´ì°° 2138 jQuery('.ec-base-product[module="product_listnormal"], .ec-base-product[module="product_listrecommend"], .ec-base-product[module="Search_Result"]').each(function() { 2139 var $container = jQuery(this).find('.prdList'); 2140 if ($container.length > 0) { 2141 productListObserver.observe($container[0], { childList: true, subtree: true, attributes: true }); 2142 } 2143 }); 2144 2145 // ë보기 ë²í¼ í´ë¦ íìë íì¸ 2146 jQuery(document).on('click', '.btnMore, .more', function() { 2147 setTimeout(function() { 2148 updateSearchEmptyMessage(); 2149 }, 500); 2150 }); 2151 2152 /* morenvy.com ëª©ë¡ ë보기 í´ë¦ì í ì¸ì¨ ê³ì° */ 2153 cal_percent(); //í ì¸ì¨ 2154 jQuery('.ec-base-product ul.prdList').each(function(i){ 2155 const target = this; 2156 let observer = new MutationObserver((mutations) => { // ë ¸ëê° ë³ê²½ ëì ëì ìì 2157 cal_percent(); //í ì¸ì¨ 2158 setDefaultProfileImage(); // íë¡í ì´ë¯¸ì§ ì²ë¦¬ 2159 }); 2160 observer.observe(target, { attributes: true, childList: true }); // ì¤ì í ë³ê²½ì ê°ì§ ìì 2161 }); 2162 2163 setTimeout(function(){ 2164 noCart(); //ì¥ë°êµ¬ë,ìì´ì½ 2165 2166 /* íì ìì´ì½ í ì¤í¸ë¡ ëì²´ */ 2167 jQuery('.soldout_icon').each(function(){ 2168 if( jQuery(this).children().length != 0 ){ 2169 jQuery(this).html('íì ìí').addClass('on') 2170 jQuery(this).parents('.box').find('.pro_icon .cart').remove(); 2171 } 2172 }); 2173 },100); 2174
2175 jQuery(".more_btn , .prd_more").click( function( ){ 2176 setTimeout(function(){ 2177 noCart(); 2178 2179 jQuery('.list_best .num').each(function(index){ 2180 jQuery(this).text(index+1); 2181 }); 2182 2183 /* íì ìì´ì½ í ì¤í¸ë¡ ëì²´ */ 2184 jQuery('.soldout_icon').each(function(){ 2185 if( jQuery(this).children().length != 0 ){ 2186 jQuery(this).text('íì ìí').addClass('on') 2187 jQuery(this).siblings('.pro_icon').remove(); 2188 } 2189 }); 2190 },600); 2191 }); 2192}); 2193 2194// ì¤í¬ë¡¤ ì í ON 2195function scroll_on() { 2196 $('.body').on('scroll touchmove mousewheel', function(e) { 2197 e.preventDefault(); 2198 e.stopPropagation(); 2199 return false; 2200 }); 2201} 2202 2203// ì¤í¬ë¡¤ ì í OFF 2204function scroll_off() { 2205 $('.body').off('scroll touchmove mousewheel'); 2206} 2207 2208/* morenvy.com ìíì ë³´íì */ 2209function children_title () { 2210 jQuery('.description ul.spec li').not('.swiper_rel .description ul.spec li , .swiper_add .description ul.spec li').each(function(){ 2211 var isTitle = jQuery(this).children('.title').children('span').text() 2212 jQuery(this).attr('rel',isTitle) 2213 }) 2214} 2215 2216/* íí° ë²í¼ì í´ëì¤ ì¶ê° */ 2217jQuery(document).ready(function() { 2218 function addButtonClass() { 2219 jQuery('.filterList button').not('.filterButton').addClass('filterButton'); 2220 } 2221 addButtonClass(); 2222 // ëì ì¼ë¡ ì¶ê°ëë ë²í¼ë ì²ë¦¬ 2223 jQuery('.filterList').on('DOMNodeInserted', function() { 2224 addButtonClass(); 2225 }); 2226 // MutationObserver ì¬ì© (ë íëì ì¸ ë°©ë²) 2227 if (window.MutationObserver) { 2228 var observer = new MutationObserver(function(mutations) { 2229 addButtonClass(); 2230 }); 2231 jQuery('.filterList').each(function() { 2232 observer.observe(this, { childList: true, subtree: true }); 2233 }); 2234 } 2235}); 2236 2237/* morenvy.com í ì¸ì¨ ê³ì° */ 2238function cal_percent () { 2239 // ìíëª©ë¡ í ì¸ì¨ ê³ì° (data ìì± ê¸°ë°) 2240 jQuery('.price .discount_rate[data-prod-custom][data-prod-price]').each(function(){ 2241 var $discountSpan = jQuery(this); 2242 var prodCustom = parseInt($discountSpan.attr('data-prod-custom')) || 0; // ìë¹ìê° 2243 var prodPrice = parseInt($discountSpan.attr('data-prod-price')) || 0; // íë§¤ê° 2244 var salePrice = $discountSpan.attr('data-sale-price'); 2245 2246 // í ì¸í매ê°ê° ìì¼ë©´ í ì¸íë§¤ê° ê¸°ì¤ì¼ë¡ ê³ì°, ìì¼ë©´ íë§¤ê° ê¸°ì¤ 2247 var finalPrice = prodPrice; 2248 if (salePrice && salePrice.trim() !== '') { 2249 finalPrice = parseInt(salePrice.replace(/[^0-9]/g, '')) || prodPrice; 2250 } 2251 2252 // í ì¸ì¨ ê³ì°: (ìë¹ìê° - ìµì¢ ê°ê²©) / ìë¹ìê° * 100 2253 var $discountRateEm = $discountSpan.closest('.price').find('em.discount_rate'); 2254 if (prodCustom > 0 && prodCustom > finalPrice) { 2255 var discountPercent = Math.round((prodCustom - finalPrice) / prodCustom * 100); 2256 // ê°ì ë¶ëª¨ ë´ì em.discount_rateì í ì¸ì¨ íì 2257 $discountRateEm.text(discountPercent + '%'); 2258 } else { 2259 // í ì¸ì´ ìì¼ë©´ ìì ì ê±° 2260 $discountRateEm.remove(); 2261 } 2262 }); 2263} 2264 2265// /* morenvy.com í ì¸ì¨ (기존 주ì ì²ë¦¬ë í¨ì) */ 2266// function cal_percent_old () { 2267// jQuery("[rel='í매ê°']").each(function(){ 2268// var that = jQuery(this); 2269// var m_custom = that.siblings("[rel='ìë¹ìê°']").find('.m_item').text().replace(/[^0-9]/g,''); //ìë¹ìê° 2270// var m_price = that.find('.m_item').text().replace(/[^0-9]/g,''); // íë§¤ê° 2271// var m_sale = ''; 2272 2273// var sale_prd; 2274 2275// if (that.siblings("[rel='í ì¸í매ê°']").find('#span_product_price_sale').length != 0 ){ 2276// m_sale = that.siblings("[rel='í ì¸í매ê°']").find('#span_product_price_sale').html().split('<')[0].replace(/[^0-9]/g,''); //ìì¸íì´ì§ í ì¸íë§¤ê° 2277// sale_prd = that.siblings("[rel='í ì¸í매ê°']").find('#span_product_price_sale').html().split('<')[0] 2278// } else { 2279// m_sale = that.siblings("[rel='í ì¸í매ê°']").find('.m_item').text().replace(/[^0-9]/g,''); //ìíëª©ë¡ í ì¸íë§¤ê° 2280// sale_prd = that.siblings("[rel='í ì¸í매ê°']").find('.m_item').text() 2281// } 2282// if( typeof m_sale == "undefined" || m_sale == "" || m_sale == null ) { //í ì¸í매ê°ê° ê³µë°±ì¼ ë 2283// m_sale = m_price 2284// sale_prd = that.find('.m_item').text() 2285// } 2286 2287 2288// /* í ì¸ì¨ ê³ì° */ 2289// if(that.siblings("[rel='í ì¸í매ê°']").length != 0 && m_price != m_sale){ 2290// //var c_sale = Math.round( ( m_custom - m_sale ) / m_custom * 100 ); //ìë¹ìê°ì í ì¸íë§¤ê° 2291// var p_sale = Math.round( ( m_price - m_sale ) / m_price * 100 ); //í매ê°ì í ì¸íë§¤ê° 2292 2293 2294// if(that.parent().hasClass('spec')){ 2295// /* ìíëª©ë¡ */ 2296// that.parents('li').find('.sale_box').text(p_sale + '%').insertBefore(that.siblings("[rel='í ì¸í매ê°']")); // ìíëª©ë¡ í ì¸ì¨ ì¶ë ¥ 2297// that.addClass('through'); 2298// that.siblings("[rel='ìë¹ìê°']").hide(); 2299// that.siblings("[rel='í ì¸í매ê°']").addClass('msale'); 2300 2301 2302// }else{ 2303// /* ìì¸íì´ì§ */ 2304// that.parents('.detailArea').find('.headingArea .sale_box').show().text(p_sale + '%'); // ìì¸íì´ì§ í ì¸ì¨ ì¶ë ¥\ 2305// that.parents('.detailArea').find('.headingArea .sale').text(sale_prd).addClass('msale'); 2306// that.parents('.detailArea').find('.headingArea .custom').hide(); 2307// } 2308 2309// } else if (that.siblings("[rel='ìë¹ìê°']").length != 0){ 2310// if (m_custom != m_price){ 2311// var sale_cnt = Math.round( ( m_custom - m_price ) / m_custom * 100 ); //ìë¹ìê°ì íë§¤ê° 2312 2313 2314// if(that.parent().hasClass('spec')){ 2315// /* ìíëª©ë¡ */ 2316// that.parents('li').find('.sale_box').text(sale_cnt + '%').insertBefore(this); // ìíëª©ë¡ í ì¸ì¨ ì¶ë ¥ 2317// that.addClass('msale'); 2318// that.siblings("[rel='ìë¹ìê°']").addClass('through'); 2319// }else{ 2320// /* ìì¸íì´ì§ */ 2321// that.parents('.xans-product-detail').find('.price_box .sale_box').show().text(sale_cnt + '%'); // ìì¸íì´ì§ í ì¸ì¨ ì¶ë ¥ 2322// that.parents('.xans-product-detail').find('.price').addClass('msale'); 2323// that.parents('.xans-product-detail').find('.custom').addClass('through'); 2324// } 2325// } else { 2326 2327// if(that.parent().hasClass('spec')){ 2328// /* ìíëª©ë¡ */ 2329// that.addClass('msale'); 2330// that.siblings("[rel='ìë¹ìê°']").hide(); 2331// }else{ 2332// /* ìì¸íì´ì§ */ 2333// that.parents('.xans-product-detail').find('.price_box .sale_box').hide(); // ìì¸íì´ì§ í ì¸ì¨ ìì 2334// that.parents('.xans-product-detail').find('.price').addClass('msale'); 2335// that.parents('.xans-product-detail').find('.custom').hide(); 2336// } 2337// } 2338// } else { 2339// if(that.parent().hasClass('spec')){ 2340// /* ìíëª©ë¡ */ 2341// that.addClass('msale'); 2342// }else{ 2343// /* ìì¸íì´ì§ */ 2344// that.parents('.xans-product-detail').find('.price_box .sale_box').hide(); // ìì¸íì´ì§ í ì¸ì¨ ìì 2345// that.parents('.xans-product-detail').find('.price').addClass('msale'); 2346// } 2347// } 2348 2349// /* ìë¹ìê° 0ìì¼ë ìì */ 2350// if( that.parents('.xans-product-detail').find('.custom').text() == '0ì'){ 2351// that.parents('.xans-product-detail').find('.custom').hide(); 2352// } 2353// }) 2354// }; 2355 2356 2357/* morenvy.com ì¥ë°êµ¬ë ì¬ì©ìí ì ì¨ê¹ */ 2358function noCart () { 2359 jQuery(".pro_icon span , .icon").each(function(){ 2360 if (jQuery(this).children('img').length == 0){ 2361 jQuery(this).hide(); 2362 } 2363 }) 2364} 2365 2366/* morenvy.com ì¥ë°êµ¬ëìì í ì¸ê¸ì¡ 0ìì´ë©´ ì¨ê¹ */ 2367jQuery( ".xans-order-list .prdBox .info .txtWarn" ).each(function() { 2368 var discount_price = jQuery(this).text(); 2369 if( discount_price == '-0' ) { 2370 jQuery(this).parent().remove(); 2371 } 2372}); 2373 2374 2375 2376/* morenvy.com ì¿ í¤ ì¤í¬ë¦½í¸ */ 2377function setCookieM(cookie_name, cookie_value, expire_date) { 2378 var today = new Date(); 2379 var expire = new Date(); 2380 expire.setTime(today.getTime() + 3600000 * 24 * expire_date); 2381 cookies = cookie_name + '=' + cookie_value + '; path=/;'; 2382 if (expire_date != 0) cookies += 'expires=' + expire.toGMTString(); 2383 document.cookie = cookies; 2384} 2385 2386function delCookieM(cookie_name) { 2387 var _today = new Date(); 2388 var value = ''; 2389 _today.setDate(_today.getDate() - 1); 2390 document.cookie = cookie_name + "=" + value + '; path=/;' + "; expires=" + _today.toGMTString(); 2391} 2392 2393function getCookieM(name) { 2394 lims = document.cookie; 2395 var index = lims.indexOf(name + "="); 2396 if (index == -1) { 2397 return null; 2398 } 2399 index = lims.indexOf("=", index) + 1; 2400 var endstr = lims.indexOf(';', index); 2401 if (endstr == -1) { 2402 endstr = lims.length; 2403 } 2404 return unescape(lims.substring(index, endstr)); 2405} 2406(function (global, factory) { 2407 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : 2408 typeof define === 'function' && define.amd ? define(['exports'], factory) : 2409 (global = global || self, factory(global.window = global.window || {})); 2410}(this, (function (exports) { 'use strict'; 2411 2412 function _inheritsLoose(subClass, superClass) { 2413 subClass.prototype = Object.create(superClass.prototype); 2414 subClass.prototype.constructor = subClass; 2415 subClass.__proto__ = superClass; 2416 } 2417 2418 function _assertThisInitialized(self) { 2419 if (self === void 0) { 2420 throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 2421 } 2422 2423 return self; 2424 } 2425 2426 /*! 2427 * GSAP 3.11.3 2428 * https://greensock.com 2429 * 2430 * @license Copyright 2008-2022, GreenSock. All rights reserved. 2431 * Subject to the terms at https://greensock.com/standard-license or for 2432 * Club GreenSock members, the agreement issued with that membership. 2433 * @author: Jack Doyle, [email protected] 2434 */ 2435 var _config = { 2436 autoSleep: 120, 2437 force3D: "auto", 2438 nullTargetWarn: 1, 2439 units: { 2440 lineHeight: "" 2441 } 2442 }, 2443 _defaults = { 2444 duration: .5, 2445 overwrite: false, 2446 delay: 0 2447 }, 2448 _suppressOverwrites, 2449 _reverting, 2450 _context, 2451 _bigNum = 1e8, 2452 _tinyNum = 1 / _bigNum, 2453 _2PI = Math.PI * 2, 2454 _HALF_PI = _2PI / 4, 2455 _gsID = 0, 2456 _sqrt = Math.sqrt, 2457 _cos = Math.cos, 2458 _sin = Math.sin, 2459 _isString = function _isString(value) { 2460 return typeof value === "string"; 2461 }, 2462 _isFunction = function _isFunction(value) { 2463 return typeof value === "function"; 2464 }, 2465 _isNumber = function _isNumber(value) { 2466 return typeof value === "number"; 2467 }, 2468 _isUndefined = function _isUndefined(value) { 2469 return typeof value === "undefined"; 2470 }, 2471 _isObject = function _isObject(value) { 2472 return typeof value === "object"; 2473 }, 2474 _isNotFalse = function _isNotFalse(value) { 2475 return value !== false; 2476 }, 2477 _windowExists = function _windowExists() { 2478 return typeof window !== "undefined"; 2479 }, 2480 _isFuncOrString = function _isFuncOrString(value) { 2481 return _isFunction(value) || _isString(value); 2482 }, 2483 _isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView || function () {}, 2484 _isArray = Array.isArray, 2485 _strictNumExp = /(?:-?\.?\d|\.)+/gi, 2486 _numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, 2487 _numWithUnitExp = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, 2488 _complexStringNumExp = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, 2489 _relExp = /[+-]=-?[.\d]+/, 2490 _delimitedValueExp = /[^,'"\[\]\s]+/gi, 2491 _unitExp = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, 2492 _globalTimeline, 2493 _win, 2494 _coreInitted, 2495 _doc, 2496 _globals = {}, 2497 _installScope = {}, 2498 _coreReady, 2499 _install = function _install(scope) {
vendor: 9,330 bytes, lines 2500-2797
2500 return (_installScope = _merge(scope, _globals)) && gsap; 2501 }, 2502 _missingPlugin = function _missingPlugin(property, value) { 2503 return console.warn("Invalid property", property, "set to", value, "Missing plugin? gsap.registerPlugin()"); 2504 }, 2505 _warn = function _warn(message, suppress) { 2506 return !suppress && console.warn(message); 2507 }, 2508 _addGlobal = function _addGlobal(name, obj) { 2509 return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals; 2510 }, 2511 _emptyFunc = function _emptyFunc() { 2512 return 0; 2513 }, 2514 _startAtRevertConfig = { 2515 suppressEvents: true, 2516 isStart: true, 2517 kill: false 2518 }, 2519 _revertConfigNoKill = { 2520 suppressEvents: true, 2521 kill: false 2522 }, 2523 _revertConfig = { 2524 suppressEvents: true 2525 }, 2526 _reservedProps = {}, 2527 _lazyTweens = [], 2528 _lazyLookup = {}, 2529 _lastRenderedFrame, 2530 _plugins = {}, 2531 _effects = {}, 2532 _nextGCFrame = 30, 2533 _harnessPlugins = [], 2534 _callbackNames = "", 2535 _harness = function _harness(targets) { 2536 var target = targets[0], 2537 harnessPlugin, 2538 i; 2539 _isObject(target) || _isFunction(target) || (targets = [targets]); 2540 2541 if (!(harnessPlugin = (target._gsap || {}).harness)) { 2542 i = _harnessPlugins.length; 2543 2544 while (i-- && !_harnessPlugins[i].targetTest(target)) {} 2545 2546 harnessPlugin = _harnessPlugins[i]; 2547 } 2548 2549 i = targets.length; 2550 2551 while (i--) { 2552 targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1); 2553 } 2554 2555 return targets; 2556 }, 2557 _getCache = function _getCache(target) { 2558 return target._gsap || _harness(toArray(target))[0]._gsap; 2559 }, 2560 _getProperty = function _getProperty(target, property, v) { 2561 return (v = target[property]) && _isFunction(v) ? target[property]() : _isUndefined(v) && target.getAttribute && target.getAttribute(property) || v; 2562 }, 2563 _forEachName = function _forEachName(names, func) { 2564 return (names = names.split(",")).forEach(func) || names; 2565 }, 2566 _round = function _round(value) { 2567 return Math.round(value * 100000) / 100000 || 0; 2568 }, 2569 _roundPrecise = function _roundPrecise(value) { 2570 return Math.round(value * 10000000) / 10000000 || 0; 2571 }, 2572 _parseRelative = function _parseRelative(start, value) { 2573 var operator = value.charAt(0), 2574 end = parseFloat(value.substr(2)); 2575 start = parseFloat(start); 2576 return operator === "+" ? start + end : operator === "-" ? start - end : operator === "*" ? start * end : start / end; 2577 }, 2578 _arrayContainsAny = function _arrayContainsAny(toSearch, toFind) { 2579 var l = toFind.length, 2580 i = 0; 2581 2582 for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l;) {} 2583 2584 return i < l; 2585 }, 2586 _lazyRender = function _lazyRender() { 2587 var l = _lazyTweens.length, 2588 a = _lazyTweens.slice(0), 2589 i, 2590 tween; 2591 2592 _lazyLookup = {}; 2593 _lazyTweens.length = 0; 2594 2595 for (i = 0; i < l; i++) { 2596 tween = a[i]; 2597 tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0); 2598 } 2599 }, 2600 _lazySafeRender = function _lazySafeRender(animation, time, suppressEvents, force) { 2601 _lazyTweens.length && _lazyRender(); 2602 animation.render(time, suppressEvents, force || _reverting && time < 0 && (animation._initted || animation._startAt)); 2603 _lazyTweens.length && _lazyRender(); 2604 }, 2605 _numericIfPossible = function _numericIfPossible(value) { 2606 var n = parseFloat(value); 2607 return (n || n === 0) && (value + "").match(_delimitedValueExp).length < 2 ? n : _isString(value) ? value.trim() : value; 2608 }, 2609 _passThrough = function _passThrough(p) { 2610 return p; 2611 }, 2612 _setDefaults = function _setDefaults(obj, defaults) { 2613 for (var p in defaults) { 2614 p in obj || (obj[p] = defaults[p]); 2615 } 2616 2617 return obj; 2618 }, 2619 _setKeyframeDefaults = function _setKeyframeDefaults(excludeDuration) { 2620 return function (obj, defaults) { 2621 for (var p in defaults) { 2622 p in obj || p === "duration" && excludeDuration || p === "ease" || (obj[p] = defaults[p]); 2623 } 2624 }; 2625 }, 2626 _merge = function _merge(base, toMerge) { 2627 for (var p in toMerge) { 2628 base[p] = toMerge[p]; 2629 } 2630 2631 return base; 2632 }, 2633 _mergeDeep = function _mergeDeep(base, toMerge) { 2634 for (var p in toMerge) { 2635 p !== "__proto__" && p !== "constructor" && p !== "prototype" && (base[p] = _isObject(toMerge[p]) ? _mergeDeep(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p]); 2636 } 2637 2638 return base; 2639 }, 2640 _copyExcluding = function _copyExcluding(obj, excluding) { 2641 var copy = {}, 2642 p; 2643 2644 for (p in obj) { 2645 p in excluding || (copy[p] = obj[p]); 2646 } 2647 2648 return copy; 2649 }, 2650 _inheritDefaults = function _inheritDefaults(vars) { 2651 var parent = vars.parent || _globalTimeline, 2652 func = vars.keyframes ? _setKeyframeDefaults(_isArray(vars.keyframes)) : _setDefaults; 2653 2654 if (_isNotFalse(vars.inherit)) { 2655 while (parent) { 2656 func(vars, parent.vars.defaults); 2657 parent = parent.parent || parent._dp; 2658 } 2659 } 2660 2661 return vars; 2662 }, 2663 _arraysMatch = function _arraysMatch(a1, a2) { 2664 var i = a1.length, 2665 match = i === a2.length; 2666 2667 while (match && i-- && a1[i] === a2[i]) {} 2668 2669 return i < 0; 2670 }, 2671 _addLinkedListItem = function _addLinkedListItem(parent, child, firstProp, lastProp, sortBy) { 2672 if (firstProp === void 0) { 2673 firstProp = "_first"; 2674 } 2675 2676 if (lastProp === void 0) { 2677 lastProp = "_last"; 2678 } 2679 2680 var prev = parent[lastProp], 2681 t; 2682 2683 if (sortBy) { 2684 t = child[sortBy]; 2685 2686 while (prev && prev[sortBy] > t) { 2687 prev = prev._prev; 2688 } 2689 } 2690 2691 if (prev) { 2692 child._next = prev._next; 2693 prev._next = child; 2694 } else { 2695 child._next = parent[firstProp]; 2696 parent[firstProp] = child; 2697 } 2698 2699 if (child._next) { 2700 child._next._prev = child; 2701 } else { 2702 parent[lastProp] = child; 2703 } 2704 2705 child._prev = prev; 2706 child.parent = child._dp = parent; 2707 return child; 2708 }, 2709 _removeLinkedListItem = function _removeLinkedListItem(parent, child, firstProp, lastProp) { 2710 if (firstProp === void 0) { 2711 firstProp = "_first"; 2712 } 2713 2714 if (lastProp === void 0) { 2715 lastProp = "_last"; 2716 } 2717 2718 var prev = child._prev, 2719 next = child._next; 2720 2721 if (prev) { 2722 prev._next = next; 2723 } else if (parent[firstProp] === child) { 2724 parent[firstProp] = next; 2725 } 2726 2727 if (next) { 2728 next._prev = prev; 2729 } else if (parent[lastProp] === child) { 2730 parent[lastProp] = prev; 2731 } 2732 2733 child._next = child._prev = child.parent = null; 2734 }, 2735 _removeFromParent = function _removeFromParent(child, onlyIfParentHasAutoRemove) { 2736 child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove(child); 2737 child._act = 0; 2738 }, 2739 _uncache = function _uncache(animation, child) { 2740 if (animation && (!child || child._end > animation._dur || child._start < 0)) { 2741 var a = animation; 2742 2743 while (a) { 2744 a._dirty = 1; 2745 a = a.parent; 2746 } 2747 } 2748 2749 return animation; 2750 }, 2751 _recacheAncestors = function _recacheAncestors(animation) { 2752 var parent = animation.parent; 2753 2754 while (parent && parent.parent) { 2755 parent._dirty = 1; 2756 parent.totalDuration(); 2757 parent = parent.parent; 2758 } 2759 2760 return animation; 2761 }, 2762 _rewindStartAt = function _rewindStartAt(tween, totalTime, suppressEvents, force) { 2763 return tween._startAt && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween.vars.immediateRender && !tween.vars.autoRevert || tween._startAt.render(totalTime, true, force)); 2764 }, 2765 _hasNoPausedAncestors = function _hasNoPausedAncestors(animation) { 2766 return !animation || animation._ts && _hasNoPausedAncestors(animation.parent); 2767 }, 2768 _elapsedCycleDuration = function _elapsedCycleDuration(animation) { 2769 return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0; 2770 }, 2771 _animationCycle = function _animationCycle(tTime, cycleDuration) { 2772 var whole = Math.floor(tTime /= cycleDuration); 2773 return tTime && whole === tTime ? whole - 1 : whole; 2774 }, 2775 _parentToChildTotalTime = function _parentToChildTotalTime(parentTime, child) { 2776 return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur); 2777 }, 2778 _setEnd = function _setEnd(animation) { 2779 return animation._end = _roundPrecise(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0)); 2780 }, 2781 _alignPlayhead = function _alignPlayhead(animation, totalTime) { 2782 var parent = animation._dp; 2783 2784 if (parent && parent.smoothChildTiming && animation._ts) { 2785 animation._start = _roundPrecise(parent._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts)); 2786 2787 _setEnd(animation); 2788 2789 parent._dirty || _uncache(parent, animation); 2790 } 2791 2792 return animation; 2793 }, 2794 _postAddChecks = function _postAddChecks(timeline, child) { 2795 var t; 2796 2797 if (child._time || child._initted && !child._dur
vendor: 11,458 bytes, lines 2797-3109
2797) { 2798 t = _parentToChildTotalTime(timeline.rawTime(), child); 2799 2800 if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) { 2801 child.render(t, true); 2802 } 2803 } 2804 2805 if (_uncache(timeline, child)._dp && timeline._initted && timeline._time >= timeline._dur && timeline._ts) { 2806 if (timeline._dur < timeline.duration()) { 2807 t = timeline; 2808 2809 while (t._dp) { 2810 t.rawTime() >= 0 && t.totalTime(t._tTime); 2811 t = t._dp; 2812 } 2813 } 2814 2815 timeline._zTime = -_tinyNum; 2816 } 2817 }, 2818 _addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) { 2819 child.parent && _removeFromParent(child); 2820 child._start = _roundPrecise((_isNumber(position) ? position : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay); 2821 child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0)); 2822 2823 _addLinkedListItem(timeline, child, "_first", "_last", timeline._sort ? "_start" : 0); 2824 2825 _isFromOrFromStart(child) || (timeline._recent = child); 2826 skipChecks || _postAddChecks(timeline, child); 2827 timeline._ts < 0 && _alignPlayhead(timeline, timeline._tTime); 2828 return timeline; 2829 }, 2830 _scrollTrigger = function _scrollTrigger(animation, trigger) { 2831 return (_globals.ScrollTrigger || _missingPlugin("scrollTrigger", trigger)) && _globals.ScrollTrigger.create(trigger, animation); 2832 }, 2833 _attemptInitTween = function _attemptInitTween(tween, time, force, suppressEvents, tTime) { 2834 _initTween(tween, time, tTime); 2835 2836 if (!tween._initted) { 2837 return 1; 2838 } 2839 2840 if (!force && tween._pt && !_reverting && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) { 2841 _lazyTweens.push(tween); 2842 2843 tween._lazy = [tTime, suppressEvents]; 2844 return 1; 2845 } 2846 }, 2847 _parentPlayheadIsBeforeStart = function _parentPlayheadIsBeforeStart(_ref) { 2848 var parent = _ref.parent; 2849 return parent && parent._ts && parent._initted && !parent._lock && (parent.rawTime() < 0 || _parentPlayheadIsBeforeStart(parent)); 2850 }, 2851 _isFromOrFromStart = function _isFromOrFromStart(_ref2) { 2852 var data = _ref2.data; 2853 return data === "isFromStart" || data === "isStart"; 2854 }, 2855 _renderZeroDurationTween = function _renderZeroDurationTween(tween, totalTime, suppressEvents, force) { 2856 var prevRatio = tween.ratio, 2857 ratio = totalTime < 0 || !totalTime && (!tween._start && _parentPlayheadIsBeforeStart(tween) && !(!tween._initted && _isFromOrFromStart(tween)) || (tween._ts < 0 || tween._dp._ts < 0) && !_isFromOrFromStart(tween)) ? 0 : 1, 2858 repeatDelay = tween._rDelay, 2859 tTime = 0, 2860 pt, 2861 iteration, 2862 prevIteration; 2863 2864 if (repeatDelay && tween._repeat) { 2865 tTime = _clamp(0, tween._tDur, totalTime); 2866 iteration = _animationCycle(tTime, repeatDelay); 2867 tween._yoyo && iteration & 1 && (ratio = 1 - ratio); 2868 2869 if (iteration !== _animationCycle(tween._tTime, repeatDelay)) { 2870 prevRatio = 1 - ratio; 2871 tween.vars.repeatRefresh && tween._initted && tween.invalidate(); 2872 } 2873 } 2874 2875 if (ratio !== prevRatio || _reverting || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) { 2876 if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents, tTime)) { 2877 return; 2878 } 2879 2880 prevIteration = tween._zTime; 2881 tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0); 2882 suppressEvents || (suppressEvents = totalTime && !prevIteration); 2883 tween.ratio = ratio; 2884 tween._from && (ratio = 1 - ratio); 2885 tween._time = 0; 2886 tween._tTime = tTime; 2887 pt = tween._pt; 2888 2889 while (pt) { 2890 pt.r(ratio, pt.d); 2891 pt = pt._next; 2892 } 2893 2894 totalTime < 0 && _rewindStartAt(tween, totalTime, suppressEvents, true); 2895 tween._onUpdate && !suppressEvents && _callback(tween, "onUpdate"); 2896 tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, "onRepeat"); 2897 2898 if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) { 2899 ratio && _removeFromParent(tween, 1); 2900 2901 if (!suppressEvents && !_reverting) { 2902 _callback(tween, ratio ? "onComplete" : "onReverseComplete", true); 2903 2904 tween._prom && tween._prom(); 2905 } 2906 } 2907 } else if (!tween._zTime) { 2908 tween._zTime = totalTime; 2909 } 2910 }, 2911 _findNextPauseTween = function _findNextPauseTween(animation, prevTime, time) { 2912 var child; 2913 2914 if (time > prevTime) { 2915 child = animation._first; 2916 2917 while (child && child._start <= time) { 2918 if (child.data === "isPause" && child._start > prevTime) { 2919 return child; 2920 } 2921 2922 child = child._next; 2923 } 2924 } else { 2925 child = animation._last; 2926 2927 while (child && child._start >= time) { 2928 if (child.data === "isPause" && child._start < prevTime) { 2929 return child; 2930 } 2931 2932 child = child._prev; 2933 } 2934 } 2935 }, 2936 _setDuration = function _setDuration(animation, duration, skipUncache, leavePlayhead) { 2937 var repeat = animation._repeat, 2938 dur = _roundPrecise(duration) || 0, 2939 totalProgress = animation._tTime / animation._tDur; 2940 totalProgress && !leavePlayhead && (animation._time *= dur / animation._dur); 2941 animation._dur = dur; 2942 animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _roundPrecise(dur * (repeat + 1) + animation._rDelay * repeat); 2943 totalProgress > 0 && !leavePlayhead && _alignPlayhead(animation, animation._tTime = animation._tDur * totalProgress); 2944 animation.parent && _setEnd(animation); 2945 skipUncache || _uncache(animation.parent, animation); 2946 return animation; 2947 }, 2948 _onUpdateTotalDuration = function _onUpdateTotalDuration(animation) { 2949 return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur); 2950 }, 2951 _zeroPosition = { 2952 _start: 0, 2953 endTime: _emptyFunc, 2954 totalDuration: _emptyFunc 2955 }, 2956 _parsePosition = function _parsePosition(animation, position, percentAnimation) { 2957 var labels = animation.labels, 2958 recent = animation._recent || _zeroPosition, 2959 clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur, 2960 i, 2961 offset, 2962 isPercent; 2963 2964 if (_isString(position) && (isNaN(position) || position in labels)) { 2965 offset = position.charAt(0); 2966 isPercent = position.substr(-1) === "%"; 2967 i = position.indexOf("="); 2968 2969 if (offset === "<" || offset === ">") { 2970 i >= 0 && (position = position.replace(/=/, "")); 2971 return (offset === "<" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0) * (isPercent ? (i < 0 ? recent : percentAnimation).totalDuration() / 100 : 1); 2972 } 2973 2974 if (i < 0) { 2975 position in labels || (labels[position] = clippedDuration); 2976 return labels[position]; 2977 } 2978 2979 offset = parseFloat(position.charAt(i - 1) + position.substr(i + 1)); 2980 2981 if (isPercent && percentAnimation) { 2982 offset = offset / 100 * (_isArray(percentAnimation) ? percentAnimation[0] : percentAnimation).totalDuration(); 2983 } 2984 2985 return i > 1 ? _parsePosition(animation, position.substr(0, i - 1), percentAnimation) + offset : clippedDuration + offset; 2986 } 2987 2988 return position == null ? clippedDuration : +position; 2989 }, 2990 _createTweenType = function _createTweenType(type, params, timeline) { 2991 var isLegacy = _isNumber(params[1]), 2992 varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1), 2993 vars = params[varsIndex], 2994 irVars, 2995 parent; 2996 2997 isLegacy && (vars.duration = params[1]); 2998 vars.parent = timeline; 2999 3000 if (type) { 3001 irVars = vars; 3002 parent = timeline; 3003 3004 while (parent && !("immediateRender" in irVars)) { 3005 irVars = parent.vars.defaults || {}; 3006 parent = _isNotFalse(parent.vars.inherit) && parent.parent; 3007 } 3008 3009 vars.immediateRender = _isNotFalse(irVars.immediateRender); 3010 type < 2 ? vars.runBackwards = 1 : vars.startAt = params[varsIndex - 1]; 3011 } 3012 3013 return new Tween(params[0], vars, params[varsIndex + 1]); 3014 }, 3015 _conditionalReturn = function _conditionalReturn(value, func) { 3016 return value || value === 0 ? func(value) : func; 3017 }, 3018 _clamp = function _clamp(min, max, value) { 3019 return value < min ? min : value > max ? max : value; 3020 }, 3021 getUnit = function getUnit(value, v) { 3022 return !_isString(value) || !(v = _unitExp.exec(value)) ? "" : v[1]; 3023 }, 3024 clamp = function clamp(min, max, value) { 3025 return _conditionalReturn(value, function (v) { 3026 return _clamp(min, max, v); 3027 }); 3028 }, 3029 _slice = [].slice, 3030 _isArrayLike = function _isArrayLike(value, nonEmpty) { 3031 return value && _isObject(value) && "length" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win; 3032 }, 3033 _flatten = function _flatten(ar, leaveStrings, accumulator) { 3034 if (accumulator === void 0) { 3035 accumulator = []; 3036 } 3037 3038 return ar.forEach(function (value) { 3039 var _accumulator; 3040 3041 return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value); 3042 }) || accumulator; 3043 }, 3044 toArray = function toArray(value, scope, leaveStrings) { 3045 return _context && !scope && _context.selector ? _context.selector(value) : _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call((scope || _doc).querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : []; 3046 }, 3047 selector = function selector(value) { 3048 value = toArray(value)[0] || _warn("Invalid scope") || {}; 3049 return function (v) { 3050 var el = value.current || value.nativeElement || value; 3051 return toArray(v, el.querySelectorAll ? el : el === value ? _warn("Invalid scope") || _doc.createElement("div") : value); 3052 }; 3053 }, 3054 shuffle = function shuffle(a) { 3055 return a.sort(function () { 3056 return .5 - Math.random(); 3057 }); 3058 }, 3059 distribute = function distribute(v) { 3060 if (_isFunction(v)) { 3061 return v; 3062 } 3063 3064 var vars = _isObject(v) ? v : { 3065 each: v 3066 }, 3067 ease = _parseEase(vars.ease), 3068 from = vars.from || 0, 3069 base = parseFloat(vars.base) || 0, 3070 cache = {}, 3071 isDecimal = from > 0 && from < 1, 3072 ratios = isNaN(from) || isDecimal, 3073 axis = vars.axis, 3074 ratioX = from, 3075 ratioY = from; 3076 3077 if (_isString(from)) { 3078 ratioX = ratioY = { 3079 center: .5, 3080 edges: .5, 3081 end: 1 3082 }[from] || 0; 3083 } else if (!isDecimal && ratios) { 3084 ratioX = from[0]; 3085 ratioY = from[1]; 3086 } 3087 3088 return function (i, target, a) { 3089 var l = (a || vars).length, 3090 distances = cache[l], 3091 originX, 3092 originY, 3093 x, 3094 y, 3095 d, 3096 j, 3097 max, 3098 min, 3099 wrapAt; 3100 3101 if (!distances) { 3102 wrapAt = vars.grid === "auto" ? 0 : (vars.grid || [1, _bigNum])[1]; 3103 3104 if (!wrapAt) { 3105 max = -_bigNum; 3106 3107 while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {} 3108 3109 wrapAt
vendor: 3,154 bytes, lines 3109-3199
3109--; 3110 } 3111 3112 distances = cache[l] = []; 3113 originX = ratios ? Math.min(wrapAt, l) * ratioX - .5 : from % wrapAt; 3114 originY = wrapAt === _bigNum ? 0 : ratios ? l * ratioY / wrapAt - .5 : from / wrapAt | 0; 3115 max = 0; 3116 min = _bigNum; 3117 3118 for (j = 0; j < l; j++) { 3119 x = j % wrapAt - originX; 3120 y = originY - (j / wrapAt | 0); 3121 distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === "y" ? y : x); 3122 d > max && (max = d); 3123 d < min && (min = d); 3124 } 3125 3126 from === "random" && shuffle(distances); 3127 distances.max = max - min; 3128 distances.min = min; 3129 distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === "y" ? l / wrapAt : wrapAt) || 0) * (from === "edges" ? -1 : 1); 3130 distances.b = l < 0 ? base - l : base; 3131 distances.u = getUnit(vars.amount || vars.each) || 0; 3132 ease = ease && l < 0 ? _invertEase(ease) : ease; 3133 } 3134 3135 l = (distances[i] - distances.min) / distances.max || 0; 3136 return _roundPrecise(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u; 3137 }; 3138 }, 3139 _roundModifier = function _roundModifier(v) { 3140 var p = Math.pow(10, ((v + "").split(".")[1] || "").length); 3141 return function (raw) { 3142 var n = _roundPrecise(Math.round(parseFloat(raw) / v) * v * p); 3143 3144 return (n - n % 1) / p + (_isNumber(raw) ? 0 : getUnit(raw)); 3145 }; 3146 }, 3147 snap = function snap(snapTo, value) { 3148 var isArray = _isArray(snapTo), 3149 radius, 3150 is2D; 3151 3152 if (!isArray && _isObject(snapTo)) { 3153 radius = isArray = snapTo.radius || _bigNum; 3154 3155 if (snapTo.values) { 3156 snapTo = toArray(snapTo.values); 3157 3158 if (is2D = !_isNumber(snapTo[0])) { 3159 radius *= radius; 3160 } 3161 } else { 3162 snapTo = _roundModifier(snapTo.increment); 3163 } 3164 } 3165 3166 return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : _isFunction(snapTo) ? function (raw) { 3167 is2D = snapTo(raw); 3168 return Math.abs(is2D - raw) <= radius ? is2D : raw; 3169 } : function (raw) { 3170 var x = parseFloat(is2D ? raw.x : raw), 3171 y = parseFloat(is2D ? raw.y : 0), 3172 min = _bigNum, 3173 closest = 0, 3174 i = snapTo.length, 3175 dx, 3176 dy; 3177 3178 while (i--) { 3179 if (is2D) { 3180 dx = snapTo[i].x - x; 3181 dy = snapTo[i].y - y; 3182 dx = dx * dx + dy * dy; 3183 } else { 3184 dx = Math.abs(snapTo[i] - x); 3185 } 3186 3187 if (dx < min) { 3188 min = dx; 3189 closest = i; 3190 } 3191 } 3192 3193 closest = !radius || min <= radius ? snapTo[closest] : raw; 3194 return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw); 3195 }); 3196 }, 3197 random = function random(min, max, roundingIncrement, returnFunction) { 3198 return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function () { 3199 return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e
vendor: 4,891 bytes, lines 3199-3361
3199-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * .99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction; 3200 }); 3201 }, 3202 pipe = function pipe() { 3203 for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) { 3204 functions[_key] = arguments[_key]; 3205 } 3206 3207 return function (value) { 3208 return functions.reduce(function (v, f) { 3209 return f(v); 3210 }, value); 3211 }; 3212 }, 3213 unitize = function unitize(func, unit) { 3214 return function (value) { 3215 return func(parseFloat(value)) + (unit || getUnit(value)); 3216 }; 3217 }, 3218 normalize = function normalize(min, max, value) { 3219 return mapRange(min, max, 0, 1, value); 3220 }, 3221 _wrapArray = function _wrapArray(a, wrapper, value) { 3222 return _conditionalReturn(value, function (index) { 3223 return a[~~wrapper(index)]; 3224 }); 3225 }, 3226 wrap = function wrap(min, max, value) { 3227 var range = max - min; 3228 return _isArray(min) ? _wrapArray(min, wrap(0, min.length), max) : _conditionalReturn(value, function (value) { 3229 return (range + (value - min) % range) % range + min; 3230 }); 3231 }, 3232 wrapYoyo = function wrapYoyo(min, max, value) { 3233 var range = max - min, 3234 total = range * 2; 3235 return _isArray(min) ? _wrapArray(min, wrapYoyo(0, min.length - 1), max) : _conditionalReturn(value, function (value) { 3236 value = (total + (value - min) % total) % total || 0; 3237 return min + (value > range ? total - value : value); 3238 }); 3239 }, 3240 _replaceRandom = function _replaceRandom(value) { 3241 var prev = 0, 3242 s = "", 3243 i, 3244 nums, 3245 end, 3246 isArray; 3247 3248 while (~(i = value.indexOf("random(", prev))) { 3249 end = value.indexOf(")", i); 3250 isArray = value.charAt(i + 7) === "["; 3251 nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp); 3252 s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], isArray ? 0 : +nums[1], +nums[2] || 1e-5); 3253 prev = end + 1; 3254 } 3255 3256 return s + value.substr(prev, value.length - prev); 3257 }, 3258 mapRange = function mapRange(inMin, inMax, outMin, outMax, value) { 3259 var inRange = inMax - inMin, 3260 outRange = outMax - outMin; 3261 return _conditionalReturn(value, function (value) { 3262 return outMin + ((value - inMin) / inRange * outRange || 0); 3263 }); 3264 }, 3265 interpolate = function interpolate(start, end, progress, mutate) { 3266 var func = isNaN(start + end) ? 0 : function (p) { 3267 return (1 - p) * start + p * end; 3268 }; 3269 3270 if (!func) { 3271 var isString = _isString(start), 3272 master = {}, 3273 p, 3274 i, 3275 interpolators, 3276 l, 3277 il; 3278 3279 progress === true && (mutate = 1) && (progress = null); 3280 3281 if (isString) { 3282 start = { 3283 p: start 3284 }; 3285 end = { 3286 p: end 3287 }; 3288 } else if (_isArray(start) && !_isArray(end)) { 3289 interpolators = []; 3290 l = start.length; 3291 il = l - 2; 3292 3293 for (i = 1; i < l; i++) { 3294 interpolators.push(interpolate(start[i - 1], start[i])); 3295 } 3296 3297 l--; 3298 3299 func = function func(p) { 3300 p *= l; 3301 var i = Math.min(il, ~~p); 3302 return interpolators[i](p - i); 3303 }; 3304 3305 progress = end; 3306 } else if (!mutate) { 3307 start = _merge(_isArray(start) ? [] : {}, start); 3308 } 3309 3310 if (!interpolators) { 3311 for (p in end) { 3312 _addPropTween.call(master, start, p, "get", end[p]); 3313 } 3314 3315 func = function func(p) { 3316 return _renderPropTweens(p, master) || (isString ? start.p : start); 3317 }; 3318 } 3319 } 3320 3321 return _conditionalReturn(progress, func); 3322 }, 3323 _getLabelInDirection = function _getLabelInDirection(timeline, fromTime, backward) { 3324 var labels = timeline.labels, 3325 min = _bigNum, 3326 p, 3327 distance, 3328 label; 3329 3330 for (p in labels) { 3331 distance = labels[p] - fromTime; 3332 3333 if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) { 3334 label = p; 3335 min = distance; 3336 } 3337 } 3338 3339 return label; 3340 }, 3341 _callback = function _callback(animation, type, executeLazyFirst) { 3342 var v = animation.vars, 3343 callback = v[type], 3344 prevContext = _context, 3345 context = animation._ctx, 3346 params, 3347 scope, 3348 result; 3349 3350 if (!callback) { 3351 return; 3352 } 3353 3354 params = v[type + "Params"]; 3355 scope = v.callbackScope || animation; 3356 executeLazyFirst && _lazyTweens.length && _lazyRender(); 3357 context && (_context = context); 3358 result = params ? callback.apply(scope, params) : callback.call(scope); 3359 _context = prevContext; 3360 return result; 3361 },
vendor: 7,656 bytes, lines 3362-3647
3362 _interrupt = function _interrupt(animation) { 3363 _removeFromParent(animation); 3364 3365 animation.scrollTrigger && animation.scrollTrigger.kill(!!_reverting); 3366 animation.progress() < 1 && _callback(animation, "onInterrupt"); 3367 return animation; 3368 }, 3369 _quickTween, 3370 _createPlugin = function _createPlugin(config) { 3371 config = !config.name && config["default"] || config; 3372 3373 var name = config.name, 3374 isFunc = _isFunction(config), 3375 Plugin = name && !isFunc && config.init ? function () { 3376 this._props = []; 3377 } : config, 3378 instanceDefaults = { 3379 init: _emptyFunc, 3380 render: _renderPropTweens, 3381 add: _addPropTween, 3382 kill: _killPropTweensOf, 3383 modifier: _addPluginModifier, 3384 rawVars: 0 3385 }, 3386 statics = { 3387 targetTest: 0, 3388 get: 0, 3389 getSetter: _getSetter, 3390 aliases: {}, 3391 register: 0 3392 }; 3393 3394 _wake(); 3395 3396 if (config !== Plugin) { 3397 if (_plugins[name]) { 3398 return; 3399 } 3400 3401 _setDefaults(Plugin, _setDefaults(_copyExcluding(config, instanceDefaults), statics)); 3402 3403 _merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config, statics))); 3404 3405 _plugins[Plugin.prop = name] = Plugin; 3406 3407 if (config.targetTest) { 3408 _harnessPlugins.push(Plugin); 3409 3410 _reservedProps[name] = 1; 3411 } 3412 3413 name = (name === "css" ? "CSS" : name.charAt(0).toUpperCase() + name.substr(1)) + "Plugin"; 3414 } 3415 3416 _addGlobal(name, Plugin); 3417 3418 config.register && config.register(gsap, Plugin, PropTween); 3419 }, 3420 _255 = 255, 3421 _colorLookup = { 3422 aqua: [0, _255, _255], 3423 lime: [0, _255, 0], 3424 silver: [192, 192, 192], 3425 black: [0, 0, 0], 3426 maroon: [128, 0, 0], 3427 teal: [0, 128, 128], 3428 blue: [0, 0, _255], 3429 navy: [0, 0, 128], 3430 white: [_255, _255, _255], 3431 olive: [128, 128, 0], 3432 yellow: [_255, _255, 0], 3433 orange: [_255, 165, 0], 3434 gray: [128, 128, 128], 3435 purple: [128, 0, 128], 3436 green: [0, 128, 0], 3437 red: [_255, 0, 0], 3438 pink: [_255, 192, 203], 3439 cyan: [0, _255, _255], 3440 transparent: [_255, _255, _255, 0] 3441 }, 3442 _hue = function _hue(h, m1, m2) { 3443 h += h < 0 ? 1 : h > 1 ? -1 : 0; 3444 return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < .5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + .5 | 0; 3445 }, 3446 splitColor = function splitColor(v, toHSL, forceAlpha) { 3447 var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0, 3448 r, 3449 g, 3450 b, 3451 h, 3452 s, 3453 l, 3454 max, 3455 min, 3456 d, 3457 wasHSL; 3458 3459 if (!a) { 3460 if (v.substr(-1) === ",") { 3461 v = v.substr(0, v.length - 1); 3462 } 3463 3464 if (_colorLookup[v]) { 3465 a = _colorLookup[v]; 3466 } else if (v.charAt(0) === "#") { 3467 if (v.length < 6) { 3468 r = v.charAt(1); 3469 g = v.charAt(2); 3470 b = v.charAt(3); 3471 v = "#" + r + r + g + g + b + b + (v.length === 5 ? v.charAt(4) + v.charAt(4) : ""); 3472 } 3473 3474 if (v.length === 9) { 3475 a = parseInt(v.substr(1, 6), 16); 3476 return [a >> 16, a >> 8 & _255, a & _255, parseInt(v.substr(7), 16) / 255]; 3477 } 3478 3479 v = parseInt(v.substr(1), 16); 3480 a = [v >> 16, v >> 8 & _255, v & _255]; 3481 } else if (v.substr(0, 3) === "hsl") { 3482 a = wasHSL = v.match(_strictNumExp); 3483 3484 if (!toHSL) { 3485 h = +a[0] % 360 / 360; 3486 s = +a[1] / 100; 3487 l = +a[2] / 100; 3488 g = l <= .5 ? l * (s + 1) : l + s - l * s; 3489 r = l * 2 - g; 3490 a.length > 3 && (a[3] *= 1); 3491 a[0] = _hue(h + 1 / 3, r, g); 3492 a[1] = _hue(h, r, g); 3493 a[2] = _hue(h - 1 / 3, r, g); 3494 } else if (~v.indexOf("=")) { 3495 a = v.match(_numExp); 3496 forceAlpha && a.length < 4 && (a[3] = 1); 3497 return a; 3498 } 3499 } else { 3500 a = v.match(_strictNumExp) || _colorLookup.transparent; 3501 } 3502 3503 a = a.map(Number); 3504 } 3505 3506 if (toHSL && !wasHSL) { 3507 r = a[0] / _255; 3508 g = a[1] / _255; 3509 b = a[2] / _255; 3510 max = Math.max(r, g, b); 3511 min = Math.min(r, g, b); 3512 l = (max + min) / 2; 3513 3514 if (max === min) { 3515 h = s = 0; 3516 } else { 3517 d = max - min; 3518 s = l > 0.5 ? d / (2 - max - min) : d / (max + min); 3519 h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4; 3520 h *= 60; 3521 } 3522 3523 a[0] = ~~(h + .5); 3524 a[1] = ~~(s * 100 + .5); 3525 a[2] = ~~(l * 100 + .5); 3526 } 3527 3528 forceAlpha && a.length < 4 && (a[3] = 1); 3529 return a; 3530 }, 3531 _colorOrderData = function _colorOrderData(v) { 3532 var values = [], 3533 c = [], 3534 i = -1; 3535 v.split(_colorExp).forEach(function (v) { 3536 var a = v.match(_numWithUnitExp) || []; 3537 values.push.apply(values, a); 3538 c.push(i += a.length + 1); 3539 }); 3540 values.c = c; 3541 return values; 3542 }, 3543 _formatColors = function _formatColors(s, toHSL, orderMatchData) { 3544 var result = "", 3545 colors = (s + result).match(_colorExp), 3546 type = toHSL ? "hsla(" : "rgba(", 3547 i = 0, 3548 c, 3549 shell, 3550 d, 3551 l; 3552 3553 if (!colors) { 3554 return s; 3555 } 3556 3557 colors = colors.map(function (color) { 3558 return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : color.join(",")) + ")"; 3559 }); 3560 3561 if (orderMatchData) { 3562 d = _colorOrderData(s); 3563 c = orderMatchData.c; 3564 3565 if (c.join(result) !== d.c.join(result)) { 3566 shell = s.replace(_colorExp, "1").split(_numWithUnitExp); 3567 l = shell.length - 1; 3568 3569 for (; i < l; i++) { 3570 result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + "0,0,0,0)" : (d.length ? d : colors.length ? colors : orderMatchData).shift()); 3571 } 3572 } 3573 } 3574 3575 if (!shell) { 3576 shell = s.split(_colorExp); 3577 l = shell.length - 1; 3578 3579 for (; i < l; i++) { 3580 result += shell[i] + colors[i]; 3581 } 3582 } 3583 3584 return result + shell[l]; 3585 }, 3586 _colorExp = function () { 3587 var s = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", 3588 p; 3589 3590 for (p in _colorLookup) { 3591 s += "|" + p + "\\b"; 3592 } 3593 3594 return new RegExp(s + ")", "gi"); 3595 }(), 3596 _hslExp = /hsl[a]?\(/, 3597 _colorStringFilter = function _colorStringFilter(a) { 3598 var combined = a.join(" "), 3599 toHSL; 3600 _colorExp.lastIndex = 0; 3601 3602 if (_colorExp.test(combined)) { 3603 toHSL = _hslExp.test(combined); 3604 a[1] = _formatColors(a[1], toHSL); 3605 a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1])); 3606 return true; 3607 } 3608 }, 3609 _tickerActive, 3610 _ticker = function () { 3611 var _getTime = Date.now, 3612 _lagThreshold = 500, 3613 _adjustedLag = 33, 3614 _startTime = _getTime(), 3615 _lastUpdate = _startTime, 3616 _gap = 1000 / 240, 3617 _nextTime = _gap, 3618 _listeners = [], 3619 _id, 3620 _req, 3621 _raf, 3622 _self, 3623 _delta, 3624 _i, 3625 _tick = function _tick(v) { 3626 var elapsed = _getTime() - _lastUpdate, 3627 manual = v === true, 3628 overlap, 3629 dispatch, 3630 time, 3631 frame; 3632 3633 elapsed > _lagThreshold && (_startTime += elapsed - _adjustedLag); 3634 _lastUpdate += elapsed; 3635 time = _lastUpdate - _startTime; 3636 overlap = time - _nextTime; 3637 3638 if (overlap > 0 || manual) { 3639 frame = ++_self.frame; 3640 _delta = time - _self.time * 1000; 3641 _self.time = time = time / 1000; 3642 _nextTime += overlap + (overlap >= _gap ? 4 : _gap - overlap); 3643 dispatch = 1; 3644 } 3645 3646 manual || (_id = _req(_tick)); 3647
vendor: 4,239 bytes, lines 3648-3784
3648 if (dispatch) { 3649 for (_i = 0; _i < _listeners.length; _i++) { 3650 _listeners[_i](time, _delta, frame, v); 3651 } 3652 } 3653 }; 3654 3655 _self = { 3656 time: 0, 3657 frame: 0, 3658 tick: function tick() { 3659 _tick(true); 3660 }, 3661 deltaRatio: function deltaRatio(fps) { 3662 return _delta / (1000 / (fps || 60)); 3663 }, 3664 wake: function wake() { 3665 if (_coreReady) { 3666 if (!_coreInitted && _windowExists()) { 3667 _win = _coreInitted = window; 3668 _doc = _win.document || {}; 3669 _globals.gsap = gsap; 3670 (_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version); 3671 3672 _install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {}); 3673 3674 _raf = _win.requestAnimationFrame; 3675 } 3676 3677 _id && _self.sleep(); 3678 3679 _req = _raf || function (f) { 3680 return setTimeout(f, _nextTime - _self.time * 1000 + 1 | 0); 3681 }; 3682 3683 _tickerActive = 1; 3684 3685 _tick(2); 3686 } 3687 }, 3688 sleep: function sleep() { 3689 (_raf ? _win.cancelAnimationFrame : clearTimeout)(_id); 3690 _tickerActive = 0; 3691 _req = _emptyFunc; 3692 }, 3693 lagSmoothing: function lagSmoothing(threshold, adjustedLag) { 3694 _lagThreshold = threshold || 1 / _tinyNum; 3695 _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0); 3696 }, 3697 fps: function fps(_fps) { 3698 _gap = 1000 / (_fps || 240); 3699 _nextTime = _self.time * 1000 + _gap; 3700 }, 3701 add: function add(callback, once, prioritize) { 3702 var func = once ? function (t, d, f, v) { 3703 callback(t, d, f, v); 3704 3705 _self.remove(func); 3706 } : callback; 3707 3708 _self.remove(callback); 3709 3710 _listeners[prioritize ? "unshift" : "push"](func); 3711 3712 _wake(); 3713 3714 return func; 3715 }, 3716 remove: function remove(callback, i) { 3717 ~(i = _listeners.indexOf(callback)) && _listeners.splice(i, 1) && _i >= i && _i--; 3718 }, 3719 _listeners: _listeners 3720 }; 3721 return _self; 3722 }(), 3723 _wake = function _wake() { 3724 return !_tickerActive && _ticker.wake(); 3725 }, 3726 _easeMap = {}, 3727 _customEaseExp = /^[\d.\-M][\d.\-,\s]/, 3728 _quotesExp = /["']/g, 3729 _parseObjectInString = function _parseObjectInString(value) { 3730 var obj = {}, 3731 split = value.substr(1, value.length - 3).split(":"), 3732 key = split[0], 3733 i = 1, 3734 l = split.length, 3735 index, 3736 val, 3737 parsedVal; 3738 3739 for (; i < l; i++) { 3740 val = split[i]; 3741 index = i !== l - 1 ? val.lastIndexOf(",") : val.length; 3742 parsedVal = val.substr(0, index); 3743 obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, "").trim() : +parsedVal; 3744 key = val.substr(index + 1).trim(); 3745 } 3746 3747 return obj; 3748 }, 3749 _valueInParentheses = function _valueInParentheses(value) { 3750 var open = value.indexOf("(") + 1, 3751 close = value.indexOf(")"), 3752 nested = value.indexOf("(", open); 3753 return value.substring(open, ~nested && nested < close ? value.indexOf(")", close + 1) : close); 3754 }, 3755 _configEaseFromString = function _configEaseFromString(name) { 3756 var split = (name + "").split("("), 3757 ease = _easeMap[split[0]]; 3758 return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf("{") ? [_parseObjectInString(split[1])] : _valueInParentheses(name).split(",").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE("", name) : ease; 3759 }, 3760 _invertEase = function _invertEase(ease) { 3761 return function (p) { 3762 return 1 - ease(1 - p); 3763 }; 3764 }, 3765 _propagateYoyoEase = function _propagateYoyoEase(timeline, isYoyo) { 3766 var child = timeline._first, 3767 ease; 3768 3769 while (child) { 3770 if (child instanceof Timeline) { 3771 _propagateYoyoEase(child, isYoyo); 3772 } else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) { 3773 if (child.timeline) { 3774 _propagateYoyoEase(child.timeline, isYoyo); 3775 } else { 3776 ease = child._ease; 3777 child._ease = child._yEase; 3778 child._yEase = ease; 3779 child._yoyo = isYoyo; 3780 } 3781 } 3782 3783 child = child._next; 3784 }
vendor: 3,445 bytes, lines 3784-3895
3784 3785 }, 3786 _parseEase = function _parseEase(ease, defaultEase) { 3787 return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase; 3788 }, 3789 _insertEase = function _insertEase(names, easeIn, easeOut, easeInOut) { 3790 if (easeOut === void 0) { 3791 easeOut = function easeOut(p) { 3792 return 1 - easeIn(1 - p); 3793 }; 3794 } 3795 3796 if (easeInOut === void 0) { 3797 easeInOut = function easeInOut(p) { 3798 return p < .5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2; 3799 }; 3800 } 3801 3802 var ease = { 3803 easeIn: easeIn, 3804 easeOut: easeOut, 3805 easeInOut: easeInOut 3806 }, 3807 lowercaseName; 3808 3809 _forEachName(names, function (name) { 3810 _easeMap[name] = _globals[name] = ease; 3811 _easeMap[lowercaseName = name.toLowerCase()] = easeOut; 3812 3813 for (var p in ease) { 3814 _easeMap[lowercaseName + (p === "easeIn" ? ".in" : p === "easeOut" ? ".out" : ".inOut")] = _easeMap[name + "." + p] = ease[p]; 3815 } 3816 }); 3817 3818 return ease; 3819 }, 3820 _easeInOutFromOut = function _easeInOutFromOut(easeOut) { 3821 return function (p) { 3822 return p < .5 ? (1 - easeOut(1 - p * 2)) / 2 : .5 + easeOut((p - .5) * 2) / 2; 3823 }; 3824 }, 3825 _configElastic = function _configElastic(type, amplitude, period) { 3826 var p1 = amplitude >= 1 ? amplitude : 1, 3827 p2 = (period || (type ? .3 : .45)) / (amplitude < 1 ? amplitude : 1), 3828 p3 = p2 / _2PI * (Math.asin(1 / p1) || 0), 3829 easeOut = function easeOut(p) { 3830 return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1; 3831 }, 3832 ease = type === "out" ? easeOut : type === "in" ? function (p) { 3833 return 1 - easeOut(1 - p); 3834 } : _easeInOutFromOut(easeOut); 3835 3836 p2 = _2PI / p2; 3837 3838 ease.config = function (amplitude, period) { 3839 return _configElastic(type, amplitude, period); 3840 }; 3841 3842 return ease; 3843 }, 3844 _configBack = function _configBack(type, overshoot) { 3845 if (overshoot === void 0) { 3846 overshoot = 1.70158; 3847 } 3848 3849 var easeOut = function easeOut(p) { 3850 return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0; 3851 }, 3852 ease = type === "out" ? easeOut : type === "in" ? function (p) { 3853 return 1 - easeOut(1 - p); 3854 } : _easeInOutFromOut(easeOut); 3855 3856 ease.config = function (overshoot) { 3857 return _configBack(type, overshoot); 3858 }; 3859 3860 return ease; 3861 }; 3862 3863 _forEachName("Linear,Quad,Cubic,Quart,Quint,Strong", function (name, i) { 3864 var power = i < 5 ? i + 1 : i; 3865 3866 _insertEase(name + ",Power" + (power - 1), i ? function (p) { 3867 return Math.pow(p, power); 3868 } : function (p) { 3869 return p; 3870 }, function (p) { 3871 return 1 - Math.pow(1 - p, power); 3872 }, function (p) { 3873 return p < .5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2; 3874 }); 3875 }); 3876 3877 _easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn; 3878 3879 _insertEase("Elastic", _configElastic("in"), _configElastic("out"), _configElastic()); 3880 3881 (function (n, c) { 3882 var n1 = 1 / c, 3883 n2 = 2 * n1, 3884 n3 = 2.5 * n1, 3885 easeOut = function easeOut(p) { 3886 return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + .75 : p < n3 ? n * (p -= 2.25 / c) * p + .9375 : n * Math.pow(p - 2.625 / c, 2) + .984375; 3887 }; 3888 3889 _insertEase("Bounce", function (p) { 3890 return 1 - easeOut(1 - p); 3891 }, easeOut); 3892 })(7.5625, 2.75); 3893 3894 _insertEase("Expo", function (p) { 3895 return
vendor: 6,314 bytes, lines 3895-4085
3895p ? Math.pow(2, 10 * (p - 1)) : 0; 3896 }); 3897 3898 _insertEase("Circ", function (p) { 3899 return -(_sqrt(1 - p * p) - 1); 3900 }); 3901 3902 _insertEase("Sine", function (p) { 3903 return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1; 3904 }); 3905 3906 _insertEase("Back", _configBack("in"), _configBack("out"), _configBack()); 3907 3908 _easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = { 3909 config: function config(steps, immediateStart) { 3910 if (steps === void 0) { 3911 steps = 1; 3912 } 3913 3914 var p1 = 1 / steps, 3915 p2 = steps + (immediateStart ? 0 : 1), 3916 p3 = immediateStart ? 1 : 0, 3917 max = 1 - _tinyNum; 3918 return function (p) { 3919 return ((p2 * _clamp(0, max, p) | 0) + p3) * p1; 3920 }; 3921 } 3922 }; 3923 _defaults.ease = _easeMap["quad.out"]; 3924 3925 _forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function (name) { 3926 return _callbackNames += name + "," + name + "Params,"; 3927 }); 3928 3929 var GSCache = function GSCache(target, harness) { 3930 this.id = _gsID++; 3931 target._gsap = this; 3932 this.target = target; 3933 this.harness = harness; 3934 this.get = harness ? harness.get : _getProperty; 3935 this.set = harness ? harness.getSetter : _getSetter; 3936 }; 3937 var Animation = function () { 3938 function Animation(vars) { 3939 this.vars = vars; 3940 this._delay = +vars.delay || 0; 3941 3942 if (this._repeat = vars.repeat === Infinity ? -2 : vars.repeat || 0) { 3943 this._rDelay = vars.repeatDelay || 0; 3944 this._yoyo = !!vars.yoyo || !!vars.yoyoEase; 3945 } 3946 3947 this._ts = 1; 3948 3949 _setDuration(this, +vars.duration, 1, 1); 3950 3951 this.data = vars.data; 3952 3953 if (_context) { 3954 this._ctx = _context; 3955 3956 _context.data.push(this); 3957 } 3958 3959 _tickerActive || _ticker.wake(); 3960 } 3961 3962 var _proto = Animation.prototype; 3963 3964 _proto.delay = function delay(value) { 3965 if (value || value === 0) { 3966 this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay); 3967 this._delay = value; 3968 return this; 3969 } 3970 3971 return this._delay; 3972 }; 3973 3974 _proto.duration = function duration(value) { 3975 return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur; 3976 }; 3977 3978 _proto.totalDuration = function totalDuration(value) { 3979 if (!arguments.length) { 3980 return this._tDur; 3981 } 3982 3983 this._dirty = 0; 3984 return _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1)); 3985 }; 3986 3987 _proto.totalTime = function totalTime(_totalTime, suppressEvents) { 3988 _wake(); 3989 3990 if (!arguments.length) { 3991 return this._tTime; 3992 } 3993 3994 var parent = this._dp; 3995 3996 if (parent && parent.smoothChildTiming && this._ts) { 3997 _alignPlayhead(this, _totalTime); 3998 3999 !parent._dp || parent.parent || _postAddChecks(parent, this); 4000 4001 while (parent && parent.parent) { 4002 if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) { 4003 parent.totalTime(parent._tTime, true); 4004 } 4005 4006 parent = parent.parent; 4007 } 4008 4009 if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) { 4010 _addToTimeline(this._dp, this, this._start - this._delay); 4011 } 4012 } 4013 4014 if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted && (this.add || this._ptLookup)) { 4015 this._ts || (this._pTime = _totalTime); 4016 4017 _lazySafeRender(this, _totalTime, suppressEvents); 4018 } 4019 4020 return this; 4021 }; 4022 4023 _proto.time = function time(value, suppressEvents) { 4024 return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time; 4025 }; 4026 4027 _proto.totalProgress = function totalProgress(value, suppressEvents) { 4028 return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.ratio; 4029 }; 4030 4031 _proto.progress = function progress(value, suppressEvents) { 4032 return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.ratio; 4033 }; 4034 4035 _proto.iteration = function iteration(value, suppressEvents) { 4036 var cycleDuration = this.duration() + this._rDelay; 4037 4038 return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1; 4039 }; 4040 4041 _proto.timeScale = function timeScale(value) { 4042 if (!arguments.length) { 4043 return this._rts === -_tinyNum ? 0 : this._rts; 4044 } 4045 4046 if (this._rts === value) { 4047 return this; 4048 } 4049 4050 var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime; 4051 this._rts = +value || 0; 4052 this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; 4053 this.totalTime(_clamp(-this._delay, this._tDur, tTime), true); 4054 4055 _setEnd(this); 4056 4057 return _recacheAncestors(this); 4058 }; 4059 4060 _proto.paused = function paused(value) { 4061 if (!arguments.length) { 4062 return this._ps; 4063 } 4064 4065 if (this._ps !== value) { 4066 this._ps = value; 4067 4068 if (value) { 4069 this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()); 4070 this._ts = this._act = 0; 4071 } else { 4072 _wake(); 4073 4074 this._ts = this._rts; 4075 this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum && (this._tTime -= _tinyNum)); 4076 } 4077 } 4078 4079 return this; 4080 }; 4081 4082 _proto.startTime = function startTime(value) { 4083 if (arguments.length) { 4084 this._start = value; 4085 var parent = this.parent || this._dp;
vendor: 3,424 bytes, lines 4086-4198
4086 parent && (parent._sort || !this.parent) && _addToTimeline(parent, this, value - this._delay); 4087 return this; 4088 } 4089 4090 return this._start; 4091 }; 4092 4093 _proto.endTime = function endTime(includeRepeats) { 4094 return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1); 4095 }; 4096 4097 _proto.rawTime = function rawTime(wrapRepeats) { 4098 var parent = this.parent || this._dp; 4099 return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this); 4100 }; 4101 4102 _proto.revert = function revert(config) { 4103 if (config === void 0) { 4104 config = _revertConfig; 4105 } 4106 4107 var prevIsReverting = _reverting; 4108 _reverting = config; 4109 4110 if (this._initted || this._startAt) { 4111 this.timeline && this.timeline.revert(config); 4112 this.totalTime(-0.01, config.suppressEvents); 4113 } 4114 4115 this.data !== "nested" && config.kill !== false && this.kill(); 4116 _reverting = prevIsReverting; 4117 return this; 4118 }; 4119 4120 _proto.globalTime = function globalTime(rawTime) { 4121 var animation = this, 4122 time = arguments.length ? rawTime : animation.rawTime(); 4123 4124 while (animation) { 4125 time = animation._start + time / (animation._ts || 1); 4126 animation = animation._dp; 4127 } 4128 4129 return !this.parent && this.vars.immediateRender ? -1 : time; 4130 }; 4131 4132 _proto.repeat = function repeat(value) { 4133 if (arguments.length) { 4134 this._repeat = value === Infinity ? -2 : value; 4135 return _onUpdateTotalDuration(this); 4136 } 4137 4138 return this._repeat === -2 ? Infinity : this._repeat; 4139 }; 4140 4141 _proto.repeatDelay = function repeatDelay(value) { 4142 if (arguments.length) { 4143 var time = this._time; 4144 this._rDelay = value; 4145 4146 _onUpdateTotalDuration(this); 4147 4148 return time ? this.time(time) : this; 4149 } 4150 4151 return this._rDelay; 4152 }; 4153 4154 _proto.yoyo = function yoyo(value) { 4155 if (arguments.length) { 4156 this._yoyo = value; 4157 return this; 4158 } 4159 4160 return this._yoyo; 4161 }; 4162 4163 _proto.seek = function seek(position, suppressEvents) { 4164 return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents)); 4165 }; 4166 4167 _proto.restart = function restart(includeDelay, suppressEvents) { 4168 return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents)); 4169 }; 4170 4171 _proto.play = function play(from, suppressEvents) { 4172 from != null && this.seek(from, suppressEvents); 4173 return this.reversed(false).paused(false); 4174 }; 4175 4176 _proto.reverse = function reverse(from, suppressEvents) { 4177 from != null && this.seek(from || this.totalDuration(), suppressEvents); 4178 return this.reversed(true).paused(false); 4179 }; 4180 4181 _proto.pause = function pause(atTime, suppressEvents) { 4182 atTime != null && this.seek(atTime, suppressEvents); 4183 return this.paused(true); 4184 }; 4185 4186 _proto.resume = function resume() { 4187 return this.paused(false); 4188 }; 4189 4190 _proto.reversed = function reversed(value) { 4191 if (arguments.length) { 4192 !!value !== this.reversed() && this.timeScale(-this._rts || (value ? -_tinyNum : 0)); 4193 return this; 4194 } 4195 4196 return this._rts < 0; 4197 }; 4198
vendor: 8,586 bytes, lines 4199-4470
4199 _proto.invalidate = function invalidate() { 4200 this._initted = this._act = 0; 4201 this._zTime = -_tinyNum; 4202 return this; 4203 }; 4204 4205 _proto.isActive = function isActive() { 4206 var parent = this.parent || this._dp, 4207 start = this._start, 4208 rawTime; 4209 return !!(!parent || this._ts && this._initted && parent.isActive() && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum); 4210 }; 4211 4212 _proto.eventCallback = function eventCallback(type, callback, params) { 4213 var vars = this.vars; 4214 4215 if (arguments.length > 1) { 4216 if (!callback) { 4217 delete vars[type]; 4218 } else { 4219 vars[type] = callback; 4220 params && (vars[type + "Params"] = params); 4221 type === "onUpdate" && (this._onUpdate = callback); 4222 } 4223 4224 return this; 4225 } 4226 4227 return vars[type]; 4228 }; 4229 4230 _proto.then = function then(onFulfilled) { 4231 var self = this; 4232 return new Promise(function (resolve) { 4233 var f = _isFunction(onFulfilled) ? onFulfilled : _passThrough, 4234 _resolve = function _resolve() { 4235 var _then = self.then; 4236 self.then = null; 4237 _isFunction(f) && (f = f(self)) && (f.then || f === self) && (self.then = _then); 4238 resolve(f); 4239 self.then = _then; 4240 }; 4241 4242 if (self._initted && self.totalProgress() === 1 && self._ts >= 0 || !self._tTime && self._ts < 0) { 4243 _resolve(); 4244 } else { 4245 self._prom = _resolve; 4246 } 4247 }); 4248 }; 4249 4250 _proto.kill = function kill() { 4251 _interrupt(this); 4252 }; 4253 4254 return Animation; 4255 }(); 4256 4257 _setDefaults(Animation.prototype, { 4258 _time: 0, 4259 _start: 0, 4260 _end: 0, 4261 _tTime: 0, 4262 _tDur: 0, 4263 _dirty: 0, 4264 _repeat: 0, 4265 _yoyo: false, 4266 parent: null, 4267 _initted: false, 4268 _rDelay: 0, 4269 _ts: 1, 4270 _dp: 0, 4271 ratio: 0, 4272 _zTime: -_tinyNum, 4273 _prom: 0, 4274 _ps: false, 4275 _rts: 1 4276 }); 4277 4278 var Timeline = function (_Animation) { 4279 _inheritsLoose(Timeline, _Animation); 4280 4281 function Timeline(vars, position) { 4282 var _this; 4283 4284 if (vars === void 0) { 4285 vars = {}; 4286 } 4287 4288 _this = _Animation.call(this, vars) || this; 4289 _this.labels = {}; 4290 _this.smoothChildTiming = !!vars.smoothChildTiming; 4291 _this.autoRemoveChildren = !!vars.autoRemoveChildren; 4292 _this._sort = _isNotFalse(vars.sortChildren); 4293 _globalTimeline && _addToTimeline(vars.parent || _globalTimeline, _assertThisInitialized(_this), position); 4294 vars.reversed && _this.reverse(); 4295 vars.paused && _this.paused(true); 4296 vars.scrollTrigger && _scrollTrigger(_assertThisInitialized(_this), vars.scrollTrigger); 4297 return _this; 4298 } 4299 4300 var _proto2 = Timeline.prototype; 4301 4302 _proto2.to = function to(targets, vars, position) { 4303 _createTweenType(0, arguments, this); 4304 4305 return this; 4306 }; 4307 4308 _proto2.from = function from(targets, vars, position) { 4309 _createTweenType(1, arguments, this); 4310 4311 return this; 4312 }; 4313 4314 _proto2.fromTo = function fromTo(targets, fromVars, toVars, position) { 4315 _createTweenType(2, arguments, this); 4316 4317 return this; 4318 }; 4319 4320 _proto2.set = function set(targets, vars, position) { 4321 vars.duration = 0; 4322 vars.parent = this; 4323 _inheritDefaults(vars).repeatDelay || (vars.repeat = 0); 4324 vars.immediateRender = !!vars.immediateRender; 4325 new Tween(targets, vars, _parsePosition(this, position), 1); 4326 return this; 4327 }; 4328 4329 _proto2.call = function call(callback, params, position) { 4330 return _addToTimeline(this, Tween.delayedCall(0, callback, params), position); 4331 }; 4332 4333 _proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) { 4334 vars.duration = duration; 4335 vars.stagger = vars.stagger || stagger; 4336 vars.onComplete = onCompleteAll; 4337 vars.onCompleteParams = onCompleteAllParams; 4338 vars.parent = this; 4339 new Tween(targets, vars, _parsePosition(this, position)); 4340 return this; 4341 }; 4342 4343 _proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) { 4344 vars.runBackwards = 1; 4345 _inheritDefaults(vars).immediateRender = _isNotFalse(vars.immediateRender); 4346 return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams); 4347 }; 4348 4349 _proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) { 4350 toVars.startAt = fromVars; 4351 _inheritDefaults(toVars).immediateRender = _isNotFalse(toVars.immediateRender); 4352 return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams); 4353 }; 4354 4355 _proto2.render = function render(totalTime, suppressEvents, force) { 4356 var prevTime = this._time, 4357 tDur = this._dirty ? this.totalDuration() : this._tDur, 4358 dur = this._dur, 4359 tTime = totalTime <= 0 ? 0 : _roundPrecise(totalTime), 4360 crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur), 4361 time, 4362 child, 4363 next, 4364 iteration, 4365 cycleDuration, 4366 prevPaused, 4367 pauseTween, 4368 timeScale, 4369 prevStart, 4370 prevIteration, 4371 yoyo, 4372 isYoyo; 4373 this !== _globalTimeline && tTime > tDur && totalTime >= 0 && (tTime = tDur); 4374 4375 if (tTime !== this._tTime || force || crossingStart) { 4376 if (prevTime !== this._time && dur) { 4377 tTime += this._time - prevTime; 4378 totalTime += this._time - prevTime; 4379 } 4380 4381 time = tTime; 4382 prevStart = this._start; 4383 timeScale = this._ts; 4384 prevPaused = !timeScale; 4385 4386 if (crossingStart) { 4387 dur || (prevTime = this._zTime); 4388 (totalTime || !suppressEvents) && (this._zTime = totalTime); 4389 } 4390 4391 if (this._repeat) { 4392 yoyo = this._yoyo; 4393 cycleDuration = dur + this._rDelay; 4394 4395 if (this._repeat < -1 && totalTime < 0) { 4396 return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force); 4397 } 4398 4399 time = _roundPrecise(tTime % cycleDuration); 4400 4401 if (tTime === tDur) { 4402 iteration = this._repeat; 4403 time = dur; 4404 } else { 4405 iteration = ~~(tTime / cycleDuration); 4406 4407 if (iteration && iteration === tTime / cycleDuration) { 4408 time = dur; 4409 iteration--; 4410 } 4411 4412 time > dur && (time = dur); 4413 } 4414 4415 prevIteration = _animationCycle(this._tTime, cycleDuration); 4416 !prevTime && this._tTime && prevIteration !== iteration && (prevIteration = iteration); 4417 4418 if (yoyo && iteration & 1) { 4419 time = dur - time; 4420 isYoyo = 1; 4421 } 4422 4423 if (iteration !== prevIteration && !this._lock) { 4424 var rewinding = yoyo && prevIteration & 1, 4425 doesWrap = rewinding === (yoyo && iteration & 1); 4426 iteration < prevIteration && (rewinding = !rewinding); 4427 prevTime = rewinding ? 0 : dur; 4428 this._lock = 1; 4429 this.render(prevTime || (isYoyo ? 0 : _roundPrecise(iteration * cycleDuration)), suppressEvents, !dur)._lock = 0; 4430 this._tTime = tTime; 4431 !suppressEvents && this.parent && _callback(this, "onRepeat"); 4432 this.vars.repeatRefresh && !isYoyo && (this.invalidate()._lock = 1); 4433 4434 if (prevTime && prevTime !== this._time || prevPaused !== !this._ts || this.vars.onRepeat && !this.parent && !this._act) { 4435 return this; 4436 } 4437 4438 dur = this._dur; 4439 tDur = this._tDur; 4440 4441 if (doesWrap) { 4442 this._lock = 2; 4443 prevTime = rewinding ? dur : -0.0001; 4444 this.render(prevTime, true); 4445 this.vars.repeatRefresh && !isYoyo && this.invalidate(); 4446 } 4447 4448 this._lock = 0; 4449 4450 if (!this._ts && !prevPaused) { 4451 return this; 4452 } 4453 4454 _propagateYoyoEase(this, isYoyo); 4455 } 4456 } 4457 4458 if (this._hasPause && !this._forcing && this._lock < 2) { 4459 pauseTween = _findNextPauseTween(this, _roundPrecise(prevTime), _roundPrecise(time)); 4460 4461 if (pauseTween) { 4462 tTime -= time - (time = pauseTween._start); 4463 } 4464 } 4465 4466 this._tTime = tTime; 4467 this._time = time; 4468 this._act = !timeScale; 4469 4470 if (!this._initted) {
vendor: 15,188 bytes, lines 4471-5003
4471 this._onUpdate = this.vars.onUpdate; 4472 this._initted = 1; 4473 this._zTime = totalTime; 4474 prevTime = 0; 4475 } 4476 4477 if (!prevTime && time && !suppressEvents) { 4478 _callback(this, "onStart"); 4479 4480 if (this._tTime !== tTime) { 4481 return this; 4482 } 4483 } 4484 4485 if (time >= prevTime && totalTime >= 0) { 4486 child = this._first; 4487 4488 while (child) { 4489 next = child._next; 4490 4491 if ((child._act || time >= child._start) && child._ts && pauseTween !== child) { 4492 if (child.parent !== this) { 4493 return this.render(totalTime, suppressEvents, force); 4494 } 4495 4496 child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force); 4497 4498 if (time !== this._time || !this._ts && !prevPaused) { 4499 pauseTween = 0; 4500 next && (tTime += this._zTime = -_tinyNum); 4501 break; 4502 } 4503 } 4504 4505 child = next; 4506 } 4507 } else { 4508 child = this._last; 4509 var adjustedTime = totalTime < 0 ? totalTime : time; 4510 4511 while (child) { 4512 next = child._prev; 4513 4514 if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) { 4515 if (child.parent !== this) { 4516 return this.render(totalTime, suppressEvents, force); 4517 } 4518 4519 child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force || _reverting && (child._initted || child._startAt)); 4520 4521 if (time !== this._time || !this._ts && !prevPaused) { 4522 pauseTween = 0; 4523 next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum); 4524 break; 4525 } 4526 } 4527 4528 child = next; 4529 } 4530 } 4531 4532 if (pauseTween && !suppressEvents) { 4533 this.pause(); 4534 pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1; 4535 4536 if (this._ts) { 4537 this._start = prevStart; 4538 4539 _setEnd(this); 4540 4541 return this.render(totalTime, suppressEvents, force); 4542 } 4543 } 4544 4545 this._onUpdate && !suppressEvents && _callback(this, "onUpdate", true); 4546 if (tTime === tDur && this._tTime >= this.totalDuration() || !tTime && prevTime) if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) if (!this._lock) { 4547 (totalTime || !dur) && (tTime === tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); 4548 4549 if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime || !tDur)) { 4550 _callback(this, tTime === tDur && totalTime >= 0 ? "onComplete" : "onReverseComplete", true); 4551 4552 this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom(); 4553 } 4554 } 4555 } 4556 4557 return this; 4558 }; 4559 4560 _proto2.add = function add(child, position) { 4561 var _this2 = this; 4562 4563 _isNumber(position) || (position = _parsePosition(this, position, child)); 4564 4565 if (!(child instanceof Animation)) { 4566 if (_isArray(child)) { 4567 child.forEach(function (obj) { 4568 return _this2.add(obj, position); 4569 }); 4570 return this; 4571 } 4572 4573 if (_isString(child)) { 4574 return this.addLabel(child, position); 4575 } 4576 4577 if (_isFunction(child)) { 4578 child = Tween.delayedCall(0, child); 4579 } else { 4580 return this; 4581 } 4582 } 4583 4584 return this !== child ? _addToTimeline(this, child, position) : this; 4585 }; 4586 4587 _proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) { 4588 if (nested === void 0) { 4589 nested = true; 4590 } 4591 4592 if (tweens === void 0) { 4593 tweens = true; 4594 } 4595 4596 if (timelines === void 0) { 4597 timelines = true; 4598 } 4599 4600 if (ignoreBeforeTime === void 0) { 4601 ignoreBeforeTime = -_bigNum; 4602 } 4603 4604 var a = [], 4605 child = this._first; 4606 4607 while (child) { 4608 if (child._start >= ignoreBeforeTime) { 4609 if (child instanceof Tween) { 4610 tweens && a.push(child); 4611 } else { 4612 timelines && a.push(child); 4613 nested && a.push.apply(a, child.getChildren(true, tweens, timelines)); 4614 } 4615 } 4616 4617 child = child._next; 4618 } 4619 4620 return a; 4621 }; 4622 4623 _proto2.getById = function getById(id) { 4624 var animations = this.getChildren(1, 1, 1), 4625 i = animations.length; 4626 4627 while (i--) { 4628 if (animations[i].vars.id === id) { 4629 return animations[i]; 4630 } 4631 } 4632 }; 4633 4634 _proto2.remove = function remove(child) { 4635 if (_isString(child)) { 4636 return this.removeLabel(child); 4637 } 4638 4639 if (_isFunction(child)) { 4640 return this.killTweensOf(child); 4641 } 4642 4643 _removeLinkedListItem(this, child); 4644 4645 if (child === this._recent) { 4646 this._recent = this._last; 4647 } 4648 4649 return _uncache(this); 4650 }; 4651 4652 _proto2.totalTime = function totalTime(_totalTime2, suppressEvents) { 4653 if (!arguments.length) { 4654 return this._tTime; 4655 } 4656 4657 this._forcing = 1; 4658 4659 if (!this._dp && this._ts) { 4660 this._start = _roundPrecise(_ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts)); 4661 } 4662 4663 _Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents); 4664 4665 this._forcing = 0; 4666 return this; 4667 }; 4668 4669 _proto2.addLabel = function addLabel(label, position) { 4670 this.labels[label] = _parsePosition(this, position); 4671 return this; 4672 }; 4673 4674 _proto2.removeLabel = function removeLabel(label) { 4675 delete this.labels[label]; 4676 return this; 4677 }; 4678 4679 _proto2.addPause = function addPause(position, callback, params) { 4680 var t = Tween.delayedCall(0, callback || _emptyFunc, params); 4681 t.data = "isPause"; 4682 this._hasPause = 1; 4683 return _addToTimeline(this, t, _parsePosition(this, position)); 4684 }; 4685 4686 _proto2.removePause = function removePause(position) { 4687 var child = this._first; 4688 position = _parsePosition(this, position); 4689 4690 while (child) { 4691 if (child._start === position && child.data === "isPause") { 4692 _removeFromParent(child); 4693 } 4694 4695 child = child._next; 4696 } 4697 }; 4698 4699 _proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) { 4700 var tweens = this.getTweensOf(targets, onlyActive), 4701 i = tweens.length; 4702 4703 while (i--) { 4704 _overwritingTween !== tweens[i] && tweens[i].kill(targets, props); 4705 } 4706 4707 return this; 4708 }; 4709 4710 _proto2.getTweensOf = function getTweensOf(targets, onlyActive) { 4711 var a = [], 4712 parsedTargets = toArray(targets), 4713 child = this._first, 4714 isGlobalTime = _isNumber(onlyActive), 4715 children; 4716 4717 while (child) { 4718 if (child instanceof Tween) { 4719 if (_arrayContainsAny(child._targets, parsedTargets) && (isGlobalTime ? (!_overwritingTween || child._initted && child._ts) && child.globalTime(0) <= onlyActive && child.globalTime(child.totalDuration()) > onlyActive : !onlyActive || child.isActive())) { 4720 a.push(child); 4721 } 4722 } else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) { 4723 a.push.apply(a, children); 4724 } 4725 4726 child = child._next; 4727 } 4728 4729 return a; 4730 }; 4731 4732 _proto2.tweenTo = function tweenTo(position, vars) { 4733 vars = vars || {}; 4734 4735 var tl = this, 4736 endTime = _parsePosition(tl, position), 4737 _vars = vars, 4738 startAt = _vars.startAt, 4739 _onStart = _vars.onStart, 4740 onStartParams = _vars.onStartParams, 4741 immediateRender = _vars.immediateRender, 4742 initted, 4743 tween = Tween.to(tl, _setDefaults({ 4744 ease: vars.ease || "none", 4745 lazy: false, 4746 immediateRender: false, 4747 time: endTime, 4748 overwrite: "auto", 4749 duration: vars.duration || Math.abs((endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale()) || _tinyNum, 4750 onStart: function onStart() { 4751 tl.pause(); 4752 4753 if (!initted) { 4754 var duration = vars.duration || Math.abs((endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale()); 4755 tween._dur !== duration && _setDuration(tween, duration, 0, 1).render(tween._time, true, true); 4756 initted = 1; 4757 } 4758 4759 _onStart && _onStart.apply(tween, onStartParams || []); 4760 } 4761 }, vars)); 4762 4763 return immediateRender ? tween.render(0) : tween; 4764 }; 4765 4766 _proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) { 4767 return this.tweenTo(toPosition, _setDefaults({ 4768 startAt: { 4769 time: _parsePosition(this, fromPosition) 4770 } 4771 }, vars)); 4772 }; 4773 4774 _proto2.recent = function recent() { 4775 return this._recent; 4776 }; 4777 4778 _proto2.nextLabel = function nextLabel(afterTime) { 4779 if (afterTime === void 0) { 4780 afterTime = this._time; 4781 } 4782 4783 return _getLabelInDirection(this, _parsePosition(this, afterTime)); 4784 }; 4785 4786 _proto2.previousLabel = function previousLabel(beforeTime) { 4787 if (beforeTime === void 0) { 4788 beforeTime = this._time; 4789 } 4790 4791 return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1); 4792 }; 4793 4794 _proto2.currentLabel = function currentLabel(value) { 4795 return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum); 4796 }; 4797 4798 _proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) { 4799 if (ignoreBeforeTime === void 0) { 4800 ignoreBeforeTime = 0; 4801 } 4802 4803 var child = this._first, 4804 labels = this.labels, 4805 p; 4806 4807 while (child) { 4808 if (child._start >= ignoreBeforeTime) { 4809 child._start += amount; 4810 child._end += amount; 4811 } 4812 4813 child = child._next; 4814 } 4815 4816 if (adjustLabels) { 4817 for (p in labels) { 4818 if (labels[p] >= ignoreBeforeTime) { 4819 labels[p] += amount; 4820 } 4821 } 4822 } 4823 4824 return _uncache(this); 4825 }; 4826 4827 _proto2.invalidate = function invalidate(soft) { 4828 var child = this._first; 4829 this._lock = 0; 4830 4831 while (child) { 4832 child.invalidate(soft); 4833 child = child._next; 4834 } 4835 4836 return _Animation.prototype.invalidate.call(this, soft); 4837 }; 4838 4839 _proto2.clear = function clear(includeLabels) { 4840 if (includeLabels === void 0) { 4841 includeLabels = true; 4842 } 4843 4844 var child = this._first, 4845 next; 4846 4847 while (child) { 4848 next = child._next; 4849 this.remove(child); 4850 child = next; 4851 } 4852 4853 this._dp && (this._time = this._tTime = this._pTime = 0); 4854 includeLabels && (this.labels = {}); 4855 return _uncache(this); 4856 }; 4857 4858 _proto2.totalDuration = function totalDuration(value) { 4859 var max = 0, 4860 self = this, 4861 child = self._last, 4862 prevStart = _bigNum, 4863 prev, 4864 start, 4865 parent; 4866 4867 if (arguments.length) { 4868 return self.timeScale((self._repeat < 0 ? self.duration() : self.totalDuration()) / (self.reversed() ? -value : value)); 4869 } 4870 4871 if (self._dirty) { 4872 parent = self.parent; 4873 4874 while (child) { 4875 prev = child._prev; 4876 child._dirty && child.totalDuration(); 4877 start = child._start; 4878 4879 if (start > prevStart && self._sort && child._ts && !self._lock) { 4880 self._lock = 1; 4881 _addToTimeline(self, child, start - child._delay, 1)._lock = 0; 4882 } else { 4883 prevStart = start; 4884 } 4885 4886 if (start < 0 && child._ts) { 4887 max -= start; 4888 4889 if (!parent && !self._dp || parent && parent.smoothChildTiming) { 4890 self._start += start / self._ts; 4891 self._time -= start; 4892 self._tTime -= start; 4893 } 4894 4895 self.shiftChildren(-start, false, -1e999); 4896 prevStart = 0; 4897 } 4898 4899 child._end > max && child._ts && (max = child._end); 4900 child = prev; 4901 } 4902 4903 _setDuration(self, self === _globalTimeline && self._time > max ? self._time : max, 1, 1); 4904 4905 self._dirty = 0; 4906 } 4907 4908 return self._tDur; 4909 }; 4910 4911 Timeline.updateRoot = function updateRoot(time) { 4912 if (_globalTimeline._ts) { 4913 _lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline)); 4914 4915 _lastRenderedFrame = _ticker.frame; 4916 } 4917 4918 if (_ticker.frame >= _nextGCFrame) { 4919 _nextGCFrame += _config.autoSleep || 120; 4920 var child = _globalTimeline._first; 4921 if (!child || !child._ts) if (_config.autoSleep && _ticker._listeners.length < 2) { 4922 while (child && !child._ts) { 4923 child = child._next; 4924 } 4925 4926 child || _ticker.sleep(); 4927 } 4928 } 4929 }; 4930 4931 return Timeline; 4932 }(Animation); 4933 4934 _setDefaults(Timeline.prototype, { 4935 _lock: 0, 4936 _hasPause: 0, 4937 _forcing: 0 4938 }); 4939 4940 var _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) { 4941 var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter), 4942 index = 0, 4943 matchIndex = 0, 4944 result, 4945 startNums, 4946 color, 4947 endNum, 4948 chunk, 4949 startNum, 4950 hasRandom, 4951 a; 4952 pt.b = start; 4953 pt.e = end; 4954 start += ""; 4955 end += ""; 4956 4957 if (hasRandom = ~end.indexOf("random(")) { 4958 end = _replaceRandom(end); 4959 } 4960 4961 if (stringFilter) { 4962 a = [start, end]; 4963 stringFilter(a, target, prop); 4964 start = a[0]; 4965 end = a[1]; 4966 } 4967 4968 startNums = start.match(_complexStringNumExp) || []; 4969 4970 while (result = _complexStringNumExp.exec(end)) { 4971 endNum = result[0]; 4972 chunk = end.substring(index, result.index); 4973 4974 if (color) { 4975 color = (color + 1) % 5; 4976 } else if (chunk.substr(-5) === "rgba(") { 4977 color = 1; 4978 } 4979 4980 if (endNum !== startNums[matchIndex++]) { 4981 startNum = parseFloat(startNums[matchIndex - 1]) || 0; 4982 pt._pt = { 4983 _next: pt._pt, 4984 p: chunk || matchIndex === 1 ? chunk : ",", 4985 s: startNum, 4986 c: endNum.charAt(1) === "=" ? _parseRelative(startNum, endNum) - startNum : parseFloat(endNum) - startNum, 4987 m: color && color < 4 ? Math.round : 0 4988 }; 4989 index = _complexStringNumExp.lastIndex; 4990 } 4991 } 4992 4993 pt.c = index < end.length ? end.substring(index, end.length) : ""; 4994 pt.fp = funcParam; 4995 4996 if (_relExp.test(end) || hasRandom) { 4997 pt.e = 0; 4998 } 4999 5000 this._pt = pt; 5001 return pt; 5002 }, 5003 _addPropTween = function _addPropTween(target, prop, start, end, index, targets, modifier, stringFilter, funcParam, optional) {
vendor: 9,749 bytes, lines 5004-5290
5004 _isFunction(end) && (end = end(index || 0, target, targets)); 5005 var currentValue = target[prop], 5006 parsedStart = start !== "get" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf("set") || !_isFunction(target["get" + prop.substr(3)]) ? prop : "get" + prop.substr(3)](funcParam) : target[prop](), 5007 setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc, 5008 pt; 5009 5010 if (_isString(end)) { 5011 if (~end.indexOf("random(")) { 5012 end = _replaceRandom(end); 5013 } 5014 5015 if (end.charAt(1) === "=") { 5016 pt = _parseRelative(parsedStart, end) + (getUnit(parsedStart) || 0); 5017 5018 if (pt || pt === 0) { 5019 end = pt; 5020 } 5021 } 5022 } 5023 5024 if (!optional || parsedStart !== end || _forceAllPropTweens) { 5025 if (!isNaN(parsedStart * end) && end !== "") { 5026 pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === "boolean" ? _renderBoolean : _renderPlain, 0, setter); 5027 funcParam && (pt.fp = funcParam); 5028 modifier && pt.modifier(modifier, this, target); 5029 return this._pt = pt; 5030 } 5031 5032 !currentValue && !(prop in target) && _missingPlugin(prop, end); 5033 return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam); 5034 } 5035 }, 5036 _processVars = function _processVars(vars, index, target, targets, tween) { 5037 _isFunction(vars) && (vars = _parseFuncOrString(vars, tween, index, target, targets)); 5038 5039 if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars) || _isTypedArray(vars)) { 5040 return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars; 5041 } 5042 5043 var copy = {}, 5044 p; 5045 5046 for (p in vars) { 5047 copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets); 5048 } 5049 5050 return copy; 5051 }, 5052 _checkPlugin = function _checkPlugin(property, vars, tween, index, target, targets) { 5053 var plugin, pt, ptLookup, i; 5054 5055 if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) { 5056 tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority); 5057 5058 if (tween !== _quickTween) { 5059 ptLookup = tween._ptLookup[tween._targets.indexOf(target)]; 5060 i = plugin._props.length; 5061 5062 while (i--) { 5063 ptLookup[plugin._props[i]] = pt; 5064 } 5065 } 5066 } 5067 5068 return plugin; 5069 }, 5070 _overwritingTween, 5071 _forceAllPropTweens, 5072 _initTween = function _initTween(tween, time, tTime) { 5073 var vars = tween.vars, 5074 ease = vars.ease, 5075 startAt = vars.startAt, 5076 immediateRender = vars.immediateRender, 5077 lazy = vars.lazy, 5078 onUpdate = vars.onUpdate, 5079 onUpdateParams = vars.onUpdateParams, 5080 callbackScope = vars.callbackScope, 5081 runBackwards = vars.runBackwards, 5082 yoyoEase = vars.yoyoEase, 5083 keyframes = vars.keyframes, 5084 autoRevert = vars.autoRevert, 5085 dur = tween._dur, 5086 prevStartAt = tween._startAt, 5087 targets = tween._targets, 5088 parent = tween.parent, 5089 fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, 5090 autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, 5091 tl = tween.timeline, 5092 cleanVars, 5093 i, 5094 p, 5095 pt, 5096 target, 5097 hasPriority, 5098 gsData, 5099 harness, 5100 plugin, 5101 ptLookup, 5102 index, 5103 harnessVars, 5104 overwritten; 5105 tl && (!keyframes || !ease) && (ease = "none"); 5106 tween._ease = _parseEase(ease, _defaults.ease); 5107 tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0; 5108 5109 if (yoyoEase && tween._yoyo && !tween._repeat) { 5110 yoyoEase = tween._yEase; 5111 tween._yEase = tween._ease; 5112 tween._ease = yoyoEase; 5113 } 5114 5115 tween._from = !tl && !!vars.runBackwards; 5116 5117 if (!tl || keyframes && !vars.stagger) { 5118 harness = targets[0] ? _getCache(targets[0]).harness : 0; 5119 harnessVars = harness && vars[harness.prop]; 5120 cleanVars = _copyExcluding(vars, _reservedProps); 5121 5122 if (prevStartAt) { 5123 prevStartAt._zTime < 0 && prevStartAt.progress(1); 5124 time < 0 && runBackwards && immediateRender && !autoRevert ? prevStartAt.render(-1, true) : prevStartAt.revert(runBackwards && dur ? _revertConfigNoKill : _startAtRevertConfig); 5125 prevStartAt._lazy = 0; 5126 } 5127 5128 if (startAt) { 5129 _removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({ 5130 data: "isStart", 5131 overwrite: false, 5132 parent: parent, 5133 immediateRender: true, 5134 lazy: _isNotFalse(lazy), 5135 startAt: null, 5136 delay: 0, 5137 onUpdate: onUpdate, 5138 onUpdateParams: onUpdateParams, 5139 callbackScope: callbackScope, 5140 stagger: 0 5141 }, startAt))); 5142 5143 tween._startAt._dp = 0; 5144 time < 0 && (_reverting || !immediateRender && !autoRevert) && tween._startAt.revert(_revertConfigNoKill); 5145 5146 if (immediateRender) { 5147 if (dur && time <= 0 && tTime <= 0) { 5148 time && (tween._zTime = time); 5149 return; 5150 } 5151 } 5152 } else if (runBackwards && dur) { 5153 if (!prevStartAt) { 5154 time && (immediateRender = false); 5155 p = _setDefaults({ 5156 overwrite: false, 5157 data: "isFromStart", 5158 lazy: immediateRender && _isNotFalse(lazy), 5159 immediateRender: immediateRender, 5160 stagger: 0, 5161 parent: parent 5162 }, cleanVars); 5163 harnessVars && (p[harness.prop] = harnessVars); 5164 5165 _removeFromParent(tween._startAt = Tween.set(targets, p)); 5166 5167 tween._startAt._dp = 0; 5168 time < 0 && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween._startAt.render(-1, true)); 5169 tween._zTime = time; 5170 5171 if (!immediateRender) { 5172 _initTween(tween._startAt, _tinyNum, _tinyNum); 5173 } else if (!time) { 5174 return; 5175 } 5176 } 5177 } 5178 5179 tween._pt = tween._ptCache = 0; 5180 lazy = dur && _isNotFalse(lazy) || lazy && !dur; 5181 5182 for (i = 0; i < targets.length; i++) { 5183 target = targets[i]; 5184 gsData = target._gsap || _harness(targets)[i]._gsap; 5185 tween._ptLookup[i] = ptLookup = {}; 5186 _lazyLookup[gsData.id] && _lazyTweens.length && _lazyRender(); 5187 index = fullTargets === targets ? i : fullTargets.indexOf(target); 5188 5189 if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) { 5190 tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority); 5191 5192 plugin._props.forEach(function (name) { 5193 ptLookup[name] = pt; 5194 }); 5195 5196 plugin.priority && (hasPriority = 1); 5197 } 5198 5199 if (!harness || harnessVars) { 5200 for (p in cleanVars) { 5201 if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) { 5202 plugin.priority && (hasPriority = 1); 5203 } else { 5204 ptLookup[p] = pt = _addPropTween.call(tween, target, p, "get", cleanVars[p], index, fullTargets, 0, vars.stringFilter); 5205 } 5206 } 5207 } 5208 5209 tween._op && tween._op[i] && tween.kill(target, tween._op[i]); 5210 5211 if (autoOverwrite && tween._pt) { 5212 _overwritingTween = tween; 5213 5214 _globalTimeline.killTweensOf(target, ptLookup, tween.globalTime(time)); 5215 5216 overwritten = !tween.parent; 5217 _overwritingTween = 0; 5218 } 5219 5220 tween._pt && lazy && (_lazyLookup[gsData.id] = 1); 5221 } 5222 5223 hasPriority && _sortPropTweensByPriority(tween); 5224 tween._onInit && tween._onInit(tween); 5225 } 5226 5227 tween._onUpdate = onUpdate; 5228 tween._initted = (!tween._op || tween._pt) && !overwritten; 5229 keyframes && time <= 0 && tl.render(_bigNum, true, true); 5230 }, 5231 _updatePropTweens = function _updatePropTweens(tween, property, value, start, startIsRelative, ratio, time) { 5232 var ptCache = (tween._pt && tween._ptCache || (tween._ptCache = {}))[property], 5233 pt, 5234 rootPT, 5235 lookup, 5236 i; 5237 5238 if (!ptCache) { 5239 ptCache = tween._ptCache[property] = []; 5240 lookup = tween._ptLookup; 5241 i = tween._targets.length; 5242 5243 while (i--) { 5244 pt = lookup[i][property]; 5245 5246 if (pt && pt.d && pt.d._pt) { 5247 pt = pt.d._pt; 5248 5249 while (pt && pt.p !== property && pt.fp !== property) { 5250 pt = pt._next; 5251 } 5252 } 5253 5254 if (!pt) { 5255 _forceAllPropTweens = 1; 5256 tween.vars[property] = "+=0"; 5257 5258 _initTween(tween, time); 5259 5260 _forceAllPropTweens = 0; 5261 return 1; 5262 } 5263 5264 ptCache.push(pt); 5265 } 5266 } 5267 5268 i = ptCache.length; 5269 5270 while (i--) { 5271 rootPT = ptCache[i]; 5272 pt = rootPT._pt || rootPT; 5273 pt.s = (start || start === 0) && !startIsRelative ? start : pt.s + (start || 0) + ratio * pt.c; 5274 pt.c = value - pt.s; 5275 rootPT.e && (rootPT.e = _round(value) + getUnit(rootPT.e)); 5276 rootPT.b && (rootPT.b = pt.s + getUnit(rootPT.b)); 5277 } 5278 }, 5279 _addAliasesToVars = function _addAliasesToVars(targets, vars) { 5280 var harness = targets[0] ? _getCache(targets[0]).harness : 0, 5281 propertyAliases = harness && harness.aliases, 5282 copy, 5283 p, 5284 i, 5285 aliases; 5286 5287 if (!propertyAliases) { 5288 return vars; 5289 } 5290
vendor: 4,989 bytes, lines 5291-5433
5291 copy = _merge({}, vars); 5292 5293 for (p in propertyAliases) { 5294 if (p in copy) { 5295 aliases = propertyAliases[p].split(","); 5296 i = aliases.length; 5297 5298 while (i--) { 5299 copy[aliases[i]] = copy[p]; 5300 } 5301 } 5302 } 5303 5304 return copy; 5305 }, 5306 _parseKeyframe = function _parseKeyframe(prop, obj, allProps, easeEach) { 5307 var ease = obj.ease || easeEach || "power1.inOut", 5308 p, 5309 a; 5310 5311 if (_isArray(obj)) { 5312 a = allProps[prop] || (allProps[prop] = []); 5313 obj.forEach(function (value, i) { 5314 return a.push({ 5315 t: i / (obj.length - 1) * 100, 5316 v: value, 5317 e: ease 5318 }); 5319 }); 5320 } else { 5321 for (p in obj) { 5322 a = allProps[p] || (allProps[p] = []); 5323 p === "ease" || a.push({ 5324 t: parseFloat(prop), 5325 v: obj[p], 5326 e: ease 5327 }); 5328 } 5329 } 5330 }, 5331 _parseFuncOrString = function _parseFuncOrString(value, tween, i, target, targets) { 5332 return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value; 5333 }, 5334 _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", 5335 _staggerPropsToSkip = {}; 5336 5337 _forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function (name) { 5338 return _staggerPropsToSkip[name] = 1; 5339 }); 5340 5341 var Tween = function (_Animation2) { 5342 _inheritsLoose(Tween, _Animation2); 5343 5344 function Tween(targets, vars, position, skipInherit) { 5345 var _this3; 5346 5347 if (typeof vars === "number") { 5348 position.duration = vars; 5349 vars = position; 5350 position = null; 5351 } 5352 5353 _this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this; 5354 var _this3$vars = _this3.vars, 5355 duration = _this3$vars.duration, 5356 delay = _this3$vars.delay, 5357 immediateRender = _this3$vars.immediateRender, 5358 stagger = _this3$vars.stagger, 5359 overwrite = _this3$vars.overwrite, 5360 keyframes = _this3$vars.keyframes, 5361 defaults = _this3$vars.defaults, 5362 scrollTrigger = _this3$vars.scrollTrigger, 5363 yoyoEase = _this3$vars.yoyoEase, 5364 parent = vars.parent || _globalTimeline, 5365 parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), 5366 tl, 5367 i, 5368 copy, 5369 l, 5370 p, 5371 curTarget, 5372 staggerFunc, 5373 staggerVarsToMerge; 5374 _this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://greensock.com", !_config.nullTargetWarn) || []; 5375 _this3._ptLookup = []; 5376 _this3._overwrite = overwrite; 5377 5378 if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) { 5379 vars = _this3.vars; 5380 tl = _this3.timeline = new Timeline({ 5381 data: "nested", 5382 defaults: defaults || {}, 5383 targets: parent && parent.data === "nested" ? parent.vars.targets : parsedTargets 5384 }); 5385 tl.kill(); 5386 tl.parent = tl._dp = _assertThisInitialized(_this3); 5387 tl._start = 0; 5388 5389 if (stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) { 5390 l = parsedTargets.length; 5391 staggerFunc = stagger && distribute(stagger); 5392 5393 if (_isObject(stagger)) { 5394 for (p in stagger) { 5395 if (~_staggerTweenProps.indexOf(p)) { 5396 staggerVarsToMerge || (staggerVarsToMerge = {}); 5397 staggerVarsToMerge[p] = stagger[p]; 5398 } 5399 } 5400 } 5401 5402 for (i = 0; i < l; i++) { 5403 copy = _copyExcluding(vars, _staggerPropsToSkip); 5404 copy.stagger = 0; 5405 yoyoEase && (copy.yoyoEase = yoyoEase); 5406 staggerVarsToMerge && _merge(copy, staggerVarsToMerge); 5407 curTarget = parsedTargets[i]; 5408 copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets); 5409 copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this3), i, curTarget, parsedTargets) || 0) - _this3._delay; 5410 5411 if (!stagger && l === 1 && copy.delay) { 5412 _this3._delay = delay = copy.delay; 5413 _this3._start += delay; 5414 copy.delay = 0; 5415 } 5416 5417 tl.to(curTarget, copy, staggerFunc ? staggerFunc(i, curTarget, parsedTargets) : 0); 5418 tl._ease = _easeMap.none; 5419 } 5420 5421 tl.duration() ? duration = delay = 0 : _this3.timeline = 0; 5422 } else if (keyframes) { 5423 _inheritDefaults(_setDefaults(tl.vars.defaults, { 5424 ease: "none" 5425 })); 5426 5427 tl._ease = _parseEase(keyframes.ease || vars.ease || "none"); 5428 var time = 0, 5429 a, 5430 kf, 5431 v; 5432 5433 if (_isArray(keyframes)) {
vendor: 6,328 bytes, lines 5434-5640
5434 keyframes.forEach(function (frame) { 5435 return tl.to(parsedTargets, frame, ">"); 5436 }); 5437 tl.duration(); 5438 } else { 5439 copy = {}; 5440 5441 for (p in keyframes) { 5442 p === "ease" || p === "easeEach" || _parseKeyframe(p, keyframes[p], copy, keyframes.easeEach); 5443 } 5444 5445 for (p in copy) { 5446 a = copy[p].sort(function (a, b) { 5447 return a.t - b.t; 5448 }); 5449 time = 0; 5450 5451 for (i = 0; i < a.length; i++) { 5452 kf = a[i]; 5453 v = { 5454 ease: kf.e, 5455 duration: (kf.t - (i ? a[i - 1].t : 0)) / 100 * duration 5456 }; 5457 v[p] = kf.v; 5458 tl.to(parsedTargets, v, time); 5459 time += v.duration; 5460 } 5461 } 5462 5463 tl.duration() < duration && tl.to({}, { 5464 duration: duration - tl.duration() 5465 }); 5466 } 5467 } 5468 5469 duration || _this3.duration(duration = tl.duration()); 5470 } else { 5471 _this3.timeline = 0; 5472 } 5473 5474 if (overwrite === true && !_suppressOverwrites) { 5475 _overwritingTween = _assertThisInitialized(_this3); 5476 5477 _globalTimeline.killTweensOf(parsedTargets); 5478 5479 _overwritingTween = 0; 5480 } 5481 5482 _addToTimeline(parent, _assertThisInitialized(_this3), position); 5483 5484 vars.reversed && _this3.reverse(); 5485 vars.paused && _this3.paused(true); 5486 5487 if (immediateRender || !duration && !keyframes && _this3._start === _roundPrecise(parent._time) && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this3)) && parent.data !== "nested") { 5488 _this3._tTime = -_tinyNum; 5489 5490 _this3.render(Math.max(0, -delay) || 0); 5491 } 5492 5493 scrollTrigger && _scrollTrigger(_assertThisInitialized(_this3), scrollTrigger); 5494 return _this3; 5495 } 5496 5497 var _proto3 = Tween.prototype; 5498 5499 _proto3.render = function render(totalTime, suppressEvents, force) { 5500 var prevTime = this._time, 5501 tDur = this._tDur, 5502 dur = this._dur, 5503 isNegative = totalTime < 0, 5504 tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, 5505 time, 5506 pt, 5507 iteration, 5508 cycleDuration, 5509 prevIteration, 5510 isYoyo, 5511 ratio, 5512 timeline, 5513 yoyoEase; 5514 5515 if (!dur) { 5516 _renderZeroDurationTween(this, totalTime, suppressEvents, force); 5517 } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative) { 5518 time = tTime; 5519 timeline = this.timeline; 5520 5521 if (this._repeat) { 5522 cycleDuration = dur + this._rDelay; 5523 5524 if (this._repeat < -1 && isNegative) { 5525 return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force); 5526 } 5527 5528 time = _roundPrecise(tTime % cycleDuration); 5529 5530 if (tTime === tDur) { 5531 iteration = this._repeat; 5532 time = dur; 5533 } else { 5534 iteration = ~~(tTime / cycleDuration); 5535 5536 if (iteration && iteration === tTime / cycleDuration) { 5537 time = dur; 5538 iteration--; 5539 } 5540 5541 time > dur && (time = dur); 5542 } 5543 5544 isYoyo = this._yoyo && iteration & 1; 5545 5546 if (isYoyo) { 5547 yoyoEase = this._yEase; 5548 time = dur - time; 5549 } 5550 5551 prevIteration = _animationCycle(this._tTime, cycleDuration); 5552 5553 if (time === prevTime && !force && this._initted) { 5554 this._tTime = tTime; 5555 return this; 5556 } 5557 5558 if (iteration !== prevIteration) { 5559 timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo); 5560 5561 if (this.vars.repeatRefresh && !isYoyo && !this._lock) { 5562 this._lock = force = 1; 5563 this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0; 5564 } 5565 } 5566 } 5567 5568 if (!this._initted) { 5569 if (_attemptInitTween(this, isNegative ? totalTime : time, force, suppressEvents, tTime)) { 5570 this._tTime = 0; 5571 return this; 5572 } 5573 5574 if (prevTime !== this._time) { 5575 return this; 5576 } 5577 5578 if (dur !== this._dur) { 5579 return this.render(totalTime, suppressEvents, force); 5580 } 5581 } 5582 5583 this._tTime = tTime; 5584 this._time = time; 5585 5586 if (!this._act && this._ts) { 5587 this._act = 1; 5588 this._lazy = 0; 5589 } 5590 5591 this.ratio = ratio = (yoyoEase || this._ease)(time / dur); 5592 5593 if (this._from) { 5594 this.ratio = ratio = 1 - ratio; 5595 } 5596 5597 if (time && !prevTime && !suppressEvents) { 5598 _callback(this, "onStart"); 5599 5600 if (this._tTime !== tTime) { 5601 return this; 5602 } 5603 } 5604 5605 pt = this._pt; 5606 5607 while (pt) { 5608 pt.r(ratio, pt.d); 5609 pt = pt._next; 5610 } 5611 5612 timeline && timeline.render(totalTime < 0 ? totalTime : !time && isYoyo ? -_tinyNum : timeline._dur * timeline._ease(time / this._dur), suppressEvents, force) || this._startAt && (this._zTime = totalTime); 5613 5614 if (this._onUpdate && !suppressEvents) { 5615 isNegative && _rewindStartAt(this, totalTime, suppressEvents, force); 5616 5617 _callback(this, "onUpdate"); 5618 } 5619 5620 this._repeat && iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent && _callback(this, "onRepeat"); 5621 5622 if ((tTime === this._tDur || !tTime) && this._tTime === tTime) { 5623 isNegative && !this._onUpdate && _rewindStartAt(this, totalTime, true, true); 5624 (totalTime || !dur) && (tTime === this._tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); 5625 5626 if (!suppressEvents && !(isNegative && !prevTime) && (tTime || prevTime || isYoyo)) { 5627 _callback(this, tTime === tDur ? "onComplete" : "onReverseComplete", true); 5628 5629 this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom(); 5630 } 5631 } 5632 } 5633 5634 return this; 5635 }; 5636 5637 _proto3.targets = function targets() { 5638 return this._targets; 5639 }; 5640
vendor: 1,277 bytes, lines 5641-5674
5641 _proto3.invalidate = function invalidate(soft) { 5642 (!soft || !this.vars.runBackwards) && (this._startAt = 0); 5643 this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0; 5644 this._ptLookup = []; 5645 this.timeline && this.timeline.invalidate(soft); 5646 return _Animation2.prototype.invalidate.call(this, soft); 5647 }; 5648 5649 _proto3.resetTo = function resetTo(property, value, start, startIsRelative) { 5650 _tickerActive || _ticker.wake(); 5651 this._ts || this.play(); 5652 var time = Math.min(this._dur, (this._dp._time - this._start) * this._ts), 5653 ratio; 5654 this._initted || _initTween(this, time); 5655 ratio = this._ease(time / this._dur); 5656 5657 if (_updatePropTweens(this, property, value, start, startIsRelative, ratio, time)) { 5658 return this.resetTo(property, value, start, startIsRelative); 5659 } 5660 5661 _alignPlayhead(this, 0); 5662 5663 this.parent || _addLinkedListItem(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0); 5664 return this.render(0); 5665 }; 5666 5667 _proto3.kill = function kill(targets, vars) { 5668 if (vars === void 0) { 5669 vars = "all"; 5670 } 5671 5672 if (!targets && (!vars || vars === "all")) { 5673 this._lazy = this._pt = 0; 5674 return this.parent ? _interrupt(this) :
vendor: 7,709 bytes, lines 5674-5954
5674 this; 5675 } 5676 5677 if (this.timeline) { 5678 var tDur = this.timeline.totalDuration(); 5679 this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true)._first || _interrupt(this); 5680 this.parent && tDur !== this.timeline.totalDuration() && _setDuration(this, this._dur * this.timeline._tDur / tDur, 0, 1); 5681 return this; 5682 } 5683 5684 var parsedTargets = this._targets, 5685 killingTargets = targets ? toArray(targets) : parsedTargets, 5686 propTweenLookup = this._ptLookup, 5687 firstPT = this._pt, 5688 overwrittenProps, 5689 curLookup, 5690 curOverwriteProps, 5691 props, 5692 p, 5693 pt, 5694 i; 5695 5696 if ((!vars || vars === "all") && _arraysMatch(parsedTargets, killingTargets)) { 5697 vars === "all" && (this._pt = 0); 5698 return _interrupt(this); 5699 } 5700 5701 overwrittenProps = this._op = this._op || []; 5702 5703 if (vars !== "all") { 5704 if (_isString(vars)) { 5705 p = {}; 5706 5707 _forEachName(vars, function (name) { 5708 return p[name] = 1; 5709 }); 5710 5711 vars = p; 5712 } 5713 5714 vars = _addAliasesToVars(parsedTargets, vars); 5715 } 5716 5717 i = parsedTargets.length; 5718 5719 while (i--) { 5720 if (~killingTargets.indexOf(parsedTargets[i])) { 5721 curLookup = propTweenLookup[i]; 5722 5723 if (vars === "all") { 5724 overwrittenProps[i] = vars; 5725 props = curLookup; 5726 curOverwriteProps = {}; 5727 } else { 5728 curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {}; 5729 props = vars; 5730 } 5731 5732 for (p in props) { 5733 pt = curLookup && curLookup[p]; 5734 5735 if (pt) { 5736 if (!("kill" in pt.d) || pt.d.kill(p) === true) { 5737 _removeLinkedListItem(this, pt, "_pt"); 5738 } 5739 5740 delete curLookup[p]; 5741 } 5742 5743 if (curOverwriteProps !== "all") { 5744 curOverwriteProps[p] = 1; 5745 } 5746 } 5747 } 5748 } 5749 5750 this._initted && !this._pt && firstPT && _interrupt(this); 5751 return this; 5752 }; 5753 5754 Tween.to = function to(targets, vars) { 5755 return new Tween(targets, vars, arguments[2]); 5756 }; 5757 5758 Tween.from = function from(targets, vars) { 5759 return _createTweenType(1, arguments); 5760 }; 5761 5762 Tween.delayedCall = function delayedCall(delay, callback, params, scope) { 5763 return new Tween(callback, 0, { 5764 immediateRender: false, 5765 lazy: false, 5766 overwrite: false, 5767 delay: delay, 5768 onComplete: callback, 5769 onReverseComplete: callback, 5770 onCompleteParams: params, 5771 onReverseCompleteParams: params, 5772 callbackScope: scope 5773 }); 5774 }; 5775 5776 Tween.fromTo = function fromTo(targets, fromVars, toVars) { 5777 return _createTweenType(2, arguments); 5778 }; 5779 5780 Tween.set = function set(targets, vars) { 5781 vars.duration = 0; 5782 vars.repeatDelay || (vars.repeat = 0); 5783 return new Tween(targets, vars); 5784 }; 5785 5786 Tween.killTweensOf = function killTweensOf(targets, props, onlyActive) { 5787 return _globalTimeline.killTweensOf(targets, props, onlyActive); 5788 }; 5789 5790 return Tween; 5791 }(Animation); 5792 5793 _setDefaults(Tween.prototype, { 5794 _targets: [], 5795 _lazy: 0, 5796 _startAt: 0, 5797 _op: 0, 5798 _onInit: 0 5799 }); 5800 5801 _forEachName("staggerTo,staggerFrom,staggerFromTo", function (name) { 5802 Tween[name] = function () { 5803 var tl = new Timeline(), 5804 params = _slice.call(arguments, 0); 5805 5806 params.splice(name === "staggerFromTo" ? 5 : 4, 0, 0); 5807 return tl[name].apply(tl, params); 5808 }; 5809 }); 5810 5811 var _setterPlain = function _setterPlain(target, property, value) { 5812 return target[property] = value; 5813 }, 5814 _setterFunc = function _setterFunc(target, property, value) { 5815 return target[property](value); 5816 }, 5817 _setterFuncWithParam = function _setterFuncWithParam(target, property, value, data) { 5818 return target[property](data.fp, value); 5819 }, 5820 _setterAttribute = function _setterAttribute(target, property, value) { 5821 return target.setAttribute(property, value); 5822 }, 5823 _getSetter = function _getSetter(target, property) { 5824 return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain; 5825 }, 5826 _renderPlain = function _renderPlain(ratio, data) { 5827 return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 1000000) / 1000000, data); 5828 }, 5829 _renderBoolean = function _renderBoolean(ratio, data) { 5830 return data.set(data.t, data.p, !!(data.s + data.c * ratio), data); 5831 }, 5832 _renderComplexString = function _renderComplexString(ratio, data) { 5833 var pt = data._pt, 5834 s = ""; 5835 5836 if (!ratio && data.b) { 5837 s = data.b; 5838 } else if (ratio === 1 && data.e) { 5839 s = data.e; 5840 } else { 5841 while (pt) { 5842 s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 10000) / 10000) + s; 5843 pt = pt._next; 5844 } 5845 5846 s += data.c; 5847 } 5848 5849 data.set(data.t, data.p, s, data); 5850 }, 5851 _renderPropTweens = function _renderPropTweens(ratio, data) { 5852 var pt = data._pt; 5853 5854 while (pt) { 5855 pt.r(ratio, pt.d); 5856 pt = pt._next; 5857 } 5858 }, 5859 _addPluginModifier = function _addPluginModifier(modifier, tween, target, property) { 5860 var pt = this._pt, 5861 next; 5862 5863 while (pt) { 5864 next = pt._next; 5865 pt.p === property && pt.modifier(modifier, tween, target); 5866 pt = next; 5867 } 5868 }, 5869 _killPropTweensOf = function _killPropTweensOf(property) { 5870 var pt = this._pt, 5871 hasNonDependentRemaining, 5872 next; 5873 5874 while (pt) { 5875 next = pt._next; 5876 5877 if (pt.p === property && !pt.op || pt.op === property) { 5878 _removeLinkedListItem(this, pt, "_pt"); 5879 } else if (!pt.dep) { 5880 hasNonDependentRemaining = 1; 5881 } 5882 5883 pt = next; 5884 } 5885 5886 return !hasNonDependentRemaining; 5887 }, 5888 _setterWithModifier = function _setterWithModifier(target, property, value, data) { 5889 data.mSet(target, property, data.m.call(data.tween, value, data.mt), data); 5890 }, 5891 _sortPropTweensByPriority = function _sortPropTweensByPriority(parent) { 5892 var pt = parent._pt, 5893 next, 5894 pt2, 5895 first, 5896 last; 5897 5898 while (pt) { 5899 next = pt._next; 5900 pt2 = first; 5901 5902 while (pt2 && pt2.pr > pt.pr) { 5903 pt2 = pt2._next; 5904 } 5905 5906 if (pt._prev = pt2 ? pt2._prev : last) { 5907 pt._prev._next = pt; 5908 } else { 5909 first = pt; 5910 } 5911 5912 if (pt._next = pt2) { 5913 pt2._prev = pt; 5914 } else { 5915 last = pt; 5916 } 5917 5918 pt = next; 5919 } 5920 5921 parent._pt = first; 5922 }; 5923 5924 var PropTween = function () { 5925 function PropTween(next, target, prop, start, change, renderer, data, setter, priority) { 5926 this.t = target; 5927 this.s = start; 5928 this.c = change; 5929 this.p = prop; 5930 this.r = renderer || _renderPlain; 5931 this.d = data || this; 5932 this.set = setter || _setterPlain; 5933 this.pr = priority || 0; 5934 this._next = next; 5935 5936 if (next) { 5937 next._prev = this; 5938 } 5939 } 5940 5941 var _proto4 = PropTween.prototype; 5942 5943 _proto4.modifier = function modifier(func, tween, target) { 5944 this.mSet = this.mSet || this.set; 5945 this.set = _setterWithModifier; 5946 this.m = func; 5947 this.mt = target; 5948 this.tween = tween; 5949 }; 5950 5951 return PropTween; 5952 }(); 5953 5954 _forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger
vendor: 3,674 bytes, lines 5954-6097
5954", function (name) { 5955 return _reservedProps[name] = 1; 5956 }); 5957 5958 _globals.TweenMax = _globals.TweenLite = Tween; 5959 _globals.TimelineLite = _globals.TimelineMax = Timeline; 5960 _globalTimeline = new Timeline({ 5961 sortChildren: false, 5962 defaults: _defaults, 5963 autoRemoveChildren: true, 5964 id: "root", 5965 smoothChildTiming: true 5966 }); 5967 _config.stringFilter = _colorStringFilter; 5968 5969 var _media = [], 5970 _listeners = {}, 5971 _emptyArray = [], 5972 _lastMediaTime = 0, 5973 _dispatch = function _dispatch(type) { 5974 return (_listeners[type] || _emptyArray).map(function (f) { 5975 return f(); 5976 }); 5977 }, 5978 _onMediaChange = function _onMediaChange() { 5979 var time = Date.now(), 5980 matches = []; 5981 5982 if (time - _lastMediaTime > 2) { 5983 _dispatch("matchMediaInit"); 5984 5985 _media.forEach(function (c) { 5986 var queries = c.queries, 5987 conditions = c.conditions, 5988 match, 5989 p, 5990 anyMatch, 5991 toggled; 5992 5993 for (p in queries) { 5994 match = _win.matchMedia(queries[p]).matches; 5995 match && (anyMatch = 1); 5996 5997 if (match !== conditions[p]) { 5998 conditions[p] = match; 5999 toggled = 1; 6000 } 6001 } 6002 6003 if (toggled) { 6004 c.revert(); 6005 anyMatch && matches.push(c); 6006 } 6007 }); 6008 6009 _dispatch("matchMediaRevert"); 6010 6011 matches.forEach(function (c) { 6012 return c.onMatch(c); 6013 }); 6014 _lastMediaTime = time; 6015 6016 _dispatch("matchMedia"); 6017 } 6018 }; 6019 6020 var Context = function () { 6021 function Context(func, scope) { 6022 this.selector = scope && selector(scope); 6023 this.data = []; 6024 this._r = []; 6025 this.isReverted = false; 6026 func && this.add(func); 6027 } 6028 6029 var _proto5 = Context.prototype; 6030 6031 _proto5.add = function add(name, func, scope) { 6032 if (_isFunction(name)) { 6033 scope = func; 6034 func = name; 6035 name = _isFunction; 6036 } 6037 6038 var self = this, 6039 f = function f() { 6040 var prev = _context, 6041 prevSelector = self.selector, 6042 result; 6043 prev && prev !== self && prev.data.push(self); 6044 scope && (self.selector = selector(scope)); 6045 _context = self; 6046 result = func.apply(self, arguments); 6047 _isFunction(result) && self._r.push(result); 6048 _context = prev; 6049 self.selector = prevSelector; 6050 self.isReverted = false; 6051 return result; 6052 }; 6053 6054 self.last = f; 6055 return name === _isFunction ? f(self) : name ? self[name] = f : f; 6056 }; 6057 6058 _proto5.ignore = function ignore(func) { 6059 var prev = _context; 6060 _context = null; 6061 func(this); 6062 _context = prev; 6063 }; 6064 6065 _proto5.getTweens = function getTweens() { 6066 var a = []; 6067 this.data.forEach(function (e) { 6068 return e instanceof Context ? a.push.apply(a, e.getTweens()) : e instanceof Tween && !(e.parent && e.parent.data === "nested") && a.push(e); 6069 }); 6070 return a; 6071 }; 6072 6073 _proto5.clear = function clear() { 6074 this._r.length = this.data.length = 0; 6075 }; 6076 6077 _proto5.kill = function kill(revert, matchMedia) { 6078 var _this4 = this; 6079 6080 if (revert) { 6081 var tweens = this.getTweens(); 6082 this.data.forEach(function (t) { 6083 if (t.data === "isFlip") { 6084 t.revert(); 6085 t.getChildren(true, true, false).forEach(function (tween) { 6086 return tweens.splice(tweens.indexOf(tween), 1); 6087 }); 6088 } 6089 }); 6090 tweens.map(function (t) { 6091 return { 6092 g: t.globalTime(0), 6093 t: t 6094 }; 6095 }).sort(function (a, b) { 6096 return b.g - a.g || -1; 6097 }
6097).forEach(function (o) { 6098 return o.t.revert(revert); 6099 }); 6100 this.data.forEach(function (e) { 6101 return !(e instanceof Animation) && e.revert && e.revert(revert); 6102 }); 6103 6104 this._r.forEach(function (f) { 6105 return f(revert, _this4); 6106 }); 6107 6108 this.isReverted = true; 6109 } else { 6110 this.data.forEach(function (e) { 6111 return e.kill && e.kill(); 6112 }); 6113 } 6114 6115 this.clear(); 6116 6117 if (matchMedia) { 6118 var i = _media.indexOf(this); 6119 6120 !!~i && _media.splice(i, 1); 6121 } 6122 }; 6123 6124 _proto5.revert = function revert(config) { 6125 this.kill(config || {}); 6126 }; 6127 6128 return Context; 6129 }(); 6130 6131 var MatchMedia = function () { 6132 function MatchMedia(scope) { 6133 this.contexts = []; 6134 this.scope = scope; 6135 } 6136 6137 var _proto6 = MatchMedia.prototype; 6138 6139 _proto6.add = function add(conditions, func, scope) { 6140 _isObject(conditions) || (conditions = { 6141 matches: conditions 6142 }); 6143 var context = new Context(0, scope || this.scope), 6144 cond = context.conditions = {}, 6145 mq, 6146 p, 6147 active; 6148 this.contexts.push(context); 6149 func = context.add("onMatch", func); 6150 context.queries = conditions; 6151 6152 for (p in conditions) { 6153 if (p === "all") { 6154 active = 1; 6155 } else { 6156 mq = _win.matchMedia(conditions[p]); 6157 6158 if (mq) { 6159 _media.indexOf(context) < 0 && _media.push(context); 6160 (cond[p] = mq.matches) && (active = 1); 6161 mq.addListener ? mq.addListener(_onMediaChange) : mq.addEventListener("change", _onMediaChange); 6162 } 6163 } 6164 } 6165 6166 active && func(context); 6167 return this; 6168 }; 6169 6170 _proto6.revert = function revert(config) { 6171 this.kill(config || {}); 6172 }; 6173 6174 _proto6.kill = function kill(revert) {
vendor: 2,486 bytes, lines 6175-6247
6175 this.contexts.forEach(function (c) { 6176 return c.kill(revert, true); 6177 }); 6178 }; 6179 6180 return MatchMedia; 6181 }(); 6182 6183 var _gsap = { 6184 registerPlugin: function registerPlugin() { 6185 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 6186 args[_key2] = arguments[_key2]; 6187 } 6188 6189 args.forEach(function (config) { 6190 return _createPlugin(config); 6191 }); 6192 }, 6193 timeline: function timeline(vars) { 6194 return new Timeline(vars); 6195 }, 6196 getTweensOf: function getTweensOf(targets, onlyActive) { 6197 return _globalTimeline.getTweensOf(targets, onlyActive); 6198 }, 6199 getProperty: function getProperty(target, property, unit, uncache) { 6200 _isString(target) && (target = toArray(target)[0]); 6201 6202 var getter = _getCache(target || {}).get, 6203 format = unit ? _passThrough : _numericIfPossible; 6204 6205 unit === "native" && (unit = ""); 6206 return !target ? target : !property ? function (property, unit, uncache) { 6207 return format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache)); 6208 } : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache)); 6209 }, 6210 quickSetter: function quickSetter(target, property, unit) { 6211 target = toArray(target); 6212 6213 if (target.length > 1) { 6214 var setters = target.map(function (t) { 6215 return gsap.quickSetter(t, property, unit); 6216 }), 6217 l = setters.length; 6218 return function (value) { 6219 var i = l; 6220 6221 while (i--) { 6222 setters[i](value); 6223 } 6224 }; 6225 } 6226 6227 target = target[0] || {}; 6228 6229 var Plugin = _plugins[property], 6230 cache = _getCache(target), 6231 p = cache.harness && (cache.harness.aliases || {})[property] || property, 6232 setter = Plugin ? function (value) { 6233 var p = new Plugin(); 6234 _quickTween._pt = 0; 6235 p.init(target, unit ? value + unit : value, _quickTween, 0, [target]); 6236 p.render(1, p); 6237 _quickTween._pt && _renderPropTweens(1, _quickTween); 6238 } : cache.set(target, p); 6239 6240 return Plugin ? setter : function (value) { 6241 return setter(target, p, unit ? value + unit : value, cache, 1); 6242 }; 6243 }, 6244 quickTo: function quickTo(target, property, vars) { 6245 var _merge2; 6246 6247 var tween = gsap.to(target, _merge((_merge2 = {}, _merge2[property] = "+=0.1", _merge2.paused = true, _merge
vendor: 5,649 bytes, lines 6247-6449
62472), vars || {})), 6248 func = function func(value, start, startIsRelative) { 6249 return tween.resetTo(property, value, start, startIsRelative); 6250 }; 6251 6252 func.tween = tween; 6253 return func; 6254 }, 6255 isTweening: function isTweening(targets) { 6256 return _globalTimeline.getTweensOf(targets, true).length > 0; 6257 }, 6258 defaults: function defaults(value) { 6259 value && value.ease && (value.ease = _parseEase(value.ease, _defaults.ease)); 6260 return _mergeDeep(_defaults, value || {}); 6261 }, 6262 config: function config(value) { 6263 return _mergeDeep(_config, value || {}); 6264 }, 6265 registerEffect: function registerEffect(_ref3) { 6266 var name = _ref3.name, 6267 effect = _ref3.effect, 6268 plugins = _ref3.plugins, 6269 defaults = _ref3.defaults, 6270 extendTimeline = _ref3.extendTimeline; 6271 (plugins || "").split(",").forEach(function (pluginName) { 6272 return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + " effect requires " + pluginName + " plugin."); 6273 }); 6274 6275 _effects[name] = function (targets, vars, tl) { 6276 return effect(toArray(targets), _setDefaults(vars || {}, defaults), tl); 6277 }; 6278 6279 if (extendTimeline) { 6280 Timeline.prototype[name] = function (targets, vars, position) { 6281 return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}, this), position); 6282 }; 6283 } 6284 }, 6285 registerEase: function registerEase(name, ease) { 6286 _easeMap[name] = _parseEase(ease); 6287 }, 6288 parseEase: function parseEase(ease, defaultEase) { 6289 return arguments.length ? _parseEase(ease, defaultEase) : _easeMap; 6290 }, 6291 getById: function getById(id) { 6292 return _globalTimeline.getById(id); 6293 }, 6294 exportRoot: function exportRoot(vars, includeDelayedCalls) { 6295 if (vars === void 0) { 6296 vars = {}; 6297 } 6298 6299 var tl = new Timeline(vars), 6300 child, 6301 next; 6302 tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming); 6303 6304 _globalTimeline.remove(tl); 6305 6306 tl._dp = 0; 6307 tl._time = tl._tTime = _globalTimeline._time; 6308 child = _globalTimeline._first; 6309 6310 while (child) { 6311 next = child._next; 6312 6313 if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) { 6314 _addToTimeline(tl, child, child._start - child._delay); 6315 } 6316 6317 child = next; 6318 } 6319 6320 _addToTimeline(_globalTimeline, tl, 0); 6321 6322 return tl; 6323 }, 6324 context: function context(func, scope) { 6325 return func ? new Context(func, scope) : _context; 6326 }, 6327 matchMedia: function matchMedia(scope) { 6328 return new MatchMedia(scope); 6329 }, 6330 matchMediaRefresh: function matchMediaRefresh() { 6331 return _media.forEach(function (c) { 6332 var cond = c.conditions, 6333 found, 6334 p; 6335 6336 for (p in cond) { 6337 if (cond[p]) { 6338 cond[p] = false; 6339 found = 1; 6340 } 6341 } 6342 6343 found && c.revert(); 6344 }) || _onMediaChange(); 6345 }, 6346 addEventListener: function addEventListener(type, callback) { 6347 var a = _listeners[type] || (_listeners[type] = []); 6348 ~a.indexOf(callback) || a.push(callback); 6349 }, 6350 removeEventListener: function removeEventListener(type, callback) { 6351 var a = _listeners[type], 6352 i = a && a.indexOf(callback); 6353 i >= 0 && a.splice(i, 1); 6354 }, 6355 utils: { 6356 wrap: wrap, 6357 wrapYoyo: wrapYoyo, 6358 distribute: distribute, 6359 random: random, 6360 snap: snap, 6361 normalize: normalize, 6362 getUnit: getUnit, 6363 clamp: clamp, 6364 splitColor: splitColor, 6365 toArray: toArray, 6366 selector: selector, 6367 mapRange: mapRange, 6368 pipe: pipe, 6369 unitize: unitize, 6370 interpolate: interpolate, 6371 shuffle: shuffle 6372 }, 6373 install: _install, 6374 effects: _effects, 6375 ticker: _ticker, 6376 updateRoot: Timeline.updateRoot, 6377 plugins: _plugins, 6378 globalTimeline: _globalTimeline, 6379 core: { 6380 PropTween: PropTween, 6381 globals: _addGlobal, 6382 Tween: Tween, 6383 Timeline: Timeline, 6384 Animation: Animation, 6385 getCache: _getCache, 6386 _removeLinkedListItem: _removeLinkedListItem, 6387 reverting: function reverting() { 6388 return _reverting; 6389 }, 6390 context: function context(toAdd) { 6391 if (toAdd && _context) { 6392 _context.data.push(toAdd); 6393 6394 toAdd._ctx = _context; 6395 } 6396 6397 return _context; 6398 }, 6399 suppressOverwrites: function suppressOverwrites(value) { 6400 return _suppressOverwrites = value; 6401 } 6402 } 6403 }; 6404 6405 _forEachName("to,from,fromTo,delayedCall,set,killTweensOf", function (name) { 6406 return _gsap[name] = Tween[name]; 6407 }); 6408 6409 _ticker.add(Timeline.updateRoot); 6410 6411 _quickTween = _gsap.to({}, { 6412 duration: 0 6413 }); 6414 6415 var _getPluginPropTween = function _getPluginPropTween(plugin, prop) { 6416 var pt = plugin._pt; 6417 6418 while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) { 6419 pt = pt._next; 6420 } 6421 6422 return pt; 6423 }, 6424 _addModifiers = function _addModifiers(tween, modifiers) { 6425 var targets = tween._targets, 6426 p, 6427 i, 6428 pt; 6429 6430 for (p in modifiers) { 6431 i = targets.length; 6432 6433 while (i--) { 6434 pt = tween._ptLookup[i][p]; 6435 6436 if (pt && (pt = pt.d)) { 6437 if (pt._pt) { 6438 pt = _getPluginPropTween(pt, p); 6439 } 6440 6441 pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p); 6442 } 6443 } 6444 } 6445 }, 6446 _buildModifierPlugin = function _buildModifierPlugin(name, modifier) { 6447 return { 6448 name: name, 6449
vendor: 20,072 bytes, lines 6449-7076
6449rawVars: 1, 6450 init: function init(target, vars, tween) { 6451 tween._onInit = function (tween) { 6452 var temp, p; 6453 6454 if (_isString(vars)) { 6455 temp = {}; 6456 6457 _forEachName(vars, function (name) { 6458 return temp[name] = 1; 6459 }); 6460 6461 vars = temp; 6462 } 6463 6464 if (modifier) { 6465 temp = {}; 6466 6467 for (p in vars) { 6468 temp[p] = modifier(vars[p]); 6469 } 6470 6471 vars = temp; 6472 } 6473 6474 _addModifiers(tween, vars); 6475 }; 6476 } 6477 }; 6478 }; 6479 6480 var gsap = _gsap.registerPlugin({ 6481 name: "attr", 6482 init: function init(target, vars, tween, index, targets) { 6483 var p, pt, v; 6484 this.tween = tween; 6485 6486 for (p in vars) { 6487 v = target.getAttribute(p) || ""; 6488 pt = this.add(target, "setAttribute", (v || 0) + "", vars[p], index, targets, 0, 0, p); 6489 pt.op = p; 6490 pt.b = v; 6491 6492 this._props.push(p); 6493 } 6494 }, 6495 render: function render(ratio, data) { 6496 var pt = data._pt; 6497 6498 while (pt) { 6499 _reverting ? pt.set(pt.t, pt.p, pt.b, pt) : pt.r(ratio, pt.d); 6500 pt = pt._next; 6501 } 6502 } 6503 }, { 6504 name: "endArray", 6505 init: function init(target, value) { 6506 var i = value.length; 6507 6508 while (i--) { 6509 this.add(target, i, target[i] || 0, value[i], 0, 0, 0, 0, 0, 1); 6510 } 6511 } 6512 }, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap; 6513 Tween.version = Timeline.version = gsap.version = "3.11.3"; 6514 _coreReady = 1; 6515 _windowExists() && _wake(); 6516 var Power0 = _easeMap.Power0, 6517 Power1 = _easeMap.Power1, 6518 Power2 = _easeMap.Power2, 6519 Power3 = _easeMap.Power3, 6520 Power4 = _easeMap.Power4, 6521 Linear = _easeMap.Linear, 6522 Quad = _easeMap.Quad, 6523 Cubic = _easeMap.Cubic, 6524 Quart = _easeMap.Quart, 6525 Quint = _easeMap.Quint, 6526 Strong = _easeMap.Strong, 6527 Elastic = _easeMap.Elastic, 6528 Back = _easeMap.Back, 6529 SteppedEase = _easeMap.SteppedEase, 6530 Bounce = _easeMap.Bounce, 6531 Sine = _easeMap.Sine, 6532 Expo = _easeMap.Expo, 6533 Circ = _easeMap.Circ; 6534 6535 var _win$1, 6536 _doc$1, 6537 _docElement, 6538 _pluginInitted, 6539 _tempDiv, 6540 _tempDivStyler, 6541 _recentSetterPlugin, 6542 _reverting$1, 6543 _windowExists$1 = function _windowExists() { 6544 return typeof window !== "undefined"; 6545 }, 6546 _transformProps = {}, 6547 _RAD2DEG = 180 / Math.PI, 6548 _DEG2RAD = Math.PI / 180, 6549 _atan2 = Math.atan2, 6550 _bigNum$1 = 1e8, 6551 _capsExp = /([A-Z])/g, 6552 _horizontalExp = /(left|right|width|margin|padding|x)/i, 6553 _complexExp = /[\s,\(]\S/, 6554 _propertyAliases = { 6555 autoAlpha: "opacity,visibility", 6556 scale: "scaleX,scaleY", 6557 alpha: "opacity" 6558 }, 6559 _renderCSSProp = function _renderCSSProp(ratio, data) { 6560 return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data); 6561 }, 6562 _renderPropWithEnd = function _renderPropWithEnd(ratio, data) { 6563 return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data); 6564 }, 6565 _renderCSSPropWithBeginning = function _renderCSSPropWithBeginning(ratio, data) { 6566 return data.set(data.t, data.p, ratio ? Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u : data.b, data); 6567 }, 6568 _renderRoundedCSSProp = function _renderRoundedCSSProp(ratio, data) { 6569 var value = data.s + data.c * ratio; 6570 data.set(data.t, data.p, ~~(value + (value < 0 ? -.5 : .5)) + data.u, data); 6571 }, 6572 _renderNonTweeningValue = function _renderNonTweeningValue(ratio, data) { 6573 return data.set(data.t, data.p, ratio ? data.e : data.b, data); 6574 }, 6575 _renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd(ratio, data) { 6576 return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data); 6577 }, 6578 _setterCSSStyle = function _setterCSSStyle(target, property, value) { 6579 return target.style[property] = value; 6580 }, 6581 _setterCSSProp = function _setterCSSProp(target, property, value) { 6582 return target.style.setProperty(property, value); 6583 }, 6584 _setterTransform = function _setterTransform(target, property, value) { 6585 return target._gsap[property] = value; 6586 }, 6587 _setterScale = function _setterScale(target, property, value) { 6588 return target._gsap.scaleX = target._gsap.scaleY = value; 6589 }, 6590 _setterScaleWithRender = function _setterScaleWithRender(target, property, value, data, ratio) { 6591 var cache = target._gsap; 6592 cache.scaleX = cache.scaleY = value; 6593 cache.renderTransform(ratio, cache); 6594 }, 6595 _setterTransformWithRender = function _setterTransformWithRender(target, property, value, data, ratio) { 6596 var cache = target._gsap; 6597 cache[property] = value; 6598 cache.renderTransform(ratio, cache); 6599 }, 6600 _transformProp = "transform", 6601 _transformOriginProp = _transformProp + "Origin", 6602 _saveStyle = function _saveStyle(property, isNotCSS) { 6603 var _this = this; 6604 6605 var target = this.target, 6606 style = target.style; 6607 6608 if (property in _transformProps) { 6609 this.tfm = this.tfm || {}; 6610 6611 if (property !== "transform") { 6612 property = _propertyAliases[property] || property; 6613 ~property.indexOf(",") ? property.split(",").forEach(function (a) { 6614 return _this.tfm[a] = _get(target, a); 6615 }) : this.tfm[property] = target._gsap.x ? target._gsap[property] : _get(target, property); 6616 } 6617 6618 if (this.props.indexOf(_transformProp) >= 0) { 6619 return; 6620 } 6621 6622 if (target._gsap.svg) { 6623 this.svgo = target.getAttribute("data-svg-origin"); 6624 this.props.push(_transformOriginProp, isNotCSS, ""); 6625 } 6626 6627 property = _transformProp; 6628 } 6629 6630 (style || isNotCSS) && this.props.push(property, isNotCSS, style[property]); 6631 }, 6632 _removeIndependentTransforms = function _removeIndependentTransforms(style) { 6633 if (style.translate) { 6634 style.removeProperty("translate"); 6635 style.removeProperty("scale"); 6636 style.removeProperty("rotate"); 6637 } 6638 }, 6639 _revertStyle = function _revertStyle() { 6640 var props = this.props, 6641 target = this.target, 6642 style = target.style, 6643 cache = target._gsap, 6644 i, 6645 p; 6646 6647 for (i = 0; i < props.length; i += 3) { 6648 props[i + 1] ? target[props[i]] = props[i + 2] : props[i + 2] ? style[props[i]] = props[i + 2] : style.removeProperty(props[i].replace(_capsExp, "-$1").toLowerCase()); 6649 } 6650 6651 if (this.tfm) { 6652 for (p in this.tfm) { 6653 cache[p] = this.tfm[p]; 6654 } 6655 6656 if (cache.svg) { 6657 cache.renderTransform(); 6658 target.setAttribute("data-svg-origin", this.svgo || ""); 6659 } 6660 6661 i = _reverting$1(); 6662 6663 if (i && !i.isStart && !style[_transformProp]) { 6664 _removeIndependentTransforms(style); 6665 6666 cache.uncache = 1; 6667 } 6668 } 6669 }, 6670 _getStyleSaver = function _getStyleSaver(target, properties) { 6671 var saver = { 6672 target: target, 6673 props: [], 6674 revert: _revertStyle, 6675 save: _saveStyle 6676 }; 6677 properties && properties.split(",").forEach(function (p) { 6678 return saver.save(p); 6679 }); 6680 return saver; 6681 }, 6682 _supports3D, 6683 _createElement = function _createElement(type, ns) { 6684 var e = _doc$1.createElementNS ? _doc$1.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc$1.createElement(type); 6685 return e.style ? e : _doc$1.createElement(type); 6686 }, 6687 _getComputedProperty = function _getComputedProperty(target, property, skipPrefixFallback) { 6688 var cs = getComputedStyle(target); 6689 return cs[property] || cs.getPropertyValue(property.replace(_capsExp, "-$1").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty(target, _checkPropPrefix(property) || property, 1) || ""; 6690 }, 6691 _prefixes = "O,Moz,ms,Ms,Webkit".split(","), 6692 _checkPropPrefix = function _checkPropPrefix(property, element, preferPrefix) { 6693 var e = element || _tempDiv, 6694 s = e.style, 6695 i = 5; 6696 6697 if (property in s && !preferPrefix) { 6698 return property; 6699 } 6700 6701 property = property.charAt(0).toUpperCase() + property.substr(1); 6702 6703 while (i-- && !(_prefixes[i] + property in s)) {} 6704 6705 return i < 0 ? null : (i === 3 ? "ms" : i >= 0 ? _prefixes[i] : "") + property; 6706 }, 6707 _initCore = function _initCore() { 6708 if (_windowExists$1() && window.document) { 6709 _win$1 = window; 6710 _doc$1 = _win$1.document; 6711 _docElement = _doc$1.documentElement; 6712 _tempDiv = _createElement("div") || { 6713 style: {} 6714 }; 6715 _tempDivStyler = _createElement("div"); 6716 _transformProp = _checkPropPrefix(_transformProp); 6717 _transformOriginProp = _transformProp + "Origin"; 6718 _tempDiv.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0"; 6719 _supports3D = !!_checkPropPrefix("perspective"); 6720 _reverting$1 = gsap.core.reverting; 6721 _pluginInitted = 1; 6722 } 6723 }, 6724 _getBBoxHack = function _getBBoxHack(swapIfPossible) { 6725 var svg = _createElement("svg", this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), 6726 oldParent = this.parentNode, 6727 oldSibling = this.nextSibling, 6728 oldCSS = this.style.cssText, 6729 bbox; 6730 6731 _docElement.appendChild(svg); 6732 6733 svg.appendChild(this); 6734 this.style.display = "block"; 6735 6736 if (swapIfPossible) { 6737 try { 6738 bbox = this.getBBox(); 6739 this._gsapBBox = this.getBBox; 6740 this.getBBox = _getBBoxHack; 6741 } catch (e) {} 6742 } else if (this._gsapBBox) { 6743 bbox = this._gsapBBox(); 6744 } 6745 6746 if (oldParent) { 6747 if (oldSibling) { 6748 oldParent.insertBefore(this, oldSibling); 6749 } else { 6750 oldParent.appendChild(this); 6751 } 6752 } 6753 6754 _docElement.removeChild(svg); 6755 6756 this.style.cssText = oldCSS; 6757 return bbox; 6758 }, 6759 _getAttributeFallbacks = function _getAttributeFallbacks(target, attributesArray) { 6760 var i = attributesArray.length; 6761 6762 while (i--) { 6763 if (target.hasAttribute(attributesArray[i])) { 6764 return target.getAttribute(attributesArray[i]); 6765 } 6766 } 6767 }, 6768 _getBBox = function _getBBox(target) { 6769 var bounds; 6770 6771 try { 6772 bounds = target.getBBox(); 6773 } catch (error) { 6774 bounds = _getBBoxHack.call(target, true); 6775 } 6776 6777 bounds && (bounds.width || bounds.height) || target.getBBox === _getBBoxHack || (bounds = _getBBoxHack.call(target, true)); 6778 return bounds && !bounds.width && !bounds.x && !bounds.y ? { 6779 x: +_getAttributeFallbacks(target, ["x", "cx", "x1"]) || 0, 6780 y: +_getAttributeFallbacks(target, ["y", "cy", "y1"]) || 0, 6781 width: 0, 6782 height: 0 6783 } : bounds; 6784 }, 6785 _isSVG = function _isSVG(e) { 6786 return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e)); 6787 }, 6788 _removeProperty = function _removeProperty(target, property) { 6789 if (property) { 6790 var style = target.style; 6791 6792 if (property in _transformProps && property !== _transformOriginProp) { 6793 property = _transformProp; 6794 } 6795 6796 if (style.removeProperty) { 6797 if (property.substr(0, 2) === "ms" || property.substr(0, 6) === "webkit") { 6798 property = "-" + property; 6799 } 6800 6801 style.removeProperty(property.replace(_capsExp, "-$1").toLowerCase()); 6802 } else { 6803 style.removeAttribute(property); 6804 } 6805 } 6806 }, 6807 _addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) { 6808 var pt = new PropTween(plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue); 6809 plugin._pt = pt; 6810 pt.b = beginning; 6811 pt.e = end; 6812 6813 plugin._props.push(property); 6814 6815 return pt; 6816 }, 6817 _nonConvertibleUnits = { 6818 deg: 1, 6819 rad: 1, 6820 turn: 1 6821 }, 6822 _nonStandardLayouts = { 6823 grid: 1, 6824 flex: 1 6825 }, 6826 _convertToUnit = function _convertToUnit(target, property, value, unit) { 6827 var curValue = parseFloat(value) || 0, 6828 curUnit = (value + "").trim().substr((curValue + "").length) || "px", 6829 style = _tempDiv.style, 6830 horizontal = _horizontalExp.test(property), 6831 isRootSVG = target.tagName.toLowerCase() === "svg", 6832 measureProperty = (isRootSVG ? "client" : "offset") + (horizontal ? "Width" : "Height"), 6833 amount = 100, 6834 toPixels = unit === "px", 6835 toPercent = unit === "%", 6836 px, 6837 parent, 6838 cache, 6839 isSVG; 6840 6841 if (unit === curUnit || !curValue || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) { 6842 return curValue; 6843 } 6844 6845 curUnit !== "px" && !toPixels && (curValue = _convertToUnit(target, property, value, "px")); 6846 isSVG = target.getCTM && _isSVG(target); 6847 6848 if ((toPercent || curUnit === "%") && (_transformProps[property] || ~property.indexOf("adius"))) { 6849 px = isSVG ? target.getBBox()[horizontal ? "width" : "height"] : target[measureProperty]; 6850 return _round(toPercent ? curValue / px * amount : curValue / 100 * px); 6851 } 6852 6853 style[horizontal ? "width" : "height"] = amount + (toPixels ? curUnit : unit); 6854 parent = ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode; 6855 6856 if (isSVG) { 6857 parent = (target.ownerSVGElement || {}).parentNode; 6858 } 6859 6860 if (!parent || parent === _doc$1 || !parent.appendChild) { 6861 parent = _doc$1.body; 6862 } 6863 6864 cache = parent._gsap; 6865 6866 if (cache && toPercent && cache.width && horizontal && cache.time === _ticker.time && !cache.uncache) { 6867 return _round(curValue / cache.width * amount); 6868 } else { 6869 (toPercent || curUnit === "%") && !_nonStandardLayouts[_getComputedProperty(parent, "display")] && (style.position = _getComputedProperty(target, "position")); 6870 parent === target && (style.position = "static"); 6871 parent.appendChild(_tempDiv); 6872 px = _tempDiv[measureProperty]; 6873 parent.removeChild(_tempDiv); 6874 style.position = "absolute"; 6875 6876 if (horizontal && toPercent) { 6877 cache = _getCache(parent); 6878 cache.time = _ticker.time; 6879 cache.width = parent[measureProperty]; 6880 } 6881 } 6882 6883 return _round(toPixels ? px * curValue / amount : px && curValue ? amount / px * curValue : 0); 6884 }, 6885 _get = function _get(target, property, unit, uncache) { 6886 var value; 6887 _pluginInitted || _initCore(); 6888 6889 if (property in _propertyAliases && property !== "transform") { 6890 property = _propertyAliases[property]; 6891 6892 if (~property.indexOf(",")) { 6893 property = property.split(",")[0]; 6894 } 6895 } 6896 6897 if (_transformProps[property] && property !== "transform") { 6898 value = _parseTransform(target, uncache); 6899 value = property !== "transformOrigin" ? value[property] : value.svg ? value.origin : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + " " + value.zOrigin + "px"; 6900 } else { 6901 value = target.style[property]; 6902 6903 if (!value || value === "auto" || uncache || ~(value + "").indexOf("calc(")) { 6904 value = _specialProps[property] && _specialProps[property](target, property, unit) || _getComputedProperty(target, property) || _getProperty(target, property) || (property === "opacity" ? 1 : 0); 6905 } 6906 } 6907 6908 return unit && !~(value + "").trim().indexOf(" ") ? _convertToUnit(target, property, value, unit) + unit : value; 6909 }, 6910 _tweenComplexCSSString = function _tweenComplexCSSString(target, prop, start, end) { 6911 if (!start || start === "none") { 6912 var p = _checkPropPrefix(prop, target, 1), 6913 s = p && _getComputedProperty(target, p, 1); 6914 6915 if (s && s !== start) { 6916 prop = p; 6917 start = s; 6918 } else if (prop === "borderColor") { 6919 start = _getComputedProperty(target, "borderTopColor"); 6920 } 6921 } 6922 6923 var pt = new PropTween(this._pt, target.style, prop, 0, 1, _renderComplexString), 6924 index = 0, 6925 matchIndex = 0, 6926 a, 6927 result, 6928 startValues, 6929 startNum, 6930 color, 6931 startValue, 6932 endValue, 6933 endNum, 6934 chunk, 6935 endUnit, 6936 startUnit, 6937 endValues; 6938 pt.b = start; 6939 pt.e = end; 6940 start += ""; 6941 end += ""; 6942 6943 if (end === "auto") { 6944 target.style[prop] = end; 6945 end = _getComputedProperty(target, prop) || end; 6946 target.style[prop] = start; 6947 } 6948 6949 a = [start, end]; 6950 6951 _colorStringFilter(a); 6952 6953 start = a[0]; 6954 end = a[1]; 6955 startValues = start.match(_numWithUnitExp) || []; 6956 endValues = end.match(_numWithUnitExp) || []; 6957 6958 if (endValues.length) { 6959 while (result = _numWithUnitExp.exec(end)) { 6960 endValue = result[0]; 6961 chunk = end.substring(index, result.index); 6962 6963 if (color) { 6964 color = (color + 1) % 5; 6965 } else if (chunk.substr(-5) === "rgba(" || chunk.substr(-5) === "hsla(") { 6966 color = 1; 6967 } 6968 6969 if (endValue !== (startValue = startValues[matchIndex++] || "")) { 6970 startNum = parseFloat(startValue) || 0; 6971 startUnit = startValue.substr((startNum + "").length); 6972 endValue.charAt(1) === "=" && (endValue = _parseRelative(startNum, endValue) + startUnit); 6973 endNum = parseFloat(endValue); 6974 endUnit = endValue.substr((endNum + "").length); 6975 index = _numWithUnitExp.lastIndex - endUnit.length; 6976 6977 if (!endUnit) { 6978 endUnit = endUnit || _config.units[prop] || startUnit; 6979 6980 if (index === end.length) { 6981 end += endUnit; 6982 pt.e += endUnit; 6983 } 6984 } 6985 6986 if (startUnit !== endUnit) { 6987 startNum = _convertToUnit(target, prop, startValue, endUnit) || 0; 6988 } 6989 6990 pt._pt = { 6991 _next: pt._pt, 6992 p: chunk || matchIndex === 1 ? chunk : ",", 6993 s: startNum, 6994 c: endNum - startNum, 6995 m: color && color < 4 || prop === "zIndex" ? Math.round : 0 6996 }; 6997 } 6998 } 6999 7000 pt.c = index < end.length ? end.substring(index, end.length) : ""; 7001 } else { 7002 pt.r = prop === "display" && end === "none" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue; 7003 } 7004 7005 _relExp.test(end) && (pt.e = 0); 7006 this._pt = pt; 7007 return pt; 7008 }, 7009 _keywordToPercent = { 7010 top: "0%", 7011 bottom: "100%", 7012 left: "0%", 7013 right: "100%", 7014 center: "50%" 7015 }, 7016 _convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) { 7017 var split = value.split(" "), 7018 x = split[0], 7019 y = split[1] || "50%"; 7020 7021 if (x === "top" || x === "bottom" || y === "left" || y === "right") { 7022 value = x; 7023 x = y; 7024 y = value; 7025 } 7026 7027 split[0] = _keywordToPercent[x] || x; 7028 split[1] = _keywordToPercent[y] || y; 7029 return split.join(" "); 7030 }, 7031 _renderClearProps = function _renderClearProps(ratio, data) { 7032 if (data.tween && data.tween._time === data.tween._dur) { 7033 var target = data.t, 7034 style = target.style, 7035 props = data.u, 7036 cache = target._gsap, 7037 prop, 7038 clearTransforms, 7039 i; 7040 7041 if (props === "all" || props === true) { 7042 style.cssText = ""; 7043 clearTransforms = 1; 7044 } else { 7045 props = props.split(","); 7046 i = props.length; 7047 7048 while (--i > -1) { 7049 prop = props[i]; 7050 7051 if (_transformProps[prop]) { 7052 clearTransforms = 1; 7053 prop = prop === "transformOrigin" ? _transformOriginProp : _transformProp; 7054 } 7055 7056 _removeProperty(target, prop); 7057 } 7058 } 7059 7060 if (clearTransforms) { 7061 _removeProperty(target, _transformProp); 7062 7063 if (cache) { 7064 cache.svg && target.removeAttribute("transform"); 7065 7066 _parseTransform(target, 1); 7067 7068 cache.uncache = 1; 7069 7070 _removeIndependentTransforms(style); 7071 } 7072 } 7073 } 7074 }, 7075 _specialProps = { 7076 clearProps: function clearProps(plugin, target, property, endValue, tween) {
vendor: 1,580 bytes, lines 7077-7117
7077 if (tween.data !== "isFromStart") { 7078 var pt = plugin._pt = new PropTween(plugin._pt, target, property, 0, 0, _renderClearProps); 7079 pt.u = endValue; 7080 pt.pr = -10; 7081 pt.tween = tween; 7082 7083 plugin._props.push(property); 7084 7085 return 1; 7086 } 7087 } 7088 }, 7089 _identity2DMatrix = [1, 0, 0, 1, 0, 0], 7090 _rotationalProperties = {}, 7091 _isNullTransform = function _isNullTransform(value) { 7092 return value === "matrix(1, 0, 0, 1, 0, 0)" || value === "none" || !value; 7093 }, 7094 _getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray(target) { 7095 var matrixString = _getComputedProperty(target, _transformProp); 7096 7097 return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_numExp).map(_round); 7098 }, 7099 _getMatrix = function _getMatrix(target, force2D) { 7100 var cache = target._gsap || _getCache(target), 7101 style = target.style, 7102 matrix = _getComputedTransformMatrixAsArray(target), 7103 parent, 7104 nextSibling, 7105 temp, 7106 addedToDOM; 7107 7108 if (cache.svg && target.getAttribute("transform")) { 7109 temp = target.transform.baseVal.consolidate().matrix; 7110 matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f]; 7111 return matrix.join(",") === "1,0,0,1,0,0" ? _identity2DMatrix : matrix; 7112 } else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) { 7113 temp = style.display; 7114 style.display = "block"; 7115 parent = target.parentNode; 7116 7117 if (!parent || !target.offsetParent
vendor: 18,897 bytes, lines 7117-7714
7117) { 7118 addedToDOM = 1; 7119 nextSibling = target.nextElementSibling; 7120 7121 _docElement.appendChild(target); 7122 } 7123 7124 matrix = _getComputedTransformMatrixAsArray(target); 7125 temp ? style.display = temp : _removeProperty(target, "display"); 7126 7127 if (addedToDOM) { 7128 nextSibling ? parent.insertBefore(target, nextSibling) : parent ? parent.appendChild(target) : _docElement.removeChild(target); 7129 } 7130 } 7131 7132 return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix; 7133 }, 7134 _applySVGOrigin = function _applySVGOrigin(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) { 7135 var cache = target._gsap, 7136 matrix = matrixArray || _getMatrix(target, true), 7137 xOriginOld = cache.xOrigin || 0, 7138 yOriginOld = cache.yOrigin || 0, 7139 xOffsetOld = cache.xOffset || 0, 7140 yOffsetOld = cache.yOffset || 0, 7141 a = matrix[0], 7142 b = matrix[1], 7143 c = matrix[2], 7144 d = matrix[3], 7145 tx = matrix[4], 7146 ty = matrix[5], 7147 originSplit = origin.split(" "), 7148 xOrigin = parseFloat(originSplit[0]) || 0, 7149 yOrigin = parseFloat(originSplit[1]) || 0, 7150 bounds, 7151 determinant, 7152 x, 7153 y; 7154 7155 if (!originIsAbsolute) { 7156 bounds = _getBBox(target); 7157 xOrigin = bounds.x + (~originSplit[0].indexOf("%") ? xOrigin / 100 * bounds.width : xOrigin); 7158 yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf("%") ? yOrigin / 100 * bounds.height : yOrigin); 7159 } else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) { 7160 x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant; 7161 y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant; 7162 xOrigin = x; 7163 yOrigin = y; 7164 } 7165 7166 if (smooth || smooth !== false && cache.smooth) { 7167 tx = xOrigin - xOriginOld; 7168 ty = yOrigin - yOriginOld; 7169 cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx; 7170 cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty; 7171 } else { 7172 cache.xOffset = cache.yOffset = 0; 7173 } 7174 7175 cache.xOrigin = xOrigin; 7176 cache.yOrigin = yOrigin; 7177 cache.smooth = !!smooth; 7178 cache.origin = origin; 7179 cache.originIsAbsolute = !!originIsAbsolute; 7180 target.style[_transformOriginProp] = "0px 0px"; 7181 7182 if (pluginToAddPropTweensTo) { 7183 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOrigin", xOriginOld, xOrigin); 7184 7185 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOrigin", yOriginOld, yOrigin); 7186 7187 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOffset", xOffsetOld, cache.xOffset); 7188 7189 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOffset", yOffsetOld, cache.yOffset); 7190 } 7191 7192 target.setAttribute("data-svg-origin", xOrigin + " " + yOrigin); 7193 }, 7194 _parseTransform = function _parseTransform(target, uncache) { 7195 var cache = target._gsap || new GSCache(target); 7196 7197 if ("x" in cache && !uncache && !cache.uncache) { 7198 return cache; 7199 } 7200 7201 var style = target.style, 7202 invertedScaleX = cache.scaleX < 0, 7203 px = "px", 7204 deg = "deg", 7205 cs = getComputedStyle(target), 7206 origin = _getComputedProperty(target, _transformOriginProp) || "0", 7207 x, 7208 y, 7209 z, 7210 scaleX, 7211 scaleY, 7212 rotation, 7213 rotationX, 7214 rotationY, 7215 skewX, 7216 skewY, 7217 perspective, 7218 xOrigin, 7219 yOrigin, 7220 matrix, 7221 angle, 7222 cos, 7223 sin, 7224 a, 7225 b, 7226 c, 7227 d, 7228 a12, 7229 a22, 7230 t1, 7231 t2, 7232 t3, 7233 a13, 7234 a23, 7235 a33, 7236 a42, 7237 a43, 7238 a32; 7239 x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0; 7240 scaleX = scaleY = 1; 7241 cache.svg = !!(target.getCTM && _isSVG(target)); 7242 7243 if (cs.translate) { 7244 if (cs.translate !== "none" || cs.scale !== "none" || cs.rotate !== "none") { 7245 style[_transformProp] = (cs.translate !== "none" ? "translate3d(" + (cs.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (cs.rotate !== "none" ? "rotate(" + cs.rotate + ") " : "") + (cs.scale !== "none" ? "scale(" + cs.scale.split(" ").join(",") + ") " : "") + (cs[_transformProp] !== "none" ? cs[_transformProp] : ""); 7246 } 7247 7248 style.scale = style.rotate = style.translate = "none"; 7249 } 7250 7251 matrix = _getMatrix(target, cache.svg); 7252 7253 if (cache.svg) { 7254 if (cache.uncache) { 7255 t2 = target.getBBox(); 7256 origin = cache.xOrigin - t2.x + "px " + (cache.yOrigin - t2.y) + "px"; 7257 t1 = ""; 7258 } else { 7259 t1 = !uncache && target.getAttribute("data-svg-origin"); 7260 } 7261 7262 _applySVGOrigin(target, t1 || origin, !!t1 || cache.originIsAbsolute, cache.smooth !== false, matrix); 7263 } 7264 7265 xOrigin = cache.xOrigin || 0; 7266 yOrigin = cache.yOrigin || 0; 7267 7268 if (matrix !== _identity2DMatrix) { 7269 a = matrix[0]; 7270 b = matrix[1]; 7271 c = matrix[2]; 7272 d = matrix[3]; 7273 x = a12 = matrix[4]; 7274 y = a22 = matrix[5]; 7275 7276 if (matrix.length === 6) { 7277 scaleX = Math.sqrt(a * a + b * b); 7278 scaleY = Math.sqrt(d * d + c * c); 7279 rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0; 7280 skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0; 7281 skewX && (scaleY *= Math.abs(Math.cos(skewX * _DEG2RAD))); 7282 7283 if (cache.svg) { 7284 x -= xOrigin - (xOrigin * a + yOrigin * c); 7285 y -= yOrigin - (xOrigin * b + yOrigin * d); 7286 } 7287 } else { 7288 a32 = matrix[6]; 7289 a42 = matrix[7]; 7290 a13 = matrix[8]; 7291 a23 = matrix[9]; 7292 a33 = matrix[10]; 7293 a43 = matrix[11]; 7294 x = matrix[12]; 7295 y = matrix[13]; 7296 z = matrix[14]; 7297 angle = _atan2(a32, a33); 7298 rotationX = angle * _RAD2DEG; 7299 7300 if (angle) { 7301 cos = Math.cos(-angle); 7302 sin = Math.sin(-angle); 7303 t1 = a12 * cos + a13 * sin; 7304 t2 = a22 * cos + a23 * sin; 7305 t3 = a32 * cos + a33 * sin; 7306 a13 = a12 * -sin + a13 * cos; 7307 a23 = a22 * -sin + a23 * cos; 7308 a33 = a32 * -sin + a33 * cos; 7309 a43 = a42 * -sin + a43 * cos; 7310 a12 = t1; 7311 a22 = t2; 7312 a32 = t3; 7313 } 7314 7315 angle = _atan2(-c, a33); 7316 rotationY = angle * _RAD2DEG; 7317 7318 if (angle) { 7319 cos = Math.cos(-angle); 7320 sin = Math.sin(-angle); 7321 t1 = a * cos - a13 * sin; 7322 t2 = b * cos - a23 * sin; 7323 t3 = c * cos - a33 * sin; 7324 a43 = d * sin + a43 * cos; 7325 a = t1; 7326 b = t2; 7327 c = t3; 7328 } 7329 7330 angle = _atan2(b, a); 7331 rotation = angle * _RAD2DEG; 7332 7333 if (angle) { 7334 cos = Math.cos(angle); 7335 sin = Math.sin(angle); 7336 t1 = a * cos + b * sin; 7337 t2 = a12 * cos + a22 * sin; 7338 b = b * cos - a * sin; 7339 a22 = a22 * cos - a12 * sin; 7340 a = t1; 7341 a12 = t2; 7342 } 7343 7344 if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) { 7345 rotationX = rotation = 0; 7346 rotationY = 180 - rotationY; 7347 } 7348 7349 scaleX = _round(Math.sqrt(a * a + b * b + c * c)); 7350 scaleY = _round(Math.sqrt(a22 * a22 + a32 * a32)); 7351 angle = _atan2(a12, a22); 7352 skewX = Math.abs(angle) > 0.0002 ? angle * _RAD2DEG : 0; 7353 perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0; 7354 } 7355 7356 if (cache.svg) { 7357 t1 = target.getAttribute("transform"); 7358 cache.forceCSS = target.setAttribute("transform", "") || !_isNullTransform(_getComputedProperty(target, _transformProp)); 7359 t1 && target.setAttribute("transform", t1); 7360 } 7361 } 7362 7363 if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) { 7364 if (invertedScaleX) { 7365 scaleX *= -1; 7366 skewX += rotation <= 0 ? 180 : -180; 7367 rotation += rotation <= 0 ? 180 : -180; 7368 } else { 7369 scaleY *= -1; 7370 skewX += skewX <= 0 ? 180 : -180; 7371 } 7372 } 7373 7374 uncache = uncache || cache.uncache; 7375 cache.x = x - ((cache.xPercent = x && (!uncache && cache.xPercent || (Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0))) ? target.offsetWidth * cache.xPercent / 100 : 0) + px; 7376 cache.y = y - ((cache.yPercent = y && (!uncache && cache.yPercent || (Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0))) ? target.offsetHeight * cache.yPercent / 100 : 0) + px; 7377 cache.z = z + px; 7378 cache.scaleX = _round(scaleX); 7379 cache.scaleY = _round(scaleY); 7380 cache.rotation = _round(rotation) + deg; 7381 cache.rotationX = _round(rotationX) + deg; 7382 cache.rotationY = _round(rotationY) + deg; 7383 cache.skewX = skewX + deg; 7384 cache.skewY = skewY + deg; 7385 cache.transformPerspective = perspective + px; 7386 7387 if (cache.zOrigin = parseFloat(origin.split(" ")[2]) || 0) { 7388 style[_transformOriginProp] = _firstTwoOnly(origin); 7389 } 7390 7391 cache.xOffset = cache.yOffset = 0; 7392 cache.force3D = _config.force3D; 7393 cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms; 7394 cache.uncache = 0; 7395 return cache; 7396 }, 7397 _firstTwoOnly = function _firstTwoOnly(value) { 7398 return (value = value.split(" "))[0] + " " + value[1]; 7399 }, 7400 _addPxTranslate = function _addPxTranslate(target, start, value) { 7401 var unit = getUnit(start); 7402 return _round(parseFloat(start) + parseFloat(_convertToUnit(target, "x", value + "px", unit))) + unit; 7403 }, 7404 _renderNon3DTransforms = function _renderNon3DTransforms(ratio, cache) { 7405 cache.z = "0px"; 7406 cache.rotationY = cache.rotationX = "0deg"; 7407 cache.force3D = 0; 7408 7409 _renderCSSTransforms(ratio, cache); 7410 }, 7411 _zeroDeg = "0deg", 7412 _zeroPx = "0px", 7413 _endParenthesis = ") ", 7414 _renderCSSTransforms = function _renderCSSTransforms(ratio, cache) { 7415 var _ref = cache || this, 7416 xPercent = _ref.xPercent, 7417 yPercent = _ref.yPercent, 7418 x = _ref.x, 7419 y = _ref.y, 7420 z = _ref.z, 7421 rotation = _ref.rotation, 7422 rotationY = _ref.rotationY, 7423 rotationX = _ref.rotationX, 7424 skewX = _ref.skewX, 7425 skewY = _ref.skewY, 7426 scaleX = _ref.scaleX, 7427 scaleY = _ref.scaleY, 7428 transformPerspective = _ref.transformPerspective, 7429 force3D = _ref.force3D, 7430 target = _ref.target, 7431 zOrigin = _ref.zOrigin, 7432 transforms = "", 7433 use3D = force3D === "auto" && ratio && ratio !== 1 || force3D === true; 7434 7435 if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) { 7436 var angle = parseFloat(rotationY) * _DEG2RAD, 7437 a13 = Math.sin(angle), 7438 a33 = Math.cos(angle), 7439 cos; 7440 7441 angle = parseFloat(rotationX) * _DEG2RAD; 7442 cos = Math.cos(angle); 7443 x = _addPxTranslate(target, x, a13 * cos * -zOrigin); 7444 y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin); 7445 z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin); 7446 } 7447 7448 if (transformPerspective !== _zeroPx) { 7449 transforms += "perspective(" + transformPerspective + _endParenthesis; 7450 } 7451 7452 if (xPercent || yPercent) { 7453 transforms += "translate(" + xPercent + "%, " + yPercent + "%) "; 7454 } 7455 7456 if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) { 7457 transforms += z !== _zeroPx || use3D ? "translate3d(" + x + ", " + y + ", " + z + ") " : "translate(" + x + ", " + y + _endParenthesis; 7458 } 7459 7460 if (rotation !== _zeroDeg) { 7461 transforms += "rotate(" + rotation + _endParenthesis; 7462 } 7463 7464 if (rotationY !== _zeroDeg) { 7465 transforms += "rotateY(" + rotationY + _endParenthesis; 7466 } 7467 7468 if (rotationX !== _zeroDeg) { 7469 transforms += "rotateX(" + rotationX + _endParenthesis; 7470 } 7471 7472 if (skewX !== _zeroDeg || skewY !== _zeroDeg) { 7473 transforms += "skew(" + skewX + ", " + skewY + _endParenthesis; 7474 } 7475 7476 if (scaleX !== 1 || scaleY !== 1) { 7477 transforms += "scale(" + scaleX + ", " + scaleY + _endParenthesis; 7478 } 7479 7480 target.style[_transformProp] = transforms || "translate(0, 0)"; 7481 }, 7482 _renderSVGTransforms = function _renderSVGTransforms(ratio, cache) { 7483 var _ref2 = cache || this, 7484 xPercent = _ref2.xPercent, 7485 yPercent = _ref2.yPercent, 7486 x = _ref2.x, 7487 y = _ref2.y, 7488 rotation = _ref2.rotation, 7489 skewX = _ref2.skewX, 7490 skewY = _ref2.skewY, 7491 scaleX = _ref2.scaleX, 7492 scaleY = _ref2.scaleY, 7493 target = _ref2.target, 7494 xOrigin = _ref2.xOrigin, 7495 yOrigin = _ref2.yOrigin, 7496 xOffset = _ref2.xOffset, 7497 yOffset = _ref2.yOffset, 7498 forceCSS = _ref2.forceCSS, 7499 tx = parseFloat(x), 7500 ty = parseFloat(y), 7501 a11, 7502 a21, 7503 a12, 7504 a22, 7505 temp; 7506 7507 rotation = parseFloat(rotation); 7508 skewX = parseFloat(skewX); 7509 skewY = parseFloat(skewY); 7510 7511 if (skewY) { 7512 skewY = parseFloat(skewY); 7513 skewX += skewY; 7514 rotation += skewY; 7515 } 7516 7517 if (rotation || skewX) { 7518 rotation *= _DEG2RAD; 7519 skewX *= _DEG2RAD; 7520 a11 = Math.cos(rotation) * scaleX; 7521 a21 = Math.sin(rotation) * scaleX; 7522 a12 = Math.sin(rotation - skewX) * -scaleY; 7523 a22 = Math.cos(rotation - skewX) * scaleY; 7524 7525 if (skewX) { 7526 skewY *= _DEG2RAD; 7527 temp = Math.tan(skewX - skewY); 7528 temp = Math.sqrt(1 + temp * temp); 7529 a12 *= temp; 7530 a22 *= temp; 7531 7532 if (skewY) { 7533 temp = Math.tan(skewY); 7534 temp = Math.sqrt(1 + temp * temp); 7535 a11 *= temp; 7536 a21 *= temp; 7537 } 7538 } 7539 7540 a11 = _round(a11); 7541 a21 = _round(a21); 7542 a12 = _round(a12); 7543 a22 = _round(a22); 7544 } else { 7545 a11 = scaleX; 7546 a22 = scaleY; 7547 a21 = a12 = 0; 7548 } 7549 7550 if (tx && !~(x + "").indexOf("px") || ty && !~(y + "").indexOf("px")) { 7551 tx = _convertToUnit(target, "x", x, "px"); 7552 ty = _convertToUnit(target, "y", y, "px"); 7553 } 7554 7555 if (xOrigin || yOrigin || xOffset || yOffset) { 7556 tx = _round(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset); 7557 ty = _round(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset); 7558 } 7559 7560 if (xPercent || yPercent) { 7561 temp = target.getBBox(); 7562 tx = _round(tx + xPercent / 100 * temp.width); 7563 ty = _round(ty + yPercent / 100 * temp.height); 7564 } 7565 7566 temp = "matrix(" + a11 + "," + a21 + "," + a12 + "," + a22 + "," + tx + "," + ty + ")"; 7567 target.setAttribute("transform", temp); 7568 forceCSS && (target.style[_transformProp] = temp); 7569 }, 7570 _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue) { 7571 var cap = 360, 7572 isString = _isString(endValue), 7573 endNum = parseFloat(endValue) * (isString && ~endValue.indexOf("rad") ? _RAD2DEG : 1), 7574 change = endNum - startNum, 7575 finalValue = startNum + change + "deg", 7576 direction, 7577 pt; 7578 7579 if (isString) { 7580 direction = endValue.split("_")[1]; 7581 7582 if (direction === "short") { 7583 change %= cap; 7584 7585 if (change !== change % (cap / 2)) { 7586 change += change < 0 ? cap : -cap; 7587 } 7588 } 7589 7590 if (direction === "cw" && change < 0) { 7591 change = (change + cap * _bigNum$1) % cap - ~~(change / cap) * cap; 7592 } else if (direction === "ccw" && change > 0) { 7593 change = (change - cap * _bigNum$1) % cap - ~~(change / cap) * cap; 7594 } 7595 } 7596 7597 plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd); 7598 pt.e = finalValue; 7599 pt.u = "deg"; 7600 7601 plugin._props.push(property); 7602 7603 return pt; 7604 }, 7605 _assign = function _assign(target, source) { 7606 for (var p in source) { 7607 target[p] = source[p]; 7608 } 7609 7610 return target; 7611 }, 7612 _addRawTransformPTs = function _addRawTransformPTs(plugin, transforms, target) { 7613 var startCache = _assign({}, target._gsap), 7614 exclude = "perspective,force3D,transformOrigin,svgOrigin", 7615 style = target.style, 7616 endCache, 7617 p, 7618 startValue, 7619 endValue, 7620 startNum, 7621 endNum, 7622 startUnit, 7623 endUnit; 7624 7625 if (startCache.svg) { 7626 startValue = target.getAttribute("transform"); 7627 target.setAttribute("transform", ""); 7628 style[_transformProp] = transforms; 7629 endCache = _parseTransform(target, 1); 7630 7631 _removeProperty(target, _transformProp); 7632 7633 target.setAttribute("transform", startValue); 7634 } else { 7635 startValue = getComputedStyle(target)[_transformProp]; 7636 style[_transformProp] = transforms; 7637 endCache = _parseTransform(target, 1); 7638 style[_transformProp] = startValue; 7639 } 7640 7641 for (p in _transformProps) { 7642 startValue = startCache[p]; 7643 endValue = endCache[p]; 7644 7645 if (startValue !== endValue && exclude.indexOf(p) < 0) { 7646 startUnit = getUnit(startValue); 7647 endUnit = getUnit(endValue); 7648 startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue); 7649 endNum = parseFloat(endValue); 7650 plugin._pt = new PropTween(plugin._pt, endCache, p, startNum, endNum - startNum, _renderCSSProp); 7651 plugin._pt.u = endUnit || 0; 7652 7653 plugin._props.push(p); 7654 } 7655 } 7656 7657 _assign(endCache, startCache); 7658 }; 7659 7660 _forEachName("padding,margin,Width,Radius", function (name, index) { 7661 var t = "Top", 7662 r = "Right", 7663 b = "Bottom", 7664 l = "Left", 7665 props = (index < 3 ? [t, r, b, l] : [t + l, t + r, b + r, b + l]).map(function (side) { 7666 return index < 2 ? name + side : "border" + side + name; 7667 }); 7668 7669 _specialProps[index > 1 ? "border" + name : name] = function (plugin, target, property, endValue, tween) { 7670 var a, vars; 7671 7672 if (arguments.length < 4) { 7673 a = props.map(function (prop) { 7674 return _get(plugin, prop, property); 7675 }); 7676 vars = a.join(" "); 7677 return vars.split(a[0]).length === 5 ? a[0] : vars; 7678 } 7679 7680 a = (endValue + "").split(" "); 7681 vars = {}; 7682 props.forEach(function (prop, i) { 7683 return vars[prop] = a[i] = a[i] || a[(i - 1) / 2 | 0]; 7684 }); 7685 plugin.init(target, vars, tween); 7686 }; 7687 }); 7688 7689 var CSSPlugin = { 7690 name: "css", 7691 register: _initCore, 7692 targetTest: function targetTest(target) { 7693 return target.style && target.nodeType; 7694 }, 7695 init: function init(target, vars, tween, index, targets) { 7696 var props = this._props, 7697 style = target.style, 7698 startAt = tween.vars.startAt, 7699 startValue, 7700 endValue, 7701 endNum, 7702 startNum, 7703 type, 7704 specialProp, 7705 p, 7706 startUnit, 7707 endUnit, 7708 relative, 7709 isTransformRelated, 7710 transformPropTween, 7711 cache, 7712 smooth, 7713 hasPriority, 7714 inlineProps
vendor: 7,960 bytes, lines 7714-7901
7714; 7715 _pluginInitted || _initCore(); 7716 this.styles = this.styles || _getStyleSaver(target); 7717 inlineProps = this.styles.props; 7718 this.tween = tween; 7719 7720 for (p in vars) { 7721 if (p === "autoRound") { 7722 continue; 7723 } 7724 7725 endValue = vars[p]; 7726 7727 if (_plugins[p] && _checkPlugin(p, vars, tween, index, target, targets)) { 7728 continue; 7729 } 7730 7731 type = typeof endValue; 7732 specialProp = _specialProps[p]; 7733 7734 if (type === "function") { 7735 endValue = endValue.call(tween, index, target, targets); 7736 type = typeof endValue; 7737 } 7738 7739 if (type === "string" && ~endValue.indexOf("random(")) { 7740 endValue = _replaceRandom(endValue); 7741 } 7742 7743 if (specialProp) { 7744 specialProp(this, target, p, endValue, tween) && (hasPriority = 1); 7745 } else if (p.substr(0, 2) === "--") { 7746 startValue = (getComputedStyle(target).getPropertyValue(p) + "").trim(); 7747 endValue += ""; 7748 _colorExp.lastIndex = 0; 7749 7750 if (!_colorExp.test(startValue)) { 7751 startUnit = getUnit(startValue); 7752 endUnit = getUnit(endValue); 7753 } 7754 7755 endUnit ? startUnit !== endUnit && (startValue = _convertToUnit(target, p, startValue, endUnit) + endUnit) : startUnit && (endValue += startUnit); 7756 this.add(style, "setProperty", startValue, endValue, index, targets, 0, 0, p); 7757 props.push(p); 7758 inlineProps.push(p, 0, style[p]); 7759 } else if (type !== "undefined") { 7760 if (startAt && p in startAt) { 7761 startValue = typeof startAt[p] === "function" ? startAt[p].call(tween, index, target, targets) : startAt[p]; 7762 _isString(startValue) && ~startValue.indexOf("random(") && (startValue = _replaceRandom(startValue)); 7763 getUnit(startValue + "") || (startValue += _config.units[p] || getUnit(_get(target, p)) || ""); 7764 (startValue + "").charAt(1) === "=" && (startValue = _get(target, p)); 7765 } else { 7766 startValue = _get(target, p); 7767 } 7768 7769 startNum = parseFloat(startValue); 7770 relative = type === "string" && endValue.charAt(1) === "=" && endValue.substr(0, 2); 7771 relative && (endValue = endValue.substr(2)); 7772 endNum = parseFloat(endValue); 7773 7774 if (p in _propertyAliases) { 7775 if (p === "autoAlpha") { 7776 if (startNum === 1 && _get(target, "visibility") === "hidden" && endNum) { 7777 startNum = 0; 7778 } 7779 7780 inlineProps.push("visibility", 0, style.visibility); 7781 7782 _addNonTweeningPT(this, style, "visibility", startNum ? "inherit" : "hidden", endNum ? "inherit" : "hidden", !endNum); 7783 } 7784 7785 if (p !== "scale" && p !== "transform") { 7786 p = _propertyAliases[p]; 7787 ~p.indexOf(",") && (p = p.split(",")[0]); 7788 } 7789 } 7790 7791 isTransformRelated = p in _transformProps; 7792 7793 if (isTransformRelated) { 7794 this.styles.save(p); 7795 7796 if (!transformPropTween) { 7797 cache = target._gsap; 7798 cache.renderTransform && !vars.parseTransform || _parseTransform(target, vars.parseTransform); 7799 smooth = vars.smoothOrigin !== false && cache.smooth; 7800 transformPropTween = this._pt = new PropTween(this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1); 7801 transformPropTween.dep = 1; 7802 } 7803 7804 if (p === "scale") { 7805 this._pt = new PropTween(this._pt, cache, "scaleY", startNum, (relative ? _parseRelative(startNum, relative + endNum) : endNum) - startNum || 0, _renderCSSProp); 7806 this._pt.u = 0; 7807 props.push("scaleY", p); 7808 p += "X"; 7809 } else if (p === "transformOrigin") { 7810 inlineProps.push(_transformOriginProp, 0, style[_transformOriginProp]); 7811 endValue = _convertKeywordsToPercentages(endValue); 7812 7813 if (cache.svg) { 7814 _applySVGOrigin(target, endValue, 0, smooth, 0, this); 7815 } else { 7816 endUnit = parseFloat(endValue.split(" ")[2]) || 0; 7817 endUnit !== cache.zOrigin && _addNonTweeningPT(this, cache, "zOrigin", cache.zOrigin, endUnit); 7818 7819 _addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue)); 7820 } 7821 7822 continue; 7823 } else if (p === "svgOrigin") { 7824 _applySVGOrigin(target, endValue, 1, smooth, 0, this); 7825 7826 continue; 7827 } else if (p in _rotationalProperties) { 7828 _addRotationalPropTween(this, cache, p, startNum, relative ? _parseRelative(startNum, relative + endValue) : endValue); 7829 7830 continue; 7831 } else if (p === "smoothOrigin") { 7832 _addNonTweeningPT(this, cache, "smooth", cache.smooth, endValue); 7833 7834 continue; 7835 } else if (p === "force3D") { 7836 cache[p] = endValue; 7837 continue; 7838 } else if (p === "transform") { 7839 _addRawTransformPTs(this, endValue, target); 7840 7841 continue; 7842 } 7843 } else if (!(p in style)) { 7844 p = _checkPropPrefix(p) || p; 7845 } 7846 7847 if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) { 7848 startUnit = (startValue + "").substr((startNum + "").length); 7849 endNum || (endNum = 0); 7850 endUnit = getUnit(endValue) || (p in _config.units ? _config.units[p] : startUnit); 7851 startUnit !== endUnit && (startNum = _convertToUnit(target, p, startValue, endUnit)); 7852 this._pt = new PropTween(this._pt, isTransformRelated ? cache : style, p, startNum, (relative ? _parseRelative(startNum, relative + endNum) : endNum) - startNum, !isTransformRelated && (endUnit === "px" || p === "zIndex") && vars.autoRound !== false ? _renderRoundedCSSProp : _renderCSSProp); 7853 this._pt.u = endUnit || 0; 7854 7855 if (startUnit !== endUnit && endUnit !== "%") { 7856 this._pt.b = startValue; 7857 this._pt.r = _renderCSSPropWithBeginning; 7858 } 7859 } else if (!(p in style)) { 7860 if (p in target) { 7861 this.add(target, p, startValue || target[p], relative ? relative + endValue : endValue, index, targets); 7862 } else { 7863 _missingPlugin(p, endValue); 7864 7865 continue; 7866 } 7867 } else { 7868 _tweenComplexCSSString.call(this, target, p, startValue, relative ? relative + endValue : endValue); 7869 } 7870 7871 isTransformRelated || (p in style ? inlineProps.push(p, 0, style[p]) : inlineProps.push(p, 1, startValue || target[p])); 7872 props.push(p); 7873 } 7874 } 7875 7876 hasPriority && _sortPropTweensByPriority(this); 7877 }, 7878 render: function render(ratio, data) { 7879 if (data.tween._time || !_reverting$1()) { 7880 var pt = data._pt; 7881 7882 while (pt) { 7883 pt.r(ratio, pt.d); 7884 pt = pt._next; 7885 } 7886 } else { 7887 data.styles.revert(); 7888 } 7889 }, 7890 get: _get, 7891 aliases: _propertyAliases, 7892 getSetter: function getSetter(target, property, plugin) { 7893 var p = _propertyAliases[property]; 7894 p && p.indexOf(",") < 0 && (property = p); 7895 return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, "x")) ? plugin && _recentSetterPlugin === plugin ? property === "scale" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === "scale" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !_isUndefined(target.style[property]) ? _setterCSSStyle : ~property.indexOf("-") ? _setterCSSProp : _getSetter(target, property); 7896 }, 7897 core: { 7898 _removeProperty: _removeProperty, 7899 _getMatrix: _getMatrix 7900 } 7901 };
vendor: 2,057 bytes, lines 7902-7961
7902 gsap.utils.checkPrefix = _checkPropPrefix; 7903 gsap.core.getStyleSaver = _getStyleSaver; 7904 7905 (function (positionAndScale, rotation, others, aliases) { 7906 var all = _forEachName(positionAndScale + "," + rotation + "," + others, function (name) { 7907 _transformProps[name] = 1; 7908 }); 7909 7910 _forEachName(rotation, function (name) { 7911 _config.units[name] = "deg"; 7912 _rotationalProperties[name] = 1; 7913 }); 7914 7915 _propertyAliases[all[13]] = positionAndScale + "," + rotation; 7916 7917 _forEachName(aliases, function (name) { 7918 var split = name.split(":"); 7919 _propertyAliases[split[1]] = all[split[0]]; 7920 }); 7921 })("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"); 7922 7923 _forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function (name) { 7924 _config.units[name] = "px"; 7925 }); 7926 7927 gsap.registerPlugin(CSSPlugin); 7928 7929 var gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap, 7930 TweenMaxWithCSS = gsapWithCSS.core.Tween; 7931 7932 exports.Back = Back; 7933 exports.Bounce = Bounce; 7934 exports.CSSPlugin = CSSPlugin; 7935 exports.Circ = Circ; 7936 exports.Cubic = Cubic; 7937 exports.Elastic = Elastic; 7938 exports.Expo = Expo; 7939 exports.Linear = Linear; 7940 exports.Power0 = Power0; 7941 exports.Power1 = Power1; 7942 exports.Power2 = Power2; 7943 exports.Power3 = Power3; 7944 exports.Power4 = Power4; 7945 exports.Quad = Quad; 7946 exports.Quart = Quart; 7947 exports.Quint = Quint; 7948 exports.Sine = Sine; 7949 exports.SteppedEase = SteppedEase; 7950 exports.Strong = Strong; 7951 exports.TimelineLite = Timeline; 7952 exports.TimelineMax = Timeline; 7953 exports.TweenLite = Tween; 7954 exports.TweenMax = TweenMaxWithCSS; 7955 exports.default = gsapWithCSS; 7956 exports.gsap = gsapWithCSS; 7957 7958 if (typeof(window) === 'undefined' || window !== exports) {Object.defineProperty(exports, '__esModule', { value: true });} else {delete window.default;} 7959 7960}))); 7961
vendor: 146,326 bytes, lines 7962-7974
7962/** 7963 * Swiper 6.8.4 7964 * Most modern mobile touch slider and framework with hardware accelerated transitions 7965 * https://swiperjs.com 7966 * 7967 * Copyright 2014-2021 Vladimir Kharlampidi 7968 * 7969 * Released under the MIT License 7970 * 7971 * Released on: August 23, 2021 7972 */ 7973 7974!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Swiper=t()}(this,(function(){"use strict";function e(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(this,arguments)}function a(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((function(s){void 0===e[s]?e[s]=t[s]:a(t[s])&&a(e[s])&&Object.keys(t[s]).length>0&&i(e[s],t[s])}))}var s={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[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){var e="undefined"!=typeof document?document:{};return i(e,s),e}var n={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function l(){var e="undefined"!=typeof window?window:{};return i(e,n),e}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function u(e,t,a){return(u=p()?Reflect.construct:function(e,t,a){var i=[null];i.push.apply(i,t);var s=new(Function.bind.apply(e,i));return a&&d(s,a.prototype),s}).apply(null,arguments)}function c(e){var t="function"==typeof Map?new Map:void 0;return(c=function(e){if(null===e||(a=e,-1===Function.toString.call(a).indexOf("[native code]")))return e;var a;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return u(e,arguments,o(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),d(i,e)})(e)}var h=function(e){var t,a;function i(t){var a,i,s;return a=e.call.apply(e,[this].concat(t))||this,i=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a),s=i.__proto__,Object.defineProperty(i,"__proto__",{get:function(){return s},set:function(e){s.__proto__=e}}),a}return a=e,(t=i).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,i}(c(Array));function v(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,v(e)):t.push(e)})),t}function f(e,t){return Array.prototype.filter.call(e,t)}function m(e,t){var a=l(),i=r(),s=[];if(!t&&e instanceof h)return e;if(!e)return new h(s);if("string"==typeof e){var n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){var o="div";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");var d=i.createElement(o);d.innerHTML=n;for(var p=0;p<d.childNodes.length;p+=1)s.push(d.childNodes[p])}else s=function(e,t){if("string"!=typeof e)return[e];for(var a=[],i=t.querySelectorAll(e),s=0;s<i.length;s+=1)a.push(i[s]);return a}(e.trim(),t||i)}else if(e.nodeType||e===a||e===i)s.push(e);else if(Array.isArray(e)){if(e instanceof h)return e;s=e}return new h(function(e){for(var t=[],a=0;a<e.length;a+=1)-1===t.indexOf(e[a])&&t.push(e[a]);return t}(s))}m.fn=h.prototype;var g,b,w,y={addClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=v(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).add.apply(t,i)})),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=v(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).remove.apply(t,i)})),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=v(t.map((function(e){return e.split(" ")})));return f(this,(function(e){return i.filter((function(t){return e.classList.contains(t)})).length>0})).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=v(t.map((function(e){return e.split(" ")})));this.forEach((function(e){i.forEach((function(t){e.classList.toggle(t)}))}))},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var a=0;a<this.length;a+=1)if(2===arguments.length)this[a].setAttribute(e,t);else for(var i in e)this[a][i]=e[i],this[a].setAttribute(i,e[i]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?e+"ms":e;return this},on:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=t[0],s=t[1],r=t[2],n=t[3];function l(e){var t=e.target;if(t){var a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),m(t).is(s))r.apply(t,a);else for(var i=m(t).parents(),n=0;n<i.length;n+=1)m(i[n]).is(s)&&r.apply(i[n],a)}}function o(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof t[1]&&(i=t[0],r=t[1],n=t[2],s=void 0),n||(n=!1);for(var d,p=i.split(" "),u=0;u<this.length;u+=1){var c=this[u];if(s)for(d=0;d<p.length;d+=1){var h=p[d];c.dom7LiveListeners||(c.dom7LiveListeners={}),c.dom7LiveListeners[h]||(c.dom7LiveListeners[h]=[]),c.dom7LiveListeners[h].push({listener:r,proxyListener:l}),c.addEventListener(h,l,n)}else for(d=0;d<p.length;d+=1){var v=p[d];c.dom7Listeners||(c.dom7Listeners={}),c.dom7Listeners[v]||(c.dom7Listeners[v]=[]),c.dom7Listeners[v].push({listener:r,proxyListener:o}),c.addEventListener(v,o,n)}}return this},off:function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var i=t[0],s=t[1],r=t[2],n=t[3];"function"==typeof t[1]&&(i=t[0],r=t[1],n=t[2],s=void 0),n||(n=!1);for(var l=i.split(" "),o=0;o<l.length;o+=1)for(var d=l[o],p=0;p<this.length;p+=1){var u=this[p],c=void 0;if(!s&&u.dom7Listeners?c=u.dom7Listeners[d]:s&&u.dom7LiveListeners&&(c=u.dom7LiveListeners[d]),c&&c.length)for(var h=c.length-1;h>=0;h-=1){var v=c[h];r&&v.listener===r||r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(u.removeEventListener(d,v.proxyListener,n),c.splice(h,1)):r||(u.removeEventListener(d,v.proxyListener,n),c.splice(h,1))}}return this},trigger:function(){for(var e=l(),t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];for(var s=a[0].split(" "),r=a[1],n=0;n<s.length;n+=1)for(var o=s[n],d=0;d<this.length;d+=1){var p=this[d];if(e.CustomEvent){var u=new e.CustomEvent(o,{detail:r,bubbles:!0,cancelable:!0});p.dom7EventData=a.filter((function(e,t){return t>0})),p.dispatchEvent(u),p.dom7EventData=[],delete p.dom7EventData}}return this},transitionEnd:function(e){var t=this;return e&&t.on("transitionend",(function a(i){i.target===this&&(e.call(this,i),t.off("transitionend",a))})),this},outerWidth:function(e){if(this.length>0){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(this.length>0){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},styles:function(){var e=l();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var e=l(),t=r(),a=this[0],i=a.getBoundingClientRect(),s=t.body,n=a.clientTop||s.clientTop||0,o=a.clientLeft||s.clientLeft||0,d=a===e?e.scrollY:a.scrollTop,p=a===e?e.scrollX:a.scrollLeft;return{top:i.top+d-n,left:i.left+p-o}}return null},css:function(e,t){var a,i=l();if(1===arguments.length){if("string"!=typeof e){for(a=0;a<this.length;a+=1)for(var s in e)this[a].style[s]=e[s];return this}if(this[0])return i.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(a=0;a<this.length;a+=1)this[a].style[e]=t;return this}return this},each:function(e){return e?(this.forEach((function(t,a){e.apply(t,[t,a])})),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;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=l(),s=r(),n=this[0];if(!n||void 0===e)return!1;if("string"==typeof e){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(t=m(e),a=0;a<t.length;a+=1)if(t[a]===n)return!0;return!1}if(e===s)return n===s;if(e===i)return n===i;if(e.nodeType||e instanceof h){for(t=e.nodeType?[e]:e,a=0;a<t.length;a+=1)if(t[a]===n)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=this.length;if(e>t-1)return m([]);if(e<0){var a=t+e;return m(a<0?[]:[this[a]])}return m([this[e]])},append:function(){for(var e,t=r(),a=0;a<arguments.length;a+=1){e=a<0||arguments.length<=a?void 0:arguments[a];for(var i=0;i<this.length;i+=1)if("string"==typeof e){var s=t.createElement("div");for(s.innerHTML=e;s.firstChild;)this[i].appendChild(s.firstChild)}else if(e instanceof h)for(var n=0;n<e.length;n+=1)this[i].appendChild(e[n]);else this[i].appendChild(e)}return this},prepend:function(e){var t,a,i=r();for(t=0;t<this.length;t+=1)if("string"==typeof e){var s=i.createElement("div");for(s.innerHTML=e,a=s.childNodes.length-1;a>=0;a-=1)this[t].insertBefore(s.childNodes[a],this[t].childNodes[0])}else if(e instanceof h)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 this.length>0?e?this[0].nextElementSibling&&m(this[0].nextElementSibling).is(e)?m([this[0].nextElementSibling]):m([]):this[0].nextElementSibling?m([this[0].nextElementSibling]):m([]):m([])},nextAll:function(e){var t=[],a=this[0];if(!a)return m([]);for(;a.nextElementSibling;){var i=a.nextElementSibling;e?m(i).is(e)&&t.push(i):t.push(i),a=i}return m(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&m(t.previousElementSibling).is(e)?m([t.previousElementSibling]):m([]):t.previousElementSibling?m([t.previousElementSibling]):m([])}return m([])},prevAll:function(e){var t=[],a=this[0];if(!a)return m([]);for(;a.previousElementSibling;){var i=a.previousElementSibling;e?m(i).is(e)&&t.push(i):t.push(i),a=i}return m(t)},parent:function(e){for(var t=[],a=0;a<this.length;a+=1)null!==this[a].parentNode&&(e?m(this[a].parentNode).is(e)&&t.push(this[a].parentNode):t.push(this[a].parentNode));return m(t)},parents:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].parentNode;i;)e?m(i).is(e)&&t.push(i):t.push(i),i=i.parentNode;return m(t)},closest:function(e){var t=this;return void 0===e?m([]):(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 m(t)},children:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var i=this[a].children,s=0;s<i.length;s+=1)e&&!m(i[s]).is(e)||t.push(i[s]);return m(t)},filter:function(e){return m(f(this,e))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function E(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function x(){return Date.now()}function T(e,t){void 0===t&&(t="x");var a,i,s,r=l(),n=function(e){var t,a=l();return a.getComputedStyle&&(t=a.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}(e);return r.WebKitCSSMatrix?((i=n.transform||n.webkitTransform).split(",").length>6&&(i=i.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),s=new r.WebKitCSSMatrix("none"===i?"":i)):a=(s=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=r.WebKitCSSMatrix?s.m41:16===a.length?parseFloat(a[12]):parseFloat(a[4])),"y"===t&&(i=r.WebKitCSSMatrix?s.m42:16===a.length?parseFloat(a[13]):parseFloat(a[5])),i||0}function C(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function S(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function M(){for(var e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"],a=1;a<arguments.length;a+=1){var i=a<0||arguments.length<=a?void 0:arguments[a];if(null!=i&&!S(i))for(var s=Object.keys(Object(i)).filter((function(e){return t.indexOf(e)<0})),r=0,n=s.length;r<n;r+=1){var l=s[r],o=Object.getOwnPropertyDescriptor(i,l);void 0!==o&&o.enumerable&&(C(e[l])&&C(i[l])?i[l].__swiper__?e[l]=i[l]:M(e[l],i[l]):!C(e[l])&&C(i[l])?(e[l]={},i[l].__swiper__?e[l]=i[l]:M(e[l],i[l])):e[l]=i[l])}}return e}function z(e,t){Object.keys(t).forEach((function(a){C(t[a])&&Object.keys(t[a]).forEach((function(i){"function"==typeof t[a][i]&&(t[a][i]=t[a][i].bind(e))})),e[a]=t[a]}))}function P(e){return void 0===e&&(e=""),"."+e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}function k(e,t,a,i){var s=r();return a&&Object.keys(i).forEach((function(a){if(!t[a]&&!0===t.auto){var r=s.createElement("div");r.className=i[a],e.append(r),t[a]=r}})),t}function $(){return g||(g=function(){var e=l(),t=r();return{touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),pointerEvents:!!e.PointerEvent&&"maxTouchPoints"in e.navigator&&e.navigator.maxTouchPoints>=0,observer:"MutationObserver"in e||"WebkitMutationObserver"in e,passiveListener:function(){var t=!1;try{var a=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,a)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),g}function L(e){return void 0===e&&(e={}),b||(b=function(e){var t=(void 0===e?{}:e).userAgent,a=$(),i=l(),s=i.navigator.platform,r=t||i.navigator.userAgent,n={ios:!1,android:!1},o=i.screen.width,d=i.screen.height,p=r.match(/(Android);?[\s\/]+([\d.]+)?/),u=r.match(/(iPad).*OS\s([\d_]+)/),c=r.match(/(iPod)(.*OS\s([\d_]+))?/),h=!u&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),v="Win32"===s,f="MacIntel"===s;return!u&&f&&a.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(o+"x"+d)>=0&&((u=r.match(/(Version)\/([\d.]+)/))||(u=[0,1,"13_0_0"]),f=!1),p&&!v&&(n.os="android",n.android=!0),(u||h||c)&&(n.os="ios",n.ios=!0),n}(e)),b}function I(){return w||(w=function(){var e,t=l();return{isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}()),w}Object.keys(y).forEach((function(e){Object.defineProperty(m.fn,e,{value:y[e],writable:!0})}));var O={name:"resize",create:function(){var e=this;M(e,{resize:{observer:null,createObserver:function(){e&&!e.destroyed&&e.initialized&&(e.resize.observer=new ResizeObserver((function(t){var a=e.width,i=e.height,s=a,r=i;t.forEach((function(t){var a=t.contentBoxSize,i=t.contentRect,n=t.target;n&&n!==e.el||(s=i?i.width:(a[0]||a).inlineSize,r=i?i.height:(a[0]||a).blockSize)})),s===a&&r===i||e.resize.resizeHandler()})),e.resize.observer.observe(e.el))},removeObserver:function(){e.resize.observer&&e.resize.observer.unobserve&&e.el&&(e.resize.observer.unobserve(e.el),e.resize.observer=null)},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(e){var t=l();e.params.resizeObserver&&void 0!==l().ResizeObserver?e.resize.createObserver():(t.addEventListener("resize",e.resize.resizeHandler),t.addEventListener("orientationchange",e.resize.orientationChangeHandler))},destroy:function(e){var t=l();e.resize.removeObserver(),t.removeEventListener("resize",e.resize.resizeHandler),t.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},A={attach:function(e,t){void 0===t&&(t={});var a=l(),i=this,s=new(a.MutationObserver||a.WebkitMutationObserver)((function(e){if(1!==e.length){var t=function(){i.emit("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(t):a.setTimeout(t,0)}else i.emit("observerUpdate",e[0])}));s.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),i.observer.observers.push(s)},init:function(){var e=this;if(e.support.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=[]}},D={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){z(this,{observer:t({},A,{observers:[]})})},on:{init:function(e){e.observer.init()},destroy:function(e){e.observer.destroy()}}};function N(e){var t=this,a=r(),i=l(),s=t.touchEventsData,n=t.params,o=t.touches;if(t.enabled&&(!t.animating||!n.preventInteractionOnTransition)){var d=e;d.originalEvent&&(d=d.originalEvent);var p=m(d.target);if(("wrapper"!==n.touchEventsTarget||p.closest(t.wrapperEl).length)&&(s.isTouchEvent="touchstart"===d.type,(s.isTouchEvent||!("which"in d)||3!==d.which)&&!(!s.isTouchEvent&&"button"in d&&d.button>0||s.isTouched&&s.isMoved))){!!n.noSwipingClass&&""!==n.noSwipingClass&&d.target&&d.target.shadowRoot&&e.path&&e.path[0]&&(p=m(e.path[0]));var u=n.noSwipingSelector?n.noSwipingSelector:"."+n.noSwipingClass,c=!(!d.target||!d.target.shadowRoot);if(n.noSwiping&&(c?function(e,t){return void 0===t&&(t=this),function t(a){return a&&a!==r()&&a!==l()?(a.assignedSlot&&(a=a.assignedSlot),a.closest(e)||t(a.getRootNode().host)):null}(t)}(u,d.target):p.closest(u)[0]))t.allowClick=!0;else if(!n.swipeHandler||p.closest(n.swipeHandler)[0]){o.currentX="touchstart"===d.type?d.targetTouches[0].pageX:d.pageX,o.currentY="touchstart"===d.type?d.targetTouches[0].pageY:d.pageY;var h=o.currentX,v=o.currentY,f=n.edgeSwipeDetection||n.iOSEdgeSwipeDetection,g=n.edgeSwipeThreshold||n.iOSEdgeSwipeThreshold;if(f&&(h<=g||h>=i.innerWidth-g)){if("prevent"!==f)return;e.preventDefault()}if(M(s,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=h,o.startY=v,s.touchStartTime=x(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,n.threshold>0&&(s.allowThresholdMove=!1),"touchstart"!==d.type){var b=!0;p.is(s.focusableElements)&&(b=!1),a.activeElement&&m(a.activeElement).is(s.focusableElements)&&a.activeElement!==p[0]&&a.activeElement.blur();var w=b&&t.allowTouchMove&&n.touchStartPreventDefault;!n.touchStartForcePreventDefault&&!w||p[0].isContentEditable||d.preventDefault()}t.emit("touchStart",d)}}}}function G(e){var t=r(),a=this,i=a.touchEventsData,s=a.params,n=a.touches,l=a.rtlTranslate;if(a.enabled){var o=e;if(o.originalEvent&&(o=o.originalEvent),i.isTouched){if(!i.isTouchEvent||"touchmove"===o.type){var d="touchmove"===o.type&&o.targetTouches&&(o.targetTouches[0]||o.changedTouches[0]),p="touchmove"===o.type?d.pageX:o.pageX,u="touchmove"===o.type?d.pageY:o.pageY;if(o.preventedByNestedSwiper)return n.startX=p,void(n.startY=u);if(!a.allowTouchMove)return a.allowClick=!1,void(i.isTouched&&(M(n,{startX:p,startY:u,currentX:p,currentY:u}),i.touchStartTime=x()));if(i.isTouchEvent&&s.touchReleaseOnEdges&&!s.loop)if(a.isVertical()){if(u<n.startY&&a.translate<=a.maxTranslate()||u>n.startY&&a.translate>=a.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(p<n.startX&&a.translate<=a.maxTranslate()||p>n.startX&&a.translate>=a.minTranslate())return;if(i.isTouchEvent&&t.activeElement&&o.target===t.activeElement&&m(o.target).is(i.focusableElements))return i.isMoved=!0,void(a.allowClick=!1);if(i.allowTouchCallbacks&&a.emit("touchMove",o),!(o.targetTouches&&o.targetTouches.length>1)){n.currentX=p,n.currentY=u;var c=n.currentX-n.startX,h=n.currentY-n.startY;if(!(a.params.threshold&&Math.sqrt(Math.pow(c,2)+Math.pow(h,2))<a.params.threshold)){var v;if(void 0===i.isScrolling)a.isHorizontal()&&n.currentY===n.startY||a.isVertical()&&n.currentX===n.startX?i.isScrolling=!1:c*c+h*h>=25&&(v=180*Math.atan2(Math.abs(h),Math.abs(c))/Math.PI,i.isScrolling=a.isHorizontal()?v>s.touchAngle:90-v>s.touchAngle);if(i.isScrolling&&a.emit("touchMoveOpposite",o),void 0===i.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){a.allowClick=!1,!s.cssMode&&o.cancelable&&o.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&o.stopPropagation(),i.isMoved||(s.loop&&a.loopFix(),i.startTranslate=a.getTranslate(),a.setTransition(0),a.animating&&a.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!s.grabCursor||!0!==a.allowSlideNext&&!0!==a.allowSlidePrev||a.setGrabCursor(!0),a.emit("sliderFirstMove",o)),a.emit("sliderMove",o),i.isMoved=!0;var f=a.isHorizontal()?c:h;n.diff=f,f*=s.touchRatio,l&&(f=-f),a.swipeDirection=f>0?"prev":"next",i.currentTranslate=f+i.startTranslate;var g=!0,b=s.resistanceRatio;if(s.touchReleaseOnEdges&&(b=0),f>0&&i.currentTranslate>a.minTranslate()?(g=!1,s.resistance&&(i.currentTranslate=a.minTranslate()-1+Math.pow(-a.minTranslate()+i.startTranslate+f,b))):f<0&&i.currentTranslate<a.maxTranslate()&&(g=!1,s.resistance&&(i.currentTranslate=a.maxTranslate()+1-Math.pow(a.maxTranslate()-i.startTranslate-f,b))),g&&(o.preventedByNestedSwiper=!0),!a.allowSlideNext&&"next"===a.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!a.allowSlidePrev&&"prev"===a.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),a.allowSlidePrev||a.allowSlideNext||(i.currentTranslate=i.startTranslate),s.threshold>0){if(!(Math.abs(f)>s.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,i.currentTranslate=i.startTranslate,void(n.diff=a.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}s.followFinger&&!s.cssMode&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(a.updateActiveIndex(),a.updateSlidesClasses()),s.freeMode&&(0===i.velocities.length&&i.velocities.push({position:n[a.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:n[a.isHorizontal()?"currentX":"currentY"],time:x()})),a.updateProgress(i.currentTranslate),a.setTranslate(i.currentTranslate))}}}}}else i.startMoving&&i.isScrolling&&a.emit("touchMoveOpposite",o)}}function B(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,l=t.slidesGrid,o=t.snapGrid;if(t.enabled){var 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,u=x(),c=u-a.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(d),t.emit("tap click",d),c<300&&u-a.lastClickTime<300&&t.emit("doubleTap doubleClick",d)),a.lastClickTime=x(),E((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.cssMode)if(i.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length<o.length?t.slideTo(o.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(a.velocities.length>1){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),(m>150||x()-h.time>300)&&(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,T,C=!1,S=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(w<t.maxTranslate())i.freeModeMomentumBounce?(w+t.maxTranslate()<-S&&(w=t.maxTranslate()-S),y=t.maxTranslate(),C=!0,a.allowMomentumBounce=!0):w=t.maxTranslate(),i.loop&&i.centeredSlides&&(T=!0);else if(w>t.minTranslate())i.freeModeMomentumBounce?(w-t.minTranslate()>S&&(w=t.minTranslate()+S),y=t.minTranslate(),C=!0,a.allowMomentumBounce=!0):w=t.minTranslate(),i.loop&&i.centeredSlides&&(T=!0);else if(i.freeModeSticky){for(var M,z=0;z<o.length;z+=1)if(o[z]>-w){M=z;break}w=-(w=Math.abs(o[M]-w)<Math.abs(o[M-1]-w)||"next"===t.swipeDirection?o[M]:o[M-1])}if(T&&t.once("transitionEnd",(function(){t.loopFix()})),0!==t.velocity){if(g=r?Math.abs((-w-t.translate)/t.velocity):Math.abs((w-t.translate)/t.velocity),i.freeModeSticky){var P=Math.abs((r?-w:w)-t.translate),k=t.slidesSizesGrid[t.activeIndex];g=P<k?i.speed:P<2*k?1.5*i.speed:2.5*i.speed}}else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&C?(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),setTimeout((function(){t.setTranslate(y),n.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):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.emit("_freeModeNoMomentumRelease"),t.updateProgress(w)),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(i.freeModeSticky)return void t.slideToClosest();i.freeMode&&t.emit("_freeModeNoMomentumRelease")}(!i.freeModeMomentum||c>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var $=0,L=t.slidesSizesGrid[0],I=0;I<l.length;I+=I<i.slidesPerGroupSkip?1:i.slidesPerGroup){var O=I<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==l[I+O]?p>=l[I]&&p<l[I+O]&&($=I,L=l[I+O]-l[I]):p>=l[I]&&($=I,L=l[l.length-1]-l[l.length-2])}var A=(p-l[$])/L,D=$<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(c>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(A>=i.longSwipesRatio?t.slideTo($+D):t.slideTo($)),"prev"===t.swipeDirection&&(A>1-i.longSwipesRatio?t.slideTo($+D):t.slideTo($))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(d.target===t.navigation.nextEl||d.target===t.navigation.prevEl)?d.target===t.navigation.nextEl?t.slideTo($+D):t.slideTo($):("next"===t.swipeDirection&&t.slideTo($+D),"prev"===t.swipeDirection&&t.slideTo($))}}}}function H(){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;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!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()}}function R(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function X(){var e=this,t=e.wrapperEl,a=e.rtlTranslate;if(e.enabled){e.previousTranslate=e.translate,e.isHorizontal()?e.translate=a?t.scrollWidth-t.offsetWidth-t.scrollLeft:-t.scrollLeft:e.translate=-t.scrollTop,-0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var i=e.maxTranslate()-e.minTranslate();(0===i?0:(e.translate-e.minTranslate())/i)!==e.progress&&e.updateProgress(a?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}}var Y=!1;function V(){}var W={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!1,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,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,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!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:!1,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,loopPreventsSlide:!0,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,_emitClasses:!1},F={modular:{useParams:function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(a){var i=t.modules[a];i.params&&M(e,i.params)}))},useModules:function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(a){var i=t.modules[a],s=e[a]||{};i.on&&t.on&&Object.keys(i.on).forEach((function(e){t.on(e,i.on[e])})),i.create&&i.create.bind(t)(s)}))}},eventsEmitter:{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},once:function(e,t,a){var i=this;if("function"!=typeof t)return i;function s(){i.off(e,s),s.__emitterProxy&&delete s.__emitterProxy;for(var a=arguments.length,r=new Array(a),n=0;n<a;n++)r[n]=arguments[n];t.apply(i,r)}return s.__emitterProxy=t,i.on(e,s,a)},onAny:function(e,t){var a=this;if("function"!=typeof e)return a;var i=t?"unshift":"push";return a.eventsAnyListeners.indexOf(e)<0&&a.eventsAnyListeners[i](e),a},offAny:function(e){var t=this;if(!t.eventsAnyListeners)return t;var a=t.eventsAnyListeners.indexOf(e);return a>=0&&t.eventsAnyListeners.splice(a,1),t},off:function(e,t){var a=this;return a.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?a.eventsListeners[e]=[]:a.eventsListeners[e]&&a.eventsListeners[e].forEach((function(i,s){(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&a.eventsListeners[e].splice(s,1)}))})),a):a},emit:function(){var e,t,a,i=this;if(!i.eventsListeners)return i;for(var s=arguments.length,r=new Array(s),n=0;n<s;n++)r[n]=arguments[n];"string"==typeof r[0]||Array.isArray(r[0])?(e=r[0],t=r.slice(1,r.length),a=i):(e=r[0].events,t=r[0].data,a=r[0].context||i),t.unshift(a);var l=Array.isArray(e)?e:e.split(" ");return l.forEach((function(e){i.eventsAnyListeners&&i.eventsAnyListeners.length&&i.eventsAnyListeners.forEach((function(i){i.apply(a,[e].concat(t))})),i.eventsListeners&&i.eventsListeners[e]&&i.eventsListeners[e].forEach((function(e){e.apply(a,t)}))})),i}},update:{updateSize:function(){var e,t,a=this,i=a.$el;e=void 0!==a.params.width&&null!==a.params.width?a.params.width:i[0].clientWidth,t=void 0!==a.params.height&&null!==a.params.height?a.params.height:i[0].clientHeight,0===e&&a.isHorizontal()||0===t&&a.isVertical()||(e=e-parseInt(i.css("padding-left")||0,10)-parseInt(i.css("padding-right")||0,10),t=t-parseInt(i.css("padding-top")||0,10)-parseInt(i.css("padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),M(a,{width:e,height:t,size:a.isHorizontal()?e:t}))},updateSlides:function(){var e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function a(e,a){return parseFloat(e.getPropertyValue(t(a))||0)}var i=e.params,s=e.$wrapperEl,r=e.size,n=e.rtlTranslate,l=e.wrongRTL,o=e.virtual&&i.virtual.enabled,d=o?e.virtual.slides.length:e.slides.length,p=s.children("."+e.params.slideClass),u=o?e.virtual.slides.length:p.length,c=[],h=[],v=[],f=i.slidesOffsetBefore;"function"==typeof f&&(f=i.slidesOffsetBefore.call(e));var m=i.slidesOffsetAfter;"function"==typeof m&&(m=i.slidesOffsetAfter.call(e));var g=e.snapGrid.length,b=e.slidesGrid.length,w=i.spaceBetween,y=-f,E=0,x=0;if(void 0!==r){var T,C;"string"==typeof w&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*r),e.virtualSize=-w,n?p.css({marginLeft:"",marginBottom:"",marginTop:""}):p.css({marginRight:"",marginBottom:"",marginTop:""}),i.slidesPerColumn>1&&(T=Math.floor(u/i.slidesPerColumn)===u/e.params.slidesPerColumn?u:Math.ceil(u/i.slidesPerColumn)*i.slidesPerColumn,"auto"!==i.slidesPerView&&"row"===i.slidesPerColumnFill&&(T=Math.max(T,i.slidesPerView*i.slidesPerColumn)));for(var S,z,P,k=i.slidesPerColumn,$=T/k,L=Math.floor(u/i.slidesPerColumn),I=0;I<u;I+=1){C=0;var O=p.eq(I);if(i.slidesPerColumn>1){var A=void 0,D=void 0,N=void 0;if("row"===i.slidesPerColumnFill&&i.slidesPerGroup>1){var G=Math.floor(I/(i.slidesPerGroup*i.slidesPerColumn)),B=I-i.slidesPerColumn*i.slidesPerGroup*G,H=0===G?i.slidesPerGroup:Math.min(Math.ceil((u-G*k*i.slidesPerGroup)/k),i.slidesPerGroup);A=(D=B-(N=Math.floor(B/H))*H+G*i.slidesPerGroup)+N*T/k,O.css({"-webkit-box-ordinal-group":A,"-moz-box-ordinal-group":A,"-ms-flex-order":A,"-webkit-order":A,order:A})}else"column"===i.slidesPerColumnFill?(N=I-(D=Math.floor(I/k))*k,(D>L||D===L&&N===k-1)&&(N+=1)>=k&&(N=0,D+=1)):D=I-(N=Math.floor(I/$))*$;O.css(t("margin-top"),0!==N?i.spaceBetween&&i.spaceBetween+"px":"")}if("none"!==O.css("display")){if("auto"===i.slidesPerView){var R=getComputedStyle(O[0]),X=O[0].style.transform,Y=O[0].style.webkitTransform;if(X&&(O[0].style.transform="none"),Y&&(O[0].style.webkitTransform="none"),i.roundLengths)C=e.isHorizontal()?O.outerWidth(!0):O.outerHeight(!0);else{var V=a(R,"width"),W=a(R,"padding-left"),F=a(R,"padding-right"),_=a(R,"margin-left"),q=a(R,"margin-right"),j=R.getPropertyValue("box-sizing");if(j&&"border-box"===j)C=V+_+q;else{var U=O[0],K=U.clientWidth;C=V+W+F+_+q+(U.offsetWidth-K)}}X&&(O[0].style.transform=X),Y&&(O[0].style.webkitTransform=Y),i.roundLengths&&(C=Math.floor(C))}else C=(r-(i.slidesPerView-1)*w)/i.slidesPerView,i.roundLengths&&(C=Math.floor(C)),p[I]&&(p[I].style[t("width")]=C+"px");p[I]&&(p[I].swiperSlideSize=C),v.push(C),i.centeredSlides?(y=y+C/2+E/2+w,0===E&&0!==I&&(y=y-r/2-w),0===I&&(y=y-r/2-w),Math.abs(y)<.001&&(y=0),i.roundLengths&&(y=Math.floor(y)),x%i.slidesPerGroup==0&&c.push(y),h.push(y)):(i.roundLengths&&(y=Math.floor(y)),(x-Math.min(e.params.slidesPerGroupSkip,x))%e.params.slidesPerGroup==0&&c.push(y),h.push(y),y=y+C+w),e.virtualSize+=C+w,E=C,x+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+m,n&&l&&("slide"===i.effect||"coverflow"===i.effect)&&s.css({width:e.virtualSize+i.spaceBetween+"px"}),i.setWrapperSize)s.css(((z={})[t("width")]=e.virtualSize+i.spaceBetween+"px",z));if(i.slidesPerColumn>1)if(e.virtualSize=(C+i.spaceBetween)*T,e.virtualSize=Math.ceil(e.virtualSize/i.slidesPerColumn)-i.spaceBetween,s.css(((P={})[t("width")]=e.virtualSize+i.spaceBetween+"px",P)),i.centeredSlides){S=[];for(var Z=0;Z<c.length;Z+=1){var J=c[Z];i.roundLengths&&(J=Math.floor(J)),c[Z]<e.virtualSize+c[0]&&S.push(J)}c=S}if(!i.centeredSlides){S=[];for(var Q=0;Q<c.length;Q+=1){var ee=c[Q];i.roundLengths&&(ee=Math.floor(ee)),c[Q]<=e.virtualSize-r&&S.push(ee)}c=S,Math.floor(e.virtualSize-r)-Math.floor(c[c.length-1])>1&&c.push(e.virtualSize-r)}if(0===c.length&&(c=[0]),0!==i.spaceBetween){var te,ae=e.isHorizontal()&&n?"marginLeft":t("marginRight");p.filter((function(e,t){return!i.cssMode||t!==p.length-1})).css(((te={})[ae]=w+"px",te))}if(i.centeredSlides&&i.centeredSlidesBounds){var ie=0;v.forEach((function(e){ie+=e+(i.spaceBetween?i.spaceBetween:0)}));var se=(ie-=i.spaceBetween)-r;c=c.map((function(e){return e<0?-f:e>se?se+m:e}))}if(i.centerInsufficientSlides){var re=0;if(v.forEach((function(e){re+=e+(i.spaceBetween?i.spaceBetween:0)})),(re-=i.spaceBetween)<r){var ne=(r-re)/2;c.forEach((function(e,t){c[t]=e-ne})),h.forEach((function(e,t){h[t]=e+ne}))}}M(e,{slides:p,snapGrid:c,slidesGrid:h,slidesSizesGrid:v}),u!==d&&e.emit("slidesLengthChange"),c.length!==g&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),(i.watchSlidesProgress||i.watchSlidesVisibility)&&e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,a=this,i=[],s=a.virtual&&a.params.virtual.enabled,r=0;"number"==typeof e?a.setTransition(e):!0===e&&a.setTransition(a.params.speed);var n=function(e){return s?a.slides.filter((function(t){return parseInt(t.getAttribute("data-swiper-slide-index"),10)===e}))[0]:a.slides.eq(e)[0]};if("auto"!==a.params.slidesPerView&&a.params.slidesPerView>1)if(a.params.centeredSlides)a.visibleSlides.each((function(e){i.push(e)}));else for(t=0;t<Math.ceil(a.params.slidesPerView);t+=1){var l=a.activeIndex+t;if(l>a.slides.length&&!s)break;i.push(n(l))}else i.push(n(a.activeIndex));for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var o=i[t].offsetHeight;r=o>r?o:r}r&&a.$wrapperEl.css("height",r+"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 l=i[n],o=(r+(a.centeredSlides?t.minTranslate():0)-l.swiperSlideOffset)/(l.swiperSlideSize+a.spaceBetween);if(a.watchSlidesVisibility||a.centeredSlides&&a.autoHeight){var d=-(r-l.swiperSlideOffset),p=d+t.slidesSizesGrid[n];(d>=0&&d<t.size-1||p>1&&p<=t.size||d<=0&&p>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(n),i.eq(n).addClass(a.slideVisibleClass))}l.progress=s?-o:o}t.visibleSlides=m(t.visibleSlides)}},updateProgress:function(e){var t=this;if(void 0===e){var a=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*a||0}var i=t.params,s=t.maxTranslate()-t.minTranslate(),r=t.progress,n=t.isBeginning,l=t.isEnd,o=n,d=l;0===s?(r=0,n=!0,l=!0):(n=(r=(e-t.minTranslate())/s)<=0,l=r>=1),M(t,{progress:r,isBeginning:n,isEnd:l}),(i.watchSlidesProgress||i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),n&&!o&&t.emit("reachBeginning toEdge"),l&&!d&&t.emit("reachEnd toEdge"),(o&&!n||d&&!l)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,l=t.virtual&&i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=l?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 o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=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&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.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)),t.emitSlidesClasses()},updateActiveIndex:function(e){var t,a=this,i=a.rtlTranslate?a.translate:-a.translate,s=a.slidesGrid,r=a.snapGrid,n=a.params,l=a.activeIndex,o=a.realIndex,d=a.snapIndex,p=e;if(void 0===p){for(var u=0;u<s.length;u+=1)void 0!==s[u+1]?i>=s[u]&&i<s[u+1]-(s[u+1]-s[u])/2?p=u:i>=s[u]&&i<s[u+1]&&(p=u+1):i>=s[u]&&(p=u);n.normalizeSlideIndex&&(p<0||void 0===p)&&(p=0)}if(r.indexOf(i)>=0)t=r.indexOf(i);else{var c=Math.min(n.slidesPerGroupSkip,p);t=c+Math.floor((p-c)/n.slidesPerGroup)}if(t>=r.length&&(t=r.length-1),p!==l){var h=parseInt(a.slides.eq(p).attr("data-swiper-slide-index")||p,10);M(a,{snapIndex:t,realIndex:h,previousIndex:l,activeIndex:p}),a.emit("activeIndexChange"),a.emit("snapIndexChange"),o!==h&&a.emit("realIndexChange"),(a.initialized||a.params.runCallbacksOnInit)&&a.emit("slideChange")}else t!==d&&(a.snapIndex=t,a.emit("snapIndexChange"))},updateClickedSlide:function(e){var t,a=this,i=a.params,s=m(e.target).closest("."+i.slideClass)[0],r=!1;if(s)for(var n=0;n<a.slides.length;n+=1)if(a.slides[n]===s){r=!0,t=n;break}if(!s||!r)return a.clickedSlide=void 0,void(a.clickedIndex=void 0);a.clickedSlide=s,a.virtual&&a.params.virtual.enabled?a.clickedIndex=parseInt(m(s).attr("data-swiper-slide-index"),10):a.clickedIndex=t,i.slideToClickedSlide&&void 0!==a.clickedIndex&&a.clickedIndex!==a.activeIndex&&a.slideToClickedSlide()}},translate:{getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this,a=t.params,i=t.rtlTranslate,s=t.translate,r=t.$wrapperEl;if(a.virtualTranslate)return i?-s:s;if(a.cssMode)return s;var n=T(r[0],e);return i&&(n=-n),n||0},setTranslate:function(e,t){var a=this,i=a.rtlTranslate,s=a.params,r=a.$wrapperEl,n=a.wrapperEl,l=a.progress,o=0,d=0;a.isHorizontal()?o=i?-e:e:d=e,s.roundLengths&&(o=Math.floor(o),d=Math.floor(d)),s.cssMode?n[a.isHorizontal()?"scrollLeft":"scrollTop"]=a.isHorizontal()?-o:-d:s.virtualTranslate||r.transform("translate3d("+o+"px, "+d+"px, 0px)"),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?o:d;var p=a.maxTranslate()-a.minTranslate();(0===p?0:(e-a.minTranslate())/p)!==l&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,a,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0),void 0===i&&(i=!0);var r=this,n=r.params,l=r.wrapperEl;if(r.animating&&n.preventInteractionOnTransition)return!1;var o,d=r.minTranslate(),p=r.maxTranslate();if(o=i&&e>d?d:i&&e<p?p:e,r.updateProgress(o),n.cssMode){var u,c=r.isHorizontal();if(0===t)l[c?"scrollLeft":"scrollTop"]=-o;else if(l.scrollTo)l.scrollTo(((u={})[c?"left":"top"]=-o,u.behavior="smooth",u));else l[c?"scrollLeft":"scrollTop"]=-o;return!0}return 0===t?(r.setTransition(0),r.setTranslate(o),a&&(r.emit("beforeTransitionStart",t,s),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(o),a&&(r.emit("beforeTransitionStart",t,s),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,a&&r.emit("transitionEnd"))}),r.$wrapperEl[0].addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){var a=this;a.params.cssMode||a.$wrapperEl.transition(e),a.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;if(!s.cssMode){s.autoHeight&&a.updateAutoHeight();var n=t;if(n||(n=i>r?"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,r=a.params;if(a.animating=!1,!r.cssMode){a.setTransition(0);var n=t;if(n||(n=i>s?"next":i<s?"prev":"reset"),a.emit("transitionEnd"),e&&i!==s){if("reset"===n)return void a.emit("slideResetTransitionEnd");a.emit("slideChangeTransitionEnd"),"next"===n?a.emit("slideNextTransitionEnd"):a.emit("slidePrevTransitionEnd")}}}},slide:{slideTo:function(e,t,a,i,s){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0),"number"!=typeof e&&"string"!=typeof e)throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. ["+typeof e+"] given.");if("string"==typeof e){var r=parseInt(e,10);if(!isFinite(r))throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. ["+e+"] given.");e=r}var n=this,l=e;l<0&&(l=0);var o=n.params,d=n.snapGrid,p=n.slidesGrid,u=n.previousIndex,c=n.activeIndex,h=n.rtlTranslate,v=n.wrapperEl,f=n.enabled;if(n.animating&&o.preventInteractionOnTransition||!f&&!i&&!s)return!1;var m=Math.min(n.params.slidesPerGroupSkip,l),g=m+Math.floor((l-m)/n.params.slidesPerGroup);g>=d.length&&(g=d.length-1),(c||o.initialSlide||0)===(u||0)&&a&&n.emit("beforeSlideChangeStart");var b,w=-d[g];if(n.updateProgress(w),o.normalizeSlideIndex)for(var y=0;y<p.length;y+=1){var E=-Math.floor(100*w),x=Math.floor(100*p[y]),T=Math.floor(100*p[y+1]);void 0!==p[y+1]?E>=x&&E<T-(T-x)/2?l=y:E>=x&&E<T&&(l=y+1):E>=x&&(l=y)}if(n.initialized&&l!==c){if(!n.allowSlideNext&&w<n.translate&&w<n.minTranslate())return!1;if(!n.allowSlidePrev&&w>n.translate&&w>n.maxTranslate()&&(c||0)!==l)return!1}if(b=l>c?"next":l<c?"prev":"reset",h&&-w===n.translate||!h&&w===n.translate)return n.updateActiveIndex(l),o.autoHeight&&n.updateAutoHeight(),n.updateSlidesClasses(),"slide"!==o.effect&&n.setTranslate(w),"reset"!==b&&(n.transitionStart(a,b),n.transitionEnd(a,b)),!1;if(o.cssMode){var C,S=n.isHorizontal(),M=-w;if(h&&(M=v.scrollWidth-v.offsetWidth-M),0===t)v[S?"scrollLeft":"scrollTop"]=M;else if(v.scrollTo)v.scrollTo(((C={})[S?"left":"top"]=M,C.behavior="smooth",C));else v[S?"scrollLeft":"scrollTop"]=M;return!0}return 0===t?(n.setTransition(0),n.setTranslate(w),n.updateActiveIndex(l),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,i),n.transitionStart(a,b),n.transitionEnd(a,b)):(n.setTransition(t),n.setTranslate(w),n.updateActiveIndex(l),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,i),n.transitionStart(a,b),n.animating||(n.animating=!0,n.onSlideToWrapperTransitionEnd||(n.onSlideToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.$wrapperEl[0].removeEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].removeEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd),n.onSlideToWrapperTransitionEnd=null,delete n.onSlideToWrapperTransitionEnd,n.transitionEnd(a,b))}),n.$wrapperEl[0].addEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].addEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd))),!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=this,r=e;return s.params.loop&&(r+=s.loopedSlides),s.slideTo(r,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;if(!i.enabled)return i;var n=i.activeIndex<s.slidesPerGroupSkip?1:s.slidesPerGroup;if(s.loop){if(r&&s.loopPreventsSlide)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}return i.slideTo(i.activeIndex+n,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,l=i.slidesGrid,o=i.rtlTranslate;if(!i.enabled)return i;if(s.loop){if(r&&s.loopPreventsSlide)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,u=d(o?i.translate:-i.translate),c=n.map((function(e){return d(e)})),h=n[c.indexOf(u)-1];return void 0===h&&s.cssMode&&n.forEach((function(e){!h&&u>=e&&(h=e)})),void 0!==h&&(p=l.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,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===i&&(i=.5);var s=this,r=s.activeIndex,n=Math.min(s.params.slidesPerGroupSkip,r),l=n+Math.floor((r-n)/s.params.slidesPerGroup),o=s.rtlTranslate?s.translate:-s.translate;if(o>=s.snapGrid[l]){var d=s.snapGrid[l];o-d>(s.snapGrid[l+1]-d)*i&&(r+=s.params.slidesPerGroup)}else{var p=s.snapGrid[l-1];o-p<=(s.snapGrid[l]-p)*i&&(r-=s.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,s.slidesGrid.length-1),s.slideTo(r,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(m(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(),E((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(),E((function(){t.slideTo(r)}))):t.slideTo(r)}else t.slideTo(r)}},loop:{loopCreate:function(){var e=this,t=r(),a=e.params,i=e.$wrapperEl;i.children("."+a.slideClass+"."+a.slideDuplicateClass).remove();var s=i.children("."+a.slideClass);if(a.loopFillGroupWithBlank){var n=a.slidesPerGroup-s.length%a.slidesPerGroup;if(n!==a.slidesPerGroup){for(var l=0;l<n;l+=1){var o=m(t.createElement("div")).addClass(a.slideClass+" "+a.slideBlankClass);i.append(o)}s=i.children("."+a.slideClass)}}"auto"!==a.slidesPerView||a.loopedSlides||(a.loopedSlides=s.length),e.loopedSlides=Math.ceil(parseFloat(a.loopedSlides||a.slidesPerView,10)),e.loopedSlides+=a.loopAdditionalSlides,e.loopedSlides>s.length&&(e.loopedSlides=s.length);var d=[],p=[];s.each((function(t,a){var i=m(t);a<e.loopedSlides&&p.push(t),a<s.length&&a>=s.length-e.loopedSlides&&d.push(t),i.attr("data-swiper-slide-index",a)}));for(var u=0;u<p.length;u+=1)i.append(m(p[u].cloneNode(!0)).addClass(a.slideDuplicateClass));for(var c=d.length-1;c>=0;c-=1)i.prepend(m(d[c].cloneNode(!0)).addClass(a.slideDuplicateClass))},loopFix:function(){var e=this;e.emit("beforeLoopFix");var t,a=e.activeIndex,i=e.slides,s=e.loopedSlides,r=e.allowSlidePrev,n=e.allowSlideNext,l=e.snapGrid,o=e.rtlTranslate;e.allowSlidePrev=!0,e.allowSlideNext=!0;var d=-l[a]-e.getTranslate();if(a<s)t=i.length-3*s+a,t+=s,e.slideTo(t,0,!1,!0)&&0!==d&&e.setTranslate((o?-e.translate:e.translate)-d);else if(a>=i.length-s){t=-i.length+a+s,t+=s,e.slideTo(t,0,!1,!0)&&0!==d&&e.setTranslate((o?-e.translate:e.translate)-d)}e.allowSlidePrev=r,e.allowSlideNext=n,e.emit("loopFix")},loopDestroy:function(){var e=this,t=e.$wrapperEl,a=e.params,i=e.slides;t.children("."+a.slideClass+"."+a.slideDuplicateClass+",."+a.slideClass+"."+a.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){var t=this;if(!(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var a=t.el;a.style.cursor="move",a.style.cursor=e?"-webkit-grabbing":"-webkit-grab",a.style.cursor=e?"-moz-grabbin":"-moz-grab",a.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){var e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.el.style.cursor="")}},manipulation:{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&&t.support.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&&t.support.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(e>=n)a.appendSlide(t);else{for(var l=r>e?r+1:r,o=[],d=n-1;d>=e;d-=1){var p=a.slides.eq(d);p.remove(),o.unshift(p)}if("object"==typeof t&&"length"in t){for(var u=0;u<t.length;u+=1)t[u]&&i.append(t[u]);l=r>e?r+t.length:r}else i.append(t);for(var c=0;c<o.length;c+=1)i.append(o[c]);s.loop&&a.loopCreate(),s.observer&&a.support.observer||a.update(),s.loop?a.slideTo(l+a.loopedSlides,0,!1):a.slideTo(l,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 l=0;l<e.length;l+=1)r=e[l],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&&t.support.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)}},events:{attachEvents:function(){var e=this,t=r(),a=e.params,i=e.touchEvents,s=e.el,n=e.wrapperEl,l=e.device,o=e.support;e.onTouchStart=N.bind(e),e.onTouchMove=G.bind(e),e.onTouchEnd=B.bind(e),a.cssMode&&(e.onScroll=X.bind(e)),e.onClick=R.bind(e);var d=!!a.nested;if(!o.touch&&o.pointerEvents)s.addEventListener(i.start,e.onTouchStart,!1),t.addEventListener(i.move,e.onTouchMove,d),t.addEventListener(i.end,e.onTouchEnd,!1);else{if(o.touch){var p=!("touchstart"!==i.start||!o.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};s.addEventListener(i.start,e.onTouchStart,p),s.addEventListener(i.move,e.onTouchMove,o.passiveListener?{passive:!1,capture:d}:d),s.addEventListener(i.end,e.onTouchEnd,p),i.cancel&&s.addEventListener(i.cancel,e.onTouchEnd,p),Y||(t.addEventListener("touchstart",V),Y=!0)}(a.simulateTouch&&!l.ios&&!l.android||a.simulateTouch&&!o.touch&&l.ios)&&(s.addEventListener("mousedown",e.onTouchStart,!1),t.addEventListener("mousemove",e.onTouchMove,d),t.addEventListener("mouseup",e.onTouchEnd,!1))}(a.preventClicks||a.preventClicksPropagation)&&s.addEventListener("click",e.onClick,!0),a.cssMode&&n.addEventListener("scroll",e.onScroll),a.updateOnWindowResize?e.on(l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",H,!0):e.on("observerUpdate",H,!0)},detachEvents:function(){var e=this,t=r(),a=e.params,i=e.touchEvents,s=e.el,n=e.wrapperEl,l=e.device,o=e.support,d=!!a.nested;if(!o.touch&&o.pointerEvents)s.removeEventListener(i.start,e.onTouchStart,!1),t.removeEventListener(i.move,e.onTouchMove,d),t.removeEventListener(i.end,e.onTouchEnd,!1);else{if(o.touch){var p=!("onTouchStart"!==i.start||!o.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};s.removeEventListener(i.start,e.onTouchStart,p),s.removeEventListener(i.move,e.onTouchMove,d),s.removeEventListener(i.end,e.onTouchEnd,p),i.cancel&&s.removeEventListener(i.cancel,e.onTouchEnd,p)}(a.simulateTouch&&!l.ios&&!l.android||a.simulateTouch&&!o.touch&&l.ios)&&(s.removeEventListener("mousedown",e.onTouchStart,!1),t.removeEventListener("mousemove",e.onTouchMove,d),t.removeEventListener("mouseup",e.onTouchEnd,!1))}(a.preventClicks||a.preventClicksPropagation)&&s.removeEventListener("click",e.onClick,!0),a.cssMode&&n.removeEventListener("scroll",e.onScroll),e.off(l.ios||l.android?"resize orientationchange observerUpdate":"resize observerUpdate",H)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,a=e.initialized,i=e.loopedSlides,s=void 0===i?0:i,r=e.params,n=e.$el,l=r.breakpoints;if(l&&(!l||0!==Object.keys(l).length)){var o=e.getBreakpoint(l,e.params.breakpointsBase,e.el);if(o&&e.currentBreakpoint!==o){var d=o in l?l[o]:void 0;d&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=d[e];void 0!==t&&(d[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var p=d||e.originalParams,u=r.slidesPerColumn>1,c=p.slidesPerColumn>1,h=r.enabled;u&&!c?(n.removeClass(r.containerModifierClass+"multirow "+r.containerModifierClass+"multirow-column"),e.emitContainerClasses()):!u&&c&&(n.addClass(r.containerModifierClass+"multirow"),(p.slidesPerColumnFill&&"column"===p.slidesPerColumnFill||!p.slidesPerColumnFill&&"column"===r.slidesPerColumnFill)&&n.addClass(r.containerModifierClass+"multirow-column"),e.emitContainerClasses());var v=p.direction&&p.direction!==r.direction,f=r.loop&&(p.slidesPerView!==r.slidesPerView||v);v&&a&&e.changeDirection(),M(e.params,p);var m=e.params.enabled;M(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),h&&!m?e.disable():!h&&m&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",p),f&&a&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-s+e.loopedSlides,0,!1)),e.emit("breakpoint",p)}}},getBreakpoint:function(e,t,a){if(void 0===t&&(t="window"),e&&("container"!==t||a)){var i=!1,s=l(),r="window"===t?s.innerHeight:a.clientHeight,n=Object.keys(e).map((function(e){if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));n.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var o=0;o<n.length;o+=1){var d=n[o],p=d.point,u=d.value;"window"===t?s.matchMedia("(min-width: "+u+"px)").matches&&(i=p):u<=a.clientWidth&&(i=p)}return i||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.params,a=e.isLocked,i=e.slides.length>0&&t.slidesOffsetBefore+t.spaceBetween*(e.slides.length-1)+e.slides[0].offsetWidth*e.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&i?e.isLocked=i<=e.size:e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,a!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),a&&a!==e.isLocked&&(e.isEnd=!1,e.navigation&&e.navigation.update())}},classes:{addClasses:function(){var e,t,a,i=this,s=i.classNames,r=i.params,n=i.rtl,l=i.$el,o=i.device,d=i.support,p=(e=["initialized",r.direction,{"pointer-events":d.pointerEvents&&!d.touch},{"free-mode":r.freeMode},{autoheight:r.autoHeight},{rtl:n},{multirow:r.slidesPerColumn>1},{"multirow-column":r.slidesPerColumn>1&&"column"===r.slidesPerColumnFill},{android:o.android},{ios:o.ios},{"css-mode":r.cssMode}],t=r.containerModifierClass,a=[],e.forEach((function(e){"object"==typeof e?Object.keys(e).forEach((function(i){e[i]&&a.push(t+i)})):"string"==typeof e&&a.push(t+e)})),a);s.push.apply(s,p),l.addClass([].concat(s).join(" ")),i.emitContainerClasses()},removeClasses:function(){var e=this,t=e.$el,a=e.classNames;t.removeClass(a.join(" ")),e.emitContainerClasses()}},images:{loadImage:function(e,t,a,i,s,r){var n,o=l();function d(){r&&r()}m(e).parent("picture")[0]||e.complete&&s?d():t?((n=new o.Image).onload=d,n.onerror=d,i&&(n.sizes=i),a&&(n.srcset=a),t&&(n.src=t)):d()},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)}}}},_={},q=function(){function t(){for(var e,a,i=arguments.length,s=new Array(i),r=0;r<i;r++)s[r]=arguments[r];if(1===s.length&&s[0].constructor&&"Object"===Object.prototype.toString.call(s[0]).slice(8,-1)?a=s[0]:(e=s[0],a=s[1]),a||(a={}),a=M({},a),e&&!a.el&&(a.el=e),a.el&&m(a.el).length>1){var n=[];return m(a.el).each((function(e){var i=M({},a,{el:e});n.push(new t(i))})),n}var l=this;l.__swiper__=!0,l.support=$(),l.device=L({userAgent:a.userAgent}),l.browser=I(),l.eventsListeners={},l.eventsAnyListeners=[],void 0===l.modules&&(l.modules={}),Object.keys(l.modules).forEach((function(e){var t=l.modules[e];if(t.params){var i=Object.keys(t.params)[0],s=t.params[i];if("object"!=typeof s||null===s)return;if(["navigation","pagination","scrollbar"].indexOf(i)>=0&&!0===a[i]&&(a[i]={auto:!0}),!(i in a)||!("enabled"in s))return;!0===a[i]&&(a[i]={enabled:!0}),"object"!=typeof a[i]||"enabled"in a[i]||(a[i].enabled=!0),a[i]||(a[i]={enabled:!1})}}));var o,d,p=M({},W);return l.useParams(p),l.params=M({},p,_,a),l.originalParams=M({},l.params),l.passedParams=M({},a),l.params&&l.params.on&&Object.keys(l.params.on).forEach((function(e){l.on(e,l.params.on[e])})),l.params&&l.params.onAny&&l.onAny(l.params.onAny),l.$=m,M(l,{enabled:l.params.enabled,el:e,classNames:[],slides:m(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===l.params.direction},isVertical:function(){return"vertical"===l.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEvents:(o=["touchstart","touchmove","touchend","touchcancel"],d=["mousedown","mousemove","mouseup"],l.support.pointerEvents&&(d=["pointerdown","pointermove","pointerup"]),l.touchEventsTouch={start:o[0],move:o[1],end:o[2],cancel:o[3]},l.touchEventsDesktop={start:d[0],move:d[1],end:d[2]},l.support.touch||!l.params.simulateTouch?l.touchEventsTouch:l.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,focusableElements:l.params.focusableElements,lastClickTime:x(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.useModules(),l.emit("_swiper"),l.params.init&&l.init(),l}var a,i,s,n=t.prototype;return n.enable=function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))},n.disable=function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))},n.setProgress=function(e,t){var a=this;e=Math.min(Math.max(e,0),1);var i=a.minTranslate(),s=(a.maxTranslate()-i)*e+i;a.translateTo(s,void 0===t?0:t),a.updateActiveIndex(),a.updateSlidesClasses()},n.emitContainerClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-container")||0===t.indexOf(e.params.containerModifierClass)}));e.emit("_containerClasses",t.join(" "))}},n.getSlideClasses=function(e){var t=this;return e.className.split(" ").filter((function(e){return 0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)})).join(" ")},n.emitSlidesClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.each((function(a){var i=e.getSlideClasses(a);t.push({slideEl:a,classNames:i}),e.emit("_slideClass",a,i)})),e.emit("_slideClasses",t)}},n.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 l,o=a[r].swiperSlideSize,d=r+1;d<a.length;d+=1)a[d]&&!l&&(n+=1,(o+=a[d].swiperSlideSize)>s&&(l=!0));for(var p=r-1;p>=0;p-=1)a[p]&&!l&&(n+=1,(o+=a[p].swiperSlideSize)>s&&(l=!0))}else for(var u=r+1;u<a.length;u+=1)i[u]-i[r]<s&&(n+=1);return n},n.update=function(){var e=this;if(e&&!e.destroyed){var t=e.snapGrid,a=e.params;a.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(i(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||i(),a.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function i(){var t=e.rtlTranslate?-1*e.translate:e.translate,a=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(a),e.updateActiveIndex(),e.updateSlidesClasses()}},n.changeDirection=function(e,t){void 0===t&&(t=!0);var a=this,i=a.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(a.$el.removeClass(""+a.params.containerModifierClass+i).addClass(""+a.params.containerModifierClass+e),a.emitContainerClasses(),a.params.direction=e,a.slides.each((function(t){"vertical"===e?t.style.width="":t.style.height=""})),a.emit("changeDirection"),t&&a.update()),a},n.mount=function(e){var t=this;if(t.mounted)return!0;var a=m(e||t.params.el);if(!(e=a[0]))return!1;e.swiper=t;var i=function(){return"."+(t.params.wrapperClass||"").trim().split(" ").join(".")},s=function(){if(e&&e.shadowRoot&&e.shadowRoot.querySelector){var t=m(e.shadowRoot.querySelector(i()));return t.children=function(e){return a.children(e)},t}return a.children(i())}();if(0===s.length&&t.params.createElements){var n=r().createElement("div");s=m(n),n.className=t.params.wrapperClass,a.append(n),a.children("."+t.params.slideClass).each((function(e){s.append(e)}))}return M(t,{$el:a,el:e,$wrapperEl:s,wrapperEl:s[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===a.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===a.css("direction")),wrongRTL:"-webkit-box"===s.css("display")}),!0},n.init=function(e){var t=this;return t.initialized||!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t},n.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var a,i=this,s=i.params,r=i.$el,n=i.$wrapperEl,l=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),r.removeAttr("style"),n.removeAttr("style"),l&&l.length&&l.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,a=i,Object.keys(a).forEach((function(e){try{a[e]=null}catch(e){}try{delete a[e]}catch(e){}}))),i.destroyed=!0),null},t.extendDefaults=function(e){M(_,e)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var a=e.name||Object.keys(t.prototype.modules).length+"_"+x();t.prototype.modules[a]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},a=t,s=[{key:"extendedDefaults",get:function(){return _}},{key:"defaults",get:function(){return W}}],(i=null)&&e(a.prototype,i),s&&e(a,s),t}();Object.keys(F).forEach((function(e){Object.keys(F[e]).forEach((function(t){q.prototype[t]=F[e][t]}))})),q.use([O,D]);var j={update:function(e){var t=this,a=t.params,i=a.slidesPerView,s=a.slidesPerGroup,r=a.centeredSlides,n=t.params.virtual,l=n.addSlidesBefore,o=n.addSlidesAfter,d=t.virtual,p=d.from,u=d.to,c=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",r?(g=Math.floor(i/2)+s+o,b=Math.floor(i/2)+s+l):(g=i+(s-1)+o,b=s+l);var y=Math.max((w||0)-b,0),E=Math.min((w||0)+g,c.length-1),x=(t.slidesGrid[y]||0)-(t.slidesGrid[0]||0);function T(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(M(t.virtual,{from:y,to:E,offset:x,slidesGrid:t.slidesGrid}),p===y&&u===E&&!e)return t.slidesGrid!==h&&x!==f&&t.slides.css(m,x+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:x,from:y,to:E,slides:function(){for(var e=[],t=y;t<=E;t+=1)e.push(c[t]);return e}()}),void(t.params.virtual.renderExternalUpdate&&T());var C=[],S=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var z=p;z<=u;z+=1)(z<y||z>E)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+z+'"]').remove();for(var P=0;P<c.length;P+=1)P>=y&&P<=E&&(void 0===u||e?S.push(P):(P>u&&S.push(P),P<p&&C.push(P)));S.forEach((function(e){t.$wrapperEl.append(v(c[e],e))})),C.sort((function(e,t){return t-e})).forEach((function(e){t.$wrapperEl.prepend(v(c[e],e))})),t.$wrapperEl.children(".swiper-slide").css(m,x+"px"),T()},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?m(i.renderSlide.call(a,e,t)):m('<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){var t=this;if("object"==typeof e&&"length"in e)for(var a=0;a<e.length;a+=1)e[a]&&t.virtual.slides.push(e[a]);else t.virtual.slides.push(e);t.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,l={};Object.keys(n).forEach((function(e){var t=n[e],a=t.attr("data-swiper-slide-index");a&&t.attr("data-swiper-slide-index",parseInt(a,10)+1),l[parseInt(e,10)+s]=t})),t.virtual.cache=l}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;i>=0;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)}},U={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}},create:function(){z(this,{virtual:t({},j,{slides:this.params.virtual.slides,cache:{}})})},on:{beforeInit:function(e){if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};M(e.params,t),M(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(e){e.params.virtual.enabled&&e.virtual.update()}}},K={handle:function(e){var t=this;if(t.enabled){var a=l(),i=r(),s=t.rtlTranslate,n=e;n.originalEvent&&(n=n.originalEvent);var o=n.keyCode||n.charCode,d=t.params.keyboard.pageUpDown,p=d&&33===o,u=d&&34===o,c=37===o,h=39===o,v=38===o,f=40===o;if(!t.allowSlideNext&&(t.isHorizontal()&&h||t.isVertical()&&f||u))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&c||t.isVertical()&&v||p))return!1;if(!(n.shiftKey||n.altKey||n.ctrlKey||n.metaKey||i.activeElement&&i.activeElement.nodeName&&("input"===i.activeElement.nodeName.toLowerCase()||"textarea"===i.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(p||u||c||h||v||f)){var m=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var g=t.$el,b=g[0].clientWidth,w=g[0].clientHeight,y=a.innerWidth,E=a.innerHeight,x=t.$el.offset();s&&(x.left-=t.$el[0].scrollLeft);for(var T=[[x.left,x.top],[x.left+b,x.top],[x.left,x.top+w],[x.left+b,x.top+w]],C=0;C<T.length;C+=1){var S=T[C];if(S[0]>=0&&S[0]<=y&&S[1]>=0&&S[1]<=E){if(0===S[0]&&0===S[1])continue;m=!0}}if(!m)return}t.isHorizontal()?((p||u||c||h)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),((u||h)&&!s||(p||c)&&s)&&t.slideNext(),((p||c)&&!s||(u||h)&&s)&&t.slidePrev()):((p||u||v||f)&&(n.preventDefault?n.preventDefault():n.returnValue=!1),(u||f)&&t.slideNext(),(p||v)&&t.slidePrev()),t.emit("keyPress",o)}}},enable:function(){var e=this,t=r();e.keyboard.enabled||(m(t).on("keydown",e.keyboard.handle),e.keyboard.enabled=!0)},disable:function(){var e=this,t=r();e.keyboard.enabled&&(m(t).off("keydown",e.keyboard.handle),e.keyboard.enabled=!1)}},Z={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){z(this,{keyboard:t({enabled:!1},K)})},on:{init:function(e){e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(e){e.keyboard.enabled&&e.keyboard.disable()}}};var J={lastScrollTime:x(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return l().navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e=r(),t="onwheel",a=t in e;if(!a){var i=e.createElement("div");i.setAttribute(t,"return;"),a="function"==typeof i.onwheel}return!a&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(a=e.implementation.hasFeature("Events.wheel","3.0")),a}()?"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),e.shiftKey&&!i&&(i=s,s=0),(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.enabled&&(this.mouseEntered=!0)},handleMouseLeave:function(){this.enabled&&(this.mouseEntered=!1)},handle:function(e){var t=e,a=this;if(a.enabled){var i=a.params.mousewheel;a.params.cssMode&&t.preventDefault();var s=a.$el;if("container"!==a.params.mousewheel.eventsTarget&&(s=m(a.params.mousewheel.eventsTarget)),!a.mouseEntered&&!s[0].contains(t.target)&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var r=0,n=a.rtlTranslate?-1:1,l=J.normalize(t);if(i.forceToAxis)if(a.isHorizontal()){if(!(Math.abs(l.pixelX)>Math.abs(l.pixelY)))return!0;r=-l.pixelX*n}else{if(!(Math.abs(l.pixelY)>Math.abs(l.pixelX)))return!0;r=-l.pixelY}else r=Math.abs(l.pixelX)>Math.abs(l.pixelY)?-l.pixelX*n:-l.pixelY;if(0===r)return!0;i.invert&&(r=-r);var o=a.getTranslate()+r*i.sensitivity;if(o>=a.minTranslate()&&(o=a.minTranslate()),o<=a.maxTranslate()&&(o=a.maxTranslate()),(!!a.params.loop||!(o===a.minTranslate()||o===a.maxTranslate()))&&a.params.nested&&t.stopPropagation(),a.params.freeMode){var d={time:x(),delta:Math.abs(r),direction:Math.sign(r)},p=a.mousewheel.lastEventBeforeSnap,u=p&&d.time<p.time+500&&d.delta<=p.delta&&d.direction===p.direction;if(!u){a.mousewheel.lastEventBeforeSnap=void 0,a.params.loop&&a.loopFix();var c=a.getTranslate()+r*i.sensitivity,h=a.isBeginning,v=a.isEnd;if(c>=a.minTranslate()&&(c=a.minTranslate()),c<=a.maxTranslate()&&(c=a.maxTranslate()),a.setTransition(0),a.setTranslate(c),a.updateProgress(),a.updateActiveIndex(),a.updateSlidesClasses(),(!h&&a.isBeginning||!v&&a.isEnd)&&a.updateSlidesClasses(),a.params.freeModeSticky){clearTimeout(a.mousewheel.timeout),a.mousewheel.timeout=void 0;var f=a.mousewheel.recentWheelEvents;f.length>=15&&f.shift();var g=f.length?f[f.length-1]:void 0,b=f[0];if(f.push(d),g&&(d.delta>g.delta||d.direction!==g.direction))f.splice(0);else if(f.length>=15&&d.time-b.time<500&&b.delta-d.delta>=1&&d.delta<=6){var w=r>0?.8:.2;a.mousewheel.lastEventBeforeSnap=d,f.splice(0),a.mousewheel.timeout=E((function(){a.slideToClosest(a.params.speed,!0,void 0,w)}),0)}a.mousewheel.timeout||(a.mousewheel.timeout=E((function(){a.mousewheel.lastEventBeforeSnap=d,f.splice(0),a.slideToClosest(a.params.speed,!0,void 0,.5)}),500))}if(u||a.emit("scroll",t),a.params.autoplay&&a.params.autoplayDisableOnInteraction&&a.autoplay.stop(),c===a.minTranslate()||c===a.maxTranslate())return!0}}else{var y={time:x(),delta:Math.abs(r),direction:Math.sign(r),raw:e},T=a.mousewheel.recentWheelEvents;T.length>=2&&T.shift();var C=T.length?T[T.length-1]:void 0;if(T.push(y),C?(y.direction!==C.direction||y.delta>C.delta||y.time>C.time+150)&&a.mousewheel.animateSlider(y):a.mousewheel.animateSlider(y),a.mousewheel.releaseScroll(y))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1}},animateSlider:function(e){var t=this,a=l();return!(this.params.mousewheel.thresholdDelta&&e.delta<this.params.mousewheel.thresholdDelta)&&(!(this.params.mousewheel.thresholdTime&&x()-t.mousewheel.lastScrollTime<this.params.mousewheel.thresholdTime)&&(e.delta>=6&&x()-t.mousewheel.lastScrollTime<60||(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),t.emit("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),t.emit("scroll",e.raw)),t.mousewheel.lastScrollTime=(new a.Date).getTime(),!1)))},releaseScroll:function(e){var t=this,a=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&a.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&a.releaseOnEdges)return!0;return!1},enable:function(){var e=this,t=J.event();if(e.params.cssMode)return e.wrapperEl.removeEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(e.mousewheel.enabled)return!1;var a=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(a=m(e.params.mousewheel.eventsTarget)),a.on("mouseenter",e.mousewheel.handleMouseEnter),a.on("mouseleave",e.mousewheel.handleMouseLeave),a.on(t,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable:function(){var e=this,t=J.event();if(e.params.cssMode)return e.wrapperEl.addEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(!e.mousewheel.enabled)return!1;var a=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(a=m(e.params.mousewheel.eventsTarget)),a.off(t,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}},Q={toggleEl:function(e,t){e[t?"addClass":"removeClass"](this.params.navigation.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=t)},update:function(){var e=this,t=e.params.navigation,a=e.navigation.toggleEl;if(!e.params.loop){var i=e.navigation,s=i.$nextEl,r=i.$prevEl;r&&r.length>0&&(e.isBeginning?a(r,!0):a(r,!1),e.params.watchOverflow&&e.enabled&&r[e.isLocked?"addClass":"removeClass"](t.lockClass)),s&&s.length>0&&(e.isEnd?a(s,!0):a(s,!1),e.params.watchOverflow&&e.enabled&&s[e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){var t=this;e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()},onNextClick:function(e){var t=this;e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()},init:function(){var e,t,a=this,i=a.params.navigation;(a.params.navigation=k(a.$el,a.params.navigation,a.params.createElements,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),i.nextEl||i.prevEl)&&(i.nextEl&&(e=m(i.nextEl),a.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===a.$el.find(i.nextEl).length&&(e=a.$el.find(i.nextEl))),i.prevEl&&(t=m(i.prevEl),a.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===a.$el.find(i.prevEl).length&&(t=a.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",a.navigation.onNextClick),t&&t.length>0&&t.on("click",a.navigation.onPrevClick),M(a.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}),a.enabled||(e&&e.addClass(i.lockClass),t&&t.addClass(i.lockClass)))},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))}},ee={update:function(){var e=this,t=e.rtl,a=e.params.pagination;if(a.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i,s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,r=e.pagination.$el,n=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((i=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>s-1-2*e.loopedSlides&&(i-=s-2*e.loopedSlides),i>n-1&&(i-=n),i<0&&"bullets"!==e.params.paginationType&&(i=n+i)):i=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===a.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var l,o,d,p=e.pagination.bullets;if(a.dynamicBullets&&(e.pagination.bulletSize=p.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),r.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(a.dynamicMainBullets+4)+"px"),a.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=i-e.previousIndex,e.pagination.dynamicBulletIndex>a.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=a.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),l=i-e.pagination.dynamicBulletIndex,d=((o=l+(Math.min(p.length,a.dynamicMainBullets)-1))+l)/2),p.removeClass(a.bulletActiveClass+" "+a.bulletActiveClass+"-next "+a.bulletActiveClass+"-next-next "+a.bulletActiveClass+"-prev "+a.bulletActiveClass+"-prev-prev "+a.bulletActiveClass+"-main"),r.length>1)p.each((function(e){var t=m(e),s=t.index();s===i&&t.addClass(a.bulletActiveClass),a.dynamicBullets&&(s>=l&&s<=o&&t.addClass(a.bulletActiveClass+"-main"),s===l&&t.prev().addClass(a.bulletActiveClass+"-prev").prev().addClass(a.bulletActiveClass+"-prev-prev"),s===o&&t.next().addClass(a.bulletActiveClass+"-next").next().addClass(a.bulletActiveClass+"-next-next"))}));else{var u=p.eq(i),c=u.index();if(u.addClass(a.bulletActiveClass),a.dynamicBullets){for(var h=p.eq(l),v=p.eq(o),f=l;f<=o;f+=1)p.eq(f).addClass(a.bulletActiveClass+"-main");if(e.params.loop)if(c>=p.length-a.dynamicMainBullets){for(var g=a.dynamicMainBullets;g>=0;g-=1)p.eq(p.length-g).addClass(a.bulletActiveClass+"-main");p.eq(p.length-a.dynamicMainBullets-1).addClass(a.bulletActiveClass+"-prev")}else h.prev().addClass(a.bulletActiveClass+"-prev").prev().addClass(a.bulletActiveClass+"-prev-prev"),v.next().addClass(a.bulletActiveClass+"-next").next().addClass(a.bulletActiveClass+"-next-next");else h.prev().addClass(a.bulletActiveClass+"-prev").prev().addClass(a.bulletActiveClass+"-prev-prev"),v.next().addClass(a.bulletActiveClass+"-next").next().addClass(a.bulletActiveClass+"-next-next")}}if(a.dynamicBullets){var b=Math.min(p.length,a.dynamicMainBullets+4),w=(e.pagination.bulletSize*b-e.pagination.bulletSize)/2-d*e.pagination.bulletSize,y=t?"right":"left";p.css(e.isHorizontal()?y:"top",w+"px")}}if("fraction"===a.type&&(r.find(P(a.currentClass)).text(a.formatFractionCurrent(i+1)),r.find(P(a.totalClass)).text(a.formatFractionTotal(n))),"progressbar"===a.type){var E;E=a.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var x=(i+1)/n,T=1,C=1;"horizontal"===E?T=x:C=x,r.find(P(a.progressbarFillClass)).transform("translate3d(0,0,0) scaleX("+T+") scaleY("+C+")").transition(e.params.speed)}"custom"===a.type&&a.renderCustom?(r.html(a.renderCustom(e,i+1,n)),e.emit("paginationRender",r[0])):e.emit("paginationUpdate",r[0]),e.params.watchOverflow&&e.enabled&&r[e.isLocked?"addClass":"removeClass"](a.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){var r=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&!e.params.loop&&r>a&&(r=a);for(var 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(P(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 e=this;e.params.pagination=k(e.$el,e.params.pagination,e.params.createElements,{el:"swiper-pagination"});var t=e.params.pagination;if(t.el){var a=m(t.el);0!==a.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&a.length>1&&(a=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&a.addClass(t.clickableClass),a.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(a.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&a.addClass(t.progressbarOppositeClass),t.clickable&&a.on("click",P(t.bulletClass),(function(t){t.preventDefault();var a=m(this).index()*e.params.slidesPerGroup;e.params.loop&&(a+=e.loopedSlides),e.slideTo(a)})),M(e.pagination,{$el:a,el:a[0]}),e.enabled||a.addClass(t.lockClass))}},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",P(t.bulletClass))}}},te={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,l=t.$el,o=e.params.scrollbar,d=s,p=(r-s)*i;a?(p=-p)>0?(d=s-p,p=0):-p+s>r&&(d=r+p):p<0?(d=s+p,p=0):p+s>r&&(d=r-p),e.isHorizontal()?(n.transform("translate3d("+p+"px, 0, 0)"),n[0].style.width=d+"px"):(n.transform("translate3d(0px, "+p+"px, 0)"),n[0].style.height=d+"px"),o.hide&&(clearTimeout(e.scrollbar.timeout),l[0].style.opacity=1,e.scrollbar.timeout=setTimeout((function(){l[0].style.opacity=0,l.transition(400)}),1e3))}},setTransition:function(e){var t=this;t.params.scrollbar.el&&t.scrollbar.el&&t.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,l=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=n>=1?"none":"",e.params.scrollbar.hide&&(i[0].style.opacity=0),M(t,{trackSize:r,divider:n,moveDivider:l,dragSize:s}),e.params.watchOverflow&&e.enabled&&t.$el[e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,a=this,i=a.scrollbar,s=a.rtlTranslate,r=i.$el,n=i.dragSize,l=i.trackSize,o=i.dragStartPos;t=(i.getPointerPosition(e)-r.offset()[a.isHorizontal()?"left":"top"]-(null!==o?o:n/2))/(l-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()},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.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this,a=t.scrollbar,i=t.$wrapperEl,s=a.$el,r=a.$dragEl;t.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),i.transition(0),s.transition(0),r.transition(0),t.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,a=t.params.scrollbar,i=t.scrollbar,s=t.$wrapperEl,r=i.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),s.transition("")),a.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=E((function(){r.css("opacity",0),r.transition(400)}),1e3)),t.emit("scrollbarDragEnd",e),a.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=r(),a=e.scrollbar,i=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,l=e.support,o=a.$el[0],d=!(!l.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},p=!(!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};o&&(l.touch?(o.addEventListener(i.start,e.scrollbar.onDragStart,d),o.addEventListener(i.move,e.scrollbar.onDragMove,d),o.addEventListener(i.end,e.scrollbar.onDragEnd,p)):(o.addEventListener(s.start,e.scrollbar.onDragStart,d),t.addEventListener(s.move,e.scrollbar.onDragMove,d),t.addEventListener(s.end,e.scrollbar.onDragEnd,p)))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=r(),a=e.scrollbar,i=e.touchEventsTouch,s=e.touchEventsDesktop,n=e.params,l=e.support,o=a.$el[0],d=!(!l.passiveListener||!n.passiveListeners)&&{passive:!1,capture:!1},p=!(!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};o&&(l.touch?(o.removeEventListener(i.start,e.scrollbar.onDragStart,d),o.removeEventListener(i.move,e.scrollbar.onDragMove,d),o.removeEventListener(i.end,e.scrollbar.onDragEnd,p)):(o.removeEventListener(s.start,e.scrollbar.onDragStart,d),t.removeEventListener(s.move,e.scrollbar.onDragMove,d),t.removeEventListener(s.end,e.scrollbar.onDragEnd,p)))}},init:function(){var e=this,t=e.scrollbar,a=e.$el;e.params.scrollbar=k(a,e.params.scrollbar,e.params.createElements,{el:"swiper-scrollbar"});var i=e.params.scrollbar;if(i.el){var s=m(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&s.length>1&&1===a.find(i.el).length&&(s=a.find(i.el));var r=s.find("."+e.params.scrollbar.dragClass);0===r.length&&(r=m('<div class="'+e.params.scrollbar.dragClass+'"></div>'),s.append(r)),M(t,{$el:s,el:s[0],$dragEl:r,dragEl:r[0]}),i.draggable&&t.enableDraggable(),s&&s[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}},destroy:function(){this.scrollbar.disableDraggable()}},ae={setTransform:function(e,t){var a=this.rtl,i=m(e),s=a?-1:1,r=i.attr("data-swiper-parallax")||"0",n=i.attr("data-swiper-parallax-x"),l=i.attr("data-swiper-parallax-y"),o=i.attr("data-swiper-parallax-scale"),d=i.attr("data-swiper-parallax-opacity");if(n||l?(n=n||"0",l=l||"0"):this.isHorizontal()?(n=r,l="0"):(l=r,n="0"),n=n.indexOf("%")>=0?parseInt(n,10)*t*s+"%":n*t*s+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",null!=d){var p=d-(d-1)*(1-Math.abs(t));i[0].style.opacity=p}if(null==o)i.transform("translate3d("+n+", "+l+", 0px)");else{var u=o-(o-1)*(1-Math.abs(t));i.transform("translate3d("+n+", "+l+", 0px) scale("+u+")")}},setTranslate:function(){var e=this,t=e.$el,a=e.slides,i=e.progress,s=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,i)})),a.each((function(t,a){var r=t.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(r+=Math.ceil(a/2)-i*(s.length-1)),r=Math.min(Math.max(r,-1),1),m(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,r)}))}))},setTransition:function(e){void 0===e&&(e=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(t){var a=m(t),i=parseInt(a.attr("data-swiper-parallax-duration"),10)||e;0===e&&(i=0),a.transition(i)}))}},ie={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.support,i=t.params.zoom,s=t.zoom,r=s.gesture;if(s.fakeGestureTouched=!1,s.fakeGestureMoved=!1,!a.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;s.fakeGestureTouched=!0,r.scaleStart=ie.getDistanceBetweenTouches(e)}r.$slideEl&&r.$slideEl.length||(r.$slideEl=m(e.target).closest("."+t.params.slideClass),0===r.$slideEl.length&&(r.$slideEl=t.slides.eq(t.activeIndex)),r.$imageEl=r.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),r.$imageWrapEl=r.$imageEl.parent("."+i.containerClass),r.maxRatio=r.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,0!==r.$imageWrapEl.length)?(r.$imageEl&&r.$imageEl.transition(0),t.zoom.isScaling=!0):r.$imageEl=void 0},onGestureChange:function(e){var t=this,a=t.support,i=t.params.zoom,s=t.zoom,r=s.gesture;if(!a.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;s.fakeGestureMoved=!0,r.scaleMove=ie.getDistanceBetweenTouches(e)}r.$imageEl&&0!==r.$imageEl.length?(a.gestures?s.scale=e.scale*s.currentScale:s.scale=r.scaleMove/r.scaleStart*s.currentScale,s.scale>r.maxRatio&&(s.scale=r.maxRatio-1+Math.pow(s.scale-r.maxRatio+1,.5)),s.scale<i.minRatio&&(s.scale=i.minRatio+1-Math.pow(i.minRatio-s.scale+1,.5)),r.$imageEl.transform("translate3d(0,0,0) scale("+s.scale+")")):"gesturechange"===e.type&&s.onGestureStart(e)},onGestureEnd:function(e){var t=this,a=t.device,i=t.support,s=t.params.zoom,r=t.zoom,n=r.gesture;if(!i.gestures){if(!r.fakeGestureTouched||!r.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!a.android)return;r.fakeGestureTouched=!1,r.fakeGestureMoved=!1}n.$imageEl&&0!==n.$imageEl.length&&(r.scale=Math.max(Math.min(r.scale,n.maxRatio),s.minRatio),n.$imageEl.transition(t.params.speed).transform("translate3d(0,0,0) scale("+r.scale+")"),r.currentScale=r.scale,r.isScaling=!1,1===r.scale&&(n.$slideEl=void 0))},onTouchStart:function(e){var t=this.device,a=this.zoom,i=a.gesture,s=a.image;i.$imageEl&&0!==i.$imageEl.length&&(s.isTouched||(t.android&&e.cancelable&&e.preventDefault(),s.isTouched=!0,s.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s.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=T(i.$imageWrapEl[0],"x")||0,s.startY=T(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0));var n=s.width*a.scale,l=s.height*a.scale;if(!(n<i.slideWidth&&l<i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-n/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-l/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.cancelable&&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,l=a.currentX+n,o=i.y*r,d=a.currentY+o;0!==i.x&&(s=Math.abs((l-a.currentX)/i.x)),0!==i.y&&(r=Math.abs((d-a.currentY)/i.y));var p=Math.max(s,r);a.currentX=l,a.currentY=d;var u=a.width*e.scale,c=a.height*e.scale;a.minX=Math.min(t.slideWidth/2-u/2,0),a.maxX=-a.minX,a.minY=Math.min(t.slideHeight/2-c/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,t=e.zoom,a=t.gesture;a.$slideEl&&e.previousIndex!==e.activeIndex&&(a.$imageEl&&a.$imageEl.transform("translate3d(0,0,0) scale(1)"),a.$imageWrapEl&&a.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,t.currentScale=1,a.$slideEl=void 0,a.$imageEl=void 0,a.$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,d,p,u,c,h,v,f,g,b,w=this,y=l(),E=w.zoom,x=w.params.zoom,T=E.gesture,C=E.image;(T.$slideEl||(e&&e.target&&(T.$slideEl=m(e.target).closest("."+w.params.slideClass)),T.$slideEl||(w.params.virtual&&w.params.virtual.enabled&&w.virtual?T.$slideEl=w.$wrapperEl.children("."+w.params.slideActiveClass):T.$slideEl=w.slides.eq(w.activeIndex)),T.$imageEl=T.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),T.$imageWrapEl=T.$imageEl.parent("."+x.containerClass)),T.$imageEl&&0!==T.$imageEl.length&&T.$imageWrapEl&&0!==T.$imageWrapEl.length)&&(T.$slideEl.addClass(""+x.zoomedSlideClass),void 0===C.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,a="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=C.touchesStart.x,a=C.touchesStart.y),E.scale=T.$imageWrapEl.attr("data-swiper-zoom")||x.maxRatio,E.currentScale=T.$imageWrapEl.attr("data-swiper-zoom")||x.maxRatio,e?(g=T.$slideEl[0].offsetWidth,b=T.$slideEl[0].offsetHeight,i=T.$slideEl.offset().left+y.scrollX+g/2-t,s=T.$slideEl.offset().top+y.scrollY+b/2-a,o=T.$imageEl[0].offsetWidth,d=T.$imageEl[0].offsetHeight,p=o*E.scale,u=d*E.scale,v=-(c=Math.min(g/2-p/2,0)),f=-(h=Math.min(b/2-u/2,0)),(r=i*E.scale)<c&&(r=c),r>v&&(r=v),(n=s*E.scale)<h&&(n=h),n>f&&(n=f)):(r=0,n=0),T.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),T.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+E.scale+")"))},out:function(){var e=this,t=e.zoom,a=e.params.zoom,i=t.gesture;i.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?i.$slideEl=e.$wrapperEl.children("."+e.params.slideActiveClass):i.$slideEl=e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),i.$imageWrapEl=i.$imageEl.parent("."+a.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&i.$imageWrapEl&&0!==i.$imageWrapEl.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)},toggleGestures:function(e){var t=this,a=t.zoom,i=a.slideSelector,s=a.passiveListener;t.$wrapperEl[e]("gesturestart",i,a.onGestureStart,s),t.$wrapperEl[e]("gesturechange",i,a.onGestureChange,s),t.$wrapperEl[e]("gestureend",i,a.onGestureEnd,s)},enableGestures:function(){this.zoom.gesturesEnabled||(this.zoom.gesturesEnabled=!0,this.zoom.toggleGestures("on"))},disableGestures:function(){this.zoom.gesturesEnabled&&(this.zoom.gesturesEnabled=!1,this.zoom.toggleGestures("off"))},enable:function(){var e=this,t=e.support,a=e.zoom;if(!a.enabled){a.enabled=!0;var i=!("touchstart"!==e.touchEvents.start||!t.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},s=!t.passiveListener||{passive:!1,capture:!0},r="."+e.params.slideClass;e.zoom.passiveListener=i,e.zoom.slideSelector=r,t.gestures?(e.$wrapperEl.on(e.touchEvents.start,e.zoom.enableGestures,i),e.$wrapperEl.on(e.touchEvents.end,e.zoom.disableGestures,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,r,a.onGestureStart,i),e.$wrapperEl.on(e.touchEvents.move,r,a.onGestureChange,s),e.$wrapperEl.on(e.touchEvents.end,r,a.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,r,a.onGestureEnd,i)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,a.onTouchMove,s)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){var a=e.support;e.zoom.enabled=!1;var i=!("touchstart"!==e.touchEvents.start||!a.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},s=!a.passiveListener||{passive:!1,capture:!0},r="."+e.params.slideClass;a.gestures?(e.$wrapperEl.off(e.touchEvents.start,e.zoom.enableGestures,i),e.$wrapperEl.off(e.touchEvents.end,e.zoom.disableGestures,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,r,t.onGestureStart,i),e.$wrapperEl.off(e.touchEvents.move,r,t.onGestureChange,s),e.$wrapperEl.off(e.touchEvents.end,r,t.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,r,t.onGestureEnd,i)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,s)}}},se={loadInSlide:function(e,t){void 0===t&&(t=!0);var a=this,i=a.params.lazy;if(void 0!==e&&0!==a.slides.length){var s=a.virtual&&a.params.virtual.enabled?a.$wrapperEl.children("."+a.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):a.slides.eq(e),r=s.find("."+i.elementClass+":not(."+i.loadedClass+"):not(."+i.loadingClass+")");!s.hasClass(i.elementClass)||s.hasClass(i.loadedClass)||s.hasClass(i.loadingClass)||r.push(s[0]),0!==r.length&&r.each((function(e){var r=m(e);r.addClass(i.loadingClass);var n=r.attr("data-background"),l=r.attr("data-src"),o=r.attr("data-srcset"),d=r.attr("data-sizes"),p=r.parent("picture");a.loadImage(r[0],l||n,o,d,!1,(function(){if(null!=a&&a&&(!a||a.params)&&!a.destroyed){if(n?(r.css("background-image",'url("'+n+'")'),r.removeAttr("data-background")):(o&&(r.attr("srcset",o),r.removeAttr("data-srcset")),d&&(r.attr("sizes",d),r.removeAttr("data-sizes")),p.length&&p.children("source").each((function(e){var t=m(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))})),l&&(r.attr("src",l),r.removeAttr("data-src"))),r.addClass(i.loadedClass).removeClass(i.loadingClass),s.find("."+i.preloaderClass).remove(),a.params.loop&&t){var e=s.attr("data-swiper-slide-index");if(s.hasClass(a.params.slideDuplicateClass)){var u=a.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+a.params.slideDuplicateClass+")");a.lazy.loadInSlide(u.index(),!1)}else{var c=a.$wrapperEl.children("."+a.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');a.lazy.loadInSlide(c.index(),!1)}}a.emit("lazyImageReady",s[0],r[0]),a.params.autoHeight&&a.updateAutoHeight()}})),a.emit("lazyImageLoad",s[0],r[0])}))}},load:function(){var e=this,t=e.$wrapperEl,a=e.params,i=e.slides,s=e.activeIndex,r=e.virtual&&a.virtual.enabled,n=a.lazy,l=a.slidesPerView;function o(e){if(r){if(t.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(i[e])return!0;return!1}function d(e){return r?m(e).attr("data-swiper-slide-index"):m(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+a.slideVisibleClass).each((function(t){var a=r?m(t).attr("data-swiper-slide-index"):m(t).index();e.lazy.loadInSlide(a)}));else if(l>1)for(var p=s;p<s+l;p+=1)o(p)&&e.lazy.loadInSlide(p);else e.lazy.loadInSlide(s);if(n.loadPrevNext)if(l>1||n.loadPrevNextAmount&&n.loadPrevNextAmount>1){for(var u=n.loadPrevNextAmount,c=l,h=Math.min(s+c+Math.max(u,c),i.length),v=Math.max(s-Math.max(c,u),0),f=s+l;f<h;f+=1)o(f)&&e.lazy.loadInSlide(f);for(var g=v;g<s;g+=1)o(g)&&e.lazy.loadInSlide(g)}else{var b=t.children("."+a.slideNextClass);b.length>0&&e.lazy.loadInSlide(d(b));var w=t.children("."+a.slidePrevClass);w.length>0&&e.lazy.loadInSlide(d(w))}},checkInViewOnLoad:function(){var e=l(),t=this;if(t&&!t.destroyed){var a=t.params.lazy.scrollingElement?m(t.params.lazy.scrollingElement):m(e),i=a[0]===e,s=i?e.innerWidth:a[0].offsetWidth,r=i?e.innerHeight:a[0].offsetHeight,n=t.$el.offset(),o=!1;t.rtlTranslate&&(n.left-=t.$el[0].scrollLeft);for(var d=[[n.left,n.top],[n.left+t.width,n.top],[n.left,n.top+t.height],[n.left+t.width,n.top+t.height]],p=0;p<d.length;p+=1){var u=d[p];if(u[0]>=0&&u[0]<=s&&u[1]>=0&&u[1]<=r){if(0===u[0]&&0===u[1])continue;o=!0}}var c=!("touchstart"!==t.touchEvents.start||!t.support.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1};o?(t.lazy.load(),a.off("scroll",t.lazy.checkInViewOnLoad,c)):t.lazy.scrollHandlerAttached||(t.lazy.scrollHandlerAttached=!0,a.on("scroll",t.lazy.checkInViewOnLoad,c))}}},re={LinearSpline:function(e,t){var a,i,s,r,n,l=function(e,t){for(i=-1,a=e.length;a-i>1;)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=l(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 re.LinearSpline(t.slidesGrid,e.slidesGrid):new re.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var a,i,s=this,r=s.controller.control,n=s.constructor;function l(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 n&&l(r[o]);else r instanceof n&&t!==r&&l(r)},setTransition:function(e,t){var a,i=this,s=i.constructor,r=i.controller.control;function n(t){t.setTransition(e,i),0!==e&&(t.transitionStart(),t.params.autoHeight&&E((function(){t.updateAutoHeight()})),t.$wrapperEl.transitionEnd((function(){r&&(t.params.loop&&"slide"===i.params.controller.by&&t.loopFix(),t.transitionEnd())})))}if(Array.isArray(r))for(a=0;a<r.length;a+=1)r[a]!==t&&r[a]instanceof s&&n(r[a]);else r instanceof s&&t!==r&&n(r)}},ne={getRandomNumber:function(e){void 0===e&&(e=16);return"x".repeat(e).replace(/x/g,(function(){return Math.round(16*Math.random()).toString(16)}))},makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),e},addElRole:function(e,t){return e.attr("role",t),e},addElRoleDescription:function(e,t){return e.attr("aria-roledescription",t),e},addElControls:function(e,t){return e.attr("aria-controls",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},addElId:function(e,t){return e.attr("id",t),e},addElLive:function(e,t){return e.attr("aria-live",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterOrSpaceKey:function(e){if(13===e.keyCode||32===e.keyCode){var t=this,a=t.params.a11y,i=m(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(P(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&&e.navigation){var t=e.navigation,a=t.$nextEl,i=t.$prevEl;i&&i.length>0&&(e.isBeginning?(e.a11y.disableEl(i),e.a11y.makeElNotFocusable(i)):(e.a11y.enableEl(i),e.a11y.makeElFocusable(i))),a&&a.length>0&&(e.isEnd?(e.a11y.disableEl(a),e.a11y.makeElNotFocusable(a)):(e.a11y.enableEl(a),e.a11y.makeElFocusable(a)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(a){var i=m(a);e.a11y.makeElFocusable(i),e.params.pagination.renderBullet||(e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,t.paginationBulletMessage.replace(/\{\{index\}\}/,i.index()+1)))}))},init:function(){var e=this,t=e.params.a11y;e.$el.append(e.a11y.liveRegion);var a=e.$el;t.containerRoleDescriptionMessage&&e.a11y.addElRoleDescription(a,t.containerRoleDescriptionMessage),t.containerMessage&&e.a11y.addElLabel(a,t.containerMessage);var i=e.$wrapperEl,s=i.attr("id")||"swiper-wrapper-"+e.a11y.getRandomNumber(16),r=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";e.a11y.addElId(i,s),e.a11y.addElLive(i,r),t.itemRoleDescriptionMessage&&e.a11y.addElRoleDescription(m(e.slides),t.itemRoleDescriptionMessage),e.a11y.addElRole(m(e.slides),t.slideRole);var n,l,o=e.params.loop?e.slides.filter((function(t){return!t.classList.contains(e.params.slideDuplicateClass)})).length:e.slides.length;e.slides.each((function(a,i){var s=m(a),r=e.params.loop?parseInt(s.attr("data-swiper-slide-index"),10):i,n=t.slideLabelMessage.replace(/\{\{index\}\}/,r+1).replace(/\{\{slidesLength\}\}/,o);e.a11y.addElLabel(s,n)})),e.navigation&&e.navigation.$nextEl&&(n=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(l=e.navigation.$prevEl),n&&n.length&&(e.a11y.makeElFocusable(n),"BUTTON"!==n[0].tagName&&(e.a11y.addElRole(n,"button"),n.on("keydown",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(n,t.nextSlideMessage),e.a11y.addElControls(n,s)),l&&l.length&&(e.a11y.makeElFocusable(l),"BUTTON"!==l[0].tagName&&(e.a11y.addElRole(l,"button"),l.on("keydown",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(l,t.prevSlideMessage),e.a11y.addElControls(l,s)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown",P(e.params.pagination.bulletClass),e.a11y.onEnterOrSpaceKey)},destroy:function(){var e,t,a=this;a.a11y.liveRegion&&a.a11y.liveRegion.length>0&&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.onEnterOrSpaceKey),t&&t.off("keydown",a.a11y.onEnterOrSpaceKey),a.pagination&&a.params.pagination.clickable&&a.pagination.bullets&&a.pagination.bullets.length&&a.pagination.$el.off("keydown",P(a.params.pagination.bulletClass),a.a11y.onEnterOrSpaceKey)}},le={init:function(){var e=this,t=l();if(e.params.history){if(!t.history||!t.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var a=e.history;a.initialized=!0,a.paths=le.getPathValues(e.params.url),(a.paths.key||a.paths.value)&&(a.scrollToSlide(0,a.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){var e=l();this.params.history.replaceState||e.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){var e=this;e.history.paths=le.getPathValues(e.params.url),e.history.scrollToSlide(e.params.speed,e.history.paths.value,!1)},getPathValues:function(e){var t=l(),a=(e?new URL(e):t.location).pathname.slice(1).split("/").filter((function(e){return""!==e})),i=a.length;return{key:a[i-2],value:a[i-1]}},setHistory:function(e,t){var a=this,i=l();if(a.history.initialized&&a.params.history.enabled){var s;s=a.params.url?new URL(a.params.url):i.location;var r=a.slides.eq(t),n=le.slugify(r.attr("data-history"));if(a.params.history.root.length>0){var o=a.params.history.root;"/"===o[o.length-1]&&(o=o.slice(0,o.length-1)),n=o+"/"+e+"/"+n}else s.pathname.includes(e)||(n=e+"/"+n);var d=i.history.state;d&&d.value===n||(a.params.history.replaceState?i.history.replaceState({value:n},null,n):i.history.pushState({value:n},null,n))}},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(le.slugify(n.attr("data-history"))===t&&!n.hasClass(i.params.slideDuplicateClass)){var l=n.index();i.slideTo(l,e,a)}}else i.slideTo(0,e,a)}},oe={onHashChange:function(){var e=this,t=r();e.emit("hashChange");var a=t.location.hash.replace("#","");if(a!==e.slides.eq(e.activeIndex).attr("data-hash")){var i=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+a+'"]').index();if(void 0===i)return;e.slideTo(i)}},setHash:function(){var e=this,t=l(),a=r();if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&t.history&&t.history.replaceState)t.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||""),e.emit("hashSet");else{var i=e.slides.eq(e.activeIndex),s=i.attr("data-hash")||i.attr("data-history");a.location.hash=s||"",e.emit("hashSet")}},init:function(){var e=this,t=r(),a=l();if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var i=t.location.hash.replace("#","");if(i)for(var s=0,n=e.slides.length;s<n;s+=1){var o=e.slides.eq(s);if((o.attr("data-hash")||o.attr("data-history"))===i&&!o.hasClass(e.params.slideDuplicateClass)){var d=o.index();e.slideTo(d,0,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&m(a).on("hashchange",e.hashNavigation.onHashChange)}},destroy:function(){var e=l();this.params.hashNavigation.watchState&&m(e).off("hashchange",this.hashNavigation.onHashChange)}},de={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=E((function(){var t;e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),t=e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(t=e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(t=e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),t=e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(t=e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(t=e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")),(e.params.cssMode&&e.autoplay.running||!1===t)&&e.autoplay.run()}),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?["transitionend","webkitTransitionEnd"].forEach((function(e){t.$wrapperEl[0].addEventListener(e,t.autoplay.onTransitionEnd)})):(t.autoplay.paused=!1,t.autoplay.run())))},onVisibilityChange:function(){var e=this,t=r();"hidden"===t.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===t.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(e){var t=this;t&&!t.destroyed&&t.$wrapperEl&&e.target===t.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach((function(e){t.$wrapperEl[0].removeEventListener(e,t.autoplay.onTransitionEnd)})),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())},onMouseEnter:function(){var e=this;e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause(),["transitionend","webkitTransitionEnd"].forEach((function(t){e.$wrapperEl[0].removeEventListener(t,e.autoplay.onTransitionEnd)}))},onMouseLeave:function(){var e=this;e.params.autoplay.disableOnInteraction||(e.autoplay.paused=!1,e.autoplay.run())},attachMouseEvents:function(){var e=this;e.params.autoplay.pauseOnMouseEnter&&(e.$el.on("mouseenter",e.autoplay.onMouseEnter),e.$el.on("mouseleave",e.autoplay.onMouseLeave))},detachMouseEvents:function(){var e=this;e.$el.off("mouseenter",e.autoplay.onMouseEnter),e.$el.off("mouseleave",e.autoplay.onMouseLeave)}},pe={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 t=this,a=t.slides,i=t.$wrapperEl;if(a.transition(e),t.params.virtualTranslate&&0!==e){var s=!1;a.transitionEnd((function(){if(!s&&t&&!t.destroyed){s=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],a=0;a<e.length;a+=1)i.trigger(e[a])}}))}}},ue={setTranslate:function(){var e,t=this,a=t.$el,i=t.$wrapperEl,s=t.slides,r=t.width,n=t.height,l=t.rtlTranslate,o=t.size,d=t.browser,p=t.params.cubeEffect,u=t.isHorizontal(),c=t.virtual&&t.params.virtual.enabled,h=0;p.shadow&&(u?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=m('<div class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:r+"px"})):0===(e=a.find(".swiper-cube-shadow")).length&&(e=m('<div class="swiper-cube-shadow"></div>'),a.append(e)));for(var v=0;v<s.length;v+=1){var f=s.eq(v),g=v;c&&(g=parseInt(f.attr("data-swiper-slide-index"),10));var b=90*g,w=Math.floor(b/360);l&&(b=-b,w=Math.floor(-b/360));var y=Math.max(Math.min(f[0].progress,1),-1),E=0,x=0,T=0;g%4==0?(E=4*-w*o,T=0):(g-1)%4==0?(E=0,T=4*-w*o):(g-2)%4==0?(E=o+4*w*o,T=o):(g-3)%4==0&&(E=-o,T=3*o+4*o*w),l&&(E=-E),u||(x=E,E=0);var C="rotateX("+(u?0:-b)+"deg) rotateY("+(u?b:0)+"deg) translate3d("+E+"px, "+x+"px, "+T+"px)";if(y<=1&&y>-1&&(h=90*g+90*y,l&&(h=90*-g-90*y)),f.transform(C),p.slideShadows){var S=u?f.find(".swiper-slide-shadow-left"):f.find(".swiper-slide-shadow-top"),M=u?f.find(".swiper-slide-shadow-right"):f.find(".swiper-slide-shadow-bottom");0===S.length&&(S=m('<div class="swiper-slide-shadow-'+(u?"left":"top")+'"></div>'),f.append(S)),0===M.length&&(M=m('<div class="swiper-slide-shadow-'+(u?"right":"bottom")+'"></div>'),f.append(M)),S.length&&(S[0].style.opacity=Math.max(-y,0)),M.length&&(M[0].style.opacity=Math.max(y,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+o/2+"px","-moz-transform-origin":"50% 50% -"+o/2+"px","-ms-transform-origin":"50% 50% -"+o/2+"px","transform-origin":"50% 50% -"+o/2+"px"}),p.shadow)if(u)e.transform("translate3d(0px, "+(r/2+p.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+p.shadowScale+")");else{var z=Math.abs(h)-90*Math.floor(Math.abs(h)/90),P=1.5-(Math.sin(2*z*Math.PI/360)/2+Math.cos(2*z*Math.PI/360)/2),k=p.shadowScale,$=p.shadowScale/P,L=p.shadowOffset;e.transform("scale3d("+k+", 1, "+$+") translate3d(0px, "+(n/2+L)+"px, "+-n/2/$+"px) rotateX(-90deg)")}var I=d.isSafari||d.isWebView?-o/2:0;i.transform("translate3d(0px,0,"+I+"px) rotateX("+(t.isHorizontal()?0:h)+"deg) rotateY("+(t.isHorizontal()?-h:0)+"deg)")},setTransition:function(e){var t=this,a=t.$el;t.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&a.find(".swiper-cube-shadow").transition(e)}},ce={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,l=0,o=-s[0].swiperSlideOffset,d=0;if(e.isHorizontal()?a&&(n=-n):(d=o,o=0,l=-n,n=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"),u=e.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom");0===p.length&&(p=m('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),s.append(p)),0===u.length&&(u=m('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),s.append(u)),p.length&&(p[0].style.opacity=Math.max(-r,0)),u.length&&(u[0].style.opacity=Math.max(r,0))}s.transform("translate3d("+o+"px, "+d+"px, 0px) rotateX("+l+"deg) rotateY("+n+"deg)")}},setTransition:function(e){var t=this,a=t.slides,i=t.activeIndex,s=t.$wrapperEl;if(a.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var r=!1;a.eq(i).transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],a=0;a<e.length;a+=1)s.trigger(e[a])}}))}}},he={setTranslate:function(){for(var e=this,t=e.width,a=e.height,i=e.slides,s=e.slidesSizesGrid,r=e.params.coverflowEffect,n=e.isHorizontal(),l=e.translate,o=n?t/2-l:a/2-l,d=n?r.rotate:-r.rotate,p=r.depth,u=0,c=i.length;u<c;u+=1){var h=i.eq(u),v=s[u],f=(o-h[0].swiperSlideOffset-v/2)/v*r.modifier,g=n?d*f:0,b=n?0:d*f,w=-p*Math.abs(f),y=r.stretch;"string"==typeof y&&-1!==y.indexOf("%")&&(y=parseFloat(r.stretch)/100*v);var E=n?0:y*f,x=n?y*f:0,T=1-(1-r.scale)*Math.abs(f);Math.abs(x)<.001&&(x=0),Math.abs(E)<.001&&(E=0),Math.abs(w)<.001&&(w=0),Math.abs(g)<.001&&(g=0),Math.abs(b)<.001&&(b=0),Math.abs(T)<.001&&(T=0);var C="translate3d("+x+"px,"+E+"px,"+w+"px) rotateX("+b+"deg) rotateY("+g+"deg) scale("+T+")";if(h.transform(C),h[0].style.zIndex=1-Math.abs(Math.round(f)),r.slideShadows){var S=n?h.find(".swiper-slide-shadow-left"):h.find(".swiper-slide-shadow-top"),M=n?h.find(".swiper-slide-shadow-right"):h.find(".swiper-slide-shadow-bottom");0===S.length&&(S=m('<div class="swiper-slide-shadow-'+(n?"left":"top")+'"></div>'),h.append(S)),0===M.length&&(M=m('<div class="swiper-slide-shadow-'+(n?"right":"bottom")+'"></div>'),h.append(M)),S.length&&(S[0].style.opacity=f>0?f:0),M.length&&(M[0].style.opacity=-f>0?-f:0)}}},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)}},ve={init:function(){var e=this,t=e.params.thumbs;if(e.thumbs.initialized)return!1;e.thumbs.initialized=!0;var a=e.constructor;return t.swiper instanceof a?(e.thumbs.swiper=t.swiper,M(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),M(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):C(t.swiper)&&(e.thumbs.swiper=new a(M({},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),!0},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var a=t.clickedIndex,i=t.clickedSlide;if(!(i&&m(i).hasClass(e.params.thumbs.slideThumbActiveClass)||null==a)){var s;if(s=t.params.loop?parseInt(m(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(),l=e.slides.eq(r).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s=void 0===n?l:void 0===l?n:l-r<r-n?l: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,s=t.params.thumbs.autoScrollOffset,r=s&&!a.params.loop;if(t.realIndex!==a.realIndex||r){var n,l,o=a.activeIndex;if(a.params.loop){a.slides.eq(o).hasClass(a.params.slideDuplicateClass)&&(a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft,o=a.activeIndex);var d=a.slides.eq(o).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),p=a.slides.eq(o).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();n=void 0===d?p:void 0===p?d:p-o==o-d?a.params.slidesPerGroup>1?p:o:p-o<o-d?p:d,l=t.activeIndex>t.previousIndex?"next":"prev"}else l=(n=t.realIndex)>t.previousIndex?"next":"prev";r&&(n+="next"===l?s:-1*s),a.visibleSlidesIndexes&&a.visibleSlidesIndexes.indexOf(n)<0&&(a.params.centeredSlides?n=n>o?n-Math.floor(i/2)+1:n+Math.floor(i/2)-1:n>o&&a.params.slidesPerGroup,a.slideTo(n,e?0:void 0))}var u=1,c=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(u=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(u=1),u=Math.floor(u),a.slides.removeClass(c),a.params.loop||a.params.virtual&&a.params.virtual.enabled)for(var h=0;h<u;h+=1)a.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+h)+'"]').addClass(c);else for(var v=0;v<u;v+=1)a.slides.eq(t.realIndex+v).addClass(c)}}},fe=[U,Z,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}},create:function(){z(this,{mousewheel:{enabled:!1,lastScrollTime:x(),lastEventBeforeSnap:void 0,recentWheelEvents:[],enable:J.enable,disable:J.disable,handle:J.handle,handleMouseEnter:J.handleMouseEnter,handleMouseLeave:J.handleMouseLeave,animateSlider:J.animateSlider,releaseScroll:J.releaseScroll}})},on:{init:function(e){!e.params.mousewheel.enabled&&e.params.cssMode&&e.mousewheel.disable(),e.params.mousewheel.enabled&&e.mousewheel.enable()},destroy:function(e){e.params.cssMode&&e.mousewheel.enable(),e.mousewheel.enabled&&e.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(){z(this,{navigation:t({},Q)})},on:{init:function(e){e.navigation.init(),e.navigation.update()},toEdge:function(e){e.navigation.update()},fromEdge:function(e){e.navigation.update()},destroy:function(e){e.navigation.destroy()},"enable disable":function(e){var t=e.navigation,a=t.$nextEl,i=t.$prevEl;a&&a[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass),i&&i[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)},click:function(e,t){var a=e.navigation,i=a.$nextEl,s=a.$prevEl,r=t.target;if(e.params.navigation.hideOnClick&&!m(r).is(s)&&!m(r).is(i)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===r||e.pagination.el.contains(r)))return;var n;i?n=i.hasClass(e.params.navigation.hiddenClass):s&&(n=s.hasClass(e.params.navigation.hiddenClass)),!0===n?e.emit("navigationShow"):e.emit("navigationHide"),i&&i.toggleClass(e.params.navigation.hiddenClass),s&&s.toggleClass(e.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(){z(this,{pagination:t({dynamicBulletIndex:0},ee)})},on:{init:function(e){e.pagination.init(),e.pagination.render(),e.pagination.update()},activeIndexChange:function(e){(e.params.loop||void 0===e.snapIndex)&&e.pagination.update()},snapIndexChange:function(e){e.params.loop||e.pagination.update()},slidesLengthChange:function(e){e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange:function(e){e.params.loop||(e.pagination.render(),e.pagination.update())},destroy:function(e){e.pagination.destroy()},"enable disable":function(e){var t=e.pagination.$el;t&&t[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)},click:function(e,t){var a=t.target;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&e.pagination.$el.length>0&&!m(a).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;!0===e.pagination.$el.hasClass(e.params.pagination.hiddenClass)?e.emit("paginationShow"):e.emit("paginationHide"),e.pagination.$el.toggleClass(e.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(){z(this,{scrollbar:t({isTouched:!1,timeout:null,dragTimeout:null},te)})},on:{init:function(e){e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(e){e.scrollbar.updateSize()},resize:function(e){e.scrollbar.updateSize()},observerUpdate:function(e){e.scrollbar.updateSize()},setTranslate:function(e){e.scrollbar.setTranslate()},setTransition:function(e,t){e.scrollbar.setTransition(t)},"enable disable":function(e){var t=e.scrollbar.$el;t&&t[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)},destroy:function(e){e.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){z(this,{parallax:t({},ae)})},on:{beforeInit:function(e){e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e,t){e.params.parallax.enabled&&e.parallax.setTransition(t)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this;z(e,{zoom: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}},ie)});var a=1;Object.defineProperty(e.zoom,"scale",{get:function(){return a},set:function(t){if(a!==t){var i=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,s=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,i,s)}a=t}})},on:{init:function(e){e.params.zoom.enabled&&e.zoom.enable()},destroy:function(e){e.zoom.disable()},touchStart:function(e,t){e.zoom.enabled&&e.zoom.onTouchStart(t)},touchEnd:function(e,t){e.zoom.enabled&&e.zoom.onTouchEnd(t)},doubleTap:function(e,t){!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&e.zoom.toggle(t)},transitionEnd:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){z(this,{lazy:t({initialImageLoaded:!1},se)})},on:{beforeInit:function(e){e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(e){e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&(e.params.lazy.checkInView?e.lazy.checkInViewOnLoad():e.lazy.load())},scroll:function(e){e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},"scrollbarDragMove resize _freeModeNoMomentumRelease":function(e){e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(e){e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(e){e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(e){var t=e.params,a=t.lazy,i=t.cssMode,s=t.watchSlidesVisibility,r=t.watchSlidesProgress,n=t.touchReleaseOnEdges,l=t.resistanceRatio;a.enabled&&(i||(s||r)&&(n||0===l))&&e.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){z(this,{controller:t({control:this.params.controller.control},re)})},on:{update:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t,a){e.controller.control&&e.controller.setTranslate(t,a)},setTransition:function(e,t,a){e.controller.control&&e.controller.setTransition(t,a)}}},{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}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group"}},create:function(){z(this,{a11y:t({},ne,{liveRegion:m('<span class="'+this.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')})})},on:{afterInit:function(e){e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(e){e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(e){e.params.a11y.enabled&&e.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,root:"",replaceState:!1,key:"slides"}},create:function(){z(this,{history:t({},le)})},on:{init:function(e){e.params.history.enabled&&e.history.init()},destroy:function(e){e.params.history.enabled&&e.history.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(e){e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){z(this,{hashNavigation:t({initialized:!1},oe)})},on:{init:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(e){e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}},create:function(){z(this,{autoplay:t({},de,{running:!1,paused:!1})})},on:{init:function(e){e.params.autoplay.enabled&&(e.autoplay.start(),r().addEventListener("visibilitychange",e.autoplay.onVisibilityChange),e.autoplay.attachMouseEvents())},beforeTransitionStart:function(e,t,a){e.autoplay.running&&(a||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(t):e.autoplay.stop())},sliderFirstMove:function(e){e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(e){e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(e){e.autoplay.detachMouseEvents(),e.autoplay.running&&e.autoplay.stop(),r().removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){z(this,{fadeEffect:t({},pe)})},on:{beforeInit:function(e){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};M(e.params,t),M(e.originalParams,t)}},setTranslate:function(e){"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e,t){"fade"===e.params.effect&&e.fadeEffect.setTransition(t)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){z(this,{cubeEffect:t({},ue)})},on:{beforeInit:function(e){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};M(e.params,t),M(e.originalParams,t)}},setTranslate:function(e){"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e,t){"cube"===e.params.effect&&e.cubeEffect.setTransition(t)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){z(this,{flipEffect:t({},ce)})},on:{beforeInit:function(e){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};M(e.params,t),M(e.originalParams,t)}},setTranslate:function(e){"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e,t){"flip"===e.params.effect&&e.flipEffect.setTransition(t)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){z(this,{coverflowEffect:t({},he)})},on:{beforeInit:function(e){"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(e){"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e,t){"coverflow"===e.params.effect&&e.coverflowEffect.setTransition(t)}}},{name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){z(this,{thumbs:t({swiper:null,initialized:!1},ve)})},on:{beforeInit:function(e){var t=e.params.thumbs;t&&t.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(e){e.thumbs.swiper&&e.thumbs.update()},update:function(e){e.thumbs.swiper&&e.thumbs.update()},resize:function(e){e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(e){e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e,t){var a=e.thumbs.swiper;a&&a.setTransition(t)},beforeDestroy:function(e){var t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}}];return q.use(fe),q}));
7975 7976/*================================================================================ 7977 * @name: bPopup - if you can't get it up, use bPopup 7978 * @author: (c)Bjoern Klinggaard (twitter@bklinggaard) 7979 * @demo: http://dinbror.dk/bpopup 7980 * @version: 0.11.0.min 7981 ================================================================================*/ 7982 (function(c){c.fn.bPopup=function(A,E){function L(){a.contentContainer=c(a.contentContainer||b);switch(a.content){case "iframe":var d=c('<iframe class="b-iframe" '+a.iframeAttr+"></iframe>");d.appendTo(a.contentContainer);t=b.outerHeight(!0);u=b.outerWidth(!0);B();d.attr("src",a.loadUrl);l(a.loadCallback);break;case "image":B();c("<img />").load(function(){l(a.loadCallback);F(c(this))}).attr("src",a.loadUrl).hide().appendTo(a.contentContainer);break;default:B(),c('<div class="b-ajax-wrapper"></div>').load(a.loadUrl,a.loadData,function(d,b,e){l(a.loadCallback,b);F(c(this))}).hide().appendTo(a.contentContainer)}}function B(){a.modal&&c('<div class="b-modal '+e+'"></div>').css({backgroundColor:a.modalColor,position:"fixed",top:0,right:0,bottom:0,left:0,opacity:0,zIndex:a.zIndex+v}).appendTo(a.appendTo).fadeTo(a.speed,a.opacity);C();b.data("bPopup",a).data("id",e).css({left:"slideIn"==a.transition||"slideBack"==a.transition?"slideBack"==a.transition?f.scrollLeft()+w:-1*(x+u):m(!(!a.follow[0]&&n||g)),position:a.positionStyle||"absolute",top:"slideDown"==a.transition||"slideUp"==a.transition?"slideUp"==a.transition?f.scrollTop()+y:z+-1*t:p(!(!a.follow[1]&&q||g)),"z-index":a.zIndex+v+1}).each(function(){a.appending&&c(this).appendTo(a.appendTo)});G(!0)}function r(){a.modal&&c(".b-modal."+b.data("id")).fadeTo(a.speed,0,function(){c(this).remove()});a.scrollBar||c("html").css("overflow","auto");c(".b-modal."+e).unbind("click");f.unbind("keydown."+e);k.unbind("."+e).data("bPopup",0<k.data("bPopup")-1?k.data("bPopup")-1:null);b.undelegate(".bClose, ."+a.closeClass,"click."+e,r).data("bPopup",
7982null);clearTimeout(H);G();return!1}function I(d){y=k.height();w=k.width();h=D();if(h.x||h.y)clearTimeout(J),J=setTimeout(function(){C();d=d||a.followSpeed;var e={};h.x&&(e.left=a.follow[0]?m(!0):"auto");h.y&&(e.top=a.follow[1]?p(!0):"auto");b.dequeue().each(function(){g?c(this).css({left:x,top:z}):c(this).animate(e,d,a.followEasing)})},50)}function F(d){var c=d.width(),e=d.height(),f={};a.contentContainer.css({height:e,width:c});e>=b.height()&&(f.height=b.height());c>=b.width()&&(f.width=b.width());t=b.outerHeight(!0);u=b.outerWidth(!0);C();a.contentContainer.css({height:"auto",width:"auto"});f.left=m(!(!a.follow[0]&&n||g));f.top=p(!(!a.follow[1]&&q||g));b.animate(f,250,function(){d.show();h=D()})}function M(){k.data("bPopup",v);b.delegate(".bClose, ."+a.closeClass,"click."+e,r);a.modalClose&&c(".b-modal."+e).css("cursor","pointer").bind("click",r);N||!a.follow[0]&&!a.follow[1]||k.bind("scroll."+e,function(){if(h.x||h.y){var d={};h.x&&(d.left=a.follow[0]?m(!g):"auto");h.y&&(d.top=a.follow[1]?p(!g):"auto");b.dequeue().animate(d,a.followSpeed,a.followEasing)}}).bind("resize."+e,function(){I()});a.escClose&&f.bind("keydown."+e,function(a){27==a.which&&r()})}function G(d){function c(e){b.css({display:"block",opacity:1}).animate(e,a.speed,a.easing,function(){K(d)})}switch(d?a.transition:a.transitionClose||a.transition){case "slideIn":c({left:d?m(!(!a.follow[0]&&n||g)):f.scrollLeft()-(u||b.outerWidth(!0))-200});break;case "slideBack":c({left:d?m(!(!a.follow[0]&&n||g)):f.scrollLeft()+w+200});break;case "slideDown":c({top:d?p(!(!a.follow[1]&&q||g)):f.scrollTop()-(t||b.outerHeight(!0))-200});break;case "slideUp":c({top:d?p(!(!a.follow[1]&&q||g)):f.scrollTop()+y+200});break;default:b.stop().fadeTo(a.speed,d?1:0,function(){K(d)})}}function K(d){d?(M(),l(E),a.autoClose&&(H=setTimeout(r,a.autoClose))):(b.hide(),l(a.onClose),a.loadUrl&&(a.contentContainer.empty(),b.css({height:"auto",width:"auto"})))}function m(a){return a?x+f.scrollLeft():x}function p(a){return a?z+f.scrollTop():z}function l(a,e){c.isFunction(a)&&a.call(b,e)}function C(){z=q?a.position[1]:Math.max(0,(y-b.outerHeight(!0))/2-a.amsl);x=n?a.position[0]:(w-b.outerWidth(!0))/2;h=D()}function D(){return{x:w>b.outerWidth(!0),y:y>b.outerHeight(!0)}}c.isFunction(A)&&(E=A,A=null);var a=c.extend({},c.fn.bPopup.defaults,A);a.scrollBar||c("html").css("overflow","hidden");var b=this,f=c(document),k=c(window),y=k.height(),w=k.width(),N=/OS 6(_\d)+/i.test(navigator.userAgent),v=0,e,h,q,n,g,z,x,t,u,J,H;b.close=function(){r()};b.reposition=function(a){I(a)};return b.each(function(){c(this).data("bPopup")||(l(a.onOpen),v=(k.data("bPopup")||0)+1,e="__b-popup"+v+"__",q="auto"!==a.position[1],n="auto"!==a.position[0],g="fixed"===a.positionStyle,t=b.outerHeight(!0),u=b.outerWidth(!0),a.loadUrl?L():B())})};c.fn.bPopup.defaults={amsl:50,appending:!0,appendTo:"body",autoClose:!1,closeClass:"b-close",content:"ajax",contentContainer:!1,easing:"swing",escClose:!0,follow:[!0,!0],followEasing:"swing",followSpeed:500,iframeAttr:'scrolling="no" frameborder="0"',loadCallback:!1,loadData:!1,loadUrl:!1,modal:!0,modalClose:!0,modalColor:"#000",onClose:!1,onOpen:!1,opacity:.7,position:["auto","auto"],positionStyle:"absolute",scrollBar:!0,speed:250,transition:"fadeIn",transitionClose:!1,zIndex:9997}})(jQuery); 7983 7984$(function(){ 7985 if (typeof(EC_SHOP_MULTISHOP_SHIPPING) != "undefined") { 7986 var sShippingCountryCode4Cookie = 'shippingCountryCode'; 7987 var bShippingCountryProc = false; 7988 7989 // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 7990 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) { 7991 $('.xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist').hide(); 7992 $('.xans-layout-multishoplist .countryTitle').hide(); 7993 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').hide(); 7994 } else { // ë°°ì¡êµê° ì í ì¤ì ì´ ì¬ì©ì´ë©´ ì¿ í¤ê°ì´ë query stringì¼ë¡ ëì´ì¨ ë°°ì¡êµê° ê°ì ì¬ì© 7995 $('.xans-multishop-listitem').hide(); 7996 $('.xans-layout-multishoplist > h1').hide(); 7997 $('.xans-layout-multishoplist .languageTitle').show(); 7998 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').show(); 7999 $('.xans-layout-multishoplist .countryTitle').show(); 8000 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').show(); 8001 8002 var aShippingCountryCode = document.cookie.match('(^|;) ?'+sShippingCountryCode4Cookie+'=([^;]*)(;|$)'); 8003 8004 if (typeof(aShippingCountryCode) != 'undefined' && aS
8004hippingCountryCode != null && aShippingCountryCode.length > 2) { 8005 var sShippingCountryValue = aShippingCountryCode[2]; 8006 } 8007 8008 // query stringì¼ë¡ ëì´ ì¨ ë°°ì¡êµê° ê°ì´ ìë¤ë©´, ê·¸ ê°ì ì ì©í¨ 8009 var aHrefCountryValue = decodeURIComponent(location.href).split("/?country="); 8010 8011 if (aHrefCountryValue.length == 2) { 8012 var sShippingCountryValue = aHrefCountryValue[1]; 8013 } 8014 8015 // ë©ì¸ íì´ì§ìì êµê°ì íì ìí ê²½ì°, ê·¸ ì¸ì íì´ì§ìì ì í ë ê°ì´ ì ëì¤ë íì ì²ë¦¬ 8016 if (location.href.split("/").length != 4 && $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()) { 8017 $(".xans-layout-multishoplist .xans-layout-multishoplistmultioption a .ship span").text(" : "+$(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text().split("SHIPPING TO : ").join("")); 8018 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 8019 $("#f_country").val($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 8020 } 8021 } 8022 if (typeof(sShippingCountryValue) != "undefined" && sShippingCountryValue != "" && sShippingCountryValue != null) { 8023 sShippingCountryValue = sShippingCountryValue.split("#")[0]; 8024 var bShippingCountryProc = true; 8025 8026 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 8027 $(".xans-layout-multishoplist .xans-multishop-listitem .countryLink").text($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text()); 8028 8029 var expires = new Date(); 8030 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 8031 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 8032 8033 if ($("#f_country").length > 0 && location.href.indexOf("orderform.html") > -1) { 8034 $("#f_country").val(sShippingCountryValue).change(); 8035 } 8036 } 8037 } 8038 8039 // ì¸ì´ì í ì¤ì ì´ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 8040 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingLanguageSelection === false) { 8041 $('.xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist').hide(); 8042 $('.xans-layout-multishoplist .languageTitle').hide(); 8043 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').hide(); 8044 } else { 8045 $('.xans-multishop-listitem').hide(); 8046 $('.xans-layout-multishoplist > h1').hide(); 8047 $('.xans-layout-multishoplist .languageTitle').show(); 8048 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').show(); 8049 $('.xans-layout-multishoplist .countryTitle').show(); 8050 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').show(); 8051 } 8052 8053 // ë°°ì¡êµê° ë° ì¸ì´ ì¤ì ì´ ë ë¤ ì¬ì©ìí¨ì´ë©´ ì¨ê¹ 8054 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShipping === false) { 8055 $(".xans-layout-multishopshipping").hide(); 8056 $('.xans-layout-multishoplist .countryTitle').hide(); 8057 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptioncountry').hide(); 8058 $('.xans-layout-multishoplist .languageTitle').hide(); 8059 $('.xans-layout-multishoplist .xans-layout-multishoplistmultioptionlanguage').hide(); 8060 } else if (bShippingCountryProc === false && location.href.split("/").length == 4) { // ë°°ì¡êµê° ê°ì ì²ë¦¬í ì ì´ ìê³ , ë©ì¸íë©´ì¼ ëë§ ì í ë ì´ì´ë¥¼ ëì 8061 var sShippingCountryValue = $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(); 8062 $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val(sShippingCountryValue); 8063 $(".xans-layout-multishoplist .xans-multishop-listitem .countryLink").text($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist option:selected").text()); 8064 // ë°°ì¡êµê° ì íì ì¬ì©í´ì¼ ë ì´ì´ë¥¼ ë³´ì´ê² í¨ 8065 if (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === true) { 8066 $(".xans-layout-multishopshipping").show(); 8067 } 8068 } 8069 8070 $(".xans-layout-multishopshipping .btnClose").on("click", function() { 8071 $(".xans-layout-multishopshipping").hide(); 8072 }); 8073 8074 $(".xans-layout-multishopshipping .ec-base-button a").on("click", function() { 8075 var expires = new Date(); 8076 expires.setTime(expires.getTime() + (30 * 24 * 60 * 60 * 1000)); // 30ì¼ê° ì¿ í¤ ì ì§ 8077 document.cookie = sShippingCountryCode4Cookie+'=' + $(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val() +';path=/'+ ';expires=' + expires.toUTCString(); 8078 8079 // ëë©ì¸ 문ì ë¡ ì¿ í¤ë¡ ë°°ì¡êµê° ì¤ì ì´ ì ëë ê²½ì°ë¥¼ ìí´ query stringì¼ë¡ ë°°ì¡êµê° ê°
8079ì ëê¹ 8080 var sQuerySting = (EC_SHOP_MULTISHOP_SHIPPING.bMultishopShippingCountrySelection === false) ? "" : "/?country="+encodeURIComponent($(".xans-layout-multishopshipping .xans-layout-multishopshippingcountrylist").val()); 8081 8082 location.href = '//'+$(".xans-layout-multishopshipping .xans-layout-multishopshippinglanguagelist").val()+sQuerySting; 8083 }); 8084 $(".xans-layout-multishoplist .xans-multishop-listitem .countryLink").on("click", function(e) { 8085 $('#dimmedSlider').toggle(); 8086 $('html').toggleClass('expand'); 8087 $(".xans-layout-multishopshipping").show(); 8088 e.preventDefault(); 8089 }); 8090 $(".xans-layout-multishoplist .xans-multishop-listitem .languageLink").on("click", function(e) { 8091 $('#dimmedSlider').toggle(); 8092 $('html').toggleClass('expand'); 8093 $(".xans-layout-multishopshipping").show(); 8094 e.preventDefault(); 8095 }); 8096 } 8097}); 8098 /** 8099 * 모ë°ì¼ì¼í몰 ì¬ë¼ì´ë©ë©ë´ */ 8100var aCategory = []; 8101$(function(){ 8102 $('body').append('<div id="dimmedSlider"></div>'); 8103 var methods = { 8104 aCategory : [], 8105 aSubCategory : {}, 8106 get: function() 8107 { 8108 $.ajax({ 8109 url : '/exec/front/Product/SubCategory', 8110 dataType: 'json', 8111 success: function(aData) { 8112 if (aData == null || aData == 'undefined') { 8113 methods.checkSub(); 8114 return; 8115 } 8116 for (var i=0; i<aData.length; i++) 8117 { 8118 var sParentCateNo = aData[i].parent_cate_no; 8119 var sCateNo = aData[i].cate_no; 8120 if (!methods.aSubCategory[sParentCateNo]) { 8121 methods.aSubCategory[sParentCateNo] = []; 8122 } 8123 if (!aCategory[sCateNo]) { 8124 aCategory[sCateNo] = []; 8125 } 8126 methods.aSubCategory[sParentCateNo].push( aData[i] ); 8127 aCategory[sCateNo] = aData[i]; 8128 } 8129 methods.checkSub(); 8130 methods.getMyCateList(); 8131 } 8132 }); 8133 }, 8134 getParam: function(sUrl, sKey) { 8135 if (typeof sUrl !== 'string') return; 8136 var aUrl = sUrl.split('?'); 8137 var sQueryString = aUrl[1]; 8138 var aParam = {}; 8139 if (sQueryString) { 8140 var aFields = sQueryString.split("&"); 8141 var aField = []; 8142 for (var i=0; i<aFields.length; i++) { 8143 aField = aFields[i].split('='); 8144 aParam[aField[0]] = aField[1]; 8145 } 8146 } 8147 return sKey ? aParam[sKey] : aParam; 8148 }, 8149 8150 show: function(overNode, iCateNo) { 8151 var oParentNode = overNode; 8152 var aHtml = []; 8153 var sMyCateList = localStorage.getItem("myCateList"); 8154 if (methods.aSubCategory[iCateNo] != undefined) { 8155 aHtml.push('<ul class="slideSubMenu">'); 8156 $(methods.aSubCategory[iCateNo]).each(function() { 8157 var sNextParentNo = this.cate_no; 8158 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 8159 if (methods.aSubCategory[sNextParentNo] == undefined) { 8160 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 8161 var sHref = '/product/list.html'+this.param; 8162 } else { 8163 aHtml.push('<li id="cate'+this.cate_no+'">'); 8164 var sHref = '#none'; 8165 } 8166 aHtml.push('<a href="/product/list.html'+this.param+'" class="view">'+this.name+'</a>'); 8167 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);"></a>'); 8168 8169 if (methods.aSubCategory[sNextParentNo] != undefined) { 8170 aHtml.push('<ul>'); 8171 $(methods.aSubCategory[sNextParentNo]).each(function() { 8172 var sNextParentNo2 = this.cate_no; 8173 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 8174 if (methods.aSubCategory[sNextParentNo2] == undefined) { 8175 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 8176 var sHref = '/product/list.html'+this.param; 8177 } else { 8178 aHtml.push('<li id="cate'+this.cate_no+'">'); 8179 var sHref = '#none'; 8180 } 8181 aHtml.push('<a href="/product/list.html'+this.param+'" class="view">'+this.name+'</a>'); 8182 if (methods.aSubCategory[sNextParentNo] != undefined) aHtml.push('<a href="'+sHref+'" class="cate" cate="'+this.param+'" onclick="subMenuEvent(this);"></a>'); 8183 8184 if (methods.aSubCategory[sNextParentNo2] != undefined) { 8185 aHtml.push('<ul>'); 8186 8187 $(methods.aSubCategory[sNextParentNo2]).each(function() { 8188 aHtml.push('<li class="noChild" id="cate'+this.cate_no+'">'); 8189 var sCateSelected = (checkInArray(sMyCateList, this.cate_no) == true) ? ' selected' : ''; 8190 aHtml.push('<a href="/product/list.html'+this.param+'" class="view">'+this.name+'</a>'); 8191 aHtml.push('</li>'); 8192 }); 8193 aHtml.push('</ul>'); 8194 } 8195 aHtml.push('</li>'); 8196 }); 8197 aHtml.push('</ul>'); 8198 } 8199 aHtml.push('</li>'); 8200 }); 8201 aHtml.push('</ul>'); 8202 } 8203 $(oParentNode).append(aHtml.join('')); 8204 }, 8205 close: function() { 8206 $('.slideSubMenu').remove(); 8207 }, 8208 checkSub: function() { 8209 $('.cate').each(function(){ 8210 var sParam = $(this).attr('cate'); 8211 if (!sParam) return; 8212 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 8213 var result = methods.aSubCategory[iCateNo]; 8214 if (result == undefined) { 8215 if ($(this).closest('#slideProjectList').length) { 8216 var sHref = '/product/project.html'+sParam; 8217 } else { 8218 var sHref = '/product/list.html'+sParam; 8219 } 8220 8221 $(this).attr('href', sHref); 8222 $(this).parent().attr('class', 'noChild'); 8223 } 8224 }); 8225 }, 8226 getMyCateList :function() { 8227 var sMyCateList = localStorage.getItem("myCateList"); 8228 if (sMyCateList != null && sMyCateList != "") { 8229 var aTempList = sMyCateList.split("|"); 8230 var aHtml = []; 8231 for (var i = 0; i < aTempList.length; i++) { 8232 if (aTempList[i] != "") { 8233 var iCateNo = aTempList[i]; 8234 var sCateName = aCategory[iCateNo].name; 8235 var sCateParam = aCategory[iCateNo].param; 8236 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>'); 8237 $("#cate"+iCateNo+" #icoBookmark").addClass("selected"); 8238 } 8239 } 8240 $('#bookmartCateArea').append('<ul>'+aHtml.join('')+'</ul>'); 8241 } 8242 chkMyCateList(); 8243 } 8244 }; 8245 8246 var offCover = { 8247 init : function() { 8248 $(function() {
8249 $('#wrap').append('<a href="#container" id="btnFoldLayout">ë©ë´ í ê¸</a>'); 8250 offCover.resize(); 8251 $(window).on('resize', function(){ 8252 offCover.resize(); 8253 }); 8254 }); 8255 }, 8256 layout : function(){ 8257 if ($('html').hasClass('expand')) { 8258 $('#btnFoldLayout').show(); 8259 $('#aside').css({'visibility':'visible', 'display':'block'}); 8260 $('html, body').css({"overflow-x":""}) 8261 8262 setTimeout(function(){ 8263 $('#btnFoldLayout').css({'background':'rgba(0,0,0,0.7)'}); 8264 }, 350); 8265 } else { 8266 $('#btnFoldLayout').hide(); 8267 $('#aside').css({'z-index':0}); 8268 setTimeout(function(){ 8269 $('#aside').css({'visibility':'', 'display':'none'}); 8270 }, 300); 8271 } 8272 $('#aside').css({'visibility':'visible'}); 8273 }, 8274 resize : function(){ 8275 var height = $('body').height(); 8276 $('#container').css({'min-height':height}); 8277 } 8278 }; 8279 methods.get(); 8280 8281 offCover.init(); 8282 8283 8284 $('#mheader .fold').on('click', function(e){ 8285 $('#dimmedSlider').show(300); 8286 $('html').toggleClass('expand'); 8287 offCover.layout(); 8288 e.preventDefault(); 8289 }); 8290 8291 8292 $('#aside .btnClose').on('click', function(e){ 8293 $('#dimmedSlider').hide(300); 8294 $('html').toggleClass('expand'); 8295 offCover.layout(); 8296 e.preventDefault(); 8297 }); 8298 8299 $(document).on('click', '#btnFoldLayout', function(e) { 8300 $('#aside .btnClose').trigger('click'); 8301 e.preventDefault(); 8302 }); 8303 8304 $('#slideCateList li > a.cate').on('click', function(e) { 8305 var sParam = $(this).attr('cate'); 8306 if (!sParam) return; 8307 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 8308 if ($(this).parent().attr('class') == 'xans-record- selected') { 8309 methods.close(); 8310 } else { 8311 if (!iCateNo) return; 8312 $('#aside #slideCateList li').removeClass('selected'); 8313 methods.close(); 8314 methods.show(this.parentNode, iCateNo); 8315 } 8316 }); 8317 8318 $('#aside ul a.cate').on('click', function(e){ 8319 $(this).parent().find('li').removeClass('selected'); 8320 $(this).parent().toggleClass('selected'); 8321 if (!$(this).parent('li').hasClass('noChild')){ 8322 e.preventDefault(); 8323 } 8324 }); 8325 8326 $(document).on('click', "#icoBookmark", function() { 8327 var sParam = $(this).parent().find('a').attr('cate'); 8328 if (!sParam) return; 8329 var iCateNo = Number(methods.getParam(sParam, 'cate_no')); 8330 setMyCateList(iCateNo, $(this)); 8331 }); 8332 8333 $('#slideCateList h2').on('click', function() { 8334 var oParentId = $(this).parent().attr('id'); 8335 if (oParentId == 'slideCateList' || oParentId == 'slideMultishopList' || oParentId == 'slideProjectList') { 8336 ($(this).attr('class') == 'selected') ? $(this).next().hide() : $(this).next().show(); 8337 } else if (oParentId == 'bookmarkCategory') { 8338 if ($(this).attr('class') == 'selected') { 8339 $(this).parent().find('#bookmarkEmpty').hide(); 8340 $(this).parent().find('#bookmartCateArea').hide(); 8341 } else { 8342 chkMyCateList(); 8343 $(this).parent().find('#bookmartCateArea').show(); 8344 } 8345 } 8346 $(this).toggleClass('selected'); 8347 }); 8348}); 8349function subMenuEvent(obj) { 8350 $(obj).parent().find('li').removeClass('selected'); 8351 $(obj).parent().toggleClass('selected'); 8352} 8353function setMyCateList(iCateNo, oObj) { 8354 $(oObj).toggleClass('selected'); 8355 var sMyCateList = localStorage.getItem("myCateList"); 8356 var aCateList = []; 8357 if (checkInArray(sMyCateList, iCateNo) == true) { 8358 var aTemp = sMyCateList.split("|"); 8359 for (var i = 0 ; i < aTemp.length ; i++) { 8360 if (aTemp[i] != iCateNo) { 8361 aCateList.push(aTemp[i]); 8362 } 8363 } 8364 var sCateList = aCateList.join('|'); 8365 localStorage.setItem("myCateList" , sCateList); 8366 $('#bookmartCateArea #bookmark'+iCateNo).remove(); 8367 if (aCateList.length == 0) { 8368 $('#bookmarkCategory #bookmartCateArea').find('ul').remove(); 8369 } 8370 $("#cate"+iCateNo+" > #icoBookmark").removeClass("selected"); 8371 } else { 8372 var sCateName = aCategory[iCateNo].name; 8373 var sCateParam = aCategory[iCateNo].param; 8374 var sHtml = ''; 8375 if (sMyCateList == null || sMyCateList == '') { 8376 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>' 8377 $('#bookmarkCategory #bookmartCateArea').append(sHtml); 8378 } else { 8379 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>' 8380 $('#bookmarkCategory #bookmartCateArea ul').append(sHtml); 8381 } 8382 $(this).addClass('selected'); 8383 if (sMyCateList == null || sMyCateList == '') { 8384 localStorage.setItem('myCateList' , iCateNo); 8385 } else { 8386 localStorage.setItem('myCateList' , sMyCateList + '|' + iCateNo); 8387 } 8388 } 8389 chkMyCateList(); 8390}
8391function checkInArray(sBookmarkList, iCateNo) { 8392 if (sBookmarkList == null) return false; 8393 var aBookmarkList = sBookmarkList.split("|"); 8394 for (var i = 0; i < aBookmarkList.length; i++) { 8395 if (aBookmarkList[i] == iCateNo) { 8396 return true; 8397 } 8398 } 8399 return false; 8400} 8401function chkMyCateList() { 8402 var sMyCateList = localStorage.getItem("myCateList"); 8403 if (sMyCateList == null || sMyCateList == '') { 8404 $('#bookmarkEmpty').show(); 8405 } else { 8406 $('#bookmarkEmpty').hide(); 8407 } 8408}
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.