inc. wave separator on homepage + linking both layouts to render page content
1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
"use strict";(self.webpackChunkliebling=self.webpackChunkliebling||[]).push([[773],{480:(t,e,n)=>{var r=n(755),o=n.n(r),i=n(631),a=n.n(i),c=n(488),l=(n(418),n(433)),s=n(414),u=n(360),h=n.n(u),f=n(911),d=(n(350),n(769));function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function p(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */p=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function s(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),c=new S(o||[]);return r(a,"_invoke",{value:k(t,n,c)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var h={};function f(){}function d(){}function v(){}var g={};l(g,i,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(_([])));b&&b!==e&&n.call(b,i)&&(g=b);var w=v.prototype=f.prototype=Object.create(g);function j(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(r,i,a,c){var l=u(t[r],t,i);if("throw"!==l.type){var s=l.arg,h=s.value;return h&&"object"==m(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(h).then((function(t){s.value=t,a(s)}),(function(t){return o("throw",t,a,c)}))}c(l.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function k(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=L(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function L(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,L(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:O}}function O(){return{value:void 0,done:!0}}return d.prototype=v,r(w,"constructor",{value:v,configurable:!0}),r(v,"constructor",{value:d,configurable:!0}),d.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},j(x.prototype),l(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new x(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(w),l(w,c,"Generator"),l(w,i,(function(){return this})),l(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=_,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}function v(t){return function(t){if(Array.isArray(t))return g(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function y(t,e,n,r,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void n(t)}c.done?e(l):Promise.resolve(l).then(r,o)}o()((function(){(0,d.dZ)()&&o()("html").attr("dir","rtl").addClass("rtl");var t=o()("body"),e=o()(".js-header"),n=o()("#announcement-bar-root"),r=o()(".js-open-menu"),i=o()(".js-close-menu"),u=o()(".js-menu"),m=o()(".js-toggle-submenu"),g=o()(".js-submenu-option")[0],b=o()(".js-submenu"),w=o()(".js-recent-slider"),j=o()(".js-open-secondary-menu"),x=o()(".js-open-search"),k=o()(".js-close-search"),L=o()(".js-search"),C=o()(".js-input-search"),E=o()(".js-search-results"),S=o()(".js-no-results"),_=o()(".js-toggle-darkmode"),O=o()(".js-main-nav"),P=o()(".js-main-nav-left"),A=o()(".js-newsletter"),T=o()(".js-native-comments > div > iframe")[0],N=localStorage.getItem("theme"),I=null,Z=!1,G=null,M=function(){e.removeClass("submenu-is-active"),m.removeClass("active"),b.removeClass("opened").addClass("closed")},q=function(){t.toggleClass("no-scroll-y")},F=function(){var t,e=(t=p().mark((function t(e,n){var r,o,i;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new s.Z({url:e,key:n,version:"v5.0"}),t.prev=1,t.next=4,r.posts.browse({limit:"all",include:"tags",fields:"id, title, url, published_at, plaintext"});case 4:return o=t.sent,t.next=7,r.pages.browse({limit:"all",include:"tags",fields:"id, title, url, published_at, plaintext"});case 7:i=t.sent,I=[].concat(v(i),v(o)),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(1),console.log(t.t0);case 14:case"end":return t.stop()}}),t,null,[[1,11]])})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){y(i,r,o,a,c,"next",t)}function c(t){y(i,r,o,a,c,"throw",t)}a(void 0)}))});return function(t,n){return e.apply(this,arguments)}}(),H=function(t){(0,d.tq)()||(t?(O.addClass("toggle-overflow"),P.addClass("toggle-overflow")):(O.removeClass("toggle-overflow"),P.removeClass("toggle-overflow")))};(r.on("click",(function(){e.addClass("mobile-menu-opened"),u.addClass("opened"),q()})),i.on("click",(function(){e.removeClass("mobile-menu-opened"),u.removeClass("opened"),q()})),m.on("click",(function(){(Z=!Z)?(e.addClass("submenu-is-active"),m.addClass("active"),b.removeClass("closed").addClass("opened")):M()})),x.on("click",(function(){L.addClass("opened"),setTimeout((function(){C.trigger("focus")}),400),q()})),k.on("click",(function(){C.trigger("blur"),L.removeClass("opened"),q()})),C.on("keyup",(function(){if(C.val().length>0&&I){var t=h().go(C.val(),I,{keys:["title","plaintext"],limit:4}),e="";if(t.length>0){for(var n=0,r=t.length;n<r;n++){var o,i,a=h().highlight(t[n][0])||t[n].obj.title,c=192,l=h().highlight(t[n][1]),s=!1;if(l){var u=l.indexOf("<b>")-48;u>0&&(l="..."+l.slice(u)),l.length>c&&(l=l.slice(0,c),s=!0)}else l=t[n].obj.plaintext.slice(0,c),t[n].obj.plaintext.length>c&&(l=l.split(" ").slice(0,-1).join(" "),s=!0);(null===(o=l.match(/<b>/g))||void 0===o?void 0:o.length)>(null===(i=l.match(/<\/b>/g))||void 0===i?void 0:i.length)&&(l+="</b>"),s&&(l+="..."),e+='\n <article class="m-result"> <a href="'.concat(t[n].obj.url,'" class="m-result__link"> <h3 class="m-result__title">').concat(a,'</h3> <span class="m-result__date">').concat(l,"</span> </a> </article>")}S.hide(),E.html(e),E.show()}else E.html(""),E.hide(),S.show()}else E.html(""),E.hide(),S.hide()})),_.on("change",(function(){_.is(":checked")?(o()("html").attr("data-theme","dark"),localStorage.setItem("theme","dark")):(o()("html").attr("data-theme","light"),localStorage.setItem("theme","light")),T&&T.contentDocument.location.reload(!0)})),_.on("mouseenter",(function(){H(!0)})),_.on("mouseleave",(function(){H(!1)})),o()(window).on("click",(function(t){Z&&g&&!g.contains(t.target)&&(Z=!1,M())})),o()(document).on("keyup",(function(t){"Escape"===t.key&&L.hasClass("opened")&&k.trigger("click")})),N&&"dark"===N&&_.each((function(){o()(this).attr("checked",!0)})),e.length>0)&&new(a())(e[0],{tolerance:{down:10,up:20},offset:15,onUnpin:function(){if(!(0,d.tq)()&&G){var t=G[0];t&&t.state.isVisible&&t.hide()}}}).init();if(n.length>0){e.addClass("with-announcement-bar"),setTimeout((function(){e.removeAttr("data-animate")}),500);var z=new MutationObserver((function(t){if(t[0].addedNodes.length){n.detach().prependTo(e);var r=n.height();document.documentElement.style.setProperty("--announcement-bar-height","".concat(r,"px"))}t[0].removedNodes.length&&document.documentElement.style.setProperty("--announcement-bar-height","0px")})),R=new ResizeObserver((function(t){t.forEach((function(t){var e=t.contentRect.height;document.documentElement.style.setProperty("--announcement-bar-height","".concat(e,"px"))}))}));z.observe(n[0],{childList:!0}),R.observe(n[0])}else setTimeout((function(){e.removeAttr("data-animate")}),500);if(w.length>0)new f.ZP(".js-recent-slider",{modules:[f.Rv,f.s5],freeMode:!0,slidesPerView:"auto",a11y:!0,on:{init:function(){(0,l.Z)(".js-recent-article-title",50)}}});if(j.length>0){var K=document.getElementById("secondary-navigation-template");G=(0,c.ZP)(".js-open-secondary-menu",{appendTo:document.body,content:K.innerHTML,allowHTML:!0,arrow:!0,trigger:"click",interactive:!0,onShow:function(){H(!0)},onHidden:function(){H(!1)}})}(0,c.ZP)(".js-tooltip",{allowHTML:!0}),(0,l.Z)(".js-article-card-title",100),(0,l.Z)(".js-article-card-title-no-image",250),"undefined"!=typeof disableNewsletter&&disableNewsletter&&A.remove(),"undefined"!=typeof ghostSearchApiKey&&"undefined"==typeof nativeSearchEnabled?F(ghostHost,ghostSearchApiKey):(x.css("visibility","hidden"),k.remove(),L.remove())}))},769:(t,e,n)=>{n.d(e,{dZ:()=>r,e:()=>i,eS:()=>a,ej:()=>c,tq:()=>o});var r=function(){var t=document.querySelector("html");return["ar","he","fa"].includes(t.getAttribute("lang"))},o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(t,")")).matches},i=function(){for(var t=document.querySelectorAll(".kg-gallery-image img"),e=0,n=t.length;e<n;e++){var r=t[e].closest(".kg-gallery-image"),o=t[e].attributes.width.value/t[e].attributes.height.value;r.style.flex="".concat(o," 1 0%")}},a=function(t){t(".js-post-content").find("img").each((function(){t(this).closest("figure").hasClass("kg-bookmark-card")||t(this).closest("figure").hasClass("kg-nft-card")||t(this).parent().is("a")||t(this).hasClass("kg-product-card-image")||t(this).hasClass("kg-audio-thumbnail")||t(this).addClass("js-zoomable")}))},c=function(t,e){e(".js-zoomable").on("opened",(function(){setTimeout((function(){var e=t(".medium-zoom-image--opened");e.length>1&&e.last().hide()}),10)}))}}},t=>{t.O(0,[898],(()=>{return e=480,t(t.s=e);var e}));t.O()}]); |