
var Sitepackage,scrollTimer,changeTimer,isPagebrowserLoading,website;function GeneralUtility(){}function filterFunction(e){var t=e.closest(".dropdown-menu"),i=t.querySelector(".dropdown-search"),n=i.value.toUpperCase(),a=t.querySelectorAll("button"),o=t.querySelector(".icon-remove");if(console.log(i.dataset.widthset),i.dataset.widthset&&""!=i.dataset.widthset&&void 0!==i.dataset.widthset||(i.style.width=t.offsetWidth-30+"px",i.dataset.widthset="true"),t.querySelector("p")&&t.querySelector("p").remove(),n){o.classList.add("show");for(var r=!1,s=0;s<a.length;s++){-1<(a[s].textContent||a[s].innerText).toUpperCase().indexOf(n)?r=!(a[s].style.display=""):a[s].style.display="none"}r||t.insertAdjacentHTML("beforeend","<p>"+i.dataset.noresults+"</p>")}else{o.classList.remove("show");for(s=0;s<a.length;s++)a[s].style.display=""}}function Website(){this.loaderHtml='<div class="loading-animation-container d-flex justify-content-center"><div class="spinner-border" role="status"><span class="sr-only">Loading...</span></div></div>',this.loaderHtmlWizard='<div class="loading-animation-container loading-wizard"><div class="placeholder step"></div><div class="placeholder step"></div><div class="placeholder step"></div><div class="placeholder step"></div><div class="buttons"><div class="placeholder button"></div><div class="placeholder button"></div></div></div>',this.browserDimensions=GeneralUtility.getBrowserDimensions(),this.html=document.querySelector("html"),this.body=document.querySelector("body"),this.header=document.querySelector("header"),this.main=document.querySelector("main"),this.footer=document.querySelector("footer"),this.requestUserInfo(),this.initializeTouch(),this.initializePlugins(),this.initializeContentElements(),this.initializeExtensions(),this.scrollToAnchor(),this.initializeBootstrapComponents(),this.body.querySelector(".btn-print")&&this.body.querySelector(".btn-print").addEventListener("click",function(){window.print()})}(Sitepackage=Sitepackage||{Plugin:{Notification:{}}}).Plugin.Notification=function(){var e=function(e){var t,i,n=this;this.containers=e,this.actions={list:[]},this.listener={actionInitialized:[]},this.containers.forEach(function(e){if(t=e.querySelector('[data-action="list"]'))return i=new Sitepackage.Plugin.Notification.ListAction(n,e,t),n.actions.list.push(i),void n.dispatchEvent("actionInitialized",["list",i])})};return e.prototype.dispatchEvent=function(e,t){if(!this.listener.hasOwnProperty(e))throw new Error('Event "'+e+'" does not exist.');this.listener[e].forEach(function(e){e(t)})},e.prototype.getContainer=function(){return this.container},e}(),Sitepackage.Plugin.Notification.ListAction=function(){var e=function(e,t,i){var n=this;this.plugin=e,this.pluginContainer=t,this.container=i,t.querySelector("[data-notificationcount]").classList.add("d-none"),this.requestNotifications(n),setInterval(function(){n.requestNotifications(n)},6e4)};return e.prototype.requestNotifications=function(o){GeneralUtility.ajaxGetRequest(GeneralUtility.getAjaxUrl("notification-list"),function(e){var t=o.container.querySelector("[data-notificationlist]");t&&(t.innerHTML=e);var i=document.querySelectorAll('[data-dismiss="toast"]');i&&i.forEach(function(e){new Toast(e,{autohide:!1}).show(),e.closest(".toast").addEventListener("hidden.bs.toast",function(e){o.markNotificationAsRead(o,e.target.dataset.uid)},!1),e.closest(".toast").querySelector(".notification-close").addEventListener("click",function(e){o.markNotificationAsRead(o,e.target.closest(".toast").dataset.uid)},!1)});var n=o.container.querySelector("[data-notificationcount]"),a=o.container.querySelector("[data-total]");n&&a&&(n.innerHTML=a.dataset.total,0===parseInt(a.dataset.total)?n.classList.add("d-none"):n.classList.remove("d-none")),o.container.querySelectorAll('[data-toggle="tooltip"]')&&o.container.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)})})},e.prototype.markNotificationAsRead=function(e,t){var i=GeneralUtility.getAjaxUrl("notification-read");i=GeneralUtility.appendUrlParameter(i,"notificationId",t);var n=e.container.querySelector("#notification-"+t);anime({targets:n,opacity:0,duration:300,easing:"linear",complete:function(e){anime({targets:n,height:0,duration:300,easing:"linear",complete:function(e){n.remove()}})}});var a=e.container.querySelector("[data-notificationcount]");a.innerHTML=parseInt(a.innerHTML)-1,GeneralUtility.ajaxGetRequest(i,function(){0===parseInt(a.innerHTML)&&e.requestNotifications(e)})},e}(),(Sitepackage=Sitepackage||{Plugin:{Reservation:{}}}).Plugin.Reservation=function(){var e=function(e){var t,i,n=this;this.containers=e,this.actions={list:[],wizard:[],showcode:[],showoutdated:[]},this.listener={actionInitialized:[],newPageLoaded:[]},this.containers.forEach(function(e){return(t=e.querySelector('[data-action="list"]'))?(i=new Sitepackage.Plugin.Reservation.ListAction(n,e,t),n.actions.list.push(i),void n.dispatchEvent("actionInitialized",["list",i])):(t=e.querySelector('[data-action="wizard"]'))?(i=new Sitepackage.Plugin.Reservation.WizardAction(n,e,t),n.actions.wizard.push(i),void n.dispatchEvent("actionInitialized",["wizard",i])):(t=e.querySelector('[data-action="showcode"]'))?(i=new Sitepackage.Plugin.Reservation.ShowcodeAction(n,e,t),n.actions.showcode.push(i),void n.dispatchEvent("actionInitialized",["showcode",i])):(t=e.querySelector('[data-action="showoutdated"]'))?(i=new Sitepackage.Plugin.Reservation.ShowoutdatedAction(n,e,t),n.actions.showoutdated.push(i),void n.dispatchEvent("actionInitialized",["showoutdated",i])):void 0})};return e.prototype.dispatchEvent=function(e,t){if(!this.listener.hasOwnProperty(e))throw new Error('Event "'+e+'" does not exist.');this.listener[e].forEach(function(e){e(t)})},e.prototype.getContainer=function(){return this.container},e}(),Sitepackage.Plugin.Reservation.ListAction=function(){var e=function(e,t,i){var n=this;if(n.plugin=e,n.pluginContainer=t,n.container=i,n.container.dataset.url=n.container.dataset.url.replace(/[\?&]cHash=[^&]+/,""),n.showAllButton=n.container.querySelector('[data-action="show-all"]'),n.initializeDatePickers(),n.debitorSelect=n.container.querySelector(".debitor-select"),n.debitorSelect&&n.debitorSelect.querySelectorAll(".dropdown-item").forEach(function(e){e.addEventListener("click",function(e){return n.setActiveDebitor(e.target),n.applyFilter(),!1})}),n.showAllButton&&(n.showAllButton.addEventListener("click",function(e){return n.showAllButton.classList.contains("active")?(n.removeAllRecords(),n.updateCountInfo(),n.loadNewPage(0),n.showAllButton.classList.remove("active"),n.container.dataset.showall=0):n.container.dataset.shown===n.container.dataset.total||n.showAllButton.classList.contains("active")||(n.loadAllRecords(),n.showAllButton.classList.add("active"),n.container.dataset.showall=1),e.preventDefault(),e.stopPropagation(),!1}),("true"===n.container.dataset.showall||1==n.container.dataset.showall)&&parseInt(n.container.dataset.shown)<parseInt(n.container.dataset.total)&&n.loadAllRecords()),n.debitorSelect){var a=n.debitorSelect.querySelector(".dropdown-item.active");a||(a=n.debitorSelect.querySelector(".dropdown-item:first-child")),n.setActiveDebitor(a)}n.houseSelect=n.container.querySelector(".house-select"),n.houseSelect.querySelectorAll(".dropdown-item").forEach(function(e){e.addEventListener("click",function(e){return n.setActiveHouse(e.target),n.applyFilter(),!1})});var o=n.houseSelect.querySelector(".dropdown-item.active");o||(o=n.houseSelect.querySelector(".dropdown-item:first-child")),n.setActiveHouse(o),n.updateCountInfo(),n.initializeEvents(),GeneralUtility.initializeDropdownSearch(),window.addEventListener("scroll",function(){scrollTimer&&window.clearTimeout(scrollTimer),scrollTimer=window.setTimeout(function(){!isPagebrowserLoading&&n.container.dataset.hasnextpage&&GeneralUtility.isElementInViewport(document.getElementById("footer"),500)&&n.loadNewPage(parseInt(n.container.dataset.currentpage)+1)},200)},!1)};return e.prototype.initializeDatePickers=function(){var t=this,e=document.getElementById("date-filter"),i="de";1===parseInt(Globals.languageId)&&(i="en");var n=new DateRangePicker(e,{autohide:!0,language:i,buttonClass:"btn",defaultViewDate:new Date,allowOneSidedRange:!0,format:Globals.dateFormat,prevArrow:'<img src="/typo3conf/ext/sitepackage/Resources/Public/Images/icon-arrow-left.svg" />',nextArrow:'<img src="/typo3conf/ext/sitepackage/Resources/Public/Images/icon-arrow-right.svg" />',beforeShowDay:function(e){return{enabled:!0,content:'<span class="day-cell-content">'+e.getDate()+"</span>"}},inputs:[document.getElementById("show-date-from"),document.getElementById("show-date-to")]}),a=document.getElementById("show-date-from");a.addEventListener("focus",function(e){this.parentElement.classList.add("focus")}),a.addEventListener("blur",function(e){this.parentElement.classList.remove("focus")}),a.addEventListener("changeDate",function(e){changeTimer&&window.clearTimeout(changeTimer),changeTimer=window.setTimeout(function(){t.applyFilter()},200)}),(a=document.getElementById("show-date-to")).addEventListener("focus",function(e){this.parentElement.classList.add("focus")}),a.addEventListener("blur",function(e){this.parentElement.classList.remove("focus")}),a.addEventListener("changeDate",function(e){changeTimer&&window.clearTimeout(changeTimer),changeTimer=window.setTimeout(function(){t.applyFilter()},200)}),GeneralUtility.addDatepickerCloseButton(n.datepickers)},e.prototype.initializeEvents=function(){var i=this,e=function(e){document.getElementById("modal-reservation").querySelector(".modal-body").dataset.reservationid="",document.getElementById("btn-new-reservation").Modal.show()},t=function(e){var t=e.target.closest(".booking-item").dataset.uid;t&&(document.getElementById("modal-reservation").querySelector(".modal-body").dataset.reservationid=t,document.getElementById("btn-new-reservation").Modal.show())},n=function(e){var t=e.target.closest(".booking-item").dataset.uid;t&&(document.getElementById("modal-reservation-code").querySelector(".modal-body").dataset.reservationid=t)};document.getElementById("btn-new-reservation")&&(document.getElementById("btn-new-reservation").removeEventListener("click",e),document.getElementById("btn-new-reservation").addEventListener("click",e)),document.getElementById("btn-new-reservation-list")&&(document.getElementById("btn-new-reservation-list").removeEventListener("click",e),document.getElementById("btn-new-reservation-list").addEventListener("click",e));var a=document.getElementById("btn-reset-house");if(a){var o=function(e){i.container.querySelector('[data-field="house"]').value=0,i.applyFilter()};a.removeEventListener("click",o),a.addEventListener("click",o)}var r=document.getElementById("btn-reset-search");if(r){var s=function(e){i.container.querySelector('[data-field="search"]').value="",i.applyFilter()};r.removeEventListener("click",s),r.addEventListener("click",s)}i.container.querySelectorAll(".booking-item .cardbg a").forEach(function(e){e.removeEventListener("click",t),e.addEventListener("click",t)}),i.container.querySelectorAll(".booking-item .btn-code").forEach(function(e){e.removeEventListener("click",n),e.addEventListener("click",n)}),i.container.querySelectorAll(".booking-item").forEach(function(t){t.removeEventListener("mouseover",function(e){i.highlightSameReservation(t.dataset.uid)}),t.addEventListener("mouseover",function(e){i.highlightSameReservation(t.dataset.uid)}),t.removeEventListener("mouseout",function(e){i.unHighlightSameReservation(t.dataset.uid)}),t.addEventListener("mouseout",function(e){i.unHighlightSameReservation(t.dataset.uid)})})},e.prototype.highlightSameReservation=function(e){this.container.querySelectorAll('.booking-item[data-uid="'+e+'"]').forEach(function(e){e.querySelector(".cardbg").classList.add("hover")})},e.prototype.unHighlightSameReservation=function(e){this.container.querySelectorAll('.booking-item[data-uid="'+e+'"]').forEach(function(e){e.querySelector(".cardbg").classList.remove("hover")})},e.prototype.removeAllRecords=function(){this.container.querySelector(".booking-list").innerHTML=""},e.prototype.loadAllRecords=function(){var e=this;e.showAllButton.dataset.originalText=e.showAllButton.innerHTML,e.showAllButton.innerHTML="loading ...",e.container.dataset.hasnextpage&&e.loadNewPage(parseInt(e.container.dataset.currentpage)+1),e.plugin.listener.newPageLoaded.push(function(){"true"!==e.container.dataset.showall&&1!=e.container.dataset.showall||(parseInt(e.container.dataset.shown)<parseInt(e.container.dataset.total)&&e.container.dataset.hasnextpage?e.loadNewPage(parseInt(e.container.dataset.currentpage)+1):e.showAllButton.innerHTML=e.showAllButton.dataset.originalText)})},e.prototype.loadNewPage=function(d){if(!isPagebrowserLoading){var u=this,e=u.container.dataset.url;isPagebrowserLoading=!0,d=parseInt(d),isNaN(d)&&(d=0),e=GeneralUtility.appendUrlParameter(e,"p",d),e=GeneralUtility.appendUrlParameter(e,"type","6012"),GeneralUtility.ajaxGetRequest(e,function(e){if(e){var t=document.createElement("temp");t.innerHTML=e;var i=u.container.querySelectorAll(".booking-dategroup");if(i){var n=i[i.length-1],a=t.querySelectorAll(".booking-dategroup")[0];if(n&&a&&n.dataset.date===a.dataset.date){for(var o=a.querySelectorAll(".booking-item"),r=document.createDocumentFragment(),s=o.length,l=0;l<s;l++)r.appendChild(o[l]);n.append(r),a.remove()}}r=document.createDocumentFragment();var c=t.querySelectorAll(".booking-dategroup");for(s=c.length,l=0;l<s;l++)r.appendChild(c[l]);u.container.querySelector(".booking-list").append(r),u.updateCountInfo(),u.initializeEvents(),u.container.dataset.currentpage=d,u.container.dataset.hasnextpage=t.querySelector(".new-items-content").dataset.hasnextpage,isPagebrowserLoading=!1,u.plugin.dispatchEvent("newPageLoaded",[])}})}},e.prototype.updateCountInfo=function(){var e=this.container.querySelectorAll(".booking-item").length,t=parseInt(this.container.dataset.total);document.getElementById("shown-count").innerHTML=e!==t?e+" / ":"",this.container.dataset.shown=e},e.prototype.setActiveDebitor=function(e){if(this.debitorSelect.querySelectorAll(".dropdown-item").forEach(function(e){e.classList.remove("active")}),e){e.classList.add("active"),this.debitorSelect.dataset.selected=e.dataset.id;var t=e.dataset.name;0<parseInt(e.dataset.id)&&(t='<span class="d-none d-md-inline">'+e.dataset.name+"("+e.dataset.id+')<span><span class="d-inline d-md-none">'+e.dataset.id+"</span>"),this.debitorSelect.querySelector(".dropdown-label").innerHTML=t,this.container.querySelector('[data-field="debitor"]').value=e.dataset.id}},e.prototype.setActiveHouse=function(e){if(this.houseSelect.querySelectorAll(".dropdown-item").forEach(function(e){e.classList.remove("active")}),e){e.classList.add("active"),this.houseSelect.dataset.selected=e.dataset.id;var t=e.dataset.name;this.houseSelect.querySelector(".dropdown-label").innerHTML=t,this.container.querySelector('[data-field="house"]').value=e.dataset.id}},e.prototype.applyFilter=function(){var e=document.getElementById("show-date-from").value;this.container.querySelector('[data-datefield="from"]').value=e;var t=document.getElementById("show-date-to").value;this.container.querySelector('[data-datefield="to"]').value=t,document.getElementById("search-filter").submit()},e}(),Sitepackage.Plugin.Reservation.ShowcodeAction=function(e,t,i){this.plugin=e,this.pluginContainer=t,this.container=i;var n=JSON.parse(this.pluginContainer.querySelector(".values-json").innerHTML.trim()),a=document.getElementById("modal-reservation-code-title");n&&(a.querySelector(".reservation-id").innerHTML=n.reservationId),a.classList.remove("d-none"),document.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)})},Sitepackage.Plugin.Reservation.ShowoutdatedAction=function(e,t,i){var n=this;n.plugin=e,n.pluginContainer=t,n.container=i;var a=document.getElementById("modal-reservation-title");a.innerHTML=n.pluginContainer.dataset.edittitle,a.classList.remove("d-none"),document.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)}),n.container.closest(".modal-body").querySelector(".loading-animation-container").remove(),n.container.closest(".modal-content").querySelector(".modal-footer").classList.add("d-none")},Sitepackage.Plugin.Reservation.WizardAction=function(){var e=function(e,t,i){var n=this;n.plugin=e,n.pluginContainer=t,n.container=i,n.errorContainer=document.getElementById("wizard-error-container"),n.isInitialLoading=!0,document.getElementById("modal-reservation").querySelector(".voucher-alert").classList.remove("show"),n.listener={stepInitialized:[],stepValidated:[],stepCompleted:[],ticketChanged:[],allStepsInitialized:[]},n.mode="new";var a=JSON.parse(n.pluginContainer.querySelector(".values-json").innerHTML.trim()),o=document.getElementById("modal-reservation-title");a?(n.mode="edit",n.setCurrentValues(a),o.innerHTML=n.pluginContainer.dataset.edittitle):o.innerHTML=n.pluginContainer.dataset.originaltitle,o.classList.remove("d-none"),n.container.closest(".modal-content").querySelector(".modal-footer").classList.remove("d-none"),n.errorBadgeTemplate=n.pluginContainer.querySelector(".error-badge-template").innerHTML,n.products=JSON.parse(n.pluginContainer.querySelector(".products-json").innerHTML.trim()),n.timeslotTickets=JSON.parse(n.pluginContainer.querySelector(".timeslots-json").innerHTML.trim()),n.accordion=document.getElementById("modal-reservation-steps"),n.initializeSubmitButton(),n.cancelButton=n.container.closest(".modal-dialog").querySelector(".btn-cancel-reservation"),"edit"===n.mode?n.initializeCancelButton():n.cancelButton.classList.add("d-none"),n.container.closest(".modal-body").querySelector(".loading-animation-container").remove(),n.initializeSteps(),n.initializeCollapseElements(),n.toggleStateOfSubmitButton()};return e.prototype.getIndexOfCard=function(e){return Array.prototype.slice.call(this.accordion.children).indexOf(e)},e.prototype.initializeCancelButton=function(){var i=this;i.cancelButton.classList.remove("d-none"),i.cancelButton.addEventListener("click",function(e){Swal.fire({title:TYPO3.lang.cancelConfirmText,icon:"warning",showDenyButton:!1,showCancelButton:!0,confirmButtonText:TYPO3.lang.yes,cancelButtonText:TYPO3.lang.no,buttonsStyling:!1,customClass:{title:"text-center",confirmButton:"btn btn-primary mr-4",cancelButton:"btn btn-outline-secondary"}}).then(function(e){if(e.isConfirmed){i.cancelButton.classList.add("downloading"),i.errorContainer.classList.add("d-none");var t=GeneralUtility.getAjaxUrl("cancel");t=GeneralUtility.appendUrlParameter(t,"reservationId",i.container.closest(".modal-body").dataset.reservationid),GeneralUtility.ajaxGetRequest(t,function(e){if(i.cancelButton.classList.remove("downloading"),e){var t=JSON.parse(e);"error"!==t.status?(i.cancelButton.classList.add("downloaded"),i.cancelButton.querySelector(".trigger").classList.add("drawn"),setTimeout(function(){document.location.reload()},1e3)):i.showGlobalError(t.message,t.reservationId)}else i.showGlobalError("Storno fehlgeschlagen")})}})})},e.prototype.initializeSubmitButton=function(){var l=this;l.submitButton=l.container.closest(".modal-dialog").querySelector(".btn-save-reservation-enabled"),l.submitButtonDisabled=l.container.closest(".modal-dialog").querySelector(".btn-save-reservation-disabled"),l.submitButton.addEventListener("click",function(e){l.submitButton.classList.add("downloading"),l.errorContainer.classList.add("d-none");var t=l.getCurrentValue("timeslots"),i={};for(var n in t)l.accordion.querySelector('.card[data-timeslot="'+n+'"]')&&(i[n]=t[n]);l.setCurrentValue("timeslots",i);var a=l.getCurrentValue("variants"),o={};for(var r in a)l.accordion.querySelector('input[data-id="'+r+'"]')&&(o[r]=a[r]);l.setCurrentValue("variants",o);var s=GeneralUtility.getAjaxUrl("wizard-save");GeneralUtility.ajaxPostRequest(s,JSON.stringify(l.getCurrentValues()),"application/json",function(e){if(l.submitButton.classList.remove("downloading"),e){var t=JSON.parse(e);"error"!==t.status?(l.submitButton.classList.add("downloaded"),l.submitButton.querySelector(".trigger").classList.add("drawn"),setTimeout(function(){document.location.reload()},1e3)):l.showGlobalError(t.message,t.reservationId)}else l.showGlobalError("Speichern fehlgeschlagen")},function(e){l.showGlobalError("Speichern fehlgeschlagen: "+e)})})},e.prototype.initializeCollapseElements=function(){var t=this;t.accordion.querySelectorAll('[data-toggle="collapse"]').forEach(function(e){t.initializeCollapseElement(e)}),"new"===t.mode&&setTimeout(function(){t.accordion.querySelectorAll('[data-toggle="collapse"]')[0].click()},1e3)},e.prototype.initializeCollapseElement=function(e){var n=this;new Collapse(e,{parent:n.accordion}),n.accordion.querySelector(e.getAttribute("href")).addEventListener("show.bs.collapse",function(e){var t=e.target.closest(".card"),i=n.getIndexOfCard(t);t.classList.add("card-active"),n.steps[i].initialize()}),n.accordion.querySelector(e.getAttribute("href")).addEventListener("hide.bs.collapse",function(e){var t=e.target.closest(".card"),i=n.getIndexOfCard(t);n.steps[i].hasData()&&(n.steps[i].updateHasDataHeader(),n.steps[i].showHasDataHeader()),n.steps[i].validateStep()?n.steps[i].preSubmit(function(){t.classList.remove("card-error"),t.classList.remove("card-active");var e=t.nextElementSibling;e&&e.querySelector('[data-toggle="collapse"]').click()}):t.classList.add("card-error")})},e.prototype.toggleStateOfSubmitButton=function(){var e=this,t=!0;e.steps.forEach(function(e){e.getValidState()||(t=!1)}),t?(e.submitButtonDisabled.classList.add("d-none"),e.submitButton.classList.remove("d-none")):(e.submitButton.classList.add("d-none"),e.submitButtonDisabled.classList.remove("d-none"))},e.prototype.initializeSteps=function(){var n=this;n.steps=[];var t=[],a=0;n.accordion.querySelectorAll(":scope > *").forEach(function(e){t.push(new Promise(function(t,i){n.initializeStep(e,a,function(e){0===e?t():i()})})),a++}),Promise.all(t).then(function(){n.dispatchEvent("allStepsInitialized"),n.isInitialLoading=!1})},e.prototype.removeStep=function(e){this.steps.splice(e,1)},e.prototype.initializeStep=function(t,i,n){var a=this,e=t.dataset.stepaction,o=null;switch(e){case"date-selection":o=new Sitepackage.Plugin.Reservation.WizardStepDateSelectionAction(a,a.container,t);break;case"ticket-selection":o=new Sitepackage.Plugin.Reservation.WizardStepTicketSelectionAction(a,a.container,t);break;case"group-info":o=new Sitepackage.Plugin.Reservation.WizardStepGroupInfoAction(a,a.container,t);break;case"reservation-info":o=new Sitepackage.Plugin.Reservation.WizardStepReservationInfoAction(a,a.container,t)}o?o.initialize(function(){a.steps.splice(i,0,o);var e=t.querySelector(".btn-next");e&&e.addEventListener("click",function(e){return e.target.closest(".card").querySelector('[data-toggle="collapse"]').click(),!1}),a.dispatchEvent("stepInitialized",[i,o]),n&&"function"==typeof n&&n(0)}):(console&&console.error("Invalid action: "+e),n&&"function"==typeof n&&n(1))},e.prototype.showVoucherInfo=function(){var e=document.getElementById("modal-reservation").querySelector(".voucher-alert");this.isInitialLoading||"new"===this.mode?e.classList.remove("show"):e.classList.add("show")},e.prototype.getCurrentValues=function(){return this.currentValues||(this.currentValues={}),this.currentValues},e.prototype.setCurrentValues=function(e){this.currentValues!==e&&(this.currentValues=e)},e.prototype.getCurrentValue=function(e){return this.currentValues||(this.currentValues={}),this.currentValues[e]},e.prototype.setCurrentValue=function(e,t){var i=JSON.parse(JSON.stringify(this.currentValues));i.sendEmail="",i.email="";var n=JSON.stringify(i);this.currentValues||(this.currentValues={}),this.currentValues[e]!==t&&(this.currentValues[e]=t),(i=JSON.parse(JSON.stringify(this.currentValues))).sendEmail="",i.email="",n!==JSON.stringify(i)&&this.showVoucherInfo()},e.prototype.dispatchEvent=function(e,t){if(!this.listener.hasOwnProperty(e))throw new Error('Event "'+e+'" does not exist.');this.listener[e].forEach(function(e){e(t)})},e.prototype.showGlobalError=function(e,t){var i=this;i.errorContainer.innerHTML=e,i.errorContainer.classList.remove("d-none"),i.errorContainer.classList.remove("shake"),anime({targets:document.getElementById("modal-reservation"),scrollTop:0,duration:500,easing:"easeInOutQuad",complete:function(){i.errorContainer.classList.add("shake")}}),t&&i.setCurrentValue("reservationId",t)},e.prototype.showError=function(e,t){var i=this,n='[data-field-value="'+e+'"]';if(0<e.indexOf("|")){var a=e.split("|");n='[data-timeslot="'+a[0]+'"] [data-field-value="'+a[1]+'"]'}this.accordion.querySelectorAll(n).forEach(function(e){e.classList.add("card-error-detail"),e.querySelector(".badge-error")||(e.innerHTML+=i.errorBadgeTemplate),e.querySelector(".badge-error").setAttribute("title",t)}),this.accordion.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)})},e.prototype.removeError=function(e){var t='[data-field-value="'+e+'"]';if(0<e.indexOf("|")){var i=e.split("|");t='[data-timeslot="'+i[0]+'"] [data-field-value="'+i[1]+'"]'}this.accordion.querySelectorAll(t).forEach(function(e){e.classList.remove("card-error-detail")})},e}(),Sitepackage.Plugin.Reservation.WizardStepDateSelectionAction=function(){var e=function(e,t,i){var n=this;n.plugin=e,n.pluginContainer=t,n.container=i,n.submitContainer=n.container.querySelector(".submit-row"),n.contentContainer=n.container.querySelector(".step-content"),this.reservationDataTemplate=this.container.querySelector(".reservation-data").cloneNode(!0),this.reservationDataTemplate.classList.remove("reservation-data"),n.lastSuggestedDate=new Date,n.templates={dateSelection:n.container.querySelector(".template-date-selection"),dateSelectionDropdown:n.container.querySelector(".template-date-selection-dropdown"),timeSelection:n.container.querySelector(".template-time-selection"),errorTimeslot:n.container.querySelector(".template-error-timeslot")},n.plugin.listener.ticketChanged.push(function(){n.plugin.timeslotData&&"1"===n.container.dataset.dirty&&n.initialize()})};return e.prototype.initialize=function(e){var t=this,i=t.plugin.getCurrentValues();t.initialTimeslot={},i.timeslots&&i.timeslots[t.container.dataset.timeslot]&&(i=i.timeslots[t.container.dataset.timeslot],t.initialTimeslot={date:i.date,time:i.time}),t.hideHasDataHeader();var n=t.container.dataset.timeslot;if(n&&t.plugin.timeslotData&&"1"===t.container.dataset.dirty)if(t.container.dataset.dirty="0",t.timeslotData=t.plugin.timeslotData[n],t.timeslotData&&0<Object.keys(t.timeslotData).length){t.contentContainer.innerHTML=t.templates.dateSelection.innerHTML,t.initializeDatepicker(t.timeslotData),t.nextPossibleButton=t.contentContainer.querySelector(".btn-next-date"),t.nextPossibleButton.classList.remove("d-none"),t.initializeNextPossibleButton(),t.initializeManualTimeInput();t.plugin.getCurrentValue("ticket");var a=n.split("-");t.container.dataset.timeslottitle=t.plugin.timeslotTickets[a[0]],t.fillTimeslotTitle()}else t.showErrorMessage("errorTimeslot");t.prefill(function(){t.validateStep(),e&&"function"==typeof e&&e()})},e.prototype.isOpen=function(){return this.container.classList.contains("card-active")},e.prototype.prefill=function(e){var t=this,i=t.plugin.getCurrentValues();i.timeslots&&i.timeslots[t.container.dataset.timeslot]&&(i=i.timeslots[t.container.dataset.timeslot]),t.updateHasDataHeader(),t.hasData()&&!t.isOpen()&&t.showHasDataHeader(),i.date&&(this.contentContainer.querySelector(".ts-date")&&(this.contentContainer.querySelector(".ts-date").value=this.convertToLocaleFormat(i.date)),t.renderTimeslots(i.date,function(){if(i.time){var e=t.contentContainer.querySelector('.ts-btn[data-time="'+i.time+'"]');e&&e.classList.add("active")}})),e&&"function"==typeof e&&e()},e.prototype.initializeNextPossibleButton=function(){var c=this,e=c.contentContainer.querySelector(".btn-next-date");if(e){var t=function(e){var t=new Date;c.lastSuggestedDate&&(t=c.lastSuggestedDate);var n=c.plugin.getCurrentValues().persons,a=0,o=0,r=null;if(c.timeslotData)for(var s in c.timeslotData)if(c.timeslotData.hasOwnProperty(s)){var l=s.split("-");if(t<new Date(l[0],l[1],l[2],0,0))c.timeslotData[s].forEach(function(e){var t=e.time.split(":"),i=new Date(l[0],l[1],l[2],t[0],t[1]);0===a&&0===o&&e.free>=n&&(r=i,a=s,o=e.time)})}if(a&&o){c.setCurrentDate(a),c.setCurrentTime(o),c.lastSuggestedDate=r;var i=c.contentContainer.querySelector(".ts-time");i&&(i.value=o),c.prefill(function(){c.validateStep()})}};e.removeEventListener("click",t),e.addEventListener("click",t)}},e.prototype.initializeManualTimeInput=function(){var n=this,a=n.contentContainer.querySelector(".ts-time");if(a){var e=function(e){var t=a.value;if(0<t.trim().length){n.setCurrentTime(t);var i=n.contentContainer.querySelector('.ts-btn[data-time="'+t+'"]');n.container.querySelectorAll(".ts-btn").forEach(function(e){e.classList.remove("active")}),i&&i.classList.add("active")}};a.removeEventListener("blur",e),a.addEventListener("blur",e)}},e.prototype.convertToLocaleFormat=function(e){var t=e.split("-");return parseInt(t[1])<10&&1===t[1].length&&(t[1]="0"+t[1]),parseInt(t[2])<10&&1===t[2].length&&(t[2]="0"+t[2]),1===parseInt(Globals.languageId)?t[0]+"/"+t[1]+"/"+t[2]:t[2]+"."+t[1]+"."+t[0]},e.prototype.initializeDatepicker=function(d){var n=this,e=this.contentContainer.querySelector(".ts-date"),t=Object.keys(d)[0],i=Date.parse(t),a=new Date;i<a&&(t=a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate());var o=Object.keys(d).pop();Date.parse(o)<a&&(o=a.getFullYear()+"-"+(a.getMonth()+1)+"-"+a.getDate()),t=this.convertToLocaleFormat(t),o=this.convertToLocaleFormat(o);var r="de";1===parseInt(Globals.languageId)&&(r="en");var s=t,l=n.plugin.getCurrentValues();l.timeslots&&l.timeslots[n.container.dataset.timeslot]&&(l=l.timeslots[n.container.dataset.timeslot]).date&&(s=n.convertToLocaleFormat(l.date));var c=new Datepicker(e,{autohide:!0,buttonClass:"btn",format:Globals.dateFormat,language:r,prevArrow:'<img src="/typo3conf/ext/sitepackage/Resources/Public/Images/icon-arrow-left.svg" />',nextArrow:'<img src="/typo3conf/ext/sitepackage/Resources/Public/Images/icon-arrow-right.svg" />',minDate:t,maxDate:o,defaultViewDate:s,beforeShowDay:function(e){var t,i,n=e.getDate();n<10&&(n="0"+n);var a=e.getMonth()+1;a<10&&(a="0"+a);var o=e.getFullYear()+"-"+a+"-"+n,r=0;if(d.hasOwnProperty(o))for(var s=d[o].length,l=0;l<s;l++)0<d[o][l].free&&r++;var c=new Date;return t=!0,c.setHours(0,0,0,0),i="",c<e?0===r?t=!1:i+=r<=2?" status2":" status1":t=!1,{enabled:t,content:'<span class="day-cell-content '+i+'">'+e.getDate()+"</span>"}}});e.addEventListener("changeDate",function(e){var t=e.detail.date,i=Datepicker.formatDate(t,"yyyy-mm-dd");i!=n.getCurrentDate()&&(n.setCurrentDate(i),n.setCurrentTime(""),n.renderTimeslots(i,function(){n.submitContainer.classList.remove("d-none")}))}),GeneralUtility.addDatepickerCloseButton([c])},e.prototype.renderTimeslots=function(i,e){var n=this,t=n.timeslotData[i],a=n.plugin.getCurrentValues();if(t){this.contentContainer.querySelector(".time-selection").innerHTML=this.templates.timeSelection.innerHTML,n.container.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)});var o="",r=n.contentContainer.querySelector(".ts-time"),s=!1;r&&(s=!0),t.forEach(function(e){var t="btn ts-btn";e.time===n.initialTimeslot.time&&i===n.initialTimeslot.date?(s&&(t+=" ts-btn-status1"),o+="<li>",o+='<button type="button" class="'+t+'"',o+='data-free="'+e.free+'"',o+='data-time="'+e.time+'"',o+=">"+e.time+"</button>"):e.free<=0?(s&&(t+=" ts-btn-status3"),o+="<li>",o+='<button type="button" class="'+t+'"',o+='data-free="'+e.free+'"',o+='data-time="'+e.time+'"',o+="disabled>"+e.time+"</button>"):e.free<a.persons?(s&&(t+=" ts-btn-status2"),o+="<li>",o+='<button type="button" class="'+t+'"',o+='data-free="'+e.free+'"',o+='data-time="'+e.time+'"',o+="disabled>"+e.time+'<span class="ts-amount">'+e.free+"*</span></button>"):(s&&(t+=" ts-btn-status1"),o+="<li>",o+='<button type="button" class="'+t+'"',o+='data-free="'+e.free+'"',o+='data-time="'+e.time+'"',o+=">"+e.time+"</button>"),o+="</li>"}),this.contentContainer.querySelector(".card-times UL").innerHTML=o,n.container.querySelectorAll(".ts-btn").forEach(function(i){i.addEventListener("click",function(e){n.container.querySelectorAll(".ts-btn").forEach(function(e){e.classList.remove("active")}),i.classList.add("active"),n.setCurrentTime(i.dataset.time);var t=n.contentContainer.querySelector(".ts-time");t&&(t.value=i.dataset.time),n.updateHasDataHeader(),n.validateStep()})})}else n.showErrorMessage("errorTimeslot");e&&"function"==typeof e&&e()},e.prototype.getCurrentDate=function(){var e=this.plugin.getCurrentValues();return e.timeslots||(e.timeslots={}),e.timeslots[this.container.dataset.timeslot]||(e.timeslots[this.container.dataset.timeslot]={}),e.timeslots[this.container.dataset.timeslot].date},e.prototype.setCurrentDate=function(e){var t=this,i=t.plugin.getCurrentValues();i.timeslots||(i.timeslots={}),i.timeslots[t.container.dataset.timeslot]||(i.timeslots[t.container.dataset.timeslot]={}),i.timeslots[t.container.dataset.timeslot].date=e,t.plugin.setCurrentValue("timeslots",i.timeslots)},e.prototype.setCurrentTime=function(e){var t=this,i=t.plugin.getCurrentValues();i.timeslots||(i.timeslots={}),i.timeslots[t.container.dataset.timeslot]||(i.timeslots[t.container.dataset.timeslot]={}),i.timeslots[t.container.dataset.timeslot].time=e,t.plugin.setCurrentValue("timeslots",i.timeslots)},e.prototype.preSubmit=function(e){e&&"function"==typeof e&&e()},e.prototype.validateStep=function(){var t=this,i=!0,n=t.plugin.getCurrentValues();if(n.timeslots&&n.timeslots[t.container.dataset.timeslot]){if((n=n.timeslots[t.container.dataset.timeslot]).date?t.plugin.removeError(t.container.dataset.timeslot+"|date"):(i=!1,t.plugin.showError(t.container.dataset.timeslot+"|date",TYPO3.lang["reservation.wizard.error.timeslot.noDate"])),n.time?t.plugin.removeError(t.container.dataset.timeslot+"|time"):(i=!1,t.plugin.showError(t.container.dataset.timeslot+"|time",TYPO3.lang["reservation.wizard.error.timeslot.noTimeslot"])),n.date&&n.time){var e=!1;if(t.contentContainer.querySelector(".ts-time")&&(e=!0),!e){var a=t.plugin.getCurrentValue("persons");if(t.timeslotData[n.date]){var o=!1;t.timeslotData[n.date].forEach(function(e){e.time===n.time&&(o=!0,parseInt(e.free)<a&&e.time!==t.initialTimeslot.time&&n.date!==t.initialTimeslot.date&&(i=!1,t.plugin.showError(t.container.dataset.timeslot+"|date",TYPO3.lang["reservation.wizard.error.timeslot.invalidPersons"])))}),o||(i=!1,t.plugin.showError(t.container.dataset.timeslot+"|date",TYPO3.lang["reservation.wizard.error.timeslot.invalid"]))}else i=!1,t.plugin.showError(t.container.dataset.timeslot+"|date",TYPO3.lang["reservation.wizard.error.timeslot.invalid"])}}}else i=!1;return i?(t.submitContainer.classList.remove("d-none"),t.submitContainer.querySelector(".btn-next").removeAttribute("disabled")):t.submitContainer.querySelector(".btn-next").setAttribute("disabled","disabled"),t.setValidState(i),t.plugin.toggleStateOfSubmitButton(),i},e.prototype.showErrorMessage=function(e){this.contentContainer.innerHTML=this.templates[e].innerHTML},e.prototype.setValidState=function(e){this.isValid=e,this.container.dataset.valid=e},e.prototype.getValidState=function(){return this.isValid},e.prototype.hasData=function(){var e=this.plugin.getCurrentValues();return!(!e.timeslots||!e.timeslots[this.container.dataset.timeslot]||!(e=e.timeslots[this.container.dataset.timeslot]).date&&!e.time)},e.prototype.hideHasDataHeader=function(){this.container.classList.remove("card-data")},e.prototype.updateHasDataHeader=function(){var e=this.plugin.getCurrentValues(),t=this.container.querySelector(".card-header .reservation-data");if(this.hasData()){e=e.timeslots[this.container.dataset.timeslot];var i=this.reservationDataTemplate.innerHTML,n=Datepicker.parseDate(e.date,"yyyy-mm-dd"),a="D, dd.mm.yyyy",o="de";1==Globals.languageId&&(o="en",a="D, mm/dd/yyyy");var r=e.time;r?0==Globals.languageId&&(r+=" Uhr"):r="";var s=Datepicker.formatDate(n,a,o);i=(i=i.replace(/---field:date---/g,s)).replace(/---field:time---/g,r),t.innerHTML=i,t.querySelector('[data-field-value="date"]').innerHTML=s,t.querySelector('[data-field-value="time"]').innerHTML=r,this.fillTimeslotTitle()}},e.prototype.showHasDataHeader=function(){this.hasData()?this.container.classList.add("card-data"):this.container.classList.remove("card-data")},e.prototype.fillTimeslotTitle=function(){var t=this;1<t.pluginContainer.querySelectorAll('.card[data-stepaction="date-selection"]').length?t.container.querySelectorAll(".timeslot-title").forEach(function(e){t.container.dataset.timeslottitle&&"undefined"!==t.container.dataset.timeslottitle?e.innerHTML=t.container.dataset.timeslottitle:e.innerHTML=""}):t.container.querySelectorAll(".timeslot-title").forEach(function(e){e.innerHTML=""})},e}(),Sitepackage.Plugin.Reservation.WizardStepGroupInfoAction=function(){var e=function(e,t,i){this.plugin=e,this.pluginContainer=t,this.container=i,this.submitContainer=this.container.querySelector(".submit-row"),this.submitContainer.classList.remove("d-none"),this.reservationDataTemplate=this.container.querySelector(".reservation-data").cloneNode(!0),this.reservationDataTemplate.classList.remove("reservation-data"),this.groupNameField=this.container.querySelector("#groupname"),this.guideCheckbox=this.container.querySelector("#reiseleiter2"),this.austriaGuideCheckbox=this.container.querySelector("#austriaguide2")};return e.prototype.initialize=function(e){var t=this;GeneralUtility.showLoadingAnimationOfCard(t.container),t.hideHasDataHeader(),t.groupNameField.addEventListener("blur",function(){t.plugin.setCurrentValue("groupName",t.groupNameField.value.trim()),t.validateStep(),t.updateHasDataHeader()}),t.guideCheckbox.addEventListener("change",function(){t.plugin.setCurrentValue("hasGuide",t.guideCheckbox.checked),t.validateStep(),t.updateHasDataHeader()}),t.austriaGuideCheckbox.addEventListener("change",function(){t.plugin.setCurrentValue("hasAustriaGuide",t.austriaGuideCheckbox.checked),t.validateStep(),t.updateHasDataHeader()}),t.container.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)}),t.prefill(function(){t.validateStep(),GeneralUtility.hideLoadingAnimationOfCard(t.container),e&&"function"==typeof e&&e()})},e.prototype.isOpen=function(){return this.container.classList.contains("card-active")},e.prototype.prefill=function(e){var t=this,i=t.plugin.getCurrentValues();t.updateHasDataHeader(),t.hasData()&&!t.isOpen()&&t.showHasDataHeader(),i.groupName&&(t.groupNameField.value=i.groupName),t.guideCheckbox.checked=i.hasGuide,t.austriaGuideCheckbox.checked=i.hasAustriaGuide,e&&"function"==typeof e&&e()},e.prototype.preSubmit=function(e){e&&"function"==typeof e&&e()},e.prototype.validateStep=function(){var e=this,t=!0;return 0===e.groupNameField.value.trim().length?(t=!1,e.plugin.showError("groupName","Kein Gruppenname angegeben")):e.plugin.removeError("groupName"),t?e.submitContainer.querySelector(".btn-next").removeAttribute("disabled"):e.submitContainer.querySelector(".btn-next").setAttribute("disabled","disabled"),e.setValidState(t),e.plugin.toggleStateOfSubmitButton(),t},e.prototype.setValidState=function(e){this.isValid=e,this.container.dataset.valid=e},e.prototype.getValidState=function(){return this.isValid},e.prototype.hasData=function(){var e=this.plugin.getCurrentValues();return!!(e.groupName||e.hasGuide||e.hasAustriaGuide)},e.prototype.hideHasDataHeader=function(){this.container.classList.remove("card-data")},e.prototype.updateHasDataHeader=function(){var e=this.plugin.getCurrentValues(),t=this.container.querySelector(".card-header .reservation-data");if(this.hasData()){var i=this.reservationDataTemplate.innerHTML;i=i.replace(/---field:groupName---/g,e.groupName),t.innerHTML=i,e.groupName||(e.groupName=""),t.querySelector('[data-field-value="groupName"]').innerHTML=e.groupName,e.hasGuide?(t.querySelector('[data-field-checked="guide"]').classList.remove("card-not-selected"),t.querySelector('[data-field-checked="guide"]').classList.add("card-selected")):(t.querySelector('[data-field-checked="guide"]').classList.remove("card-selected"),t.querySelector('[data-field-checked="guide"]').classList.add("card-not-selected")),e.hasAustriaGuide?(t.querySelector('[data-field-checked="austria-guide"]').classList.remove("card-not-selected"),t.querySelector('[data-field-checked="austria-guide"]').classList.add("card-selected")):(t.querySelector('[data-field-checked="austria-guide"]').classList.remove("card-selected"),t.querySelector('[data-field-checked="austria-guide"]').classList.add("card-not-selected"))}},e.prototype.showHasDataHeader=function(){this.hasData()?this.container.classList.add("card-data"):this.container.classList.remove("card-data")},e}(),Sitepackage.Plugin.Reservation.WizardStepReservationInfoAction=function(){var e=function(e,t,i){this.plugin=e,this.pluginContainer=t,this.container=i,this.reservationDataTemplate=this.container.querySelector(".reservation-data").cloneNode(!0),this.reservationDataTemplate.classList.remove("reservation-data"),this.infoField=this.container.querySelector("#guideinfo"),this.emailField=this.container.querySelector("#email"),this.sendEmailCheckbox=this.container.querySelector("#emailsenden2")};return e.prototype.initialize=function(e){var t=this;GeneralUtility.showLoadingAnimationOfCard(t.container),t.hideHasDataHeader(),t.infoField.addEventListener("blur",function(){t.plugin.setCurrentValue("info",t.infoField.value.trim()),t.validateStep(),t.updateHasDataHeader()}),t.emailField.addEventListener("blur",function(){t.plugin.setCurrentValue("email",t.emailField.value.trim()),t.validateStep(),t.updateHasDataHeader()}),t.sendEmailCheckbox.addEventListener("change",function(){t.plugin.setCurrentValue("sendEmail",t.sendEmailCheckbox.checked),t.validateStep(),t.updateHasDataHeader()}),t.prefill(function(){t.validateStep(),GeneralUtility.hideLoadingAnimationOfCard(t.container),e&&"function"==typeof e&&e()})},e.prototype.isOpen=function(){return this.container.classList.contains("card-active")},e.prototype.prefill=function(e){var t=this,i=t.plugin.getCurrentValues();t.updateHasDataHeader(),t.hasData()&&!t.isOpen()&&t.showHasDataHeader(),i.email&&(t.emailField.value=i.email),i.info&&(t.infoField.innerHTML=i.info),e&&"function"==typeof e&&e()},e.prototype.preSubmit=function(e){e&&"function"==typeof e&&e()},e.prototype.validateStep=function(){var e=this,t=!0;return validateEmail=function(e){return/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},0<e.emailField.value.trim().length&&!validateEmail(e.emailField.value.trim())?(t=!1,e.plugin.showError("email",TYPO3.lang["reservation.wizard.emailError"])):e.plugin.removeError("email"),e.setValidState(t),e.plugin.toggleStateOfSubmitButton(),t},e.prototype.setValidState=function(e){this.isValid=e,this.container.dataset.valid=e},e.prototype.getValidState=function(){return this.isValid},e.prototype.hasData=function(){var e=this.plugin.getCurrentValues();return void 0!==e.email||void 0!==e.info},e.prototype.hideHasDataHeader=function(){this.container.classList.remove("card-data")},e.prototype.updateHasDataHeader=function(){var e=this.plugin.getCurrentValues(),t=this.container.querySelector(".card-header .reservation-data");if(this.hasData()){var i=this.reservationDataTemplate.innerHTML,n=e.info;n||(n=""),n&&50<n.length&&(n=n.substring(0,50)+"...");var a=e.email;a||(a=TYPO3.lang["reservation.wizard.emailEmptyText"]),i=(i=i.replace(/---field:email---/g,a)).replace(/---field:info---/g,info),t.innerHTML=i,t.querySelector('[data-field-value="email"]').innerHTML=a,t.querySelector('[data-field-value="info"]').innerHTML=n}},e.prototype.showHasDataHeader=function(){this.hasData()?this.container.classList.add("card-data"):this.container.classList.remove("card-data")},e}(),Sitepackage.Plugin.Reservation.WizardStepTicketSelectionAction=function(){var e=function(e,t,i){this.plugin=e,this.pluginContainer=t,this.container=i,this.debitorSelect=this.container.querySelector(".debitor-select"),this.variantsContainer=this.container.querySelector(".variants-data-container"),this.submitContainer=this.container.querySelector(".submit-row"),this.ticketButtons=this.container.querySelectorAll(".ticket-btn"),this.reservationDataTemplate=this.container.querySelector(".reservation-data").cloneNode(!0),this.reservationDataTemplate.classList.remove("reservation-data")};return e.prototype.isOpen=function(){return this.container.classList.contains("card-active")},e.prototype.prefill=function(e){var t=this;t.updateHasDataHeader(),t.hasData()&&!t.isOpen()&&t.showHasDataHeader();var i=t.plugin.getCurrentValue("debitor");i&&this.debitorSelect&&t.setActiveDebitor(this.debitorSelect.querySelector('.dropdown-item[data-id="'+i+'"]'));var n=t.plugin.getCurrentValue("ticket");if(n){var a=t.container.querySelector('.ticket-btn[data-id="'+n+'"]');a?(a.click(),t.preSubmit(e)):e&&"function"==typeof e&&e()}else GeneralUtility.hideLoadingAnimationOfAllDateSelectionCards(),e&&"function"==typeof e&&e()},e.prototype.initialize=function(e){var r=this;GeneralUtility.showLoadingAnimationOfCard(r.container),r.hideHasDataHeader(),r.debitorSelect&&(new Dropdown(r.debitorSelect),r.debitorSelect.querySelectorAll(".dropdown-item").forEach(function(e){e.addEventListener("click",function(e){return r.setActiveDebitor(e.target),!1})}),GeneralUtility.initializeDropdownSearch()),r.ticketButtons.forEach(function(o){o.addEventListener("click",function(e){r.ticketButtons.forEach(function(e){e.classList.remove("active")}),o.classList.add("active");var t=r.plugin.getCurrentValue("ticket");r.plugin.setCurrentValue("ticket",o.dataset.id);var i=r.plugin.getCurrentValue("ticket"),n=r.plugin.getCurrentValue("persons");r.loadVariants(o);var a=r.plugin.getCurrentValue("persons");return document.getElementById("max-group-size").innerHTML=o.dataset.max,r.variantsContainer.classList.remove("d-none"),r.submitContainer.classList.remove("d-none"),r.scrollToPersonFields(),(t!==i||n!==a||r.plugin.isInitialLoading)&&r.updateDateSelectionSteps(),r.validateStep(),!1})}),r.prefill(function(){r.validateStep(),GeneralUtility.hideLoadingAnimationOfCard(r.container),e&&"function"==typeof e&&e()})},e.prototype.scrollToPersonFields=function(){anime({targets:document.getElementById("modal-reservation"),scrollTop:this.variantsContainer.offsetTop-100,duration:500,easing:"easeInOutQuad"})},e.prototype.updateDateSelectionSteps=function(l){var c=this,d=c.plugin.getCurrentValue("ticket");if(c.plugin.timeslotData={},GeneralUtility.showLoadingAnimationOfAllDateSelectionCards(),d&&c.plugin.products[d]&&c.plugin.products[d].product.linkedItems){var e=[];c.plugin.products[d].product.linkedItems.forEach(function(i){e.push(new Promise(function(t,e){c.requestTimeslots(i,function(e){e&&(c.plugin.timeslotData[i]={},e.forEach(function(e){c.plugin.timeslotData[i][e.date]=e.timeslots}),t())})}))}),Promise.all(e).then(function(){var e=2,t=c.plugin.accordion.querySelectorAll('.card[data-cloned="1"]');if(t&&0<t.length&&t.forEach(function(e){e.remove()}),1<c.plugin.products[d].product.linkedItems.length)for(var i=e;i<=c.plugin.products[d].product.linkedItems.length;i++){var n=c.plugin.products[d].product.linkedItems[i];if(!c.plugin.accordion.querySelector('.card[data-timeslot="'+n+'"]')){var a=c.plugin.accordion.querySelectorAll(":scope > *")[e-1].cloneNode(!0),o=i+1,r=e+"-"+o;a.dataset.cloned="1",a.classList.remove("card-data"),a.dataset.timeslot=n,a.dataset.dirty="1",a.querySelector(".card-header").setAttribute("id","wizard-heading-"+r),a.querySelector(".card-header A").setAttribute("href","#wizard-collapse-"+r),a.querySelector(".card-header A").setAttribute("aria-controls","wizard-collapse-"+r),a.querySelector("div.collapse").setAttribute("aria-labelledby","wizard-heading-"+r),a.querySelector("div.collapse").setAttribute("id","wizard-collapse-"+r),c.plugin.accordion.insertBefore(a,c.plugin.accordion.querySelectorAll(":scope > *")[i]),GeneralUtility.showLoadingAnimationOfCard(a),c.plugin.initializeStep(a,o-1),c.plugin.initializeCollapseElement(a.querySelector('[data-toggle="collapse"]'))}}else if(t&&0<t.length){var s=e+c.plugin.products[d].product.linkedItems.length;for(i=e;i<s;i++)c.plugin.removeStep(i)}for(i=e=1;i<=c.plugin.products[d].product.linkedItems.length;i++){n=c.plugin.products[d].product.linkedItems[i-1];c.plugin.accordion.querySelectorAll(":scope > *")[i].dataset.timeslot!==n&&(c.plugin.accordion.querySelectorAll(":scope > *")[i].dataset.timeslot=n,c.plugin.accordion.querySelectorAll(":scope > *")[i].dataset.dirty="1")}c.plugin.dispatchEvent("ticketChanged"),GeneralUtility.hideLoadingAnimationOfCard(c.container),GeneralUtility.hideLoadingAnimationOfAllDateSelectionCards(),l&&"function"==typeof l&&l()})}else GeneralUtility.hideLoadingAnimationOfCard(c.container)},e.prototype.loadVariants=function(r){var s=this,e=r.dataset.variants.split("|||"),l="";e.forEach(function(e){if(0<e.length){var t=e.split("---"),i=r.dataset.max;i||(i=30);var n=0,a=s.plugin.getCurrentValue("variants");a&&a[t[0]]&&(n=a[t[0]]);var o=t[1];t[2]&&(o='<span class="badge badge-info" data-toggle="tooltip" data-html="true" data-placement="top" title="'+t[2]+'">'+o+'<svg version="1.1" id="info" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 32.1 33.2" style="enable-background:new 0 0 32.1 33.2;" xml:space="preserve"><path d="M16.1,10.5c2.4,0,4.3-1.9,4.3-4.3c0-2.4-1.9-4.3-4.3-4.3c-2.3,0-4.3,1.9-4.3,4.3C11.9,8.6,13.8,10.5,16.1,10.5"/><polygon points="22.9,28.3 19.8,28.3 19.8,12.5 9.3,12.5 9.3,14.6 12.4,14.6 12.4,28.3 9.3,28.3 9.3,30.5 22.9,30.5 "/></svg></span>'),l+='<div class="variant-wrapper d-flex">',l+='<label for="variant-'+t[0]+'">'+o+"</label>",l+='<input class="form-control mr-sm-4" type="number" min="0" max="'+i+'" id="variant-'+t[0]+'" data-ticketid="'+r.dataset.id+'" data-id="'+t[0]+'" value="'+n+'"/>',l+="</div>"}}),this.variantsContainer.querySelector(".variants").innerHTML=l,this.addVariantInputEvents(),this.variantsContainer.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)})},e.prototype.addVariantInputEvents=function(){var i=this;this.variantsContainer.querySelector(".variants").querySelectorAll("input").forEach(function(e){e.addEventListener("change",function(e){var t=i.plugin.getCurrentValue("persons");i.adjustMaxAttributesOfVariantFields(),i.validateStep(),t!==i.plugin.getCurrentValue("persons")&&(GeneralUtility.showLoadingAnimationOfAllDateSelectionCards(),i.plugin.accordion.querySelectorAll(".card[data-timeslot]").forEach(function(e){e.dataset.dirty="1";var t=i.plugin.getIndexOfCard(e);i.plugin.steps[t].validateStep()}),GeneralUtility.hideLoadingAnimationOfAllDateSelectionCards())})}),i.adjustMaxAttributesOfVariantFields(),i.validateStep()},e.prototype.requestTimeslots=function(e,i){var t=GeneralUtility.getAjaxUrl("timeslots");t=GeneralUtility.appendUrlParameter(t,"timeslot",e),GeneralUtility.ajaxGetRequest(t,function(e){var t=[];e&&(t=JSON.parse(e)),i(t)})},e.prototype.preSubmit=function(e){e&&"function"==typeof e&&e()},e.prototype.validateStep=function(){var e=this,t=!0,i=this.container.querySelector(".ticket-btn.active"),n=!1;if(i&&(n=this.variantsContainer.querySelector(".variants").querySelectorAll('input[data-ticketid="'+i.dataset.id+'"]')),i&&n){var a=parseInt(i.dataset.max);a||(a=30);var o=0;n.forEach(function(e){var t=e.value.trim();""===t&&(t=0),o+=parseInt(t)}),this.container.querySelector(".ticket-btn.active")?e.plugin.removeError("ticket"):(t=!1,e.plugin.showError("ticket","Kein Ticket gewählt"));var r=!1;0===o?(r=!(t=!1),e.plugin.showError("persons","Keine Personenanzahl gewählt")):a<o?(r=!(t=!1),e.plugin.showError("persons","Zu viele Personen")):o<1&&(r=!(t=!1),e.plugin.showError("persons","Zu wenige Personen")),r||e.plugin.removeError("persons")}else e.plugin.showError("ticket","Kein Ticket gewählt"),t=!1;return t?this.submitContainer.querySelector(".btn-next").removeAttribute("disabled"):this.submitContainer.querySelector(".btn-next").setAttribute("disabled","disabled"),e.setValidState(t),e.plugin.toggleStateOfSubmitButton(),t},e.prototype.adjustMaxAttributesOfVariantFields=function(){var e=this.container.querySelector(".ticket-btn.active"),i=0,n=[];e&&((i=parseInt(e.dataset.max))||(i=30),n=this.variantsContainer.querySelector(".variants").querySelectorAll('input[data-ticketid="'+e.dataset.id+'"]'));var a=0,o=0,r=this.plugin.getCurrentValue("variants",a);r||(r={}),n.forEach(function(t){o=0,n.forEach(function(e){t.dataset.id!==e.dataset.id&&(o+=parseInt(e.value))}),a+=parseInt(t.value);var e=i-o;t.setAttribute("max",e),r[t.dataset.id]=parseInt(t.value)}),this.plugin.setCurrentValue("variants",r),this.plugin.setCurrentValue("persons",a)},e.prototype.setActiveDebitor=function(e){if(this.debitorSelect.querySelectorAll(".dropdown-item").forEach(function(e){e.classList.remove("active")}),e){e.classList.add("active"),this.debitorSelect.dataset.selected=e.dataset.id;var t=e.dataset.name;0<parseInt(e.dataset.id)&&(t='<span class="d-none d-md-inline">'+e.dataset.name+"("+e.dataset.id+')<span><span class="d-inline d-md-none">'+e.dataset.id+"</span>"),this.debitorSelect.querySelector(".dropdown-label").innerHTML=t,this.plugin.setCurrentValue("debitor",e.dataset.id)}},e.prototype.setValidState=function(e){this.isValid=e,this.container.dataset.valid=e},e.prototype.getValidState=function(){return this.isValid},e.prototype.hasData=function(){var e=this.plugin.getCurrentValues();return!(!e.ticket&&!e.persons)},e.prototype.hideHasDataHeader=function(){this.container.classList.remove("card-data")},e.prototype.updateHasDataHeader=function(){var e=this.plugin.getCurrentValues(),t=this.container.querySelector(".card-header .reservation-data");if(this.hasData()){var i=this.reservationDataTemplate.innerHTML,n="";this.plugin.products[e.ticket]&&(n=this.plugin.products[e.ticket].product.title),i=(i=i.replace(/---field:persons---/g,e.persons)).replace(/---field:ticket---/g,n),t.innerHTML=i,t.querySelector('[data-field-value="ticket"]').innerHTML=n,t.querySelector('[data-field-value="persons"]').innerHTML=e.persons}},e.prototype.showHasDataHeader=function(){this.hasData()?this.container.classList.add("card-data"):this.container.classList.remove("card-data")},e}(),GeneralUtility.showLoadingAnimationOfCard=function(e){e.querySelector(".card-header")&&e.querySelector(".card-header").classList.add("d-none"),e.querySelector(".collapse")&&e.querySelector(".collapse").classList.add("d-none"),e.querySelector(".loader")&&(e.querySelector(".loader").classList.remove("d-none"),e.querySelector(".loader").classList.add("d-flex"))},GeneralUtility.showLoadingAnimationOfAllDateSelectionCards=function(){document.getElementById("modal-reservation-steps").querySelectorAll('.card[data-stepaction="date-selection"]').forEach(function(e){GeneralUtility.showLoadingAnimationOfCard(e)})},GeneralUtility.hideLoadingAnimationOfCard=function(e){e.querySelector(".card-header")&&e.querySelector(".card-header").classList.remove("d-none"),e.querySelector(".collapse")&&e.querySelector(".collapse").classList.remove("d-none"),e.querySelector(".loader")&&(e.querySelector(".loader").classList.add("d-none"),e.querySelector(".loader").classList.remove("d-flex"))},GeneralUtility.hideLoadingAnimationOfAllDateSelectionCards=function(){document.getElementById("modal-reservation-steps").querySelectorAll('.card[data-stepaction="date-selection"]').forEach(function(e){GeneralUtility.hideLoadingAnimationOfCard(e)})},GeneralUtility.getDateObjectFromString=function(e){if(-1!==e.indexOf("-")){var t=e.split("-");return new Date(t[0],t[1]-1,t[2])}if(-1!==e.indexOf("/")){t=e.split("/");return new Date(t[2],t[0]-1,t[1])}t=e.split(".");return new Date(t[2],t[1]-1,t[0])},GeneralUtility.getDateStringFromObject=function(e){var t=e.getDate();t<10&&(t="0"+t);var i=e.getMonth()+1;i<10&&(i="0"+i);var n=e.getFullYear();return 1===parseInt(Globals.languageId)?i+"/"+t+"/"+n:t+"."+i+"."+n},GeneralUtility.getAjaxUrl=function(e){var t=0;switch(e){case"timeslots":t=6010;break;case"wizard":t=6011;break;case"user-info":t=6013;break;case"notification-list":t=6014;break;case"notification-read":t=6015;break;case"wizard-save":t=6017;break;case"show-code":t=6019;break;case"cancel":t=6020}if(!t)return"";var i="/?type="+t;return 1===Globals.languageId&&(i="/en"+i),i+="&rand="+Math.random()},GeneralUtility.ajaxGetRequest=function(e,t,i){var n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t&&"function"==typeof t&&t(n.responseText):i&&"function"==typeof i&&i(n.statusText))},n.open("GET",e),n.send()},GeneralUtility.ajaxPostRequest=function(e,t,i,n,a){var o=new XMLHttpRequest;o.open("POST",e,!0),o.setRequestHeader("Content-type",i),o.send(t),o.onreadystatechange=function(){4===o.readyState&&(200===o.status?n&&"function"==typeof n&&n(o.responseText):a&&"function"==typeof a&&a(o.statusText))}},GeneralUtility.initializeDropdownSearch=function(){document.querySelectorAll(".dropdown").forEach(function(e){if("true"!==e.dataset.searchinitialized){var t=e.querySelector(".dropdown-search");t&&(t.addEventListener("keyup",function(){filterFunction(this)}),t.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()}));var i=e.querySelector(".dropdown-menu .icon-remove");i&&i.addEventListener("click",function(e){this.closest(".dropdown").querySelector(".dropdown-search").value="",filterFunction(this),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()})}e.dataset.searchinitialized="true"})},GeneralUtility.addDatepickerCloseButton=function(i){document.querySelectorAll(".datepicker-picker .datepicker-header .datepicker-controls").forEach(function(e){if(!e.parentElement.querySelector(".btn-close")){var t=document.createElement("button");t.textContent="X",t.classList.add("btn"),t.classList.add("btn-close"),t.classList.add("text-center"),t.addEventListener("click",function(){i.forEach(function(e){e.hide()})}),e.parentElement.insertBefore(t,e)}})},GeneralUtility.isTouchCache=null,GeneralUtility.isElementInViewport=function(e,t){t||(t=0);var i=e.getBoundingClientRect();return 0<=i.top&&0<=i.left&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)+t&&i.right<=(window.innerWidth||document.documentElement.clientWidth)},GeneralUtility.appendUrlParameter=function(e,t,i){return-1!==e.indexOf("?")?e+="&":e+="?",e+=t+"="+i},GeneralUtility.isTouch=function(){return null!==GeneralUtility.isTouchCache||(GeneralUtility.isTouchCache="ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints),GeneralUtility.isTouchCache},GeneralUtility.isEdge=function(){return 0<window.navigator.userAgent.indexOf("Edge/")},GeneralUtility.isInternetExplorer=function(){var e=window.navigator.userAgent;return 0<e.indexOf("MSIE ")||0<e.indexOf("Trident/")},GeneralUtility.deviceOrientationChangeListener=function(e){var t=GeneralUtility.getDeviceOrientation(),i=null;window.addEventListener("resize",function(){(t=GeneralUtility.getDeviceOrientation())!==i&&e(t),i=t},{capture:!1,passive:!0})},GeneralUtility.getDeviceOrientation=function(){return window.innerHeight>window.innerWidth?"portrait":"landscape"},GeneralUtility.getBrowserDimensions=function(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}},GeneralUtility.getScrollPosition=function(){return{top:document.documentElement.scrollTop||document.body.scrollTop,left:document.documentElement.scrollLeft||document.body.scrollLeft}},GeneralUtility.getOffset=function(e){var t=e.getBoundingClientRect(),i=GeneralUtility.getScrollPosition();return{top:t.top+i.top,left:t.left+i.left}},Website.prototype.initializeBootstrapComponents=function(){document.querySelectorAll('[data-toggle="tooltip"]').forEach(function(e){new Tooltip(e)}),document.querySelectorAll('[data-toggle="collapse"]').forEach(function(e){new Collapse(e)})},Website.prototype.requestUserInfo=function(){GeneralUtility.ajaxGetRequest(GeneralUtility.getAjaxUrl("user-info"),function(e){if(e){var i=JSON.parse(e);document.querySelectorAll('[data-type="user"]').forEach(function(e){var t=e.dataset.property;t&&i[t]&&(e.innerHTML=i[t])})}})},Website.prototype.scrollToAnchor=function(){if(window.location.hash){var e=window.location.hash,t=document.querySelector(e);t&&(scrollTop=window.pageYOffset+t.getBoundingClientRect().top)}},Website.prototype.initializeTouch=function(){GeneralUtility.isTouch()?document.body.classList.add("is-touch"):document.body.classList.add("no-touch")},Website.prototype.initializePlugins=function(){var e=this.body.querySelectorAll('[data-plugin="reservation"]');if(e)new Sitepackage.Plugin.Reservation(e);var t=this.body.querySelectorAll('[data-plugin="notification"]');if(t)new Sitepackage.Plugin.Notification(t)},Website.prototype.initializeContentElements=function(){this.initializeVideos()},Website.prototype.initializeExtensions=function(){},Website.prototype.initializeVideos=function(){this.body.querySelectorAll(".video-container").forEach(function(e){var t=e,i=t.querySelector(".play");if(i){var n=i.dataset.source,a=i.dataset.type,o=i.nextSibling;if("vimeo"===a){s=(s=n.split("/")).pop();var r=o.find("video");i.addEventListener("click",function(e){t.classList.add("playing"),i.style.display="none",r.classList.add("hide"),o.innerHTML+='<iframe src="https://player.vimeo.com/video/'+s+'?title=0&byline=0&portrait=0&autoplay=1"class="h-100 w-100" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" allow="autoplay; fullscreen" />'})}else{var s;if(2===(s=n.split("watch?v=")).length&&s[1]){if(s=s[1],0===(r=o.querySelector("video")).length){var l="https://i.ytimg.com/vi/"+s+"/hqdefault.jpg";o.style.backgroundImage="url("+l+")",o.innerHTML+='<img src="'+l+'" class="preview invisible" />'}i.addEventListener("click",function(e){t.classList.add("playing"),i.style.display="none",r.classList.add("hide"),o.innerHTML+='<iframe src="https://www.youtube.com/embed/'+s+'?autoplay=1"class="h-100 w-100" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" allow="autoplay; fullscreen" />'})}}}})},document.addEventListener("DOMContentLoaded",function(e){website=new Website,GeneralUtility.initializeDropdownSearch(),document.querySelectorAll("button.btn-voucher, a.btn-voucher").forEach(function(e){e.addEventListener("click",function(e){var t=e.target.dataset.uid;t||(t=e.target.closest("button.btn-voucher, a.btn-voucher").dataset.uid);document.querySelectorAll('.btn-voucher[data-uid="'+t+'"]').forEach(function(e){e.classList.add("downloaded"),e.querySelector(".trigger").classList.add("drawn")})})});var t=document.querySelectorAll(".btn.disabled, .btn:disabled");t&&t.forEach(function(e){e.addEventListener("click",function(e){var t=this;setTimeout(function(){t.blur()},1e3)})});var i=document.querySelectorAll(".dropdown");i&&i.forEach(function(t){t.addEventListener("hide.bs.dropdown",function(e){setTimeout(function(){t.querySelector(".btn-dropdown").blur()},100)},!1)}),document.querySelector("#nav-icon-container, #nav-icon, .menu-text").addEventListener("click",function(e){website.body.classList.add("menu-open"),document.getElementById("menu-container").classList.add("open")}),document.getElementById("nav-icon-container").addEventListener("click",function(e){website.body.classList.add("menu-open"),document.getElementById("menu-container").classList.add("open")}),document.getElementById("nav-icon-close").addEventListener("click",function(e){website.body.classList.remove("menu-open"),document.getElementById("menu-container").classList.remove("open")}),document.addEventListener("click",function(e){!website.body.classList.contains("menu-open")||e.target.closest("#menu-container")||e.target.closest("#nav-icon-container")||(website.body.classList.remove("menu-open"),document.getElementById("menu-container").classList.remove("open"))});var n=document.getElementById("search-filter");if(n){document.querySelectorAll(".icon-search").forEach(function(e){e.addEventListener("click",function(e){n.querySelector("input").focus()})});var a=n.querySelector(".icon-remove");a&&a.addEventListener("click",function(){n.querySelector("input").value="",n.submit()})}document.querySelectorAll(".notifications-dropdown").forEach(function(e){e.addEventListener("click",function(e){e.stopPropagation()})}),document.querySelectorAll(".modal").forEach(function(i){i.addEventListener("show.bs.modal",function(){var t=i.querySelector(".modal-body");if("wizard"===t.dataset.load){i.querySelector(".modal-footer").classList.add("d-none"),document.getElementById("modal-reservation-title").classList.add("d-none"),t.innerHTML=website.loaderHtmlWizard;var e=GeneralUtility.getAjaxUrl("wizard");t.dataset.reservationid&&(e=GeneralUtility.appendUrlParameter(e,"reservationId",parseInt(t.dataset.reservationid))),GeneralUtility.ajaxGetRequest(e,function(e){t.innerHTML+=e,website.initializePlugins()})}else if("showcode"===t.dataset.load){document.getElementById("modal-reservation-code-title").classList.add("d-none"),t.innerHTML=website.loaderHtml;e=GeneralUtility.getAjaxUrl("show-code");t.dataset.reservationid&&(e=GeneralUtility.appendUrlParameter(e,"reservationId",parseInt(t.dataset.reservationid))),GeneralUtility.ajaxGetRequest(e,function(e){t.innerHTML=e,website.initializePlugins()})}})}),document.querySelectorAll(".collapse").forEach(function(e){e.addEventListener("show.bs.collapse",function(){this.closest(".card").classList.add("card-active")}),e.addEventListener("hide.bs.collapse",function(){this.closest(".card").classList.remove("card-active")})})});
//# sourceMappingURL=website.min.js.map