(function framework7ComponentLoader(e,t){void 0===t&&(t=!0);document,window;var h=e.$,c=(e.Template7,e.utils),o=(e.device,e.support,e.Class,e.Modal),s=(e.ConstructorMethods,e.ModalMethods),a=function(r){function e(e,t){var o=c.extend({on:{}},e.params.sheet,t);r.call(this,e,o);var p,s,i,d=this;if(d.params=o,(p=d.params.el?h(d.params.el):h(d.params.content))&&0<p.length&&p[0].f7Modal)return p[0].f7Modal;if(0===p.length)return d.destroy();function a(e){var t=e.target;0===h(t).closest(d.el).length&&(d.params.closeByBackdropClick&&d.params.backdrop&&d.backdropEl&&d.backdropEl===t?d.close():d.params.closeByOutsideClick&&d.close())}return d.params.backdrop&&0===(s=e.root.children(".sheet-backdrop")).length&&(s=h('<div class="sheet-backdrop"></div>'),e.root.append(s)),d.on("sheetOpen",function(){d.params.scrollToEl&&function(){var e=h(d.params.scrollToEl).eq(0);if(0!==e.length&&0!==(i=e.parents(".page-content")).length){var t,o=parseInt(i.css("padding-top"),10),s=parseInt(i.css("padding-bottom"),10),a=i[0].offsetHeight-o-p.height(),r=i[0].scrollHeight-o-p.height(),c=i.scrollTop(),l=e.offset().top-o+e[0].offsetHeight;if(a<l){var n=c+l-a;r<n+a&&(t=n+a-r+s,a===r&&(t=p.height()),i.css({"padding-bottom":t+"px"})),i.scrollTop(n,300)}}}()}),d.on("sheetOpened",function(){(d.params.closeByOutsideClick||d.params.closeByBackdropClick)&&e.on("click",a)}),d.on("sheetClose",function(){d.params.scrollToEl&&i&&0<i.length&&i.css({"padding-bottom":""}),(d.params.closeByOutsideClick||d.params.closeByBackdropClick)&&e.off("click",a)}),c.extend(d,{app:e,$el:p,el:p[0],$backdropEl:s,backdropEl:s&&s[0],type:"sheet"}),p[0].f7Modal=d}return r&&(e.__proto__=r),(e.prototype=Object.create(r&&r.prototype)).constructor=e}(o),r={name:"sheet",params:{sheet:{closeByBackdropClick:!0,closeByOutsideClick:!1}},static:{Sheet:a},create:function(){var e=this;e.passedParams.sheet&&void 0!==e.passedParams.sheet.backdrop||(e.params.sheet.backdrop="md"===e.theme),e.sheet=c.extend({},s({app:e,constructor:a,defaultSelector:".sheet-modal.modal-in"}))},clicks:{".sheet-open":function(e,t){void 0===t&&(t={});0<h(".sheet-modal.modal-in").length&&t.sheet&&h(t.sheet)[0]!==h(".sheet-modal.modal-in")[0]&&this.sheet.close(".sheet-modal.modal-in"),this.sheet.open(t.sheet,t.animate)},".sheet-close":function(e,t){void 0===t&&(t={});this.sheet.close(t.sheet,t.animate)}}};if(t){if(e.prototype.modules&&e.prototype.modules[r.name])return;e.use(r),e.instance&&(e.instance.useModuleParams(r,e.instance.params),e.instance.useModule(r))}return r}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))