/** * Framework7 1.5.0 * Full featured mobile HTML framework for building iOS & Android apps * * http://framework7.io/ * * Copyright 2016, Vladimir Kharlampidi * The iDangero.us * http://www.idangero.us/ * * Licensed under MIT * * Released on: November 8, 2016 */ !function(){"use strict";window.Framework7=function(a){function t(e){var a=e.replace(/^./,function(e){return e.toUpperCase()});i["onPage"+a]=function(a,t){return i.onPage(e,a,t)}}function n(){var e,a=o(this),t=a[0].scrollTop,n=a[0].scrollHeight,r=a[0].offsetHeight,i=a[0].getAttribute("data-distance"),s=a.find(".virtual-list"),l=a.hasClass("infinite-scroll-top");if(i||(i=50),"string"==typeof i&&i.indexOf("%")>=0&&(i=parseInt(i,10)/100*r),i>r&&(i=r),l)t=n-i){if(s.length>0&&(e=s[0].f7VirtualList,e&&!e.reachEnd))return;a.trigger("infinite")}}function r(){i.device.ipad&&(document.body.scrollLeft=0,setTimeout(function(){document.body.scrollLeft=0},0))}var i=this;i.version="1.5.0",i.params={root:"body",cache:!0,cacheIgnore:[],cacheIgnoreGetParameters:!1,cacheDuration:6e5,preloadPreviousPage:!0,uniqueHistory:!1,uniqueHistoryIgnoreGetParameters:!1,dynamicPageUrl:"content-{{index}}",allowDuplicateUrls:!1,router:!0,routerRemoveTimeout:!1,routerRemoveWithTimeout:!1,pushState:!1,pushStateRoot:void 0,pushStateNoAnimation:!1,pushStateSeparator:"#!/",pushStateOnLoad:!0,fastClicks:!0,fastClicksDistanceThreshold:10,fastClicksDelayBetweenClicks:50,fastClicksExclude:"",tapHold:!1,tapHoldDelay:750,tapHoldPreventClicks:!0,activeState:!0,activeStateElements:"a, button, label, span",animateNavBackIcon:!1,swipeBackPage:!0,swipeBackPageThreshold:0,swipeBackPageActiveArea:30,swipeBackPageAnimateShadow:!0,swipeBackPageAnimateOpacity:!0,ajaxLinks:void 0,externalLinks:".external",sortable:!0,hideNavbarOnPageScroll:!1,hideToolbarOnPageScroll:!1,hideTabbarOnPageScroll:!1,showBarsOnPageScrollEnd:!0,showBarsOnPageScrollTop:!0,swipeout:!0,swipeoutActionsNoFold:!1,swipeoutNoFollow:!1,swipeoutRemoveWithTimeout:!1,smartSelectOpenIn:"page",smartSelectBackText:"Back",smartSelectPopupCloseText:"Close",smartSelectPickerCloseText:"Done",smartSelectSearchbar:!1,smartSelectBackOnSelect:!1,scrollTopOnNavbarClick:!1,scrollTopOnStatusbarClick:!1,swipePanel:!1,swipePanelActiveArea:0,swipePanelCloseOpposite:!0,swipePanelOnlyClose:!1,swipePanelNoFollow:!1,swipePanelThreshold:0,panelsCloseByOutside:!0,modalButtonOk:"OK",modalButtonCancel:"Cancel",modalUsernamePlaceholder:"Username",modalPasswordPlaceholder:"Password",modalTitle:"Framework7",modalCloseByOutside:!1,actionsCloseByOutside:!0,popupCloseByOutside:!0,modalPreloaderTitle:"Loading... ",modalStack:!0,imagesLazyLoadThreshold:0,imagesLazyLoadSequential:!0,viewClass:"view",viewMainClass:"view-main",viewsClass:"views",notificationCloseOnClick:!1,notificationCloseIcon:!0,notificationCloseButtonText:"Close",animatePages:!0,templates:{},template7Data:{},template7Pages:!1,precompileTemplates:!1,material:!1,materialPageLoadDelay:0,materialPreloaderSvg:'',materialPreloaderHtml:'',materialRipple:!0,materialRippleElements:".ripple, a.link, a.item-link, .button, .modal-button, .tab-link, .label-radio, .label-checkbox, .actions-modal-button, a.searchbar-clear, a.floating-button, .floating-button > a, .speed-dial-buttons a",init:!0};for(var s in a)i.params[s]=a[s];var o=e,l=Template7;i._compiledTemplates={},i.root=o(i.params.root),i.root.eq(0).addClass("framework7-root"),i.touchEvents={start:i.support.touch?"touchstart":"mousedown",move:i.support.touch?"touchmove":"mousemove",end:i.support.touch?"touchend":"mouseup"},i.ls=window.localStorage,i.rtl="rtl"===o("body").css("direction"),i.rtl&&o("html").attr("dir","rtl"),"undefined"!=typeof i.params.statusbarOverlay&&(i.params.statusbarOverlay?o("html").addClass("with-statusbar-overlay"):o("html").removeClass("with-statusbar-overlay")),i.views=[];var p=function(e,a){var t,n={dynamicNavbar:!1,domCache:!1,linksView:void 0,reloadPages:!1,uniqueHistory:i.params.uniqueHistory,uniqueHistoryIgnoreGetParameters:i.params.uniqueHistoryIgnoreGetParameters,allowDuplicateUrls:i.params.allowDuplicateUrls,swipeBackPage:i.params.swipeBackPage,swipeBackPageAnimateShadow:i.params.swipeBackPageAnimateShadow,swipeBackPageAnimateOpacity:i.params.swipeBackPageAnimateOpacity,swipeBackPageActiveArea:i.params.swipeBackPageActiveArea,swipeBackPageThreshold:i.params.swipeBackPageThreshold,animatePages:i.params.animatePages,preloadPreviousPage:i.params.preloadPreviousPage};a=a||{},a.dynamicNavbar&&i.params.material&&(a.dynamicNavbar=!1);for(var r in n)"undefined"==typeof a[r]&&(a[r]=n[r]);var s=this;s.params=a,s.selector=e;var l=o(e);if(s.container=l[0],"string"!=typeof e&&(e=(l.attr("id")?"#"+l.attr("id"):"")+(l.attr("class")?"."+l.attr("class").replace(/ /g,".").replace(".active",""):""),s.selector=e),s.main=l.hasClass(i.params.viewMainClass),s.contentCache={},s.contextCache={},s.pagesCache={},s.pageElementsCache={},l[0].f7View=s,s.pagesContainer=l.find(".pages")[0],s.initialPages=[],s.initialPagesUrl=[],s.initialNavbars=[],s.params.domCache){var p=l.find(".page");for(t=0;t=0&&u.indexOf(m+"#")<0&&(u=u.split(m)[0]));var h,g;s.activePage||(h=o(s.pagesContainer).find(".page-on-center"),0===h.length&&(h=o(s.pagesContainer).find(".page:not(.cached)"),h=h.eq(h.length-1)),h.length>0&&(g=h[0].f7PageData)),s.params.domCache&&h?(s.url=l.attr("data-url")||s.params.url||"#"+h.attr("data-page"),s.pagesCache[s.url]=h.attr("data-page")):s.url=l.attr("data-url")||s.params.url||u,g&&(g.view=s,g.url=s.url,s.params.domCache&&s.params.dynamicNavbar&&!g.navbarInnerContainer&&(g.navbarInnerContainer=s.initialNavbars[s.initialPages.indexOf(g.container)]),s.activePage=g,h[0].f7PageData=g),s.url&&s.history.push(s.url);var v,b,w,C,y,x,T,k,P,S,M,I=!1,E=!1,O={},D=[],z=[],L=!0,B=[],N=[];if(s.handleTouchStart=function(e){L&&s.params.swipeBackPage&&!I&&!i.swipeoutOpenedEl&&s.allowPageChange&&(E=!1,I=!0,v=void 0,O.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,O.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,C=(new Date).getTime(),P=s.params.dynamicNavbar&&l.find(".navbar-inner").length>1)},s.handleTouchMove=function(e){if(I){var a="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,t="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY;if("undefined"==typeof v&&(v=!!(v||Math.abs(t-O.y)>Math.abs(a-O.x))),v||e.f7PreventSwipeBack||i.preventSwipeBack)return void(I=!1);if(!E){var n=!1;b=l.width();var r=o(e.target),p=r.hasClass("swipeout")?r:r.parents(".swipeout");p.length>0&&(!i.rtl&&p.find(".swipeout-actions-left").length>0&&(n=!0),i.rtl&&p.find(".swipeout-actions-right").length>0&&(n=!0)),D=r.is(".page")?r:r.parents(".page"),D.hasClass("no-swipeback")&&(n=!0),z=l.find(".page-on-left:not(.cached)");var d=O.x-l.offset().left>s.params.swipeBackPageActiveArea;if(d=i.rtl?O.xs.params.swipeBackPageActiveArea,d&&(n=!0),0!==z.length&&0!==D.length||(n=!0),n)return void(I=!1);s.params.swipeBackPageAnimateShadow&&!i.device.android&&(S=D.find(".swipeback-page-shadow"),0===S.length&&(S=o('
'),D.append(S))),P&&(B=l.find(".navbar-on-center:not(.cached)"),N=l.find(".navbar-on-left:not(.cached)"),y=B.find(".left, .center, .right, .subnavbar, .fading"),x=N.find(".left, .center, .right, .subnavbar, .fading"),i.params.animateNavBackIcon&&(T=B.find(".left.sliding .back .icon"),k=N.find(".left.sliding .back .icon"))),o(".picker-modal.modal-in").length>0&&i.closeModal(o(".picker-modal.modal-in"))}e.f7PreventPanelSwipe=!0,E=!0,e.preventDefault();var c=i.rtl?-1:1;w=(a-O.x-s.params.swipeBackPageThreshold)*c,w<0&&(w=0);var u=w/b,m={percentage:u,activePage:D[0],previousPage:z[0],activeNavbar:B[0],previousNavbar:N[0]};s.params.onSwipeBackMove&&s.params.onSwipeBackMove(m),l.trigger("swipeBackMove",m);var f=w*c,h=(w/5-b/5)*c;if(1===i.device.pixelRatio&&(f=Math.round(f),h=Math.round(h)),D.transform("translate3d("+f+"px,0,0)"),s.params.swipeBackPageAnimateShadow&&!i.device.android&&(S[0].style.opacity=1-1*u),z.transform("translate3d("+h+"px,0,0)"),s.params.swipeBackPageAnimateOpacity&&(z[0].style.opacity=.9+.1*u),P){var g;for(g=0;g=0){var C=u*M[0].f7NavbarRightOffset;1===i.device.pixelRatio&&(C=Math.round(C)),M.transform("translate3d("+C+"px,0,0)"),i.params.animateNavBackIcon&&M[0].className.indexOf("left")>=0&&T.length>0&&T.transform("translate3d("+-C+"px,0,0)")}for(g=0;g=0){var L=M[0].f7NavbarLeftOffset*(1-u);1===i.device.pixelRatio&&(L=Math.round(L)),M.transform("translate3d("+L+"px,0,0)"),i.params.animateNavBackIcon&&M[0].className.indexOf("left")>=0&&k.length>0&&k.transform("translate3d("+-L+"px,0,0)")}}}},s.handleTouchEnd=function(e){if(!I||!E)return I=!1,void(E=!1);if(I=!1,E=!1,0===w)return o([D[0],z[0]]).transform("").css({opacity:"",boxShadow:""}),void(P&&(y.transform("").css({opacity:""}),x.transform("").css({opacity:""}),T&&T.length>0&&T.transform(""),k&&T.length>0&&k.transform("")));var a=(new Date).getTime()-C,t=!1;(a<300&&w>10||a>=300&&w>b/2)&&(D.removeClass("page-on-center").addClass("page-on-right"),z.removeClass("page-on-left").addClass("page-on-center"),P&&(B.removeClass("navbar-on-center").addClass("navbar-on-right"),N.removeClass("navbar-on-left").addClass("navbar-on-center")),t=!0),o([D[0],z[0]]).transform("").css({opacity:"",boxShadow:""}).addClass("page-transitioning"),P&&(y.css({opacity:""}).each(function(){var e=t?this.f7NavbarRightOffset:0,a=o(this);a.transform("translate3d("+e+"px,0,0)"),i.params.animateNavBackIcon&&a.hasClass("left")&&T.length>0&&T.addClass("page-transitioning").transform("translate3d("+-e+"px,0,0)")}).addClass("page-transitioning"),x.transform("").css({opacity:""}).each(function(){var e=t?0:this.f7NavbarLeftOffset,a=o(this);a.transform("translate3d("+e+"px,0,0)"),i.params.animateNavBackIcon&&a.hasClass("left")&&k.length>0&&k.addClass("page-transitioning").transform("translate3d("+-e+"px,0,0)")}).addClass("page-transitioning")),L=!1,s.allowPageChange=!1;var n={activePage:D[0],previousPage:z[0],activeNavbar:B[0],previousNavbar:N[0]};if(t){var r=s.history[s.history.length-2];s.url=r,i.pageBackCallback("before",s,{pageContainer:D[0],url:r,position:"center",newPage:z,oldPage:D,swipeBack:!0}),i.pageAnimCallback("before",s,{pageContainer:z[0],url:r,position:"left",newPage:z,oldPage:D,swipeBack:!0}),s.params.onSwipeBackBeforeChange&&s.params.onSwipeBackBeforeChange(n),l.trigger("swipeBackBeforeChange",n)}else s.params.onSwipeBackBeforeReset&&s.params.onSwipeBackBeforeReset(n),l.trigger("swipeBackBeforeReset",n);D.transitionEnd(function(){o([D[0],z[0]]).removeClass("page-transitioning"),P&&(y.removeClass("page-transitioning").css({opacity:""}),x.removeClass("page-transitioning").css({opacity:""}),T&&T.length>0&&T.removeClass("page-transitioning"),k&&k.length>0&&k.removeClass("page-transitioning")),L=!0,s.allowPageChange=!0,t?(i.params.pushState&&s.main&&history.back(),i.pageBackCallback("after",s,{pageContainer:D[0],url:r,position:"center",newPage:z,oldPage:D,swipeBack:!0}),i.pageAnimCallback("after",s,{pageContainer:z[0],url:r,position:"left",newPage:z,oldPage:D,swipeBack:!0}),i.router.afterBack(s,D,z),s.params.onSwipeBackAfterChange&&s.params.onSwipeBackAfterChange(n),l.trigger("swipeBackAfterChange",n)):(s.params.onSwipeBackAfterReset&&s.params.onSwipeBackAfterReset(n),l.trigger("swipeBackAfterReset",n)),S&&S.length>0&&S.remove()})},s.attachEvents=function(e){var a=e?"off":"on",t=!("touchstart"!==i.touchEvents.start||!i.support.passiveListener)&&{passive:!0,capture:!1};l[a](i.touchEvents.start,s.handleTouchStart,t),l[a](i.touchEvents.move,s.handleTouchMove),l[a](i.touchEvents.end,s.handleTouchEnd,t)},s.detachEvents=function(){s.attachEvents(!0)},s.params.swipeBackPage&&!i.params.material&&s.attachEvents(),i.views.push(s),s.main&&(i.mainView=s),s.router={load:function(e){return i.router.load(s,e)},back:function(e){return i.router.back(s,e)},loadPage:function(e){if(e=e||{},"string"==typeof e){var a=e;e={},a&&0===a.indexOf("#")&&s.params.domCache?e.pageName=a.split("#")[1]:e.url=a}return i.router.load(s,e)},loadContent:function(e){return i.router.load(s,{content:e})},reloadPage:function(e){return i.router.load(s,{url:e,reload:!0})},reloadContent:function(e){return i.router.load(s,{content:e,reload:!0})},reloadPreviousPage:function(e){return i.router.load(s,{url:e,reloadPrevious:!0,reload:!0})},reloadPreviousContent:function(e){return i.router.load(s,{content:e,reloadPrevious:!0,reload:!0})},refreshPage:function(){var e={url:s.url,reload:!0,ignoreCache:!0};return e.url&&0===e.url.indexOf("#")&&(s.params.domCache&&s.pagesCache[e.url]?(e.pageName=s.pagesCache[e.url],e.url=void 0,delete e.url):s.contentCache[e.url]&&(e.content=s.contentCache[e.url],e.url=void 0,delete e.url)),i.router.load(s,e)},refreshPreviousPage:function(){var e={url:s.history[s.history.length-2],reload:!0,reloadPrevious:!0,ignoreCache:!0};return e.url&&0===e.url.indexOf("#")&&s.params.domCache&&s.pagesCache[e.url]&&(e.pageName=s.pagesCache[e.url],e.url=void 0,delete e.url),i.router.load(s,e)}},s.loadPage=s.router.loadPage,s.loadContent=s.router.loadContent,s.reloadPage=s.router.reloadPage,s.reloadContent=s.router.reloadContent,s.reloadPreviousPage=s.router.reloadPreviousPage,s.reloadPreviousContent=s.router.reloadPreviousContent,s.refreshPage=s.router.refreshPage,s.refreshPreviousPage=s.router.refreshPreviousPage,s.back=s.router.back,s.hideNavbar=function(){return i.hideNavbar(l.find(".navbar"))},s.showNavbar=function(){return i.showNavbar(l.find(".navbar"))},s.hideToolbar=function(){return i.hideToolbar(l.find(".toolbar"))},s.showToolbar=function(){return i.showToolbar(l.find(".toolbar"))},i.params.pushState&&i.params.pushStateOnLoad&&s.main){var H,A=c.split(m)[1];f?H=c.split(i.params.pushStateRoot+m)[1]:m&&c.indexOf(m)>=0&&c.indexOf(m+"#")<0&&(H=A);var R=!i.params.pushStateNoAnimation&&void 0,V=history.state;H?H.indexOf("#")>=0&&s.params.domCache&&V&&V.pageName&&"viewIndex"in V?i.router.load(s,{pageName:V.pageName,url:V.url,animatePages:R,pushState:!1}):H.indexOf("#")>=0&&s.params.domCache&&s.initialPagesUrl.indexOf(H)>=0?i.router.load(s,{pageName:H.replace("#",""),animatePages:R,pushState:!1}):i.router.load(s,{url:H,animatePages:R,pushState:!1}):s.params.domCache&&c.indexOf(m+"#")>=0&&(V&&V.pageName&&"viewIndex"in V?i.router.load(s,{pageName:V.pageName,url:V.url,animatePages:R,pushState:!1}):m&&0===A.indexOf("#")&&s.initialPagesUrl.indexOf(A)&&i.router.load(s,{pageName:A.replace("#",""),animatePages:R,pushState:!1}))}return s.destroy=function(){s.detachEvents(),s=void 0},i.pluginHook("addView",s),s};i.addView=function(e,a){return new p(e,a)},i.getCurrentView=function(e){var a=o(".popover.modal-in .view"),t=o(".popup.modal-in .view"),n=o(".panel.active .view"),r=o(".views"),i=r.children(".view");if(i.length>1&&i.hasClass("tab")&&(i=r.children(".view.active")),a.length>0&&a[0].f7View)return a[0].f7View;if(t.length>0&&t[0].f7View)return t[0].f7View;if(n.length>0&&n[0].f7View)return n[0].f7View;if(i.length>0){if(1===i.length&&i[0].f7View)return i[0].f7View;if(i.length>1){for(var s=[],l=0;l0&&"undefined"!=typeof e)return s[e];if(s.length>1)return s;if(1===s.length)return s[0];return}}},i.navbarInitCallback=function(e,a,t,n){if(!t&&n&&(t=o(n).parent(".navbar")[0]),n&&(!n.f7NavbarInitialized||!e||e.params.domCache)){var r={container:t,innerContainer:n},s=a&&a.f7PageData,l={page:s,navbar:r};if(n.f7NavbarInitialized&&(e&&e.params.domCache||!e&&o(t).parents(".popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal").length>0))return i.reinitNavbar(t,n),i.pluginHook("navbarReinit",l),void o(n).trigger("navbarReinit",l);n.f7NavbarInitialized=!0,i.pluginHook("navbarBeforeInit",r,s),o(n).trigger("navbarBeforeInit",l),i.initNavbar(t,n),i.pluginHook("navbarInit",r,s),o(n).trigger("navbarInit",l)}},i.navbarRemoveCallback=function(e,a,t,n){!t&&n&&(t=o(n).parent(".navbar")[0]);var r,s={container:t,innerContainer:n};a&&(r=a.f7PageData);var l={page:r,navbar:s};i.pluginHook("navbarBeforeRemove",s,r),o(n).trigger("navbarBeforeRemove",l),s=null,r=null},i.initNavbar=function(e,a){i.initSearchbar&&i.initSearchbar(a)},i.reinitNavbar=function(e,a){},i.initNavbarWithCallback=function(e){e=o(e);var a,t=e.parents("."+i.params.viewClass);0!==t.length&&(0===e.parents(".navbar-through").length&&0===t.find(".navbar-through").length||(a=t[0].f7View||void 0,e.find(".navbar-inner").each(function(){var n,r=this;if(o(r).attr("data-page")&&(n=t.find('.page[data-page="'+o(r).attr("data-page")+'"]')[0]),!n){var s=t.find(".page");1===s.length?n=s[0]:t.find(".page").each(function(){this.f7PageData&&this.f7PageData.navbarInnerContainer===r&&(n=this)})}i.navbarInitCallback(a,n,e[0],r)})))},i.sizeNavbars=function(e){if(!i.params.material){var a=e?o(e).find(".navbar .navbar-inner:not(.cached)"):o(".navbar .navbar-inner:not(.cached)");a.each(function(){var e=o(this);if(!e.hasClass("cached")){var a,t,n=i.rtl?e.find(".right"):e.find(".left"),r=i.rtl?e.find(".left"):e.find(".right"),s=e.find(".center"),l=e.find(".subnavbar"),p=0===n.length,d=0===r.length,c=p?0:n.outerWidth(!0),u=d?0:r.outerWidth(!0),m=s.outerWidth(!0),f=e.styles(),h=e[0].offsetWidth-parseInt(f.paddingLeft,10)-parseInt(f.paddingRight,10),g=e.hasClass("navbar-on-left");d&&(a=h-m),p&&(a=0),p||d||(a=(h-u-m+c)/2);var v=(h-m)/2;h-c-u>m?(vh-u&&(v=h-u-m),t=v-a):t=0;var b=i.rtl?-1:1;if(s.hasClass("sliding")&&(s[0].f7NavbarLeftOffset=-(a+t)*b,s[0].f7NavbarRightOffset=(h-a-t-m)*b,g)){if(i.params.animateNavBackIcon){var w=e.parent().find(".navbar-on-center").find(".left.sliding .back .icon ~ span");w.length>0&&(s[0].f7NavbarLeftOffset+=w[0].offsetLeft)}s.transform("translate3d("+s[0].f7NavbarLeftOffset+"px, 0, 0)")}!p&&n.hasClass("sliding")&&(i.rtl?(n[0].f7NavbarLeftOffset=-(h-n[0].offsetWidth)/2*b,n[0].f7NavbarRightOffset=c*b):(n[0].f7NavbarLeftOffset=-c,n[0].f7NavbarRightOffset=(h-n[0].offsetWidth)/2,i.params.animateNavBackIcon&&n.find(".back .icon").length>0&&(n[0].f7NavbarRightOffset-=n.find(".back .icon")[0].offsetWidth)),g&&n.transform("translate3d("+n[0].f7NavbarLeftOffset+"px, 0, 0)")),!d&&r.hasClass("sliding")&&(i.rtl?(r[0].f7NavbarLeftOffset=-u*b,r[0].f7NavbarRightOffset=(h-r[0].offsetWidth)/2*b):(r[0].f7NavbarLeftOffset=-(h-r[0].offsetWidth)/2,r[0].f7NavbarRightOffset=u),g&&r.transform("translate3d("+r[0].f7NavbarLeftOffset+"px, 0, 0)")),l.length&&l.hasClass("sliding")&&(l[0].f7NavbarLeftOffset=i.rtl?l[0].offsetWidth:-l[0].offsetWidth,l[0].f7NavbarRightOffset=-l[0].f7NavbarLeftOffset);var C=t;i.rtl&&p&&d&&s.length>0&&(C=-C),s.css({left:C+"px"})}})}},i.hideNavbar=function(e){return o(e).addClass("navbar-hidden"),!0},i.showNavbar=function(e){var a=o(e);return a.addClass("navbar-hiding").removeClass("navbar-hidden").transitionEnd(function(){a.removeClass("navbar-hiding")}),!0},i.hideToolbar=function(e){return o(e).addClass("toolbar-hidden"),!0},i.showToolbar=function(e){var a=o(e);a.addClass("toolbar-hiding").removeClass("toolbar-hidden").transitionEnd(function(){a.removeClass("toolbar-hiding")})};var d=function(e,a){function t(e){e.preventDefault()}var n={input:null,clearButton:null,cancelButton:null,searchList:null,searchIn:".item-title",searchBy:"",found:null,notFound:null,overlay:null,ignore:".searchbar-ignore",customSearch:!1,removeDiacritics:!1,hideDividers:!0,hideGroups:!0};a=a||{};for(var r in n)"undefined"!=typeof a[r]&&null!==a[r]||(a[r]=n[r]);var s=this;s.material=i.params.material,s.params=a,e=o(e),s.container=e,s.active=!1,s.input=s.params.input?o(s.params.input):s.container.find('input[type="search"]'),s.clearButton=s.params.clearButton?o(s.params.clearButton):s.container.find(".searchbar-clear"),s.cancelButton=s.params.cancelButton?o(s.params.cancelButton):s.container.find(".searchbar-cancel"),s.searchList=o(s.params.searchList),s.isVirtualList=s.searchList.hasClass("virtual-list"),s.pageContainer=s.container.parents(".page").eq(0),s.params.overlay?s.overlay=o(s.params.overlay):s.overlay=s.pageContainer.length>0?s.pageContainer.find(".searchbar-overlay"):o(".searchbar-overlay"),s.params.found?s.found=o(s.params.found):s.found=s.pageContainer.length>0?s.pageContainer.find(".searchbar-found"):o(".searchbar-found"),s.params.notFound?s.notFound=o(s.params.notFound):s.notFound=s.pageContainer.length>0?s.pageContainer.find(".searchbar-not-found"):o(".searchbar-not-found");var l=i.rtl?"margin-left":"margin-right",p=!1;s.setCancelButtonMargin=function(){s.cancelButton.transition(0).show(),s.cancelButton.css(l,-s.cancelButton[0].offsetWidth+"px");s.cancelButton[0].clientLeft;s.cancelButton.transition(""),p=!0},s.triggerEvent=function(e,a,t){s.container.trigger(e,t),s.searchList.length>0&&s.searchList.trigger(e,t),a&&s.params[a]&&s.params[a](s,t)},s.enable=function(e){function a(){!s.searchList.length&&!s.params.customSearch||s.container.hasClass("searchbar-active")||s.query||s.overlay.addClass("searchbar-overlay-active"),s.container.addClass("searchbar-active"),s.cancelButton.length>0&&!s.material&&(p||s.setCancelButtonMargin(),s.cancelButton.css(l,"0px")),s.triggerEvent("enableSearch","onEnable"),s.active=!0}i.device.ios&&!i.params.material&&e&&"focus"===e.type?setTimeout(function(){a()},400):a()},s.disable=function(){function e(){s.input.blur()}s.input.val("").trigger("change"),s.container.removeClass("searchbar-active searchbar-not-empty"),s.cancelButton.length>0&&!s.material&&s.cancelButton.css(l,-s.cancelButton[0].offsetWidth+"px"),(s.searchList.length||s.params.customSearch)&&s.overlay.removeClass("searchbar-overlay-active"),s.active=!1,i.device.ios?setTimeout(function(){e()},400):e(),s.triggerEvent("disableSearch","onDisable")},s.clear=function(e){return!s.query&&e&&o(e.target).hasClass("searchbar-clear")?void s.disable():(s.input.val("").trigger("change").focus(),void s.triggerEvent("clearSearch","onClear"))},s.handleInput=function(){setTimeout(function(){var e=s.input.val().trim();(s.searchList.length>0||s.params.customSearch)&&(s.params.searchIn||s.isVirtualList)&&s.search(e,!0)},0)};var d,c="";return s.search=function(e,a){if(e.trim()!==c){if(c=e.trim(),a||(s.active||s.enable(),s.input.val(e)),s.query=s.value=e,0===e.length?(s.container.removeClass("searchbar-not-empty"),s.searchList.length&&s.container.hasClass("searchbar-active")&&s.overlay.addClass("searchbar-overlay-active")):(s.container.addClass("searchbar-not-empty"),s.searchList.length&&s.container.hasClass("searchbar-active")&&s.overlay.removeClass("searchbar-overlay-active")),s.params.customSearch)return void s.triggerEvent("search","onSearch",{query:e});var t,n=[];if(s.isVirtualList){if(d=s.searchList[0].f7VirtualList,""===e.trim())return d.resetFilter(),s.notFound.hide(),void s.found.show();if(t=s.params.removeDiacritics?o.removeDiacritics(e):e,d.params.searchAll)n=d.params.searchAll(t,d.items)||[];else if(d.params.searchByItem)for(var r=0;r=0&&r++;r===i.length||s.params.ignore&&a.is(s.params.ignore)?n.push(a[0]):a.addClass("hidden-by-searchbar")}),s.params.hideDividers&&s.searchList.find(".item-divider, .list-group-title").each(function(){for(var e=o(this),a=e.nextAll("li"),t=!0,n=0;ne){var n=t+a,r=i.initialBarHeight+(n-i.initialAreaHeight),s=i.params.maxHeight||i.container.parents(".view")[0].offsetHeight-88;r>s&&(r=parseInt(s,10),n=r-i.initialBarHeight+i.initialAreaHeight),i.textarea.css("height",n+"px"),i.container.css("height",r+"px");var o=i.pageContent[0].scrollTop===i.pageContent[0].scrollHeight-i.pageContent[0].offsetHeight;i.pageContent.length>0&&(i.pageContent.css("padding-bottom",r+"px"),0===i.pageContent.find(".messages-new-first").length&&o&&i.pageContent.scrollTop(i.pageContent[0].scrollHeight-i.pageContent[0].offsetHeight))}else i.pageContent.length>0&&(i.container.css({height:"",bottom:""}),i.pageContent.css({"padding-bottom":""}))},i.clear=function(){i.textarea.val("").trigger("change")},i.value=function(e){return"undefined"==typeof e?i.textarea.val():void i.textarea.val(e).trigger("change")},i.textareaTimeout=void 0,i.handleTextarea=function(e){clearTimeout(i.textareaTimeout),i.textareaTimeout=setTimeout(function(){i.sizeTextarea()},0)},i.attachEvents=function(e){var a=e?"off":"on";i.container[a]("submit",t),i.textarea[a]("change keydown keypress keyup paste cut",i.handleTextarea)},i.detachEvents=function(){i.attachEvents(!0)},i.init=function(){i.attachEvents()},i.destroy=function(){i.detachEvents(),i=null},i.init(),i.container[0].f7Messagebar=i,i};i.messagebar=function(e,a){return new c(e,a)},i.initPageMessagebar=function(e){function a(){n.destroy(),e.off("pageBeforeRemove",a)}e=o(e);var t=e.hasClass("messagebar")?e:e.find(".messagebar");if(0!==t.length&&t.hasClass("messagebar-init")){var n=i.messagebar(t,t.dataset());e.hasClass("page")&&e.on("pageBeforeRemove",a)}},i.cache=[],i.removeFromCache=function(e){for(var a=!1,t=0;t=0&&(r=e.split("?")[0]),i.params.cache&&!t&&e.indexOf("nocache")<0&&i.params.cacheIgnore.indexOf(r)<0)for(var s=0;s=200&&e.status<300||0===e.status?(i.params.cache&&(i.removeFromCache(r),i.cache.push({url:r,time:(new Date).getTime(),content:e.responseText})),n(e.responseText,!1)):n(e.responseText,!0),i.params.onAjaxComplete&&i.params.onAjaxComplete(e)},error:function(e){n(e.responseText,!0),i.params.onAjaxError&&i.params.onAjaxError(e)}}),a&&(a.xhr=i.xhr),i.xhr},i.pageCallbacks={},i.onPage=function(e,a,t){if(a&&a.split(" ").length>1){for(var n=a.split(" "),r=[],s=0;s0?o.parseUrlQuery(a.url||""):t.f7PageData&&t.f7PageData.query?t.f7PageData.query:{});var r={container:t,url:a.url,query:n,name:o(t).attr("data-page"),view:e,from:a.position,context:a.context,navbarInnerContainer:a.navbarInnerContainer,fromPage:a.fromPage};if(a.fromPage&&!a.fromPage.navbarInnerContainer&&a.oldNavbarInnerContainer&&(a.fromPage.navbarInnerContainer=a.oldNavbarInnerContainer),t.f7PageInitialized&&(e&&e.params.domCache||!e&&o(t).parents(".popup, .popover, .login-screen, .modal, .actions-modal, .picker-modal").length>0))return i.reinitPage(t),i.pluginHook("pageReinit",r),i.params.onPageReinit&&i.params.onPageReinit(i,r),i.triggerPageCallbacks("reinit",r.name,r),void o(r.container).trigger("pageReinit",{page:r});t.f7PageInitialized=!0,t.f7PageData=r,!e||a.preloadOnly||a.reloadPrevious||(o(e.container).attr("data-page",r.name),e.activePage=r),i.pluginHook("pageBeforeInit",r),i.params.onPageBeforeInit&&i.params.onPageBeforeInit(i,r),i.triggerPageCallbacks("beforeInit",r.name,r),o(r.container).trigger("pageBeforeInit",{page:r}),i.initPage(t),i.pluginHook("pageInit",r),i.params.onPageInit&&i.params.onPageInit(i,r),i.triggerPageCallbacks("init",r.name,r),o(r.container).trigger("pageInit",{page:r})}},i.pageRemoveCallback=function(e,a,t){var n;if(a){a.f7PageData&&(n=a.f7PageData.context);var r={container:a,name:o(a).attr("data-page"),view:e,url:a.f7PageData&&a.f7PageData.url,query:a.f7PageData&&a.f7PageData.query,navbarInnerContainer:a.f7PageData&&a.f7PageData.navbarInnerContainer,from:t,context:n};i.pluginHook("pageBeforeRemove",r),i.params.onPageBeforeRemove&&i.params.onPageBeforeRemove(i,r),i.triggerPageCallbacks("beforeRemove",r.name,r),o(r.container).trigger("pageBeforeRemove",{page:r}),r=null}},i.pageBackCallback=function(e,a,t){var n,r=t.pageContainer;if(r){r.f7PageData&&(n=r.f7PageData.context); var s={container:r,name:o(r).attr("data-page"),url:r.f7PageData&&r.f7PageData.url,query:r.f7PageData&&r.f7PageData.query,view:a,from:t.position,context:n,navbarInnerContainer:r.f7PageData&&r.f7PageData.navbarInnerContainer,swipeBack:t.swipeBack};"after"===e&&(i.pluginHook("pageAfterBack",s),i.params.onPageAfterBack&&i.params.onPageAfterBack(i,s),i.triggerPageCallbacks("afterBack",s.name,s),o(r).trigger("pageAfterBack",{page:s})),"before"===e&&(i.pluginHook("pageBack",s),i.params.onPageBack&&i.params.onPageBack(i,s),i.triggerPageCallbacks("back",s.name,s),o(s.container).trigger("pageBack",{page:s}))}},i.pageAnimCallback=function(e,a,t){var n,r=t.pageContainer;if(r){r.f7PageData&&(n=r.f7PageData.context);var s=t.query;s||(s=t.url&&t.url.indexOf("?")>0?o.parseUrlQuery(t.url||""):r.f7PageData&&r.f7PageData.query?r.f7PageData.query:{});var l={container:r,url:t.url,query:s,name:o(r).attr("data-page"),view:a,from:t.position,context:n,swipeBack:t.swipeBack,navbarInnerContainer:r.f7PageData&&r.f7PageData.navbarInnerContainer,fromPage:t.fromPage},p=t.oldPage,d=t.newPage;if(r.f7PageData=l,"after"===e&&(i.pluginHook("pageAfterAnimation",l),i.params.onPageAfterAnimation&&i.params.onPageAfterAnimation(i,l),i.triggerPageCallbacks("afterAnimation",l.name,l),o(l.container).trigger("pageAfterAnimation",{page:l})),"before"===e){o(a.container).attr("data-page",l.name),a&&(a.activePage=l),d.hasClass("no-navbar")&&!p.hasClass("no-navbar")&&a.hideNavbar(),d.hasClass("no-navbar")||!p.hasClass("no-navbar")&&!p.hasClass("no-navbar-by-scroll")||a.showNavbar(),d.hasClass("no-toolbar")&&!p.hasClass("no-toolbar")&&a.hideToolbar(),d.hasClass("no-toolbar")||!p.hasClass("no-toolbar")&&!p.hasClass("no-toolbar-by-scroll")||a.showToolbar();var c;d.hasClass("no-tabbar")&&!p.hasClass("no-tabbar")&&(c=o(a.container).find(".tabbar"),0===c.length&&(c=o(a.container).parents("."+i.params.viewsClass).find(".tabbar")),i.hideToolbar(c)),d.hasClass("no-tabbar")||!p.hasClass("no-tabbar")&&!p.hasClass("no-tabbar-by-scroll")||(c=o(a.container).find(".tabbar"),0===c.length&&(c=o(a.container).parents("."+i.params.viewsClass).find(".tabbar")),i.showToolbar(c)),p.removeClass("no-navbar-by-scroll no-toolbar-by-scroll"),i.pluginHook("pageBeforeAnimation",l),i.params.onPageBeforeAnimation&&i.params.onPageBeforeAnimation(i,l),i.triggerPageCallbacks("beforeAnimation",l.name,l),o(l.container).trigger("pageBeforeAnimation",{page:l})}}},i.initPage=function(e){e=o(e),0!==e.length&&(i.sizeNavbars&&i.sizeNavbars(e.parents("."+i.params.viewClass)[0]),i.initPageMessages&&i.initPageMessages(e),i.initFormsStorage&&i.initFormsStorage(e),i.initSmartSelects&&i.initSmartSelects(e),i.initPageSwiper&&i.initPageSwiper(e),i.initPullToRefresh&&i.initPullToRefresh(e),i.initPageInfiniteScroll&&i.initPageInfiniteScroll(e),i.initSearchbar&&i.initSearchbar(e),i.initPageMessagebar&&i.initPageMessagebar(e),i.initPageScrollToolbars&&i.initPageScrollToolbars(e),i.initImagesLazyLoad&&i.initImagesLazyLoad(e),i.initPageProgressbar&&i.initPageProgressbar(e),i.initPageResizableTextarea&&i.initPageResizableTextarea(e),i.params.material&&i.initPageMaterialPreloader&&i.initPageMaterialPreloader(e),i.params.material&&i.initPageMaterialInputs&&i.initPageMaterialInputs(e),i.params.material&&i.initPageMaterialTabbar&&i.initPageMaterialTabbar(e))},i.reinitPage=function(e){e=o(e),0!==e.length&&(i.sizeNavbars&&i.sizeNavbars(e.parents("."+i.params.viewClass)[0]),i.reinitPageSwiper&&i.reinitPageSwiper(e),i.reinitLazyLoad&&i.reinitLazyLoad(e))},i.initPageWithCallback=function(e){e=o(e);var a=e.parents("."+i.params.viewClass);if(0!==a.length){var t=a[0].f7View||void 0,n=t&&t.url?t.url:void 0;a&&e.attr("data-page")&&a.attr("data-page",e.attr("data-page")),i.pageInitCallback(t,{pageContainer:e[0],url:n,position:"center"})}},i.router={_remove:function(e){i.params.routerRemoveTimeout||i.params.routerRemoveWithTimeout?setTimeout(function(){o(e).remove()},0):o(e).remove()},temporaryDom:document.createElement("div"),findElement:function(e,a,t,n){a=o(a),n&&(e+=":not(.cached)");var r=a.find(e);return r.length>1&&("string"==typeof t.selector&&(r=a.find(t.selector+" "+e)),r.length>1&&(r=a.find("."+i.params.viewMainClass+" "+e))),1===r.length?r:(n||(r=i.router.findElement(e,a,t,!0)),r&&1===r.length?r:r&&r.length>1?o(r[0]):void 0)},animatePages:function(e,a,t,n){var r="page-on-center page-on-right page-on-left";"to-left"===t&&(e.removeClass(r).addClass("page-from-center-to-left"),a.removeClass(r).addClass("page-from-right-to-center")),"to-right"===t&&(e.removeClass(r).addClass("page-from-left-to-center"),a.removeClass(r).addClass("page-from-center-to-right"))},prepareNavbar:function(e,a,t){o(e).find(".sliding").each(function(){var e=o(this),a="right"===t?this.f7NavbarRightOffset:this.f7NavbarLeftOffset;i.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d("+-a+"px,0,0)"),e.transform("translate3d("+a+"px,0,0)")})},animateNavbars:function(e,a,t,n){var r="navbar-on-right navbar-on-center navbar-on-left";"to-left"===t&&(a.removeClass(r).addClass("navbar-from-right-to-center"),a.find(".sliding").each(function(){var e=o(this);e.transform("translate3d(0px,0,0)"),i.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d(0px,0,0)")}),e.removeClass(r).addClass("navbar-from-center-to-left"),e.find(".sliding").each(function(){var e,t=o(this);i.params.animateNavBackIcon&&(t.hasClass("center")&&a.find(".sliding.left .back .icon").length>0&&(e=a.find(".sliding.left .back span"),e.length>0&&(this.f7NavbarLeftOffset+=e[0].offsetLeft)),t.hasClass("left")&&t.find(".back .icon").length>0&&t.find(".back .icon").transform("translate3d("+-this.f7NavbarLeftOffset+"px,0,0)")),t.transform("translate3d("+this.f7NavbarLeftOffset+"px,0,0)")})),"to-right"===t&&(e.removeClass(r).addClass("navbar-from-left-to-center"),e.find(".sliding").each(function(){var e=o(this);e.transform("translate3d(0px,0,0)"),i.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d(0px,0,0)")}),a.removeClass(r).addClass("navbar-from-center-to-right"),a.find(".sliding").each(function(){var e=o(this);i.params.animateNavBackIcon&&e.hasClass("left")&&e.find(".back .icon").length>0&&e.find(".back .icon").transform("translate3d("+-this.f7NavbarRightOffset+"px,0,0)"),e.transform("translate3d("+this.f7NavbarRightOffset+"px,0,0)")}))},preprocess:function(e,a,t,n){i.pluginHook("routerPreprocess",e,a,t,n),a=i.pluginProcess("preprocess",a),e&&e.params&&e.params.preprocess?(a=e.params.preprocess(a,t,n),"undefined"!=typeof a&&n(a)):i.params.preprocess?(a=i.params.preprocess(a,t,n),"undefined"!=typeof a&&n(a)):n(a)},preroute:function(e,a,t){return t&&(a.isBack=!0),i.pluginHook("routerPreroute",e,a),!!(i.params.preroute&&i.params.preroute(e,a)===!1||e&&e.params.preroute&&e.params.preroute(e,a)===!1)},template7Render:function(e,a){var t,n,r=a.url,s=a.content,p=a.content,d=a.context,c=a.contextName,u=a.template;a.pageName;if("string"==typeof s?r?i.template7Cache[r]&&!a.ignoreCache?n=l.cache[r]:(n=l.compile(s),l.cache[r]=n):n=l.compile(s):u&&(n=u),d)t=d,d&&r&&(e.contextCache[r]=d);else{if(c)if(c.indexOf(".")>=0){for(var m=c.split("."),f=l.data[m[0]],h=1;h1)for(var P=0;P1){for(l=0;l1&&(r=r.filter(function(e,a){if(a!==k)return a})),(e.params.domCache||k)&&n.removeClass("cached"),e.params.dynamicNavbar)if(u=!0,d=b?w.find('.navbar-inner[data-page="'+b+'"]'):i.router.findElement(".navbar-inner",i.router.temporaryDom,e),d&&0!==d.length||(d=n.find(".navbar-inner"),d&&0!==d.length?d.parent(".navbar").length>0&&d.prependTo(n):u=!1),u&&n.find(".navbar").length>0&&i.router._remove(n.find(".navbar")),c=w.children(".navbar"),a.reload)p=c.find(".navbar-inner:not(.cached):last-child");else if(p=c.find(".navbar-inner:not(.cached)"),p.length>0){for(l=0;l=0?(r.addClass("cached"),u&&p.addClass("cached")):(i.pageRemoveCallback(e,r[0],m),u&&i.navbarRemoveCallback(e,r[0],c[0],p[0]),i.router._remove(r),u&&i.router._remove(p))),i.pageInitCallback(e,{pageContainer:n[0],url:f,position:a.reload?m:"right",navbarInnerContainer:u?d&&d[0]:void 0,oldNavbarInnerContainer:u?p&&p[0]:void 0,context:g.context,query:a.query,fromPage:r&&r.length&&r[0].f7PageData,reload:a.reload,reloadPrevious:a.reloadPrevious}),u&&i.navbarInitCallback(e,n[0],c[0],d[0],f,a.reload?m:"right"),a.reload)return e.allowPageChange=!0,void(O&&e.refreshPreviousPage());u&&y&&i.router.prepareNavbar(d,p,"right");n[0].clientLeft;i.pageAnimCallback("before",e,{pageContainer:n[0],url:f,position:"right",oldPage:r,newPage:n,query:a.query,fromPage:r&&r.length&&r[0].f7PageData}),y?(i.params.material&&i.params.materialPageLoadDelay?setTimeout(function(){i.router.animatePages(r,n,"to-left",e)},i.params.materialPageLoadDelay):i.router.animatePages(r,n,"to-left",e),u&&setTimeout(function(){i.router.animateNavbars(p,d,"to-left",e)},0),n.animationEnd(function(e){t()})):(u&&d.find(".sliding, .sliding .back .icon").transform(""),t())},i.router.load=function(e,a){function t(t){i.router.preprocess(e,t,n,function(t){a.content=t,i.router._load(e,a)})}if(a=a||{},i.router.preroute(e,a))return!1;var n=a.url,r=a.content,s=a.pageName,l=a.pageElement;s&&s.indexOf("?")>0&&(a.query=o.parseUrlQuery(s),a.pageName=s=s.split("?")[0]);var p=a.template;return e.params.reloadPages===!0&&(a.reload=!0),!!e.allowPageChange&&(!(n&&e.url===n&&!a.reload&&!e.params.allowDuplicateUrls)&&(e.allowPageChange=!1,i.xhr&&e.xhr&&e.xhr===i.xhr&&(i.xhr.abort(),i.xhr=!1),r||s||l?void t(r):p?void i.router._load(e,a):a.url&&"#"!==a.url?void i.get(a.url,e,a.ignoreCache,function(a,n){return n?void(e.allowPageChange=!0):void t(a)}):void(e.allowPageChange=!0)))},i.router._back=function(e,a){function t(){i.pageBackCallback("after",e,{pageContainer:l[0],url:h,position:"center",oldPage:l,newPage:p}),i.pageAnimCallback("after",e,{pageContainer:p[0],url:h,position:"left",oldPage:l,newPage:p,query:a.query,fromPage:l&&l.length&&l[0].f7PageData}),i.router.afterBack(e,l[0],p[0])}function n(){i.pageBackCallback("before",e,{pageContainer:l[0],url:h,position:"center",oldPage:l,newPage:p}),i.pageAnimCallback("before",e,{pageContainer:p[0],url:h,position:"left",oldPage:l,newPage:p,query:a.query,fromPage:l&&l.length&&l[0].f7PageData}),w?(i.router.animatePages(p,l,"to-right",e),f&&setTimeout(function(){i.router.animateNavbars(c,d,"to-right",e)},0),p.animationEnd(function(){t()})):(f&&c.find(".sliding, .sliding .back .icon").transform(""),t())}function r(){if(i.router.temporaryDom.innerHTML="","string"==typeof g||h&&"string"==typeof g)i.router.temporaryDom.innerHTML=v.content;else if("length"in g&&g.length>1)for(var a=0;a=0)t.length&&t[0]!==p[0]&&t.addClass("cached"),f&&r.length&&r[0]!==c[0]&&r.addClass("cached");else{var s=f&&r.length;t.length?(i.pageRemoveCallback(e,t[0],"right"),s&&i.navbarRemoveCallback(e,t[0],u[0],r[0]),i.router._remove(t),s&&i.router._remove(r)):s&&(i.navbarRemoveCallback(e,t[0],u[0],r[0]),i.router._remove(r))}M=S.children(".page:not(.cached)"),f&&(m=P.children(".navbar").find(".navbar-inner:not(.cached)")),e.history.indexOf(h)>=0?e.history=e.history.slice(0,e.history.indexOf(h)+2):e.history[[e.history.length-2]]?e.history[e.history.length-2]=h:e.history.unshift(h)}if(l=o(M[M.length-1]),e.params.domCache&&l[0]===p[0]&&(l=S.children(".page.page-on-center"),0===l.length&&e.activePage&&(l=o(e.activePage.container))),f&&!d&&(d=o(m[m.length-1]),e.params.domCache&&(d[0]===c[0]&&(d=u.children(".navbar-inner.navbar-on-center:not(.cached)")),0===d.length&&(d=u.children('.navbar-inner[data-page="'+l.attr("data-page")+'"]'))),0!==d.length&&c[0]!==d[0]||(f=!1)),f&&(I&&c.insertBefore(d),c[0].f7RelatedPage=p[0],p[0].f7RelatedNavbar=c[0]),I&&p.insertBefore(l),i.pageInitCallback(e,{pageContainer:p[0],url:h,position:"left",navbarInnerContainer:f?c[0]:void 0,oldNavbarInnerContainer:f?d&&d[0]:void 0,context:v.context,query:a.query,fromPage:l&&l.length&&l[0].f7PageData,preloadOnly:C}),f&&i.navbarInitCallback(e,p[0],u[0],c[0],h,"right"),f&&c.hasClass("navbar-on-left")&&w&&i.router.prepareNavbar(c,d,"left"),C)return void(e.allowPageChange=!0);e.url=h;p[0].clientLeft;n(),i.params.pushState&&e.main&&("undefined"==typeof y&&(y=!0),!C&&history.state&&y&&history.back())}a=a||{};var l,p,d,c,u,m,f,h=a.url,g=a.content,v={content:a.content},b=a.template,w=a.animatePages,C=a.preloadOnly,y=a.pushState,x=(a.ignoreCache,a.force),T=a.pageName,k=a.pageElement,P=o(e.container),S=o(e.pagesContainer),M=S.children(".page:not(.cached)"),I=!0;return"undefined"==typeof w&&(w=e.params.animatePages),i.pluginHook("routerBack",e,a),(i.params.template7Pages&&"string"==typeof g||b)&&(v=i.router.template7Render(e,a),v.content&&!g&&(g=v.content)),M.length>1&&!x?C?void(e.allowPageChange=!0):(e.url=e.history[e.history.length-2],h=e.url,p=o(M[M.length-2]),l=o(M[M.length-1]),e.params.dynamicNavbar&&(f=!0,m=P.children(".navbar").find(".navbar-inner:not(.cached)"),c=o(m[0]),d=o(m[1]),0!==c.length&&0!==d.length&&d[0]!==c[0]||(f=!1)),I=!1,void s()):x?h&&h===e.url||T&&e.activePage&&e.activePage.name===T?void(e.allowPageChange=!0):g?(r(),void s()):T&&e.params.domCache?(T&&(h="#"+T),p=o(P).find('.page[data-page="'+T+'"]'),p[0].f7PageData&&p[0].f7PageData.url&&(h=p[0].f7PageData.url),e.params.dynamicNavbar&&(c=o(P).children(".navbar").find('.navbar-inner[data-page="'+T+'"]'),0===c.length&&p[0].f7RelatedNavbar&&(c=o(p[0].f7RelatedNavbar)),0===c.length&&p[0].f7PageData&&(c=o(p[0].f7PageData.navbarInnerContainer))),void s()):k&&h?(p=o(k),e.params.dynamicNavbar&&(c=p.find(".navbar-inner"),c.length>0&&(p.prepend(c),i.router._remove(p.find(".navbar")))),void s()):void(e.allowPageChange=!0):(C||(e.url=e.history[e.history.length-2],h=e.url),g?(r(),void s()):T?(p=o(P).find('.page[data-page="'+T+'"]'),e.params.dynamicNavbar&&(c=o(P).children(".navbar").find('.navbar-inner[data-page="'+T+'"]'),0===c.length&&p[0].f7RelatedNavbar&&(c=o(p[0].f7RelatedNavbar)),0===c.length&&p[0].f7PageData&&(c=o(p[0].f7PageData.navbarInnerContainer))),void s()):h&&h in e.pageElementsCache?(p=e.pageElementsCache[h].page,c=e.pageElementsCache[h].navbarInner,void s()):void(e.allowPageChange=!0))},i.router.back=function(e,a){function t(t){i.router.preprocess(e,t,n,function(t){a.content=t,i.router._back(e,a)})}if(a=a||{},i.router.preroute(e,a,!0))return!1;var n=a.url,r=a.content,s=a.pageName,l=a.pageElement;s&&s.indexOf("?")>0&&(a.query=o.parseUrlQuery(s),a.pageName=s=s.split("?")[0]);var p=a.force;if(!e.allowPageChange)return!1;e.allowPageChange=!1,i.xhr&&e.xhr&&e.xhr===i.xhr&&(i.xhr.abort(),i.xhr=!1);var d=o(e.pagesContainer).find(".page:not(.cached)");if(d.length>1&&!p)return void i.router._back(e,a);if(p){if(!n&&r)return void t(r);if(!n&&s)return s&&(n="#"+s),void t();if(n&&l)return void t();if(n)return void i.get(a.url,e,a.ignoreCache,function(a,n){return n?void(e.allowPageChange=!0):void t(a)})}else{if(n=e.history[e.history.length-2]||a.url,a.url||(a.url=n),!n)return void(e.allowPageChange=!0);if(0===n.indexOf("#")&&e.contentCache[n])return void t(e.contentCache[n]);if(0===n.indexOf("#")&&e.params.domCache)return s||(a.pageName=n.split("#")[1]),void t();if(n&&n in e.pageElementsCache)t();else if(0!==n.indexOf("#"))return void i.get(a.url,e,a.ignoreCache,function(a,n){return n?void(e.allowPageChange=!0):void t(a)})}e.allowPageChange=!0},i.router.afterBack=function(e,a,t){a=o(a),t=o(t),e.params.domCache&&e.initialPages.indexOf(a[0])>=0?a.removeClass("page-from-center-to-right").addClass("cached"):(i.pageRemoveCallback(e,a[0],"right"),i.router._remove(a)),t.removeClass("page-from-left-to-center page-on-left").addClass("page-on-center"),e.allowPageChange=!0;var n,r=e.history.pop();if(e.params.dynamicNavbar){var s=o(e.container).children(".navbar").find(".navbar-inner:not(.cached)"),l=o(a[0].f7RelatedNavbar||s[1]);e.params.domCache&&e.initialNavbars.indexOf(l[0])>=0?l.removeClass("navbar-from-center-to-right").addClass("cached"):(i.navbarRemoveCallback(e,a[0],void 0,l[0]),i.router._remove(l)),n=o(s[0]).removeClass("navbar-on-left navbar-from-left-to-center").addClass("navbar-on-center")}if(e.params.domCache&&o(e.container).find(".page.cached").each(function(){var a=o(this),t=(a.index(),a[0].f7PageData&&a[0].f7PageData.url);t&&e.history.indexOf(t)<0&&e.initialPages.indexOf(this)<0&&(i.pageRemoveCallback(e,a[0],"right"),a[0].f7RelatedNavbar&&e.params.dynamicNavbar&&i.navbarRemoveCallback(e,a[0],void 0,a[0].f7RelatedNavbar),i.router._remove(a),a[0].f7RelatedNavbar&&e.params.dynamicNavbar&&i.router._remove(a[0].f7RelatedNavbar))}),!e.params.domCache&&r&&r.indexOf("#")>-1&&r in e.contentCache&&e.history.indexOf(r)===-1&&(e.contentCache[r]=null,delete e.contentCache[r]),r&&r in e.pageElementsCache&&e.history.indexOf(r)===-1&&(e.pageElementsCache[r]=null,delete e.pageElementsCache[r]),r&&r in e.contextCache&&e.history.indexOf(r)===-1&&(e.contextCache[r]=null,delete e.contextCache[r]),i.params.pushState&&e.main&&i.pushStateClearQueue(),e.params.preloadPreviousPage)if(e.params.domCache&&e.history.length>1){var p,d,c=e.history[e.history.length-2];c&&e.pagesCache[c]?(p=o(e.container).find('.page[data-page="'+e.pagesCache[c]+'"]'),p.next(".page")[0]!==t[0]&&p.insertBefore(t),n&&(d=o(e.container).children(".navbar").find('.navbar-inner[data-page="'+e.pagesCache[c]+'"]'),d&&0!==d.length||(d=n.prev(".navbar-inner.cached")),d.next(".navbar-inner")[0]!==n[0]&&d.insertBefore(n))):(p=t.prev(".page.cached"),n&&(d=n.prev(".navbar-inner.cached"))),p&&p.length>0&&p.removeClass("cached page-on-right page-on-center").addClass("page-on-left"),d&&d.length>0&&d.removeClass("cached navbar-on-right navbar-on-center").addClass("navbar-on-left")}else i.router.back(e,{preloadOnly:!0})};var f=document.createElement("div");i.modalStack=[],i.modalStackClearQueue=function(){i.modalStack.length&&i.modalStack.shift()()},i.modal=function(e){e=e||{};var a="";if(i.params.modalTemplate)i._compiledTemplates.modal||(i._compiledTemplates.modal=l.compile(i.params.modalTemplate)),a=i._compiledTemplates.modal(e);else{var t="";if(e.buttons&&e.buttons.length>0)for(var n=0;n'+e.buttons[n].text+"";var r=e.title?'":"",s=e.text?'":"",p=e.afterText?e.afterText:"",d=e.buttons&&0!==e.buttons.length?"":"modal-no-buttons",c=e.verticalButtons?"modal-buttons-vertical":"",u=e.buttons&&e.buttons.length>0?'":"";a='"}f.innerHTML=a;var m=o(f).children();return i.root.append(m[0]),m.find(".modal-button").each(function(a,t){o(t).on("click",function(t){e.buttons[a].close!==!1&&i.closeModal(m),e.buttons[a].onClick&&e.buttons[a].onClick(m,t),e.onClick&&e.onClick(m,a)})}),i.openModal(m),m[0]},i.alert=function(e,a,t){return"function"==typeof a&&(t=arguments[1],a=void 0),i.modal({text:e||"",title:"undefined"==typeof a?i.params.modalTitle:a,buttons:[{text:i.params.modalButtonOk,bold:!0,onClick:t}]})},i.confirm=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),i.modal({text:e||"",title:"undefined"==typeof a?i.params.modalTitle:a,buttons:[{text:i.params.modalButtonCancel,onClick:n},{text:i.params.modalButtonOk,bold:!0,onClick:t}]})},i.prompt=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),i.modal({text:e||"",title:"undefined"==typeof a?i.params.modalTitle:a,afterText:'
',buttons:[{text:i.params.modalButtonCancel},{text:i.params.modalButtonOk,bold:!0}],onClick:function(e,a){0===a&&n&&n(o(e).find(".modal-text-input").val()),1===a&&t&&t(o(e).find(".modal-text-input").val())}})},i.modalLogin=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),i.modal({text:e||"",title:"undefined"==typeof a?i.params.modalTitle:a,afterText:'',buttons:[{text:i.params.modalButtonCancel},{text:i.params.modalButtonOk,bold:!0}],onClick:function(e,a){var r=o(e).find('.modal-text-input[name="modal-username"]').val(),i=o(e).find('.modal-text-input[name="modal-password"]').val();0===a&&n&&n(r,i),1===a&&t&&t(r,i)}})},i.modalPassword=function(e,a,t,n){return"function"==typeof a&&(n=arguments[2],t=arguments[1],a=void 0),i.modal({text:e||"",title:"undefined"==typeof a?i.params.modalTitle:a,afterText:'
',buttons:[{text:i.params.modalButtonCancel},{text:i.params.modalButtonOk,bold:!0}],onClick:function(e,a){var r=o(e).find('.modal-text-input[name="modal-password"]').val();0===a&&n&&n(r),1===a&&t&&t(r)}})},i.showPreloader=function(e){return i.modal({title:e||i.params.modalPreloaderTitle,text:'
'+(i.params.material?i.params.materialPreloaderHtml:"")+"
",cssClass:"modal-preloader"})},i.hidePreloader=function(){i.closeModal(".modal.modal-in")},i.showIndicator=function(){o(".preloader-indicator-overlay").length>0||i.root.append('
'+(i.params.material?i.params.materialPreloaderHtml:"")+"
")},i.hideIndicator=function(){o(".preloader-indicator-overlay, .preloader-indicator-modal").remove()},i.actions=function(e,a){var t,n,r,s=!1;1===arguments.length?a=e:i.device.ios?i.device.ipad&&(s=!0):o(window).width()>=768&&(s=!0),a=a||[],a.length>0&&!o.isArray(a[0])&&(a=[a]);var p;if(s){var d=i.params.modalActionsToPopoverTemplate||'
{{#each this}}
    {{#each this}}{{#if label}}
  • {{text}}
  • {{else}}
  • {{text}}
  • {{/if}}{{/each}}
{{/each}}
';i._compiledTemplates.actionsToPopover||(i._compiledTemplates.actionsToPopover=l.compile(d));var c=i._compiledTemplates.actionsToPopover(a);t=o(i.popover(c,e,!0)),n=".list-block ul",r=".list-button"}else{if(i.params.modalActionsTemplate)i._compiledTemplates.actions||(i._compiledTemplates.actions=l.compile(i.params.modalActionsTemplate)),p=i._compiledTemplates.actions(a);else{for(var u="",m=0;m');var g=a[m][h],v=g.label?"actions-modal-label":"actions-modal-button";g.bold&&(v+=" actions-modal-button-bold"),g.color&&(v+=" color-"+g.color),g.bg&&(v+=" bg-"+g.bg),g.disabled&&(v+=" disabled"),u+='
'+g.text+"
",h===a[m].length-1&&(u+="")}p='
'+u+"
"}f.innerHTML=p,t=o(f).children(),i.root.append(t[0]),n=".actions-modal-group",r=".actions-modal-button"}var b=t.find(n);return b.each(function(e,n){var l=e;o(n).children().each(function(e,n){var p,d=e,c=a[l][d];!s&&o(n).is(r)&&(p=o(n)),s&&o(n).find(r).length>0&&(p=o(n).find(r)),p&&p.on("click",function(e){c.close!==!1&&i.closeModal(t),c.onClick&&c.onClick(t,e)})})}),s||i.openModal(t),t[0]},i.popover=function(e,a,t){function n(){e.css({left:"",top:""});var t,n,r,i=e.width(),l=e.height(),p=0;s?e.removeClass("popover-on-left popover-on-right popover-on-top popover-on-bottom").css({left:"",top:""}):(t=e.find(".popover-angle"),p=t.width()/2,t.removeClass("on-left on-right on-top on-bottom").css({left:"",top:""}));var d=a.outerWidth(),c=a.outerHeight(),u=a.offset(),m=a.parents(".page");m.length>0&&(u.top=u.top-m[0].scrollTop);var f=o(window).height(),h=o(window).width(),g=0,v=0,b=0,w=s?"bottom":"top";if(s){if(l=f&&(g=f-l-8),v=u.left,v+i>=h-8&&(v=u.left+d-i-8),v<8&&(v=8),"top"===w&&e.addClass("popover-on-top"),"bottom"===w&&e.addClass("popover-on-bottom"),a.hasClass("floating-button-to-popover")&&!e.hasClass("modal-in")){e.addClass("popover-floating-button");var C=v+i/2-(u.left+d/2),y=g+l/2-(u.top+c/2);a.addClass("floating-button-to-popover-in").transform("translate3d("+C+"px, "+y+"px,0)").transitionEnd(function(e){a.hasClass("floating-button-to-popover-in")&&a.addClass("floating-button-to-popover-scale").transform("translate3d("+C+"px, "+y+"px,0) scale("+i/d+", "+l/c+")")}),e.once("close",function(){a.removeClass("floating-button-to-popover-in floating-button-to-popover-scale").addClass("floating-button-to-popover-out").transform("").transitionEnd(function(e){a.removeClass("floating-button-to-popover-out")})}),e.once("closed",function(){e.removeClass("popover-floating-button")})}}else l+p=f&&(g=f-l-5),b-=g),"top"===w||"bottom"===w?(v=d/2+u.left-i/2,b=v,v<5&&(v=5),v+i>h&&(v=h-i-5),"top"===w&&t.addClass("on-bottom"),"bottom"===w&&t.addClass("on-top"),b-=v,n=i/2-p+b,n=Math.max(Math.min(n,i-2*p-13),13),t.css({left:n+"px"})):"middle"===w&&(v=u.left-i-p,t.addClass("on-right"),(v<5||v+i>h)&&(v<5&&(v=u.left+d+p),v+i>h&&(v=h-i-5),t.removeClass("on-right").addClass("on-left")),r=l/2-p+b,r=Math.max(Math.min(r,l-2*p-13),13),t.css({top:r+"px"}));e.css({top:g+"px",left:v+"px"})}if("undefined"==typeof t&&(t=!0), "string"==typeof e&&e.indexOf("<")>=0){var r=document.createElement("div");if(r.innerHTML=e.trim(),!(r.childNodes.length>0))return!1;e=r.childNodes[0],t&&e.classList.add("remove-on-close"),i.root.append(e)}if(e=o(e),a=o(a),0===e.length||0===a.length)return!1;0===e.parents("body").length&&(t&&e.addClass("remove-on-close"),i.root.append(e[0])),0!==e.find(".popover-angle").length||i.params.material||e.append('
'),e.show();var s=i.params.material;return n(),o(window).on("resize",n),e.on("close",function(){o(window).off("resize",n)}),i.openModal(e),e[0]},i.popup=function(e,a){if("undefined"==typeof a&&(a=!0),"string"==typeof e&&e.indexOf("<")>=0){var t=document.createElement("div");if(t.innerHTML=e.trim(),!(t.childNodes.length>0))return!1;e=t.childNodes[0],a&&e.classList.add("remove-on-close"),i.root.append(e)}return e=o(e),0!==e.length&&(0===e.parents("body").length&&(a&&e.addClass("remove-on-close"),i.root.append(e[0])),e.show(),i.openModal(e),e[0])},i.pickerModal=function(e,a){if("undefined"==typeof a&&(a=!0),"string"==typeof e&&e.indexOf("<")>=0){if(e=o(e),!(e.length>0))return!1;a&&e.addClass("remove-on-close"),i.root.append(e[0])}return e=o(e),0!==e.length&&(0===e.parents("body").length&&(a&&e.addClass("remove-on-close"),i.root.append(e[0])),o(".picker-modal.modal-in:not(.modal-out)").length>0&&!e.hasClass("modal-in")&&i.closeModal(".picker-modal.modal-in:not(.modal-out)"),e.show(),i.openModal(e),e[0])},i.loginScreen=function(e){return e||(e=".login-screen"),e=o(e),0!==e.length&&(o(".login-screen.modal-in:not(.modal-out)").length>0&&!e.hasClass("modal-in")&&i.closeModal(".login-screen.modal-in:not(.modal-out)"),e.show(),i.openModal(e),e[0])},i.openModal=function(e){e=o(e);var a=e.hasClass("modal");if(o(".modal.modal-in:not(.modal-out)").length&&i.params.modalStack&&a)return void i.modalStack.push(function(){i.openModal(e)});if(!0!==e.data("f7-modal-shown")){e.data("f7-modal-shown",!0),e.once("close",function(){e.removeData("f7-modal-shown")});var t=(e.hasClass("popover"),e.hasClass("popup")),n=e.hasClass("login-screen"),r=e.hasClass("picker-modal");a&&(e.show(),e.css({marginTop:-Math.round(e.outerHeight()/2)+"px"}));var s;n||r||(0!==o(".modal-overlay").length||t||i.root.append(''),0===o(".popup-overlay").length&&t&&i.root.append(''),s=o(t?".popup-overlay":".modal-overlay")),i.params.material&&r&&e.hasClass("picker-calendar")&&(0!==o(".picker-modal-overlay").length||t||i.root.append('
'),s=o(".picker-modal-overlay"));e[0].clientLeft;return e.trigger("open"),r&&o("body").addClass("with-picker-modal"),e.find("."+i.params.viewClass).length>0&&(e.find(".page").each(function(){i.initPageWithCallback(this)}),e.find(".navbar").each(function(){i.initNavbarWithCallback(this)})),n||r||s.addClass("modal-overlay-visible"),i.params.material&&r&&s&&s.addClass("modal-overlay-visible"),e.removeClass("modal-out").addClass("modal-in").transitionEnd(function(a){e.hasClass("modal-out")?e.trigger("closed"):e.trigger("opened")}),!0}},i.closeModal=function(e){if(e=o(e||".modal-in"),"undefined"==typeof e||0!==e.length){var a,t=e.hasClass("modal"),n=e.hasClass("popover"),r=e.hasClass("popup"),s=e.hasClass("login-screen"),l=e.hasClass("picker-modal"),p=e.hasClass("remove-on-close");return r?a=o(".popup-overlay"):l&&i.params.material?a=o(".picker-modal-overlay"):l||(a=o(".modal-overlay")),r?e.length===o(".popup.modal-in").length&&a.removeClass("modal-overlay-visible"):a&&a.length>0&&a.removeClass("modal-overlay-visible"),e.trigger("close"),l&&(o("body").removeClass("with-picker-modal"),o("body").addClass("picker-modal-closing")),!n||i.params.material?(e.removeClass("modal-in").addClass("modal-out").transitionEnd(function(a){if(e.hasClass("modal-out"))e.trigger("closed");else if(e.trigger("opened"),n)return;l&&o("body").removeClass("picker-modal-closing"),r||s||l||n?(e.removeClass("modal-out").hide(),p&&e.length>0&&e.remove()):e.remove()}),t&&i.params.modalStack&&i.modalStackClearQueue()):(e.removeClass("modal-in modal-out").trigger("closed").hide(),p&&e.remove()),!0}},i.setProgressbar=function(e,a,t){if(e=o(e||i.root),0!==e.length){a&&(a=Math.min(Math.max(a,0),100));var n;if(n=e.hasClass("progressbar")?e:e.children(".progressbar"),0!==n.length&&!n.hasClass("progressbar-infinite")){n[0].clientLeft;return n.children("span").transform("translate3d("+(-100+a)+"%,0,0)"),"undefined"!=typeof t?n.children("span").transition(t):n.children("span").transition(""),n[0]}}},i.showProgressbar=function(e,a,t){if("number"==typeof e&&(e=i.root,a=arguments[0],t=arguments[1]),a&&"string"==typeof a&&parseFloat(a)!==1*a&&(t=a,a=void 0),e=o(e||i.root),0!==e.length){var n;return e.hasClass("progressbar")?n=e:(n=e.children(".progressbar:not(.progressbar-out), .progressbar-infinite:not(.progressbar-out)"),0===n.length&&(n=o("undefined"!=typeof a?'':''),e.append(n))),a&&i.setProgressbar(e,a),n[0]}},i.hideProgressbar=function(e){if(e=o(e||i.root),0!==e.length){var a;a=e.hasClass("progressbar")?e:e.children(".progressbar, .progressbar-infinite"),0!==a.length&&a.hasClass("progressbar-in")&&!a.hasClass("progressbar-out")&&a.removeClass("progressbar-in").addClass("progressbar-out").animationEnd(function(){a.remove(),a=null})}},i.initPageProgressbar=function(e){e=o(e),e.find(".progressbar").each(function(){var e=o(this);0===e.children("span").length&&e.append(""),e.attr("data-progress")&&i.setProgressbar(e,e.attr("data-progress"))})},i.allowPanelOpen=!0,i.openPanel=function(e){function a(){r.transitionEnd(function(e){o(e.target).is(r)?(t.hasClass("active")?t.trigger("opened"):t.trigger("closed"),i.params.material&&o(".panel-overlay").css({display:""}),i.allowPanelOpen=!0):a()})}if(!i.allowPanelOpen)return!1;var t=o(".panel-"+e);if(0===t.length||t.hasClass("active"))return!1;i.closePanel(),i.allowPanelOpen=!1;var n=t.hasClass("panel-reveal")?"reveal":"cover";t.css({display:"block"}).addClass("active"),t.trigger("open"),i.params.material&&o(".panel-overlay").show(),t.find("."+i.params.viewClass).length>0&&i.sizeNavbars&&i.sizeNavbars(t.find("."+i.params.viewClass)[0]);var r=(t[0].clientLeft,"reveal"===n?o("."+i.params.viewsClass):t);return a(),o("body").addClass("with-panel-"+e+"-"+n),!0},i.closePanel=function(){var e=o(".panel.active");if(0===e.length)return!1;var a=e.hasClass("panel-reveal")?"reveal":"cover",t=e.hasClass("panel-left")?"left":"right";e.removeClass("active");var n="reveal"===a?o("."+i.params.viewsClass):e;e.trigger("close"),i.allowPanelOpen=!1,n.transitionEnd(function(){e.hasClass("active")||(e.css({display:""}),e.trigger("closed"),o("body").removeClass("panel-closing"),i.allowPanelOpen=!0)}),o("body").addClass("panel-closing").removeClass("with-panel-"+t+"-"+a)},i.initSwipePanels=function(){function e(e){if(i.allowPanelOpen&&(i.params.swipePanel||i.params.swipePanelOnlyClose)&&!s&&!(o(".modal-in, .photo-browser-in").length>0)&&(i.params.swipePanelCloseOpposite||i.params.swipePanelOnlyClose||!(o(".panel.active").length>0)||n.hasClass("active"))){if(w.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,w.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,i.params.swipePanelCloseOpposite||i.params.swipePanelOnlyClose){if(o(".panel.active").length>0)r=o(".panel.active").hasClass("panel-left")?"left":"right";else{if(i.params.swipePanelOnlyClose)return;r=i.params.swipePanel}if(!r)return}if(n=o(".panel.panel-"+r),f=n.hasClass("active"),i.params.swipePanelActiveArea&&!f){if("left"===r&&w.x>i.params.swipePanelActiveArea)return;if("right"===r&&w.xMath.abs(a-w.x))),p)return void(s=!1);if(!v&&(v=a>w.x?"to-right":"to-left","both"===r&&(r=o(".panel.active").length>0?o(".panel.active").hasClass("panel-left")?"left":"right":"to-right"===v?"left":"right",n=o(".panel.panel-"+r)),"left"===r&&"to-left"===v&&!n.hasClass("active")||"right"===r&&"to-right"===v&&!n.hasClass("active")))return void(s=!1);if(i.params.swipePanelNoFollow){var y=(new Date).getTime()-d;return y<300&&("to-left"===v&&("right"===r&&i.openPanel(r),"left"===r&&n.hasClass("active")&&i.closePanel()),"to-right"===v&&("left"===r&&i.openPanel(r),"right"===r&&n.hasClass("active")&&i.closePanel())),s=!1,void(l=!1)}l||(g=n.hasClass("panel-cover")?"cover":"reveal",f||(n.show(),b.show()),h=n[0].offsetWidth,n.transition(0),n.find("."+i.params.viewClass).length>0&&i.sizeNavbars&&i.sizeNavbars(n.find("."+i.params.viewClass)[0])),l=!0,e.preventDefault();var x=f?0:-i.params.swipePanelThreshold;"right"===r&&(x=-x),c=a-w.x+x,"right"===r?(u=c-(f?h:0),u>0&&(u=0),u<-h&&(u=-h)):(u=c+(f?h:0),u<0&&(u=0),u>h&&(u=h)),"reveal"===g?(C.transform("translate3d("+u+"px,0,0)").transition(0),b.transform("translate3d("+u+"px,0,0)").transition(0),i.pluginHook("swipePanelSetTransform",C[0],n[0],Math.abs(u/h))):(n.transform("translate3d("+u+"px,0,0)").transition(0),i.params.material&&(b.transition(0),m=Math.abs(u/h),b.css({opacity:m})),i.pluginHook("swipePanelSetTransform",C[0],n[0],Math.abs(u/h)))}}function t(e){if(!s||!l)return s=!1,void(l=!1);s=!1,l=!1;var a,t=(new Date).getTime()-d,p=0===u||Math.abs(u)===h;if(a=f?u===-h?"reset":t<300&&Math.abs(u)>=0||t>=300&&Math.abs(u)<=h/2?"left"===r&&u===h?"reset":"swap":"reset":0===u?"reset":t<300&&Math.abs(u)>0||t>=300&&Math.abs(u)>=h/2?"swap":"reset","swap"===a&&(i.allowPanelOpen=!0,f?(i.closePanel(),p&&(n.css({display:""}),o("body").removeClass("panel-closing"))):i.openPanel(r),p&&(i.allowPanelOpen=!0)),"reset"===a)if(f)i.allowPanelOpen=!0,i.openPanel(r);else if(i.closePanel(),p)i.allowPanelOpen=!0,n.css({display:""});else{var c="reveal"===g?C:n;n.trigger("close"),o("body").addClass("panel-closing"),c.transitionEnd(function(){n.trigger("closed"),n.css({display:""}),o("body").removeClass("panel-closing"),i.allowPanelOpen=!0})}"reveal"===g&&(C.transition(""),C.transform("")),n.transition("").transform(""),b.css({display:""}).transform("").transition("").css("opacity","")}var n,r;if(i.params.swipePanel){if(n=o(".panel.panel-"+i.params.swipePanel),r=i.params.swipePanel,0===n.length&&"both"!==r)return}else{if(!i.params.swipePanelOnlyClose)return;if(0===o(".panel").length)return}var s,l,p,d,c,u,m,f,h,g,v,b=o(".panel-overlay"),w={},C=o("."+i.params.viewsClass),y=!("touchstart"!==i.touchEvents.start||!i.support.passiveListener)&&{passive:!0,capture:!1};o(document).on(i.touchEvents.start,e,y),o(document).on(i.touchEvents.move,a),o(document).on(i.touchEvents.end,t,y)},i.initImagesLazyLoad=function(e){function a(e){function t(){e.removeClass("lazy").addClass("lazy-loaded"),n?e.css("background-image","url("+r+")"):e.attr("src",r),i.params.imagesLazyLoadSequential&&(u=!1,c.length>0&&a(c.shift()))}e=o(e);var n=e.attr("data-background"),r=n?n:e.attr("data-src");if(r){if(i.params.imagesLazyLoadSequential&&u)return void(c.indexOf(e[0])<0&&c.push(e[0]));u=!0;var s=new Image;s.onload=t,s.onerror=t,s.src=r}}function t(){l=e.find(".lazy"),l.each(function(e,t){t=o(t),t.parents(".tab:not(.active)").length>0||n(t[0])&&a(t)})}function n(e){var a=e.getBoundingClientRect(),t=i.params.imagesLazyLoadThreshold||0;return a.top>=0-t&&a.left>=0-t&&a.top<=window.innerHeight+t&&a.left<=window.innerWidth+t}function r(a){var n=a?"off":"on";l[n]("lazy",t),l.parents(".tab")[n]("show",t),e[n]("lazy",t),p[n]("lazy",t),p[n]("scroll",t),o(window)[n]("resize",t)}function s(){r(!0)}e=o(e);var l;if(e.hasClass("lazy")?(l=e,e=l.parents(".page")):l=e.find(".lazy"),0!==l.length){var p;if(e.hasClass("page-content")?(p=e,e=e.parents(".page")):p=e.find(".page-content"),0!==p.length){var d="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEXCwsK592mkAAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==";"string"==typeof i.params.imagesLazyLoadPlaceholder&&(d=i.params.imagesLazyLoadPlaceholder),i.params.imagesLazyLoadPlaceholder!==!1&&l.each(function(){o(this).attr("data-src")&&o(this).attr("src",d)});var c=[],u=!1;e[0].f7DestroyImagesLazyLoad=s,r(),e.hasClass("page")&&e.once("pageBeforeRemove",s),t(),e.once("pageAfterAnimation",t)}}},i.destroyImagesLazyLoad=function(e){e=o(e),e.length>0&&e[0].f7DestroyImagesLazyLoad&&e[0].f7DestroyImagesLazyLoad()},i.reinitImagesLazyLoad=function(e){e=o(e),e.length>0&&e.trigger("lazy")},i.initPageMaterialPreloader=function(e){o(e).find(".preloader").each(function(){0===o(this).children().length&&o(this).html(i.params.materialPreloaderHtml)})};var h=function(e,a){var t={autoLayout:!0,newMessagesFirst:!1,scrollMessages:!0,scrollMessagesOnlyOnEdge:!1,messageTemplate:'{{#if day}}
{{day}} {{#if time}}, {{time}}{{/if}}
{{/if}}
{{#if name}}
{{name}}
{{/if}}
{{text}}{{#if date}}
{{date}}
{{/if}}
{{#if avatar}}
{{/if}}{{#if label}}
{{label}}
{{/if}}
'};a=a||{};for(var n in t)"undefined"!=typeof a[n]&&null!==a[n]||(a[n]=t[n]);var r=this;if(r.params=a,r.container=o(e),0!==r.container.length)return r.params.autoLayout&&r.container.addClass("messages-auto-layout"),r.params.newMessagesFirst&&r.container.addClass("messages-new-first"),r.pageContainer=r.container.parents(".page").eq(0),r.pageContent=r.pageContainer.find(".page-content"),r.template=Template7.compile(r.params.messageTemplate),r.layout=function(){r.container.hasClass("messages-auto-layout")||r.container.addClass("messages-auto-layout"),r.container.find(".message").each(function(){var e=o(this);if(e.find(".message-text img").length>0){for(var a=e.find(".message-text")[0].childNodes,t=!0,n=0;n0&&e.addClass("message-with-avatar")}),r.container.find(".message").each(function(){var e=o(this),a=e.hasClass("message-sent"),t=e.next(".message-"+(a?"sent":"received")),n=e.prev(".message-"+(a?"sent":"received"));0===t.length?e.addClass("message-last message-with-tail"):e.removeClass("message-last message-with-tail"),0===n.length?e.addClass("message-first"):e.removeClass("message-first"),n.length>0&&n.find(".message-name").length>0&&e.find(".message-name").length>0&&n.find(".message-name").text()!==e.find(".message-name").text()&&(n.addClass("message-last message-with-tail"),e.addClass("message-first"))})},r.appendMessage=function(e,a){return r.addMessage(e,"append",a)},r.prependMessage=function(e,a){return r.addMessage(e,"prepend",a)},r.addMessage=function(e,a,t){return r.addMessages([e],a,t)},r.addMessages=function(e,a,t){"undefined"==typeof t&&(t=!0),"undefined"==typeof a&&(a=r.params.newMessagesFirst?"prepend":"append");var n,i="";for(n=0;n=0,s.onlyImage===!1&&(s.hasImage=!1),t&&(s.position="append"===a?"bottom":"top"),i+=r.template(s))}var o=r.pageContent[0].scrollHeight,l=r.pageContent[0].offsetHeight,p=r.pageContent[0].scrollTop;if(r.container[a](i),r.params.autoLayout&&r.layout(),"prepend"===a&&(r.pageContent[0].scrollTop=p+(r.pageContent[0].scrollHeight-o)),r.params.scrollMessages&&"append"===a&&!r.params.newMessagesFirst||"prepend"===a&&r.params.newMessagesFirst)if(r.params.scrollMessagesOnlyOnEdge){var d=!1;r.params.newMessagesFirst?0===p&&(d=!0):p-(o-l)>=-10&&(d=!0),d&&r.scrollMessages(t?void 0:0)}else r.scrollMessages(t?void 0:0);var c=r.container.find(".message");if(1===e.length)return"append"===a?c[c.length-1]:c[0];var u=[];if("append"===a)for(n=c.length-e.length;nMath.abs(a-E.x))),l)return void(r=!1);if(!s){if(o(".list-block.sortable-opened").length>0)return;c=o(this),u=c.find(".swipeout-content"),m=c.find(".swipeout-actions-right"),f=c.find(".swipeout-actions-left"),h=g=C=y=k=T=null,M=f.hasClass("swipeout-actions-no-fold")||i.params.swipeoutActionsNoFold,I=m.hasClass("swipeout-actions-no-fold")||i.params.swipeoutActionsNoFold,f.length>0&&(h=f.outerWidth(),C=f.children("a"),T=f.find(".swipeout-overswipe")),m.length>0&&(g=m.outerWidth(),y=m.children("a"),k=m.find(".swipeout-overswipe")),b=c.hasClass("swipeout-opened"),b&&(w=c.find(".swipeout-actions-left.swipeout-actions-opened").length>0?"left":"right"),c.removeClass("transitioning"),i.params.swipeoutNoFollow||(c.find(".swipeout-actions-opened").removeClass("swipeout-actions-opened"),c.removeClass("swipeout-opened"))}if(s=!0,e.preventDefault(),d=a-E.x,v=d,b&&("right"===w?v-=g:v+=h),v>0&&0===f.length||v<0&&0===m.length){if(!b)return r=s=!1,u.transform(""),y&&y.length>0&&y.transform(""),void(C&&C.length>0&&C.transform(""));v=0}x=v<0?"to-left":v>0?"to-right":x?x:"to-left";var n,p,O;if(e.f7PreventPanelSwipe=!0,i.params.swipeoutNoFollow)return b?("right"===w&&d>0&&i.swipeoutClose(c),"left"===w&&d<0&&i.swipeoutClose(c)):(d<0&&m.length>0&&i.swipeoutOpen(c,"right"),d>0&&f.length>0&&i.swipeoutOpen(c,"left")),r=!1,void(s=!1);P=!1,S=!1;var D;if(m.length>0)for(O=v/g,v<-g&&(v=-g-Math.pow(-v-g,.8),k.length>0&&(S=!0)),n=0;n0&&D.hasClass("swipeout-overswipe")&&(D.css({left:(S?-p:0)+"px"}),S?D.addClass("swipeout-overswipe-active"):D.removeClass("swipeout-overswipe-active")),D.transform("translate3d("+(v-p*(1+Math.max(O,-1)))+"px,0,0)");if(f.length>0)for(O=v/h,v>h&&(v=h+Math.pow(v-h,.8),T.length>0&&(P=!0)),n=0;n0&&D.hasClass("swipeout-overswipe")&&(D.css({left:(P?p:0)+"px"}),P?D.addClass("swipeout-overswipe-active"):D.removeClass("swipeout-overswipe-active")),C.length>1&&D.css("z-index",C.length-n),D.transform("translate3d("+(v+p*(1-Math.min(O,1)))+"px,0,0)");u.transform("translate3d("+v+"px,0,0)")}}function n(e){if(!r||!s)return r=!1,void(s=!1);r=!1,s=!1;var a,t,n,l,w,T,k=(new Date).getTime()-p;if(T="to-left"===x?I:M,n="to-left"===x?m:f,t="to-left"===x?g:h,a=k<300&&(d<-10&&"to-left"===x||d>10&&"to-right"===x)||k>=300&&Math.abs(v)>t/2?"open":"close",k<300&&(0===Math.abs(v)&&(a="close"),Math.abs(v)===t&&(a="open")),"open"===a){i.swipeoutOpenedEl=c,c.trigger("open"),c.addClass("swipeout-opened transitioning");var E="to-left"===x?-t:t;if(u.transform("translate3d("+E+"px,0,0)"),n.addClass("swipeout-actions-opened"),l="to-left"===x?y:C)for(w=0;w0&&C!==l)for(w=0;w0&&y!==l)for(w=0;w0&&y.transform(""),f.length>0&&C.transform("")))})}var r,s,l,p,d,c,u,m,f,h,g,v,b,w,C,y,x,T,k,P,S,M,I,E={};o(document).on(i.touchEvents.start,function(e){if(i.swipeoutOpenedEl){var a=o(e.target);i.swipeoutOpenedEl.is(a[0])||a.parents(".swipeout").is(i.swipeoutOpenedEl)||a.hasClass("modal-in")||a.hasClass("modal-overlay")||a.hasClass("actions-modal")||a.parents(".actions-modal.modal-in, .modal.modal-in").length>0||i.swipeoutClose(i.swipeoutOpenedEl)}}),e?(o(e).on(i.touchEvents.start,a),o(e).on(i.touchEvents.move,t),o(e).on(i.touchEvents.end,n)):(o(document).on(i.touchEvents.start,".list-block li.swipeout",a),o(document).on(i.touchEvents.move,".list-block li.swipeout",t),o(document).on(i.touchEvents.end,".list-block li.swipeout",n))},i.swipeoutOpen=function(e,a,t){if(e=o(e),2===arguments.length&&"function"==typeof arguments[1]&&(t=a),0!==e.length&&(e.length>1&&(e=o(e[0])),e.hasClass("swipeout")&&!e.hasClass("swipeout-opened"))){a||(a=e.find(".swipeout-actions-right").length>0?"right":"left");var n=e.find(".swipeout-actions-"+a);if(0!==n.length){n.hasClass("swipeout-actions-no-fold")||i.params.swipeoutActionsNoFold;e.trigger("open").addClass("swipeout-opened").removeClass("transitioning"),n.addClass("swipeout-actions-opened");var r,s=n.children("a"),l=n.outerWidth(),p="right"===a?-l:l;if(s.length>1){for(r=0;r1&&(e=o(e[0])),i.swipeoutOpenedEl=void 0,e.trigger("delete"),e.css({height:e.outerHeight()+"px"});e[0].clientLeft;e.css({height:"0px"}).addClass("deleting transitioning").transitionEnd(function(){if(e.trigger("deleted"),a&&a.call(e[0]),e.parents(".virtual-list").length>0){var t=e.parents(".virtual-list")[0].f7VirtualList,n=e[0].f7VirtualListIndex;t&&"undefined"!=typeof n&&t.deleteItem(n)}else i.params.swipeoutRemoveWithTimeout?setTimeout(function(){e.remove()},0):e.remove()});var t="-100%";e.find(".swipeout-content").transform("translate3d("+t+",0,0)")}},i.sortableToggle=function(e){return e=o(e),0===e.length&&(e=o(".list-block.sortable")),e.toggleClass("sortable-opened"),e.hasClass("sortable-opened")?e.trigger("open"):e.trigger("close"),e},i.sortableOpen=function(e){return e=o(e),0===e.length&&(e=o(".list-block.sortable")),e.addClass("sortable-opened"),e.trigger("open"),e},i.sortableClose=function(e){return e=o(e),0===e.length&&(e=o(".list-block.sortable")),e.removeClass("sortable-opened"),e.trigger("close"),e},i.initSortable=function(){function e(e){r=!1,n=!0,s="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,p=o(this).parent(),v=p.index(),c=p.parent().find("li"),g=p.parents(".sortable"),e.preventDefault(),i.allowPanelOpen=i.allowSwipeout=!1}function a(e){if(n&&p){var a=("touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY);r||(p.addClass("sorting"),g.addClass("sortable-sorting"),u=p[0].offsetTop,m=p.parent().height()-p[0].offsetTop-p.height(),d=p[0].offsetHeight),r=!0,e.preventDefault(),e.f7PreventPanelSwipe=!0,l=a-s;var t=l;t<-u&&(t=-u),t>m&&(t=m),p.transform("translate3d(0,"+t+"px,0)"),h=f=void 0,c.each(function(){var e=o(this);if(e[0]!==p[0]){var a=e[0].offsetTop,n=e.height(),r=p[0].offsetTop+t;r>=a-n/2&&p.index()e.index()?(e.transform("translate3d(0, "+d+"px,0)"),f=void 0,h||(h=e)):o(this).transform("translate3d(0, 0%,0)")}})}}function t(e){if(i.allowPanelOpen=i.allowSwipeout=!0,!n||!r)return n=!1,void(r=!1);e.preventDefault(),c.transform(""),p.removeClass("sorting"),g.removeClass("sortable-sorting");var a,t,s;f&&(p.insertAfter(f),p.trigger("sort",{startIndex:v,newIndex:p.index()})),h&&(p.insertBefore(h),p.trigger("sort",{startIndex:v,newIndex:p.index()})),(f||h)&&g.hasClass("virtual-list")&&(a=g[0].f7VirtualList,t=p[0].f7VirtualListIndex,s=h?h[0].f7VirtualListIndex:f[0].f7VirtualListIndex,a&&a.moveItem(t,s)),f=h=void 0,n=!1,r=!1}var n,r,s,l,p,d,c,u,m,f,h,g,v;o(document).on(i.touchEvents.start,".list-block.sortable .sortable-handler",e),i.support.touch?(o(document).on(i.touchEvents.move,".list-block.sortable .sortable-handler",a),o(document).on(i.touchEvents.end,".list-block.sortable .sortable-handler",t)):(o(document).on(i.touchEvents.move,a),o(document).on(i.touchEvents.end,t))},i.initSmartSelects=function(e){e=o(e);var a;a=e.is(".smart-select")?e:e.find(".smart-select"),0!==a.length&&a.each(function(){var e=o(this),a=e.find("select");if(0!==a.length){var t=a[0];if(0!==t.length){for(var n=[],r=0;r'+n.join(", ")+"");else{var s=i.text();if(i.hasClass("smart-select-value"))for(r=0;r0;s&&i.smartSelectOpen(n,!0)},i.smartSelectOpen=function(e,a){function t(){var a=e.parents(".page-content");if(0!==a.length){var t,n=parseInt(a.css("padding-top"),10),r=parseInt(a.css("padding-bottom"),10),i=a[0].offsetHeight-n-ie.height(),s=a[0].scrollHeight-n-ie.height(),o=e.offset().top-n+e[0].offsetHeight;if(o>i){var l=a.scrollTop()+o-i;l+i>s&&(t=l+i-s+r,i===s&&(t=ie.height()),a.css({"padding-bottom":t+"px"})),a.scrollTop(l,300)}}}function n(a){var t=!0;(a.target===e[0]||o(a.target).parents(e[0]).length>0)&&(t=!1),o(a.target).parents(".picker-modal").length>0&&(t=!1),t&&i.closeModal(".smart-select-picker.modal-in")}function r(e){k.selectedOptions.length>=F?e.find('input[type="checkbox"]').each(function(){this.checked?o(this).parents("li").removeClass("disabled"):o(this).parents("li").addClass("disabled")}):e.find(".disabled").removeClass("disabled")}function s(a){if(a=o(a),C){var t=i.virtualList(a.find(".virtual-list"),{items:R,template:W,height:y||void 0,searchByItem:function(e,a,t){return t.text.toLowerCase().indexOf(e.trim().toLowerCase())>=0}});a.once("popup"===c||"picker"===c?"closed":"pageBeforeRemove",function(){t&&t.destroy&&t.destroy()})}F&&r(a),g&&a.find('input[type="radio"][name="'+q+'"]:checked').parents("label").once("click",function(){"popup"===c?i.closeModal(re):"picker"===c?i.closeModal(ie):d.router.back()}),a.on("change",'input[name="'+q+'"]',function(){var t=this,n=t.value,s=[];if("checkbox"===t.type){for(var o=0;o0)return}else if("picker"===c){if(o(".picker-modal.modal-in").length>0&&!a){if(e[0].f7SmartSelectPicker===o(".picker-modal.modal-in:not(.modal-out)")[0])return;i.closeModal(o(".picker-modal.modal-in:not(.modal-out)"))}}else if(!d)return;var u,m=e.dataset(),f=m.pageTitle||e.find(".item-title").text(),h=m.backText||i.params.smartSelectBackText;u="picker"===c?m.pickerCloseText||m.backText||i.params.smartSelectPickerCloseText:m.popupCloseText||m.backText||i.params.smartSelectPopupCloseText;var g=void 0!==m.backOnSelect?m.backOnSelect:i.params.smartSelectBackOnSelect,v=m.formTheme||i.params.smartSelectFormTheme,b=m.navbarTheme||i.params.smartSelectNavbarTheme,w=m.toolbarTheme||i.params.smartSelectToolbarTheme,C=m.virtualList,y=m.virtualListHeight,x=i.params.material,T=m.pickerHeight||i.params.smartSelectPickerHeight,k=e.find("select")[0],P=o(k),S=P.dataset();if(!(k.disabled||e.hasClass("disabled")||P.hasClass("disabled"))){for(var M,I,E,O,D,z,L,B,N,H,A,R=[],V=(new Date).getTime(),Y=k.multiple?"checkbox":"radio",q=Y+"-"+V,F=P.attr("maxlength"),X=k.name,G=0;G{{groupLabel}}{{else}}{{/if}}')); var W=i._compiledTemplates.smartSelectItem,j="";if(!C)for(var _=0;_')),Q=i._compiledTemplates.smartSelectToolbar({pageTitle:f,closeText:u,openIn:c,toolbarTheme:w,inPicker:"picker"===c})):(i._compiledTemplates.smartSelectNavbar||(i._compiledTemplates.smartSelectNavbar=l.compile(i.params.smartSelectNavbarTemplate||'')),U=i._compiledTemplates.smartSelectNavbar({pageTitle:f,backText:h,closeText:u,openIn:c,navbarTheme:b,inPopup:"popup"===c,inPage:"page"===c,leftTemplate:"popup"===c?(i.params.smartSelectPopupCloseTemplate||(x?'
':'')).replace(/{{closeText}}/g,u):(i.params.smartSelectBackTemplate||(x?'
':'')).replace(/{{backText}}/g,h)}),"page"===c?(J="static",e.parents(".navbar-through").length>0&&(J="through"),e.parents(".navbar-fixed").length>0&&(J="fixed"),Z=e.parents(".page").hasClass("no-toolbar")?"no-toolbar":"",K=e.parents(".page").hasClass("no-navbar")?"no-navbar":"navbar-"+J,$=e.parents(".page").hasClass("no-tabbar")?"no-tabbar":""):J="fixed");var ee,ae,te="smart-select-"+q,ne="undefined"==typeof e.data("searchbar")?i.params.smartSelectSearchbar:"true"===e.data("searchbar");ne&&(ee=e.data("searchbar-placeholder")||"Search",ae=e.data("searchbar-cancel")||"Cancel");var re,ie,se='
',oe=("picker"!==c&&"through"===J?U:"")+'
'+("picker"!==c&&"fixed"===J?U:"")+(ne?se:"")+'
'+("picker"!==c&&"static"===J?U:"")+'
    '+(C?"":j)+"
";"popup"===c?(a?(re=o(".popup.smart-select-popup .view"),re.html(oe)):(re=i.popup('"),re=o(re)),i.initPage(re.find(".page")),s(re)):"picker"===c?(a?(ie=o(".picker-modal.smart-select-picker .view"),ie.html(oe)):(ie=i.pickerModal('
"+Q+'
'+oe+"
"),ie=o(ie),t(),o("html").on("click",n),ie.once("close",function(){e[0].f7SmartSelectPicker=void 0,o("html").off("click",n),e.parents(".page-content").css({paddingBottom:""})}),e[0].f7SmartSelectPicker=ie[0]),i.initPage(ie.find(".page")),s(ie)):(o(document).once("pageInit",".smart-select-page",p),d.router.load({content:oe,reload:!!a||void 0}))}}}};var g=function(e,a){var t={cols:1,height:i.params.material?48:44,cache:!0,dynamicHeightBufferSize:1,showFilteredItemsOnly:!1};a=a||{};for(var n in t)"undefined"==typeof a[n]&&(a[n]=t[n]);var r=this;r.listBlock=o(e),r.params=a,r.items=r.params.items,r.params.showFilteredItemsOnly&&(r.filteredItems=[]),r.params.template&&("string"==typeof r.params.template?r.template=l.compile(r.params.template):"function"==typeof r.params.template&&(r.template=r.params.template)),r.pageContent=r.listBlock.parents(".page-content");var s;"undefined"!=typeof r.params.updatableScroll?s=r.params.updatableScroll:(s=!0,i.device.ios&&i.device.osVersion.split(".")[0]<8&&(s=!1)),r.ul=r.params.ul?o(r.params.ul):r.listBlock.children("ul"),0===r.ul.length&&(r.listBlock.append("
    "),r.ul=r.listBlock.children("ul")),r.domCache={},r.displayDomCache={},r.tempDomElement=document.createElement("ul"),r.lastRepaintY=null,r.fragment=document.createDocumentFragment(),r.filterItems=function(e,a){r.filteredItems=[];for(var t=(e[0],e[e.length-1],0);th||!s&&r.pageContent[0].scrollTop+p>=r.pageContent[0].scrollHeight){r.lastRepaintY=t;var n,i,o=r.filteredItems||r.items,l=0,d=0;if(g){var u,f,v=0;for(h=p,u=0;u=t-2*p*r.params.dynamicHeightBufferSize?n=u:l+=f),"undefined"==typeof i&&((v+f>=t+2*p*r.params.dynamicHeightBufferSize||u===r.heights.length-1)&&(i=u+1),d+=f),v+=f;i=Math.min(i,o.length)}else n=(parseInt(t/r.params.height)-c)*r.params.cols,n<0&&(n=0),i=Math.min(n+m*r.params.cols,o.length);var b;r.reachEnd=!1;for(var w=n;wr.items.length)return!1;var a,t=0;if(g)for(var n=0;n=0;a--)r.items.unshift(e[a]);if(r.params.cache){var t={};for(var n in r.domCache)t[parseInt(n,10)+e.length]=r.domCache[n];r.domCache=t}r.update()},r.prependItem=function(e){r.prependItems([e])},r.moveItem=function(e,a){if(e!==a){var t=r.items.splice(e,1)[0];if(a>=r.items.length?(r.items.push(t),a=r.items.length-1):r.items.splice(a,0,t),r.params.cache){var n={};for(var i in r.domCache){var s=parseInt(i,10),o=el)&&(n[s]=r.domCache[s]),s===o&&(n[l]=r.domCache[s]),s>o&&s<=l&&(n[s+p]=r.domCache[s])}r.domCache=n}r.update()}},r.insertItemBefore=function(e,a){if(0===e)return void r.prependItem(a);if(e>=r.items.length)return void r.appendItem(a);if(r.items.splice(e,0,a),r.params.cache){var t={};for(var n in r.domCache){var i=parseInt(n,10);i>=e&&(t[i+1]=r.domCache[i])}r.domCache=t}r.update()},r.deleteItems=function(e){for(var a,t=0,n=0;na&&(t=-n),i+=t,a=e[n];var s=r.items.splice(i,1)[0];if(r.filteredItems&&r.filteredItems.indexOf(s)>=0&&r.filteredItems.splice(r.filteredItems.indexOf(s),1),r.params.cache){var o={};for(var l in r.domCache){var p=parseInt(l,10);p===i?delete r.domCache[i]:parseInt(l,10)>i?o[p-1]=r.domCache[l]:o[p]=r.domCache[l]}r.domCache=o}}r.update()},r.deleteAllItems=function(){r.items=[],delete r.filteredItems,r.params.cache&&(r.domCache={}),r.update()},r.deleteItem=function(e){r.deleteItems([e])},r.clearCache=function(){r.domCache={}},r.update=function(){r.setListSize(),r.render(!0)},r.destroy=function(){r.attachEvents(!0),delete r.items,delete r.domCache},r.init(),r.listBlock[0].f7VirtualList=r,r};i.virtualList=function(e,a){return new g(e,a)},i.reinitVirtualList=function(e){var a=o(e),t=a.find(".virtual-list");if(0!==t.length)for(var n=0;n1)return}h=o(this),h.hasClass("refreshing")||(c=!1,y=!1,d=!0,u=void 0,b=void 0,"touchstart"===e.type&&(p=e.targetTouches[0].identifier),x.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,x.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,f=(new Date).getTime())}function t(e){if(d){var a,t,n;if("touchmove"===e.type){if(p&&e.touches)for(var r=0;rMath.abs(a-x.x))),!u)return void(d=!1);if(v=h[0].scrollTop,"undefined"==typeof b&&0!==v&&(b=!0),!c){if(h.removeClass("transitioning"),v>h[0].offsetHeight)return void(d=!1);C&&(w=h.attr("data-ptr-distance"),w.indexOf("%")>=0&&(w=h[0].offsetHeight*parseInt(w,10)/100)),P=h.hasClass("refreshing")?w:0,k=h[0].scrollHeight===h[0].offsetHeight||"ios"!==i.device.os}return c=!0,m=t-x.y,m>0&&v<=0||v<0?("ios"===i.device.os&&parseInt(i.device.osVersion.split(".")[0],10)>7&&0===v&&!b&&(k=!0),k&&(e.preventDefault(),g=Math.pow(m,.85)+P,h.transform("translate3d(0,"+g+"px,0)")),k&&Math.pow(m,.85)>w||!k&&m>=2*w?(T=!0,h.addClass("pull-up").removeClass("pull-down")):(T=!1,h.removeClass("pull-up").addClass("pull-down")),y||(h.trigger("pullstart"),y=!0),h.trigger("pullmove",{event:e,scrollTop:v,translate:g,touchesDiff:m}),void 0):(y=!1,h.removeClass("pull-up pull-down"),void(T=!1))}}}function n(e){if(!("touchend"===e.type&&e.changedTouches&&e.changedTouches.length>0&&p&&e.changedTouches[0].identifier!==p)){if(!d||!c)return d=!1,void(c=!1);g&&(h.addClass("transitioning"),g=0),h.transform(""),T?(h.addClass("refreshing"),h.trigger("refresh",{done:function(){i.pullToRefreshDone(h)}})):h.removeClass("pull-down"),d=!1,c=!1,y&&h.trigger("pullend")}}function r(){l.off(i.touchEvents.start,a),l.off(i.touchEvents.move,t),l.off(i.touchEvents.end,n)}function s(){r(),S.off("pageBeforeRemove",s)}var l=o(e);if(l.hasClass("pull-to-refresh-content")||(l=l.find(".pull-to-refresh-content")),l&&0!==l.length){var p,d,c,u,m,f,h,g,v,b,w,C,y,x={},T=!1,k=!1,P=0,S=l.hasClass("page")?l:l.parents(".page"),M=!1;(S.find(".navbar").length>0||S.parents(".navbar-fixed, .navbar-through").length>0||S.hasClass("navbar-fixed")||S.hasClass("navbar-through"))&&(M=!0),S.hasClass("no-navbar")&&(M=!1),M||l.addClass("pull-to-refresh-no-navbar"),h=l,h.attr("data-ptr-distance")?C=!0:w=44;var I=!("touchstart"!==i.touchEvents.start||!i.support.passiveListener)&&{passive:!0,capture:!1};l.on(i.touchEvents.start,a,I),l.on(i.touchEvents.move,t),l.on(i.touchEvents.end,n,I),0!==S.length&&(l[0].f7DestroyPullToRefresh=r,S.on("pageBeforeRemove",s))}},i.pullToRefreshDone=function(e){e=o(e),0===e.length&&(e=o(".pull-to-refresh-content.refreshing")),e.removeClass("refreshing").addClass("transitioning"),e.transitionEnd(function(){e.removeClass("transitioning pull-up pull-down"),e.trigger("refreshdone")})},i.pullToRefreshTrigger=function(e){e=o(e),0===e.length&&(e=o(".pull-to-refresh-content")),e.hasClass("refreshing")||(e.addClass("transitioning refreshing"),e.trigger("refresh",{done:function(){i.pullToRefreshDone(e)}}))},i.destroyPullToRefresh=function(e){e=o(e);var a=e.hasClass("pull-to-refresh-content")?e:e.find(".pull-to-refresh-content");0!==a.length&&a[0].f7DestroyPullToRefresh&&a[0].f7DestroyPullToRefresh()},i.attachInfiniteScroll=function(e){o(e).on("scroll",n)},i.detachInfiniteScroll=function(e){o(e).off("scroll",n)},i.initPageInfiniteScroll=function(e){function a(){i.detachInfiniteScroll(t),e.off("pageBeforeRemove",a)}e=o(e);var t=e.find(".infinite-scroll");0!==t.length&&(i.attachInfiniteScroll(t),e.on("pageBeforeRemove",a))},i.initPageScrollToolbars=function(e){function a(a){e.hasClass("page-on-left")||(m=t[0].scrollTop,v=t[0].scrollHeight,b=t[0].offsetHeight,w=m+b>=v-S,y=d.hasClass("navbar-hidden"),x=c.hasClass("toolbar-hidden"),T=p&&p.hasClass("toolbar-hidden"),w?i.params.showBarsOnPageScrollEnd&&(C="show"):C=u>m?i.params.showBarsOnPageScrollTop||m<=44?"show":"hide":m>44?"hide":"show","show"===C?(f&&n&&y&&(i.showNavbar(d),e.removeClass("no-navbar-by-scroll"),y=!1),h&&r&&x&&(i.showToolbar(c),e.removeClass("no-toolbar-by-scroll"),x=!1),g&&s&&T&&(i.showToolbar(p),e.removeClass("no-tabbar-by-scroll"),T=!1)):(f&&n&&!y&&(i.hideNavbar(d),e.addClass("no-navbar-by-scroll"),y=!0),h&&r&&!x&&(i.hideToolbar(c),e.addClass("no-toolbar-by-scroll"),x=!0),g&&s&&!T&&(i.hideToolbar(p),e.addClass("no-tabbar-by-scroll"),T=!0)),u=m)}e=o(e);var t=e.find(".page-content");if(0!==t.length){var n=(i.params.hideNavbarOnPageScroll||t.hasClass("hide-navbar-on-scroll")||t.hasClass("hide-bars-on-scroll"))&&!(t.hasClass("keep-navbar-on-scroll")||t.hasClass("keep-bars-on-scroll")),r=(i.params.hideToolbarOnPageScroll||t.hasClass("hide-toolbar-on-scroll")||t.hasClass("hide-bars-on-scroll"))&&!(t.hasClass("keep-toolbar-on-scroll")||t.hasClass("keep-bars-on-scroll")),s=(i.params.hideTabbarOnPageScroll||t.hasClass("hide-tabbar-on-scroll"))&&!t.hasClass("keep-tabbar-on-scroll");if(n||r||s){var l=t.parents("."+i.params.viewClass);if(0!==l.length){var p,d=l.find(".navbar"),c=l.find(".toolbar");s&&(p=l.find(".tabbar"),0===p.length&&(p=l.parents("."+i.params.viewsClass).find(".tabbar")));var u,m,f=d.length>0,h=c.length>0,g=p&&p.length>0;u=m=t[0].scrollTop;var v,b,w,C,y,x,T,k=h&&r?c[0].offsetHeight:0,P=g&&s?p[0].offsetHeight:0,S=P||k;t.on("scroll",a),t[0].f7ScrollToolbarsHandler=a}}}},i.destroyScrollToolbars=function(e){e=o(e);var a=e.find(".page-content");if(0!==a.length){var t=a[0].f7ScrollToolbarsHandler;t&&a.off("scroll",a[0].f7ScrollToolbarsHandler)}},i.materialTabbarSetHighlight=function(e,a){e=o(e),a=a||e.find(".tab-link.active");var t,n;e.hasClass("tabbar-scrollable")?(t=a[0].offsetWidth+"px",n=(i.rtl?-a[0].offsetLeft:a[0].offsetLeft)+"px"):(t=1/e.find(".tab-link").length*100+"%",n=100*(i.rtl?-a.index():a.index())+"%"),e.find(".tab-link-highlight").css({width:t}).transform("translate3d("+n+",0,0)")},i.initPageMaterialTabbar=function(e){function a(){i.materialTabbarSetHighlight(t)}e=o(e);var t=o(e).find(".tabbar");t.length>0&&(0===t.find(".tab-link-highlight").length&&t.find(".toolbar-inner").append(''),a(),o(window).on("resize",a),e.once("pageBeforeRemove",function(){o(window).off("resize",a)}))},i.showTab=function(e,a,t){var n=o(e);if(2===arguments.length&&"boolean"==typeof a&&(t=a),0===n.length)return!1;if(n.hasClass("active"))return t&&n.trigger("show"),!1;var r=n.parent(".tabs");if(0===r.length)return!1;i.allowSwipeout=!0;var s=r.parent().hasClass("tabs-animated-wrap");if(s){var l=100*(i.rtl?n.index():-n.index());r.transform("translate3d("+l+"%,0,0)")}var p,d=r.parent().hasClass("tabs-swipeable-wrap");d&&(p=r.parent()[0].swiper,p.activeIndex!==n.index()&&p.slideTo(n.index(),void 0,!1));var c=r.children(".tab.active").removeClass("active").trigger("hide");if(n.addClass("active"),n.trigger("show"),!s&&!d&&n.find(".navbar").length>0){var u;u=n.hasClass(i.params.viewClass)?n[0]:n.parents("."+i.params.viewClass)[0],i.sizeNavbars(u)}if(a?a=o(a):(a=o("string"==typeof e?'.tab-link[href="'+e+'"]':'.tab-link[href="#'+n.attr("id")+'"]'),(!a||a&&0===a.length)&&o("[data-tab]").each(function(){n.is(o(this).attr("data-tab"))&&(a=o(this))})),0!==a.length){var m;if(c&&c.length>0){var f=c.attr("id");f&&(m=o('.tab-link[href="#'+f+'"]')),(!m||m&&0===m.length)&&o("[data-tab]").each(function(){c.is(o(this).attr("data-tab"))&&(m=o(this))})}if(a&&a.length>0&&(a.addClass("active"),i.params.material)){var h=a.parents(".tabbar");h.length>0&&(0===h.find(".tab-link-highlight").length&&h.find(".toolbar-inner").append(''),i.materialTabbarSetHighlight(h,a))}return m&&m.length>0&&m.removeClass("active"),!0}},i.accordionToggle=function(e){e=o(e),0!==e.length&&(e.hasClass("accordion-item-expanded")?i.accordionClose(e):i.accordionOpen(e))},i.accordionOpen=function(e){e=o(e);var a=e.parents(".accordion-list").eq(0),t=e.children(".accordion-item-content");0===t.length&&(t=e.find(".accordion-item-content"));var n=a.length>0&&e.parent().children(".accordion-item-expanded");n.length>0&&i.accordionClose(n),t.css("height",t[0].scrollHeight+"px").transitionEnd(function(){if(e.hasClass("accordion-item-expanded")){t.transition(0),t.css("height","auto");t[0].clientLeft;t.transition(""),e.trigger("opened")}else t.css("height",""),e.trigger("closed")}),e.trigger("open"),e.addClass("accordion-item-expanded")},i.accordionClose=function(e){e=o(e);var a=e.children(".accordion-item-content");0===a.length&&(a=e.find(".accordion-item-content")),e.removeClass("accordion-item-expanded"),a.transition(0),a.css("height",a[0].scrollHeight+"px");a[0].clientLeft;a.transition(""),a.css("height","").transitionEnd(function(){if(e.hasClass("accordion-item-expanded")){a.transition(0),a.css("height","auto");a[0].clientLeft;a.transition(""),e.trigger("opened")}else a.css("height",""),e.trigger("closed")}),e.trigger("close")},i.initFastClicks=function(){function e(e){var a,t=o(e),n=t.parents(i.params.activeStateElements);return t.is(i.params.activeStateElements)&&(a=t),n.length>0&&(a=a?a.add(n):n),a?a:t}function a(e){var a=e.parents(".page-content, .panel");return 0!==a.length&&("yes"!==a.prop("scrollHandlerSet")&&(a.on("scroll",function(){clearTimeout(R),clearTimeout(G)}),a.prop("scrollHandlerSet","yes")),!0)}function t(){A&&A.addClass("active-state")}function n(e){A&&(A.removeClass("active-state"),A=null)}function r(e){var a="input select textarea label".split(" ");return!!(e.nodeName&&a.indexOf(e.nodeName.toLowerCase())>=0)}function s(e){var a="button input textarea select".split(" ");return!(!document.activeElement||e===document.activeElement||document.activeElement===document.body)&&!(a.indexOf(e.nodeName.toLowerCase())>=0)}function l(e){var a=o(e);return("input"!==e.nodeName.toLowerCase()||"file"!==e.type)&&(("select"!==e.nodeName.toLowerCase()||!i.device.android)&&(!(a.hasClass("no-fastclick")||a.parents(".no-fastclick").length>0)&&(!i.params.fastClicksExclude||!a.is(i.params.fastClicksExclude))))}function p(e){if(document.activeElement===e)return!1;var a=e.nodeName.toLowerCase(),t="button checkbox file image radio submit".split(" ");return!e.disabled&&!e.readOnly&&("textarea"===a||("select"===a?!i.device.android:"input"===a&&t.indexOf(e.type)<0||void 0))}function d(e){e=o(e);var a=!0;return(e.is("label")||e.parents("label").length>0)&&(a=!i.device.android&&!(!i.device.ios||!e.is("input"))),a}function c(a){e(a.target).addClass("active-state"),"which"in a&&3===a.which&&setTimeout(function(){o(".active-state").removeClass("active-state")},0),i.params.material&&i.params.materialRipple&&(S=a.pageX,M=a.pageY,v(a.target,a.pageX,a.pageY))}function u(e){o(".active-state").removeClass("active-state"),i.params.material&&i.params.materialRipple&&b()}function m(e){o(".active-state").removeClass("active-state"),i.params.material&&i.params.materialRipple&&w()}function f(e){var a=i.params.materialRippleElements,t=o(e);if(t.is(a))return!t.hasClass("no-ripple")&&t;if(t.parents(a).length>0){var n=t.parents(a).eq(0);return!n.hasClass("no-ripple")&&n}return!1}function h(e,a,t){var n=t[0].getBoundingClientRect(),r={x:e-n.left,y:a-n.top},i=n.height,s=n.width,l=Math.max(Math.pow(Math.pow(i,2)+Math.pow(s,2),.5),48);q=o('
    '),t.prepend(q);q[0].clientLeft;X="translate3d("+(-r.x+s/2)+"px, "+(-r.y+i/2)+"px, 0) scale(1)",q.transform(X)}function g(){if(q){var e=q,a=setTimeout(function(){e.remove()},400);q.addClass("ripple-wave-fill").transform(X.replace("scale(1)","scale(1.01)")).transitionEnd(function(){clearTimeout(a);var e=o(this).addClass("ripple-wave-out").transform(X.replace("scale(1)","scale(1.01)"));a=setTimeout(function(){e.remove()},700),setTimeout(function(){e.transitionEnd(function(){clearTimeout(a),o(this).remove()})},0)}),q=F=void 0}}function v(e,t,n){return F=f(e),F&&0!==F.length?void(a(F)?G=setTimeout(function(){h(S,M,F)},80):h(S,M,F)):void(F=void 0)}function b(){clearTimeout(G),g()}function w(){q?g():F&&!B?(clearTimeout(G),h(S,M,F),setTimeout(g,0)):g()}function C(e){var a=e.changedTouches[0],t=document.createEvent("MouseEvents"),n="click";i.device.android&&"select"===E.nodeName.toLowerCase()&&(n="mousedown"),t.initMouseEvent(n,!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),t.forwardedTouchEvent=!0,E.dispatchEvent(t)}function y(r){if(B=!1,N=!1,r.targetTouches.length>1)return A&&n(),!0;if(r.touches.length>1&&A&&n(),i.params.tapHold&&(H&&clearTimeout(H),H=setTimeout(function(){r&&r.touches&&r.touches.length>1||(N=!0,r.preventDefault(),o(r.target).trigger("taphold"))},i.params.tapHoldDelay)),Y&&clearTimeout(Y),V=l(r.target),!V)return O=!1,!0;if(i.device.ios||i.device.android&&"getSelection"in window){var p=window.getSelection();if(p.rangeCount&&p.focusNode!==document.body&&(!p.isCollapsed||document.activeElement===p.focusNode))return D=!0,!0;D=!1}i.device.android&&s(r.target)&&document.activeElement.blur(),O=!0,E=r.target,I=(new Date).getTime(),S=r.targetTouches[0].pageX,M=r.targetTouches[0].pageY,i.device.ios&&(z=void 0,o(E).parents().each(function(){var e=this;e.scrollHeight>e.offsetHeight&&!z&&(z=e,z.f7ScrollTop=z.scrollTop)})),r.timeStamp-Lt||Math.abs(s-M)>t)&&(a=!0)}else a=!0;a&&(O=!1,E=null,B=!0,i.params.tapHold&&clearTimeout(H),i.params.activeState&&(clearTimeout(R),n()),i.params.material&&i.params.materialRipple&&b())}}function T(e){if(clearTimeout(R),clearTimeout(H),!O)return!D&&V&&(i.device.android&&!e.cancelable||e.preventDefault()),!0;if(document.activeElement===e.target)return i.params.activeState&&n(),i.params.material&&i.params.materialRipple&&w(),!0;if(D||e.preventDefault(),e.timeStamp-L159?(E=null,!1):(E.focus(),!1);E.focus()}return document.activeElement&&E!==document.activeElement&&document.activeElement!==document.body&&"label"!==E.nodeName.toLowerCase()&&document.activeElement.blur(),e.preventDefault(),C(e),!1}function k(e){O=!1,E=null,clearTimeout(R),clearTimeout(H),i.params.activeState&&n(),i.params.material&&i.params.materialRipple&&w()}function P(e){var a=!1;return O?(E=null,O=!1,!0):"submit"===e.target.type&&0===e.detail||(E||r(e.target)||(a=!0),V||(a=!0),document.activeElement===E&&(a=!0),e.forwardedTouchEvent&&(a=!0),e.cancelable||(a=!0),i.params.tapHold&&i.params.tapHoldPreventClicks&&N&&(a=!1),a||(e.stopImmediatePropagation(),e.stopPropagation(),E?(d(E)||B)&&e.preventDefault():e.preventDefault(),E=null),Y=setTimeout(function(){V=!1},i.device.ios||i.device.androidChrome?100:400),i.params.tapHold&&(H=setTimeout(function(){N=!1},i.device.ios||i.device.androidChrome?100:400)),a)}i.params.activeState&&o("html").addClass("watch-active-state"),i.device.ios&&i.device.webView&&window.addEventListener("touchstart",function(){});var S,M,I,E,O,D,z,L,B,N,H,A,R,V,Y,q,F,X,G;i.support.touch?(document.addEventListener("click",P,!0),document.addEventListener("touchstart",y),document.addEventListener("touchmove",x),document.addEventListener("touchend",T),document.addEventListener("touchcancel",k)):i.params.activeState&&(document.addEventListener("mousedown",c),document.addEventListener("mousemove",u),document.addEventListener("mouseup",m)),i.params.material&&i.params.materialRipple&&document.addEventListener("contextmenu",function(e){A&&n(),w()})},i.initClickEvents=function(){function e(e){var a=o(this),t=o(e.target),n="a"===a[0].nodeName.toLowerCase()||a.parents("a").length>0||"a"===t[0].nodeName.toLowerCase()||t.parents("a").length>0;if(!n){var r;if(i.params.scrollTopOnNavbarClick&&a.is(".navbar .center")){var s=a.parents(".navbar");r=s.parents(".page-content"),0===r.length&&(s.parents(".page").length>0&&(r=s.parents(".page").find(".page-content")),0===r.length&&s.nextAll(".pages").length>0&&(r=s.nextAll(".pages").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content")))}i.params.scrollTopOnStatusbarClick&&a.is(".statusbar-overlay")&&(r=o(".popup.modal-in").length>0?o(".popup.modal-in").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content"):o(".panel.active").length>0?o(".panel.active").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content"):o(".views > .view.active").length>0?o(".views > .view.active").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content"):o(".views").find(".page:not(.page-on-left):not(.page-on-right):not(.cached)").find(".page-content")),r&&r.length>0&&(r.hasClass("tab")&&(r=r.parent(".tabs").children(".page-content.active")),r.length>0&&r.scrollTop(0,300))}}function a(e){var a=o(this),t=a.attr("href"),n="a"===a[0].nodeName.toLowerCase();if(n&&(a.is(i.params.externalLinks)||t&&t.indexOf("javascript:")>=0))return void(t&&"_system"===a.attr("target")&&(e.preventDefault(),window.open(t,"_system")));var r=a.dataset();if(a.hasClass("smart-select")&&i.smartSelectOpen&&i.smartSelectOpen(a),a.hasClass("open-panel")&&(1===o(".panel").length?o(".panel").hasClass("panel-left")?i.openPanel("left"):i.openPanel("right"):"right"===r.panel?i.openPanel("right"):i.openPanel("left")),a.hasClass("close-panel")&&i.closePanel(),a.hasClass("panel-overlay")&&i.params.panelsCloseByOutside&&i.closePanel(),a.hasClass("open-popover")){var s;s=r.popover?r.popover:".popover",i.popover(s,a)}a.hasClass("close-popover")&&i.closeModal(".popover.modal-in");var d;a.hasClass("open-popup")&&(d=r.popup?r.popup:".popup",i.popup(d)),a.hasClass("close-popup")&&(d=r.popup?r.popup:".popup.modal-in",i.closeModal(d));var c;if(a.hasClass("open-login-screen")&&(c=r.loginScreen?r.loginScreen:".login-screen",i.loginScreen(c)),a.hasClass("close-login-screen")&&i.closeModal(".login-screen.modal-in"),a.hasClass("modal-overlay")&&(o(".modal.modal-in").length>0&&i.params.modalCloseByOutside&&i.closeModal(".modal.modal-in"),o(".actions-modal.modal-in").length>0&&i.params.actionsCloseByOutside&&i.closeModal(".actions-modal.modal-in"),o(".popover.modal-in").length>0&&i.closeModal(".popover.modal-in")),a.hasClass("popup-overlay")&&o(".popup.modal-in").length>0&&i.params.popupCloseByOutside&&i.closeModal(".popup.modal-in"),a.hasClass("picker-modal-overlay")&&o(".picker-modal.modal-in").length>0&&i.closeModal(".picker-modal.modal-in"),a.hasClass("close-picker")){var u=o(".picker-modal.modal-in");u.length>0?i.closeModal(u):(u=o(".popover.modal-in .picker-modal"),u.length>0&&i.closeModal(u.parents(".popover")))}if(a.hasClass("open-picker")){var m;m=r.picker?r.picker:".picker-modal",i.pickerModal(m,a)}var f;if(a.hasClass("tab-link")&&(f=!0,i.showTab(r.tab||a.attr("href"),a)),a.hasClass("swipeout-close")&&i.swipeoutClose(a.parents(".swipeout-opened")),a.hasClass("swipeout-delete"))if(r.confirm){var h=r.confirm,g=r.confirmTitle;g?i.confirm(h,g,function(){i.swipeoutDelete(a.parents(".swipeout"))},function(){r.closeOnCancel&&i.swipeoutClose(a.parents(".swipeout"))}):i.confirm(h,function(){i.swipeoutDelete(a.parents(".swipeout"))},function(){r.closeOnCancel&&i.swipeoutClose(a.parents(".swipeout"))})}else i.swipeoutDelete(a.parents(".swipeout"));if(a.hasClass("toggle-sortable")&&i.sortableToggle(r.sortable),a.hasClass("open-sortable")&&i.sortableOpen(r.sortable),a.hasClass("close-sortable")&&i.sortableClose(r.sortable),a.hasClass("accordion-item-toggle")||a.hasClass("item-link")&&a.parent().hasClass("accordion-item")){var v=a.parent(".accordion-item");0===v.length&&(v=a.parents(".accordion-item")),0===v.length&&(v=a.parents("li")),i.accordionToggle(v)}if(a.hasClass("floating-button")&&a.parent().hasClass("speed-dial")&&a.parent().toggleClass("speed-dial-opened"),a.hasClass("close-speed-dial")&&o(".speed-dial-opened").removeClass("speed-dial-opened"),(!i.params.ajaxLinks||a.is(i.params.ajaxLinks))&&n&&i.params.router){n&&e.preventDefault();var b=t&&t.length>0&&"#"!==t&&!f,w=r.template;if(b||a.hasClass("back")||w){var C;if(r.view?C=o(r.view)[0].f7View:(C=a.parents("."+i.params.viewClass)[0]&&a.parents("."+i.params.viewClass)[0].f7View,C&&C.params.linksView&&("string"==typeof C.params.linksView?C=o(C.params.linksView)[0].f7View:C.params.linksView instanceof p&&(C=C.params.linksView))),C||i.mainView&&(C=i.mainView),!C)return;var y;if(w)t=void 0;else{if(t&&0===t.indexOf("#")&&"#"!==t){if(!C.params.domCache)return;y=t.split("#")[1]}if("#"===t&&!a.hasClass("back"))return}var x;"undefined"!=typeof r.animatePages?x=r.animatePages:(a.hasClass("with-animation")&&(x=!0),a.hasClass("no-animation")&&(x=!1));var T={animatePages:x,ignoreCache:r.ignoreCache,force:r.force,reload:r.reload,reloadPrevious:r.reloadPrevious,pageName:y,pushState:r.pushState,url:t};if(i.params.template7Pages){T.contextName=r.contextName;var k=r.context;k&&(T.context=JSON.parse(k))}w&&w in l.templates&&(T.template=l.templates[w]),a.hasClass("back")?C.router.back(T):C.router.load(T)}}}function t(e){e.preventDefault()}o(document).on("click","a, .open-panel, .close-panel, .panel-overlay, .modal-overlay, .popup-overlay, .swipeout-delete, .swipeout-close, .close-popup, .open-popup, .open-popover, .open-login-screen, .close-login-screen .smart-select, .toggle-sortable, .open-sortable, .close-sortable, .accordion-item-toggle, .close-picker, .picker-modal-overlay",a), (i.params.scrollTopOnNavbarClick||i.params.scrollTopOnStatusbarClick)&&o(document).on("click",".statusbar-overlay, .navbar .center",e),i.support.touch&&!i.device.android&&o(document).on(i.params.fastClicks?"touchstart":"touchmove",".panel-overlay, .modal-overlay, .preloader-indicator-overlay, .popup-overlay, .searchbar-overlay",t)},i.initResize=function(){o(window).on("resize",i.resize),o(window).on("orientationchange",i.orientationchange)},i.resize=function(){i.sizeNavbars&&i.sizeNavbars(),r()},i.orientationchange=function(){i.device&&i.device.minimalUi&&(90!==window.orientation&&window.orientation!==-90||(document.body.scrollTop=0)),r()},i.formsData={},i.formStoreData=function(e,a){i.formsData[e]=a,i.ls["f7form-"+e]=JSON.stringify(a)},i.formDeleteData=function(e){i.formsData[e]&&(i.formsData[e]="",delete i.formsData[e]),i.ls["f7form-"+e]&&(i.ls["f7form-"+e]="",i.ls.removeItem("f7form-"+e))},i.formGetData=function(e){return i.ls["f7form-"+e]?JSON.parse(i.ls["f7form-"+e]):i.formsData[e]?i.formsData[e]:void 0},i.formToData=function(e){if(e=o(e),1!==e.length)return!1;var a={},t=["submit","image","button","file"],n=[];return e.find("input, select, textarea").each(function(){var r=o(this),i=r.attr("name"),s=r.attr("type"),l=this.nodeName.toLowerCase();if(!(t.indexOf(s)>=0)&&!(n.indexOf(i)>=0)&&i)if("select"===l&&r.prop("multiple"))n.push(i),a[i]=[],e.find('select[name="'+i+'"] option').each(function(){this.selected&&a[i].push(this.value)});else switch(s){case"checkbox":n.push(i),a[i]=[],e.find('input[name="'+i+'"]').each(function(){this.checked&&a[i].push(this.value)});break;case"radio":n.push(i),e.find('input[name="'+i+'"]').each(function(){this.checked&&(a[i]=this.value)});break;default:a[i]=r.val()}}),e.trigger("formToJSON formToData",{formData:a}),a},i.formToJSON=i.formToData,i.formFromData=function(e,a){if(e=o(e),1!==e.length)return!1;var t=["submit","image","button","file"],n=[];e.find("input, select, textarea").each(function(){var r=o(this),i=r.attr("name"),s=r.attr("type"),l=this.nodeName.toLowerCase();if(a[i]&&!(t.indexOf(s)>=0)&&!(n.indexOf(i)>=0)&&i){if("select"===l&&r.prop("multiple"))n.push(i),e.find('select[name="'+i+'"] option').each(function(){a[i].indexOf(this.value)>=0?this.selected=!0:this.selected=!1});else switch(s){case"checkbox":n.push(i),e.find('input[name="'+i+'"]').each(function(){a[i].indexOf(this.value)>=0?this.checked=!0:this.checked=!1});break;case"radio":n.push(i),e.find('input[name="'+i+'"]').each(function(){a[i]===this.value?this.checked=!0:this.checked=!1});break;default:r.val(a[i])}"select"===l&&r.parents(".smart-select").length>0&&r.trigger("change")}}),e.trigger("formFromJSON formFromData",{formData:a})},i.formFromJSON=i.formFromData,i.initFormsStorage=function(e){function a(){var e=o(this),a=e[0].id;if(a){var t=i.formToData(e);t&&(i.formStoreData(a,t),e.trigger("store",{data:t}))}}function t(){n.off("change submit",a),e.off("pageBeforeRemove",t)}e=o(e);var n=e.find("form.store-data");0!==n.length&&(n.each(function(){var e=this.getAttribute("id");if(e){var a=i.formGetData(e);a&&i.formFromData(this,a)}}),n.on("change submit",a),e.on("pageBeforeRemove",t))},o(document).on("submit change","form.ajax-submit, form.ajax-submit-onchange",function(e){var a=o(this);if("change"!==e.type||a.hasClass("ajax-submit-onchange")){"submit"===e.type&&e.preventDefault();var t=(a.attr("method")||"GET").toUpperCase(),n=a.prop("enctype")||a.attr("enctype"),r=a.attr("action");if(r){var s;s="POST"===t?new FormData(a[0]):o.serializeObject(i.formToJSON(a[0]));var l=o.ajax({method:t,url:r,contentType:n,data:s,beforeSend:function(e){a.trigger("beforeSubmit",{data:s,xhr:e})},error:function(e){a.trigger("submitError",{data:s,xhr:e})},success:function(e){a.trigger("submitted",{data:e,xhr:l})}})}}}),i.resizeTextarea=function(e){if(e=o(e),e.hasClass("resizable")){e.css({height:""});var a=e[0].offsetHeight,t=a-e[0].clientHeight,n=e[0].scrollHeight;if(n+t>a){var r=n+t;e.css("height",r+"px")}}},i.resizableTextarea=function(e){function a(){clearTimeout(t),t=setTimeout(function(){i.resizeTextarea(e)},0)}if(e=o(e),0!==e.length){var t;return e[0].f7DestroyResizableTextarea=function(){e.off("change keydown keypress keyup paste cut",a)},e.on("change keydown keypress keyup paste cut",a)}},i.destroyResizableTextarea=function(e){e=o(e),e.length>0&&e.is("textarea")&&e[0].f7DestroyResizableTextarea?e[0].f7DestroyResizableTextarea():e.length>0&&e.find("textarea.resiable").each(function(){var e=this;e.f7DestroyResizableTextarea&&e.f7DestroyResizableTextarea()})},i.initPageResizableTextarea=function(e){e=o(e);var a=e.find("textarea.resizable");a.each(function(){i.resizableTextarea(this)})},i.initPageMaterialInputs=function(e){e=o(e);e.find("textarea.resizable");e.find(".item-input").each(function(){var e=o(this),a=["checkbox","button","submit","range","radio","image"];e.find("input, select, textarea").each(function(){var t=o(this);a.indexOf(t.attr("type"))<0&&(e.addClass("item-input-field"),""!==t.val().trim()&&t.parents(".item-input, .input-field").add(t.parents(".item-inner")).addClass("not-empty-state"))}),e.parents(".input-item, .inputs-list").length>0||e.parents(".list-block").eq(0).addClass("inputs-list")})},i.initMaterialWatchInputs=function(){function e(e){var a=o(this),t=a.attr("type");if(!(n.indexOf(t)>=0)){var r=a.add(a.parents(".item-input, .input-field")).add(a.parents(".item-inner").eq(0));r.addClass("focus-state")}}function a(e){var a=o(this),t=a.val(),r=a.attr("type");if(!(n.indexOf(r)>=0)){var i=a.add(a.parents(".item-input, .input-field")).add(a.parents(".item-inner").eq(0));i.removeClass("focus-state"),t&&""!==t.trim()?i.addClass("not-empty-state"):i.removeClass("not-empty-state")}}function t(e){var a=o(this),t=a.val(),r=a.attr("type");if(!(n.indexOf(r)>=0)){var i=a.add(a.parents(".item-input, .input-field")).add(a.parents(".item-inner").eq(0));t&&""!==t.trim()?i.addClass("not-empty-state"):i.removeClass("not-empty-state")}}var n=["checkbox","button","submit","range","radio","image"];o(document).on("change",".item-input input, .item-input select, .item-input textarea, input, textarea, select",t,!0),o(document).on("focus",".item-input input, .item-input select, .item-input textarea, input, textarea, select",e,!0),o(document).on("blur",".item-input input, .item-input select, .item-input textarea, input, textarea, select",a,!0)},i.pushStateQueue=[],i.pushStateClearQueue=function(){if(0!==i.pushStateQueue.length){var e,a=i.pushStateQueue.pop();i.params.pushStateNoAnimation===!0&&(e=!1),"back"===a.action&&i.router.back(a.view,{animatePages:e}),"loadPage"===a.action&&i.router.load(a.view,{url:a.stateUrl,animatePages:e,pushState:!1}),"loadContent"===a.action&&i.router.load(a.view,{content:a.stateContent,animatePages:e,pushState:!1}),"loadPageName"===a.action&&i.router.load(a.view,{pageName:a.statePageName,url:a.stateUrl,animatePages:e,pushState:!1})}},i.initPushState=function(){function e(e){if(!a){var t=i.mainView;if(t){var n=e.state;if(n||(n={viewIndex:i.views.indexOf(t),url:t.history[0]}),!(n.viewIndex<0)){var r,s=i.views[n.viewIndex],o=n&&n.url||void 0,l=n&&n.content||void 0,p=n&&n.pageName||void 0;i.params.pushStateNoAnimation===!0&&(r=!1),o!==s.url&&(s.history.indexOf(o)>=0?s.allowPageChange?i.router.back(s,{url:void 0,animatePages:r,pushState:!1,preloadOnly:!1}):i.pushStateQueue.push({action:"back",view:s}):l?s.allowPageChange?i.router.load(s,{content:l,animatePages:r,pushState:!1}):i.pushStateQueue.unshift({action:"loadContent",stateContent:l,view:s}):p?s.allowPageChange?i.router.load(s,{pageName:p,url:o,animatePages:r,pushState:!1}):i.pushStateQueue.unshift({action:"loadPageName",statePageName:p,view:s}):s.allowPageChange?i.router.load(s,{url:o,animatePages:r,pushState:!1}):i.pushStateQueue.unshift({action:"loadPage",stateUrl:o,view:s}))}}}}var a=!0;o(window).on("load",function(){setTimeout(function(){a=!1},0)}),document.readyState&&"complete"===document.readyState&&(a=!1),o(window).on("popstate",e)},i.swiper=function(e,a){return new Swiper(e,a)},i.initPageSwiper=function(e){function a(a){function t(){a.destroy(),e.off("pageBeforeRemove",t)}e.on("pageBeforeRemove",t)}e=o(e);var t=e.find(".swiper-init, .tabs-swipeable-wrap");0!==t.length&&t.each(function(){var e,t,n=o(this);n.hasClass("tabs-swipeable-wrap")&&(n.addClass("swiper-container").children(".tabs").addClass("swiper-wrapper").children(".tab").addClass("swiper-slide"),e=n.children(".tabs").children(".tab.active").index()),t=n.data("swiper")?JSON.parse(n.data("swiper")):n.dataset(),"undefined"==typeof t.initialSlide&&"undefined"!=typeof e&&(t.initialSlide=e),n.hasClass("tabs-swipeable-wrap")&&(t.onSlideChangeStart=function(e){i.showTab(e.slides.eq(e.activeIndex))});var r=i.swiper(n[0],t);a(r)})},i.reinitPageSwiper=function(e){e=o(e);var a=e.find(".swiper-init, .tabs-swipeable-wrap");if(0!==a.length)for(var t=0;t',s=a.params.lazyPhotoTemplate||'
    {{#if @root.material}}{{@root.materialPreloaderHtml}}{{/if}}
    ',p=a.params.objectTemplate||'
    {{js "this.html || this"}}
    ',d=a.params.captionTemplate||'
    {{caption}}
    ',c=a.params.navbarTemplate||'',u=a.params.toolbarTemplate||'
    ',m=l.compile('
    ")(a.params);a.activeIndex=a.params.initialSlide,a.openIndex=a.activeIndex,a.opened=!1,a.open=function(e){return"undefined"==typeof e&&(e=a.activeIndex),e=parseInt(e,10),a.opened&&a.swiper?void a.swiper.slideTo(e):(a.opened=!0,a.openIndex=e,"standalone"===a.params.type&&i.root.append(m),"popup"===a.params.type&&(a.popup=i.popup('"),o(a.popup).on("closed",a.onPopupClose)),"page"===a.params.type?(o(document).on("pageBeforeInit",a.onPageBeforeInit),o(document).on("pageBeforeRemove",a.onPageBeforeRemove),a.params.view||(a.params.view=i.mainView),void a.params.view.loadContent(m)):(a.layout(a.openIndex),void(a.params.onOpen&&a.params.onOpen(a))))},a.close=function(){a.opened=!1,a.swiperContainer&&0!==a.swiperContainer.length&&(a.params.onClose&&a.params.onClose(a),a.attachEvents(!0),"standalone"===a.params.type&&a.container.removeClass("photo-browser-in").addClass("photo-browser-out").animationEnd(function(){a.container.remove()}),a.swiper.destroy(),a.swiper=a.swiperContainer=a.swiperWrapper=a.slides=void 0)},a.onPopupClose=function(e){a.close(),o(a.popup).off("pageBeforeInit",a.onPopupClose)},a.onPageBeforeInit=function(e){"photo-browser-slides"===e.detail.page.name&&a.layout(a.openIndex),o(document).off("pageBeforeInit",a.onPageBeforeInit)},a.onPageBeforeRemove=function(e){"photo-browser-slides"===e.detail.page.name&&a.close(),o(document).off("pageBeforeRemove",a.onPageBeforeRemove)},a.onSliderTransitionStart=function(e){a.activeIndex=e.activeIndex;var t=e.activeIndex+1,n=e.slides.length;if(a.params.loop&&(n-=2,t-=e.loopedSlides,t<1&&(t=n+t),t>n&&(t-=n)),a.container.find(".photo-browser-current").text(t),a.container.find(".photo-browser-total").text(n),o(".photo-browser-prev, .photo-browser-next").removeClass("photo-browser-link-inactive"),e.isBeginning&&!a.params.loop&&o(".photo-browser-prev").addClass("photo-browser-link-inactive"),e.isEnd&&!a.params.loop&&o(".photo-browser-next").addClass("photo-browser-link-inactive"),a.captions.length>0){a.captionsContainer.find(".photo-browser-caption-active").removeClass("photo-browser-caption-active");var r=a.params.loop?e.slides.eq(e.activeIndex).attr("data-swiper-slide-index"):a.activeIndex;a.captionsContainer.find('[data-caption-index="'+r+'"]').addClass("photo-browser-caption-active")}var i=e.slides.eq(e.previousIndex).find("video");i.length>0&&"pause"in i[0]&&i[0].pause(),a.params.onTransitionStart&&a.params.onTransitionStart(e)},a.onSliderTransitionEnd=function(e){a.params.onTransitionEnd&&a.params.onTransitionEnd(e)},a.layout=function(e){"page"===a.params.type?a.container=o(".photo-browser-swiper-container").parents(".view"):a.container=o(".photo-browser"),"standalone"===a.params.type&&(a.container.addClass("photo-browser-in"),i.sizeNavbars(a.container)),a.swiperContainer=a.container.find(".photo-browser-swiper-container"),a.swiperWrapper=a.container.find(".photo-browser-swiper-wrapper"),a.slides=a.container.find(".photo-browser-slide"),a.captionsContainer=a.container.find(".photo-browser-captions"),a.captions=a.container.find(".photo-browser-caption");var t={nextButton:a.params.nextButton||".photo-browser-next",prevButton:a.params.prevButton||".photo-browser-prev",indexButton:a.params.indexButton,initialSlide:e,spaceBetween:a.params.spaceBetween,speed:a.params.speed,loop:a.params.loop,lazyLoading:a.params.lazyLoading,lazyLoadingInPrevNext:a.params.lazyLoadingInPrevNext,lazyLoadingOnTransitionStart:a.params.lazyLoadingOnTransitionStart,preloadImages:!a.params.lazyLoading,zoom:a.params.zoom,zoomMax:a.params.zoomMax,zoomMin:a.params.zoomMin,onTap:function(e,t){a.params.onTap&&a.params.onTap(e,t)},onClick:function(e,t){a.params.exposition&&a.toggleExposition(),a.params.onClick&&a.params.onClick(e,t)},onDoubleTap:function(e,t){a.params.onDoubleTap&&a.params.onDoubleTap(e,t)},onTransitionStart:function(e){a.onSliderTransitionStart(e)},onTransitionEnd:function(e){a.onSliderTransitionEnd(e)},onSlideChangeStart:a.params.onSlideChangeStart,onSlideChangeEnd:a.params.onSlideChangeEnd,onLazyImageLoad:function(e,t,n){a.params.onLazyImageLoad&&a.params.onLazyImageLoad(a,t,n)},onLazyImageReady:function(e,t,n){o(t).removeClass("photo-browser-slide-lazy"),a.params.onLazyImageReady&&a.params.onLazyImageReady(a,t,n)}};a.params.swipeToClose&&"page"!==a.params.type&&(t.onTouchStart=a.swipeCloseTouchStart,t.onTouchMoveOpposite=a.swipeCloseTouchMove,t.onTouchEnd=a.swipeCloseTouchEnd),a.swiper=i.swiper(a.swiperContainer,t),0===e&&a.onSliderTransitionStart(a.swiper),a.attachEvents()},a.attachEvents=function(e){var t=e?"off":"on";a.container.find(".photo-browser-close-link")[t]("click",a.close)},a.exposed=!1,a.toggleExposition=function(){a.container&&a.container.toggleClass("photo-browser-exposed"),a.params.expositionHideCaptions&&a.captionsContainer.toggleClass("photo-browser-captions-exposed"),a.exposed=!a.exposed},a.enableExposition=function(){a.container&&a.container.addClass("photo-browser-exposed"),a.params.expositionHideCaptions&&a.captionsContainer.addClass("photo-browser-captions-exposed"),a.exposed=!0},a.disableExposition=function(){a.container&&a.container.removeClass("photo-browser-exposed"),a.params.expositionHideCaptions&&a.captionsContainer.removeClass("photo-browser-captions-exposed"),a.exposed=!1};var f,h,g,v,b,w=!1,C=!0,y=!1;return a.swipeCloseTouchStart=function(e,a){C&&(w=!0)},a.swipeCloseTouchMove=function(e,t){if(w){y||(y=!0,h="touchmove"===t.type?t.targetTouches[0].pageY:t.pageY,v=a.swiper.slides.eq(a.swiper.activeIndex),b=(new Date).getTime()),t.preventDefault(),g="touchmove"===t.type?t.targetTouches[0].pageY:t.pageY,f=h-g;var n=1-Math.abs(f)/300;v.transform("translate3d(0,"+-f+"px,0)"),a.swiper.container.css("opacity",n).transition(0)}},a.swipeCloseTouchEnd=function(e,t){if(w=!1,!y)return void(y=!1);y=!1,C=!1;var n=Math.abs(f),r=(new Date).getTime()-b;return r<300&&n>20||r>=300&&n>100?void setTimeout(function(){"standalone"===a.params.type&&a.close(),"popup"===a.params.type&&i.closeModal(a.popup),a.params.onSwipeToClose&&a.params.onSwipeToClose(a),C=!0},0):(0!==n?v.addClass("transitioning").transitionEnd(function(){C=!0,v.removeClass("transitioning")}):C=!0,a.swiper.container.css("opacity","").transition(""),void v.transform(""))},a};i.photoBrowser=function(e){return new v(e)};var b=function(e){function a(e){var a=r.input.val();r.params.source&&r.params.source(r,a,function(e){var t="",n=r.params.limit?Math.min(r.params.limit,e.length):e.length;r.items=e;var i,s=new RegExp("("+a+")","i");for(i=0;i$1")})}""===t&&""===a&&r.params.dropdownPlaceholderText&&(t+=r.dropdownPlaceholderTemplate({text:r.params.dropdownPlaceholderText})),r.dropdown.find("ul").html(t)})}function t(e){for(var a,t=o(this),n=0;n0||r.close()}var r=this,s={popupCloseText:"Close",backText:"Back",searchbarPlaceholderText:"Search...",searchbarCancelText:"Cancel",openIn:"page",backOnSelect:!1,notFoundText:"Nothing found",valueProperty:"id",textProperty:"text",updateInputValueOnSelect:!0,expandInput:!1,preloaderColor:!1,preloader:!1};e=e||{};for(var p in s)"undefined"==typeof e[p]&&(e[p]=s[p]);r.params=e,r.params.opener&&(r.opener=o(r.params.opener));var d=r.params.view;if(!r.params.view&&r.opener&&r.opener.length){if(d=r.opener.parents("."+i.params.viewClass),0===d.length)return;d=d[0].f7View}if(!r.params.input||(r.input=o(r.params.input),0!==r.input.length||"dropdown"!==r.params.openIn)){r.value=r.params.value||[],r.id=(new Date).getTime(),r.inputType=r.params.multiple?"checkbox":"radio",r.inputName=r.inputType+"-"+r.id;var c=i.params.material,u=r.params.backOnSelect;if("dropdown"!==r.params.openIn){r.itemTemplate=l.compile(r.params.itemTemplate||'
  • ');var m=r.params.pageTitle||"";!m&&r.opener&&r.opener.length&&(m=r.opener.find(".item-title").text());var f,h,g="autocomplete-"+r.inputName,v=r.params.navbarTheme,b=r.params.formTheme,w="",C="";r.navbarTemplate=l.compile(r.params.navbarTemplate||''),f=r.navbarTemplate({pageTitle:m,backText:r.params.backText,popupCloseText:r.params.popupCloseText,openIn:r.params.openIn,navbarTheme:v,inPopup:"popup"===r.params.openIn,inPage:"page"===r.params.openIn,material:c,preloader:r.params.preloader,preloaderColor:r.params.preloaderColor}),"page"===r.params.openIn?(h="static",r.opener?(r.opener.parents(".navbar-through").length>0&&(h="through"),r.opener.parents(".navbar-fixed").length>0&&(h="fixed"),C=r.opener.parents(".page").hasClass("no-toolbar")?"no-toolbar":"",w=r.opener.parents(".page").hasClass("no-navbar")?"no-navbar":"navbar-"+h):d.container&&((o(d.container).hasClass("navbar-through")||o(d.container).find(".navbar-through").length>0)&&(h="through"),(o(d.container).hasClass("navbar-fixed")||o(d.container).find(".navbar-fixed").length>0)&&(h="fixed"),C=o(d.activePage.container).hasClass("no-toolbar")?"no-toolbar":"",w=o(d.activePage.container).hasClass("no-navbar")?"no-navbar":"navbar-"+h)):h="fixed";var y='
    ',x=("through"===h?f:"")+'
    '+("fixed"===h?f:"")+y+'
    '+("static"===h?f:"")+'
      • '+r.params.notFoundText+'
        '}else r.dropdownItemTemplate=l.compile(r.params.dropdownItemTemplate||'
      • '),r.dropdownPlaceholderTemplate=l.compile(r.params.dropdownPlaceholderTemplate||'
      • {{text}}
      • '),r.dropdownTemplate=l.compile(r.params.dropdownTemplate||'
          {{#if preloader}}
          {{#if material}}{{materialPreloaderHtml}}{{/if}}
          {{/if}}
          ');return r.popup=void 0,r.dropdown=void 0,r.positionDropDown=function(){var e=r.input.parents(".list-block"),a=r.input.parents(".page-content"),t=(parseInt(a.css("padding-top"),10),parseInt(a.css("padding-top"),10)),n=e.length>0?e.offset().left-e.parent().offset().left:0,i=r.input.offset().left-(e.length>0?e.offset().left:0),s=r.input.offset().top-(a.offset().top-a[0].scrollTop),o=a[0].scrollHeight-t-(s+a[0].scrollTop)-r.input[0].offsetHeight;r.dropdown.css({left:(e.length>0?n:i)+"px",top:s+a[0].scrollTop+r.input[0].offsetHeight+"px",width:(e.length>0?e[0].offsetWidth:r.input[0].offsetWidth)+"px"}),r.dropdown.children(".autocomplete-dropdown-inner").css({maxHeight:o+"px",paddingLeft:e.length>0&&!r.params.expandInput?i-(c?16:15)+"px":""})},r.pageInit=function(e){function a(){var e,a="";for(e=0;e0);if(c){if("checkbox"===r.inputType&&!l.checked){for(e=0;e0&&r.params.expandInput&&r.input.parents(".item-content").addClass("item-content-dropdown-expand"),r.positionDropDown(),r.input.parents(".page-content").append(r.dropdown),r.dropdown.addClass("autocomplete-dropdown-in"),r.input.trigger("input"),o(window).on("resize",r.positionDropDown),r.params.onOpen&&r.params.onOpen(r)}else o(document).once("pageInit",".autocomplete-page",r.pageInit),"popup"===r.params.openIn?(r.popup=i.popup('"),r.popup=o(r.popup),r.popup.once("closed",function(){r.popup=void 0,r.opened=!1,r.params.onClose&&r.params.onClose(r)})):(d.router.load({content:x}),o(document).once("pageBack",".autocomplete-page",function(){r.opened=!1,r.params.onClose&&r.params.onClose(r)}))},r.close=function(e){if(r.opened){if("dropdown"===r.params.openIn){if(e&&"blur"===e.type&&r.dropdown.find("label.active-state").length>0)return;r.dropdown.removeClass("autocomplete-dropdown-in").remove(),r.input.parents(".item-content-dropdown-expand").removeClass("item-content-dropdown-expand"),r.opened=!1,o(window).off("resize",r.positionDropDown),r.params.onClose&&r.params.onClose(r)}"popup"===r.params.openIn&&r.popup&&i.closeModal(r.popup)}},r.initEvents=function(e){var t=e?"off":"on";"dropdown"!==r.params.openIn&&r.opener&&r.opener[t]("click",r.open),"dropdown"===r.params.openIn&&r.input&&(r.input[t]("focus",r.open),r.input[t]("input",a),i.device.android?o("html")[t]("click",n):r.input[t]("blur",r.close)),e&&r.dropdown&&(r.dropdown=null)},r.init=function(){r.initEvents()},r.destroy=function(){r.initEvents(!0),r=null},r.init(),r}};i.autocomplete=function(e){return new b(e)};var w=function(e){function a(){var e=!1;return p.params.convertToPopover||p.params.onlyInPopover?(!p.inline&&p.params.input&&(p.params.onlyInPopover?e=!0:i.device.ios?e=!!i.device.ipad:o(window).width()>=768&&(e=!0)),e):e}function t(){return!!(p.opened&&p.container&&p.container.length>0&&p.container.parents(".popover").length>0)}function n(){if(p.opened)for(var e=0;es){var d=t.scrollTop()+l-s;d+s>o&&(n=d+s-o+i,s===o&&(n=p.container.height()),t.css({"padding-bottom":n+"px"})),t.scrollTop(d,300)}}}function s(e){t()||(p.input&&p.input.length>0?e.target!==p.input[0]&&0===o(e.target).parents(".picker-modal").length&&p.close():0===o(e.target).parents(".picker-modal").length&&p.close())}function l(){p.opened=!1,p.input&&p.input.length>0&&(p.input.parents(".page-content").css({"padding-bottom":""}),i.params.material&&p.input.trigger("blur")), p.params.onClose&&p.params.onClose(p),p.container.find(".picker-items-col").each(function(){p.destroyPickerCol(this)})}var p=this,d={updateValuesOnMomentum:!1,updateValuesOnTouchmove:!0,rotateEffect:!1,momentumRatio:7,freeMode:!1,closeByOutsideClick:!0,scrollToInput:!0,inputReadOnly:!0,convertToPopover:!0,onlyInPopover:!1,toolbar:!0,toolbarCloseText:"Done",toolbarTemplate:''};e=e||{};for(var c in d)"undefined"==typeof e[c]&&(e[c]=d[c]);p.params=e,p.cols=[],p.initialized=!1,p.inline=!!p.params.container;var u=i.device.ios||navigator.userAgent.toLowerCase().indexOf("safari")>=0&&navigator.userAgent.toLowerCase().indexOf("chrome")<0&&!i.device.android;return p.setValue=function(e,a){var t=0;if(0===p.cols.length)return p.value=e,void p.updateValue(e);for(var n=0;n=0||(p.value=a,p.displayValue=t,p.params.onChange&&p.params.onChange(p,p.value,p.displayValue),p.input&&p.input.length>0&&(o(p.input).val(p.params.formatValue?p.params.formatValue(p,p.value,p.displayValue):p.value.join(" ")),o(p.input).trigger("change")))},p.initPickerCol=function(e,a){function t(){w=o.requestAnimationFrame(function(){m.updateItems(void 0,void 0,0),t()})}function n(e){y||C||(e.preventDefault(),C=!0,x=T="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,k=(new Date).getTime(),z=!0,S=I=o.getTranslate(m.wrapper[0],"y"))}function r(e){if(C){e.preventDefault(),z=!1,T="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,y||(o.cancelAnimationFrame(w),y=!0,S=I=o.getTranslate(m.wrapper[0],"y"),m.wrapper.transition(0));var a=T-x;I=S+a,M=void 0,Ib&&(I=b+Math.pow(I-b,.8),M="max"),m.wrapper.transform("translate3d(0,"+I+"px,0)"),m.updateItems(void 0,I,0,p.params.updateValuesOnTouchmove),O=I-E||I,D=(new Date).getTime(),E=I}}function s(e){if(!C||!y)return void(C=y=!1);C=y=!1,m.wrapper.transition(""),M&&("min"===M?m.wrapper.transform("translate3d(0,"+v+"px,0)"):m.wrapper.transform("translate3d(0,"+b+"px,0)")),P=(new Date).getTime();var a,n;P-k>300?n=I:(a=Math.abs(O/(P-D)),n=I+O*p.params.momentumRatio),n=Math.max(Math.min(n,b),v);var r=-Math.floor((n-b)/h);p.params.freeMode||(n=-r*h+b),m.wrapper.transform("translate3d(0,"+parseInt(n,10)+"px,0)"),m.updateItems(r,n,"",!0),p.params.updateValuesOnMomentum&&(t(),m.wrapper.transitionEnd(function(){o.cancelAnimationFrame(w)})),setTimeout(function(){z=!0},100)}function l(e){if(z){o.cancelAnimationFrame(w);var a=o(this).attr("data-picker-value");m.setValue(a)}}var d=o(e),c=d.index(),m=p.cols[c];if(!m.divider){m.container=d,m.wrapper=m.container.find(".picker-items-col-wrapper"),m.items=m.wrapper.find(".picker-item");var f,h,g,v,b;m.replaceValues=function(e,a){m.destroyEvents(),m.values=e,m.displayValues=a;var t=p.columnHTML(m,!0);m.wrapper.html(t),m.items=m.wrapper.find(".picker-item"),m.calcSize(),m.setValue(m.values[0],0,!0),m.initEvents()},m.calcSize=function(){p.params.rotateEffect&&(m.container.removeClass("picker-items-col-absolute"),m.width||m.container.css({width:""}));var e,a;e=0,a=m.container[0].offsetHeight,f=m.wrapper[0].offsetHeight,h=m.items[0].offsetHeight,g=h*m.items.length,v=a/2-g+h/2,b=a/2-h/2,m.width&&(e=m.width,parseInt(e,10)===e&&(e+="px"),m.container.css({width:e})),p.params.rotateEffect&&(m.width||(m.items.each(function(){var a=o(this);a.css({width:"auto"}),e=Math.max(e,a[0].offsetWidth),a.css({width:""})}),m.container.css({width:e+2+"px"})),m.container.addClass("picker-items-col-absolute"))},m.calcSize(),m.wrapper.transform("translate3d(0,"+b+"px,0)").transition(0);var w;m.setValue=function(e,a,n){"undefined"==typeof a&&(a="");var r=m.wrapper.find('.picker-item[data-picker-value="'+e+'"]').index();if("undefined"!=typeof r&&r!==-1){var i=-r*h+b;m.wrapper.transition(a),m.wrapper.transform("translate3d(0,"+i+"px,0)"),p.params.updateValuesOnMomentum&&m.activeIndex&&m.activeIndex!==r&&(o.cancelAnimationFrame(w),m.wrapper.transitionEnd(function(){o.cancelAnimationFrame(w)}),t()),m.updateItems(r,i,a,n)}},m.updateItems=function(e,a,t,n){"undefined"==typeof a&&(a=o.getTranslate(m.wrapper[0],"y")),"undefined"==typeof e&&(e=-Math.round((a-b)/h)),e<0&&(e=0),e>=m.items.length&&(e=m.items.length-1);var r=m.activeIndex;m.activeIndex=e,m.wrapper.find(".picker-selected").removeClass("picker-selected"),m.items.transition(t);var i=m.items.eq(e).addClass("picker-selected").transform("");if(p.params.rotateEffect){(a-(Math.floor((a-b)/h)*h+b))/h;m.items.each(function(){var e=o(this),t=e.index()*h,n=b-a,r=t-n,i=r/h,s=Math.ceil(m.height/h/2)+1,l=-18*i;l>180&&(l=180),l<-180&&(l=-180),Math.abs(i)>s?e.addClass("picker-item-far"):e.removeClass("picker-item-far"),e.transform("translate3d(0, "+(-a+b)+"px, "+(u?-110:0)+"px) rotateX("+l+"deg)")})}(n||"undefined"==typeof n)&&(m.value=i.attr("data-picker-value"),m.displayValue=m.displayValues?m.displayValues[e]:m.value,r!==e&&(m.onChange&&m.onChange(p,m.value,m.displayValue),p.updateValue()))},a&&m.updateItems(0,b,0);var C,y,x,T,k,P,S,M,I,E,O,D,z=!0;m.initEvents=function(e){var a=e?"off":"on";m.container[a](i.touchEvents.start,n),m.container[a](i.touchEvents.move,r),m.container[a](i.touchEvents.end,s),m.items[a]("click",l)},m.destroyEvents=function(){m.initEvents(!0)},m.container[0].f7DestroyPickerCol=function(){m.destroyEvents()},m.initEvents()}},p.destroyPickerCol=function(e){e=o(e),"f7DestroyPickerCol"in e[0]&&e[0].f7DestroyPickerCol()},o(window).on("resize",n),p.columnHTML=function(e,a){var t="",n="";if(e.divider)n+='
          '+e.content+"
          ";else{for(var r=0;r'+(e.displayValues?e.displayValues[r]:e.values[r])+"";n+='
          '+t+"
          "}return a?t:n},p.layout=function(){var e,a="",t="";p.cols=[];var n="";for(e=0;e'+(p.params.toolbar?p.params.toolbarTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText):"")+'
          '+n+'
          ',p.pickerHTML=a},p.params.input&&(p.input=o(p.params.input),p.input.length>0&&(p.params.inputReadOnly&&p.input.prop("readOnly",!0),p.inline||p.input.on("click",r),p.params.inputReadOnly&&p.input.on("focus mousedown",function(e){e.preventDefault()}))),!p.inline&&p.params.closeByOutsideClick&&o("html").on("click",s),p.opened=!1,p.open=function(){var e=a();p.opened||(p.layout(),e?(p.pickerHTML='
          '+p.pickerHTML+"
          ",p.popover=i.popover(p.pickerHTML,p.params.input,!0),p.container=o(p.popover).find(".picker-modal"),o(p.popover).on("close",function(){l()})):p.inline?(p.container=o(p.pickerHTML),p.container.addClass("picker-modal-inline"),o(p.params.container).append(p.container)):(p.container=o(i.pickerModal(p.pickerHTML)),o(p.container).on("close",function(){l()})),p.container[0].f7Picker=p,p.container.find(".picker-items-col").each(function(){var e=!0;(!p.initialized&&p.params.value||p.initialized&&p.value)&&(e=!1),p.initPickerCol(this,e)}),p.initialized?p.value&&p.setValue(p.value,0):p.value?p.setValue(p.value,0):p.params.value&&p.setValue(p.params.value,0),p.input&&p.input.length>0&&i.params.material&&p.input.trigger("focus")),p.opened=!0,p.initialized=!0,p.params.onOpen&&p.params.onOpen(p)},p.close=function(){if(p.opened&&!p.inline)return t()?void i.closeModal(p.popover):void i.closeModal(p.container)},p.destroy=function(){p.close(),p.params.input&&p.input.length>0&&p.input.off("click focus",r),o("html").off("click",s),o(window).off("resize",n)},p.inline?p.open():!p.initialized&&p.params.value&&p.setValue(p.params.value),p};i.picker=function(e){return new w(e)};var C=function(e){function a(){var e=!1;return p.params.convertToPopover||p.params.onlyInPopover?(!p.inline&&p.params.input&&(p.params.onlyInPopover?e=!0:i.device.ios?e=!!i.device.ipad:o(window).width()>=768&&(e=!0)),e):e}function t(){return!!(p.opened&&p.container&&p.container.length>0&&p.container.parents(".popover").length>0)}function n(e){e=new Date(e);var a=e.getFullYear(),t=e.getMonth(),n=t+1,r=e.getDate(),i=e.getDay();return p.params.dateFormat.replace(/yyyy/g,a).replace(/yy/g,(a+"").substring(2)).replace(/mm/g,n<10?"0"+n:n).replace(/m(\W+)/g,n+"$1").replace(/MM/g,p.params.monthNames[t]).replace(/M(\W+)/g,p.params.monthNamesShort[t]+"$1").replace(/dd/g,r<10?"0"+r:r).replace(/d(\W+)/g,r+"$1").replace(/DD/g,p.params.dayNames[i]).replace(/D(\W+)/g,p.params.dayNamesShort[i]+"$1")}function r(e){if(e.preventDefault(),!p.opened&&(p.open(),p.params.scrollToInput&&!a()&&!i.params.material)){var t=p.input.parents(".page-content");if(0===t.length)return;var n,r=parseInt(t.css("padding-top"),10),s=parseInt(t.css("padding-bottom"),10),o=t[0].offsetHeight-r-p.container.height(),l=t[0].scrollHeight-r-p.container.height(),d=p.input.offset().top-r+p.input[0].offsetHeight;if(d>o){var c=t.scrollTop()+d-o;c+o>l&&(n=c+o-l+s,o===l&&(n=p.container.height()),t.css({"padding-bottom":n+"px"})),t.scrollTop(c,300)}}}function s(e){t()||(p.input&&p.input.length>0?e.target!==p.input[0]&&0===o(e.target).parents(".picker-modal").length&&p.close():0===o(e.target).parents(".picker-modal").length&&p.close())}function l(){p.opened=!1,p.input&&p.input.length>0&&(p.input.parents(".page-content").css({"padding-bottom":""}),i.params.material&&p.input.trigger("blur")),p.params.onClose&&p.params.onClose(p),p.destroyCalendarEvents()}var p=this,d={monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDay:1,weekendDays:[0,6],multiple:!1,rangePicker:!1,dateFormat:"yyyy-mm-dd",direction:"horizontal",minDate:null,maxDate:null,disabled:null,events:null,rangesClasses:null,touchMove:!0,animate:!0,closeOnSelect:!1,monthPicker:!0,monthPickerTemplate:'
          ',yearPicker:!0,yearPickerTemplate:'
          ',weekHeader:!0,closeByOutsideClick:!0,scrollToInput:!0,inputReadOnly:!0,convertToPopover:!0,onlyInPopover:!1,toolbar:!0,toolbarCloseText:"Done",headerPlaceholder:"Select date",header:i.params.material,footer:i.params.material,toolbarTemplate:'
          {{monthPicker}}{{yearPicker}}
          ',headerTemplate:'
          {{placeholder}}
          ',footerTemplate:''};e=e||{};for(var c in d)"undefined"==typeof e[c]&&(e[c]=d[c]);p.params=e,p.initialized=!1,p.inline=!!p.params.container,p.isH="horizontal"===p.params.direction;var u=p.isH&&i.rtl?-1:1;return p.animating=!1,p.addValue=function(e){if(p.params.multiple){p.value||(p.value=[]);for(var a,t=0;t0){p.wrapper.find(".picker-calendar-day-selected").removeClass("picker-calendar-day-selected");var r;if(p.params.rangePicker&&2===p.value.length)for(a=p.value[0];a<=p.value[1];a+=864e5)r=new Date(a),p.wrapper.find('.picker-calendar-day[data-date="'+r.getFullYear()+"-"+r.getMonth()+"-"+r.getDate()+'"]').addClass("picker-calendar-day-selected");else for(a=0;a0||i.params.material&&p.params.header){if(p.params.formatValue)t=p.params.formatValue(p,p.value);else{for(t=[],a=0;a0&&p.container.find(".picker-calendar-selected-date").text(t),p.input&&p.input.length>0&&!e&&(o(p.input).val(t),o(p.input).trigger("change"))}},p.initCalendarEvents=function(){function e(e){s||r||(r=!0,l=m="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,d=m="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,f=(new Date).getTime(),C=0,T=!0,x=void 0,g=v=p.monthsTranslate)}function a(e){if(r){if(c="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,m="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,"undefined"==typeof x&&(x=!!(x||Math.abs(m-d)>Math.abs(c-l))),p.isH&&x)return void(r=!1);if(e.preventDefault(),p.animating)return void(r=!1);T=!1,s||(s=!0,b=p.wrapper[0].offsetWidth,w=p.wrapper[0].offsetHeight,p.wrapper.transition(0)),y=p.isH?c-l:m-d,C=y/(p.isH?b:w),v=100*(p.monthsTranslate*u+C),p.wrapper.transform("translate3d("+(p.isH?v:0)+"%, "+(p.isH?0:v)+"%, 0)")}}function t(e){return r&&s?(r=s=!1,h=(new Date).getTime(),h-f<300?Math.abs(y)<10?p.resetMonth():y>=10?i.rtl?p.nextMonth():p.prevMonth():i.rtl?p.prevMonth():p.nextMonth():C<=-.5?i.rtl?p.prevMonth():p.nextMonth():C>=.5?i.rtl?p.nextMonth():p.prevMonth():p.resetMonth(),void setTimeout(function(){T=!0},100)):void(r=s=!1)}function n(e){if(T){var a=o(e.target).parents(".picker-calendar-day");if(0===a.length&&o(e.target).hasClass("picker-calendar-day")&&(a=o(e.target)),0!==a.length&&(!a.hasClass("picker-calendar-day-selected")||p.params.multiple||p.params.rangePicker)&&!a.hasClass("picker-calendar-day-disabled")){p.params.rangePicker||(a.hasClass("picker-calendar-day-next")&&p.nextMonth(),a.hasClass("picker-calendar-day-prev")&&p.prevMonth());var t=a.attr("data-year"),n=a.attr("data-month"),r=a.attr("data-day");p.params.onDayClick&&p.params.onDayClick(p,a[0],t,n,r),p.addValue(new Date(t,n,r).getTime()),p.params.closeOnSelect&&(p.params.rangePicker&&2===p.value.length||!p.params.rangePicker)&&p.close()}}}var r,s,l,d,c,m,f,h,g,v,b,w,C,y,x,T=!0;p.container.find(".picker-calendar-prev-month").on("click",p.prevMonth),p.container.find(".picker-calendar-next-month").on("click",p.nextMonth),p.container.find(".picker-calendar-prev-year").on("click",p.prevYear),p.container.find(".picker-calendar-next-year").on("click",p.nextYear),p.wrapper.on("click",n);var k=!("touchstart"!==i.touchEvents.start||!i.support.passiveListener)&&{passive:!0,capture:!1};p.params.touchMove&&(p.wrapper.on(i.touchEvents.start,e,k),p.wrapper.on(i.touchEvents.move,a),p.wrapper.on(i.touchEvents.end,t,k)),p.container[0].f7DestroyCalendarEvents=function(){p.container.find(".picker-calendar-prev-month").off("click",p.prevMonth),p.container.find(".picker-calendar-next-month").off("click",p.nextMonth),p.container.find(".picker-calendar-prev-year").off("click",p.prevYear),p.container.find(".picker-calendar-next-year").off("click",p.nextYear),p.wrapper.off("click",n),p.params.touchMove&&(p.wrapper.off(i.touchEvents.start,e,k),p.wrapper.off(i.touchEvents.move,a),p.wrapper.off(i.touchEvents.end,t,k))}},p.destroyCalendarEvents=function(e){"f7DestroyCalendarEvents"in p.container[0]&&p.container[0].f7DestroyCalendarEvents()},p.dateInRange=function(e,a){var t,n=!1;if(!a)return!1;if(o.isArray(a))for(t=0;t=new Date(a[t].from).getTime()&&(n=!0):a[t].from?e>=new Date(a[t].from).getTime()&&(n=!0):a[t].to&&e<=new Date(a[t].to).getTime()&&(n=!0):e===new Date(a[t]).getTime()&&(n=!0);else a.from||a.to?a.from&&a.to?e<=new Date(a.to).getTime()&&e>=new Date(a.from).getTime()&&(n=!0):a.from?e>=new Date(a.from).getTime()&&(n=!0):a.to&&e<=new Date(a.to).getTime()&&(n=!0):"function"==typeof a&&(n=a(new Date(e)));return n},p.daysInMonth=function(e){var a=new Date(e);return new Date(a.getFullYear(),a.getMonth()+1,0).getDate()},p.monthHTML=function(e,a){e=new Date(e);var t=e.getFullYear(),n=e.getMonth();e.getDate();"next"===a&&(e=11===n?new Date(t+1,0):new Date(t,n+1,1)),"prev"===a&&(e=0===n?new Date(t-1,11):new Date(t,n-1,1)),"next"!==a&&"prev"!==a||(n=e.getMonth(),t=e.getFullYear());var r=p.daysInMonth(new Date(e.getFullYear(),e.getMonth()).getTime()-864e6),i=p.daysInMonth(e),s=new Date(e.getFullYear(),e.getMonth()).getDay();0===s&&(s=7);var o,l,d,c,u,m,f=[],h=6,g=7,v="",b=0+(p.params.firstDay-1),w=(new Date).setHours(0,0,0,0),C=p.params.minDate?new Date(p.params.minDate).getTime():null,y=p.params.maxDate?new Date(p.params.maxDate).getTime():null;if(p.value&&p.value.length)for(l=0;l6?T-1-7+p.params.firstDay:T-1+p.params.firstDay,S="";if(k<0?(k=r+k+1,S+=" picker-calendar-day-prev",o=new Date(n-1<0?t-1:t,n-1<0?11:n-1,k).getTime()):(k+=1,k>i?(k-=i,S+=" picker-calendar-day-next",o=new Date(n+1>11?t+1:t,n+1>11?0:n+1,k).getTime()):o=new Date(t,n,k).getTime()),o===w&&(S+=" picker-calendar-day-today"),p.params.rangePicker&&2===f.length?o>=f[0]&&o<=f[1]&&(S+=" picker-calendar-day-selected"):f.indexOf(o)>=0&&(S+=" picker-calendar-day-selected"),p.params.weekendDays.indexOf(P)>=0&&(S+=" picker-calendar-day-weekend"),m=!1,p.params.events&&p.dateInRange(o,p.params.events)&&(m=!0),m&&(S+=" picker-calendar-day-has-events"),p.params.rangesClasses)for(c=0;cy)&&(u=!0),p.params.disabled&&p.dateInRange(o,p.params.disabled)&&(u=!0),u&&(S+=" picker-calendar-day-disabled"),o=new Date(o);var M=o.getFullYear(),I=o.getMonth();x+='
          '+k+"
          "}v+='
          '+x+"
          "}return v='
          '+v+"
          "},p.animating=!1,p.updateCurrentMonthYear=function(e){"undefined"==typeof e?(p.currentMonth=parseInt(p.months.eq(1).attr("data-month"),10),p.currentYear=parseInt(p.months.eq(1).attr("data-year"),10)):(p.currentMonth=parseInt(p.months.eq("next"===e?p.months.length-1:0).attr("data-month"),10),p.currentYear=parseInt(p.months.eq("next"===e?p.months.length-1:0).attr("data-year"),10)),p.container.find(".current-month-value").text(p.params.monthNames[p.currentMonth]),p.container.find(".current-year-value").text(p.currentYear)},p.onMonthChangeStart=function(e){p.updateCurrentMonthYear(e),p.months.removeClass("picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next");var a="next"===e?p.months.length-1:0;p.months.eq(a).addClass("picker-calendar-month-current"),p.months.eq("next"===e?a-1:a+1).addClass("next"===e?"picker-calendar-month-prev":"picker-calendar-month-next"),p.params.onMonthYearChangeStart&&p.params.onMonthYearChangeStart(p,p.currentYear,p.currentMonth)},p.onMonthChangeEnd=function(e,a){p.animating=!1;var t,n,r;p.wrapper.find(".picker-calendar-month:not(.picker-calendar-month-prev):not(.picker-calendar-month-current):not(.picker-calendar-month-next)").remove(),"undefined"==typeof e&&(e="next",a=!0),a?(p.wrapper.find(".picker-calendar-month-next, .picker-calendar-month-prev").remove(),n=p.monthHTML(new Date(p.currentYear,p.currentMonth),"prev"),t=p.monthHTML(new Date(p.currentYear,p.currentMonth),"next")):r=p.monthHTML(new Date(p.currentYear,p.currentMonth),e),("next"===e||a)&&p.wrapper.append(r||t),("prev"===e||a)&&p.wrapper.prepend(r||n),p.months=p.wrapper.find(".picker-calendar-month"),p.setMonthsTranslate(p.monthsTranslate),p.params.onMonthAdd&&p.params.onMonthAdd(p,"next"===e?p.months.eq(p.months.length-1)[0]:p.months.eq(0)[0]),p.params.onMonthYearChangeEnd&&p.params.onMonthYearChangeEnd(p,p.currentYear,p.currentMonth)},p.setMonthsTranslate=function(e){e=e||p.monthsTranslate||0,"undefined"==typeof p.monthsTranslate&&(p.monthsTranslate=e),p.months.removeClass("picker-calendar-month-current picker-calendar-month-prev picker-calendar-month-next");var a=100*-(e+1)*u,t=100*-e*u,n=100*-(e-1)*u;p.months.eq(0).transform("translate3d("+(p.isH?a:0)+"%, "+(p.isH?0:a)+"%, 0)").addClass("picker-calendar-month-prev"),p.months.eq(1).transform("translate3d("+(p.isH?t:0)+"%, "+(p.isH?0:t)+"%, 0)").addClass("picker-calendar-month-current"),p.months.eq(2).transform("translate3d("+(p.isH?n:0)+"%, "+(p.isH?0:n)+"%, 0)").addClass("picker-calendar-month-next")},p.nextMonth=function(e){"undefined"!=typeof e&&"object"!=typeof e||(e="",p.params.animate||(e=0));var a=parseInt(p.months.eq(p.months.length-1).attr("data-month"),10),t=parseInt(p.months.eq(p.months.length-1).attr("data-year"),10),n=new Date(t,a),r=n.getTime(),i=!p.animating;if(p.params.maxDate&&r>new Date(p.params.maxDate).getTime())return p.resetMonth();if(p.monthsTranslate--,a===p.currentMonth){var s=100*-p.monthsTranslate*u,l=o(p.monthHTML(r,"next")).transform("translate3d("+(p.isH?s:0)+"%, "+(p.isH?0:s)+"%, 0)").addClass("picker-calendar-month-next");p.wrapper.append(l[0]),p.months=p.wrapper.find(".picker-calendar-month"),p.params.onMonthAdd&&p.params.onMonthAdd(p,p.months.eq(p.months.length-1)[0])}p.animating=!0,p.onMonthChangeStart("next");var d=100*p.monthsTranslate*u;p.wrapper.transition(e).transform("translate3d("+(p.isH?d:0)+"%, "+(p.isH?0:d)+"%, 0)"),i&&p.wrapper.transitionEnd(function(){p.onMonthChangeEnd("next")}),p.params.animate||p.onMonthChangeEnd("next")},p.prevMonth=function(e){"undefined"!=typeof e&&"object"!=typeof e||(e="",p.params.animate||(e=0));var a=parseInt(p.months.eq(0).attr("data-month"),10),t=parseInt(p.months.eq(0).attr("data-year"),10),n=new Date(t,a+1,(-1)),r=n.getTime(),i=!p.animating;if(p.params.minDate&&rnew Date(p.params.maxDate).getTime())return!1;if(p.params.minDate&&nr?"next":"prev",s=p.monthHTML(new Date(e,a));p.monthsTranslate=p.monthsTranslate||0;var o,l,d=p.monthsTranslate,c=!p.animating;n>r?(p.monthsTranslate--,p.animating||p.months.eq(p.months.length-1).remove(),p.wrapper.append(s),p.months=p.wrapper.find(".picker-calendar-month"),o=100*-(d-1)*u,p.months.eq(p.months.length-1).transform("translate3d("+(p.isH?o:0)+"%, "+(p.isH?0:o)+"%, 0)").addClass("picker-calendar-month-next")):(p.monthsTranslate++,p.animating||p.months.eq(0).remove(),p.wrapper.prepend(s),p.months=p.wrapper.find(".picker-calendar-month"),o=100*-(d+1)*u,p.months.eq(0).transform("translate3d("+(p.isH?o:0)+"%, "+(p.isH?0:o)+"%, 0)").addClass("picker-calendar-month-prev")),p.params.onMonthAdd&&p.params.onMonthAdd(p,"next"===i?p.months.eq(p.months.length-1)[0]:p.months.eq(0)[0]),p.animating=!0,p.onMonthChangeStart(i),l=100*p.monthsTranslate*u,p.wrapper.transition(t).transform("translate3d("+(p.isH?l:0)+"%, "+(p.isH?0:l)+"%, 0)"),c&&p.wrapper.transitionEnd(function(){p.onMonthChangeEnd(i,!0)}),p.params.animate||p.onMonthChangeEnd(i)},p.nextYear=function(){p.setYearMonth(p.currentYear+1)},p.prevYear=function(){p.setYearMonth(p.currentYear-1)},p.layout=function(){var e,a="",t="",n=p.value&&p.value.length?p.value[0]:(new Date).setHours(0,0,0,0),r=p.monthHTML(n,"prev"),i=p.monthHTML(n),s=p.monthHTML(n,"next"),o='
          '+(r+i+s)+"
          ",l="";if(p.params.weekHeader){for(e=0;e<7;e++){var d=e+p.params.firstDay>6?e-7+p.params.firstDay:e+p.params.firstDay,c=p.params.dayNamesShort[d];l+='
          '+c+"
          "}l='
          '+l+"
          "}t="picker-modal picker-calendar"+(p.params.rangePicker?" picker-calendar-range":"")+(p.params.cssClass?" "+p.params.cssClass:"");var u=p.params.toolbar?p.params.toolbarTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText):"";p.params.toolbar&&(u=p.params.toolbarTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText).replace(/{{monthPicker}}/g,p.params.monthPicker?p.params.monthPickerTemplate:"").replace(/{{yearPicker}}/g,p.params.yearPicker?p.params.yearPickerTemplate:""));var m=p.params.header?p.params.headerTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText).replace(/{{placeholder}}/g,p.params.headerPlaceholder):"",f=p.params.footer?p.params.footerTemplate.replace(/{{closeText}}/g,p.params.toolbarCloseText):"";a='
          '+m+f+u+'
          '+l+o+"
          ",p.pickerHTML=a},p.params.input&&(p.input=o(p.params.input),p.input.length>0&&(p.params.inputReadOnly&&p.input.prop("readOnly",!0),p.inline||p.input.on("click",r),p.params.inputReadOnly&&p.input.on("focus mousedown",function(e){e.preventDefault()}))),!p.inline&&p.params.closeByOutsideClick&&o("html").on("click",s),p.opened=!1,p.open=function(){var e=a(),t=!1;p.opened||(p.value||p.params.value&&(p.value=p.params.value,t=!0),p.layout(),e?(p.pickerHTML='
          '+p.pickerHTML+"
          ",p.popover=i.popover(p.pickerHTML,p.params.input,!0),p.container=o(p.popover).find(".picker-modal"),o(p.popover).on("close",function(){l()})):p.inline?(p.container=o(p.pickerHTML),p.container.addClass("picker-modal-inline"),o(p.params.container).append(p.container)):(p.container=o(i.pickerModal(p.pickerHTML)),o(p.container).on("close",function(){l()})),p.container[0].f7Calendar=p,p.wrapper=p.container.find(".picker-calendar-months-wrapper"),p.months=p.wrapper.find(".picker-calendar-month"),p.updateCurrentMonthYear(),p.monthsTranslate=0,p.setMonthsTranslate(),p.initCalendarEvents(),t?p.updateValue():i.params.material&&p.value&&p.updateValue(!0),p.input&&p.input.length>0&&i.params.material&&p.input.trigger("focus")),p.opened=!0,p.initialized=!0,p.params.onMonthAdd&&p.months.each(function(){p.params.onMonthAdd(p,this)}),p.params.onOpen&&p.params.onOpen(p)},p.close=function(){if(p.opened&&!p.inline)return t()?void i.closeModal(p.popover):void i.closeModal(p.container)},p.destroy=function(){p.close(),p.params.input&&p.input.length>0&&p.input.off("click focus",r),o("html").off("click",s)},p.inline?p.open():!p.initialized&&p.params.value&&p.setValue(p.params.value),p};i.calendar=function(e){return new C(e)};var y;i.addNotification=function(e){if(e){"undefined"==typeof e.media&&(e.media=i.params.notificationMedia),"undefined"==typeof e.title&&(e.title=i.params.notificationTitle),"undefined"==typeof e.subtitle&&(e.subtitle=i.params.notificationSubtitle),"undefined"==typeof e.closeIcon&&(e.closeIcon=i.params.notificationCloseIcon),"undefined"==typeof e.hold&&(e.hold=i.params.notificationHold),"undefined"==typeof e.closeOnClick&&(e.closeOnClick=i.params.notificationCloseOnClick),"undefined"==typeof e.button&&(e.button=i.params.notificationCloseButtonText&&{text:i.params.notificationCloseButtonText,close:!0}),y||(y=document.createElement("div")),e.material=i.params.material;var a=o(".notifications");0===a.length&&(i.root.append('
            '),a=o(".notifications"));var t=a.children("ul"),n=i.params.notificationTemplate||'{{#if custom}}
          • {{custom}}
          • {{else}}
          • {{#if material}}
            {{js "this.message || this.title || this.subtitle"}}
            {{#if ../button}}{{#button}}{{/button}}{{/if}}
            {{else}}{{#if media}}
            {{media}}
            {{/if}}
            {{#if title}}
            {{title}}
            {{/if}}{{#if closeIcon}}
            {{/if}}
            {{#if subtitle}}
            {{subtitle}}
            {{/if}}{{#if message}}
            {{message}}
            {{/if}}{{/if}}
          • {{/if}}';i._compiledTemplates.notification||(i._compiledTemplates.notification=l.compile(n)),y.innerHTML=i._compiledTemplates.notification(e);var r=o(y).children();r.on("click",function(a){var t=!1,n=o(a.target);e.material&&n.hasClass("button")&&e.button&&e.button.onClick&&e.button.onClick.call(n[0],a,r[0]),n.is(".close-notification")||o(a.target).parents(".close-notification").length>0?t=!0:(e.onClick&&e.onClick(a,r[0]),e.closeOnClick&&(t=!0)),t&&i.closeNotification(r[0])}),e.onClose&&r.data("f7NotificationOnClose",function(){e.onClose(r[0])}),e.additionalClass&&r.addClass(e.additionalClass),e.hold&&setTimeout(function(){r.length>0&&i.closeNotification(r[0])},e.hold),i.params.material||i.closeNotification(t.children("li.notification-item:last-child")),t.append(r[0]),a.show();var s,p=r.outerHeight();return e.material?(a.transform("translate3d(0, "+p+"px, 0)"),a.transition(0),s=r[0].clientLeft,a.transform("translate3d(0, 0, 0)"),a.transition("")):(r.transform("translate3d(0,"+-p+"px,0)"),r.transition(0),s=r[0].clientLeft,r.transition(""),r.transform("translate3d(0,0px,0)")),a.transform("translate3d(0, 0,0)"),r.removeClass("notification-hidden"),r[0]}},i.closeNotification=function(e){ if(e=o(e),0!==e.length&&!e.hasClass("notification-item-removing")){var a=o(".notifications"),t=e.outerHeight();e.css("height",t+"px").transition(0).addClass("notification-item-removing");e[0].clientLeft;e.css({height:"0px",marginBottom:"0px"}).transition(""),e.data("f7NotificationOnClose")&&e.data("f7NotificationOnClose")(),0===a.find(".notification-item:not(.notification-item-removing)").length&&a.transform(""),e.addClass("notification-hidden").transitionEnd(function(){e.remove(),0===a.find(".notification-item").length&&a.hide()})}},i.initTemplate7Templates=function(){window.Template7&&(Template7.templates=Template7.templates||i.params.templates||{},Template7.data=Template7.data||i.params.template7Data||{},Template7.cache=Template7.cache||{},i.templates=Template7.templates,i.template7Data=Template7.data,i.template7Cache=Template7.cache,i.params.precompileTemplates&&o('script[type="text/template7"]').each(function(){var e=o(this).attr("id");e&&(Template7.templates[e]=Template7.compile(o(this).html()))}))};var x=[];return i.initPlugins=function(){for(var e in i.plugins){var a=i.plugins[e](i,i.params[e]);a&&x.push(a)}},i.pluginHook=function(e){for(var a=0;a=0&&o.indexOf(">")>=0){var l="div";for(0===o.indexOf(":~]/)?(t||document).querySelectorAll(a):[document.getElementById(a.split("#")[1])],r=0;r0&&a[0].nodeType)for(r=0;r=0&&(t[a.toCamelCase(i.name.split("data-")[1])]=i.value)}for(var s in t)"false"===t[s]?t[s]=!1:"true"===t[s]?t[s]=!0:parseFloat(t[s])===1*t[s]&&(t[s]=1*t[s]);return t}},val:function(e){if("undefined"==typeof e)return this[0]?this[0].value:void 0;for(var a=0;a0?parseFloat(this.css("width")):null},outerWidth:function(e){if(this.length>0){if(e){var a=this.styles();return this[0].offsetWidth+parseFloat(a.getPropertyValue("margin-right"))+parseFloat(a.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},height:function(){return this[0]===window?window.innerHeight:this.length>0?parseFloat(this.css("height")):null},outerHeight:function(e){if(this.length>0){if(e){var a=this.styles();return this[0].offsetHeight+parseFloat(a.getPropertyValue("margin-top"))+parseFloat(a.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){var e=this[0],a=e.getBoundingClientRect(),t=document.body,n=e.clientTop||t.clientTop||0,r=e.clientLeft||t.clientLeft||0,i=window.pageYOffset||e.scrollTop,s=window.pageXOffset||e.scrollLeft;return{top:a.top+i-n,left:a.left+s-r}}return null},hide:function(){for(var e=0;en-1?new e([]):a<0?(t=n+a,new e(t<0?[]:[this[t]])):new e([this[a]])},append:function(a){var t,n;for(t=0;t=0;n--)this[t].insertBefore(r.childNodes[n],this[t].childNodes[0])}else if(a instanceof e)for(n=0;n1)for(var r=0;r1)for(var r=0;r0?t?this[0].nextElementSibling&&a(this[0].nextElementSibling).is(t)?[this[0].nextElementSibling]:[]:this[0].nextElementSibling?[this[0].nextElementSibling]:[]:[])},nextAll:function(t){var n=[],r=this[0];if(!r)return new e([]);for(;r.nextElementSibling;){var i=r.nextElementSibling;t?a(i).is(t)&&n.push(i):n.push(i),r=i}return new e(n)},prev:function(t){return new e(this.length>0?t?this[0].previousElementSibling&&a(this[0].previousElementSibling).is(t)?[this[0].previousElementSibling]:[]:this[0].previousElementSibling?[this[0].previousElementSibling]:[]:[])},prevAll:function(t){var n=[],r=this[0];if(!r)return new e([]);for(;r.previousElementSibling;){var i=r.previousElementSibling;t?a(i).is(t)&&n.push(i):n.push(i),r=i}return new e(n)},siblings:function(e){return this.nextAll(e).add(this.prevAll(e))},parent:function(e){for(var t=[],n=0;n=0?"&":"?",l=e.method.toUpperCase();if(("GET"===l||"HEAD"===l||"OPTIONS"===l||"DELETE"===l)&&e.data){var p;p="string"==typeof e.data?e.data.indexOf("?")>=0?e.data.split("?")[1]:e.data:a.serializeObject(e.data),p.length&&(e.url+=o+p,"?"===o&&(o="&"))}if("json"===e.dataType&&e.url.indexOf("callback=")>=0){var d,c="f7jsonp_"+Date.now()+n++,u=e.url.split("callback="),m=u[0]+"callback="+c;if(u[1].indexOf("&")>=0){var f=u[1].split("&").filter(function(e){return e.indexOf("=")>0}).join("&");f.length>0&&(m+="&"+f)}var h=document.createElement("script");return h.type="text/javascript",h.onerror=function(){clearTimeout(d),r(void 0,void 0,"error",null,"scripterror")},h.src=m,window[c]=function(e){clearTimeout(d),r(void 0,void 0,"success",e),h.parentNode.removeChild(h),h=null,delete window[c]},document.querySelector("head").appendChild(h),void(e.timeout>0&&(d=setTimeout(function(){h.parentNode.removeChild(h),h=null,r(void 0,void 0,"error",null,"timeout")},e.timeout)))}"GET"!==l&&"HEAD"!==l&&"OPTIONS"!==l&&"DELETE"!==l||e.cache===!1&&(e.url+=o+"_nocache="+Date.now());var g=new XMLHttpRequest;g.requestUrl=e.url,g.requestParameters=e,g.open(l,e.url,e.async,e.user,e.password);var v=null;if(("POST"===l||"PUT"===l||"PATCH"===l)&&e.data)if(e.processData){var b=[ArrayBuffer,Blob,Document,FormData];if(b.indexOf(e.data.constructor)>=0)v=e.data;else{var w="---------------------------"+Date.now().toString(16);"multipart/form-data"===e.contentType?g.setRequestHeader("Content-Type","multipart/form-data; boundary="+w):g.setRequestHeader("Content-Type",e.contentType),v="";var C=a.serializeObject(e.data);if("multipart/form-data"===e.contentType){w="---------------------------"+Date.now().toString(16),C=C.split("&");for(var y=[],x=0;x=200&&g.status<300||0===g.status){var n;if("json"===e.dataType)try{n=JSON.parse(g.responseText),r("ajaxSuccess",{xhr:g},"success",n,g.status,g)}catch(e){r("ajaxError",{xhr:g,parseerror:!0},"error",g,"parseerror")}else n="text"===g.responseType||""===g.responseType?g.responseText:g.response,r("ajaxSuccess",{xhr:g},"success",n,g.status,g)}else r("ajaxError",{xhr:g},"error",g,g.status);e.statusCode&&(t.statusCode&&t.statusCode[g.status]&&t.statusCode[g.status](g),e.statusCode[g.status]&&e.statusCode[g.status](g)),r("ajaxComplete",{xhr:g},"complete",g,g.status)},g.onerror=function(e){T&&clearTimeout(T),r("ajaxError",{xhr:g},"error",g,g.status)},r("ajaxStart",{xhr:g},"start",g),r(void 0,void 0,"beforeSend",g),e.timeout>0&&(g.onabort=function(){T&&clearTimeout(T)},T=setTimeout(function(){g.abort(),r("ajaxError",{xhr:g,timeout:!0},"error",g,"timeout"),r("ajaxComplete",{xhr:g,timeout:!0},"complete",g,"timeout")},e.timeout)),g.send(v),g},function(){function e(e){a[e]=function(t,n,r,i){return a.ajax({url:t,method:"post"===e?"POST":"GET",data:"function"==typeof n?void 0:n,success:"function"==typeof n?n:r,error:"function"==typeof n?r:i,dataType:"getJSON"===e?"json":void 0})}}for(var t="get post getJSON".split(" "),n=0;n-1?e.split("#")[0]:e,!(e.indexOf("?")>-1))return r;for(e=e.split("?")[1],t=e.split("&"),a=0;a0){for(var a="",n=0;n0&&i.push(p.join(s))}else null===e[l]?i.push(n(l)+"="):"object"==typeof e[l]?(o=t.slice(),o.push(l),p=a.serializeObject(e[l],o),""!==p&&i.push(p)):"undefined"!=typeof e[l]&&""!==e[l]&&i.push(n(l)+"="+r(e[l]))}return i.join(s)},a.toCamelCase=function(e){return e.toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()})},a.dataset=function(e){return a(e).dataset()},a.getTranslate=function(e,a){var t,n,r,i;return"undefined"==typeof a&&(a="x"),r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(n=r.transform||r.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new WebKitCSSMatrix("none"===n?"":n)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(n=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(n=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),n||0},a.requestAnimationFrame=function(e){return window.requestAnimationFrame?window.requestAnimationFrame(e):window.webkitRequestAnimationFrame?window.webkitRequestAnimationFrame(e):window.mozRequestAnimationFrame?window.mozRequestAnimationFrame(e):window.setTimeout(e,1e3/60)},a.cancelAnimationFrame=function(e){return window.cancelAnimationFrame?window.cancelAnimationFrame(e):window.webkitCancelAnimationFrame?window.webkitCancelAnimationFrame(e):window.mozCancelAnimationFrame?window.mozCancelAnimationFrame(e):window.clearTimeout(e)},a.supportTouch=!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch);for(var r=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"ŒŒ"},{base:"oe",letters:"œœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],i={},s=0;so&&m>=c&&(h.scrollTop=c,t=!0),g&&cl&&f>=u&&(h.scrollLeft=u,t=!0),v&&u0||0===t,v=e>0||0===e;if("undefined"==typeof r&&(r="swing"),g&&(o=h.scrollTop,n||(h.scrollTop=t)),v&&(l=h.scrollLeft,n||(h.scrollLeft=e)),n){g&&(p=h.scrollHeight-h.offsetHeight,c=Math.max(Math.min(t,p),0)),v&&(d=h.scrollWidth-h.offsetWidth,u=Math.max(Math.min(e,d),0));var b=null;g&&c===o&&(g=!1),v&&u===l&&(v=!1),a.requestAnimationFrame(s)}})},a.fn.scrollTop=function(e,a,t,n){3===arguments.length&&"function"==typeof t&&(n=t,t=void 0);var r=this;return"undefined"==typeof e?r.length>0?r[0].scrollTop:null:r.scrollTo(void 0,e,a,t,n)},a.fn.scrollLeft=function(e,a,t,n){3===arguments.length&&"function"==typeof t&&(n=t,t=void 0);var r=this;return"undefined"==typeof e?r.length>0?r[0].scrollLeft:null:r.scrollTo(e,void 0,a,t,n)},a}();Framework7.$=e;var a=e;window.Dom7=e;var t=function(e,t,n){t=t||{},n=n||{};var r={duration:300,easing:"swing"};for(var i in r)"undefined"==typeof n[i]&&(n[i]=r[i]);var s=this;if(s.params=n,s.props=t,s.elements=a(e),0===s.elements.length)return s;s.easingProgress=function(e,a){return"swing"===e?.5-Math.cos(a*Math.PI)/2:"function"==typeof e?e(a):a},s.stop=function(){s.frameId&&a.cancelAnimationFrame(s.frameId),s.animating=!1,s.elements.each(function(e,a){delete a.animate7Instance}),s.que=[]},s.done=function(a){if(s.animating=!1,s.elements.each(function(e,a){delete a.animate7Instance}),a&&a(e),s.que.length>0){var t=s.que.shift();s.animate(t[0],t[1])}},s.animating=!1,s.que=[],s.animate=function(t,n){function r(){o=(new Date).getTime();var m,f,h;u||(u=!0,n.begin&&n.begin(e)),null===p&&(p=o),n.progress&&n.progress(s.elements,Math.max(Math.min((o-p)/n.duration,1),0),p+n.duration-o<0?0:p+n.duration-o,p);for(var g=0;gh[v].initialValue&&h[v].currentValue>=h[v].finalValue||h[v].finalValue=0),(i||o||s)&&(a.os="ios",a.ios=!0),o&&!s&&(a.osVersion=o[2].replace(/_/g,"."),a.iphone=!0),i&&(a.osVersion=i[2].replace(/_/g,"."),a.ipad=!0),s&&(a.osVersion=s[3]?s[3].replace(/_/g,"."):null,a.iphone=!0),a.ios&&a.osVersion&&t.indexOf("Version/")>=0&&"10"===a.osVersion.split(".")[0]&&(a.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),a.webView=(o||i||s)&&t.match(/.*AppleWebKit(?!.*Safari)/i),a.os&&"ios"===a.os){var l=a.osVersion.split(".");a.minimalUi=!a.webView&&(s||o)&&(1*l[0]===7?1*l[1]>=1:1*l[0]>7)&&n('meta[name="viewport"]').length>0&&n('meta[name="viewport"]').attr("content").indexOf("minimal-ui")>=0}var p=n(window).width(),d=n(window).height();a.statusBar=!1,a.webView&&p*d===screen.width*screen.height?a.statusBar=!0:a.statusBar=!1;var c=[];if(a.pixelRatio=window.devicePixelRatio||1,c.push("pixel-ratio-"+Math.floor(a.pixelRatio)),a.pixelRatio>=2&&c.push("retina"),a.os&&(c.push(a.os,a.os+"-"+a.osVersion.split(".")[0],a.os+"-"+a.osVersion.replace(/\./g,"-")),"ios"===a.os))for(var u=parseInt(a.osVersion.split(".")[0],10),m=u-1;m>=6;m--)c.push("ios-gt-"+m);return a.statusBar?c.push("with-statusbar-overlay"):n("html").removeClass("with-statusbar-overlay"),c.length>0&&n("html").addClass(c.join(" ")),a}(),Framework7.prototype.plugins={},window.Template7=function(){function e(e){return"[object Array]"===Object.prototype.toString.apply(e)}function a(e){return"function"==typeof e}function t(e){return"undefined"!=typeof window&&window.escape?window.escape(e):e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""")}function n(e){var a,t,n,r=e.replace(/[{}#}]/g,"").split(" "),o=[];for(t=0;t=0){a=n,o.push(d);break}a&&(t=a)}else if(d.indexOf("=")>0){var c=d.split("="),u=c[0],m=c[1];if(2!==m.match(l).length){for(a=0,n=t+1;n=0){a=n;break}a&&(t=a)}var f=[u,m.replace(l,"")];o.push(f)}else o.push(d)}return o}function r(a){var t,r,i=[];if(!a)return[];var s=a.split(/({{[^{^}]*}})/);for(t=0;t=0)continue;if(o.indexOf("{#")<0&&o.indexOf(" ")<0&&o.indexOf("else")<0){i.push({type:"variable",contextName:o.replace(/[{}]/g,"")});continue}var l=n(o),p=l[0],d=">"===p,c=[],u={}; for(r=1;r=0){var f,h="",g="",v=0,b=!1,w=!1,C=0;for(r=t+1;r=0&&C++,s[r].indexOf("{{/")>=0&&C--,s[r].indexOf("{{#"+p)>=0)h+=s[r],w&&(g+=s[r]),v++;else if(s[r].indexOf("{{/"+p)>=0){if(!(v>0)){f=r,b=!0;break}v--,h+=s[r],w&&(g+=s[r])}else s[r].indexOf("else")>=0&&0===C?w=!0:(w||(h+=s[r]),w&&(g+=s[r]));b&&(f&&(t=f),i.push({type:"helper",helperName:p,contextName:c,content:h,inverseContent:g,hash:u}))}else o.indexOf(" ")>0&&(d&&(p="_partial",c[0]&&(c[0]='"'+c[0].replace(/"|'/g,"")+'"')),i.push({type:"helper",helperName:p,contextName:c,hash:u}))}}return i}var i=new RegExp("'","g"),s=new RegExp('"',"g"),o=function(e,a){function t(e,a){return e.content?o(e.content,a):function(){return""}}function n(e,a){return e.inverseContent?o(e.inverseContent,a):function(){return""}}function i(e,a){var t,n,r=0;if(0===e.indexOf("../")){r=e.split("../").length-1;var i=a.split("_")[1]-r;a="ctx_"+(i>=1?i:1),n=e.split("../")[r].split(".")}else 0===e.indexOf("@global")?(a="Template7.global",n=e.split("@global.")[1].split(".")):0===e.indexOf("@root")?(a="root",n=e.split("@root.")[1].split(".")):n=e.split(".");t=a;for(var s=0;s0?t+="[(data && data."+o.replace("@","")+")]":t="(data && data."+e.replace("@","")+")":isFinite(o)?t+="["+o+"]":"this"===o||o.indexOf("this.")>=0||o.indexOf("this[")>=0||o.indexOf("this(")>=0?t=o.replace("this",a):t+="."+o}return t}function s(e,a){for(var t=[],n=0;n0)throw new Error('Template7: Missing helper: "'+u.helperName+'"');m=i(u.helperName,p),d+="if ("+m+") {",d+="if (isArray("+m+")) {",d+="r += (Template7.helpers.each).call("+p+", "+m+", {hash:"+JSON.stringify(u.hash)+", data: data || {}, fn: "+t(u,a+1)+", inverse: "+n(u,a+1)+", root: root});",d+="}else {",d+="r += (Template7.helpers.with).call("+p+", "+m+", {hash:"+JSON.stringify(u.hash)+", data: data || {}, fn: "+t(u,a+1)+", inverse: "+n(u,a+1)+", root: root});",d+="}}"}}else d+="r +='"+u.content.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/'/g,"\\'")+"';"}return d+="\nreturn r;})",eval.call(window,d)}var l=this;l.template=e,l.compile=function(e){return l.compiled||(l.compiled=o(e)),l.compiled}};o.prototype={options:{},partials:{},helpers:{_partial:function(e,a){var t=o.prototype.partials[e];if(!t||t&&!t.template)return"";t.compiled||(t.compiled=new o(t.template).compile());var n=this;for(var r in a.hash)n[r]=a.hash[r];return t.compiled(n,a.data,a.root)},escape:function(e,a){if("string"!=typeof e)throw new Error('Template7: Passed context to "escape" helper should be a string');return t(e)},if:function(e,t){return a(e)&&(e=e.call(this)),e?t.fn(this,t.data):t.inverse(this,t.data)},unless:function(e,t){return a(e)&&(e=e.call(this)),e?t.inverse(this,t.data):t.fn(this,t.data)},each:function(t,n){var r="",i=0;if(a(t)&&(t=t.call(this)),e(t)){for(n.hash.reverse&&(t=t.reverse()),i=0;i0?r:n.inverse(this)},with:function(e,t){return a(e)&&(e=e.call(this)),t.fn(e)},join:function(e,t){return a(e)&&(e=e.call(this)),e.join(t.hash.delimiter||t.hash.delimeter)},js:function(e,a){var t;return t=e.indexOf("return")>=0?"(function(){"+e+"})":"(function(){return ("+e+")})",eval.call(this,t).call(this)},js_compare:function(e,a){var t;t=e.indexOf("return")>=0?"(function(){"+e+"})":"(function(){return ("+e+")})";var n=eval.call(this,t).call(this);return n?a.fn(this,a.data):a.inverse(this,a.data)}}};var l=function(e,a){if(2===arguments.length){var t=new o(e),n=t.compile()(a);return t=null,n}return new o(e)};return l.registerHelper=function(e,a){o.prototype.helpers[e]=a},l.unregisterHelper=function(e){o.prototype.helpers[e]=void 0,delete o.prototype.helpers[e]},l.registerPartial=function(e,a){o.prototype.partials[e]={template:a}},l.unregisterPartial=function(e,a){o.prototype.partials[e]&&(o.prototype.partials[e]=void 0,delete o.prototype.partials[e])},l.compile=function(e,a){var t=new o(e,a);return t.compile()},l.options=o.prototype.options,l.helpers=o.prototype.helpers,l.partials=o.prototype.partials,l}(),window.Swiper=function(t,n){function r(e){return Math.floor(e)}function s(){var e=b.params.autoplay,a=b.slides.eq(b.activeIndex);a.attr("data-swiper-autoplay")&&(e=a.attr("data-swiper-autoplay")||b.params.autoplay),b.autoplayTimeoutId=setTimeout(function(){b.params.loop?(b.fixLoop(),b._slideNext(),b.emit("onAutoplay",b)):b.isEnd?n.autoplayStopOnLast?b.stopAutoplay():(b._slideTo(0),b.emit("onAutoplay",b)):(b._slideNext(),b.emit("onAutoplay",b))},e)}function o(e,t){var n=a(e.target);if(!n.is(t))if("string"==typeof t)n=n.parents(t);else if(t.nodeType){var r;return n.parents().each(function(e,a){a===t&&(r=t)}),r?t:void 0}if(0!==n.length)return n[0]}function l(e,a){a=a||{};var t=window.MutationObserver||window.WebkitMutationObserver,n=new t(function(e){e.forEach(function(e){b.onResize(!0),b.emit("onObserverUpdate",b,e)})});n.observe(e,{attributes:"undefined"==typeof a.attributes||a.attributes,childList:"undefined"==typeof a.childList||a.childList,characterData:"undefined"==typeof a.characterData||a.characterData}),b.observers.push(n)}function p(e,t){e=a(e);var n,r,i,s=b.rtl?-1:1;n=e.attr("data-swiper-parallax")||"0",r=e.attr("data-swiper-parallax-x"),i=e.attr("data-swiper-parallax-y"),r||i?(r=r||"0",i=i||"0"):b.isHorizontal()?(r=n,i="0"):(i=n,r="0"),r=r.indexOf("%")>=0?parseInt(r,10)*t*s+"%":r*t*s+"px",i=i.indexOf("%")>=0?parseInt(i,10)*t+"%":i*t+"px",e.transform("translate3d("+r+", "+i+",0px)")}function d(e){return 0!==e.indexOf("on")&&(e=e[0]!==e[0].toUpperCase()?"on"+e[0].toUpperCase()+e.substring(1):"on"+e),e}if(!(this instanceof Swiper))return new Swiper(t,n);var c={direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,autoplay:!1,autoplayDisableOnInteraction:!0,autoplayStopOnLast:!1,iOSEdgeSwipeDetection:!1,iOSEdgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",coverflow:{rotate:50,stretch:0,depth:100,modifier:1,slideShadows:!0},flip:{slideShadows:!0,limitRotation:!0},cube:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94},fade:{crossFade:!1},parallax:!1,zoom:!1,zoomMax:3,zoomMin:1,zoomToggle:!0,scrollbar:null,scrollbarHide:!0,scrollbarDraggable:!1,scrollbarSnapOnRelease:!1,keyboardControl:!1,mousewheelControl:!1,mousewheelReleaseOnEdges:!1,mousewheelInvert:!1,mousewheelForceToAxis:!1,mousewheelSensitivity:1,mousewheelEventsTarged:"container",hashnav:!1,hashnavWatchState:!1,history:!1,replaceState:!1,breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,centeredSlides:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,onlyExternal:!1,threshold:0,touchMoveStopPropagation:!0,touchReleaseOnEdges:!1,uniqueNavElements:!0,pagination:null,paginationElement:"span",paginationClickable:!1,paginationHide:!1,paginationBulletRender:null,paginationProgressRender:null,paginationFractionRender:null,paginationCustomRender:null,paginationType:"bullets",resistance:!0,resistanceRatio:.85,nextButton:null,prevButton:null,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,lazyLoading:!1,lazyLoadingInPrevNext:!1,lazyLoadingInPrevNextAmount:1,lazyLoadingOnTransitionStart:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,control:void 0,controlInverse:!1,controlBy:"slide",normalizeSlideIndex:!0,allowSwipeToPrev:!0,allowSwipeToNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",buttonDisabledClass:"swiper-button-disabled",paginationCurrentClass:"swiper-pagination-current",paginationTotalClass:"swiper-pagination-total",paginationHiddenClass:"swiper-pagination-hidden",paginationProgressbarClass:"swiper-pagination-progressbar",paginationClickableClass:"swiper-pagination-clickable",paginationModifierClass:"swiper-pagination-",lazyLoadingClass:"swiper-lazy",lazyStatusLoadingClass:"swiper-lazy-loading",lazyStatusLoadedClass:"swiper-lazy-loaded",lazyPreloaderClass:"swiper-lazy-preloader",notificationClass:"swiper-notification",preloaderClass:"preloader",zoomContainerClass:"swiper-zoom-container",observer:!1,observeParents:!1,a11y:!1,prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",runCallbacksOnInit:!0},u=n&&n.virtualTranslate;n=n||{};var m={};for(var f in n)if("object"!=typeof n[f]||null===n[f]||(n[f].nodeType||n[f]===window||n[f]===document||"undefined"!=typeof e&&n[f]instanceof e||"undefined"!=typeof jQuery&&n[f]instanceof jQuery))m[f]=n[f];else{m[f]={};for(var h in n[f])m[f][h]=n[f][h]}for(var g in c)if("undefined"==typeof n[g])n[g]=c[g];else if("object"==typeof n[g])for(var v in c[g])"undefined"==typeof n[g][v]&&(n[g][v]=c[g][v]);var b=this;if(b.params=n,b.originalParams=m,b.classNames=[],"undefined"!=typeof a&&"undefined"!=typeof e&&(a=e),("undefined"!=typeof a||(a="undefined"==typeof e?window.Dom7||window.Zepto||window.jQuery:e))&&(b.$=a,b.currentBreakpoint=void 0,b.getActiveBreakpoint=function(){if(!b.params.breakpoints)return!1;var e,a=!1,t=[];for(e in b.params.breakpoints)b.params.breakpoints.hasOwnProperty(e)&&t.push(e);t.sort(function(e,a){return parseInt(e,10)>parseInt(a,10)});for(var n=0;n=window.innerWidth&&!a&&(a=e);return a||"max"},b.setBreakpoint=function(){var e=b.getActiveBreakpoint();if(e&&b.currentBreakpoint!==e){var a=e in b.params.breakpoints?b.params.breakpoints[e]:b.originalParams,t=b.params.loop&&a.slidesPerView!==b.params.slidesPerView;for(var n in a)b.params[n]=a[n];b.currentBreakpoint=e,t&&b.destroyLoop&&b.reLoop(!0)}},b.params.breakpoints&&b.setBreakpoint(),b.container=a(t),0!==b.container.length)){if(b.container.length>1){var w=[];return b.container.each(function(){w.push(new Swiper(this,n))}),w}b.container[0].swiper=b,b.container.data("swiper",b),b.classNames.push(b.params.containerModifierClass+b.params.direction),b.params.freeMode&&b.classNames.push(b.params.containerModifierClass+"free-mode"),b.support.flexbox||(b.classNames.push(b.params.containerModifierClass+"no-flexbox"),b.params.slidesPerColumn=1),b.params.autoHeight&&b.classNames.push(b.params.containerModifierClass+"autoheight"),(b.params.parallax||b.params.watchSlidesVisibility)&&(b.params.watchSlidesProgress=!0),b.params.touchReleaseOnEdges&&(b.params.resistanceRatio=0),["cube","coverflow","flip"].indexOf(b.params.effect)>=0&&(b.support.transforms3d?(b.params.watchSlidesProgress=!0,b.classNames.push(b.params.containerModifierClass+"3d")):b.params.effect="slide"),"slide"!==b.params.effect&&b.classNames.push(b.params.containerModifierClass+b.params.effect),"cube"===b.params.effect&&(b.params.resistanceRatio=0,b.params.slidesPerView=1,b.params.slidesPerColumn=1,b.params.slidesPerGroup=1,b.params.centeredSlides=!1,b.params.spaceBetween=0,b.params.virtualTranslate=!0,b.params.setWrapperSize=!1),"fade"!==b.params.effect&&"flip"!==b.params.effect||(b.params.slidesPerView=1,b.params.slidesPerColumn=1,b.params.slidesPerGroup=1,b.params.watchSlidesProgress=!0,b.params.spaceBetween=0,b.params.setWrapperSize=!1,"undefined"==typeof u&&(b.params.virtualTranslate=!0)),b.params.grabCursor&&b.support.touch&&(b.params.grabCursor=!1),b.wrapper=b.container.children("."+b.params.wrapperClass),b.params.pagination&&(b.paginationContainer=a(b.params.pagination),b.params.uniqueNavElements&&"string"==typeof b.params.pagination&&b.paginationContainer.length>1&&1===b.container.find(b.params.pagination).length&&(b.paginationContainer=b.container.find(b.params.pagination)),"bullets"===b.params.paginationType&&b.params.paginationClickable?b.paginationContainer.addClass(b.params.paginationModifierClass+"clickable"):b.params.paginationClickable=!1,b.paginationContainer.addClass(b.params.paginationModifierClass+b.params.paginationType)),(b.params.nextButton||b.params.prevButton)&&(b.params.nextButton&&(b.nextButton=a(b.params.nextButton),b.params.uniqueNavElements&&"string"==typeof b.params.nextButton&&b.nextButton.length>1&&1===b.container.find(b.params.nextButton).length&&(b.nextButton=b.container.find(b.params.nextButton))),b.params.prevButton&&(b.prevButton=a(b.params.prevButton),b.params.uniqueNavElements&&"string"==typeof b.params.prevButton&&b.prevButton.length>1&&1===b.container.find(b.params.prevButton).length&&(b.prevButton=b.container.find(b.params.prevButton)))),b.isHorizontal=function(){return"horizontal"===b.params.direction},b.rtl=b.isHorizontal()&&("rtl"===b.container[0].dir.toLowerCase()||"rtl"===b.container.css("direction")),b.rtl&&b.classNames.push(b.params.containerModifierClass+"rtl"),b.rtl&&(b.wrongRTL="-webkit-box"===b.wrapper.css("display")),b.params.slidesPerColumn>1&&b.classNames.push(b.params.containerModifierClass+"multirow"),b.device.android&&b.classNames.push(b.params.containerModifierClass+"android"),b.container.addClass(b.classNames.join(" ")),b.translate=0,b.progress=0,b.velocity=0,b.lockSwipeToNext=function(){b.params.allowSwipeToNext=!1,b.params.allowSwipeToPrev===!1&&b.params.grabCursor&&b.unsetGrabCursor()},b.lockSwipeToPrev=function(){b.params.allowSwipeToPrev=!1,b.params.allowSwipeToNext===!1&&b.params.grabCursor&&b.unsetGrabCursor()},b.lockSwipes=function(){b.params.allowSwipeToNext=b.params.allowSwipeToPrev=!1,b.params.grabCursor&&b.unsetGrabCursor()},b.unlockSwipeToNext=function(){b.params.allowSwipeToNext=!0,b.params.allowSwipeToPrev===!0&&b.params.grabCursor&&b.setGrabCursor()},b.unlockSwipeToPrev=function(){b.params.allowSwipeToPrev=!0,b.params.allowSwipeToNext===!0&&b.params.grabCursor&&b.setGrabCursor()},b.unlockSwipes=function(){b.params.allowSwipeToNext=b.params.allowSwipeToPrev=!0,b.params.grabCursor&&b.setGrabCursor()},b.setGrabCursor=function(e){b.container[0].style.cursor="move",b.container[0].style.cursor=e?"-webkit-grabbing":"-webkit-grab",b.container[0].style.cursor=e?"-moz-grabbin":"-moz-grab",b.container[0].style.cursor=e?"grabbing":"grab"},b.unsetGrabCursor=function(){b.container[0].style.cursor=""},b.params.grabCursor&&b.setGrabCursor(),b.imagesToLoad=[],b.imagesLoaded=0,b.loadImage=function(e,a,t,n,r,i){function s(){i&&i()}var o;e.complete&&r?s():a?(o=new window.Image,o.onload=s,o.onerror=s,n&&(o.sizes=n),t&&(o.srcset=t),a&&(o.src=a)):s()},b.preloadImages=function(){function e(){"undefined"!=typeof b&&null!==b&&(void 0!==b.imagesLoaded&&b.imagesLoaded++,b.imagesLoaded===b.imagesToLoad.length&&(b.params.updateOnImagesReady&&b.update(),b.emit("onImagesReady",b)))}b.imagesToLoad=b.container.find("img");for(var a=0;a1)for(i=0;ib.slides.length)break;e.push(b.slides.eq(t)[0])}else e.push(b.slides.eq(b.activeIndex)[0]);for(i=0;ia?n:a}a&&b.wrapper.css("height",a+"px")},b.updateContainerSize=function(){var e,a;e="undefined"!=typeof b.params.width?b.params.width:b.container[0].clientWidth,a="undefined"!=typeof b.params.height?b.params.height:b.container[0].clientHeight,0===e&&b.isHorizontal()||0===a&&!b.isHorizontal()||(e=e-parseInt(b.container.css("padding-left"),10)-parseInt(b.container.css("padding-right"),10),a=a-parseInt(b.container.css("padding-top"),10)-parseInt(b.container.css("padding-bottom"),10),b.width=e,b.height=a,b.size=b.isHorizontal()?b.width:b.height)},b.updateSlidesSize=function(){b.slides=b.wrapper.children("."+b.params.slideClass),b.snapGrid=[],b.slidesGrid=[],b.slidesSizesGrid=[];var e,a=b.params.spaceBetween,t=-b.params.slidesOffsetBefore,n=0,i=0;if("undefined"!=typeof b.size){"string"==typeof a&&a.indexOf("%")>=0&&(a=parseFloat(a.replace("%",""))/100*b.size),b.virtualSize=-a,b.rtl?b.slides.css({marginLeft:"",marginTop:""}):b.slides.css({marginRight:"",marginBottom:""});var s;b.params.slidesPerColumn>1&&(s=Math.floor(b.slides.length/b.params.slidesPerColumn)===b.slides.length/b.params.slidesPerColumn?b.slides.length:Math.ceil(b.slides.length/b.params.slidesPerColumn)*b.params.slidesPerColumn,"auto"!==b.params.slidesPerView&&"row"===b.params.slidesPerColumnFill&&(s=Math.max(s,b.params.slidesPerView*b.params.slidesPerColumn)));var o,l=b.params.slidesPerColumn,p=s/l,d=p-(b.params.slidesPerColumn*p-b.slides.length);for(e=0;e1){var u,m,f;"column"===b.params.slidesPerColumnFill?(m=Math.floor(e/l),f=e-m*l,(m>d||m===d&&f===l-1)&&++f>=l&&(f=0,m++),u=m+f*s/l,c.css({"-webkit-box-ordinal-group":u,"-moz-box-ordinal-group":u,"-ms-flex-order":u,"-webkit-order":u,order:u})):(f=Math.floor(e/p),m=e-f*p),c.css("margin-"+(b.isHorizontal()?"top":"left"),0!==f&&b.params.spaceBetween&&b.params.spaceBetween+"px").attr("data-swiper-column",m).attr("data-swiper-row",f)}"none"!==c.css("display")&&("auto"===b.params.slidesPerView?(o=b.isHorizontal()?c.outerWidth(!0):c.outerHeight(!0),b.params.roundLengths&&(o=r(o))):(o=(b.size-(b.params.slidesPerView-1)*a)/b.params.slidesPerView,b.params.roundLengths&&(o=r(o)),b.isHorizontal()?b.slides[e].style.width=o+"px":b.slides[e].style.height=o+"px"),b.slides[e].swiperSlideSize=o,b.slidesSizesGrid.push(o),b.params.centeredSlides?(t=t+o/2+n/2+a,0===e&&(t=t-b.size/2-a),Math.abs(t)<.001&&(t=0),i%b.params.slidesPerGroup===0&&b.snapGrid.push(t),b.slidesGrid.push(t)):(i%b.params.slidesPerGroup===0&&b.snapGrid.push(t),b.slidesGrid.push(t),t=t+o+a),b.virtualSize+=o+a,n=o,i++)}b.virtualSize=Math.max(b.virtualSize,b.size)+b.params.slidesOffsetAfter;var h;if(b.rtl&&b.wrongRTL&&("slide"===b.params.effect||"coverflow"===b.params.effect)&&b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}),b.support.flexbox&&!b.params.setWrapperSize||(b.isHorizontal()?b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}):b.wrapper.css({height:b.virtualSize+b.params.spaceBetween+"px"})),b.params.slidesPerColumn>1&&(b.virtualSize=(o+b.params.spaceBetween)*s,b.virtualSize=Math.ceil(b.virtualSize/b.params.slidesPerColumn)-b.params.spaceBetween,b.isHorizontal()?b.wrapper.css({width:b.virtualSize+b.params.spaceBetween+"px"}):b.wrapper.css({height:b.virtualSize+b.params.spaceBetween+"px"}),b.params.centeredSlides)){for(h=[],e=0;e1&&b.snapGrid.push(b.virtualSize-b.size)}0===b.snapGrid.length&&(b.snapGrid=[0]),0!==b.params.spaceBetween&&(b.isHorizontal()?b.rtl?b.slides.css({marginLeft:a+"px"}):b.slides.css({marginRight:a+"px"}):b.slides.css({marginBottom:a+"px"})),b.params.watchSlidesProgress&&b.updateSlidesOffset()}},b.updateSlidesOffset=function(){for(var e=0;e=0&&i0&&s<=b.size||i<=0&&s>=b.size;o&&b.slides.eq(t).addClass(b.params.slideVisibleClass)}n.progress=b.rtl?-r:r}}},b.updateProgress=function(e){"undefined"==typeof e&&(e=b.translate||0);var a=b.maxTranslate()-b.minTranslate(),t=b.isBeginning,n=b.isEnd;0===a?(b.progress=0,b.isBeginning=b.isEnd=!0):(b.progress=(e-b.minTranslate())/a,b.isBeginning=b.progress<=0,b.isEnd=b.progress>=1),b.isBeginning&&!t&&b.emit("onReachBeginning",b),b.isEnd&&!n&&b.emit("onReachEnd",b),b.params.watchSlidesProgress&&b.updateSlidesProgress(e),b.emit("onProgress",b,b.progress)},b.updateActiveIndex=function(){var e,a,t,n=b.rtl?b.translate:-b.translate;for(a=0;a=b.slidesGrid[a]&&n=b.slidesGrid[a]&&n=b.slidesGrid[a]&&(e=a);b.params.normalizeSlideIndex&&(e<0||"undefined"==typeof e)&&(e=0),t=Math.floor(e/b.params.slidesPerGroup),t>=b.snapGrid.length&&(t=b.snapGrid.length-1),e!==b.activeIndex&&(b.snapIndex=t,b.previousIndex=b.activeIndex,b.activeIndex=e,b.updateClasses(),b.updateRealIndex())},b.updateRealIndex=function(){b.realIndex=b.slides.eq(b.activeIndex).attr("data-swiper-slide-index")||b.activeIndex},b.updateClasses=function(){b.slides.removeClass(b.params.slideActiveClass+" "+b.params.slideNextClass+" "+b.params.slidePrevClass+" "+b.params.slideDuplicateActiveClass+" "+b.params.slideDuplicateNextClass+" "+b.params.slideDuplicatePrevClass);var e=b.slides.eq(b.activeIndex);e.addClass(b.params.slideActiveClass),n.loop&&(e.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+b.realIndex+'"]').addClass(b.params.slideDuplicateActiveClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+b.realIndex+'"]').addClass(b.params.slideDuplicateActiveClass));var t=e.next("."+b.params.slideClass).addClass(b.params.slideNextClass);b.params.loop&&0===t.length&&(t=b.slides.eq(0),t.addClass(b.params.slideNextClass));var r=e.prev("."+b.params.slideClass).addClass(b.params.slidePrevClass);if(b.params.loop&&0===r.length&&(r=b.slides.eq(-1),r.addClass(b.params.slidePrevClass)),n.loop&&(t.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicateNextClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+t.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicateNextClass),r.hasClass(b.params.slideDuplicateClass)?b.wrapper.children("."+b.params.slideClass+":not(."+b.params.slideDuplicateClass+')[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicatePrevClass):b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+r.attr("data-swiper-slide-index")+'"]').addClass(b.params.slideDuplicatePrevClass)),b.paginationContainer&&b.paginationContainer.length>0){var i,s=b.params.loop?Math.ceil((b.slides.length-2*b.loopedSlides)/b.params.slidesPerGroup):b.snapGrid.length;if(b.params.loop?(i=Math.ceil((b.activeIndex-b.loopedSlides)/b.params.slidesPerGroup),i>b.slides.length-1-2*b.loopedSlides&&(i-=b.slides.length-2*b.loopedSlides),i>s-1&&(i-=s),i<0&&"bullets"!==b.params.paginationType&&(i=s+i)):i="undefined"!=typeof b.snapIndex?b.snapIndex:b.activeIndex||0,"bullets"===b.params.paginationType&&b.bullets&&b.bullets.length>0&&(b.bullets.removeClass(b.params.bulletActiveClass),b.paginationContainer.length>1?b.bullets.each(function(){a(this).index()===i&&a(this).addClass(b.params.bulletActiveClass)}):b.bullets.eq(i).addClass(b.params.bulletActiveClass)),"fraction"===b.params.paginationType&&(b.paginationContainer.find("."+b.params.paginationCurrentClass).text(i+1),b.paginationContainer.find("."+b.params.paginationTotalClass).text(s)),"progress"===b.params.paginationType){var o=(i+1)/s,l=o,p=1;b.isHorizontal()||(p=o,l=1),b.paginationContainer.find("."+b.params.paginationProgressbarClass).transform("translate3d(0,0,0) scaleX("+l+") scaleY("+p+")").transition(b.params.speed)}"custom"===b.params.paginationType&&b.params.paginationCustomRender&&(b.paginationContainer.html(b.params.paginationCustomRender(b,i+1,s)),b.emit("onPaginationRendered",b,b.paginationContainer[0]))}b.params.loop||(b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.isBeginning?(b.prevButton.addClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.disable(b.prevButton)):(b.prevButton.removeClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.enable(b.prevButton))),b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.isEnd?(b.nextButton.addClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.disable(b.nextButton)):(b.nextButton.removeClass(b.params.buttonDisabledClass),b.params.a11y&&b.a11y&&b.a11y.enable(b.nextButton))))},b.updatePagination=function(){if(b.params.pagination&&b.paginationContainer&&b.paginationContainer.length>0){var e="";if("bullets"===b.params.paginationType){for(var a=b.params.loop?Math.ceil((b.slides.length-2*b.loopedSlides)/b.params.slidesPerGroup):b.snapGrid.length,t=0;t";b.paginationContainer.html(e),b.bullets=b.paginationContainer.find("."+b.params.bulletClass),b.params.paginationClickable&&b.params.a11y&&b.a11y&&b.a11y.initPagination()}"fraction"===b.params.paginationType&&(e=b.params.paginationFractionRender?b.params.paginationFractionRender(b,b.params.paginationCurrentClass,b.params.paginationTotalClass):' / ',b.paginationContainer.html(e)),"progress"===b.params.paginationType&&(e=b.params.paginationProgressRender?b.params.paginationProgressRender(b,b.params.paginationProgressbarClass):'',b.paginationContainer.html(e)),"custom"!==b.params.paginationType&&b.emit("onPaginationRendered",b,b.paginationContainer[0])}},b.update=function(e){function a(){b.rtl?-b.translate:b.translate;n=Math.min(Math.max(b.translate,b.maxTranslate()),b.minTranslate()),b.setWrapperTranslate(n),b.updateActiveIndex(),b.updateClasses()}if(b.updateContainerSize(),b.updateSlidesSize(),b.updateProgress(),b.updatePagination(),b.updateClasses(),b.params.scrollbar&&b.scrollbar&&b.scrollbar.set(),e){var t,n;b.controller&&b.controller.spline&&(b.controller.spline=void 0),b.params.freeMode?(a(),b.params.autoHeight&&b.updateAutoHeight()):(t=("auto"===b.params.slidesPerView||b.params.slidesPerView>1)&&b.isEnd&&!b.params.centeredSlides?b.slideTo(b.slides.length-1,0,!1,!0):b.slideTo(b.activeIndex,0,!1,!0),t||a())}else b.params.autoHeight&&b.updateAutoHeight()},b.onResize=function(e){b.params.breakpoints&&b.setBreakpoint();var a=b.params.allowSwipeToPrev,t=b.params.allowSwipeToNext;b.params.allowSwipeToPrev=b.params.allowSwipeToNext=!0,b.updateContainerSize(),b.updateSlidesSize(),("auto"===b.params.slidesPerView||b.params.freeMode||e)&&b.updatePagination(),b.params.scrollbar&&b.scrollbar&&b.scrollbar.set(),b.controller&&b.controller.spline&&(b.controller.spline=void 0);var n=!1;if(b.params.freeMode){var r=Math.min(Math.max(b.translate,b.maxTranslate()),b.minTranslate());b.setWrapperTranslate(r),b.updateActiveIndex(),b.updateClasses(),b.params.autoHeight&&b.updateAutoHeight()}else b.updateClasses(),n=("auto"===b.params.slidesPerView||b.params.slidesPerView>1)&&b.isEnd&&!b.params.centeredSlides?b.slideTo(b.slides.length-1,0,!1,!0):b.slideTo(b.activeIndex,0,!1,!0);b.params.lazyLoading&&!n&&b.lazy&&b.lazy.load(),b.params.allowSwipeToPrev=a,b.params.allowSwipeToNext=t},b.touchEventsDesktop={start:"mousedown",move:"mousemove",end:"mouseup"},window.navigator.pointerEnabled?b.touchEventsDesktop={start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled&&(b.touchEventsDesktop={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}),b.touchEvents={start:b.support.touch||!b.params.simulateTouch?"touchstart":b.touchEventsDesktop.start,move:b.support.touch||!b.params.simulateTouch?"touchmove":b.touchEventsDesktop.move,end:b.support.touch||!b.params.simulateTouch?"touchend":b.touchEventsDesktop.end},(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&("container"===b.params.touchEventsTarget?b.container:b.wrapper).addClass("swiper-wp8-"+b.params.direction),b.initEvents=function(e){var a=e?"off":"on",t=e?"removeEventListener":"addEventListener",r="container"===b.params.touchEventsTarget?b.container[0]:b.wrapper[0],i=b.support.touch?r:document,s=!!b.params.nested;if(b.browser.ie)r[t](b.touchEvents.start,b.onTouchStart,!1),i[t](b.touchEvents.move,b.onTouchMove,s), i[t](b.touchEvents.end,b.onTouchEnd,!1);else{if(b.support.touch){var o=!("touchstart"!==b.touchEvents.start||!b.support.passiveListener||!b.params.passiveListeners)&&{passive:!0,capture:!1};r[t](b.touchEvents.start,b.onTouchStart,o),r[t](b.touchEvents.move,b.onTouchMove,s),r[t](b.touchEvents.end,b.onTouchEnd,o)}(n.simulateTouch&&!b.device.ios&&!b.device.android||n.simulateTouch&&!b.support.touch&&b.device.ios)&&(r[t]("mousedown",b.onTouchStart,!1),document[t]("mousemove",b.onTouchMove,s),document[t]("mouseup",b.onTouchEnd,!1))}window[t]("resize",b.onResize),b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.nextButton[a]("click",b.onClickNext),b.params.a11y&&b.a11y&&b.nextButton[a]("keydown",b.a11y.onEnterKey)),b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.prevButton[a]("click",b.onClickPrev),b.params.a11y&&b.a11y&&b.prevButton[a]("keydown",b.a11y.onEnterKey)),b.params.pagination&&b.params.paginationClickable&&(b.paginationContainer[a]("click","."+b.params.bulletClass,b.onClickIndex),b.params.a11y&&b.a11y&&b.paginationContainer[a]("keydown","."+b.params.bulletClass,b.a11y.onEnterKey)),(b.params.preventClicks||b.params.preventClicksPropagation)&&r[t]("click",b.preventClicks,!0)},b.attachEvents=function(){b.initEvents()},b.detachEvents=function(){b.initEvents(!0)},b.allowClick=!0,b.preventClicks=function(e){b.allowClick||(b.params.preventClicks&&e.preventDefault(),b.params.preventClicksPropagation&&b.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))},b.onClickNext=function(e){e.preventDefault(),b.isEnd&&!b.params.loop||b.slideNext()},b.onClickPrev=function(e){e.preventDefault(),b.isBeginning&&!b.params.loop||b.slidePrev()},b.onClickIndex=function(e){e.preventDefault();var t=a(this).index()*b.params.slidesPerGroup;b.params.loop&&(t+=b.loopedSlides),b.slideTo(t)},b.updateClickedSlide=function(e){var t=o(e,"."+b.params.slideClass),n=!1;if(t)for(var r=0;rb.slides.length-b.loopedSlides+b.params.slidesPerView/2?(b.fixLoop(),s=b.wrapper.children("."+b.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+b.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){b.slideTo(s)},0)):b.slideTo(s):s>b.slides.length-b.params.slidesPerView?(b.fixLoop(),s=b.wrapper.children("."+b.params.slideClass+'[data-swiper-slide-index="'+i+'"]:not(.'+b.params.slideDuplicateClass+")").eq(0).index(),setTimeout(function(){b.slideTo(s)},0)):b.slideTo(s)}else b.slideTo(s)}};var C,y,x,T,k,P,S,M,I,E,O="input, select, textarea, button, video",D=Date.now(),z=[];b.animating=!1,b.touches={startX:0,startY:0,currentX:0,currentY:0,diff:0};var L,B;b.onTouchStart=function(e){if(e.originalEvent&&(e=e.originalEvent),L="touchstart"===e.type,L||!("which"in e)||3!==e.which){if(b.params.noSwiping&&o(e,"."+b.params.noSwipingClass))return void(b.allowClick=!0);if(!b.params.swipeHandler||o(e,b.params.swipeHandler)){var t=b.touches.currentX="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,n=b.touches.currentY="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY;if(!(b.device.ios&&b.params.iOSEdgeSwipeDetection&&t<=b.params.iOSEdgeSwipeThreshold)){if(C=!0,y=!1,x=!0,k=void 0,B=void 0,b.touches.startX=t,b.touches.startY=n,T=Date.now(),b.allowClick=!0,b.updateContainerSize(),b.swipeDirection=void 0,b.params.threshold>0&&(M=!1),"touchstart"!==e.type){var r=!0;a(e.target).is(O)&&(r=!1),document.activeElement&&a(document.activeElement).is(O)&&document.activeElement.blur(),r&&e.preventDefault()}b.emit("onTouchStart",b,e)}}}},b.onTouchMove=function(e){if(e.originalEvent&&(e=e.originalEvent),!L||"mousemove"!==e.type){if(e.preventedByNestedSwiper)return b.touches.startX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,void(b.touches.startY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY);if(b.params.onlyExternal)return b.allowClick=!1,void(C&&(b.touches.startX=b.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,b.touches.startY=b.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,T=Date.now()));if(L&&b.params.touchReleaseOnEdges&&!b.params.loop)if(b.isHorizontal()){if(b.touches.currentXb.touches.startX&&b.translate>=b.minTranslate())return}else if(b.touches.currentYb.touches.startY&&b.translate>=b.minTranslate())return;if(L&&document.activeElement&&e.target===document.activeElement&&a(e.target).is(O))return y=!0,void(b.allowClick=!1);if(x&&b.emit("onTouchMove",b,e),!(e.targetTouches&&e.targetTouches.length>1)){if(b.touches.currentX="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,b.touches.currentY="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,"undefined"==typeof k){var t;b.isHorizontal()&&b.touches.currentY===b.touches.startY||!b.isHorizontal()&&b.touches.currentX!==b.touches.startX?k=!1:(t=180*Math.atan2(Math.abs(b.touches.currentY-b.touches.startY),Math.abs(b.touches.currentX-b.touches.startX))/Math.PI,k=b.isHorizontal()?t>b.params.touchAngle:90-t>b.params.touchAngle)}if(k&&b.emit("onTouchMoveOpposite",b,e),"undefined"==typeof B&&b.browser.ieTouch&&(b.touches.currentX===b.touches.startX&&b.touches.currentY===b.touches.startY||(B=!0)),C){if(k)return void(C=!1);if(B||!b.browser.ieTouch){b.allowClick=!1,b.emit("onSliderMove",b,e),e.preventDefault(),b.params.touchMoveStopPropagation&&!b.params.nested&&e.stopPropagation(),y||(n.loop&&b.fixLoop(),S=b.getWrapperTranslate(),b.setWrapperTransition(0),b.animating&&b.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"),b.params.autoplay&&b.autoplaying&&(b.params.autoplayDisableOnInteraction?b.stopAutoplay():b.pauseAutoplay()),E=!1,!b.params.grabCursor||b.params.allowSwipeToNext!==!0&&b.params.allowSwipeToPrev!==!0||b.setGrabCursor(!0)),y=!0;var r=b.touches.diff=b.isHorizontal()?b.touches.currentX-b.touches.startX:b.touches.currentY-b.touches.startY;r*=b.params.touchRatio,b.rtl&&(r=-r),b.swipeDirection=r>0?"prev":"next",P=r+S;var i=!0;if(r>0&&P>b.minTranslate()?(i=!1,b.params.resistance&&(P=b.minTranslate()-1+Math.pow(-b.minTranslate()+S+r,b.params.resistanceRatio))):r<0&&PS&&(P=S),b.params.threshold>0){if(!(Math.abs(r)>b.params.threshold||M))return void(P=S);if(!M)return M=!0,b.touches.startX=b.touches.currentX,b.touches.startY=b.touches.currentY,P=S,void(b.touches.diff=b.isHorizontal()?b.touches.currentX-b.touches.startX:b.touches.currentY-b.touches.startY)}b.params.followFinger&&((b.params.freeMode||b.params.watchSlidesProgress)&&b.updateActiveIndex(),b.params.freeMode&&(0===z.length&&z.push({position:b.touches[b.isHorizontal()?"startX":"startY"],time:T}),z.push({position:b.touches[b.isHorizontal()?"currentX":"currentY"],time:(new window.Date).getTime()})),b.updateProgress(P),b.setWrapperTranslate(P))}}}}},b.onTouchEnd=function(e){if(e.originalEvent&&(e=e.originalEvent),x&&b.emit("onTouchEnd",b,e),x=!1,C){b.params.grabCursor&&y&&C&&(b.params.allowSwipeToNext===!0||b.params.allowSwipeToPrev===!0)&&b.setGrabCursor(!1);var t=Date.now(),n=t-T;if(b.allowClick&&(b.updateClickedSlide(e),b.emit("onTap",b,e),n<300&&t-D>300&&(I&&clearTimeout(I),I=setTimeout(function(){b&&(b.params.paginationHide&&b.paginationContainer.length>0&&!a(e.target).hasClass(b.params.bulletClass)&&b.paginationContainer.toggleClass(b.params.paginationHiddenClass),b.emit("onClick",b,e))},300)),n<300&&t-D<300&&(I&&clearTimeout(I),b.emit("onDoubleTap",b,e))),D=Date.now(),setTimeout(function(){b&&(b.allowClick=!0)},0),!C||!y||!b.swipeDirection||0===b.touches.diff||P===S)return void(C=y=!1);C=y=!1;var r;if(r=b.params.followFinger?b.rtl?b.translate:-b.translate:-P,b.params.freeMode){if(r<-b.minTranslate())return void b.slideTo(b.activeIndex);if(r>-b.maxTranslate())return void(b.slides.length1){var i=z.pop(),s=z.pop(),o=i.position-s.position,l=i.time-s.time;b.velocity=o/l,b.velocity=b.velocity/2,Math.abs(b.velocity)150||(new window.Date).getTime()-i.time>300)&&(b.velocity=0)}else b.velocity=0;b.velocity=b.velocity*b.params.freeModeMomentumVelocityRatio,z.length=0;var p=1e3*b.params.freeModeMomentumRatio,d=b.velocity*p,c=b.translate+d;b.rtl&&(c=-c);var u,m=!1,f=20*Math.abs(b.velocity)*b.params.freeModeMomentumBounceRatio;if(cb.minTranslate())b.params.freeModeMomentumBounce?(c-b.minTranslate()>f&&(c=b.minTranslate()+f),u=b.minTranslate(),m=!0,E=!0):c=b.minTranslate();else if(b.params.freeModeSticky){var h,g=0;for(g=0;g-c){h=g;break}c=Math.abs(b.snapGrid[h]-c)=b.params.longSwipesMs)&&(b.updateProgress(),b.updateActiveIndex()))}var v,w=0,k=b.slidesSizesGrid[0];for(v=0;v=b.slidesGrid[v]&&r=b.slidesGrid[v]&&(w=v,k=b.slidesGrid[b.slidesGrid.length-1]-b.slidesGrid[b.slidesGrid.length-2]);var M=(r-b.slidesGrid[w])/k;if(n>b.params.longSwipesMs){if(!b.params.longSwipes)return void b.slideTo(b.activeIndex);"next"===b.swipeDirection&&(M>=b.params.longSwipesRatio?b.slideTo(w+b.params.slidesPerGroup):b.slideTo(w)),"prev"===b.swipeDirection&&(M>1-b.params.longSwipesRatio?b.slideTo(w+b.params.slidesPerGroup):b.slideTo(w))}else{if(!b.params.shortSwipes)return void b.slideTo(b.activeIndex);"next"===b.swipeDirection&&b.slideTo(w+b.params.slidesPerGroup),"prev"===b.swipeDirection&&b.slideTo(w)}}},b._slideTo=function(e,a){return b.slideTo(e,a,!0,!0)},b.slideTo=function(e,a,t,n){"undefined"==typeof t&&(t=!0),"undefined"==typeof e&&(e=0),e<0&&(e=0),b.snapIndex=Math.floor(e/b.params.slidesPerGroup),b.snapIndex>=b.snapGrid.length&&(b.snapIndex=b.snapGrid.length-1);var r=-b.snapGrid[b.snapIndex];if(b.params.autoplay&&b.autoplaying&&(n||!b.params.autoplayDisableOnInteraction?b.pauseAutoplay(a):b.stopAutoplay()),b.updateProgress(r),b.params.normalizeSlideIndex)for(var i=0;i=Math.floor(100*b.slidesGrid[i])&&(e=i);return!(!b.params.allowSwipeToNext&&rb.translate&&r>b.maxTranslate()&&(b.activeIndex||0)!==e)&&("undefined"==typeof a&&(a=b.params.speed),b.previousIndex=b.activeIndex||0,b.activeIndex=e,b.updateRealIndex(),b.rtl&&-r===b.translate||!b.rtl&&r===b.translate?(b.params.autoHeight&&b.updateAutoHeight(),b.updateClasses(),"slide"!==b.params.effect&&b.setWrapperTranslate(r),!1):(b.updateClasses(),b.onTransitionStart(t),0===a||b.browser.lteIE9?(b.setWrapperTranslate(r),b.setWrapperTransition(0),b.onTransitionEnd(t)):(b.setWrapperTranslate(r),b.setWrapperTransition(a),b.animating||(b.animating=!0,b.wrapper.transitionEnd(function(){b&&b.onTransitionEnd(t)}))),!0)))},b.onTransitionStart=function(e){"undefined"==typeof e&&(e=!0),b.params.autoHeight&&b.updateAutoHeight(),b.lazy&&b.lazy.onTransitionStart(),e&&(b.emit("onTransitionStart",b),b.activeIndex!==b.previousIndex&&(b.emit("onSlideChangeStart",b),b.activeIndex>b.previousIndex?b.emit("onSlideNextStart",b):b.emit("onSlidePrevStart",b)))},b.onTransitionEnd=function(e){b.animating=!1,b.setWrapperTransition(0),"undefined"==typeof e&&(e=!0),b.lazy&&b.lazy.onTransitionEnd(),e&&(b.emit("onTransitionEnd",b),b.activeIndex!==b.previousIndex&&(b.emit("onSlideChangeEnd",b),b.activeIndex>b.previousIndex?b.emit("onSlideNextEnd",b):b.emit("onSlidePrevEnd",b))),b.params.history&&b.history&&b.history.setHistory(b.params.history,b.activeIndex),b.params.hashnav&&b.hashnav&&b.hashnav.setHash()},b.slideNext=function(e,a,t){if(b.params.loop){if(b.animating)return!1;b.fixLoop();b.container[0].clientLeft;return b.slideTo(b.activeIndex+b.params.slidesPerGroup,a,e,t)}return b.slideTo(b.activeIndex+b.params.slidesPerGroup,a,e,t)},b._slideNext=function(e){return b.slideNext(!0,e,!0)},b.slidePrev=function(e,a,t){if(b.params.loop){if(b.animating)return!1;b.fixLoop();b.container[0].clientLeft;return b.slideTo(b.activeIndex-1,a,e,t)}return b.slideTo(b.activeIndex-1,a,e,t)},b._slidePrev=function(e){return b.slidePrev(!0,e,!0)},b.slideReset=function(e,a,t){return b.slideTo(b.activeIndex,a,e)},b.disableTouchControl=function(){return b.params.onlyExternal=!0,!0},b.enableTouchControl=function(){return b.params.onlyExternal=!1,!0},b.setWrapperTransition=function(e,a){b.wrapper.transition(e),"slide"!==b.params.effect&&b.effects[b.params.effect]&&b.effects[b.params.effect].setTransition(e),b.params.parallax&&b.parallax&&b.parallax.setTransition(e),b.params.scrollbar&&b.scrollbar&&b.scrollbar.setTransition(e),b.params.control&&b.controller&&b.controller.setTransition(e,a),b.emit("onSetTransition",b,e)},b.setWrapperTranslate=function(e,a,t){var n=0,i=0,s=0;b.isHorizontal()?n=b.rtl?-e:e:i=e,b.params.roundLengths&&(n=r(n),i=r(i)),b.params.virtualTranslate||(b.support.transforms3d?b.wrapper.transform("translate3d("+n+"px, "+i+"px, "+s+"px)"):b.wrapper.transform("translate("+n+"px, "+i+"px)")),b.translate=b.isHorizontal()?n:i;var o,l=b.maxTranslate()-b.minTranslate();o=0===l?0:(e-b.minTranslate())/l,o!==b.progress&&b.updateProgress(e),a&&b.updateActiveIndex(),"slide"!==b.params.effect&&b.effects[b.params.effect]&&b.effects[b.params.effect].setTranslate(b.translate),b.params.parallax&&b.parallax&&b.parallax.setTranslate(b.translate),b.params.scrollbar&&b.scrollbar&&b.scrollbar.setTranslate(b.translate),b.params.control&&b.controller&&b.controller.setTranslate(b.translate,t),b.emit("onSetTranslate",b,b.translate)},b.getTranslate=function(e,a){var t,n,r,i;return"undefined"==typeof a&&(a="x"),b.params.virtualTranslate?b.rtl?-b.translate:b.translate:(r=window.getComputedStyle(e,null),window.WebKitCSSMatrix?(n=r.transform||r.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map(function(e){return e.replace(",",".")}).join(", ")),i=new window.WebKitCSSMatrix("none"===n?"":n)):(i=r.MozTransform||r.OTransform||r.MsTransform||r.msTransform||r.transform||r.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),t=i.toString().split(",")),"x"===a&&(n=window.WebKitCSSMatrix?i.m41:16===t.length?parseFloat(t[12]):parseFloat(t[4])),"y"===a&&(n=window.WebKitCSSMatrix?i.m42:16===t.length?parseFloat(t[13]):parseFloat(t[5])),b.rtl&&n&&(n=-n),n||0)},b.getWrapperTranslate=function(e){return"undefined"==typeof e&&(e=b.isHorizontal()?"x":"y"),b.getTranslate(b.wrapper[0],e)},b.observers=[],b.initObservers=function(){if(b.params.observeParents)for(var e=b.container.parents(),a=0;ae.length&&(b.loopedSlides=e.length);var t,n=[],r=[];for(e.each(function(t,i){var s=a(this);t=e.length-b.loopedSlides&&n.push(i),s.attr("data-swiper-slide-index",t)}),t=0;t=0;t--)b.wrapper.prepend(a(n[t].cloneNode(!0)).addClass(b.params.slideDuplicateClass))},b.destroyLoop=function(){b.wrapper.children("."+b.params.slideClass+"."+b.params.slideDuplicateClass).remove(),b.slides.removeAttr("data-swiper-slide-index")},b.reLoop=function(e){var a=b.activeIndex-b.loopedSlides;b.destroyLoop(),b.createLoop(),b.updateSlidesSize(),e&&b.slideTo(a+b.loopedSlides,0,!1)},b.fixLoop=function(){var e;b.activeIndex=2*b.loopedSlides||b.activeIndex>b.slides.length-2*b.params.slidesPerView)&&(e=-b.slides.length+b.activeIndex+b.loopedSlides,e+=b.loopedSlides,b.slideTo(e,0,!1,!0))},b.appendSlide=function(e){if(b.params.loop&&b.destroyLoop(),"object"==typeof e&&e.length)for(var a=0;a'),t.append(d)),0===c.length&&(c=a('
            '),t.append(c)),d.length&&(d[0].style.opacity=Math.max(-n,0)),c.length&&(c[0].style.opacity=Math.max(n,0))}t.transform("translate3d("+l+"px, "+p+"px, 0px) rotateX("+o+"deg) rotateY("+s+"deg)")}},setTransition:function(e){if(b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),b.params.virtualTranslate&&0!==e){var t=!1;b.slides.eq(b.activeIndex).transitionEnd(function(){if(!t&&b&&a(this).hasClass(b.params.slideActiveClass)){t=!0,b.animating=!1;for(var e=["webkitTransitionEnd","transitionend","oTransitionEnd","MSTransitionEnd","msTransitionEnd"],n=0;n'),b.wrapper.append(e)),e.css({height:b.width+"px"})):(e=b.container.find(".swiper-cube-shadow"),0===e.length&&(e=a('
            '),b.container.append(e))));for(var n=0;n-1&&(t=90*n+90*o,b.rtl&&(t=90*-n-90*o)),r.transform(c),b.params.cube.slideShadows){var u=b.isHorizontal()?r.find(".swiper-slide-shadow-left"):r.find(".swiper-slide-shadow-top"),m=b.isHorizontal()?r.find(".swiper-slide-shadow-right"):r.find(".swiper-slide-shadow-bottom");0===u.length&&(u=a('
            '),r.append(u)),0===m.length&&(m=a('
            '),r.append(m)),u.length&&(u[0].style.opacity=Math.max(-o,0)),m.length&&(m[0].style.opacity=Math.max(o,0))}}if(b.wrapper.css({"-webkit-transform-origin":"50% 50% -"+b.size/2+"px","-moz-transform-origin":"50% 50% -"+b.size/2+"px","-ms-transform-origin":"50% 50% -"+b.size/2+"px","transform-origin":"50% 50% -"+b.size/2+"px"}),b.params.cube.shadow)if(b.isHorizontal())e.transform("translate3d(0px, "+(b.width/2+b.params.cube.shadowOffset)+"px, "+-b.width/2+"px) rotateX(90deg) rotateZ(0deg) scale("+b.params.cube.shadowScale+")");else{var f=Math.abs(t)-90*Math.floor(Math.abs(t)/90),h=1.5-(Math.sin(2*f*Math.PI/360)/2+Math.cos(2*f*Math.PI/360)/2),g=b.params.cube.shadowScale,v=b.params.cube.shadowScale/h,w=b.params.cube.shadowOffset;e.transform("scale3d("+g+", 1, "+v+") translate3d(0px, "+(b.height/2+w)+"px, "+-b.height/2/v+"px) rotateX(-90deg)")}var C=b.isSafari||b.isUiWebView?-b.size/2:0;b.wrapper.transform("translate3d(0px,0,"+C+"px) rotateX("+(b.isHorizontal()?0:t)+"deg) rotateY("+(b.isHorizontal()?-t:0)+"deg)")},setTransition:function(e){b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),b.params.cube.shadow&&!b.isHorizontal()&&b.container.find(".swiper-cube-shadow").transition(e)}},coverflow:{setTranslate:function(){for(var e=b.translate,t=b.isHorizontal()?-e+b.width/2:-e+b.height/2,n=b.isHorizontal()?b.params.coverflow.rotate:-b.params.coverflow.rotate,r=b.params.coverflow.depth,i=0,s=b.slides.length;i'),o.append(v)),0===w.length&&(w=a('
            '),o.append(w)),v.length&&(v[0].style.opacity=d>0?d:0),w.length&&(w[0].style.opacity=-d>0?-d:0)}}if(b.browser.ie){var C=b.wrapper[0].style;C.perspectiveOrigin=t+"px 50%"}},setTransition:function(e){b.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}}},b.lazy={initialImageLoaded:!1,loadImageInSlide:function(e,t){if("undefined"!=typeof e&&("undefined"==typeof t&&(t=!0),0!==b.slides.length)){var n=b.slides.eq(e),r=n.find("."+b.params.lazyLoadingClass+":not(."+b.params.lazyStatusLoadedClass+"):not(."+b.params.lazyStatusLoadingClass+")");!n.hasClass(b.params.lazyLoadingClass)||n.hasClass(b.params.lazyStatusLoadedClass)||n.hasClass(b.params.lazyStatusLoadingClass)||(r=r.add(n[0])),0!==r.length&&r.each(function(){var e=a(this);e.addClass(b.params.lazyStatusLoadingClass);var r=e.attr("data-background"),i=e.attr("data-src"),s=e.attr("data-srcset"),o=e.attr("data-sizes");b.loadImage(e[0],i||r,s,o,!1,function(){if(r?(e.css("background-image",'url("'+r+'")'),e.removeAttr("data-background")):(s&&(e.attr("srcset",s),e.removeAttr("data-srcset")),o&&(e.attr("sizes",o),e.removeAttr("data-sizes")),i&&(e.attr("src",i),e.removeAttr("data-src"))),e.addClass(b.params.lazyStatusLoadedClass).removeClass(b.params.lazyStatusLoadingClass),n.find("."+b.params.lazyPreloaderClass+", ."+b.params.preloaderClass).remove(),b.params.loop&&t){var a=n.attr("data-swiper-slide-index");if(n.hasClass(b.params.slideDuplicateClass)){var l=b.wrapper.children('[data-swiper-slide-index="'+a+'"]:not(.'+b.params.slideDuplicateClass+")");b.lazy.loadImageInSlide(l.index(),!1)}else{var p=b.wrapper.children("."+b.params.slideDuplicateClass+'[data-swiper-slide-index="'+a+'"]');b.lazy.loadImageInSlide(p.index(),!1)}}b.emit("onLazyImageReady",b,n[0],e[0])}),b.emit("onLazyImageLoad",b,n[0],e[0])})}},load:function(){var e,t=b.params.slidesPerView;if("auto"===t&&(t=0),b.lazy.initialImageLoaded||(b.lazy.initialImageLoaded=!0),b.params.watchSlidesVisibility)b.wrapper.children("."+b.params.slideVisibleClass).each(function(){b.lazy.loadImageInSlide(a(this).index())});else if(t>1)for(e=b.activeIndex;e1||b.params.lazyLoadingInPrevNextAmount&&b.params.lazyLoadingInPrevNextAmount>1){var n=b.params.lazyLoadingInPrevNextAmount,r=t,i=Math.min(b.activeIndex+r+Math.max(n,r),b.slides.length),s=Math.max(b.activeIndex-Math.max(r,n),0);for(e=b.activeIndex+t;e0&&b.lazy.loadImageInSlide(o.index());var l=b.wrapper.children("."+b.params.slidePrevClass);l.length>0&&b.lazy.loadImageInSlide(l.index())}},onTransitionStart:function(){b.params.lazyLoading&&(b.params.lazyLoadingOnTransitionStart||!b.params.lazyLoadingOnTransitionStart&&!b.lazy.initialImageLoaded)&&b.lazy.load()},onTransitionEnd:function(){b.params.lazyLoading&&!b.params.lazyLoadingOnTransitionStart&&b.lazy.load()}},b.scrollbar={isTouched:!1,setDragPosition:function(e){var a=b.scrollbar,t=b.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageX:e.pageX||e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].pageY:e.pageY||e.clientY,n=t-a.track.offset()[b.isHorizontal()?"left":"top"]-a.dragSize/2,r=-b.minTranslate()*a.moveDivider,i=-b.maxTranslate()*a.moveDivider;ni&&(n=i),n=-n/a.moveDivider,b.updateProgress(n),b.setWrapperTranslate(n,!0)},dragStart:function(e){var a=b.scrollbar;a.isTouched=!0,e.preventDefault(),e.stopPropagation(),a.setDragPosition(e),clearTimeout(a.dragTimeout),a.track.transition(0),b.params.scrollbarHide&&a.track.css("opacity",1),b.wrapper.transition(100),a.drag.transition(100),b.emit("onScrollbarDragStart",b)},dragMove:function(e){var a=b.scrollbar;a.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,a.setDragPosition(e),b.wrapper.transition(0),a.track.transition(0),a.drag.transition(0),b.emit("onScrollbarDragMove",b))},dragEnd:function(e){var a=b.scrollbar;a.isTouched&&(a.isTouched=!1,b.params.scrollbarHide&&(clearTimeout(a.dragTimeout),a.dragTimeout=setTimeout(function(){a.track.css("opacity",0),a.track.transition(400)},1e3)),b.emit("onScrollbarDragEnd",b),b.params.scrollbarSnapOnRelease&&b.slideReset())},draggableEvents:function(){return b.params.simulateTouch!==!1||b.support.touch?b.touchEvents:b.touchEventsDesktop}(),enableDraggable:function(){var e=b.scrollbar,t=b.support.touch?e.track:document;a(e.track).on(e.draggableEvents.start,e.dragStart),a(t).on(e.draggableEvents.move,e.dragMove),a(t).on(e.draggableEvents.end,e.dragEnd)},disableDraggable:function(){var e=b.scrollbar,t=b.support.touch?e.track:document;a(e.track).off(b.draggableEvents.start,e.dragStart),a(t).off(b.draggableEvents.move,e.dragMove),a(t).off(b.draggableEvents.end,e.dragEnd)},set:function(){if(b.params.scrollbar){var e=b.scrollbar;e.track=a(b.params.scrollbar),b.params.uniqueNavElements&&"string"==typeof b.params.scrollbar&&e.track.length>1&&1===b.container.find(b.params.scrollbar).length&&(e.track=b.container.find(b.params.scrollbar)),e.drag=e.track.find(".swiper-scrollbar-drag"),0===e.drag.length&&(e.drag=a('
            '),e.track.append(e.drag)),e.drag[0].style.width="",e.drag[0].style.height="",e.trackSize=b.isHorizontal()?e.track[0].offsetWidth:e.track[0].offsetHeight,e.divider=b.size/b.virtualSize,e.moveDivider=e.divider*(e.trackSize/b.size),e.dragSize=e.trackSize*e.divider,b.isHorizontal()?e.drag[0].style.width=e.dragSize+"px":e.drag[0].style.height=e.dragSize+"px",e.divider>=1?e.track[0].style.display="none":e.track[0].style.display="",b.params.scrollbarHide&&(e.track[0].style.opacity=0)}},setTranslate:function(){if(b.params.scrollbar){var e,a=b.scrollbar,t=(b.translate||0,a.dragSize);e=(a.trackSize-a.dragSize)*b.progress,b.rtl&&b.isHorizontal()?(e=-e,e>0?(t=a.dragSize-e,e=0):-e+a.dragSize>a.trackSize&&(t=a.trackSize+e)):e<0?(t=a.dragSize+e,e=0):e+a.dragSize>a.trackSize&&(t=a.trackSize-e),b.isHorizontal()?(b.support.transforms3d?a.drag.transform("translate3d("+e+"px, 0, 0)"):a.drag.transform("translateX("+e+"px)"),a.drag[0].style.width=t+"px"):(b.support.transforms3d?a.drag.transform("translate3d(0px, "+e+"px, 0)"):a.drag.transform("translateY("+e+"px)"),a.drag[0].style.height=t+"px"),b.params.scrollbarHide&&(clearTimeout(a.timeout),a.track[0].style.opacity=1,a.timeout=setTimeout(function(){a.track[0].style.opacity=0,a.track.transition(400)},1e3))}},setTransition:function(e){b.params.scrollbar&&b.scrollbar.drag.transition(e)}},b.controller={LinearSpline:function(e,a){ this.x=e,this.y=a,this.lastIndex=e.length-1;var t,n;this.x.length;this.interpolate=function(e){return e?(n=r(this.x,e),t=n-1,(e-this.x[t])*(this.y[n]-this.y[t])/(this.x[n]-this.x[t])+this.y[t]):0};var r=function(){var e,a,t;return function(n,r){for(a=-1,e=n.length;e-a>1;)n[t=e+a>>1]<=r?a=t:e=t;return e}}()},getInterpolateFunction:function(e){b.controller.spline||(b.controller.spline=b.params.loop?new b.controller.LinearSpline(b.slidesGrid,e.slidesGrid):new b.controller.LinearSpline(b.snapGrid,e.snapGrid))},setTranslate:function(e,a){function t(a){e=a.rtl&&"horizontal"===a.params.direction?-b.translate:b.translate,"slide"===b.params.controlBy&&(b.controller.getInterpolateFunction(a),r=-b.controller.spline.interpolate(-e)),r&&"container"!==b.params.controlBy||(n=(a.maxTranslate()-a.minTranslate())/(b.maxTranslate()-b.minTranslate()),r=(e-b.minTranslate())*n+a.minTranslate()),b.params.controlInverse&&(r=a.maxTranslate()-r),a.updateProgress(r),a.setWrapperTranslate(r,!1,b),a.updateActiveIndex()}var n,r,i=b.params.control;if(b.isArray(i))for(var s=0;sa.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scalea.image.touchesStart.x)return void(a.image.isTouched=!1);if(!b.isHorizontal()&&Math.floor(a.image.minY)===Math.floor(a.image.startY)&&a.image.touchesCurrent.ya.image.touchesStart.y)return void(a.image.isTouched=!1)}e.preventDefault(),e.stopPropagation(),a.image.isMoved=!0,a.image.currentX=a.image.touchesCurrent.x-a.image.touchesStart.x+a.image.startX,a.image.currentY=a.image.touchesCurrent.y-a.image.touchesStart.y+a.image.startY,a.image.currentXa.image.maxX&&(a.image.currentX=a.image.maxX-1+Math.pow(a.image.currentX-a.image.maxX+1,.8)),a.image.currentYa.image.maxY&&(a.image.currentY=a.image.maxY-1+Math.pow(a.image.currentY-a.image.maxY+1,.8)),a.velocity.prevPositionX||(a.velocity.prevPositionX=a.image.touchesCurrent.x),a.velocity.prevPositionY||(a.velocity.prevPositionY=a.image.touchesCurrent.y),a.velocity.prevTime||(a.velocity.prevTime=Date.now()),a.velocity.x=(a.image.touchesCurrent.x-a.velocity.prevPositionX)/(Date.now()-a.velocity.prevTime)/2,a.velocity.y=(a.image.touchesCurrent.y-a.velocity.prevPositionY)/(Date.now()-a.velocity.prevTime)/2,Math.abs(a.image.touchesCurrent.x-a.velocity.prevPositionX)<2&&(a.velocity.x=0),Math.abs(a.image.touchesCurrent.y-a.velocity.prevPositionY)<2&&(a.velocity.y=0),a.velocity.prevPositionX=a.image.touchesCurrent.x,a.velocity.prevPositionY=a.image.touchesCurrent.y,a.velocity.prevTime=Date.now(),a.gesture.imageWrap.transform("translate3d("+a.image.currentX+"px, "+a.image.currentY+"px,0)")}}},onTouchEnd:function(e,a){var t=e.zoom;if(t.gesture.image&&0!==t.gesture.image.length){if(!t.image.isTouched||!t.image.isMoved)return t.image.isTouched=!1,void(t.image.isMoved=!1);t.image.isTouched=!1,t.image.isMoved=!1;var n=300,r=300,i=t.velocity.x*n,s=t.image.currentX+i,o=t.velocity.y*r,l=t.image.currentY+o;0!==t.velocity.x&&(n=Math.abs((s-t.image.currentX)/t.velocity.x)),0!==t.velocity.y&&(r=Math.abs((l-t.image.currentY)/t.velocity.y));var p=Math.max(n,r);t.image.currentX=s,t.image.currentY=l;var d=t.image.width*t.scale,c=t.image.height*t.scale;t.image.minX=Math.min(t.gesture.slideWidth/2-d/2,0),t.image.maxX=-t.image.minX,t.image.minY=Math.min(t.gesture.slideHeight/2-c/2,0),t.image.maxY=-t.image.minY,t.image.currentX=Math.max(Math.min(t.image.currentX,t.image.maxX),t.image.minX),t.image.currentY=Math.max(Math.min(t.image.currentY,t.image.maxY),t.image.minY),t.gesture.imageWrap.transition(p).transform("translate3d("+t.image.currentX+"px, "+t.image.currentY+"px,0)")}},onTransitionEnd:function(e){var a=e.zoom;a.gesture.slide&&e.previousIndex!==e.activeIndex&&(a.gesture.image.transform("translate3d(0,0,0) scale(1)"),a.gesture.imageWrap.transform("translate3d(0,0,0)"),a.gesture.slide=a.gesture.image=a.gesture.imageWrap=void 0,a.scale=a.currentScale=1)},toggleZoom:function(e,t){var n=e.zoom;if(n.gesture.slide||(n.gesture.slide=e.clickedSlide?a(e.clickedSlide):e.slides.eq(e.activeIndex),n.gesture.image=n.gesture.slide.find("img, svg, canvas"),n.gesture.imageWrap=n.gesture.image.parent("."+e.params.zoomContainerClass)),n.gesture.image&&0!==n.gesture.image.length){var r,i,s,o,l,p,d,c,u,m,f,h,g,v,b,w,C,y;"undefined"==typeof n.image.touchesStart.x&&t?(r="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,i="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(r=n.image.touchesStart.x,i=n.image.touchesStart.y),n.scale&&1!==n.scale?(n.scale=n.currentScale=1,n.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"),n.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"),n.gesture.slide=void 0):(n.scale=n.currentScale=n.gesture.imageWrap.attr("data-swiper-zoom")||e.params.zoomMax,t?(C=n.gesture.slide[0].offsetWidth,y=n.gesture.slide[0].offsetHeight,s=n.gesture.slide.offset().left,o=n.gesture.slide.offset().top,l=s+C/2-r,p=o+y/2-i,u=n.gesture.image[0].offsetWidth,m=n.gesture.image[0].offsetHeight,f=u*n.scale,h=m*n.scale,g=Math.min(C/2-f/2,0),v=Math.min(y/2-h/2,0),b=-g,w=-v,d=l*n.scale,c=p*n.scale,db&&(d=b),cw&&(c=w)):(d=0,c=0),n.gesture.imageWrap.transition(300).transform("translate3d("+d+"px, "+c+"px,0)"),n.gesture.image.transition(300).transform("translate3d(0,0,0) scale("+n.scale+")"))}},attachEvents:function(e){var t=e?"off":"on";if(b.params.zoom){var n=(b.slides,!("touchstart"!==b.touchEvents.start||!b.support.passiveListener||!b.params.passiveListeners)&&{passive:!0,capture:!1});b.support.gestures?(b.slides[t]("gesturestart",b.zoom.onGestureStart,n),b.slides[t]("gesturechange",b.zoom.onGestureChange,n),b.slides[t]("gestureend",b.zoom.onGestureEnd,n)):"touchstart"===b.touchEvents.start&&(b.slides[t](b.touchEvents.start,b.zoom.onGestureStart,n),b.slides[t](b.touchEvents.move,b.zoom.onGestureChange,n),b.slides[t](b.touchEvents.end,b.zoom.onGestureEnd,n)),b[t]("touchStart",b.zoom.onTouchStart),b.slides.each(function(e,n){a(n).find("."+b.params.zoomContainerClass).length>0&&a(n)[t](b.touchEvents.move,b.zoom.onTouchMove)}),b[t]("touchEnd",b.zoom.onTouchEnd),b[t]("transitionEnd",b.zoom.onTransitionEnd),b.params.zoomToggle&&b.on("doubleTap",b.zoom.toggleZoom)}},init:function(){b.zoom.attachEvents()},destroy:function(){b.zoom.attachEvents(!0)}},b._plugins=[];for(var N in b.plugins){var H=b.plugins[N](b,b.params[N]);H&&b._plugins.push(H)}return b.callPlugins=function(e){for(var a=0;a'),notify:function(e){var a=b.a11y.liveRegion;0!==a.length&&(a.html(""),a.html(e))},init:function(){b.params.nextButton&&b.nextButton&&b.nextButton.length>0&&(b.a11y.makeFocusable(b.nextButton),b.a11y.addRole(b.nextButton,"button"),b.a11y.addLabel(b.nextButton,b.params.nextSlideMessage)),b.params.prevButton&&b.prevButton&&b.prevButton.length>0&&(b.a11y.makeFocusable(b.prevButton),b.a11y.addRole(b.prevButton,"button"),b.a11y.addLabel(b.prevButton,b.params.prevSlideMessage)),a(b.container).append(b.a11y.liveRegion)},initPagination:function(){b.params.pagination&&b.params.paginationClickable&&b.bullets&&b.bullets.length&&b.bullets.each(function(){var e=a(this);b.a11y.makeFocusable(e),b.a11y.addRole(e,"button"),b.a11y.addLabel(e,b.params.paginationBulletMessage.replace(/{{index}}/,e.index()+1))})},destroy:function(){b.a11y.liveRegion&&b.a11y.liveRegion.length>0&&b.a11y.liveRegion.remove()}},b.init=function(){b.params.loop&&b.createLoop(),b.updateContainerSize(),b.updateSlidesSize(),b.updatePagination(),b.params.scrollbar&&b.scrollbar&&(b.scrollbar.set(),b.params.scrollbarDraggable&&b.scrollbar.enableDraggable()),"slide"!==b.params.effect&&b.effects[b.params.effect]&&(b.params.loop||b.updateProgress(),b.effects[b.params.effect].setTranslate()),b.params.loop?b.slideTo(b.params.initialSlide+b.loopedSlides,0,b.params.runCallbacksOnInit):(b.slideTo(b.params.initialSlide,0,b.params.runCallbacksOnInit),0===b.params.initialSlide&&(b.parallax&&b.params.parallax&&b.parallax.setTranslate(),b.lazy&&b.params.lazyLoading&&(b.lazy.load(),b.lazy.initialImageLoaded=!0))),b.attachEvents(),b.params.observer&&b.support.observer&&b.initObservers(),b.params.preloadImages&&!b.params.lazyLoading&&b.preloadImages(),b.params.zoom&&b.zoom&&b.zoom.init(),b.params.autoplay&&b.startAutoplay(),b.params.keyboardControl&&b.enableKeyboardControl&&b.enableKeyboardControl(),b.params.mousewheelControl&&b.enableMousewheelControl&&b.enableMousewheelControl(),b.params.hashnavReplaceState&&(b.params.replaceState=b.params.hashnavReplaceState),b.params.history&&b.history&&b.history.init(),b.params.hashnav&&b.hashnav&&b.hashnav.init(),b.params.a11y&&b.a11y&&b.a11y.init(),b.emit("onInit",b)},b.cleanupStyles=function(){b.container.removeClass(b.classNames.join(" ")).removeAttr("style"),b.wrapper.removeAttr("style"),b.slides&&b.slides.length&&b.slides.removeClass([b.params.slideVisibleClass,b.params.slideActiveClass,b.params.slideNextClass,b.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"),b.paginationContainer&&b.paginationContainer.length&&b.paginationContainer.removeClass(b.params.paginationHiddenClass),b.bullets&&b.bullets.length&&b.bullets.removeClass(b.params.bulletActiveClass),b.params.prevButton&&a(b.params.prevButton).removeClass(b.params.buttonDisabledClass),b.params.nextButton&&a(b.params.nextButton).removeClass(b.params.buttonDisabledClass),b.params.scrollbar&&b.scrollbar&&(b.scrollbar.track&&b.scrollbar.track.length&&b.scrollbar.track.removeAttr("style"),b.scrollbar.drag&&b.scrollbar.drag.length&&b.scrollbar.drag.removeAttr("style"))},b.destroy=function(e,a){b.detachEvents(),b.stopAutoplay(),b.params.scrollbar&&b.scrollbar&&b.params.scrollbarDraggable&&b.scrollbar.disableDraggable(),b.params.loop&&b.destroyLoop(),a&&b.cleanupStyles(),b.disconnectObservers(),b.params.zoom&&b.zoom&&b.zoom.destroy(),b.params.keyboardControl&&b.disableKeyboardControl&&b.disableKeyboardControl(),b.params.mousewheelControl&&b.disableMousewheelControl&&b.disableMousewheelControl(),b.params.a11y&&b.a11y&&b.a11y.destroy(),b.params.history&&!b.params.replaceState&&window.removeEventListener("popstate",b.history.setHistoryPopState),b.params.hashnav&&b.hashnav&&b.hashnav.destroy(),b.emit("onDestroy"),e!==!1&&(b=null)},b.init(),b}},Swiper.prototype={isSafari:function(){var e=navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isUiWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent),isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},browser:{ie:window.navigator.pointerEnabled||window.navigator.msPointerEnabled,ieTouch:window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>1||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>1,lteIE9:function(){var e=document.createElement("div");return e.innerHTML="",1===e.getElementsByTagName("i").length}()},device:function(){var e=navigator.userAgent,a=e.match(/(Android);?[\s\/]+([\d.]+)?/),t=e.match(/(iPad).*OS\s([\d_]+)/),n=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!t&&e.match(/(iPhone\sOS)\s([\d_]+)/);return{ios:t||r||n,android:a}}(),support:{touch:window.Modernizr&&Modernizr.touch===!0||function(){return!!("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)}(),transforms3d:window.Modernizr&&Modernizr.csstransforms3d===!0||function(){var e=document.createElement("div").style;return"webkitPerspective"in e||"MozPerspective"in e||"OPerspective"in e||"MsPerspective"in e||"perspective"in e}(),flexbox:function(){for(var e=document.createElement("div").style,a="alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "),t=0;t