(function framework7ComponentLoader(e,o){void 0===o&&(o=!0);document,window;var s=e.$,d=(e.Template7,e.utils),n=(e.device,e.support,e.Class,e.Modal,e.ConstructorMethods,e.ModalMethods,{toggleClicked:function(e){var o=e.closest(".accordion-item").eq(0);o.length||(o=e.parents("li").eq(0));var n=e.parents(".accordion-item-content").eq(0);n.length&&n.parents(o).length||1<e.parents("li").length&&e.parents("li")[0]!==o[0]||this.accordion.toggle(o)},open:function(e){var o=this,n=s(e),i=!1;function t(){i=!0}if(n.trigger("accordion:beforeopen",{prevent:t},t),o.emit("accordionBeforeOpen",n[0],t),!i){var c=n.parents(".accordion-list").eq(0),r=n.children(".accordion-item-content");if(r.removeAttr("aria-hidden"),0===r.length&&(r=n.find(".accordion-item-content")),0!==r.length){var a=0<c.length&&n.parent().children(".accordion-item-opened");0<a.length&&o.accordion.close(a),r.transitionEnd(function(){n.hasClass("accordion-item-opened")?(r.transition(0),r.css("height","auto"),d.nextFrame(function(){r.transition(""),n.trigger("accordion:opened"),o.emit("accordionOpened",n[0])})):(r.css("height",""),n.trigger("accordion:closed"),o.emit("accordionClosed",n[0]))}),r.css("height",r[0].scrollHeight+"px"),n.trigger("accordion:open"),n.addClass("accordion-item-opened"),o.emit("accordionOpen",n[0])}}},close:function(e){var o=this,n=s(e),i=!1;function t(){i=!0}if(n.trigger("accordion:beforeclose",{prevent:t},t),o.emit("accordionBeforeClose",n[0],t),!i){var c=n.children(".accordion-item-content");0===c.length&&(c=n.find(".accordion-item-content")),n.removeClass("accordion-item-opened"),c.attr("aria-hidden",!0),c.transition(0),c.css("height",c[0].scrollHeight+"px"),c.transitionEnd(function(){n.hasClass("accordion-item-opened")?(c.transition(0),c.css("height","auto"),d.nextFrame(function(){c.transition(""),n.trigger("accordion:opened"),o.emit("accordionOpened",n[0])})):(c.css("height",""),n.trigger("accordion:closed"),o.emit("accordionClosed",n[0]))}),d.nextFrame(function(){c.transition(""),c.css("height",""),n.trigger("accordion:close"),o.emit("accordionClose",n[0])})}},toggle:function(e){var o=s(e);0!==o.length&&(o.hasClass("accordion-item-opened")?this.accordion.close(e):this.accordion.open(e))}}),i={name:"accordion",create:function(){var e=this;d.extend(e,{accordion:{open:n.open.bind(e),close:n.close.bind(e),toggle:n.toggle.bind(e)}})},clicks:{".accordion-item .item-link, .accordion-item-toggle, .links-list.accordion-list > ul > li > a":function(e){n.toggleClicked.call(this,e)}}};if(o){if(e.prototype.modules&&e.prototype.modules[i.name])return;e.use(i),e.instance&&(e.instance.useModuleParams(i,e.instance.params),e.instance.useModule(i))}return i}(Framework7, typeof Framework7AutoInstallComponent === 'undefined' ? undefined : Framework7AutoInstallComponent))
