(async function(j,N){window._l=[];let W=window.isAppShell,F=window._l;const p=e=>{try{return new URL(e||window?.location?.href)}catch{return{}}},{searchParams:J}=p()||{},V=J.get("l_debug"),o=e=>{!V||F.push(e)};o("in.sc");let r=globalThis[j];const{location:z,navigator:u}=globalThis||{},{pathname:G,href:fe}=z||{},{userAgentData:y,platform:ve}=u||{},E=G==="/",{origin:K,pathname:Q,searchParams:X}=p(N),Y=()=>{try{return X.get("da")}catch{}};function Z(){if(typeof y<"u"&&y!=null)return y.platform;if(typeof u.platform<"u"){const e=u.userAgent;if(typeof u.userAgent!=="undefined"){if(/android/.test(e.toLowerCase()))return"android";if(/iphone/.test(e.toLowerCase()))return"iphone";if(/ipad/.test(e.toLowerCase()))return"ipad"}return u.platform}return"unknown"}let b,h=Z().toLowerCase(),x=/mac/.test(h),C=u.userAgent.match(/iphone|ipad|ipod/i)||["iphone","ipad","ipod"].indexOf(h)!==-1,ye=x||C,$=/win/.test(h),we=/android/.test(h),Ae=/linux/.test(h),P=x?"macOS":$?"win":"";(u.userAgent.match(/Android/i)||u.userAgent.match(/webOS/i)||C||u.userAgent.match(/BlackBerry/i)||u.userAgent.match(/Windows Phone/i))&&(b=!0);const ee=new RegExp("(_ljwt=)([^;]+)","gm"),_=new RegExp("^/(s|translation)/","i"),te=new RegExp("^/activate/","i");let I="margin: 12px 0px;border-radius: 12px;overflow: hidden;background: #f4f4f4;border: 1px solid rgba(255,255,255,0);";const T=[{code:"ludwig_sidebar_left",style:I},{code:"ludwig_sidebar_right",style:I},{code:"ludwig_adhesion_desktop",style:"",hide:!1},{code:"ludwig_adhesion_desktop-adhesive",hide:!0}],M=[{code:"ludwig_adhesion_mobile",style:"",pos:"body"},{code:"ludwig_in-content_1_mw",style:"margin:12px 0;display:flex;justify-content:center;border-radius:12px;overflow:hidden;",pos:3},{code:"ludwig_in-content_2_mw",style:"margin:12px 0;display:flex;justify-content:center;border-radius:12px;overflow:hidden;",pos:"last"}],w=e=>{const{pathname:t=""}=p();return e&&t.match(e)},oe=()=>{let e={};try{let t=((ee.exec(r.cookie)||[])[2]||"").replace(/%3D|"'/g,""),n=atob(t)||"{}";e=JSON.parse(n)}catch{e={subscription:"error"}}return e},A=()=>{const{subscription:e}=oe()||{},t=e==="premium";return e==="error"?!0:t};let k="adngin-"+"outstream"+"-0";function v(e){return r.getElementById(e)}function S(e){let t=v(e);return t||(t=r.createElement("div"),t.id=e),t}function ne(e,t=""){let n=r.body;if(t){let l=r.createComment(t);n.appendChild(l)}let s=S(e);n.appendChild(s)}function L(){ne(k)}function O(){se(k);const t=[...globalThis.adngin?.config?.adUnits||[],...T,...M];o("r.ad: ",t),t.forEach(({code:n})=>{let s=v(n);s&&s.remove()})}function se(e){let t=v(e),n=r.querySelector("video");t&&t.remove(),n&&(n.src="")}function le(){let e=v("wrapper");if(!e)return;o("cr.ad.t");const t=[...e.querySelectorAll('[id^="l_sidebar"]')],n=t.length>0,s=n?1:2,l=[...e.querySelectorAll("section")].slice(s),i=T.map(({code:a,style:d,hide:m})=>{let f=S(a);return d&&(f.style=d),!m&&f});let c=n?t:l;o("cr.ad.t - els",i),i.forEach((a,d)=>a&&(c[d]?c[d].prepend(a):document.body.append(a)))}function re(){o("sn - in.m.ad");let t=document.querySelector("h1")?.parentElement?.parentElement?.parentElement?.closest("div");!t||M.forEach(({code:n,style:s,hide:l,pos:i})=>{let c=S(n);if(s&&(c.style=s),!(!c||l))switch(i){case"last":t.appendChild(c);break;case"body":document.body.appendChild(c);break;default:t.insertBefore(c,t.children[i]);break}})}const R=e=>{o("ob - dis"),e&&e.disconnect&&e.disconnect(),e=void 0},ie=(e,t)=>(o("ob - cr"),new MutationObserver(e,t)),ae=(e,t,n={attributes:!1,childList:!0,characterData:!1,subtree:!0})=>{o("ob - con"),e&&e.observe(t,n)},U=({container:e,shouldDisconnect:t,selector:n,onTrigger:s,pageRegex:l="",onDisable:i})=>{o("ob - st.ob");let c={threshold:[.5]},a,d=r.querySelector(n);function m(f){o("ob - ent",f);let g=r.querySelector(n);const{href:B}=p(),H=w(l),D=H;if(o("ob - l.ad "+H),t&&t())return R(a);e.contains(g)?(!d&&D?(o("ob - el.in"),s&&s()):(o("ob - ha.no.el"),d=!1,!D&&i&&i()),o("ob - se.h.el true"),d=!0):(o("ob - el.re"),d=!1,i&&i())}a?R(a):(a=ie(m,c),ae(a,e,{attributes:!1,childList:!0,characterData:!1,subtree:!0}))},ce=()=>globalThis.adngin&&globalThis.adngin.adnginLoaderReady;function q(){if(A()){O();return}o("sn - st.au|is.m: "+b),L(),b?re():le();const{href:e}=p();o("sn - sh.st.au|h "+e),globalThis.adngin.queue.push(()=>{o("sn - st.au"),globalThis.adngin.cmd.startAuction()})}let Oe;const Ee=()=>r.getElementById("wrapper").querySelector("#wrapper > [data-scroll-lock-scrollable]");o("is.h "+E),o("is.m "+b);const de=()=>{let e=r.cookie.includes("consent");return o("h.sn "+e),e},ue=async()=>{const e=K+Q,t=P?e+"/"+P:e,s=await(await fetch(t)).text();let l=r.createElement("div"),i=r.createElement("div"),c="")[0]+"",a="")[1].split("")[0]+"";l.innerHTML=c,i.innerHTML=a;let d=i.querySelectorAll("style"),[...m]=l.querySelectorAll("script");m=m.map(g=>g.innerText).filter(g=>!g.includes("remixLiveReloadConnect")),d.forEach(g=>g&&l.prepend(g)),l.id="l_modal",r.body.appendChild(l),((g=[])=>g.map((B="")=>(0,eval)(B)))(m)},xe=()=>{if(E&&!b){let e=setInterval(()=>{de()&&(clearInterval(e),setTimeout(()=>{ue()},6e3))},1e3);setTimeout(()=>{clearInterval(e)},3e4)}},ge=()=>{let e=setInterval(()=>{let t=ce();if(o("ob - is.ad.re "+t),t)clearInterval(e);else return;const n=A();if(o("ob - pr "+n),o("ob - st.ad.ob"),Y()){o("sn - ad.is.dis");return}function s(){o("sn - sh.re.v.ad"),O()}if(L(),t&&!n){const l=w(_);o("ob - c.st.ad.ob"),O(),l&&q(),U({container:document.getElementById("wrapper"),onTrigger:q,shouldDisconnect:A,selector:"h1",pageRegex:_,onDisable:s})}},1e3)},pe=()=>{if(!w(te))return;const{searchParams:t}=p();return t.get("coupon")},me=()=>{let e=pe();const t=()=>{};if(e){const n=origin+"/premium/code/"+e,s=l=>{window.location.href=l};window.l_coupon=e,U({container:document,onTrigger:()=>s(n),shouldDisconnect:t,selector:'[data-cy="s-sc"]'})}},be=()=>{const e=r.createElement("style");e.textContent=".css-1kpcxye{height: initial !important;}",r.head.appendChild(e)},he=()=>{const{searchParams:e}=p();e.get("utm_campaign")&&fetch("/auth/init?"+e)};try{o("ob - in"),ge(),me(),be(),W&&he()}catch{}})("document","https://v.ludwig.guru/modals/download");