node-red-contrib-discovergy-meter
Version:
Allows to work with a Discovergy Smart Meter (Electricity only) within Node RED flows
1 lines • 122 kB
JavaScript
$(document).ready((function(){$("[data-bs-hover-animate]").mouseenter((function(){var e=$(this);e.addClass("animated "+e.attr("data-bs-hover-animate"))})).mouseleave((function(){var e=$(this);e.removeClass("animated "+e.attr("data-bs-hover-animate"))}))})),Chart.pluginService.register({beforeDraw:function(e){if(e.config.options.elements.center){var t=e.chart.ctx,a=e.config.options.elements.center,i=a.fontStyle||"Arial",s=a.text,r=a.color||"#000",n=a.maxFontSize||75,o=(a.sidePadding||20)/100*(2*e.innerRadius);t.font="30px "+i;var l=t.measureText(s).width,d=2*e.innerRadius-o,p=d/l,c=Math.floor(30*p),u=2*e.innerRadius,h=Math.min(c,u,n),v=a.minFontSize,f=a.lineHeight||25,m=!1;void 0===v&&(v=20),v&&h<v&&(h=v,m=!0),t.textAlign="center",t.textBaseline="middle";var g=(e.chartArea.left+e.chartArea.right)/2,b=(e.chartArea.top+e.chartArea.bottom)/2;if(t.font=h+"px "+i,t.fillStyle=r,!m)return void t.fillText(s,g,b);for(var w=s.split(" "),y="",x=[],E=0;E<w.length;E++){var T=y+w[E]+" ";t.measureText(T).width>d&&E>0?(x.push(y),y=w[E]+" "):y=T}b-=x.length/2*f;for(E=0;E<x.length;E++)t.fillText(x[E],g,b),b+=f;t.fillText(y,g,b)}}});var i,acc=document.getElementsByClassName("faq");for(i=0;i<acc.length;i++)acc[i].addEventListener("click",(function(){this.classList.toggle("on");var e=this.nextElementSibling;e.style.maxHeight?e.style.maxHeight=null:e.style.maxHeight=e.scrollHeight+"px"}));!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Swiper=t()}(this,(function(){"use strict";var e="undefined"==typeof document?{body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},location:{hash:""}}:document,t="undefined"==typeof window?{document:e,navigator:{userAgent:""},location:{},history:{},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){}}:window,a=function(e){for(var t=0;t<e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function i(i,s){var r=[],n=0;if(i&&!s&&i instanceof a)return i;if(i)if("string"==typeof i){var o,l,d=i.trim();if(0<=d.indexOf("<")&&0<=d.indexOf(">")){var p="div";for(0===d.indexOf("<li")&&(p="ul"),0===d.indexOf("<tr")&&(p="tbody"),0!==d.indexOf("<td")&&0!==d.indexOf("<th")||(p="tr"),0===d.indexOf("<tbody")&&(p="table"),0===d.indexOf("<option")&&(p="select"),(l=e.createElement(p)).innerHTML=d,n=0;n<l.childNodes.length;n+=1)r.push(l.childNodes[n])}else for(o=s||"#"!==i[0]||i.match(/[ .<>:~]/)?(s||e).querySelectorAll(i.trim()):[e.getElementById(i.trim().split("#")[1])],n=0;n<o.length;n+=1)o[n]&&r.push(o[n])}else if(i.nodeType||i===t||i===e)r.push(i);else if(0<i.length&&i[0].nodeType)for(n=0;n<i.length;n+=1)r.push(i[n]);return new a(r)}function s(e){for(var t=[],a=0;a<e.length;a+=1)-1===t.indexOf(e[a])&&t.push(e[a]);return t}i.fn=a.prototype,i.Class=a,i.Dom7=a;var r={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.add(t[a]);return this},removeClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.remove(t[a]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),a=0;a<t.length;a+=1)for(var i=0;i<this.length;i+=1)void 0!==this[i]&&void 0!==this[i].classList&&this[i].classList.toggle(t[a]);return this},attr:function(e,t){var a=arguments;if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var i=0;i<this.length;i+=1)if(2===a.length)this[i].setAttribute(e,t);else for(var s in e)this[i][s]=e[s],this[i].setAttribute(s,e[s]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){var a;if(void 0!==t){for(var i=0;i<this.length;i+=1)(a=this[i]).dom7ElementDataStorage||(a.dom7ElementDataStorage={}),a.dom7ElementDataStorage[e]=t;return this}if(a=this[0])return a.dom7ElementDataStorage&&e in a.dom7ElementDataStorage?a.dom7ElementDataStorage[e]:a.getAttribute("data-"+e)||void 0},transform:function(e){for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransform=e,a.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var a=this[t].style;a.webkitTransitionDuration=e,a.transitionDuration=e}return this},on:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var s=t[0],r=t[1],n=t[2],o=t[3];function l(e){var t=e.target;if(t){var a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),i(t).is(r))n.apply(t,a);else for(var s=i(t).parents(),o=0;o<s.length;o+=1)i(s[o]).is(r)&&n.apply(s[o],a)}}function d(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof t[1]&&(s=(e=t)[0],n=e[1],o=e[2],r=void 0),o||(o=!1);for(var p,c=s.split(" "),u=0;u<this.length;u+=1){var h=this[u];if(r)for(p=0;p<c.length;p+=1){var v=c[p];h.dom7LiveListeners||(h.dom7LiveListeners={}),h.dom7LiveListeners[v]||(h.dom7LiveListeners[v]=[]),h.dom7LiveListeners[v].push({listener:n,proxyListener:l}),h.addEventListener(v,l,o)}else for(p=0;p<c.length;p+=1){var f=c[p];h.dom7Listeners||(h.dom7Listeners={}),h.dom7Listeners[f]||(h.dom7Listeners[f]=[]),h.dom7Listeners[f].push({listener:n,proxyListener:d}),h.addEventListener(f,d,o)}}return this},off:function(){for(var e,t=[],a=arguments.length;a--;)t[a]=arguments[a];var i=t[0],s=t[1],r=t[2],n=t[3];"function"==typeof t[1]&&(i=(e=t)[0],r=e[1],n=e[2],s=void 0),n||(n=!1);for(var o=i.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],p=0;p<this.length;p+=1){var c=this[p],u=void 0;if(!s&&c.dom7Listeners?u=c.dom7Listeners[d]:s&&c.dom7LiveListeners&&(u=c.dom7LiveListeners[d]),u&&u.length)for(var h=u.length-1;0<=h;h-=1){var v=u[h];r&&v.listener===r?(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1)):r||(c.removeEventListener(d,v.proxyListener,n),u.splice(h,1))}}return this},trigger:function(){for(var a=[],i=arguments.length;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],l=0;l<this.length;l+=1){var d=this[l],p=void 0;try{p=new t.CustomEvent(o,{detail:r,bubbles:!0,cancelable:!0})}catch(a){(p=e.createEvent("Event")).initEvent(o,!0,!0),p.detail=r}d.dom7EventData=a.filter((function(e,t){return 0<t})),d.dispatchEvent(p),d.dom7EventData=[],delete d.dom7EventData}return this},transitionEnd:function(e){var t,a=["webkitTransitionEnd","transitionend"],i=this;function s(r){if(r.target===this)for(e.call(this,r),t=0;t<a.length;t+=1)i.off(a[t],s)}if(e)for(t=0;t<a.length;t+=1)i.on(a[t],s);return this},outerWidth:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(0<this.length){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(0<this.length){var a=this[0],i=a.getBoundingClientRect(),s=e.body,r=a.clientTop||s.clientTop||0,n=a.clientLeft||s.clientLeft||0,o=a===t?t.scrollY:a.scrollTop,l=a===t?t.scrollX:a.scrollLeft;return{top:i.top+o-r,left:i.left+l-n}}return null},css:function(e,a){var i;if(1===arguments.length){if("string"!=typeof e){for(i=0;i<this.length;i+=1)for(var s in e)this[i].style[s]=e[s];return this}if(this[0])return t.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=a;return this}return this},each:function(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(s){var r,n,o=this[0];if(!o||void 0===s)return!1;if("string"==typeof s){if(o.matches)return o.matches(s);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(s);if(o.msMatchesSelector)return o.msMatchesSelector(s);for(r=i(s),n=0;n<r.length;n+=1)if(r[n]===o)return!0;return!1}if(s===e)return o===e;if(s===t)return o===t;if(s.nodeType||s instanceof a){for(r=s.nodeType?[s]:s,n=0;n<r.length;n+=1)if(r[n]===o)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,i=this.length;return new a(i-1<e?[]:e<0?(t=i+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var t,i=[],s=arguments.length;s--;)i[s]=arguments[s];for(var r=0;r<i.length;r+=1){t=i[r];for(var n=0;n<this.length;n+=1)if("string"==typeof t){var o=e.createElement("div");for(o.innerHTML=t;o.firstChild;)this[n].appendChild(o.firstChild)}else if(t instanceof a)for(var l=0;l<t.length;l+=1)this[n].appendChild(t[l]);else this[n].appendChild(t)}return this},prepend:function(t){var i,s,r=this;for(i=0;i<this.length;i+=1)if("string"==typeof t){var n=e.createElement("div");for(n.innerHTML=t,s=n.childNodes.length-1;0<=s;s-=1)r[i].insertBefore(n.childNodes[s],r[i].childNodes[0])}else if(t instanceof a)for(s=0;s<t.length;s+=1)r[i].insertBefore(t[s],r[i].childNodes[0]);else r[i].insertBefore(t,r[i].childNodes[0]);return this},next:function(e){return 0<this.length?e?this[0].nextElementSibling&&i(this[0].nextElementSibling).is(e)?new a([this[0].nextElementSibling]):new a([]):this[0].nextElementSibling?new a([this[0].nextElementSibling]):new a([]):new a([])},nextAll:function(e){var t=[],s=this[0];if(!s)return new a([]);for(;s.nextElementSibling;){var r=s.nextElementSibling;e?i(r).is(e)&&t.push(r):t.push(r),s=r}return new a(t)},prev:function(e){if(0<this.length){var t=this[0];return e?t.previousElementSibling&&i(t.previousElementSibling).is(e)?new a([t.previousElementSibling]):new a([]):t.previousElementSibling?new a([t.previousElementSibling]):new a([])}return new a([])},prevAll:function(e){var t=[],s=this[0];if(!s)return new a([]);for(;s.previousElementSibling;){var r=s.previousElementSibling;e?i(r).is(e)&&t.push(r):t.push(r),s=r}return new a(t)},parent:function(e){for(var t=[],a=0;a<this.length;a+=1)null!==this[a].parentNode&&(e?i(this[a].parentNode).is(e)&&t.push(this[a].parentNode):t.push(this[a].parentNode));return i(s(t))},parents:function(e){for(var t=[],a=0;a<this.length;a+=1)for(var r=this[a].parentNode;r;)e?i(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return i(s(t))},closest:function(e){var t=this;return void 0===e?new a([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].querySelectorAll(e),r=0;r<s.length;r+=1)t.push(s[r]);return new a(t)},children:function(e){for(var t=[],r=0;r<this.length;r+=1)for(var n=this[r].childNodes,o=0;o<n.length;o+=1)e?1===n[o].nodeType&&i(n[o]).is(e)&&t.push(n[o]):1===n[o].nodeType&&t.push(n[o]);return new a(s(t))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,s;for(a=0;a<e.length;a+=1){var r=i(e[a]);for(s=0;s<r.length;s+=1)this[this.length]=r[s],this.length+=1}return this},styles:function(){return this[0]?t.getComputedStyle(this[0],null):{}}};Object.keys(r).forEach((function(e){i.fn[e]=r[e]}));var n,o,l,d={deleteProps:function(e){var t=e;Object.keys(t).forEach((function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,a){var i,s,r;void 0===a&&(a="x");var n=t.getComputedStyle(e,null);return t.WebKitCSSMatrix?(6<(s=n.transform||n.webkitTransform).split(",").length&&(s=s.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),r=new t.WebKitCSSMatrix("none"===s?"":s)):i=(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===a&&(s=t.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===a&&(s=t.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),s||0},parseUrlQuery:function(e){var a,i,s,r,n={},o=e||t.location.href;if("string"==typeof o&&o.length)for(r=(i=(o=-1<o.indexOf("?")?o.replace(/\S*\?/,""):"").split("&").filter((function(e){return""!==e}))).length,a=0;a<r;a+=1)s=i[a].replace(/#\S+/g,"").split("="),n[decodeURIComponent(s[0])]=void 0===s[1]?void 0:decodeURIComponent(s[1])||"";return n},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var a=Object(e[0]),i=1;i<e.length;i+=1){var s=e[i];if(null!=s)for(var r=Object.keys(Object(s)),n=0,o=r.length;n<o;n+=1){var l=r[n],p=Object.getOwnPropertyDescriptor(s,l);void 0!==p&&p.enumerable&&(d.isObject(a[l])&&d.isObject(s[l])?d.extend(a[l],s[l]):!d.isObject(a[l])&&d.isObject(s[l])?(a[l]={},d.extend(a[l],s[l])):a[l]=s[l])}}return a}},p=(l=e.createElement("div"),{touch:t.Modernizr&&!0===t.Modernizr.touch||!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch),pointerEvents:!(!t.navigator.pointerEnabled&&!t.PointerEvent),prefixedPointerEvents:!!t.navigator.msPointerEnabled,transition:(o=l.style,"transition"in o||"webkitTransition"in o||"MozTransition"in o),transforms3d:t.Modernizr&&!0===t.Modernizr.csstransforms3d||(n=l.style,"webkitPerspective"in n||"MozPerspective"in n||"OPerspective"in n||"MsPerspective"in n||"perspective"in n),flexbox:function(){for(var e=l.style,t="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),a=0;a<t.length;a+=1)if(t[a]in e)return!0;return!1}(),observer:"MutationObserver"in t||"WebkitMutationObserver"in t,passiveListener:function(){var e=!1;try{var a=Object.defineProperty({},"passive",{get:function(){e=!0}});t.addEventListener("testPassiveListener",null,a)}catch(e){}return e}(),gestures:"ongesturestart"in t}),c=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach((function(e){t.on(e,t.params.on[e])}))},u={components:{configurable:!0}};c.prototype.on=function(e,t,a){var i=this;if("function"!=typeof t)return i;var s=a?"unshift":"push";return e.split(" ").forEach((function(e){i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][s](t)})),i},c.prototype.once=function(e,t,a){var i=this;return"function"!=typeof t?i:i.on(e,(function a(){for(var s=[],r=arguments.length;r--;)s[r]=arguments[r];t.apply(i,s),i.off(e,a)}),a)},c.prototype.off=function(e,t){var a=this;return a.eventsListeners&&e.split(" ").forEach((function(e){void 0===t?a.eventsListeners[e]=[]:a.eventsListeners[e].forEach((function(i,s){i===t&&a.eventsListeners[e].splice(s,1)}))})),a},c.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var a,i,s,r=this;return r.eventsListeners&&("string"==typeof e[0]||Array.isArray(e[0])?(a=e[0],i=e.slice(1,e.length),s=r):(a=e[0].events,i=e[0].data,s=e[0].context||r),(Array.isArray(a)?a:a.split(" ")).forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(s,i)}))}}))),r},c.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(a){var i=t.modules[a];i.params&&d.extend(e,i.params)}))},c.prototype.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.instance&&Object.keys(i.instance).forEach((function(e){var a=i.instance[e];t[e]="function"==typeof a?a.bind(t):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)}))},u.components.set=function(e){this.use&&this.use(e)},c.installModule=function(e){for(var t=[],a=arguments.length-1;0<a--;)t[a]=arguments[a+1];var i=this;i.prototype.modules||(i.prototype.modules={});var s=e.name||Object.keys(i.prototype.modules).length+"_"+d.now();return(i.prototype.modules[s]=e).proto&&Object.keys(e.proto).forEach((function(t){i.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){i[t]=e.static[t]})),e.install&&e.install.apply(i,t),i},c.use=function(e){for(var t=[],a=arguments.length-1;0<a--;)t[a]=arguments[a+1];var i=this;return Array.isArray(e)?(e.forEach((function(e){return i.installModule(e)})),i):i.installModule.apply(i,[e].concat(t))},Object.defineProperties(c,u);var h={updateSize:function(){var e,t,a=this,i=a.$el;e=void 0!==a.params.width?a.params.width:i[0].clientWidth,t=void 0!==a.params.height?a.params.height:i[0].clientHeight,0===e&&a.isHorizontal()||0===t&&a.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),d.extend(a,{width:e,height:t,size:a.isHorizontal()?e:t}))},updateSlides:function(){var e=this,a=e.params,i=e.$wrapperEl,s=e.size,r=e.rtlTranslate,n=e.wrongRTL,o=e.virtual&&a.virtual.enabled,l=o?e.virtual.slides.length:e.slides.length,c=i.children("."+e.params.slideClass),u=o?e.virtual.slides.length:c.length,h=[],v=[],f=[],m=a.slidesOffsetBefore;"function"==typeof m&&(m=a.slidesOffsetBefore.call(e));var g=a.slidesOffsetAfter;"function"==typeof g&&(g=a.slidesOffsetAfter.call(e));var b=e.snapGrid.length,w=e.snapGrid.length,y=a.spaceBetween,x=-m,E=0,T=0;if(void 0!==s){var S,C;"string"==typeof y&&0<=y.indexOf("%")&&(y=parseFloat(y.replace("%",""))/100*s),e.virtualSize=-y,r?c.css({marginLeft:"",marginTop:""}):c.css({marginRight:"",marginBottom:""}),1<a.slidesPerColumn&&(S=Math.floor(u/a.slidesPerColumn)===u/e.params.slidesPerColumn?u:Math.ceil(u/a.slidesPerColumn)*a.slidesPerColumn,"auto"!==a.slidesPerView&&"row"===a.slidesPerColumnFill&&(S=Math.max(S,a.slidesPerView*a.slidesPerColumn)));for(var M,z=a.slidesPerColumn,k=S/z,P=k-(a.slidesPerColumn*k-u),$=0;$<u;$+=1){C=0;var L=c.eq($);if(1<a.slidesPerColumn){var I=void 0,D=void 0,O=void 0;"column"===a.slidesPerColumnFill?(O=$-(D=Math.floor($/z))*z,(P<D||D===P&&O===z-1)&&z<=(O+=1)&&(O=0,D+=1),I=D+O*S/z,L.css({"-webkit-box-ordinal-group":I,"-moz-box-ordinal-group":I,"-ms-flex-order":I,"-webkit-order":I,order:I})):D=$-(O=Math.floor($/k))*k,L.css("margin-"+(e.isHorizontal()?"top":"left"),0!==O&&a.spaceBetween&&a.spaceBetween+"px").attr("data-swiper-column",D).attr("data-swiper-row",O)}if("none"!==L.css("display")){if("auto"===a.slidesPerView){var A=t.getComputedStyle(L[0],null),H=L[0].style.transform,G=L[0].style.webkitTransform;H&&(L[0].style.transform="none"),G&&(L[0].style.webkitTransform="none"),C=e.isHorizontal()?L[0].getBoundingClientRect().width+parseFloat(A.getPropertyValue("margin-left"))+parseFloat(A.getPropertyValue("margin-right")):L[0].getBoundingClientRect().height+parseFloat(A.getPropertyValue("margin-top"))+parseFloat(A.getPropertyValue("margin-bottom")),H&&(L[0].style.transform=H),G&&(L[0].style.webkitTransform=G),a.roundLengths&&(C=Math.floor(C))}else C=(s-(a.slidesPerView-1)*y)/a.slidesPerView,a.roundLengths&&(C=Math.floor(C)),c[$]&&(e.isHorizontal()?c[$].style.width=C+"px":c[$].style.height=C+"px");c[$]&&(c[$].swiperSlideSize=C),f.push(C),a.centeredSlides?(x=x+C/2+E/2+y,0===E&&0!==$&&(x=x-s/2-y),0===$&&(x=x-s/2-y),Math.abs(x)<.001&&(x=0),a.roundLengths&&(x=Math.floor(x)),T%a.slidesPerGroup==0&&h.push(x),v.push(x)):(a.roundLengths&&(x=Math.floor(x)),T%a.slidesPerGroup==0&&h.push(x),v.push(x),x=x+C+y),e.virtualSize+=C+y,E=C,T+=1}}if(e.virtualSize=Math.max(e.virtualSize,s)+g,r&&n&&("slide"===a.effect||"coverflow"===a.effect)&&i.css({width:e.virtualSize+a.spaceBetween+"px"}),p.flexbox&&!a.setWrapperSize||(e.isHorizontal()?i.css({width:e.virtualSize+a.spaceBetween+"px"}):i.css({height:e.virtualSize+a.spaceBetween+"px"})),1<a.slidesPerColumn&&(e.virtualSize=(C+a.spaceBetween)*S,e.virtualSize=Math.ceil(e.virtualSize/a.slidesPerColumn)-a.spaceBetween,e.isHorizontal()?i.css({width:e.virtualSize+a.spaceBetween+"px"}):i.css({height:e.virtualSize+a.spaceBetween+"px"}),a.centeredSlides)){M=[];for(var N=0;N<h.length;N+=1){var B=h[N];a.roundLengths&&(B=Math.floor(B)),h[N]<e.virtualSize+h[0]&&M.push(B)}h=M}if(!a.centeredSlides){M=[];for(var X=0;X<h.length;X+=1){var Y=h[X];a.roundLengths&&(Y=Math.floor(Y)),h[X]<=e.virtualSize-s&&M.push(Y)}h=M,1<Math.floor(e.virtualSize-s)-Math.floor(h[h.length-1])&&h.push(e.virtualSize-s)}0===h.length&&(h=[0]),0!==a.spaceBetween&&(e.isHorizontal()?r?c.css({marginLeft:y+"px"}):c.css({marginRight:y+"px"}):c.css({marginBottom:y+"px"})),d.extend(e,{slides:c,snapGrid:h,slidesGrid:v,slidesSizesGrid:f}),u!==l&&e.emit("slidesLengthChange"),h.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),v.length!==w&&e.emit("slidesGridLengthChange"),(a.watchSlidesProgress||a.watchSlidesVisibility)&&e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,a=this,i=[],s=0;if("number"==typeof e?a.setTransition(e):!0===e&&a.setTransition(a.params.speed),"auto"!==a.params.slidesPerView&&1<a.params.slidesPerView)for(t=0;t<Math.ceil(a.params.slidesPerView);t+=1){var r=a.activeIndex+t;if(r>a.slides.length)break;i.push(a.slides.eq(r)[0])}else i.push(a.slides.eq(a.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var n=i[t].offsetHeight;s=s<n?n:s}s&&a.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.slides,s=t.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();var r=-e;s&&(r=e),i.removeClass(a.slideVisibleClass);for(var n=0;n<i.length;n+=1){var o=i[n],l=(r+(a.centeredSlides?t.minTranslate():0)-o.swiperSlideOffset)/(o.swiperSlideSize+a.spaceBetween);if(a.watchSlidesVisibility){var d=-(r-o.swiperSlideOffset),p=d+t.slidesSizesGrid[n];(0<=d&&d<t.size||0<p&&p<=t.size||d<=0&&p>=t.size)&&i.eq(n).addClass(a.slideVisibleClass)}o.progress=s?-l:l}}},updateProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,a=t.params,i=t.maxTranslate()-t.minTranslate(),s=t.progress,r=t.isBeginning,n=t.isEnd,o=r,l=n;0===i?n=r=!(s=0):(r=(s=(e-t.minTranslate())/i)<=0,n=1<=s),d.extend(t,{progress:s,isBeginning:r,isEnd:n}),(a.watchSlidesProgress||a.watchSlidesVisibility)&&t.updateSlidesProgress(e),r&&!o&&t.emit("reachBeginning toEdge"),n&&!l&&t.emit("reachEnd toEdge"),(o&&!r||l&&!n)&&t.emit("fromEdge"),t.emit("progress",s)},updateSlidesClasses:function(){var e,t=this,a=t.slides,i=t.params,s=t.$wrapperEl,r=t.activeIndex,n=t.realIndex,o=t.virtual&&i.virtual.enabled;a.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=o?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):a.eq(r)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+n+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=a.eq(0)).addClass(i.slideNextClass);var d=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===d.length&&(d=a.eq(-1)).addClass(i.slidePrevClass),i.loop&&(l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),d.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+d.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,a=this,i=a.rtlTranslate?a.translate:-a.translate,s=a.slidesGrid,r=a.snapGrid,n=a.params,o=a.activeIndex,l=a.realIndex,p=a.snapIndex,c=e;if(void 0===c){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?c=u:i>=s[u]&&i<s[u+1]&&(c=u+1):i>=s[u]&&(c=u);n.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if((t=0<=r.indexOf(i)?r.indexOf(i):Math.floor(c/n.slidesPerGroup))>=r.length&&(t=r.length-1),c!==o){var h=parseInt(a.slides.eq(c).attr("data-swiper-slide-index")||c,10);d.extend(a,{snapIndex:t,realIndex:h,previousIndex:o,activeIndex:c}),a.emit("activeIndexChange"),a.emit("snapIndexChange"),l!==h&&a.emit("realIndexChange"),a.emit("slideChange")}else t!==p&&(a.snapIndex=t,a.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this,a=t.params,s=i(e.target).closest("."+a.slideClass)[0],r=!1;if(s)for(var n=0;n<t.slides.length;n+=1)t.slides[n]===s&&(r=!0);if(!s||!r)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=s,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(i(s).attr("data-swiper-slide-index"),10):t.clickedIndex=i(s).index(),a.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}},v={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.params,a=this.rtlTranslate,i=this.translate,s=this.$wrapperEl;if(t.virtualTranslate)return a?-i:i;var r=d.getTranslate(s[0],e);return a&&(r=-r),r||0},setTranslate:function(e,t){var a=this,i=a.rtlTranslate,s=a.params,r=a.$wrapperEl,n=a.progress,o=0,l=0;a.isHorizontal()?o=i?-e:e:l=e,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),s.virtualTranslate||(p.transforms3d?r.transform("translate3d("+o+"px, "+l+"px, 0px)"):r.transform("translate("+o+"px, "+l+"px)")),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?o:l;var d=a.maxTranslate()-a.minTranslate();(0===d?0:(e-a.minTranslate())/d)!==n&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]}},f={slideTo:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=this,r=e;r<0&&(r=0);var n=s.params,o=s.snapGrid,l=s.slidesGrid,d=s.previousIndex,c=s.activeIndex,u=s.rtlTranslate;if(s.animating&&n.preventInteractionOnTransition)return!1;var h=Math.floor(r/n.slidesPerGroup);h>=o.length&&(h=o.length-1),(c||n.initialSlide||0)===(d||0)&&a&&s.emit("beforeSlideChangeStart");var v,f=-o[h];if(s.updateProgress(f),n.normalizeSlideIndex)for(var m=0;m<l.length;m+=1)-Math.floor(100*f)>=Math.floor(100*l[m])&&(r=m);if(s.initialized&&r!==c){if(!s.allowSlideNext&&f<s.translate&&f<s.minTranslate())return!1;if(!s.allowSlidePrev&&f>s.translate&&f>s.maxTranslate()&&(c||0)!==r)return!1}return v=c<r?"next":r<c?"prev":"reset",u&&-f===s.translate||!u&&f===s.translate?(s.updateActiveIndex(r),n.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==n.effect&&s.setTranslate(f),"reset"!==v&&(s.transitionStart(a,v),s.transitionEnd(a,v)),!1):(0!==t&&p.transition?(s.setTransition(t),s.setTranslate(f),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,v),s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.$wrapperEl[0].removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].removeEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(a,v))}),s.$wrapperEl[0].addEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.$wrapperEl[0].addEventListener("webkitTransitionEnd",s.onSlideToWrapperTransitionEnd))):(s.setTransition(0),s.setTranslate(f),s.updateActiveIndex(r),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,i),s.transitionStart(a,v),s.transitionEnd(a,v)),!0)},slideToLoop:function(e,t,a,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===a&&(a=!0);var s=e;return this.params.loop&&(s+=this.loopedSlides),this.slideTo(s,t,a,i)},slideNext:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating;return s.loop?!r&&(i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft,i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)):i.slideTo(i.activeIndex+s.slidesPerGroup,e,t,a)},slidePrev:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.params,r=i.animating,n=i.snapGrid,o=i.slidesGrid,l=i.rtlTranslate;if(s.loop){if(r)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function d(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var p,c=d(l?i.translate:-i.translate),u=n.map((function(e){return d(e)})),h=(o.map((function(e){return d(e)})),n[u.indexOf(c)],n[u.indexOf(c)-1]);return void 0!==h&&(p=o.indexOf(h))<0&&(p=i.activeIndex-1),i.slideTo(p,e,t,a)},slideReset:function(e,t,a){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,a)},slideToClosest:function(e,t,a){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,s=i.activeIndex,r=Math.floor(s/i.params.slidesPerGroup);if(r<i.snapGrid.length-1){var n=i.rtlTranslate?i.translate:-i.translate,o=i.snapGrid[r];(i.snapGrid[r+1]-o)/2<n-o&&(s=i.params.slidesPerGroup)}return i.slideTo(s,e,t,a)},slideToClickedSlide:function(){var e,t=this,a=t.params,s=t.$wrapperEl,r="auto"===a.slidesPerView?t.slidesPerViewDynamic():a.slidesPerView,n=t.clickedIndex;if(a.loop){if(t.animating)return;e=parseInt(i(t.clickedSlide).attr("data-swiper-slide-index"),10),a.centeredSlides?n<t.loopedSlides-r/2||n>t.slides.length-t.loopedSlides+r/2?(t.loopFix(),n=s.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),d.nextTick((function(){t.slideTo(n)}))):t.slideTo(n):n>t.slides.length-r?(t.loopFix(),n=s.children("."+a.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+a.slideDuplicateClass+")").eq(0).index(),d.nextTick((function(){t.slideTo(n)}))):t.slideTo(n)}else t.slideTo(n)}},m={loopCreate:function(){var t=this,a=t.params,s=t.$wrapperEl;s.children("."+a.slideClass+"."+a.slideDuplicateClass).remove();var r=s.children("."+a.slideClass);if(a.loopFillGroupWithBlank){var n=a.slidesPerGroup-r.length%a.slidesPerGroup;if(n!==a.slidesPerGroup){for(var o=0;o<n;o+=1){var l=i(e.createElement("div")).addClass(a.slideClass+" "+a.slideBlankClass);s.append(l)}r=s.children("."+a.slideClass)}}"auto"!==a.slidesPerView||a.loopedSlides||(a.loopedSlides=r.length),t.loopedSlides=parseInt(a.loopedSlides||a.slidesPerView,10),t.loopedSlides+=a.loopAdditionalSlides,t.loopedSlides>r.length&&(t.loopedSlides=r.length);var d=[],p=[];r.each((function(e,a){var s=i(a);e<t.loopedSlides&&p.push(a),e<r.length&&e>=r.length-t.loopedSlides&&d.push(a),s.attr("data-swiper-slide-index",e)}));for(var c=0;c<p.length;c+=1)s.append(i(p[c].cloneNode(!0)).addClass(a.slideDuplicateClass));for(var u=d.length-1;0<=u;u-=1)s.prepend(i(d[u].cloneNode(!0)).addClass(a.slideDuplicateClass))},loopFix:function(){var e,t=this,a=t.params,i=t.activeIndex,s=t.slides,r=t.loopedSlides,n=t.allowSlidePrev,o=t.allowSlideNext,l=t.snapGrid,d=t.rtlTranslate;t.allowSlidePrev=!0,t.allowSlideNext=!0;var p=-l[i]-t.getTranslate();i<r?(e=s.length-3*r+i,e+=r,t.slideTo(e,0,!1,!0)&&0!==p&&t.setTranslate((d?-t.translate:t.translate)-p)):("auto"===a.slidesPerView&&2*r<=i||i>=s.length-r)&&(e=-s.length+i+r,e+=r,t.slideTo(e,0,!1,!0)&&0!==p&&t.setTranslate((d?-t.translate:t.translate)-p)),t.allowSlidePrev=n,t.allowSlideNext=o},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,a=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass).remove(),a.removeAttr("data-swiper-slide-index")}},g={setGrabCursor:function(e){if(!(p.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){p.touch||this.params.watchOverflow&&this.isLocked||(this.el.style.cursor="")}},b={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&&p.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&&p.observer||t.update(),t.slideTo(r,0,!1)},addSlide:function(e,t){var a=this,i=a.$wrapperEl,s=a.params,r=a.activeIndex;s.loop&&(r-=a.loopedSlides,a.loopDestroy(),a.slides=i.children("."+s.slideClass));var n=a.slides.length;if(e<=0)a.prependSlide(t);else if(n<=e)a.appendSlide(t);else{for(var o=e<r?r+1:r,l=[],d=n-1;e<=d;d-=1){var c=a.slides.eq(d);c.remove(),l.unshift(c)}if("object"==typeof t&&"length"in t){for(var u=0;u<t.length;u+=1)t[u]&&i.append(t[u]);o=e<r?r+t.length:r}else i.append(t);for(var h=0;h<l.length;h+=1)i.append(l[h]);s.loop&&a.loopCreate(),s.observer&&p.observer||a.update(),s.loop?a.slideTo(o+a.loopedSlides,0,!1):a.slideTo(o,0,!1)}},removeSlide:function(e){var t=this,a=t.params,i=t.$wrapperEl,s=t.activeIndex;a.loop&&(s-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+a.slideClass));var r,n=s;if("object"==typeof e&&"length"in e){for(var o=0;o<e.length;o+=1)r=e[o],t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1);n=Math.max(n,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<n&&(n-=1),n=Math.max(n,0);a.loop&&t.loopCreate(),a.observer&&p.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)}},w=function(){var a=t.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:t.cordova||t.phonegap,phonegap:t.cordova||t.phonegap},s=a.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),r=a.match(/(Android);?[\s\/]+([\d.]+)?/),n=a.match(/(iPad).*OS\s([\d_]+)/),o=a.match(/(iPod)(.*OS\s([\d_]+))?/),l=!n&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(s&&(i.os="windows",i.osVersion=s[2],i.windows=!0),r&&!s&&(i.os="android",i.osVersion=r[2],i.android=!0,i.androidChrome=0<=a.toLowerCase().indexOf("chrome")),(n||l||o)&&(i.os="ios",i.ios=!0),l&&!o&&(i.osVersion=l[2].replace(/_/g,"."),i.iphone=!0),n&&(i.osVersion=n[2].replace(/_/g,"."),i.ipad=!0),o&&(i.osVersion=o[3]?o[3].replace(/_/g,"."):null,i.iphone=!0),i.ios&&i.osVersion&&0<=a.indexOf("Version/")&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=a.toLowerCase().split("version/")[1].split(" ")[0]),i.desktop=!(i.os||i.android||i.webView),i.webView=(l||n||o)&&a.match(/.*AppleWebKit(?!.*Safari)/i),i.os&&"ios"===i.os){var d=i.osVersion.split("."),p=e.querySelector('meta[name="viewport"]');i.minimalUi=!i.webView&&(o||l)&&(1*d[0]==7?1<=1*d[1]:7<1*d[0])&&p&&0<=p.getAttribute("content").indexOf("minimal-ui")}return i.pixelRatio=t.devicePixelRatio||1,i}();function y(){var e=this,t=e.params,a=e.el;if(!a||0!==a.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,s=e.allowSlidePrev,r=e.snapGrid;if(e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),t.freeMode){var n=Math.min(Math.max(e.translate,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses(),t.autoHeight&&e.updateAutoHeight()}else e.updateSlidesClasses(),("auto"===t.slidesPerView||1<t.slidesPerView)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.allowSlidePrev=s,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}var x,E={attachEvents:function(){var a=this,s=a.params,r=a.touchEvents,n=a.el,o=a.wrapperEl;a.onTouchStart=function(a){var s=this,r=s.touchEventsData,n=s.params,o=s.touches;if(!s.animating||!n.preventInteractionOnTransition){var l=a;if(l.originalEvent&&(l=l.originalEvent),r.isTouchEvent="touchstart"===l.type,(r.isTouchEvent||!("which"in l)||3!==l.which)&&(!r.isTouched||!r.isMoved))if(n.noSwiping&&i(l.target).closest(n.noSwipingSelector?n.noSwipingSelector:"."+n.noSwipingClass)[0])s.allowClick=!0;else if(!n.swipeHandler||i(l).closest(n.swipeHandler)[0]){o.currentX="touchstart"===l.type?l.targetTouches[0].pageX:l.pageX,o.currentY="touchstart"===l.type?l.targetTouches[0].pageY:l.pageY;var p=o.currentX,c=o.currentY,u=n.edgeSwipeDetection||n.iOSEdgeSwipeDetection,h=n.edgeSwipeThreshold||n.iOSEdgeSwipeThreshold;if(!u||!(p<=h||p>=t.screen.width-h)){if(d.extend(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=p,o.startY=c,r.touchStartTime=d.now(),s.allowClick=!0,s.updateSize(),s.swipeDirection=void 0,0<n.threshold&&(r.allowThresholdMove=!1),"touchstart"!==l.type){var v=!0;i(l.target).is(r.formElements)&&(v=!1),e.activeElement&&i(e.activeElement).is(r.formElements)&&e.activeElement!==l.target&&e.activeElement.blur(),v&&s.allowTouchMove&&l.preventDefault()}s.emit("touchStart",l)}}}}.bind(a),a.onTouchMove=function(t){var a=this,s=a.touchEventsData,r=a.params,n=a.touches,o=a.rtlTranslate,l=t;if(l.originalEvent&&(l=l.originalEvent),s.isTouched){if(!s.isTouchEvent||"mousemove"!==l.type){var p="touchmove"===l.type?l.targetTouches[0].pageX:l.pageX,c="touchmove"===l.type?l.targetTouches[0].pageY:l.pageY;if(l.preventedByNestedSwiper)return n.startX=p,void(n.startY=c);if(!a.allowTouchMove)return a.allowClick=!1,void(s.isTouched&&(d.extend(n,{startX:p,startY:c,currentX:p,currentY:c}),s.touchStartTime=d.now()));if(s.isTouchEvent&&r.touchReleaseOnEdges&&!r.loop)if(a.isVertical()){if(c<n.startY&&a.translate<=a.maxTranslate()||c>n.startY&&a.translate>=a.minTranslate())return s.isTouched=!1,void(s.isMoved=!1)}else if(p<n.startX&&a.translate<=a.maxTranslate()||p>n.startX&&a.translate>=a.minTranslate())return;if(s.isTouchEvent&&e.activeElement&&l.target===e.activeElement&&i(l.target).is(s.formElements))return s.isMoved=!0,void(a.allowClick=!1);if(s.allowTouchCallbacks&&a.emit("touchMove",l),!(l.targetTouches&&1<l.targetTouches.length)){n.currentX=p,n.currentY=c;var u,h=n.currentX-n.startX,v=n.currentY-n.startY;if(!(a.params.threshold&&Math.sqrt(Math.pow(h,2)+Math.pow(v,2))<a.params.threshold))if(void 0===s.isScrolling&&(a.isHorizontal()&&n.currentY===n.startY||a.isVertical()&&n.currentX===n.startX?s.isScrolling=!1:25<=h*h+v*v&&(u=180*Math.atan2(Math.abs(v),Math.abs(h))/Math.PI,s.isScrolling=a.isHorizontal()?u>r.touchAngle:90-u>r.touchAngle)),s.isScrolling&&a.emit("touchMoveOpposite",l),void 0===s.startMoving&&(n.currentX===n.startX&&n.currentY===n.startY||(s.startMoving=!0)),s.isScrolling)s.isTouched=!1;else if(s.startMoving){a.allowClick=!1,l.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&l.stopPropagation(),s.isMoved||(r.loop&&a.loopFix(),s.startTranslate=a.getTranslate(),a.setTransition(0),a.animating&&a.$wrapperEl.trigger("webkitTransitionEnd transitionend"),s.allowMomentumBounce=!1,!r.grabCursor||!0!==a.allowSlideNext&&!0!==a.allowSlidePrev||a.setGrabCursor(!0),a.emit("sliderFirstMove",l)),a.emit("sliderMove",l),s.isMoved=!0;var f=a.isHorizontal()?h:v;n.diff=f,f*=r.touchRatio,o&&(f=-f),a.swipeDirection=0<f?"prev":"next",s.currentTranslate=f+s.startTranslate;var m=!0,g=r.resistanceRatio;if(r.touchReleaseOnEdges&&(g=0),0<f&&s.currentTranslate>a.minTranslate()?(m=!1,r.resistance&&(s.currentTranslate=a.minTranslate()-1+Math.pow(-a.minTranslate()+s.startTranslate+f,g))):f<0&&s.currentTranslate<a.maxTranslate()&&(m=!1,r.resistance&&(s.currentTranslate=a.maxTranslate()+1-Math.pow(a.maxTranslate()-s.startTranslate-f,g))),m&&(l.preventedByNestedSwiper=!0),!a.allowSlideNext&&"next"===a.swipeDirection&&s.currentTranslate<s.startTranslate&&(s.currentTranslate=s.startTranslate),!a.allowSlidePrev&&"prev"===a.swipeDirection&&s.currentTranslate>s.startTranslate&&(s.currentTranslate=s.startTranslate),0<r.threshold){if(!(Math.abs(f)>r.threshold||s.allowThresholdMove))return void(s.currentTranslate=s.startTranslate);if(!s.allowThresholdMove)return s.allowThresholdMove=!0,n.startX=n.currentX,n.startY=n.currentY,s.currentTranslate=s.startTranslate,void(n.diff=a.isHorizontal()?n.currentX-n.startX:n.currentY-n.startY)}r.followFinger&&((r.freeMode||r.watchSlidesProgress||r.watchSlidesVisibility)&&(a.updateActiveIndex(),a.updateSlidesClasses()),r.freeMode&&(0===s.velocities.length&&s.velocities.push({position:n[a.isHorizontal()?"startX":"startY"],time:s.touchStartTime}),s.velocities.push({position:n[a.isHorizontal()?"currentX":"currentY"],time:d.now()})),a.updateProgress(s.currentTranslate),a.setTranslate(s.currentTranslate))}}}}else s.startMoving&&s.isScrolling&&a.emit("touchMoveOpposite",l)}.bind(a),a.onTouchEnd=function(e){var t=this,a=t.touchEventsData,i=t.params,s=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,p=e;if(p.originalEvent&&(p=p.originalEvent),a.allowTouchCallbacks&&t.emit("touchEnd",p),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 c,u=d.now(),h=u-a.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(p),t.emit("tap",p),h<300&&300<u-a.lastClickTime&&(a.clickTimeout&&clearTimeout(a.clickTimeout),a.clickTimeout=d.nextTick((function(){t&&!t.destroyed&&t.emit("click",p)}),300)),h<300&&u-a.lastClickTime<300&&(a.clickTimeout&&clearTimeout(a.clickTimeout),t.emit("doubleTap",p))),a.lastClickTime=d.now(),d.nextTick((function(){t.destroyed||(t.allowClick=!0)})),!a.isTouched||!a.isMoved||!t.swipeDirection||0===s.diff||a.currentTranslate===a.startTranslate)return a.isTouched=!1,a.isMoved=!1,void(a.startMoving=!1);if(a.isTouched=!1,a.isMoved=!1,a.startMoving=!1,c=i.followFinger?r?t.translate:-t.translate:-a.currentTranslate,i.freeMode){if(c<-t.minTranslate())return void t.slideTo(t.activeIndex);if(c>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(1<a.velocities.length){var v=a.velocities.pop(),f=a.velocities.pop(),m=v.position-f.position,g=v.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)<i.freeModeMinimumVelocity&&(t.velocity=0),(150<g||300<d.now()-v.time)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,a.velocities.length=0;var b=1e3*i.freeModeMomentumRatio,w=t.velocity*b,y=t.translate+w;r&&(y=-y);var x,E,T=!1,S=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(y<t.maxTranslate())i.freeModeMomentumBounce?(y+t.maxTranslate()<-S&&(y=t.maxTranslate()-S),x=t.maxTranslate(),T=!0,a.allowMomentumBounce=!0):y=t.maxTranslate(),i.loop&&i.centeredSlides&&(E=!0);else if(y>t.minTranslate())i.freeModeMomentumBounce?(y-t.minTranslate()>S&&(y=t.minTranslate()+S),x=t.minTranslate(),T=!0,a.allowMomentumBounce=!0):y=t.minTranslate(),i.loop&&i.centeredSlides&&(E=!0);else if(i.freeModeSticky){for(var C,M=0;M<l.length;M+=1)if(l[M]>-y){C=M;break}y=-(y=Math.abs(l[C]-y)<Math.abs(l[C-1]-y)||"next"===t.swipeDirection?l[C]:l[C-1])}if(E&&t.once("transitionEnd",(function(){t.loopFix()})),0!==t.velocity)b=r?Math.abs((-y-t.translate)/t.velocity):Math.abs((y-t.translate)/t.velocity);else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&T?(t.updateProgress(x),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd((function(){t&&!t.destroyed&&a.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(i.speed),t.setTranslate(x),n.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()})))}))):t.velocity?(t.updateProgress(y),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(y),t.updateActiveIndex(),t.updateSlidesClasses()}else if(i.freeModeSticky)return void t.slideToClosest();(!i.freeModeMomentum||h>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var z=0,k=t.slidesSizesGrid[0],P=0;P<o.length;P+=i.slidesPerGroup)void 0!==o[P+i.slidesPerGroup]?c>=o[P]&&c<o[P+i.slidesPerGroup]&&(k=o[(z=P)+i.slidesPerGroup]-o[P]):c>=o[P]&&(z=P,k=o[o.length-1]-o[o.length-2]);var $=(c-o[z])/k;if(h>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&($>=i.longSwipesRatio?t.slideTo(z+i.slidesPerGroup):t.slideTo(z)),"prev"===t.swipeDirection&&($>1-i.longSwipesRatio?t.slideTo(z+i.slidesPerGroup):t.slideTo(z))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&t.slideTo(z+i.slidesPerGroup),"prev"===t.swipeDirection&&t.slideTo(z)}}}.bind(a),a.onClick=function(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}.bind(a);var l="container"===s.touchEventsTarget?n:o,c=!!s.nested;if(p.touch||!p.pointerEvents&&!p.prefixedPointerEvents){if(p.touch){var u=!("touchstart"!==r.start||!p.passiveListener||!s.passiveListeners)&&{passive:!0,capture:!1};l.addEventListener(r.start,a.onTouchStart,u),l.addEventListener(r.move,a.onTouchMove,p.passiveListener?{passive:!1,capture:c}:c),l.addEventListener(r.end,a.onTouchEnd,u)}(s.simulateTouch&&!w.ios&&!w.android||s.simulateTouch&&!p.touch&&w.ios)&&(l.addEventListener("mousedown",a.onTouchStart,!1),e.addEventListener("mousemove",a.onTouchMove,c),e.addEventListener("mouseup",a.onTouchEnd,!1))}else l.addEventListener(r.start,a.onTouchStart,!1),e.addEventListener(r.move,a.onTouchMove,c),e.addEventListener(r.end,a.onTouchEnd,!1);(s.preventClicks||s.preventClicksPropagation)&&l.addEventListener("click",a.onClick,!0),a.on(w.ios||w.android?"resize orientationchange observerUpdate":"resize observerUpdate",y,!0)},detachEvents:function(){var t=this,a=t.params,i=t.touchEvents,s=t.el,r=t.wrapperEl,n="container"===a.touchEventsTarget?s:r,o=!!a.nested;if(p.touch||!p.pointerEvents&&!p.prefixedPointerEvents){if(p.touch){var l=!("onTouchStart"!==i.start||!p.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};n.removeEventListener(i.start,t.onTouchStart,l),n.removeEventListener(i.move,t.onTouchMove,o),n.removeEventListener(i.end,t.onTouchEnd,l)}(a.simulateTouch&&!w.ios&&!w.android||a.simulateTouch&&!p.touch&&w.ios)&&(n.removeEventListener("mousedown",t.onTouchStart,!1),e.removeEventListener("mousemove",t.onTouchMove,o),e.removeEventListener("mouseup",t.onTouchEnd,!1))}else n.removeEventListener(i.start,t.onTouchStart,!1),e.removeEventListener(i.move,t.onTouchMove,o),e.removeEventListener(i.end,t.onTouchEnd,!1);(a.preventClicks||a.preventClicksPropagation)&&n.removeEventListener("click",t.onClick,!0),t.off(w.ios||w.android?"resize orientationchange observerUpdate":"resize observerUpdate",y)}},T={setBreakpoint:function(){var e=this,t=e.activeIndex,a=e.initialized,i=e.loopedSlides;void 0===i&&(i=0);var s=e.params,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var n=e.getBreakpoint(r);if(n&&e.currentBreakpoint!==n){var o=n in r?r[n]:e.originalParams,l=s.loop&&o.slidesPerView!==s.slidesPerView;d.extend(e.params,o),d.extend(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),e.currentBreakpoint=n,l&&a&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",o)}}},getBreakpoint:function(e){if(e){var a=!1,i=[];Object.keys(e).forEach((function(e){i.push(e)})),i.sort((function(e,t){return parseInt(e,10)-parseInt(t,10)}));for(var s=0;s<i.length;s+=1){var r=i[s];r>=t.innerWidth&&!a&&(a=r)}return a||"max"}}},S={isIE:!!t.navigator.userAgent.match(/Trident/g)||!!t.navigator.userAgent.match(/MSIE/g),isSafari:(x=t.navigator.userAgent.toLowerCase(),0<=x.indexOf("safari")&&x.indexOf("chrome")<0&&x.indexOf("android")<0),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)},C={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate: