(function framework7ComponentLoader(e,t){void 0===t&&(t=!0);var o=e.$,n=(e.Template7,e.utils),a=(e.getDevice,e.getSupport),i=e.Class,r=(e.Modal,e.ConstructorMethods),s=(e.ModalMethods,n.deleteProps),c=n.extend,l=n.nextTick,g=n.now;function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var f=function(e){var t,n;function i(t,n){var i;void 0===n&&(n={});var r=u(i=e.call(this,n,[t])||this),s=a(),f={};r.useModulesParams(f),r.params=c(f,n);var d=r.params.el;if(!d)return r||u(i);var h=o(d);if(0===h.length)return r||u(i);if(h[0].f7Toggle)return h[0].f7Toggle||u(i);var p,v=h.children('input[type="checkbox"]');c(r,{app:t,$el:h,el:h[0],$inputEl:v,inputEl:v[0],disabled:h.hasClass("disabled")||v.hasClass("disabled")||v.attr("disabled")||v[0].disabled}),Object.defineProperty(r,"checked",{enumerable:!0,configurable:!0,set:function(e){r&&void 0!==r.$inputEl&&r.checked!==e&&(v[0].checked=e,r.$inputEl.trigger("change"))},get:function(){return v[0].checked}}),h[0].f7Toggle=r;var m,b,y,T,E,M={};function k(e){p||r.disabled||(M.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,M.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY,b=0,p=!0,m=void 0,T=g(),E=r.checked,y=h[0].offsetWidth,l((function(){p&&h.addClass("toggle-active-state")})))}function $(e){if(p&&!r.disabled){var o,n="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,i=t.rtl?-1:1;if(void 0===m&&(m=!!(m||Math.abs(a-M.y)>Math.abs(n-M.x))),m)p=!1;else e.preventDefault(),(b=n-M.x)*i<0&&Math.abs(b)>y/3&&E&&(o=!0),b*i>0&&Math.abs(b)>y/3&&!E&&(o=!0),o&&(M.x=n,r.checked=!E,E=!E)}}function C(){if(!p||r.disabled)return m&&h.removeClass("toggle-active-state"),void(p=!1);var e,o=t.rtl?-1:1;p=!1,h.removeClass("toggle-active-state"),g()-T<300&&(b*o<0&&E&&(e=!0),b*o>0&&!E&&(e=!0),e&&(r.checked=!E))}function x(){r.$el.trigger("toggle:change"),r.emit("local::change toggleChange",r)}return r.attachEvents=function(){var e=!!s.passiveListener&&{passive:!0};h.on(t.touchEvents.start,k,e),t.on("touchmove",$),t.on("touchend:passive",C),r.$inputEl.on("change",x)},r.detachEvents=function(){var e=!!s.passiveListener&&{passive:!0};h.off(t.touchEvents.start,k,e),t.off("touchmove",$),t.off("touchend:passive",C),r.$inputEl.off("change",x)},r.useModules(),r.init(),i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.toggle=function(){this.checked=!this.checked},r.init=function(){this.attachEvents()},r.destroy=function(){var e=this;e.$el.trigger("toggle:beforedestroy"),e.emit("local::beforeDestroy toggleBeforeDestroy",e),delete e.$el[0].f7Toggle,e.detachEvents(),s(e),e=null},i}(i),d={name:"toggle",create:function(){this.toggle=r({defaultSelector:".toggle",constructor:f,app:this,domProp:"f7Toggle"})},static:{Toggle:f},on:{tabMounted:function(e){var t=this;o(e).find(".toggle-init").each((function(e){return t.toggle.create({el:e})}))},tabBeforeRemove:function(e){o(e).find(".toggle-init").each((function(e){e.f7Toggle&&e.f7Toggle.destroy()}))},pageInit:function(e){var t=this;e.$el.find(".toggle-init").each((function(e){return t.toggle.create({el:e})}))},pageBeforeRemove:function(e){e.$el.find(".toggle-init").each((function(e){e.f7Toggle&&e.f7Toggle.destroy()}))}},vnode:{"toggle-init":{insert:function(e){var t=e.elm;this.toggle.create({el:t})},destroy:function(e){var t=e.elm;t.f7Toggle&&t.f7Toggle.destroy()}}}};if(t){if(e.prototype.modules&&e.prototype.modules[d.name])return;e.use(d),e.instance&&(e.instance.useModuleParams(d,e.instance.params),e.instance.useModule(d))}return d}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
