(()=>{"use strict";const t="blog",o="lp.blog";let n=0;function e(){if(void 0===window.__jimdo__)return n>=200?void console.error("Consent management failed to load"):(n++,void setTimeout(e,25));const a={customAutomatedTrackingSettings:{category:t,anonymousCategory:o},consentBannerInteractionsTrackCategory:t,language:"undefined"!=typeof locale?locale:"en"};window.__jimdo__.initConsent(a);const i={env:"lp",endpoint:window.__jimdo__.getRichTrackingEndpoint(window.location.hostname),anonId:()=>window.__jimdo__.getAnonId(),userAccountId:()=>window.__jimdo__.getUserAccountId()},c=window.__jimdo__.constructDwh(i),s={endpoint:window.__jimdo__.getAnonTrackingEndpoint(window.location.hostname)},r=window.__jimdo__.constructAnonymousTracker(s);window.__jimdo__.withConsentOptIn(window.__jimdo__.setRichTracking(c),window.__jimdo__.setAnonymousTracking(r),window.__jimdo__.configureAutomatedAnonymousTracking(o))}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e();let a=null;const i=()=>(null===a&&(a=(()=>{const t=document.body.classList;return t.contains("home")||t.contains("front-page")?"homepage":t.contains("category")?"category":t.contains("tag")?"tag":t.contains("search-results")?"search":t.contains("single-post")?"single_post":"other"})()),a),c=()=>{if("single_post"!==i())return;const o=document.querySelectorAll(".jetpack-sharing-button__button");0!==o.length&&o.forEach((o=>{try{o instanceof HTMLAnchorElement&&o.addEventListener("click",(function(){const o=this.getAttribute("data-service")||"unknown";window.__jimdo__.trackRichEvent({category:t,action:"share_button",label:"click",payload:{share_platform:o}})}))}catch(t){console.warn("Failed to add tracking to share button:",t)}}))},s=()=>{const t=[".wp-block-post .wp-block-post-featured-image a",".wp-block-post h3.wp-block-post-title a",".wp-block-post .wp-block-post-date a",".jp-related-posts-i2__post a"].join(", "),o=document.querySelectorAll(t);if(0===o.length)return;const n=i();o.forEach((t=>{try{if(t instanceof HTMLElement){const o=null!==t.closest(".jp-related-posts-i2__post");((t,o,n)=>{t&&(t.hasAttribute("data-tracking")||t.setAttribute("data-tracking","card_post"),!t.hasAttribute("data-tracking-post-position")&&n&&t.setAttribute("data-tracking-post-position",n))})(t,0,o?"related-post":n)}}catch(t){console.warn("Failed to apply tracking to element:",t)}})),c()},r=()=>{document.querySelectorAll('[class*="tracking-"]').forEach((t=>{const o=t.classList,n=Array.from(o).find((t=>t.startsWith("tracking-")));if(n){const o=n.replace("tracking-","");if(t instanceof HTMLElement)if("A"===t.tagName)t.setAttribute("data-tracking",o);else{const n=t.querySelector("a");n&&n.setAttribute("data-tracking",o)}}}))};window.jimdoTools={initTrackingByClass:r,initPostTracking:s};const d=()=>{r(),s()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d()})(); (()=>{"use strict";const e=(e,t,n)=>{const o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),document.cookie=e+"="+encodeURIComponent(t)+";expires="+o.toUTCString()+";path=/;SameSite=Lax"},t=e=>{const t=document.cookie.split(";");for(let n=0;n{const o=document.querySelector(".cta-bar-sticky");if(!o)return;if("1"===t("jimdo_banner_sticky_disabled"))return;const s=document.createElement("button");s.innerHTML=n,s.setAttribute("aria-label","Close"),s.style.cssText="position:absolute;top:50%;right:16px;transform:translateY(-50%);background:rgba(255,255,255,0.2);border:none;width:32px;height:32px;border-radius:4px;color:#fff;cursor:pointer;padding:0;display:none;align-items:center;justify-content:center;",o.appendChild(s);const i=o.offsetTop;let r=!1,d=!0;function c(){r?document.documentElement.style.setProperty("--cta-height",o.offsetHeight+"px"):document.documentElement.style.setProperty("--cta-height","0px")}s.addEventListener("click",(()=>{o.classList.remove("is-fixed"),document.body.style.paddingTop="0",document.body.classList.add("banner-closed"),document.documentElement.style.setProperty("--cta-height","0px"),s.style.display="none",r=!1,d=!1,e("jimdo_banner_sticky_disabled","1",15)})),s.addEventListener("mouseenter",(function(){this.style.background="rgba(255,255,255,0.3)"})),s.addEventListener("mouseleave",(function(){this.style.background="rgba(255,255,255,0.2)"})),window.addEventListener("scroll",(()=>{if(!d)return;const e=window.scrollY||window.pageYOffset;if(e>=i&&!r){const e=o.offsetHeight;document.body.style.paddingTop=e+"px",o.classList.add("is-fixed"),s.style.display="flex",r=!0,c()}else e{if(!document.body.classList.contains("single-post"))return;const o=document.querySelector(".mid-content-cta");if(!o)return;if("1"===t("jimdo_midcta_closed"))return void(o.style.display="none");const s=document.querySelector(".post-hero-image"),i=document.createElement("button");i.innerHTML=n,i.setAttribute("aria-label","Close"),i.style.cssText="position:absolute;top:8px;right:8px;background:rgba(255,255,255,0.2);border:none;width:32px;height:32px;border-radius:4px;color:#fff;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;z-index:1;",o.style.position="relative",o.appendChild(i);let r=!1;function d(){if(s){const e=s.offsetTop;window.scrollY>=e&&!r&&(o.classList.add("is-visible"),r=!0)}else{const e=document.querySelector(".post-content-progress");if(e){const t=e.offsetTop,n=e.offsetHeight;window.scrollY+window.innerHeight>=t+.2*n&&!r&&(o.classList.add("is-visible"),r=!0)}}}i.addEventListener("click",(()=>{o.classList.add("is-hidden"),e("jimdo_midcta_closed","1",15)})),i.addEventListener("mouseenter",(function(){this.style.background="rgba(255,255,255,0.3)"})),i.addEventListener("mouseleave",(function(){this.style.background="rgba(255,255,255,0.2)"})),window.addEventListener("scroll",d,{passive:!0}),d()},i=()=>{(()=>{if(!document.body.classList.contains("single-post"))return;const e=document.querySelector(".reading-progress"),t=document.querySelector(".post-content-progress");function n(){const n=t.offsetTop,o=t.offsetHeight,s=window.scrollY,i=o+n-window.innerHeight,r=Math.min(Math.max(s/i*100,0),100);e.style.width=r+"%"}e&&t&&(window.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n,{passive:!0}),n())})(),o(),s(),document.querySelectorAll(".category_post .wp-block-post").forEach((e=>{if(e.classList.contains("card-linkified"))return;const t=e.querySelector(".wp-block-post-featured-image a"),n=e.querySelector(".wp-block-post-title a"),o=t||n;if(!o)return;const s=o.getAttribute("href"),i=o.getAttribute("target"),r=document.createElement("a");for(r.href=s||"",r.className="category-post-card-link",i&&(r.target=i),[...o.attributes].forEach((e=>{r.hasAttribute(e.name)||r.setAttribute(e.name,e.value)}));e.firstChild;)r.appendChild(e.firstChild);e.appendChild(r),e.classList.add("card-linkified")}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",i):i()})(); /* Copyright 2017-2021 Sean Williams This file is part of Modern Footnotes. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ function modern_footnotes_hide_footnotes(o){if(window.modernFootnotesOpenedFootnoteViaHover=!1,null!=o){o.data("unopenedContent")&&o.html(o.data("unopenedContent"));let t='.modern-footnotes-footnote__note[data-mfn="'+o.parent().attr("data-mfn")+'"]',e=o.parent().nextAll(t).eq(0);e.hide().css({left:"",top:""}),e.next(".modern-footnotes-footnote__connector").remove(),o.removeClass("modern-footnotes-footnote--selected"),o.attr("aria-pressed","false"),o.focus()}else jQuery(".modern-footnotes-footnote a").each(function(){var o=jQuery(this);o.data("unopenedContent")&&o.html(o.data("unopenedContent"))}),jQuery(".modern-footnotes-footnote > a").attr("aria-pressed","false"),jQuery(".modern-footnotes-footnote__note").hide().css({left:"",top:""}),jQuery(".modern-footnotes-footnote__connector").remove(),jQuery(".modern-footnotes-footnote--selected").removeClass("modern-footnotes-footnote--selected")}function modern_footnotes_show_tooltip_footnote(o,t,e){modern_footnotes_hide_footnotes(),o.toggleClass("modern-footnotes-footnote--selected");let n='.modern-footnotes-footnote__note[data-mfn="'+o.attr("data-mfn")+'"]';var s=o.nextAll(n).eq(0);s.show().addClass("modern-footnotes-footnote__note--tooltip").removeClass("modern-footnotes-footnote__note--expandable"),e&&s.addClass(e),t||s.focus(),s.unbind("keydown").bind("keydown",function(t){"Escape"==t.key&&modern_footnotes_hide_footnotes(o.children("a"))});var r=o.position(),d=Math.floor(1.5*parseInt(o.parent().css("font-size").replace(/px/,""))),f=s.outerWidth(),i=(jQuery(window).width(),r.left-f/2);i<0&&(i=8),i+f>jQuery(window).width()&&(i=jQuery(window).width()-f);var a=parseInt(r.top)+parseInt(d);s.css({top:a+"px",left:i+"px"}),s.after('
');var m=o.position(),l=o.outerHeight(),_=o.outerWidth(),h=a-m.top-l;jQuery(".modern-footnotes-footnote__connector").css({top:m.top+l+"px",height:h,left:m.left+_/2+"px"})}jQuery(function(o){o(document).on("mouseenter",".modern-footnotes-footnote.modern-footnotes-footnote--hover-on-desktop a",null,function(t){o(window).width()>=768&&(window.modernFootnotesActivelyHovering=!0,window.modernFootnotesOpenedFootnoteViaHover=!0,modern_footnotes_show_tooltip_footnote(o(this).parent(),!0,"modern-footnotes-footnote__note--opened-by-hover"))}),o(document).on("mouseenter",".modern-footnotes-footnote__connector,.modern-footnotes-footnote__note",null,function(o){window.modernFootnotesActivelyHovering=!0}),o(document).on("mouseleave",".modern-footnotes-footnote.modern-footnotes-footnote--hover-on-desktop,.modern-footnotes-footnote.modern-footnotes-footnote--hover-on-desktop .modern-footnotes-footnote__connector,.modern-footnotes-footnote__note--opened-by-hover",null,function(t){null!=window.modernFootnotesHoverCloseTimeout&&clearTimeout(window.modernFootnotesHoverCloseTimeout),window.modernFootnotesActivelyHovering&&(window.modernFootnotesHoverCloseTimeout=setTimeout(function(){window.modernFootnotesHoverCloseTimeout=null,window.modernFootnotesActivelyHovering||(modern_footnotes_hide_footnotes(),o(".modern-footnotes-footnote__note--opened-by-hover").removeClass("modern-footnotes-footnote__note--opened-by-hover"))},600)),window.modernFootnotesActivelyHovering=!1}),o(document).on("click",".modern-footnotes-footnote a",null,function(t){t.preventDefault(),t.stopPropagation(),next='.modern-footnotes-footnote__note[data-mfn="'+o(this).parent().attr("data-mfn")+'"]';var e=o(this).parent().nextAll(next).eq(0);e.is(":hidden")?o(window).width()>=768&&o(this).parent().is(":not(.modern-footnotes-footnote--expands-on-desktop)")?(modern_footnotes_show_tooltip_footnote(o(this).parent()),o(this).attr("aria-pressed","true")):(o(window).width()<768||o(this).parent().is(":not(.modern-footnotes-footnote--hover-on-desktop)"))&&(o(this).attr("aria-pressed","true"),e.removeClass("modern-footnotes-footnote__note--tooltip").addClass("modern-footnotes-footnote__note--expandable").css("display","block"),o(this).data("unopenedContent",o(this).html()),o(this).html("x")):modern_footnotes_hide_footnotes(o(this))}).on("click",".modern-footnotes-footnote__note",null,function(o){o.stopPropagation()}).on("click",function(){o(window).width()>=768&&0==o(".modern-footnotes-footnote--expands-on-desktop").length&&modern_footnotes_hide_footnotes()}),o(window).resize(function(){modern_footnotes_hide_footnotes()});var t=o("body .modern-footnotes-footnote a"),e={};t.length>1&&t.each(function(){var t=o(this).parent().attr("data-mfn-post-scope");if(void 0===e[t]&&(e[t]=[0]),o(this).is("a[data-mfn-reset]")&&(e[t]=[0]),o(this).is("a[refnum]")){var n=o(this).attr("refnum");o(this).html()!=n&&o(this).html(n),!isNaN(parseFloat(n))&&isFinite(n)&&e[t].push(n)}else{var s=Math.max.apply(null,e[t])+1;o(this).html()!=s&&o(this).html(s),e[t].push(s)}})});;