web-apps/vendor/framework7/js/framework7.min.js

26 lines
303 KiB
JavaScript
Raw Normal View History

/**
* 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<i&&a.trigger("infinite");else if(t+r>=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:'<svg xmlns="http://www.w3.org/2000/svg" height="75" width="75" viewbox="0 0 75 75"><circle cx="37.5" cy="37.5" r="33.5" stroke-width="8"/></svg>',materialPreloaderHtml:'<span class="preloader-inner"><span class="preloader-inner-gap"></span><span class="preloader-inner-left"><span class="preloader-inner-half-circle"></span></span><span class="preloader-inner-right"><span class="preloader-inner-half-circle"></span></span></span>',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:
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.
"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('<div class="popover-angle"></div>'),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('<div class="modal-overlay"></div>'),0===o(".popup-overlay").length&&t&&i.root.append('<div class="popup-overlay"></div>'),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('<div class="picker-modal-overlay"></div>'),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
var W=i._compiledTemplates.smartSelectItem,j="";if(!C)for(var _=0;_<R.length;_++)j+=W(R[_]);var U,J,Q="",K="",Z="",$="";"picker"===c?(i._compiledTemplates.smartSelectToolbar||(i._compiledTemplates.smartSelectToolbar=l.compile(i.params.smartSelectToolbarTemplate||'<div class="toolbar {{#if toolbarTheme}}theme-{{toolbarTheme}}{{/if}}"><div class="toolbar-inner"><div class="left"></div><div class="right"><a href="#" class="link close-picker"><span>{{closeText}}</span></a></div></div></div>')),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||'<div class="navbar {{#if navbarTheme}}theme-{{navbarTheme}}{{/if}}"><div class="navbar-inner">{{leftTemplate}}<div class="center sliding">{{pageTitle}}</div></div></div>')),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?'<div class="left"><a href="#" class="link close-popup icon-only"><i class="icon icon-back"></i></a></div>':'<div class="left"><a href="#" class="link close-popup"><i class="icon icon-back"></i><span>{{closeText}}</span></a></div>')).replace(/{{closeText}}/g,u):(i.params.smartSelectBackTemplate||(x?'<div class="left"><a href="#" class="back link icon-only"><i class="icon icon-back"></i></a></div>':'<div class="left sliding"><a href="#" class="back link"><i class="icon icon-back"></i><span>{{backText}}</span></a></div>')).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='<form class="searchbar searchbar-init" data-search-list=".smart-select-list-'+V+'" data-search-in=".item-title"><div class="searchbar-input"><input type="search" placeholder="'+ee+'"><a href="#" class="searchbar-clear"></a></div>'+(x?"":'<a href="#" class="searchbar-cancel">'+ae+"</a>")+'</form><div class="searchbar-overlay"></div>',oe=("picker"!==c&&"through"===J?U:"")+'<div class="pages"> <div data-page="'+te+'" data-select-name="'+X+'" class="page smart-select-page '+K+" "+Z+" "+$+'">'+("picker"!==c&&"fixed"===J?U:"")+(ne?se:"")+' <div class="page-content">'+("picker"!==c&&"static"===J?U:"")+' <div class="list-block '+(C?"virtual-list":"")+" smart-select-list-"+V+" "+(v?"theme-"+v:"")+'"> <ul>'+(C?"":j)+" </ul> </div> </div> </div></div>";"popup"===c?(a?(re=o(".popup.smart-select-popup .view"),re.html(oe)):(re=i.popup('<div class="popup smart-select-popup smart-select-popup-'+q+'"><div class="view navbar-fixed">'+oe+"</div></div>"),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('<div class="picker-modal smart-select-picker smart-select-picker-'+q+'"'+(T?' style="height:'+T+'"':"")+">"+Q+'<div class="picker-modal-inner"><div class="view">'+oe+"</div></div></div>"),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.l
(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
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:'<div class="toolbar"><div class="toolbar-inner"><div class="left"></div><div class="right"><a href="#" class="link close-picker">{{closeText}}</a></div></div></div>'};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<p.cols.length;n++)p.cols[n]&&!p.cols[n].divider&&(p.cols[n].setValue(e[t],a),t++)},p.updateValue=function(e){for(var a=e||[],t=[],n=0;n<p.cols.length;n++)p.cols[n].divider||(a.push(p.cols[n].value),t.push(p.cols[n].displayValue));a.indexOf(void 0)>=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,I<v&&(I=v-Math.pow(v-I,.8),M="min"),I>b&&(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.t
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<x.length;a++)x[a].hooks&&e in x[a].hooks&&x[a].hooks[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])},i.pluginPrevent=function(e){for(var a=!1,t=0;t<x.length;t++)x[t].prevents&&e in x[t].prevents&&x[t].prevents[e](arguments[1],arguments[2],arguments[3],arguments[4],arguments[5])&&(a=!0);return a},i.pluginProcess=function(e,a){for(var t=a,n=0;n<x.length;n++)x[n].preprocess&&e in x[n].preprocess&&(t=x[n].preprocess[e](a,arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]));return t},i.init=function(){i.initTemplate7Templates&&i.initTemplate7Templates(),i.initPlugins&&i.initPlugins(),i.getDeviceInfo&&i.getDeviceInfo(),i.initFastClicks&&i.params.fastClicks&&i.initFastClicks(),i.initClickEvents&&i.initClickEvents(),o(".page:not(.cached)").each(function(){i.initPageWithCallback(this)}),o(".navbar:not(.cached)").each(function(){i.initNavbarWithCallback(this)}),i.initResize&&i.initResize(),i.initPushState&&i.params.pushState&&i.initPushState(),i.initSwipeout&&i.params.swipeout&&i.initSwipeout(),i.initSortable&&i.params.sortable&&i.initSortable(),i.initSwipePanels&&(i.params.swipePanel||i.params.swipePanelOnlyClose)&&i.initSwipePanels(),i.params.material&&i.initMaterialWatchInputs&&i.initMaterialWatchInputs(),i.params.onAppInit&&i.params.onAppInit(),i.pluginHook("appInit")},i.params.init&&i.init(),i};var e=function(){var e=function(e){var a=this,t=0;for(t=0;t<e.length;t++)a[t]=e[t];return a.length=e.length,this},a=function(a,t){var n=[],r=0;if(a&&!t&&a instanceof e)return a;if(a)if("string"==typeof a){var i,s,o;if(a=o=a.trim(),o.indexOf("<")>=0&&o.indexOf(">")>=0){var l="div";for(0===o.indexOf("<li")&&(l="ul"),0===o.indexOf("<tr")&&(l="tbody"),0!==o.indexOf("<td")&&0!==o.indexOf("<th")||(l="tr"),0===o.indexOf("<tbody")&&(l="table"),0===o.indexOf("<option")&&(l="select"),s=document.createElement(l),s.innerHTML=o,r=0;r<s.childNodes.length;r++)n.push(s.childNodes[r])}else for(i=t||"#"!==a[0]||a.match(/[ .<>:~]/)?(t||document).querySelectorAll(a):[document.getElementById(a.split("#")[1])],r=0;r<i.length;r++)i[r]&&n.push(i[r])}else if(a.nodeType||a===window||a===document)n.push(a);else if(a.length>0&&a[0].nodeType)for(r=0;r<a.length;r++)n.push(a[r]);return new e(n)};e.prototype={addClass:function(e){if("undefined"==typeof e)return this;for(var a=e.split(" "),t=0;t<a.length;t++)for(var n=0;n<this.length;n++)"undefined"!=typeof this[n].classList&&this[n].classList.add(a[t]);return this},removeClass:function(e){for(var a=e.split(" "),t=0;t<a.length;t++)for(var n=0;n<this.length;n++)"undefined"!=typeof this[n].classList&&this[n].classList.remove(a[t]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var a=e.split(" "),t=0;t<a.length;t++)for(var n=0;n<this.length;n++)"undefined"!=typeof this[n].classList&&this[n].classList.toggle(a[t]);return this},attr:function(e,a){if(1===arguments.length&&"s
for(r=1;r<l.length;r++){var m=l[r];e(m)?u[m[0]]="false"!==m[1]&&m[1]:c.push(m)}if(o.indexOf("{#")>=0){var f,h="",g="",v=0,b=!1,w=!1,C=0;for(r=t+1;r<s.length;r++)if(s[r].indexOf("{{#")>=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;s<n.length;s++){var o=n[s];0===o.indexOf("@")?s>0?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;n<e.length;n++)/^['"]/.test(e[n])?t.push(e[n]):/^(true|false|\d+)$/.test(e[n])?t.push(e[n]):t.push(i(e[n],a));return t.join(", ")}function o(e,a){if(a=a||1,e=e||l.template,"string"!=typeof e)throw new Error("Template7: Template must be a string");var o=r(e);if(0===o.length)return function(){return""};var p="ctx_"+a,d="";d+=1===a?"(function ("+p+", data, root) {\n":"(function ("+p+", data) {\n",1===a&&(d+="function isArray(arr){return Object.prototype.toString.apply(arr) === '[object Array]';}\n",d+="function isFunction(func){return (typeof func === 'function');}\n",d+='function c(val, ctx) {if (typeof val !== "undefined" && val !== null) {if (isFunction(val)) {return val.call(ctx);} else return val;} else return "";}\n',d+="root = root || ctx_1 || {};\n"),d+="var r = '';\n";var c;for(c=0;c<o.length;c++){var u=o[c];if("plain"!==u.type){var m,f;if("variable"===u.type&&(m=i(u.contextName,p),d+="r += c("+m+", "+p+");"),"helper"===u.type)if(u.helperName in l.helpers)f=s(u.contextName,p),d+="r += (Template7.helpers."+u.helperName+").call("+p+", "+(f&&f+", ")+"{hash:"+JSON.stringify(u.hash)+", data: data || {}, fn: "+t(u,a+1)+", inverse: "+n(u,a+1)+", root: root});";else{if(u.contextName.length>0)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
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;r<b.slides.length;r++)b.slides[r]===t&&(n=!0);if(!t||!n)return b.clickedSlide=void 0,void(b.clickedIndex=void 0);if(b.clickedSlide=t,b.clickedIndex=a(t).index(),b.params.slideToClickedSlide&&void 0!==b.clickedIndex&&b.clickedIndex!==b.activeIndex){var i,s=b.clickedIndex;if(b.params.loop){if(b.animating)return;i=a(b.clickedSlide).attr("data-swiper-slide-index"),b.params.centeredSlides?s<b.loopedSlides-b.params.slidesPerView/2||s>b.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.targetT
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;s<i.length;s++)i[s]!==a&&i[s]instanceof Swiper&&t(i[s]);else i instanceof Swiper&&a!==i&&t(i)},setTransition:function(e,a){function t(a){a.setWrapperTransition(e,b),0!==e&&(a.onTransitionStart(),a.wrapper.transitionEnd(function(){r&&(a.params.loop&&"slide"===b.params.controlBy&&a.fixLoop(),a.onTransitionEnd())}))}var n,r=b.params.control;if(b.isArray(r))for(n=0;n<r.length;n++)r[n]!==a&&r[n]instanceof Swiper&&t(r[n]);else r instanceof Swiper&&a!==r&&t(r)}},b.parallax={setTranslate:function(){b.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){p(this,b.progress)}),b.slides.each(function(){var e=a(this);e.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var a=Math.min(Math.max(e[0].progress,-1),1);p(this,a)})})},setTransition:function(e){"undefined"==typeof e&&(e=b.params.speed),b.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function(){var t=a(this),n=parseInt(t.attr("data-swiper-parallax-duration"),10)||e;0===e&&(n=0),t.transition(n)})}},b.zoom={scale:1,currentScale:1,isScaling:!1,gesture:{slide:void 0,slideWidth:void 0,slideHeight:void 0,image:void 0,imageWrap:void 0,zoomMax:b.params.zoomMax},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0},getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var a=e.targetTouches[0].pageX,t=e.targetTouches[0].pageY,n=e.targetTouches[1].pageX,r=e.targetTouches[1].pageY,i=Math.sqrt(Math.pow(n-a,2)+Math.pow(r-t,2));return i},onGestureStart:function(e){var t=b.zoom;if(!b.support.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;t.gesture.scaleStart=t.getDistanceBetweenTouches(e)}return t.gesture.slide&&t.gesture.slide.length||(t.gesture.slide=a(this),0===t.gesture.slide.length&&(t.gesture.slide=b.slides.eq(b.activeIndex)),t.gesture.image=t.gesture.slide.find("img, svg, canvas"),t.gesture.imageWrap=t.gesture.image.parent("."+b.params.zoomContainerClass),t.gesture.zoomMax=t.gesture.imageWrap.attr("data-swiper-zoom")||b.params.zoomMax,0!==t.gesture.imageWrap.length)?(t.gesture.image.transition(0),void(t.isScaling=!0)):void(t.gesture.image=void 0)},onGestureChange:function(e){var a=b.zoom;if(!b.support.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.gesture.scaleMove=a.getDistanceBetweenTouches(e)}a.gesture.image&&0!==a.gesture.image.length&&(b.support.gestures?a.scale=e.scale*a.currentScale:a.scale=a.gesture.scaleMove/a.gesture.scaleStart*a.currentScale,a.scale>a.gesture.zoomMax&&(a.scale=a.gesture.zoomMax-1+Math.pow(a.scale-a.gesture.zoomMax+1,.5)),a.scale<b.params.zoomMin&&(a.scale=b.params.zoomMin+1-Math.pow(b.params.zoomMin-a.scale+1,.5)),a
//# sourceMappingURL=framework7.min.js.map