/*! * @splidejs/splide-extension-auto-scroll * Version : 0.5.3 * License : MIT * Copyright: 2022 Naotoshi Fujita */ !function(S){"function"==typeof define&&define.amd?define(S):S()}(function(){"use strict";function D(n,t,r){return Array.prototype.slice.call(n,t,r)}function _(n){return n.bind.apply(n,[null].concat(D(arguments,1)))}function q(n){return requestAnimationFrame(n)}function C(n,t){return typeof t===n}var z=Array.isArray;function B(n){return z(n)?n:[n]}function H(n,t){B(n).forEach(t)}_(C,"function"),_(C,"string"),_(C,"undefined");var cn=Object.keys;var ln=Math.min,K="move",J="moved",Q="drag",U="scroll",W="scrolled";function hn(n){var t=n?n.event.bus:document.createDocumentFragment(),r=function(){var n=[];function o(u,s,a){H(u,function(d){d&&H(s,function(f){f.split(" ").forEach(function(v){var l=v.split(".");a(d,l[0],l[1])})})})}return{bind:function(u,s,a,d){o(u,s,function(f,v,l){var h="addEventListener"in f,w=h?f.removeEventListener.bind(f,v,a,d):f.removeListener.bind(f,a);h?f.addEventListener(v,a,d):f.addListener(a),n.push([f,v,l,a,w])})},unbind:function(u,s,a){o(u,s,function(d,f,v){n=n.filter(function(l){return!!(l[0]!==d||l[1]!==f||l[2]!==v||a&&l[3]!==a)||(l[4](),!1)})})},dispatch:function(u,s,a){var d;return"function"==typeof CustomEvent?d=new CustomEvent(s,{bubbles:!0,detail:a}):(d=document.createEvent("CustomEvent")).initCustomEvent(s,!0,!1,a),u.dispatchEvent(d),d},destroy:function(){n.forEach(function(u){u[4]()}),function(n){n.length=0}(n)}}}();return n&&n.event.on("destroy",r.destroy),function(n){return D(arguments,1).forEach(function(t){!function(n,t){if(n)for(var e=cn(n),o=0;o=1&&(t(),c=o(),e&&++d>=e))return l();q(f)}}function l(){a=!0}function w(){s&&cancelAnimationFrame(s),u=0,s=0,a=!0}return{start:function(E){!E&&w(),c=o()-(E?u*n:0),a=!1,q(f)},rewind:function(){c=o(),u=0,r&&r(u)},pause:l,cancel:w,set:function(E){n=E},isPaused:function(){return a}}}function X(n,t,r){return Array.prototype.slice.call(n,t,r)}function V(n){return n.bind.apply(n,[null].concat(X(arguments,1)))}function L(n,t){return typeof t===n}function $(n){return!Z(n)&&L("object",n)}var bn=Array.isArray;V(L,"function"),V(L,"string");var Sn=V(L,"undefined");function Z(n){return null===n}function O(n,t){(function(n){return bn(n)?n:[n]})(n).forEach(t)}var On=Object.keys;function j(n,t,r){if(n){var e=On(n);e=r?e.reverse():e;for(var o=0;o0?0:t.Controller.getEnd())),Mn()}function an(){if(E){var i=A?"startScroll":"pauseScroll";(function(n,t,r){n&&O("is-active",function(e){e&&n.classList[r?"add":"remove"](e)})})(E,0,!A),nn(E,"aria-label",r.i18n[i]||Vn[i])}}function G(){return!m||m.isPaused()}return{setup:function(){var i=r.autoScroll;p=k({},Cn,$(i)?i:{})},mount:on,destroy:un,play:y,pause:b,isPaused:G}})}); //# sourceURL=https://8117914.fs1.hubspotusercontent-na1.net/hubfs/8117914/hub_generated/template_assets/1/155681921196/1765937410203/template_splide-autoscroll.js