24 lines
145 KiB
JavaScript
24 lines
145 KiB
JavaScript
|
|
/*!
|
||
|
|
* @cycjimmy/swiper-animation v6.0.2
|
||
|
|
* Homepage: https://github.com/cycjimmy/swiper-animation#readme
|
||
|
|
* Released under the MIT License.
|
||
|
|
*/
|
||
|
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SwiperAnimation=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function n(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var r=!1,o=function(){return!!window.Promise},s=t=>{return e=t,"Array"===Object.prototype.toString.call(e).slice(8,-1)?t:(t=>"[object NodeList]"===Object.prototype.toString.call(t))(t)?Array.from?Array.from(t):Array.prototype.slice.call(t):new Array(t);var e},c="visibility: hidden;",l=t=>"Promise"===Object.prototype.toString.call(t).slice(8,-1),u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return l(t)?t:new Promise((n=>{t(),setTimeout(n,e)}))},m=["animated","animate__animated"],f=function(){function e(n){t(this,e),this.swiper=n,this.container=function(t){if(t.el)return t.el;if(t.container)return t.container[0];throw new Error("Illegal swiper instance")}(this.swiper),this.animationElements=[].concat(i(s(this.container.querySelectorAll("[data-swiper-animation]"))),i(s(this.container.querySelectorAll("[data-swiper-animation-once]")))),this.activeElements=[],this.animationElements.forEach((function(t){t.animationData={styleCache:t.attributes.style?c+t.style.cssText:c,effect:t.dataset.swiperAnimation||t.dataset.swiperAnimationOnce||"",duration:t.dataset.duration||".5s",delay:t.dataset.delay||".5s",outEffect:t.dataset.swiperOutAnimation||"",outDuration:t.dataset.outDuration||".5s",isRecovery:!0,runOnce:!!t.dataset.swiperAnimationOnce},t.style.cssText=t.animationData.styleCache}))}return n(e,[{key:"animate",value:function(){var t=this;return Promise.resolve().then((function(){return e=t.activeElements,n=e.map((function(t){return t.animationData.isRecovery?Promise.resolve():t.animationData.outEffect?u((function(){t.style.cssText=t.animationData.styleCache,t.style.visibility="visible",t.style.cssText+=" animation-duration:".concat(t.animationData.outDuration,"; -webkit-animation-duration:").concat(t.animationData.outDuration,";"),t.classList.add(t.animationData.outEffect,"animated")}),500):Promise.resolve()})),Promise.all(n);var e,n})).then((function(){return e=t.activeElements,n=e.map((function(t){return t.animationData.isRecovery||t.animationData.runOnce?Promise.resolve():u((function(){var e;t.style.cssText=t.animationData.styleCache,(e=t.classList).remove.apply(e,i([t.animationData.effect,t.animationData.outEffect].concat(i(m)).filter((function(t){return!!t})))),t.animationData.isRecovery=!0}))})),Promise.all(n);var e,n})).then((function(){return e=t._updateActiveElements(),n=e.map((function(t){return t.animationData?u((function(){var e;t.style.visibility="visible",t.style.cssText+=" animation-duration:".concat(t.animationData.duration,"; -webkit-animation-duration:").concat(t.animationData.duration,"; animation-delay:").concat(t.animationData.delay,"; -webkit-animation-delay:").concat(t.animationData.delay,";"),(e=t.classList).add.apply(e,[t.animat
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Swiper 8.3.2
|
||
|
|
* Most modern mobile touch slider and framework with hardware accelerated transitions
|
||
|
|
* https://swiperjs.com
|
||
|
|
*
|
||
|
|
* Copyright 2014-2022 Vladimir Kharlampidi
|
||
|
|
*
|
||
|
|
* Released under the MIT License
|
||
|
|
*
|
||
|
|
* Released on: July 26, 2022
|
||
|
|
*/
|
||
|
|
|
||
|
|
!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){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(s,a){void 0===s&&(s={}),void 0===a&&(a={}),Object.keys(a).forEach((i=>{void 0===s[i]?s[i]=a[i]:e(a[i])&&e(s[i])&&Object.keys(a[i]).length>0&&t(s[i],a[i])}))}const s={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function a(){const e="undefined"!=typeof document?document:{};return t(e,s),e}const i={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function r(){const e="undefined"!=typeof window?window:{};return t(e,i),e}class n extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function l(e){void 0===e&&(e=[]);const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...l(e)):t.push(e)})),t}function o(e,t){return Array.prototype.filter.call(e,t)}function d(e,t){const s=r(),i=a();let l=[];if(!t&&e instanceof n)return e;if(!e)return new n(l);if("string"==typeof e){const s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){let e="div";0===s.indexOf("<li")&&(e="ul"),0===s.indexOf("<tr")&&(e="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(e="tr"),0===s.indexOf("<tbody")&&(e="table"),0===s.indexOf("<option")&&(e="select");const t=i.createElement(e);t.innerHTML=s;for(let e=0;e<t.childNodes.length;e+=1)l.push(t.childNodes[e])}else l=function(e,t){if("string"!=typeof e)return[e];const s=[],a=t.querySelectorAll(e);for(let e=0;e<a.length;e+=1)s.push(a[e]);return s}(e.trim(),t||i)}else if(e.nodeType||e===s||e===i)l.push(e);else if(Array.isArray(e)){if(e instanceof n)return e;l=e}return new n(function(e){const t=[];for(let s=0;s<e.length;s+=1)-1===t.indexOf(e[s])&&t.push(e[s]);return t}(l))}d.fn=n.prototype;const c={addClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.add(...a)})),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.remove(...a)})),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));return o(this,(e=>a.filter((t=>e.classList.contains(t))).length>0)).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];const a=l(t.map((e=>e.split(" "))));this.forEach((e=>{a.forEach((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(let s=0;s<this.length;s+=1)if(2===arguments.length)this[s].setAttribute(e,t);else for(const t in e)this[s][t]=e[t],this[s].setAttribute(t,e[t]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(let t=0;t<this.length;t+=1)this[t].style
|
||
|
|
//# sourceMappingURL=swiper-bundle.min.js.map
|
||
|
|
|