1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{6324:(e,t,r)=>{"use strict";r.d(t,{default:()=>c});var s=r(63188),n=r(1702),i=r(1521),l=r(39728),a=r(8604);let o=(0,a.createServerReference)("00ad227dc2fbbdd62480058cff52840b1a5c81fc08",a.callServer,void 0,a.findSourceMapURL,"disableDraftMode");function c(){let e=(0,s.Ay)(),t=(0,s.r7)(),r=(0,n.useRouter)(),[a,c]=(0,i.useTransition)(),u=(0,n.useSearchParams)().get("sanity-preview-perspective");return console.log("sanityPreviewPerspective in root layout",u),(0,i.useEffect)(()=>{if(!1===e&&"drafts"===u){let e=(0,l.o)("Draft Mode Enabled",{description:"live"===t?"Content is live, refreshing automatically":"Refresh manually to see changes",duration:1/0,action:{label:"Disable",onClick:async()=>{await o(),c(()=>{r.refresh()})}}});return()=>{l.o.dismiss(e)}}!1!==e||"published"!==u&&u||o().then(()=>{console.log("Draft mode disabled")})},[t,r,e,u]),(0,i.useEffect)(()=>{if(a){let e=l.o.loading("Disabling draft mode...");return()=>{l.o.dismiss(e)}}},[a]),null}},13381:(e,t,r)=>{"use strict";r.d(t,{default:()=>l});var s=r(1521),n=r(1702),i=r(20281);function l(){let e=(0,n.usePathname)();(0,n.useParams)();let{setIsNotFoundPage:t}=(0,i.F)();return(0,s.useEffect)(()=>{"/404"===e||e.includes("not-found")||t(!1)},[e,t]),null}},15287:(e,t,r)=>{Promise.resolve().then(r.bind(r,39728)),Promise.resolve().then(r.bind(r,87135)),Promise.resolve().then(r.t.bind(r,55263,23)),Promise.resolve().then(r.bind(r,47956)),Promise.resolve().then(r.bind(r,6324)),Promise.resolve().then(r.bind(r,81085)),Promise.resolve().then(r.bind(r,79644)),Promise.resolve().then(r.bind(r,96475)),Promise.resolve().then(r.bind(r,13381)),Promise.resolve().then(r.bind(r,41646)),Promise.resolve().then(r.bind(r,20281)),Promise.resolve().then(r.bind(r,5400)),Promise.resolve().then(r.bind(r,12272)),Promise.resolve().then(r.bind(r,51197)),Promise.resolve().then(r.bind(r,21640)),Promise.resolve().then(r.bind(r,24239)),Promise.resolve().then(r.t.bind(r,94256,23)),Promise.resolve().then(r.t.bind(r,28676,23)),Promise.resolve().then(r.t.bind(r,47929,23)),Promise.resolve().then(r.t.bind(r,39508,23)),Promise.resolve().then(r.t.bind(r,61454,23)),Promise.resolve().then(r.t.bind(r,46619,23)),Promise.resolve().then(r.t.bind(r,32407,23)),Promise.resolve().then(r.t.bind(r,39258,23))},40129:(e,t,r)=>{"use strict";r.d(t,{R:()=>i});var s=r(97921),n=r(76005);let i=(0,s.v)()((0,n.Zr)(e=>({listenedPodcasts:[],addOrUpdatePodcast:t=>e(e=>{let r=e.listenedPodcasts.findIndex(e=>e._id===t._id),s={...t,lastListenedAt:Date.now()};if(-1!==r){let t=[...e.listenedPodcasts];return t[r]=s,{listenedPodcasts:t}}return{listenedPodcasts:[...e.listenedPodcasts,s]}}),removePodcast:t=>e(e=>({listenedPodcasts:e.listenedPodcasts.filter(e=>e._id!==t)}))}),{name:"keep-listening-storage"}))},41646:(e,t,r)=>{"use strict";r.d(t,{default:()=>p});var s=r(73365),n=r(25773),i=r(73119),l=r(17687),a=r(1521),o=r(90621),c=r(1702),u=r(94420),d=r(40129);let p=()=>{let e=(0,c.usePathname)(),t=(0,a.useRef)(null),{isPlaying:r,currentTime:p,duration:f,audioLink:m,title:x,setIsPlaying:h,setCurrentTime:b,setDuration:g,reset:v,playbackSpeed:y,podcastId:P,setPlaybackSpeed:w,podcastData:k}=(0,o.V)(),{addOrUpdatePodcast:j}=(0,d.R)();if((0,a.useEffect)(()=>{t.current&&(t.current.pause(),t.current.preload="auto",p>0&&(t.current.currentTime=p),(async()=>{try{var e,s;if(await (null==(e=t.current)?void 0:e.load()),r){let e=null==(s=t.current)?void 0:s.play();e&&await e}}catch(e){console.error("Audio loading error:",e)}})())},[m]),(0,a.useEffect)(()=>{let e=t.current;if(e)if(r){let t=e.play();t&&t.catch(e=>{console.error("Playback error:",e),h(!1)})}else e.pause()},[r]),(null==e?void 0:e.includes("/podcast/"))&&(null==e?void 0:e.includes("/details/"))||!m)return null;let _=e=>{if(t.current){let r=t.current.currentTime+e;t.current.currentTime=Math.max(0,Math.min(r,f))}};return(0,s.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white border-t shadow-lg p-4 z-50",children:(0,s.jsxs)("div",{className:"max-w-7xl mx-auto flex flex-col md:flex-row items-center gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 w-full md:flex-1",children:[(0,s.jsx)("audio",{ref:t,src:m,onTimeUpdate:()=>{if(t.current){let e=Math.floor(10*t.current.currentTime)/10;Math.abs(e-p)>=.1&&(b(e),P&&e%1<.1&&j({_id:P,title:x||"",audioLink:m||"",duration:f,listenDuration:e,...k}))}},onLoadedMetadata:()=>{t.current&&(g(t.current.duration),p>0&&(t.current.currentTime=p))},onWaiting:()=>{console.log("Audio is buffering...")},onCanPlay:()=>{var e,s;console.log("Audio can play now"),r&&(null==(e=t.current)?void 0:e.paused)&&(null==(s=t.current)||s.play())},preload:"auto",className:"hidden"}),(0,s.jsx)("button",{onClick:()=>{h(!r)},className:"w-8 h-8 flex-shrink-0 flex items-center justify-center bg-blue-600 rounded-full text-white",children:r?(0,s.jsx)(n.A,{size:16}):(0,s.jsx)(i.A,{size:16})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:x}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:"w-full bg-gray-300 h-1 rounded-full cursor-pointer",onClick:e=>{let r=e.currentTarget.getBoundingClientRect(),s=(e.clientX-r.left)/r.width*f;t.current&&(t.current.currentTime=s,b(s))},children:(0,s.jsx)("div",{className:"bg-blue-500 h-1 rounded-full",style:{width:"".concat(p/f*100,"%")}})}),(0,s.jsx)("span",{className:"text-xs text-gray-600 min-w-[40px] flex-shrink-0",children:(e=>{let t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r.toString().padStart(2,"0"))})(p)})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-center md:justify-end w-full md:w-auto gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsxs)("button",{onClick:()=>_(-30),className:"h-8 flex lg:items-end items-center justify-center relative group !cursor-pointer",title:"back 30 seconds",children:[(0,s.jsx)(u.ht,{}),(0,s.jsx)("div",{className:"absolute bottom-[25px] mb-0 hidden group-hover:block bg-gray-800 text-white text-xs py-1 px-2 rounded whitespace-nowrap",children:"back 30s"})]}),(0,s.jsxs)("button",{onClick:()=>_(30),className:"h-8 flex lg:items-end items-center justify-center relative group !cursor-pointer",title:"forward 30 seconds",children:[(0,s.jsx)(u.Pu,{}),(0,s.jsx)("div",{className:"absolute bottom-[25px] mb-0 hidden group-hover:block bg-gray-800 text-white text-xs py-1 px-2 rounded whitespace-nowrap",children:"forward 30s"})]})]}),(0,s.jsx)("select",{value:y,onChange:e=>(e=>{t.current&&(t.current.playbackRate=e,w(e))})(Number(e.target.value)),className:"bg-transparent border rounded px-2 py-1 text-sm",children:[.5,1,1.5,2].map(e=>(0,s.jsxs)("option",{value:e,children:[e,"x"]},e))}),(0,s.jsx)("button",{onClick:v,className:"p-2 hover:bg-gray-100 rounded-full",children:(0,s.jsx)(l.A,{size:16})})]})]})})}},47956:(e,t,r)=>{"use strict";r.d(t,{PostHogProviders:()=>l});var s=r(73365),n=r(73880),i=r(74064);function l(e){let{children:t}=e;return(0,s.jsx)(i.so,{client:n.Ay,children:t})}},55263:()=>{},79644:(e,t,r)=>{"use strict";r.d(t,{default:()=>a});var s=r(73365),n=r(2294),i=r(20281),l=r(67056);function a(){let{isNotFoundPage:e}=(0,i.F)(),t=(0,l.U)("(min-width: 768px)");return e?(0,s.jsx)("div",{className:t?"absolute inset-0 z-50":"absolute top-[-250px] right-0 z-50 w-full",children:(0,s.jsx)(n.kp,{colorBack:"#00000000",colors:["#FFFFFF","#FFFFFF","#FFFFFF"],colorBloom:"#00000000",offsetX:.34,offsetY:t?-.55:-.35,intensity:.23,spotty:1,midSize:.23,midIntensity:.46,density:.07,bloom:.02,speed:1,scale:2,frame:169405.45300000242,style:{backgroundColor:"transparent",height:t?"100%":"151.5vh",width:"100%",opacity:"30%",boxShadow:"none",filter:"drop-shadow(none)"}})}):null}},81085:(e,t,r)=>{"use strict";r.d(t,{GatingProvider:()=>o});var s=r(73365),n=r(1521),i=r(42711),l=r(10209);function a(e){let{children:t}=e,{clearExpiredArticles:r}=(0,i.n)();return(0,n.useEffect)(()=>{(async()=>{try{await l.A.getDeviceIdentifier(),r()}catch(e){console.error("Error initializing everlasting tracking:",e)}})();let e=setInterval(()=>{r()},36e5);return()=>{clearInterval(e)}},[r]),(0,s.jsx)(s.Fragment,{children:t})}function o(e){let{gatingConfig:t,children:r}=e,{setConfig:l}=(0,i.n)();return(0,n.useEffect)(()=>{t&&l(t)},[t,l]),(0,s.jsx)(a,{children:r})}},87135:(e,t,r)=>{"use strict";r.d(t,{handleError:()=>i});var s=r(69626),n=r(39728);function i(e){if((0,s.K)(e)){let{addOriginUrl:t}=e;
1n.o.error("Sanity Live couldn't connect",{description:"Your origin is blocked by CORS policy",duration:1/0,action:t?{label:"Manage",onClick:()=>window.open(t.toString(),"_blank")}:void 0})}else e instanceof Error?(console.error(e),n.o.error(e.name,{description:e.message,duration:1/0})):(console.error(e),n.o.error("Unknown error",{description:"Check the console for more details",duration:1/0}))}},90621:(e,t,r)=>{"use strict";r.d(t,{V:()=>s});let s=(0,r(97921).v)((e,t)=>({isPlaying:!1,currentTime:0,duration:0,audioLink:null,title:null,podcastId:null,playbackSpeed:1,podcastData:null,lastPlaybackPositions:(()=>{let e=localStorage.getItem("podcastPlaybackPositions");return e?JSON.parse(e):{}})(),setPlaybackSpeed:t=>e({playbackSpeed:t}),setIsPlaying:t=>e({isPlaying:t}),setCurrentTime:t=>e({currentTime:t}),setDuration:t=>e({duration:t}),savePlaybackPosition:(r,s)=>{let n={...t().lastPlaybackPositions,[r]:s};localStorage.setItem("podcastPlaybackPositions",JSON.stringify(n)),e({lastPlaybackPositions:n})},getLastPlaybackPosition:e=>t().lastPlaybackPositions[e]||0,setAudioDetails:(t,r,s,n,i)=>{e({audioLink:t,title:r,podcastId:s,podcastData:n,currentTime:i||0,isPlaying:!0})},reset:()=>e({isPlaying:!1,currentTime:0,duration:0,audioLink:null,title:null,podcastId:null,podcastData:null})}))},96475:(e,t,r)=>{"use strict";r.d(t,{default:()=>f});var s=r(73365),n=r(1521),i=r(1702);function l(e){let{children:t}=e;return(0,s.jsxs)("div",{className:"bg-gray-100 text-black p-10",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold",children:"Template Layout"}),t]})}function a(e){let{children:t}=e;return(0,s.jsx)("div",{className:"bg-white",children:t})}var o=r(32403),c=r(44933),u=r(42711),d=r(77190),p=r(20281);let f=(0,n.memo)(function(e){let{children:t,footerData:r,headerData:f,gatingConfig:m,settings:x,filteredCategories:h}=e,b=(0,i.usePathname)(),g=(0,i.useParams)(),v=(0,i.useRouter)(),[y,P]=(0,n.useState)(null),{articleData:w}=(0,d.o)(),{isNotFoundPage:k}=(0,p.F)();(0,n.useEffect)(()=>{P(new URLSearchParams(window.location.search))},[b]);
1let[j,_]=(0,n.useState)({isLoading:!0}),[S,N]=(0,n.useState)(()=>{if(b.includes("/articles"))return"";if(b.includes("/news")||b.includes("/sponsor"))return"lg:p-[10px_18px_10px_18px] px-4 pb-4 w-full max-w-[1280px] mx-auto border-0";if(b.includes("/newsletter"))return"lg:p-[24px_18px_24px_18px] p-4 w-full max-w-[1280px] mx-auto border-0";if(b.includes("/about-us")||b.includes("/careers"))return"p-0";if(b.includes("/404"))return"p-0";else if("/"===b)return"lg:p-[24px_30px_24px_30px] p-4 w-full max-w-[1280px] mx-auto border-0";else return"lg:p-[10px_30px_10px_30px] p-4 w-full max-w-[1280px] mx-auto border-0"}),F=(0,n.useCallback)((e,t)=>{if(e.includes("/articles"))return t&&"specialized"===t.template?"p-0":"";if(e.includes("/news")||e.includes("/sponsor"))return t&&"specialized"===t.template?"p-0":"lg:p-[10px_18px_10px_18px] px-4 pb-4 w-full max-w-[1280px] mx-auto border-0";if(e.includes("/newsletter"))return"lg:p-[24px_18px_24px_18px] p-4 w-full max-w-[1280px] mx-auto border-0";if(e.includes("/about-us"))return"p-0";if(e.includes("/careers"))return"p-0";else if(e.includes("/404"))return"p-0";else if(e.includes("/thank-you"))return"p-0";else if(e.includes("/thank-you?offer=norton-neo"))return"p-0";else if("/"===e)return"lg:p-[24px_30px_24px_30px] p-4 w-full max-w-[1280px] mx-auto border-0";else return"lg:p-[10px_30px_10px_30px] p-4 w-full max-w-[1280px] mx-auto border-0"},[]);(0,n.useEffect)(()=>{let e,t=null==y?void 0:y.get("category");(e=b.includes("/articles")&&t?"p-0":F(b,w))!==S&&N(e)},[b,y,w,F,S]),(0,n.useEffect)(()=>{let e=null==y?void 0:y.get("category"),t=b.includes("/articles")&&e;w&&"specialized"===w.template&&(b.includes("/articles")||b.includes("/news")||b.includes("/sponsor"))&&!t&&N("p-0")},[w,b,y]),(0,n.useEffect)(()=>{let e=null==y?void 0:y.get("category"),t=b.includes("/articles")&&e;(b.includes("/articles")||b.includes("/news")||b.includes("/sponsor"))&&!t&&"/news"!==b&&"/sponsor"!==b||!w||d.o.getState().setArticleData(null)},[b,y,w]),(0,n.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/layout-data");if(!t.ok)throw Error("Failed to fetch layout data");let s=await t.json();e&&(_({...s,isLoading:!1}),d.o.getState().setLayoutData(s),d.o.getState().setHeaderData(f),d.o.getState().setFooterData(r),d.o.getState().setSettings(x),d.o.getState().setIsLoading(!1))}catch(t){console.error("Error loading layout data:",t),e&&_(e=>({...e,isLoading:!1}))}})(),()=>{e=!1}},[]),(0,n.useEffect)(()=>{},[b,t]);let E=(0,n.useCallback)(e=>{if(!e)return;let t="";"query"in e&&e.query?t=e.query:"string"==typeof e&&(t=e),t.trim()&&v.push("/search?q=".concat(encodeURIComponent(t.trim())))},[v]);(0,n.useEffect)(()=>{(null==m?void 0:m[0])&&u.n.getState().setConfig(m[0])},[m]);let C=(0,n.useMemo)(()=>b.startsWith("/template-layout/about")||b.startsWith("/template-layout/contact")?l:b.startsWith("/subscribe")?a:"page-id"in g?a:(0,n.memo)(function(e){let{children:t}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)(o.A,{featuredPosts:j.featuredPosts||[],featuredArticles:j.featuredArticles||[],uniqueCategories:h,onSearch:E,headerData:f,featuredPodcasts:j.featuredPodcasts||[],isSearchResultsVisible:!1,isNotFoundPage:k,footerData:r},null==f?void 0:f._id),(0,s.jsx)("main",{className:S,children:t}),(0,s.jsx)(c.A,{data:r})]})}),[b,j,E,f,r,S,h]);return(0,s.jsx)(C,{children:t})})}},e=>{e.O(0,[4246,8096,8385,6209,9670,2711,743,7358],()=>e(e.s=15287)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.