(async function(H){window._l=[];let N=window.isAppShell,j=window._l;const g=e=>{try{return new URL(e||window?.location?.href)}catch{return{}}},{searchParams:D}=g()||{},W=D.get("l_debug"),o=e=>{W&&j.push(e)};o("in.sc");const{location:z,navigator:i}=globalThis||{},{pathname:F,href:le}=z||{},{userAgentData:v,platform:ce}=i||{},G=F==="/",{origin:ue,pathname:be,searchParams:J}=g(H),K=()=>{try{return J.get("da")}catch{}};function V(){if(typeof v<"u"&&v!=null)return v.platform;if(typeof i.platform<"u"){const e=i.userAgent;if(typeof i.userAgent!=="undefined"){if(/android/.test(e.toLowerCase()))return"android";if(/iphone/.test(e.toLowerCase()))return"iphone";if(/ipad/.test(e.toLowerCase()))return"ipad"}return i.platform}return"unknown"}let h,p=V().toLowerCase(),I=/mac/.test(p),P=i.userAgent.match(/iphone|ipad|ipod/i)||["iphone","ipad","ipod"].indexOf(p)!==-1,ge=I||P,Q=/win/.test(p),pe=/android/.test(p),me=/linux/.test(p),fe=I?"macOS":Q?"win":"";(i.userAgent.match(/Android/i)||i.userAgent.match(/webOS/i)||P||i.userAgent.match(/BlackBerry/i)||i.userAgent.match(/Windows Phone/i))&&(h=!0);const X=new RegExp("(_ljwt=)([^;]+)","gm"),x=new RegExp("^/(s|translation)/","i"),he=new RegExp("^/activate/","i");let l="width: 100%;margin: 0px 0px;border-radius: 12px;overflow: hidden;background: #f4f4f41a;border: 1px solid rgba(255,255,255,0);";const L=[{code:"ludwig_sidebar_left",id:"l_sidebar_left",style:l,strategy:"prepend",position:"left"},{code:"adngin-Sidebar_Left_2-0",id:"l_sidebar_left_2",style:l,strategy:"prepend",position:"left"},{code:"ludwig_sidebar_right",id:"l_sidebar_right",style:l,strategy:"prepend",position:"right"},{code:"adngin-Sidebar_Right_2-0",id:"l_sidebar_right_2",style:l,strategy:"prepend",position:"right"},{code:"adngin-Sidebar_Right_3-0",id:"l_sidebar_right_3",style:l,strategy:"prepend",position:"right"},{code:"adngin-In-content_1_dskt-0",id:"l_content",style:l,strategy:"prepend",position:"center"},{code:"adngin-In-content_2_dskt-0",id:"l_content_2",style:l,strategy:"prepend",position:"center"},{code:"ludwig_adhesion_desktop",containerTag:"body",strategy:"append",style:"",hide:!1,position:"center"},{code:"ludwig_adhesion_desktop-adhesive",containerTag:"body",strategy:"append",hide:!0,position:"center"}],C=[{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"}],T=e=>{const{pathname:t=""}=g();return e&&t.match(e)},Y=()=>{let e={};try{let t=((X.exec(document.cookie)||[])[2]||"").replace(/%3D|"'/g,""),n=atob(t)||"{}";e=JSON.parse(n)}catch{e={subscription:"error"}}return e},w=()=>{const{subscription:e}=Y()||{},t=e==="premium";return e==="error"?!0:t};let k="adngin-"+"outstream"+"-0";function m(e){return document.getElementById(e)}function _(e,t=""){let n=m(e);return n||(n=document.createElement("div"),n.id=e,t&&n.setAttribute("data-position",t)),n}function Z(e,t=""){let n=document.body;if(t){let s=document.createComment(t);n.appendChild(s)}let r=_(e);n.appendChild(r)}function R(){Z(k)}function A(){$(k);const t=[...globalThis.adngin?.config?.adUnits||[],...L,...C];o("r.ad: ",t),t.forEach(({code:n})=>{let r=m(n);r&&r.remove()})}function $(e){let t=m(e),n=document.querySelector("video");t&&t.remove(),n&&(n.src="")}function M(){const e=m("sidebar"),t=document.body||document.documentElement;e&&e.offsetWidth>0&&e.offsetHeight>0?(t.setAttribute("data-has-sidebar","true"),o("sb.det - banner offset")):(t.removeAttribute("data-has-sidebar"),o("sb.no - banner full width"))}function ee(){const e=document.body,t={childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class"]},n=new MutationObserver(r=>{for(const s of r)if(s.type==="childList"||s.type==="attributes"&&s.target.id==="sidebar"){clearTimeout(n.debounceTimer),n.debounceTimer=setTimeout(()=>{M()},100);break}});n.observe(e,t),o("sb.obs - init")}function te(){let e=m("wrapper");if(!e)return;o("cr.ad.t");const t=[...e.querySelectorAll('[id^="l_sidebar"]')],n=[...e.querySelectorAll('[id^="l_content"]')],s=t.length>0?1:2,c=[...e.querySelectorAll("section")].slice(s);M();const d=L.map(({code:u,style:b,hide:y,position:S,id:O,strategy:E,containerTag:f})=>{let a=_(u,S);if(b&&(a.style=b),a.style.display||(a.style.display="none"),!y){let U=document.getElementById(O);U?U[E]?.(a):f&&document.querySelector(f)?.[E]?.(a)}return!y&&a});o("cr.ad.t.pos - els",d),ee()}function ne(){o("sn - in.m.ad.pos");let e=document.getElementById("results-wrapper");e&&C.forEach(({code:t,style:n,hide:r,pos:s,position:c})=>{let d=_(t,c);if(n&&(d.style=n),!(!d||r))switch(s){case"last":e.appendChild(d);break;case"body":document.body.appendChild(d);break;default:typeof s=="number"&&e.children[s]?e.insertBefore(d,e.children[s]):e.appendChild(d);break}})}const B=e=>{o("ob - dis"),e&&e.disconnect&&e.disconnect(),e=void 0},oe=(e,t)=>(o("ob - cr"),new MutationObserver(e,t)),se=(e,t,n={attributes:!1,childList:!0,characterData:!1,subtree:!0})=>{o("ob - con"),e&&e.observe(t,n)},re=({container:e,shouldDisconnect:t,selector:n,onTrigger:r,pageRegex:s="",onDisable:c})=>{o("ob - st.ob");let d={threshold:[.5]},u,b=document.querySelector(n);function y(S){o("ob - ent",S);let O=document.querySelector(n);const{href:E}=g(),f=T(s),a=f;if(o("ob - l.ad "+f),t&&t())return B(u);e.contains(O)?(!b&&a?(o("ob - el.in"),r&&r()):(o("ob - ha.no.el"),b=!1,!a&&c&&c()),o("ob - se.h.el true"),b=!0):(o("ob - el.re"),b=!1,c&&c())}u?B(u):(u=oe(y,d),se(u,e,{attributes:!1,childList:!0,characterData:!1,subtree:!0}))},ie=()=>globalThis.adngin&&globalThis.adngin.adnginLoaderReady;function q(){if(w()){A();return}o("sn - st.au|is.m: "+h),R(),h?ne():te();const{href:e}=g();o("sn - sh.st.au|h "+e),globalThis.adngin.queue.push(()=>{o("sn - st.au"),globalThis.adngin.cmd.startAuction()})}o("is.h "+G),o("is.m "+h);const de=()=>{let e=setInterval(()=>{let t=ie();if(o("ob - is.ad.re "+t),t)clearInterval(e);else return;const n=w();if(o("ob - pr "+n),o("ob - st.ad.ob"),K()){o("sn - ad.is.dis");return}function r(){o("sn - sh.re.v.ad"),A()}if(R(),t&&!n){const s=T(x);o("ob - c.st.ad.ob.pos"),A(),s&&q(),re({container:document.getElementById("wrapper"),onTrigger:q,shouldDisconnect:w,selector:"h1",pageRegex:x,onDisable:r})}},1e3)},ae=()=>{const{searchParams:e}=g();e.get("utm_campaign")&&fetch("/auth/init?"+e)};try{o("ob - in.pos"),de(),N&&ae()}catch{}})("https://seo-search.ludwig.app/scripts-search/init");