/*! For license information please see contentCarousel.bundle.js.LICENSE.txt */
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=145)}({145:function(t,e,n){t.exports=n(149)},146:function(t,e,n){var i=function(t){"use strict";var e,n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function h(t,e,n,i){var o=e&&e.prototype instanceof g?e:g,s=Object.create(o.prototype),a=new A(i||[]);return r(s,"_invoke",{value:C(t,n,a)}),s}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var f="suspendedStart",p="executing",v="completed",d={};function g(){}function m(){}function y(){}var T={};u(T,s,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(P([])));b&&b!==n&&i.call(b,s)&&(T=b);var w=y.prototype=g.prototype=Object.create(T);function x(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function n(r,o,s,a){var c=l(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&i.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,a)}))}a(c.arg)}var o;r(this,"_invoke",{value:function(t,i){function r(){return new e((function(e,r){n(t,i,e,r)}))}return o=o?o.then(r,r):r()}})}function C(t,e,n){var i=f;return function(r,o){if(i===p)throw new Error("Generator is already running");if(i===v){if("throw"===r)throw o;return O()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=_(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=p;var c=l(t,e,n);if("normal"===c.type){if(i=n.done?v:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function _(t,n){var i=n.method,r=t.iterator[i];if(r===e)return n.delegate=null,"throw"===i&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),d;var o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var s=o.arg;return s?s.done?(n[t.resultName]=s.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(t){if(t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:O}}function O(){return{value:e,done:!0}}return m.prototype=y,r(w,"constructor",{value:y,configurable:!0}),r(y,"constructor",{value:m,configurable:!0}),m.displayName=u(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},x(L.prototype),u(L.prototype,a,(function(){return this})),t.AsyncIterator=L,t.async=function(e,n,i,r,o){void 0===o&&(o=Promise);var s=new L(h(e,n,i,r),o);return t.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},x(w),u(w,c,"Generator"),u(w,s,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(i,r){return a.type="throw",a.arg=t,n.next=i,r&&(n.method="next",n.arg=e),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),u=i.call(s,"finallyLoc");if(c&&u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var r=i.arg;S(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:P(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=i}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},149:function(t,e,n){"use strict";n.r(e);n(146);var i=n(3),r=n.n(i),o=n(2);function s(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 a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"handleControlAction",(function(t,e,i){switch(t){case"goTo":n.goTo(e);break;case"prev":n.previous(i);break;case"next":n.next(i);break;default:console.error("The content rotator does not have a handler for the method: "+t)}})),a(this,"next",(function(t){1!==n.count&&(n.activeIndex>=n.count-1?n.goTo(0,"next"):n.goTo(n.activeIndex+1,"next"))})),a(this,"previous",(function(t){1!==n.count&&(n.activeIndex<=0?n.goTo(n.count-1,"prev"):n.goTo(n.activeIndex-1,"prev"))})),a(this,"goTo",(function(t,e){try{n.subComponents.length>0&&n.subComponents.forEach((function(n){n.transitionTo(t,e)}))}catch(t){console.error(t)}n.activeIndex=t})),this.activeIndex=0,this.count=0,this.subComponents=[],this.controlElements=[],this.swipeController=new r.a.Manager(e),this.swipeController.add(new r.a.Swipe({direction:r.a.DIRECTION_HORIZONTAL})),this.swipeController.on("swipeleft",this.next),this.swipeController.on("swiperight",this.previous),Object(o.c)(e)}var e,n,i;return e=t,(n=[{key:"registerControl",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t.addEventListener("click",this.handleControlAction.bind(this,e,parseInt(n))),this.controlElements.push(t)}},{key:"registerSubComponent",value:function(t){this.subComponents.push(t),"function"==typeof t.getCount&&(this.count=t.getCount())}}])&&s(e.prototype,n),i&&s(e,i),t}();function u(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)}}var h=function(){function t(e){var n,i,r,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(){var t=0;o.cards.forEach((function(e){var n=getComputedStyle(e).display;e.style.height="auto","none"===n&&(e.style.display="block"),e.offsetHeight>t&&(t=e.offsetHeight),e.style.display="",e.style.height=t+"px"})),o.cardContainer.style.height=t+"px"},(i="setContainerHeight")in(n=this)?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,this.cardContainer=e,this.cards=[],this.cardCount=0,this.isAnimating=!1,this.activeIndex=0,this.setUpCards(),this.setContainerHeight(),window.addEventListener("resize",this.setContainerHeight)}var e,n,i;return e=t,(n=[{key:"setUpCards",value:function(){this.cards=Array.from(this.cardContainer.querySelectorAll(".content-carousel__text-slide")),this.cardCount=this.cards.length}},{key:"getCount",value:function(){return this.cardCount}},{key:"transitionTo",value:function(t,e){if(!this.isAnimating){this.isAnimating=!0;var n=this.cards[this.activeIndex],i=this.cards[t];"prev"===e?this.transitionRight(n,i):this.transitionLeft(n,i),this.activeIndex=t,this.isAnimating=!1}}},{key:"transitionRight",value:function(t,e){t.classList.add("right"),e.classList.remove("right","left"),e.classList.add("left"),setTimeout((function(){t.classList.remove("active"),e.classList.add("active")}),1),setTimeout((function(){t.classList.remove("right","left"),e.classList.remove("left")}),250)}},{key:"transitionLeft",value:function(t,e){t.classList.add("left"),e.classList.remove("left","right"),e.classList.add("right"),setTimeout((function(){t.classList.remove("active"),e.classList.add("active")}),1),setTimeout((function(){t.classList.remove("left","right"),e.classList.remove("right")}),250)}}])&&u(e.prototype,n),i&&u(e,i),t}();function l(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)}}var f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=e,this.activeIndex=0,this.isAnimating=!1,this.slideCount=0,this.slides=[],this.setupSlides()}var e,n,i;return e=t,(n=[{key:"setupSlides",value:function(){var t=Array.from(this.container.querySelectorAll(".content-carousel__image"));this.slides=t,this.slideCount=t.length,t.forEach((function(t){t.classList.contains("content-carousel__image--has-cta")&&t.dataset.url&&t.addEventListener("click",(function(e){window.location=t.dataset.url}))}))}},{key:"getCount",value:function(){return this.slideCount}},{key:"transitionTo",value:function(t,e){if(this.isAnimating)return!1;this.isAnimating=!0;var n=this.slides[this.activeIndex],i=this.slides[t];"prev"===e?this.transitionRight(n,i):this.transitionLeft(n,i),this.activeIndex=t,this.isAnimating=!1}},{key:"transitionRight",value:function(t,e){t.classList.add("right"),e.classList.remove("right","left"),e.classList.add("left"),setTimeout((function(){t.classList.remove("active"),e.classList.add("active")}),1),setTimeout((function(){t.classList.remove("right","left"),e.classList.remove("left")}),250)}},{key:"transitionLeft",value:function(t,e){t.classList.add("left"),e.classList.remove("left","right"),e.classList.add("right"),setTimeout((function(){t.classList.remove("active"),e.classList.add("active")}),1),setTimeout((function(){t.classList.remove("left","right"),e.classList.remove("right")}),250)}}])&&l(e.prototype,n),i&&l(e,i),t}();function p(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)}}var v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeCount=e.querySelector(".content-carousel__counter-current")}var e,n,i;return e=t,(n=[{key:"transitionTo",value:function(t){this.activeCount.innerText=t+1}}])&&p(e.prototype,n),i&&p(e,i),t}();function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var g=function t(e){d(this,t);var n=e.querySelector(".content-carousel__text-container"),i=e.querySelector(".content-carousel__images-container"),r=e.querySelector(".content-carousel__next"),o=e.querySelector(".content-carousel__counter"),s=new h(n),a=new f(i);this.contentRotator=new c(e),this.contentRotator.registerSubComponent(s),this.contentRotator.registerSubComponent(a),this.contentRotator.registerControl(r,"next"),o&&this.contentRotator.registerSubComponent(new v(o))};new function t(){d(this,t),document.querySelectorAll(".content-carousel").forEach((function(t){return new g(t)}))}},2:function(t,e,n){"use strict";function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2?arguments[2]:void 0,i=Date.now(),r=null;return function(){var o=this,s=arguments,a=Date.now();function c(){t.apply(o,s),r=null}a-i>e&&(t.apply(o,s),i=a,n&&(clearTimeout(r),r=setTimeout(c,e||100)))}}function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:function(t){return t>0},y:function(t){return t>0}},n=null,i=function(e,n){(t.scrollHeight-t.scrollTop<=t.clientHeight&&e>0||0===t.scrollTop&&e<0)&&n.preventDefault()},r=function(){return e.x(window.innerWidth)&&e.y(window.innerHeight)},o=function(t){if(!r())return!1;1===t.targetTouches.length&&(n=t.targetTouches[0].clientY)},s=function(t){if(!r())return!1;var e=t.targetTouches[0].clientY-n;if(1!==t.targetTouches.length)return t;i(-e,t),t.stopPropagation(),t.stopImmediatePropagation()},a=function(t){var e=t.deltaY;if(!r())return!1;i(e,t),t.stopPropagation(),t.stopImmediatePropagation()};t.addEventListener("touchstart",o),t.addEventListener("touchmove",s,{passive:!1}),t.addEventListener("wheel",a,{passive:!1})}function o(t,e){return(Array.from(t.path)||function(t,e){var n=[],i=t.target,r=e||document.body;for(;i!==r;)n.push(i),i=i.parentNode;return n}(e)).some((function(t){return t===e}))}function s(t){var e=0,n=0;function i(t){var i=t.screenX,r=t.screenY;Math.sqrt(Math.pow(i-e,2)+Math.pow(r-n,2))>10&&(t.preventDefault(),t.stopPropagation())}t.addEventListener("mousedown",(function(t){e=t.screenX,n=t.screenY})),t.addEventListener("mouseup",i),t.addEventListener("click",i)}n.d(e,"d",(function(){return i})),n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s}))},3:function(t,e,n){var i;!function(r,o,s,a){"use strict";var c,u=["","webkit","Moz","MS","ms","o"],h=o.createElement("div"),l=Math.round,f=Math.abs,p=Date.now;function v(t,e,n){return setTimeout(b(t,n),e)}function d(t,e,n){return!!Array.isArray(t)&&(g(t,n[e],n),!0)}function g(t,e,n){var i;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(i=0;i<t.length;)e.call(n,t[i],i,t),i++;else for(i in t)t.hasOwnProperty(i)&&e.call(n,t[i],i,t)}function m(t,e,n){var i="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=r.console&&(r.console.warn||r.console.log);return o&&o.call(r.console,i,n),t.apply(this,arguments)}}c="function"!=typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==a&&null!==i)for(var r in i)i.hasOwnProperty(r)&&(e[r]=i[r])}return e}:Object.assign;var y=m((function(t,e,n){for(var i=Object.keys(e),r=0;r<i.length;)(!n||n&&t[i[r]]===a)&&(t[i[r]]=e[i[r]]),r++;return t}),"extend","Use `assign`."),T=m((function(t,e){return y(t,e,!0)}),"merge","Use `assign`.");function E(t,e,n){var i,r=e.prototype;(i=t.prototype=Object.create(r)).constructor=t,i._super=r,n&&c(i,n)}function b(t,e){return function(){return t.apply(e,arguments)}}function w(t,e){return"function"==typeof t?t.apply(e&&e[0]||a,e):t}function x(t,e){return t===a?e:t}function L(t,e,n){g(S(e),(function(e){t.addEventListener(e,n,!1)}))}function C(t,e,n){g(S(e),(function(e){t.removeEventListener(e,n,!1)}))}function _(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function I(t,e){return t.indexOf(e)>-1}function S(t){return t.trim().split(/\s+/g)}function A(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var i=0;i<t.length;){if(n&&t[i][n]==e||!n&&t[i]===e)return i;i++}return-1}function P(t){return Array.prototype.slice.call(t,0)}function O(t,e,n){for(var i=[],r=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];A(r,s)<0&&i.push(t[o]),r[o]=s,o++}return n&&(i=e?i.sort((function(t,n){return t[e]>n[e]})):i.sort()),i}function k(t,e){for(var n,i,r=e[0].toUpperCase()+e.slice(1),o=0;o<u.length;){if((i=(n=u[o])?n+r:e)in t)return i;o++}return a}var R=1;function D(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||r}var j="ontouchstart"in r,M=k(r,"PointerEvent")!==a,N=j&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),Y="touch",z="mouse",X=24,F=["x","y"],q=["clientX","clientY"];function H(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){w(t.options.enable,[t])&&n.handler(e)},this.init()}function W(t,e,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&e&&i-r==0,s=12&e&&i-r==0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,i=e.pointers,r=i.length;n.firstInput||(n.firstInput=G(e));r>1&&!n.firstMultiple?n.firstMultiple=G(e):1===r&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,c=s?s.center:o.center,u=e.center=U(i);e.timeStamp=p(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=$(c,u),e.distance=B(c,u),function(t,e){var n=e.center,i=t.offsetDelta||{},r=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(r=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=t.offsetDelta={x:n.x,y:n.y});e.deltaX=r.x+(n.x-i.x),e.deltaY=r.y+(n.y-i.y)}(n,e),e.offsetDirection=Z(e.deltaX,e.deltaY);var h=V(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=h.x,e.overallVelocityY=h.y,e.overallVelocity=f(h.x)>f(h.y)?h.x:h.y,e.scale=s?(l=s.pointers,v=i,B(v[0],v[1],q)/B(l[0],l[1],q)):1,e.rotation=s?function(t,e){return $(e[1],e[0],q)+$(t[1],t[0],q)}(s.pointers,i):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,i,r,o,s=t.lastInterval||e,c=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(c>25||s.velocity===a)){var u=e.deltaX-s.deltaX,h=e.deltaY-s.deltaY,l=V(c,u,h);i=l.x,r=l.y,n=f(l.x)>f(l.y)?l.x:l.y,o=Z(u,h),t.lastInterval=e}else n=s.velocity,i=s.velocityX,r=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=i,e.velocityY=r,e.direction=o}(n,e);var l,v;var d=t.element;_(e.srcEvent.target,d)&&(d=e.srcEvent.target);e.target=d}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function G(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:l(t.pointers[n].clientX),clientY:l(t.pointers[n].clientY)},n++;return{timeStamp:p(),pointers:e,center:U(e),deltaX:t.deltaX,deltaY:t.deltaY}}function U(t){var e=t.length;if(1===e)return{x:l(t[0].clientX),y:l(t[0].clientY)};for(var n=0,i=0,r=0;r<e;)n+=t[r].clientX,i+=t[r].clientY,r++;return{x:l(n/e),y:l(i/e)}}function V(t,e,n){return{x:e/t||0,y:n/t||0}}function Z(t,e){return t===e?1:f(t)>=f(e)?t<0?2:4:e<0?8:16}function B(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return Math.sqrt(i*i+r*r)}function $(t,e,n){n||(n=F);var i=e[n[0]]-t[n[0]],r=e[n[1]]-t[n[1]];return 180*Math.atan2(r,i)/Math.PI}H.prototype={handler:function(){},init:function(){this.evEl&&L(this.element,this.evEl,this.domHandler),this.evTarget&&L(this.target,this.evTarget,this.domHandler),this.evWin&&L(D(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&C(this.element,this.evEl,this.domHandler),this.evTarget&&C(this.target,this.evTarget,this.domHandler),this.evWin&&C(D(this.element),this.evWin,this.domHandler)}};var J={mousedown:1,mousemove:2,mouseup:4},K="mousedown",Q="mousemove mouseup";function tt(){this.evEl=K,this.evWin=Q,this.pressed=!1,H.apply(this,arguments)}E(tt,H,{handler:function(t){var e=J[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:z,srcEvent:t}))}});var et={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},nt={2:Y,3:"pen",4:z,5:"kinect"},it="pointerdown",rt="pointermove pointerup pointercancel";function ot(){this.evEl=it,this.evWin=rt,H.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}r.MSPointerEvent&&!r.PointerEvent&&(it="MSPointerDown",rt="MSPointerMove MSPointerUp MSPointerCancel"),E(ot,H,{handler:function(t){var e=this.store,n=!1,i=t.type.toLowerCase().replace("ms",""),r=et[i],o=nt[t.pointerType]||t.pointerType,s=o==Y,a=A(e,t.pointerId,"pointerId");1&r&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&r&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var st={touchstart:1,touchmove:2,touchend:4,touchcancel:8},at="touchstart",ct="touchstart touchmove touchend touchcancel";function ut(){this.evTarget=at,this.evWin=ct,this.started=!1,H.apply(this,arguments)}function ht(t,e){var n=P(t.touches),i=P(t.changedTouches);return 12&e&&(n=O(n.concat(i),"identifier",!0)),[n,i]}E(ut,H,{handler:function(t){var e=st[t.type];if(1===e&&(this.started=!0),this.started){var n=ht.call(this,t,e);12&e&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Y,srcEvent:t})}}});var lt={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ft="touchstart touchmove touchend touchcancel";function pt(){this.evTarget=ft,this.targetIds={},H.apply(this,arguments)}function vt(t,e){var n=P(t.touches),i=this.targetIds;if(3&e&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,s=P(t.changedTouches),a=[],c=this.target;if(o=n.filter((function(t){return _(t.target,c)})),1===e)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<s.length;)i[s[r].identifier]&&a.push(s[r]),12&e&&delete i[s[r].identifier],r++;return a.length?[O(o.concat(a),"identifier",!0),a]:void 0}E(pt,H,{handler:function(t){var e=lt[t.type],n=vt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:Y,srcEvent:t})}});function dt(){H.apply(this,arguments);var t=b(this.handler,this);this.touch=new pt(this.manager,t),this.mouse=new tt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function gt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,mt.call(this,e)):12&t&&mt.call(this,e)}function mt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var t=i.indexOf(n);t>-1&&i.splice(t,1)}),2500)}}function yt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(e-r.x),s=Math.abs(n-r.y);if(o<=25&&s<=25)return!0}return!1}E(dt,H,{handler:function(t,e,n){var i=n.pointerType==Y,r=n.pointerType==z;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)gt.call(this,e,n);else if(r&&yt.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var Tt=k(h.style,"touchAction"),Et=Tt!==a,bt="compute",wt="auto",xt="manipulation",Lt="none",Ct="pan-x",_t="pan-y",It=function(){if(!Et)return!1;var t={},e=r.CSS&&r.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||r.CSS.supports("touch-action",n)})),t}();function St(t,e){this.manager=t,this.set(e)}St.prototype={set:function(t){t==bt&&(t=this.compute()),Et&&this.manager.element.style&&It[t]&&(this.manager.element.style[Tt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return g(this.manager.recognizers,(function(e){w(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(I(t,Lt))return Lt;var e=I(t,Ct),n=I(t,_t);if(e&&n)return Lt;if(e||n)return e?Ct:_t;if(I(t,xt))return xt;return wt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var i=this.actions,r=I(i,Lt)&&!It.none,o=I(i,_t)&&!It["pan-y"],s=I(i,Ct)&&!It["pan-x"];if(r){var a=1===t.pointers.length,c=t.distance<2,u=t.deltaTime<250;if(a&&c&&u)return}if(!s||!o)return r||o&&6&n||s&&n&X?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var At=32;function Pt(t){this.options=c({},this.defaults,t||{}),this.id=R++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Ot(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function kt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Rt(t,e){var n=e.manager;return n?n.get(t):t}function Dt(){Pt.apply(this,arguments)}function jt(){Dt.apply(this,arguments),this.pX=null,this.pY=null}function Mt(){Dt.apply(this,arguments)}function Nt(){Pt.apply(this,arguments),this._timer=null,this._input=null}function Yt(){Dt.apply(this,arguments)}function zt(){Dt.apply(this,arguments)}function Xt(){Pt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Ft(t,e){return(e=e||{}).recognizers=x(e.recognizers,Ft.defaults.preset),new qt(t,e)}Pt.prototype={defaults:{},set:function(t){return c(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(d(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Rt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return d(t,"dropRecognizeWith",this)||(t=Rt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(d(t,"requireFailure",this))return this;var e=this.requireFail;return-1===A(e,t=Rt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(d(t,"dropRequireFailure",this))return this;t=Rt(t,this);var e=A(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function i(n){e.manager.emit(n,t)}n<8&&i(e.options.event+Ot(n)),i(e.options.event),t.additionalEvent&&i(t.additionalEvent),n>=8&&i(e.options.event+Ot(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=At},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=c({},t);if(!w(this.options.enable,[this,e]))return this.reset(),void(this.state=At);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},E(Dt,Pt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,i=6&e,r=this.attrTest(t);return i&&(8&n||!r)?16|e:i||r?4&n?8|e:2&e?4|e:2:At}}),E(jt,Dt,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(_t),t&X&&e.push(Ct),e},directionTest:function(t){var e=this.options,n=!0,i=t.distance,r=t.direction,o=t.deltaX,s=t.deltaY;return r&e.direction||(6&e.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(t.deltaX)):(r=0===s?1:s<0?8:16,n=s!=this.pY,i=Math.abs(t.deltaY))),t.direction=r,n&&i>e.threshold&&r&e.direction},attrTest:function(t){return Dt.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=kt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),E(Mt,Dt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Lt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),E(Nt,Pt,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[wt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!i||!n||12&t.eventType&&!r)this.reset();else if(1&t.eventType)this.reset(),this._timer=v((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return At},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),E(Yt,Dt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Lt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),E(zt,Dt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return jt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:n&X&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=kt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),E(Xt,Pt,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[xt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,i=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||B(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=v((function(){this.state=8,this.tryEmit()}),e.interval,this),2):8}return At},failTimeout:function(){return this._timer=v((function(){this.state=At}),this.options.interval,this),At},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Ft.VERSION="2.0.7",Ft.defaults={domEvents:!1,touchAction:bt,enable:!0,inputTarget:null,inputClass:null,preset:[[Yt,{enable:!1}],[Mt,{enable:!1},["rotate"]],[zt,{direction:6}],[jt,{direction:6},["swipe"]],[Xt],[Xt,{event:"doubletap",taps:2},["tap"]],[Nt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function qt(t,e){var n;this.options=c({},Ft.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(M?ot:N?pt:j?dt:tt))(n,W),this.touchAction=new St(this,this.options.touchAction),Ht(this,!0),g(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Ht(t,e){var n,i=t.element;i.style&&(g(t.options.cssProps,(function(r,o){n=k(i.style,o),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}qt.prototype={set:function(t){return c(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var i=this.recognizers,r=e.curRecognizer;(!r||r&&8&r.state)&&(r=e.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===e.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(t),!r&&14&n.state&&(r=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Pt)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(d(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(d(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=A(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return g(S(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==a){var n=this.handlers;return g(S(t),(function(t){e?n[t]&&n[t].splice(A(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](e),i++}},destroy:function(){this.element&&Ht(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},c(Ft,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:At,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:X,DIRECTION_ALL:30,Manager:qt,Input:H,TouchAction:St,TouchInput:pt,MouseInput:tt,PointerEventInput:ot,TouchMouseInput:dt,SingleTouchInput:ut,Recognizer:Pt,AttrRecognizer:Dt,Tap:Xt,Pan:jt,Swipe:zt,Pinch:Mt,Rotate:Yt,Press:Nt,on:L,off:C,each:g,merge:T,extend:y,assign:c,inherit:E,bindFn:b,prefixed:k}),(void 0!==r?r:"undefined"!=typeof self?self:{}).Hammer=Ft,(i=function(){return Ft}.call(e,n,e,t))===a||(t.exports=i)}(window,document)}});