(function framework7ComponentLoader(t,o){void 0===o&&(o=!0);document;var d=window,p=t.$,m=(t.Template7,t.utils),e=(t.device,t.support,t.Class,t.Modal),n=(t.ConstructorMethods,t.ModalMethods),s=function(u){function t(n,t){var o=m.extend({on:{}},n.params.toast,t);u.call(this,n,o);var s=this;s.app=n,s.params=o;var e,a,l=s.params,r=l.closeButton,c=l.closeTimeout;if(s.params.el)e=p(s.params.el);else{var i=s.render();e=p(i)}return e&&0<e.length&&e[0].f7Modal?e[0].f7Modal:0===e.length?s.destroy():(m.extend(s,{$el:e,el:e[0],type:"toast"}),e[0].f7Modal=s,r&&(e.find(".toast-button").on("click",function(){s.emit("local::closeButtonClick toastCloseButtonClick",s),s.close()}),s.on("beforeDestroy",function(){e.find(".toast-button").off("click")})),s.on("open",function(){p(".toast.modal-in").each(function(t,o){var e=n.toast.get(o);o!==s.el&&e&&e.close()}),c&&(a=m.nextTick(function(){s.close()},c))}),s.on("close",function(){d.clearTimeout(a)}),s.params.destroyOnClose&&s.once("closed",function(){setTimeout(function(){s.destroy()},0)}),s)}return u&&(t.__proto__=u),((t.prototype=Object.create(u&&u.prototype)).constructor=t).prototype.render=function(){var t=this,o=t.app;if(t.params.render)return t.params.render.call(t,t);var e=t.params,n=e.position,s=e.cssClass,a=e.icon,l=e.text,r=e.closeButton,c=e.closeButtonColor,i=e.closeButtonText;return('\n      <div class="toast toast-'+n+" "+(s||"")+" "+(a?"toast-with-icon":"")+'">\n        <div class="toast-content">\n          '+(a?'<div class="toast-icon">'+a+"</div>":"")+'\n          <div class="toast-text">'+l+"</div>\n          "+(r&&!a?('\n          <a class="toast-button '+("md"===o.theme?"button":"link")+" "+(c?"color-"+c:"")+'">'+i+"</a>\n          ").trim():"")+"\n        </div>\n      </div>\n    ").trim()},t}(e),a={name:"toast",static:{Toast:s},create:function(){var o=this;o.toast=m.extend({},n({app:o,constructor:s,defaultSelector:".toast.modal-in"}),{show:function(t){return m.extend(t,{destroyOnClose:!0}),new s(o,t).open()}})},params:{toast:{icon:null,text:null,position:"bottom",closeButton:!1,closeButtonColor:null,closeButtonText:"Ok",closeTimeout:null,cssClass:null,render:null}}};if(o){if(t.prototype.modules&&t.prototype.modules[a.name])return;t.use(a),t.instance&&(t.instance.useModuleParams(a,t.instance.params),t.instance.useModule(a))}return a}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))