function showModal(){var e;document.getElementById("overlay").style.display="block",document.querySelector(".header__searchpopup .popup-modal").classList.add("is--visible"),e=document.querySelector(".js-choice"),new Choices(e)}function closeModal(){document.getElementById("overlay").style.display="none",document.querySelector(".header__searchpopup .popup-modal").classList.remove("is--visible")}function triggerRedirect(e){13===e.keyCode&&(target,location,redirectToSearchPage(e))}function redirectToSearchPage(){var e=document.querySelector("#SearchType"),t=e.value,n=e.innerText,i=document.querySelector("#query").value;dataLayer.push({siteSearchCategory:n}),window.location.href=t+"?query="+i}function PrepareHiddenFieldsToBeSent(e){for(var t=0;t<e.length;t++)e[t].parentElement.parentElement.className.includes("form--hidden")&&"file"!==e[t].type&&(e[t].value="-1")}function PrepareHiddenFieldsToBeSent(e){for(var t=0;t<e.length;t++)e[t].parentElement.parentElement.className.includes("form--hidden")&&"file"!==e[t].type&&(e[t].value="-1")}var contentTeaserSwiper,navTrigger,metaNav,stageSlider,stageSliderSlides,stageSliderLength,stageSliderSwiper,MarkerClusterer,serviceBoxListSwiper,recipeTeaserSwiper,inputSearch,shareButtons,StoreFinder,navigationalTeaserSwiper,productNutritionSwipe,productTabs,tabs,iframes,i,backToTopButton,scrollToTop,choices,formLongSubmit,supportsVideo,imageGallerySwiper=new Swiper(".image-gallery .swiper-container",{loop:!0,centeredSlides:!0,slidesPerView:1,pagination:{el:".image-gallery__pagination",type:"fraction"},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},renderFraction:function(e,t){return'<span class="'+e+'"></span> of <span class="'+t+'"></span>'}}),footerimageGallerySwiper=new Swiper(".footer__image-gallery .swiper-container",{loop:!1,centeredSlides:!0,slidesPerView:"1",spaceBetween:15,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},breakpoints:{768:{centeredSlides:!1,slidesPerView:2},992:{centeredSlides:!1,slidesPerView:4,spaceBetween:30}}}),Search=function(){function e(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}function t(){return void 0==e("page")||""==e("page")?1:e("page")}function n(t,n){var i=window.location.protocol+"//"+window.location.hostname,r="?query="+e("query");return Search.store.type=t,void 0!==n&&(Search.store.datasource=n),{products:i+"/api/sitecore/products/SearchProducts"+r+"&querydatasource="+Search.store.datasource+"&category="+Search.store.category,recipes:i+"/api/sitecore/recipes/SearchRecipes"+r+"&querydatasource="+Search.store.datasource+"&category="+Search.store.category,content:i+"/api/sitecore/search/SearchContent"+r,stores:i+"/api/sitecore/stores/FindStoresForList"+r+"&Tradepartner=Alnatura"}[t]}function r(t){var n=window.location.protocol+"//"+window.location.hostname,i="?query="+e("query");return{products:n+"/api/sitecore/products/SearchProducts"+i,recipes:n+"/api/sitecore/recipes/SearchRecipes"+i,content:n+"/api/sitecore/search/SearchContent"+i,stores:n+"/api/sitecore/stores/FindStoresForList"+i+"&Tradepartner=Alnatura"}[t]}function a(e,t){const n=e.Key.toUpperCase(),i=t.Key.toUpperCase();var r=0;return n>i?r=1:n<i&&(r=-1),r}function o(e,t){var n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t(JSON.parse(n.response)):console.error("error::",n))},n.open("GET",e),n.send()}function s(e,t){switch(void 0!==t?t:Search.store.type){case"products":u(e.Payload.Products),c(e.Payload.TotalNumberResults,t);break;case"recipes":d(e.Payload.Recipes),c(e.Payload.TotalNumberResults,t);break;case"content":!function(e){for(var t,n=document.querySelector('div[data-role="search-module"] div.search-results-wrapper'),i=document.querySelector('div[data-search-for="Content"] div.swiper-wrapper'),r=null!==n?"search-results-item":"swiper-slide",a=[],o=0;o<e.length;o++)t='<div class="'+r+'"><a class="content-card" href="'+e[o].TargetUrl+'" ><div class="content-card-inner"><div class="image"><img title="'+e[o].Title+'" alt="'+e[o].Title+'" src="'+e[o].Image+'" /></div><div class="content">'+e[o].TeaserTitle+"</div></div></a></div>",a.push(t);null!==n&&(n.innerHTML=a.join("")),null!==i&&(i.innerHTML=a.join(""),l('div[data-search-for="Content"] .swiper-container',3))}(e.Payload.Contents),c(e.Payload.TotalNumberResults,t);break;case"stores":!function(e){for(var t,n,i=[],r=0;r<e.length;r++)t=e[r].StoreDetailPageUrl,n="",n+='<div class="swiper-slide">',t&&(n+='<a href="'+t+'">'),n+='<div class="store-card"><div class="tradepartner">'+e[r].Tradepartner+'</div><div class="name">'+e[r].Name+'</div><div class="street">'+e[r].Street+"</div></div>",t&&(n+="</a>"),n+="</div>",i.push(n);document.querySelector('div[data-search-for="Stores"] div.swiper-wrapper').innerHTML=i.join(""),l('div[data-search-for="Stores"] .swiper-container',3)}(e.Payload.Stores),c(e.Payload.TotalNumberResults,t)}}function l(e,t){new Swiper(e,{loop:!1,slidesPerView:t,spaceBetween:15,lazy:{loadPrevNext:!0,watchSlidesVisibility:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},breakpoints:{320:{slidesPerView:1,spaceBetween:20},480:{slidesPerView:2,spaceBetween:20},768:{slidesPerView:t,spaceBetween:15}}})}function c(t,n){if(void 0!==n){if(null!==document.querySelector('div[data-search-for="'+n.charAt(0).toUpperCase()+n.slice(1)+'"]')){var i=document.querySelector('div[data-search-for="'+n.charAt(0).toUpperCase()+n.slice(1)+'"]');i.childNodes[1].childNodes[1].innerHTML="( "+t+" )",0===t&&i.childNodes[3].classList.remove("hidden")}C[n]=t,function(){var e=!0;return Object.values(C).forEach(t=>{-1===t&&(e=!1)}),e}()&&dataLayer.push({siteSearchResults:function(){var e=0;return Object.values(C).forEach(t=>{e+=t}),e}(),siteSearchTerm:e("query")})}}function u(e){var t=document.querySelector('div[data-role="search-module"] div.search-results-wrapper'),n=document.querySelector('div[data-search-for="Products"] div.swiper-wrapper'),r=null!==t?"search-results-item":"swiper-slide",a=[];for(i=0;i<e.length;i++){var o=e[i].IsNewProduct?'<span class="badge badge--new">'+e[i].NewProductText+"</span >":"",s=null!==e[i].ImageUrl?'<img alt="'+e[i].ProductName+'" title="'+e[i].ProductName+'" src="'+e[i].ImageUrl+'">':"",c='<div class="'+r+'"><a href="'+e[i].TargetUrl+'" class="product-card">'+o+'<div class="product-card-inner"><div class="image">'+s+'</div><div class="content"><div class="brand">'+e[i].Brand+'</div><div class="headline">'+e[i].ProductName+'</div><div class="content-unit">'+e[i].NumberContentUnit+" "+e[i].ContentUnit+'</div><div class="rating"><div data-bv-show="inline_rating" data-bv-seo="false" data-bv-product-id="'+e[i].ProductId+'"></div></div><div class="link-more">'+e[i].CallToActionText+"</div></div></div> </a></div>";a.push(c)}null!==t&&(t.innerHTML=a.join("")),null!==n&&(n.innerHTML=a.join(""),l('div[data-search-for="Products"] .swiper-container',4))}function d(e){var t,n=document.querySelector('div[data-role="search-module"] div.search-results-wrapper'),r=document.querySelector('div[data-search-for="Recipes"] div.swiper-wrapper'),a=null!==n?"search-results-item":"swiper-slide",o=[];for(i=0;i<e.length;i++)t='<div class="'+a+'"><a href="'+e[i].ContentPageUrl+'" class="recipe-card"><div class="recipe-card-image"><img alt="'+e[i].RecipeName+'" title="'+e[i].RecipeName+'" src="'+e[i].ImageUrl+'"></div><div class="recipe-card-content"><div class="recipe-card-title">'+e[i].RecipeName+'<div class="recipe-card-rating"><div data-bv-show="inline_rating" data-bv-seo="false" data-bv-product-id="'+e[i].RecipeId+'"></div></div></div><div class="recipe-card-information"><div class="recipe-card-item item__difficulty difficulty--'+e[i].DifficultyKey+'"><div class="feature__icon"><span class="recipe-card-level-icon"><img src="/Content/Assets/Images/icon_recipe_level.png" /></span><span class="recipe-card-level-icon"><img src="/Content/Assets/Images/icon_recipe_level.png" /></span><span class="recipe-card-level-icon"><img src="/Content/Assets/Images/icon_recipe_level.png" /></span></div><span class="feature__label">'+e[i].Difficulty+'</span></div><div class="recipe-card-level-icon-item item__preptime"><div class="feature__time">'+e[i].TotalTimeMinutes+' min</div><div class="feature__label">'+e[i].TotalTimeText+"</div></div></div></div></a></div>",o.push(t);null!==n&&(n.innerHTML=o.join("")),null!==r&&(r.innerHTML=o.join(""),l('div[data-search-for="Recipes"] .swiper-container',3))}function m(){var e,t,n,i=[];for([e,t]of Object.entries(function(e){var t,n,i,r,a=e?e.split("?")[1]:window.location.search.slice(1),o={};if(a)for(a=a.split("#")[0],t=a.split("&"),n=0;n<t.length;n++){var s=t[n].split("="),l=s[0],c=void 0===s[1]||s[1];l.match(/\[(\d+)?\]$/)?(i=l.replace(/\[(\d+)?\]/,""),o[i]||(o[i]=[]),l.match(/\[\d+\]$/)?(r=/\[(\d+)\]/.exec(l)[1],o[i][r]=c):o[i].push(c)):o[l]?o[l]&&"string"==typeof o[l]?(o[l]=[o[l]],o[l].push(c)):o[l].push(c):o[l]=c}return o}(window.location.search)))if(t.split("|").length>1)for(n=0;n<t.split("|").length;n++)i.push({group:e,value:t.split("|")[n]});else i.push({group:e,value:t});return i}function p(e){var t,n,i,r,o,s,l=document.querySelector('div[data-role="filters-container"] div.popup-modal-content'),c=[],u=m(),d=[];for(l.innerHTML="",t=0;t<e.length;t++){if(n=[],i="",1===e[t].FacetVariations.length)"true"===(f=e[t].FacetVariations[0]).Key&&f.NumberOfResults>0&&(i='<li class="custom-checkbox-item"><label class="" for="'+e[t].Key+'">'+e[t].Name+" ("+f.NumberOfResults+')<input type="checkbox" data-active-key="'+f.Key+'"data-groupname="'+e[t].Name+'"data-groupkey="'+e[t].Key+'"class="custom-checkbox"name="'+e[t].Name+'"id="'+e[t].Key+'"value="'+e[t].Name+'"></label></li>'),"false"===f.Key&&f.NumberOfResults>0&&(i='<li class="custom-checkbox-item"><label class="disabled" for="'+e[t].Key+'">'+e[t].Name+' (0)<input disabled type="checkbox" data-active-key="'+f.Key+'"data-groupname="'+e[t].Name+'"data-groupkey="'+e[t].Key+'"class="custom-checkbox"name="'+e[t].Name+'"id="'+e[t].Key+'"value="'+e[t].Name+'"></label></li>'),"isnew"===e[t].Key?n.push(i):d.push(i);else if(2==e[t].FacetVariations.length){var p=e[t].FacetVariations.sort(a),h=p[1],v=p[0];h.NumberOfResults>0&&0===v.NumberOfResults?i='<li class="custom-checkbox-item"><label class="'+(_=g(u,e[t].Key,"true")?"checked":"")+'" for="'+e[t].Key+'">'+e[t].Name+" ("+h.NumberOfResults+')<input type="checkbox"'+_+' data-active-key="'+h.Key+'"data-groupname="'+e[t].Name+'"data-groupkey="'+e[t].Key+'"class="custom-checkbox"name="'+e[t].Name+'"id="'+e[t].Key+'"value="'+e[t].Name+'"></label></li>':0===h.NumberOfResults&&v.NumberOfResults>0?i='<li class="custom-checkbox-item"><label class="'+(_=g(u,e[t].Key,"true")?"checked":"")+'disabled" for="'+e[t].Key+'">'+e[t].Name+' (0)<input disabled type="checkbox"'+_+' data-active-key="'+v.Key+'"data-groupname="'+e[t].Name+'"data-groupkey="'+e[t].Key+'"class="custom-checkbox"name="'+e[t].Name+'"id="'+e[t].Key+'"value="'+e[t].Name+'"></label></li>':0===h.NumberOfResults&&0===v.NumberOfResults?i='<li class="custom-checkbox-item"><label class="'+_+'disabled" for="'+e[t].Key+'">'+e[t].Name+' (0)<input disabled type="checkbox"'+_+' data-active-key="'+v.Key+'"data-groupname="'+e[t].Name+'"data-groupkey="'+e[t].Key+'"class="custom-checkbox"name="'+e[t].Name+'"id="'+e[t].Key+'"value="'+e[t].Name+'"></label></li>':i='<li class="custom-checkbox-item"><label class="'+(_=g(u,e[t].Key,"true")?"checked":"")+'" for="'+e[t].Key+'">'+e[t].Name+" ("+h.NumberOfResults+')<input type="checkbox"'+_+' data-active-key="'+h.Key+'"data-groupname="'+e[t].Name+'"data-groupkey="'+e[t].Key+'"class="custom-checkbox"name="'+e[t].Name+'"id="'+e[t].Key+'"value="'+e[t].Name+'"></label></li>',"isnew"===e[t].Key?n.push(i):d.push(i)}else for(r=0;r<e[t].FacetVariations.length;r++){var f,y=0==(f=e[t].FacetVariations[r]).NumberOfResults?"disabled ":"",_=g(u,e[t].Key,f.Key.replace(/ /g,"%20"))?"checked ":"";i='<li class="custom-checkbox-item"><label for="'+e[t].Key+r+'" class="'+y+_+'">'+f.Name+" ("+f.NumberOfResults+')<input type="checkbox"'+y+_+'data-active-key="'+f.Key+'"data-groupname="'+e[t].Name+'"data-groupkey="'+e[t].Key+'"class="custom-checkbox"name="'+e[t].Name+'"id="'+e[t].Key+r+'"value="'+f.Name+'"></label></li>',n.push(i)}"isvegan"===e[t].Key||"islactosefree"===e[t].Key||"isglutenfree"===e[t].Key||(o='<div class="filter-list-section '+e[t].Key+'"><div class="filter-list-name">'+e[t].Name+'</div><ul class="filter-list-options">'+n.join("")+"<ul></div>",c.push(o))}s=0===d.length?"":'<div class="filter-list-section"><ul class="filter-list-options binary-options">'+d.join("")+"<ul></div>",c.push(s),l.innerHTML=c.join("")}function h(t){var n,i,r,a,o=t.OrderByElements,s=t.Text,l=[];for(l.push('<div class="filter-list-name">'+s+"</div>"),l.push('<div class="radio-group-section">'),n=""!==e("orderby")?e("orderby"):Search.store.orderBy,i=0;i<o.length;i++)r=n===o[i].Key?"checked":"",a='<div class="radio-group"><label for="'+o[i].Key+'" class="radio-button">'+o[i].Text+"<input "+r+' type="radio" name="orderby" id="'+o[i].Key+'" value="'+o[i].Key+'" /><span class="checkmark"></span></label></div>',l.push(a);l.push("</div>"),document.querySelector(".popup-modal-content").innerHTML+=l.join("")}function g(e,t,n){for(var i=!1,r=0;r<e.length;r++)if(e[r].group.toLowerCase()===t.toLowerCase()&&e[r].value.toLowerCase()===n.toLowerCase()){i=!0;break}return i}function v(){for(var e,t,n=document.getElementById("search-tags"),i=document.querySelectorAll('.filter-list-options input[type="checkbox"]:checked'),r=[],a=0;a<i.length;a++)e="freeofallergenstrace"===i[a].dataset.groupkey||"freeofallergensingredient"===i[a].dataset.groupkey||"isnew"===i[a].dataset.groupkey?i[a].dataset.groupname:"",t='<div data-active-key="'+i[a].dataset.activeKey+'" data-group="'+i[a].dataset.groupkey+'" data-value="'+i[a].value+'" class="tag"><div><div class="tag-title"><img src="/-/media/Foundation/Assets/icon_close.svg">'+i[a].value+'</div><div class="tag-description">'+e+"</div></div></div>",r.push(t);n.innerHTML=r.join("")}function f(e){var t=document.querySelector("div.search__container__filter__button > button");t.classList.remove("hidden"),t.childNodes[1].innerHTML=e}function y(){Search.store.baseApiUrl="",document.querySelector(".search-results-wrapper").innerHTML=""}function _(e){f(e.Payload.TotalNumberResults),s(e),p(e.Payload.Facets),v(),void 0!==e.Payload.OrderBy&&void 0!==e.Payload.OrderBy.OrderByElements&&e.Payload.OrderBy.OrderByElements.length>0&&h(e.Payload.OrderBy),0===e.Payload.TotalNumberResults?S():w(e.Payload.TotalNumberResults),0===e.Payload.TotalNumberResults?L("hide"):L("show")}function w(i){var r=Math.ceil(i/Search.store.recordsPerPage),a=parseInt(t()),l=""===e("orderby")?"":"&orderby="+e("orderby");b(i,a),Pagination.Init(document.getElementById("pagination"),{size:r,page:a,step:3,cbk:function(e){var t=Search.store.filtersString;o(n(Search.store.type,Search.store.datasource)+"&page="+e+t+l,function(n){s(n),b(i,e),k(e,t+l),window.scrollTo(0,250)})}})}function k(e,t){if(history.pushState){var n=void 0!==t?t:"",i=window.location.href.indexOf("?query=")>-1?window.location.href.split("&page=")[0]+"&page="+e+n:window.location.href.split("&page=")[0]+"?query=&page="+e+n;history.pushState({},null,i)}}function S(){for(var e=document.getElementById("pagination");e.firstChild;)e.removeChild(e.firstChild)}function b(e,t){var n,i;t||(t=1),(i=(n=12*(t-1)+1)+12-1)>e&&(i=e),document.querySelector(".search-result-range .range").innerHTML=n+" - "+i,document.querySelector(".search-result-range .total-range").innerHTML=e}function L(e){"show"===e&&(document.querySelector("p.no-results").classList.add("hidden"),document.querySelector(".search-result-range").classList.remove("hidden")),"hide"===e&&(document.querySelector("p.no-results").classList.remove("hidden"),document.querySelector(".search-result-range").classList.add("hidden"))}function E(e){var t=[],n=e.reduce(function(e,t){return e[t.group]=e[t.group]||[],e[t.group].push(t.value.replace(/ /g,"%20")),e},Object.create(null));return Object.keys(n).forEach(function(e){("alnaturabrandname"===e||"freeofallergensingredient"===e||"freeofallergenstrace"===e||"isvegan"===e||"isnew"===e||"islactosefree"===e||"isglutenfree"===e||"occasion"===e||"aggregatedtotaltimeinminutes"===e||"nutritionalform"===e||"difficulty"===e)&&t.push("&"+e+"="+n[e].join("|"))}),t.join("")}var C={products:-1,recipes:-1,content:-1,stores:-1};return{getDataFromAPI:o,initialSearchResult:function(n){var i=""===e("orderby")?"":"&orderby="+e("orderby");o(1===t()?n+"&page=1"+(E(m())+i):n+"&page="+t()+(E(m())+i),function(t){if(t.Success){Search.store.apiUrl=n,f(t.Payload.TotalNumberResults),p(t.Payload.Facets),v(),void 0!==t.Payload.OrderBy&&void 0!==t.Payload.OrderBy.OrderByElements&&t.Payload.OrderBy.OrderByElements.length>0&&h(t.Payload.OrderBy);var i=t.Payload.TotalNumberResults,r=e("query");dataLayer.push({siteSearchResults:i,siteSearchTerm:r}),i>0?(s(t),w(t.Payload.TotalNumberResults),L("show")):(y(),S(),L("hide"))}else y(),L("hide")}),function(){var t,n;window.location.search.length>0&&(t=e("query")).length>0&&((n=document.createElement("div")).classList.add("search-term-query"),n.innerHTML="f\xfcr "+t,null!==document.querySelector(".content-title__headline")&&document.querySelector(".content-title__headline").append(n))}()},applyFilters:function(){for(var e,t=document.querySelector("div.search__container__filter__popup > div.popup-modal"),i=document.querySelectorAll('.filter-list-options input[type="checkbox"]:checked'),r=document.querySelector('div.popup-modal .radio-group input[type="radio"]:checked'),a=[],s=0;s<i.length;s++)a.push({group:i[s].dataset.groupkey,value:i[s].dataset.activeKey});Search.store.filtersString=E(a),e=null===r?"":"&orderby="+r.id,o(n(Search.store.type)+"&page=1"+E(a)+e+"&category="+Search.store.category,function(t){t.Success&&(k(1,E(a)+e),_(t)),window.scrollTo(0,250)}),document.querySelector(".search-results-container-popup").classList.add("hidden"),PopupModal.closeModal(t)},initSiteSearch:function(e){"all"!==e&&o(r(e),function(t){s(t,e)})},apiURL:n,store:{filtersString:"",baseApiUrl:"",apiUrl:"",category:void 0!=document.getElementById("Category")?document.getElementById("Category").value:"",datasource:"",type:"",recordsPerPage:12,orderBy:null!==document.querySelector(".search-results-container")?document.querySelector(".search-results-container").dataset.order:null}}}();!function(){var e,t,n=document.querySelectorAll('div[data-role="search-module"]');if(null!==document.querySelector(".site-search"))for(e=document.querySelectorAll('div[data-role="site-search-module"]'),t=0;t<e.length;t++)Search.initSiteSearch(e[t].dataset.searchFor.toLowerCase());if(n.length>0){for(t=0;t<n.length;t++){var i=n[t].dataset.searchFor,r=void 0!=document.getElementById("Category")?document.getElementById("Category").value:"",a=void 0!=document.getElementById("QueryDatasource")?document.getElementById("QueryDatasource").value:"";Search.initialSearchResult(Search.apiURL(i,a,r))}document.querySelector('button[data-role="filters"]').addEventListener("click",function(){var e=document.querySelector(".search-results-container-popup > div.popup-modal");document.querySelector(".search-results-container-popup").classList.remove("hidden"),PopupModal.showModal(e)},!1),document.querySelector(".popup-modal-content").addEventListener("click",function(e){("LABEL"===e.target.nodeName||"CHECKBOX"===e.target.nodeName||"SPAN"===e.target.nodeName)&&(e.stopImmediatePropagation(),"SPAN"===e.target.nodeName?Search.store.orderBy=e.target.parentNode.childNodes[1].value:"radio"===e.target.childNodes[1].type?Search.store.orderBy=e.target.childNodes[1].value:"checkbox"!==e.target.childNodes[1].type||e.target.classList.contains("disabled")||e.target.classList.toggle("checked"))}),document.querySelector('button[data-role="applyFilters"]').addEventListener("click",function(){Search.applyFilters()}),document.getElementById("search-tags").addEventListener("click",function(e){var t,n,i;if(null!==e.target.closest(".tag")){for(t=e.target.closest(".tag"),n=document.querySelectorAll('.filter-list-options input[type="checkbox"]:checked'),i=0;i<n.length;i++)t.dataset.group.toLowerCase()===n[i].dataset.groupkey&&t.dataset.activeKey.toLowerCase()===n[i].dataset.activeKey.toLowerCase()&&(n[i].checked=!1,n[i].parentNode.classList.remove("checked"));Search.applyFilters()}})}}(),contentTeaserSwiper=new Swiper(".content-teaser-list__container.swiper-container",{loop:!1,centeredSlides:!0,slidesPerView:"auto",spaceBetween:15,lazy:{loadPrevNext:!0,watchSlidesVisibility:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},breakpoints:{768:{centeredSlides:!1,slidesPerView:2,lazy:{loadPrevNextAmount:3}},992:{centeredSlides:!1,slidesPerView:3,spaceBetween:30,lazy:{loadPrevNextAmount:4}}}}),navTrigger=document.getElementById("metaNavTrigger"),metaNav=document.querySelector(".header__meta > .linklist"),navTrigger.addEventListener("click",function(){this.classList.toggle("active"),metaNav.classList.toggle("active")});var recipeSubCategorySwiper,productTeaserSwiper=new Swiper(".product-teaser-slider__container.swiper-container",{loop:!1,centeredSlides:!0,slidesPerView:"auto",spaceBetween:15,lazy:{loadPrevNext:!0,watchSlidesVisibility:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},breakpoints:{768:{centeredSlides:!1,slidesPerView:3,lazy:{loadPrevNextAmount:4}},992:{centeredSlides:!1,slidesPerView:4,spaceBetween:30,lazy:{loadPrevNextAmount:4}},1200:{centeredSlides:!1,slidesPerView:4,spaceBetween:30,lazy:{loadPrevNextAmount:4}}}}),breakpointSubCategories=window.matchMedia("(min-width:768px)"),recipeBreakpointChecker=function(){if(!0!==breakpointSubCategories.matches)return!1===breakpointSubCategories.matches?enableSubCategorySwiper():void 0;void 0!==recipeSubCategorySwiper&&recipeSubCategorySwiper.destroy(!0,!0)},enableSubCategorySwiper=function(){recipeSubCategorySwiper=new Swiper(".recipe-categories__container.swiper-container",{slidesPerView:"auto",spaceBetween:5,cssMode:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0,paginationClickable:!0},breakpoints:{768:{centeredSlides:!0,slidesPerView:"auto",spaceBetween:15}}})};breakpointSubCategories.addListener(recipeBreakpointChecker),recipeBreakpointChecker(),void 0!==(stageSlider=document.querySelector(".stage-slider"))&&null!==stageSlider&&(stageSliderSwiper=(stageSliderLength=(stageSliderSlides=stageSlider.querySelectorAll(".stage-slider__item")).length)>1?new Swiper(".stage-slider__container.swiper-container",{loop:!0,centeredSlides:!0,slidesPerView:1,pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}}):new Swiper(".stage-slider__container.swiper-container",{loop:!1,centeredSlides:!1,slidesPerView:1,pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})),MarkerClusterer=function(){"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n,i=0;i<t.length;i++)(n=t[i]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}function n(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var o=function t(){e(this,t),function(e,t){for(var n in t.prototype)e.prototype[n]=t.prototype[n]}(t,google.maps.OverlayView)},s=function(t){function s(t,n){var i;return e(this,s),(i=a(this,r(s).call(this))).cluster_=t,i.styles_=n,i.className_=i.cluster_.getMarkerClusterer().getClusterClass(),i.center_=null,i.div_=null,i.sums_=null,i.visible_=!1,i.setMap(t.getMap()),i}return i(s,o),n(s,[{key:"onAdd",value:function(){var e,t,n=this,i=this.cluster_.getMarkerClusterer(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,i;if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],a=!0,o=!1,s=void 0;try{for(i=e[Symbol.iterator]();!(a=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);a=!0);}catch(e){o=!0,s=e}finally{try{a||null==i.return||i.return()}finally{if(o)throw s}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(google.maps.version.split("."),2),a=r[0],o=r[1],s=100*parseInt(a,10)+parseInt(o,10);this.div_=document.createElement("div"),this.div_.className=this.className_,this.visible_&&this.show(),this.getPanes().overlayMouseTarget.appendChild(this.div_),this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){t=e}),google.maps.event.addDomListener(this.div_,"mousedown",function(){e=!0,t=!1}),s>=332&&google.maps.event.addDomListener(this.div_,"touchstart",function(e){e.stopPropagation()}),google.maps.event.addDomListener(this.div_,"click",function(r){if(e=!1,!t){if(google.maps.event.trigger(i,"click",n.cluster_),google.maps.event.trigger(i,"clusterclick",n.cluster_),i.getZoomOnClick()){var a=i.getMaxZoom(),o=n.cluster_.getBounds();i.getMap().fitBounds(o),setTimeout(function(){i.getMap().fitBounds(o),null!==a&&i.getMap().getZoom()>a&&i.getMap().setZoom(a+1)},100)}r.cancelBubble=!0,r.stopPropagation&&r.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){google.maps.event.trigger(i,"mouseover",n.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){google.maps.event.trigger(i,"mouseout",n.cluster_)})}},{key:"onRemove",value:function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)}},{key:"draw",value:function(){if(this.visible_){var e=this.getPosFromLatLng_(this.center_);this.div_.style.top=e.y+"px",this.div_.style.left=e.x+"px"}}},{key:"hide",value:function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1}},{key:"show",value:function(){var e,t,n;if(this.div_){var i=this.cluster_.getMarkerClusterer().ariaLabelFn(this.sums_.text),r=this.backgroundPosition_.split(" "),a=parseInt(r[0].replace(/^\s+|\s+$/g,""),10),o=parseInt(r[1].replace(/^\s+|\s+$/g,""),10);if(this.div_.style.cssText=this.createCss_(this.getPosFromLatLng_(this.center_)),e="",this.cluster_.getMarkerClusterer().getEnableRetinaIcons())e="width: ".concat(this.width_,"px; height: ").concat(this.height_,"px");else{var s=-1*o,l=-1*a+this.width_,c=-1*o+this.height_,u=-1*a;e="clip: rect(".concat(s,"px, ").concat(l,"px, ").concat(c,"px, ").concat(u,"px)")}t=["position: absolute","top: ".concat(o,"px"),"left: ".concat(a,"px"),e].join(";"),n=["position: absolute","top: ".concat(this.anchorText_[0],"px"),"left: ".concat(this.anchorText_[1],"px"),"color: ".concat(this.textColor_),"font-size: ".concat(this.textSize_,"px"),"font-family: ".concat(this.fontFamily_),"font-weight: ".concat(this.fontWeight_),"font-style: ".concat(this.fontStyle_),"text-decoration: ".concat(this.textDecoration_),"text-align: center","width: ".concat(this.width_,"px"),"line-height: ".concat(this.height_,"px")].join(";"),this.div_.innerHTML="\n<img alt='".concat(this.sums_.text,'\' aria-hidden="true" src="').concat(this.url_,'" style="').concat(t,'"/>\n<div aria-label="').concat(i,'" tabindex="0" style="').concat(n,'">\n  <span aria-hidden="true">').concat(this.sums_.text,"</span>\n</div>\n"),this.div_.title=void 0===this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title,this.div_.style.display=""}this.visible_=!0}},{key:"useStyle",value:function(e){var t,n;this.sums_=e,t=Math.max(0,e.index-1),t=Math.min(this.styles_.length-1,t),n=this.styles_[t],this.url_=n.url,this.height_=n.height,this.width_=n.width,this.anchorText_=n.anchorText||[0,0],this.anchorIcon_=n.anchorIcon||[Math.floor(this.height_/2),Math.floor(this.width_/2)],this.textColor_=n.textColor||"black",this.textSize_=n.textSize||11,this.textDecoration_=n.textDecoration||"none",this.fontWeight_=n.fontWeight||"bold",this.fontStyle_=n.fontStyle||"normal",this.fontFamily_=n.fontFamily||"Arial,sans-serif",this.backgroundPosition_=n.backgroundPosition||"0 0"}},{key:"setCenter",value:function(e){this.center_=e}},{key:"createCss_",value:function(e){return["z-index: ".concat(this.cluster_.getMarkerClusterer().getZIndex()),"cursor: pointer","position: absolute; top: ".concat(e.y,"px; left: ").concat(e.x,"px"),"width: ".concat(this.width_,"px; height: ").concat(this.height_,"px"),"-webkit-user-select: none","-khtml-user-select: none","-moz-user-select: none","-o-user-select: none","user-select: none"].join(";")}},{key:"getPosFromLatLng_",value:function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return t.x=Math.floor(t.x-this.anchorIcon_[1]),t.y=Math.floor(t.y-this.anchorIcon_[0]),t}}]),s}(),l=function(){function t(n){e(this,t),this.markerClusterer_=n,this.map_=this.markerClusterer_.getMap(),this.minClusterSize_=this.markerClusterer_.getMinimumClusterSize(),this.averageCenter_=this.markerClusterer_.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new s(this,this.markerClusterer_.getStyles())}return n(t,[{key:"getSize",value:function(){return this.markers_.length}},{key:"getMarkers",value:function(){return this.markers_}},{key:"getCenter",value:function(){return this.center_}},{key:"getMap",value:function(){return this.map_}},{key:"getMarkerClusterer",value:function(){return this.markerClusterer_}},{key:"getBounds",value:function(){for(var e=new google.maps.LatLngBounds(this.center_,this.center_),t=this.getMarkers(),n=0;n<t.length;n++)e.extend(t[n].getPosition());return e}},{key:"remove",value:function(){this.clusterIcon_.setMap(null),this.markers_=[],delete this.markers_}},{key:"addMarker",value:function(e){var t,n,i;if(this.isMarkerAlreadyAdded_(e))return!1;if(this.center_){if(this.averageCenter_){var r=this.markers_.length+1,a=(this.center_.lat()*(r-1)+e.getPosition().lat())/r,o=(this.center_.lng()*(r-1)+e.getPosition().lng())/r;this.center_=new google.maps.LatLng(a,o),this.calculateBounds_()}}else this.center_=e.getPosition(),this.calculateBounds_();if(e.isAdded=!0,this.markers_.push(e),t=this.markers_.length,null!==(n=this.markerClusterer_.getMaxZoom())&&this.map_.getZoom()>n)e.getMap()!==this.map_&&e.setMap(this.map_);else if(t<this.minClusterSize_)e.getMap()!==this.map_&&e.setMap(this.map_);else if(t===this.minClusterSize_)for(i=0;i<t;i++)this.markers_[i].setMap(null);else e.setMap(null);return this.updateIcon_(),!0}},{key:"isMarkerInClusterBounds",value:function(e){return this.bounds_.contains(e.getPosition())}},{key:"calculateBounds_",value:function(){var e=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(e)}},{key:"updateIcon_",value:function(){var e,t,n=this.markers_.length,i=this.markerClusterer_.getMaxZoom();null!==i&&this.map_.getZoom()>i?this.clusterIcon_.hide():n<this.minClusterSize_?this.clusterIcon_.hide():(e=this.markerClusterer_.getStyles().length,t=this.markerClusterer_.getCalculator()(this.markers_,e),this.clusterIcon_.setCenter(this.center_),this.clusterIcon_.useStyle(t),this.clusterIcon_.show())}},{key:"isMarkerAlreadyAdded_",value:function(e){if(this.markers_.indexOf)return-1!==this.markers_.indexOf(e);for(var t=0;t<this.markers_.length;t++)if(e===this.markers_[t])return!0;return!1}}]),t}(),c=function(e,t,n){return void 0!==e[t]?e[t]:n},u=function(t){function s(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e(this,s),(n=a(this,r(s).call(this))).options=o,n.markers_=[],n.clusters_=[],n.listeners_=[],n.activeMap_=null,n.ready_=!1,n.ariaLabelFn=n.options.ariaLabelFn||function(){return""},n.zIndex_=n.options.zIndex||google.maps.Marker.MAX_ZINDEX+1,n.gridSize_=n.options.gridSize||60,n.minClusterSize_=n.options.minimumClusterSize||2,n.maxZoom_=n.options.maxZoom||null,n.styles_=n.options.styles||[],n.title_=n.options.title||"",n.zoomOnClick_=c(n.options,"zoomOnClick",!0),n.averageCenter_=c(n.options,"averageCenter",!1),n.ignoreHidden_=c(n.options,"ignoreHidden",!1),n.enableRetinaIcons_=c(n.options,"enableRetinaIcons",!1),n.imagePath_=n.options.imagePath||s.IMAGE_PATH,n.imageExtension_=n.options.imageExtension||s.IMAGE_EXTENSION,n.imageSizes_=n.options.imageSizes||s.IMAGE_SIZES,n.calculator_=n.options.calculator||s.CALCULATOR,n.batchSize_=n.options.batchSize||s.BATCH_SIZE,n.batchSizeIE_=n.options.batchSizeIE||s.BATCH_SIZE_IE,n.clusterClass_=n.options.clusterClass||"cluster",-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(n.batchSize_=n.batchSizeIE_),n.setupStyles_(),n.addMarkers(i,!0),n.setMap(t),n}return i(s,o),n(s,[{key:"onAdd",value:function(){var e=this;this.activeMap_=this.getMap(),this.ready_=!0,this.repaint(),this.prevZoom_=this.getMap().getZoom(),this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){var t=e.getMap(),n=t.minZoom||0,i=Math.min(t.maxZoom||100,t.mapTypes[t.getMapTypeId()].maxZoom),r=Math.min(Math.max(e.getMap().getZoom(),n),i);e.prevZoom_!=r&&(e.prevZoom_=r,e.resetViewport_(!1))}),google.maps.event.addListener(this.getMap(),"idle",function(){e.redraw_()})]}},{key:"onRemove",value:function(){for(var e,t,n=0;n<this.markers_.length;n++)this.markers_[n].getMap()!==this.activeMap_&&this.markers_[n].setMap(this.activeMap_);for(e=0;e<this.clusters_.length;e++)this.clusters_[e].remove();for(this.clusters_=[],t=0;t<this.listeners_.length;t++)google.maps.event.removeListener(this.listeners_[t]);this.listeners_=[],this.activeMap_=null,this.ready_=!1}},{key:"draw",value:function(){}},{key:"setupStyles_",value:function(){var e,t;if(!(this.styles_.length>0))for(e=0;e<this.imageSizes_.length;e++)t=this.imageSizes_[e],this.styles_.push({url:this.imagePath_+(e+1)+"."+this.imageExtension_,height:t,width:t})}},{key:"fitMapToMarkers",value:function(){for(var e=this.getMarkers(),t=new google.maps.LatLngBounds,n=0;n<e.length;n++)!e[n].getVisible()&&this.getIgnoreHidden()||t.extend(e[n].getPosition());this.getMap().fitBounds(t)}},{key:"getGridSize",value:function(){return this.gridSize_}},{key:"setGridSize",value:function(e){this.gridSize_=e}},{key:"getMinimumClusterSize",value:function(){return this.minClusterSize_}},{key:"setMinimumClusterSize",value:function(e){this.minClusterSize_=e}},{key:"getMaxZoom",value:function(){return this.maxZoom_}},{key:"setMaxZoom",value:function(e){this.maxZoom_=e}},{key:"getZIndex",value:function(){return this.zIndex_}},{key:"setZIndex",value:function(e){this.zIndex_=e}},{key:"getStyles",value:function(){return this.styles_}},{key:"setStyles",value:function(e){this.styles_=e}},{key:"getTitle",value:function(){return this.title_}},{key:"setTitle",value:function(e){this.title_=e}},{key:"getZoomOnClick",value:function(){return this.zoomOnClick_}},{key:"setZoomOnClick",value:function(e){this.zoomOnClick_=e}},{key:"getAverageCenter",value:function(){return this.averageCenter_}},{key:"setAverageCenter",value:function(e){this.averageCenter_=e}},{key:"getIgnoreHidden",value:function(){return this.ignoreHidden_}},{key:"setIgnoreHidden",value:function(e){this.ignoreHidden_=e}},{key:"getEnableRetinaIcons",value:function(){return this.enableRetinaIcons_}},{key:"setEnableRetinaIcons",value:function(e){this.enableRetinaIcons_=e}},{key:"getImageExtension",value:function(){return this.imageExtension_}},{key:"setImageExtension",value:function(e){this.imageExtension_=e}},{key:"getImagePath",value:function(){return this.imagePath_}},{key:"setImagePath",value:function(e){this.imagePath_=e}},{key:"getImageSizes",value:function(){return this.imageSizes_}},{key:"setImageSizes",value:function(e){this.imageSizes_=e}},{key:"getCalculator",value:function(){return this.calculator_}},{key:"setCalculator",value:function(e){this.calculator_=e}},{key:"getBatchSizeIE",value:function(){return this.batchSizeIE_}},{key:"setBatchSizeIE",value:function(e){this.batchSizeIE_=e}},{key:"getClusterClass",value:function(){return this.clusterClass_}},{key:"setClusterClass",value:function(e){this.clusterClass_=e}},{key:"getMarkers",value:function(){return this.markers_}},{key:"getTotalMarkers",value:function(){return this.markers_.length}},{key:"getClusters",value:function(){return this.clusters_}},{key:"getTotalClusters",value:function(){return this.clusters_.length}},{key:"addMarker",value:function(e,t){this.pushMarkerTo_(e),t||this.redraw_()}},{key:"addMarkers",value:function(e,t){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&this.pushMarkerTo_(e[n]);t||this.redraw_()}},{key:"pushMarkerTo_",value:function(e){var t=this;e.getDraggable()&&google.maps.event.addListener(e,"dragend",function(){t.ready_&&(e.isAdded=!1,t.repaint())}),e.isAdded=!1,this.markers_.push(e)}},{key:"removeMarker",value:function(e,t){var n=this.removeMarker_(e);return!t&&n&&this.repaint(),n}},{key:"removeMarkers",value:function(e,t){for(var n,i=!1,r=0;r<e.length;r++)n=this.removeMarker_(e[r]),i=i||n;return!t&&i&&this.repaint(),i}},{key:"removeMarker_",value:function(e){var t,n=-1;if(this.markers_.indexOf)n=this.markers_.indexOf(e);else for(t=0;t<this.markers_.length;t++)if(e===this.markers_[t]){n=t;break}return-1!==n&&(e.setMap(null),this.markers_.splice(n,1),!0)}},{key:"clearMarkers",value:function(){this.resetViewport_(!0),this.markers_=[]}},{key:"repaint",value:function(){var e=this.clusters_.slice();this.clusters_=[],this.resetViewport_(!1),this.redraw_(),setTimeout(function(){for(var t=0;t<e.length;t++)e[t].remove()},0)}},{key:"getExtendedBounds",value:function(e){var t,n,i,r=this.getProjection(),a=new google.maps.LatLng(e.getNorthEast().lat(),e.getNorthEast().lng()),o=new google.maps.LatLng(e.getSouthWest().lat(),e.getSouthWest().lng()),s=r.fromLatLngToDivPixel(a);return s.x+=this.gridSize_,s.y-=this.gridSize_,(t=r.fromLatLngToDivPixel(o)).x-=this.gridSize_,t.y+=this.gridSize_,n=r.fromDivPixelToLatLng(s),i=r.fromDivPixelToLatLng(t),e.extend(n),e.extend(i),e}},{key:"redraw_",value:function(){this.createClusters_(0)}},{key:"resetViewport_",value:function(e){for(var t,n,i=0;i<this.clusters_.length;i++)this.clusters_[i].remove();for(this.clusters_=[],t=0;t<this.markers_.length;t++)(n=this.markers_[t]).isAdded=!1,e&&n.setMap(null)}},{key:"distanceBetweenPoints_",value:function(e,t){var n=(t.lat()-e.lat())*Math.PI/180,i=(t.lng()-e.lng())*Math.PI/180,r=Math.sin(n/2)*Math.sin(n/2)+Math.cos(e.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(i/2)*Math.sin(i/2);return 12742*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))}},{key:"isMarkerInBounds_",value:function(e,t){return t.contains(e.getPosition())}},{key:"addToClosestCluster_",value:function(e){for(var t,n,i,r,a=4e4,o=null,s=0;s<this.clusters_.length;s++)(n=(t=this.clusters_[s]).getCenter())&&((i=this.distanceBetweenPoints_(n,e.getPosition()))<a&&(a=i,o=t));o&&o.isMarkerInClusterBounds(e)?o.addMarker(e):((r=new l(this)).addMarker(e),this.clusters_.push(r))}},{key:"createClusters_",value:function(e){var t,n,i=this;if(this.ready_){0===e&&(google.maps.event.trigger(this,"clusteringbegin",this),void 0!==this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),t=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));for(var r=this.getExtendedBounds(t),a=Math.min(e+this.batchSize_,this.markers_.length),o=e;o<a;o++)!(n=this.markers_[o]).isAdded&&this.isMarkerInBounds_(n,r)&&(!this.ignoreHidden_||this.ignoreHidden_&&n.getVisible())&&this.addToClosestCluster_(n);a<this.markers_.length?this.timerRefStatic=window.setTimeout(function(){i.createClusters_(a)},0):(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this))}}}],[{key:"CALCULATOR",value:function(e,t){for(var n=0,i=e.length,r=i;0!==r;)r=Math.floor(r/10),n++;return n=Math.min(n,t),{text:i.toString(),index:n,title:""}}}]),s}();return u.BATCH_SIZE=2e3,u.BATCH_SIZE_IE=500,u.IMAGE_PATH="../images/m",u.IMAGE_EXTENSION="png",u.IMAGE_SIZES=[53,56,66,78,90],u}(),serviceBoxListSwiper=new Swiper(".service-box-list__container.swiper-container",{loop:!1,centeredSlides:!0,slidesPerView:"auto",spaceBetween:15,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},breakpoints:{768:{centeredSlides:!0,slidesPerView:2},992:{centeredSlides:!1,slidesPerView:4,spaceBetween:30}}});var subNavActiveItem,mainNavActiveItem,subNavIndicator=document.querySelector(".navigation__sub-indicator"),mainNav=document.querySelector(".navigation__main"),subNavCurrent=document.querySelector(".navigation__sub.current");if(null!==subNavCurrent&&(!subNavCurrent.querySelector(".active")&&!mainNav.querySelector(".active")||(document.querySelector(".navigation__sub-link.active")?(subNavActiveItem=document.querySelector(".navigation__sub-link.active").innerText,subNavIndicator.innerHTML='<div class="navigation__sub-indicator-item">'+subNavActiveItem+"</div>"):!document.querySelector(".navigation__main-link.active")||(mainNavActiveItem=document.querySelector(".navigation__main-link.active").innerText,subNavIndicator.innerHTML='<div class="navigation__sub-indicator-item">'+mainNavActiveItem+"</div>"),subNavIndicator.addEventListener("click",function(){this.classList.toggle("active"),subNavCurrent.classList.toggle("active")}))),recipeTeaserSwiper=new Swiper(".recipe-teaser-list__container.swiper-container",{loop:!1,centeredSlides:!0,slidesPerView:"auto",spaceBetween:15,lazy:{loadPrevNext:!0,watchSlidesVisibility:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},breakpoints:{768:{centeredSlides:!1,slidesPerView:2,lazy:{loadPrevNextAmount:3}},992:{centeredSlides:!1,slidesPerView:3,spaceBetween:30,lazy:{loadPrevNextAmount:4}}}}),(inputSearch=document.querySelector(".header__searchpopup__input")).addEventListener("keyup",triggerRedirect),null!==(shareButtons=document.getElementById("socialMediaSharing"))){var activation=document.getElementById("socialmediaActivation"),items=shareButtons.querySelectorAll(".socialmediasharing__link"),shareButtonMobile=document.getElementById("socialMediaShareMobile");activation.addEventListener("click",function(){for(i=0;i<items.length;i++){var e=items[i].getAttribute("data-url");items[i].setAttribute("href",e),items[i].removeAttribute("data-url"),items[i].classList.remove("inactive"),items[i].classList.add("active")}activation.classList.add("hidden")}),shareButtonMobile.addEventListener("click",function(){navigator.share?navigator.share({title:document.title,url:window.location.href}).then(function(){}).catch(function(){}):console.log("web share not supported")})}StoreFinder=function(){function e(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search);return null===t?"":decodeURIComponent(t[1].replace(/\+/g," "))}function t(e){return e*Math.PI/180}function n(){var e=map.getBounds(),n=t(e.getSouthWest().lat()),i=t(e.getNorthEast().lat()),r=t(e.getNorthEast().lat()-e.getSouthWest().lat()),a=t(e.getNorthEast().lng()-e.getSouthWest().lng()),o=Math.sin(r/2)*Math.sin(r/2)+Math.cos(n)*Math.cos(i)*Math.sin(a/2)*Math.sin(a/2),s=6371e3*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)));return Math.round(s/2e3)}function i(e,t){var n=new XMLHttpRequest;n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t(JSON.parse(n.response)):console.error("error"))},n.open("GET",e),n.send()}function r(e){void 0!==navigator.geolocation?navigator.geolocation.getCurrentPosition(function(t){e({lat:t.coords.latitude,lng:t.coords.longitude}),currentPosition.lat=t.coords.latitude,currentPosition.lng=t.coords.longitude}):(e(v.initialMap.center),currentPosition=v.initialMap.center)}function a(e,t){i(function(e,t){var n=void 0===t?30:t;return window.location.protocol+"//"+window.location.host+"/api/sitecore/stores/FindStoresforMap?ElementsPerPage=10000&lat="+e.lat+"&lng="+e.lng+"&radius="+n}(e,t),function(e){e.Success&&s(e.Payload)})}function o(e){i(function(e){return window.location.protocol+"//"+window.location.host+"/api/sitecore/stores/StoreDetails?storeid="+e}(e),function(e){!function(e){if(e.Success){var t=document.querySelector(".store-info"),n=e.Payload,i=""!==n.Tel?"<p>Telefon "+n.Tel+"</p>":"",r=n.OpenedText,a=n.IsTradepartner,o=n.CloseIcon,s="";a||(s=n.Opened?'<div class="clock is-open">'+r+"</div >":'<div class="clock is-closed">'+r+"</div>");var l=""!==n.OpeningTime?"<div>"+n.OpeningTime+"</div>":"",c=null!==n.StoreDetailPage&&""!==n.StoreDetailPage?'<a href="'+n.StoreDetailPage+'">Marktseite</a>':"",u=null!==n.PartOfCity&&""!==n.PartOfCity?"<address>"+n.PartOfCity+"</address>":"",d='<div class="store-info__inner"><div class="store-info__header"><div class="store-name">'+n.StoreName+'</div><div class="store-logo"><img class="img-responsive" alt="logo" src="'+StoreFinder.baseUrl+n.Logo+'" /></div><div class="close-store" data-role="close-store"><img data-role="close-store" src="'+o+'" /></div> </div><div class="store-info__body"><address>'+n.Street+"</address><address>"+n.PostalCode+" "+n.City+"</address>"+u+"<address>"+n.Country+"</address>"+i+l+s+'</div><div class="store-info__footer">'+c+'<a target="_blank" href="'+n.GoogleMapsLink+'">Routenplaner</a></div></div>';t.innerHTML="",t.innerHTML=d}}(e)})}function s(e){for(var t=0;t<e.length;t++)v.storesOnMap.includes(e[t].Id)||(v.storesOnMap.push(e[t].Id),l(e[t]));h(document.getElementById("showAlnaturaStores").checked)}function l(e){var t=new google.maps.MarkerImage(e.Pin),n=new google.maps.LatLng(parseFloat(e.Lat.replace(/,/g,".")),parseFloat(e.Lng.replace(/,/g,"."))),i=new google.maps.Marker({position:n,icon:t,activeIcon:e.ActivePin,defaultIcon:e.Pin,map:window.map,objID:e.Id,isAlnatura:"Alnatura Super Natur Markt"===e.Tradepartner});"Alnatura Super Natur Markt"!==e.Tradepartner&&(window.markerClusterer.addMarker(i),v.clusters.push(i)),v.markers.push(i),i.addListener("click",function(){!function(e){for(var t=0;t<v.markers.length;t++)v.markers[t].setIcon(v.markers[t].defaultIcon);e.setIcon(e.activeIcon),o(e.objID)}(i)})}function c(e,t){var n=new google.maps.Geocoder,i={address:e};n.geocode(i,function(n,i){if("OK"==i){var r={lat:n[0].geometry.location.lat(),lng:n[0].geometry.location.lng()};currentPosition=r,t(r)}else alert(e+" not found")})}function u(e){var t,n={center:void 0===e?config.initialMap.latLng:e,mapTypeId:"roadmap",zoomControl:!0,scaleControl:!0,streetViewControl:!1,noClear:!0,mapTypeControl:!1,zoom:11};window.map=new google.maps.Map(document.getElementById("map"),n),window.bounds=new google.maps.LatLngBounds,new google.maps.places.Autocomplete(document.getElementById("addressInput")).setComponentRestrictions({country:["de","at","ch"]}),g(),window.markerClusterer=new MarkerClusterer(window.map,[],{imagePath:"/Content/Assets/Images/cluster",maxZoom:18,gridSize:120,minimumClusterSize:7,zoomOnClick:!0,ignoreHidden:!0}),null!==(t=document.querySelector(".store-finder-modal"))&&t.classList.contains("is--visible")&&PopupModal.closeAllModals(),google.maps.event.addListener(map,"dragstart",d),google.maps.event.addListener(map,"dragend",m),google.maps.event.addListener(map,"zoom_changed",p)}function d(){document.querySelector(".store-info").innerHTML=""}function m(){a({lat:window.map.getCenter().lat(),lng:window.map.getCenter().lng()},n())}function p(){a({lat:window.map.getCenter().lat(),lng:window.map.getCenter().lng()},n())}function h(t){for(var n=0;n<v.markers.length;n++)v.markers[n].isAlnatura||v.markers[n].setVisible(!t);t?markerClusterer.clearMarkers():markerClusterer.addMarkers(v.clusters),function(t){var n,i=document.getElementById("addressInput").value;i||(i=e("query")),i||(i=currentPosition.lat+"|"+currentPosition.lng),n=t?"Suche: AlnaturaM\xe4rkte":"Suche: Alle M\xe4rkte",dataLayer.push({eventCategory:"Marktfinder",eventAction:n,eventLabel:i,event:"event-tracking"})}(t)}function g(){r(function(e){var t={url:"/-/media/Foundation/Assets/current-location.png",scaledSize:new google.maps.Size(40,40),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(0,0)},n=new google.maps.LatLng(e);new google.maps.Marker({position:n,map:map,icon:t})})}var v={initialMap:{center:{lat:51.33296,lng:6.6066826},radius:30},storesOnMap:[],markers:[],clusters:[]};return currentPosition={lat:51.33296,lng:6.6066826},{init:function(){var t=e("query");""===t?r(function(e){u(e),a(e)}):c(t,function(e){u(e),a(e)})},mapInit:u,showHideMarkers:h,getCurrentLocation:r,findLocationByAddress:c,getAllStores:a}}(),null!==document.getElementById("map")&&(StoreFinder.init(),document.getElementById("alnaturaOnly").addEventListener("click",function(){document.getElementById("showAlnaturaStores").checked=this.checked,StoreFinder.showHideMarkers(this.checked)}),document.getElementById("showAlnaturaStores").addEventListener("click",function(){document.getElementById("alnaturaOnly").checked=this.checked,StoreFinder.showHideMarkers(this.checked)}),document.querySelector(".find-location").addEventListener("click",function(){StoreFinder.getCurrentLocation(function(e){StoreFinder.getAllStores(e),window.map.panTo(e),PopupModal.closeAllModals()})}),document.querySelector(".store-info").addEventListener("click",function(e){"close-store"===e.target.dataset.role&&(document.querySelector(".store-info").innerHTML="")}),document.getElementById("addressSearch").addEventListener("click",function(e){var t,n;e.preventDefault(),(t=document.getElementById("findLocationForm")).checkValidity()?(n=document.getElementById("addressInput").value,StoreFinder.findLocationByAddress(n,function(e){StoreFinder.mapInit(e),StoreFinder.getAllStores(e)})):t.reportValidity()})),navigationalTeaserSwiper=new Swiper(".navigational-teaser.swiper-container",{loop:!1,centeredSlides:!1,slidesPerView:"2",spaceBetween:15,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0},breakpoints:{768:{slidesPerView:4,spaceBetween:15},992:{slidesPerView:4,spaceBetween:30}}});var subNavSwiper,subNavSwiperDisabled,breakpointChecker=function(){return!1===breakpoint.matches?disableSwiper():!0===breakpoint.matches?enableSwiper():void 0},disableSwiper=function(){new Swiper(".navigation__sub.current .navigation__sub-list.swiper-container",{init:!1})},enableSwiper=function(){new Swiper(".navigation__sub.current .navigation__sub-list.swiper-container",{init:!0,navigation:{nextEl:".navigation__sub-list.swiper-container .swiper-button-next",prevEl:".navigation__sub-list.swiper-container .swiper-button-prev"},breakpoints:{992:{centeredSlides:!1,freeMode:!0,slidesPerView:"auto",spaceBetween:30}}})};(breakpoint=window.matchMedia("(min-width:992px)")).addListener(breakpointChecker),breakpointChecker(),productNutritionSwipe=new Swiper(".nutrition-group__content.swiper-container",{slidesPerView:1,spaceBetween:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{768:{slidesPerView:"auto",spaceBetween:0}}}),null!==(productTabs=document.querySelector(".tab-box"))&&(tabs=new Tabs({elem:"tabs",open:0}));var breakpoint,mySwiper;breakpointChecker=function(){if(!0!==breakpoint.matches)return!1===breakpoint.matches?enableSwiper():void 0;void 0!==mySwiper&&mySwiper.destroy(!0,!0)},enableSwiper=function(){mySwiper=new Swiper(".products-sub-categories__container.swiper-container",{loop:!0,slidesPerView:"auto",centeredSlides:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{clickable:!0,el:".swiper-pagination",dynamicBullets:!0,paginationClickable:!0},breakpoints:{768:{centeredSlides:!0,slidesPerView:1,spaceBetween:30}}})};(breakpoint=window.matchMedia("(min-width:768px)")).addListener(breakpointChecker),breakpointChecker();var newsletterFormShort=document.getElementById("newsletter-registration-short"),newsletterInput=document.getElementById("form-newsletter__input"),newsletterLegalText=document.getElementById("form-newsletter_legaltext"),newsletterLegalTextClose=document.getElementById("form-newsletter_legaltext-close"),newsletterLegalTrigger=document.getElementById("legalActivationTrigger"),newsletterCheckbox=document.getElementById("newsletter-form-short-checkbox"),legalFocus=function(){newsletterLegalText.classList.add("active")},legalClose=function(){newsletterLegalText.classList.remove("active")},formShortSubmit=function(e){var t=document.getElementById("form-short-name").value.length,n=document.getElementById("form-short-email").value.length;(0!==t||0!==n)&&e.preventDefault()};for(null!==newsletterFormShort&&(newsletterInput.addEventListener("focus",legalFocus),newsletterLegalTextClose.addEventListener("click",legalClose),null!==newsletterLegalTrigger&&newsletterLegalTrigger.addEventListener("click",function(e){legalFocus(),e.preventDefault()}),newsletterFormShort.addEventListener("submit",formShortSubmit)),iframes=document.querySelectorAll(".iframe"),i=0;i<iframes.length;i++)iframes[i].addEventListener("click",function(){var e=this.querySelector(".iframe__placeholder"),t=this.getAttribute("data-iframe-src"),n=document.createElement("iframe");n.setAttribute("class","iframe__video"),n.setAttribute("src",t),n.setAttribute("frameborder","0"),n.setAttribute("allow","accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"),n.setAttribute("allowfullscreen",""),e.style.display="none",this.insertBefore(n,this.firstChild)});null!==(backToTopButton=document.getElementById("button__back-to-top"))&&(document.addEventListener("scroll",function(){document.body.scrollTop>180||document.documentElement.scrollTop>180?backToTopButton.classList.add("active"):backToTopButton.classList.contains("active")&&backToTopButton.classList.remove("active")}),scrollToTop=function(){window.scrollTo({top:0,behavior:"smooth"})},backToTopButton.addEventListener("click",scrollToTop));var navbar=document.getElementById("jumpNavBar"),links=document.querySelectorAll(".jumpmark-navigation__link"),container=document.querySelector(".jumpmark-navigation__container"),sections=document.querySelectorAll(".jumpmark__target"),makeNavLinksSmooth=function(){var e=document.querySelectorAll(".jumpmark-navigation__link"),t=function(t){e.hasOwnProperty(t)&&e[t].addEventListener("click",function(n){n.preventDefault();var i=document.querySelector(e[t].hash),r=navbar.offsetHeight,a=i.offsetTop-r;window.scrollTo({top:a,behavior:"smooth"})})};for(var n in e)t(n)},spyScrolling=function(){var e=navbar.offsetTop;document.addEventListener("scroll",function(){(document.documentElement.scrollTop||document.body.scrollTop)>=e?navbar.classList.add("sticky"):navbar.classList.remove("sticky")})},changeLinkState=function(){for(var e,t=sections.length;--t&&window.scrollY+50<sections[t].offsetTop-5;);links.forEach(function(e){return e.classList.remove("active")}),links[t].classList.add("active"),e=document.querySelector(".jumpmark-navigation__link.active").offsetLeft,container.scrollTo({left:e,behavior:"smooth"})};null!==navbar&&(makeNavLinksSmooth(),spyScrolling(),changeLinkState(),window.addEventListener("scroll",changeLinkState));var newsletterFormLong=document.getElementById("newsletter-registration-long"),newsletterSelectStores=document.querySelector(".js-choices-stores"),honeyPotName=document.getElementById("form-long-name"),honeyPotEmail=document.getElementById("form-long-email");null!==newsletterFormLong&&(choices=new Choices(newsletterSelectStores),newsletterFormLong.addEventListener("change",function(){var e=document.querySelector("[data-newsletter-form-conditional]");document.getElementById("filialkunde2").checked?e.classList.remove("form--hidden"):document.getElementById("filialkunde1").checked&&e.classList.add("form--hidden")}),formLongSubmit=function(e){var t=honeyPotName.value.length,n=honeyPotEmail.value.length;(0!==t||0!==n)&&e.preventDefault()},newsletterFormLong.addEventListener("submit",formLongSubmit));const contactform=document.getElementById("contactform-long");if(honeyPotName=document.getElementById("form-contact-name"),honeyPotEmail=document.getElementById("form-contact-email"),null!==contactform){var contactformTopic=document.querySelector("[data-select-contact-trigger]"),mailForm=document.getElementById("contact-mail"),mailFormRepeat=document.getElementById("contact-mailrepeat");contactformTopic.addEventListener("change",function(){var e,t=contactformTopic.value,n=document.querySelectorAll("[data-form-condition-product]"),i=document.querySelectorAll("[data-form-condition-reclamation]");if("Produkte allgemein"==t){for(e=0;e<i.length;e++)i[e].classList.add("form--hidden");for(e=0;e<n.length;e++)n[e].classList.remove("form--hidden"),n[e].classList.add("visible")}else if("Produktqualit\xe4t / Reklamation"==t){for(e=0;e<n.length;e++)n[e].classList.add("form--hidden");for(e=0;e<i.length;e++)i[e].classList.remove("form--hidden")}else{for(e=0;e<n.length;e++)n[e].classList.add("form--hidden");for(e=0;e<i.length;e++)i[e].classList.add("form--hidden")}}),mailFormRepeat.addEventListener("blur",function(){mailForm.value!==mailFormRepeat.value?mailFormRepeat.setCustomValidity("E-Mail-Adressen stimmen nicht \xfcberein"):mailFormRepeat.setCustomValidity("")}),contactform.addEventListener("invalid",function(e){e.target.className+=" invalid"},!0),contactform.addEventListener("submit",function(e){var t,n,i=honeyPotName.value.length,r=honeyPotEmail.value.length;(0===i||0===r)&&(e.preventDefault(),(t=new XMLHttpRequest).open("POST","/api/sitecore/Forms/SendContactForm",!0),t.onloadstart=function(){contactform.classList.add("loading")},t.onload=function(){if(contactform.classList.remove("loading"),this.status>=200&&this.status<400){var e=this.response;contactform.classList.remove("loading"),contactform.innerHTML=e,contactform.scrollIntoView({block:"start",behavior:"smooth"})}else contactform.innerHTML="Etwas ist schief gelaufen!"},t.onerror=function(){},n=document.getElementById("contactform-long"),PrepareHiddenFieldsToBeSent(n),t.send(new FormData(n)))})}if(supportsVideo=!!document.createElement("video").canPlayType){var video=document.getElementById("videoPlayer"),videoContainer=document.getElementById("videoContainer"),videoControls=document.getElementById("video-controls"),playpause=document.getElementById("playpause"),stop=document.getElementById("stop"),mute=document.getElementById("mute"),volinc=document.getElementById("volinc"),voldec=document.getElementById("voldec"),progress=document.getElementById("progress"),progressBar=document.getElementById("progress-bar"),fullscreen=document.getElementById("fs"),fullScreenEnabled=!!(document.fullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled||document.createElement("video").webkitRequestFullScreen),alterVolume=function(e){var t=Math.floor(10*video.volume)/10;"+"===e?t<1&&(video.volume+=.1):"-"===e&&t>0&&(video.volume-=.1)};if(null!==video){video.controls=!1,videoControls.style.display="flex",playpause.addEventListener("click",function(){video.paused||video.ended?(playpause.classList.add("playing"),video.play()):(video.pause(),playpause.classList.remove("playing"))}),stop.addEventListener("click",function(){video.pause(),video.currentTime=0,progress.value=0,playpause.classList.remove("playing")}),mute.addEventListener("click",function(){video.muted=!video.muted}),volinc.addEventListener("click",function(){alterVolume("+")}),voldec.addEventListener("click",function(){alterVolume("-")}),video.addEventListener("loadedmetadata",function(){progress.setAttribute("max",video.duration)}),video.addEventListener("timeupdate",function(){progress.value=video.currentTime,progressBar.style.width=Math.floor(video.currentTime/video.duration*100)+"%"}),progress.addEventListener("click",function(e){var t=(e.pageX-this.offsetLeft)/this.offsetWidth;video.currentTime=t*video.duration}),fullScreenEnabled||(fullscreen.style.display="none"),fullscreen.addEventListener("click",function(){handleFullscreen()});var handleFullscreen=function(){isFullScreen()?(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),setFullscreenData(!1)):(videoContainer.requestFullscreen?videoContainer.requestFullscreen():videoContainer.mozRequestFullScreen?videoContainer.mozRequestFullScreen():videoContainer.webkitRequestFullScreen?videoContainer.webkitRequestFullScreen():videoContainer.msRequestFullscreen&&videoContainer.msRequestFullscreen(),setFullscreenData(!0))},isFullScreen=function(){return!!(document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)},setFullscreenData=function(e){videoContainer.setAttribute("data-fullscreen",!!e)};document.addEventListener("fullscreenchange",function(){setFullscreenData(!(!document.fullscreen&&!document.fullscreenElement))}),document.addEventListener("webkitfullscreenchange",function(){setFullscreenData(!!document.webkitIsFullScreen)}),document.addEventListener("mozfullscreenchange",function(){setFullscreenData(!!document.mozFullScreen)}),document.addEventListener("msfullscreenchange",function(){setFullscreenData(!!document.msFullscreenElement)})}}var contestform=document.getElementById("contestform");honeyPotName=document.getElementById("form-contact-name"),honeyPotEmail=document.getElementById("form-contact-email");null!==contestform&&(mailForm=document.getElementById("contest-mail"),(mailFormRepeat=document.getElementById("contest-mailrepeat")).addEventListener("blur",function(){mailForm.value!==mailFormRepeat.value?mailFormRepeat.setCustomValidity("E-Mail-Adressen stimmen nicht \xfcberein"):mailFormRepeat.setCustomValidity("")}),contestform.addEventListener("invalid",function(e){e.target.className+=" invalid"},!0),contestform.addEventListener("submit",function(e){var t,n,i=honeyPotName.value.length,r=honeyPotEmail.value.length;(0===i||0===r)&&(e.preventDefault(),(t=new XMLHttpRequest).open("POST","/api/sitecore/hardcodedforms/SendContestForm",!0),t.onloadstart=function(){contestform.classList.add("loading")},t.onload=function(){if(contestform.classList.remove("loading"),this.status>=200&&this.status<400){var e=this.response;contestform.classList.remove("loading"),contestform.innerHTML=e,contestform.scrollIntoView({block:"start",behavior:"smooth"})}else contestform.innerHTML="Etwas ist schief gelaufen!"},t.onerror=function(){},n=document.getElementById("contestform"),PrepareHiddenFieldsToBeSent(n),t.send(new FormData(n)))}));