PageSourceSearch

https://asiapacificdefencereporter.com/_next/static/chunks/app/layout-8e329e60dd8d99d2.js

js asiapacificdefencereporter.com collected 2026-10-02 04:14:34 UTC 22,879 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{9924:function(e,t,r){Promise.resolve().then(r.t.bind(r,5878,23)),Promise.resolve().then(r.t.bind(r,2972,23)),Promise.resolve().then(r.t.bind(r,8003,23)),Promise.resolve().then(r.bind(r,6201)),Promise.resolve().then(r.bind(r,7737)),Promise.resolve().then(r.bind(r,1378)),Promise.resolve().then(r.bind(r,3534)),Promise.resolve().then(r.bind(r,1056)),Promise.resolve().then(r.bind(r,5328)),Promise.resolve().then(r.t.bind(r,6050,23)),Promise.resolve().then(r.t.bind(r,3143,23)),Promise.resolve().then(r.t.bind(r,228,23))},875:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(9205).Z)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},9219:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(9205).Z)("facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]])},598:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(9205).Z)("linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]])},3566:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(9205).Z)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]])},3247:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(9205).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},2369:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(9205).Z)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},9376:function(e,t,r){"use strict";var n=r(5475);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},6201:function(e,t,r){"use strict";r.d(t,{default:function(){return a}});var n=r(9376),s=r(2265);function a(){let e=(0,n.usePathname)(),t=(0,n.useSearchParams)(),r=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let n=e+(t.toString()?"?".concat(t):"");{window.gtag&&window.gtag("event","page_view",{page_path:n,page_location:window.location.href,page_title:document.title});let e=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s=window.broadstreet;if(s&&"function"==typeof s.watch){let e=r.current;null!==e&&e!==n&&"function"==typeof s.clearCampaignLog&&s.clearCampaignLog(),s.watch({networkId:10450}),r.current=n}else t<20&&setTimeout(()=>e(t+1),150)};e()}},[e,t]),null}},7737:function(e,t,r){"use strict";r.d(t,{default:function(){return a}});var n=r(7437),s=r(8667);function a(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.default,{"data-cfasync":"false",src:"https://cdn.broadstreetads.com/init-2.min.js",strategy:"afterInteractive"}),(0,n.jsx)(s.default,{id:"broadstreet-init","data-cfasync":"false",strategy:"afterInteractive",dangerouslySetInnerHTML:{__html:"\n            function initBroadstreet() {\n              window.__broadstreetInitAttempts = (window.__broadstreetInitAttempts || 0) + 1;\n\n              if (window.broadstreet && typeof window.broadstreet.watch === 'function') {\n                window.broadstreet.watch({ networkId: 10450 });\n              } else if (window.__broadstreetInitAttempts < 30) {\n                setTimeout(initBroadstreet, 100);\n              }\n            }\n            initBroadstreet();\n          "}})]})}},3534:function(e,t,r){"use strict";r.d(t,{FloaterMenu:function(){return f}});var n=r(7437),s=r(2489),a=r(3566),i=r(9219),o=r(598),l=r(9949),c=r(7648),u=r(2265);let d=(0,r(5752).LR)(),h="apdr"===d.brandKey;function f(){let[e,t]=(0,u.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{onClick:()=>t(!e),className:"fixed bottom-6 right-6 z-50 w-14 h-14 bg-blue-600 text-white rounded-full shadow-lg hover:bg-blue-700 transition-all flex items-center justify-center hover:scale-110","aria-label":"Open menu",children:e?(0,n.jsx)(s.Z,{className:"w-6 h-6"}):(0,n.jsx)(a.Z,{className:"w-6 h-6"})}),e&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-opacity-50 z-40",onClick:()=>t(!1)}),(0,n.jsxs)("div",{className:"fixed bottom-24 right-6 z-50 bg-white rounded-lg shadow-2xl w-72 overflow-hidden",children:[(0,n.jsx)("div",{className:"bg-blue-600 px-6 py-4",children:(0,n.jsx)("h3",{className:"text-white",children:"Qu
1ick Menu"})}),(0,n.jsxs)("div",{className:"py-3",children:[!h&&(0,n.jsx)(c.default,{href:"/subscribe",onClick:()=>t(!1),className:"block px-6 py-3 text-gray-700 hover:bg-blue-50 hover:text-blue-600 transition-colors",children:"Subscribe"}),(0,n.jsx)(c.default,{href:d.aboutPageHref,onClick:()=>t(!1),className:"block px-6 py-3 text-gray-700 hover:bg-blue-50 hover:text-blue-600 transition-colors",children:"About"}),(0,n.jsx)(c.default,{href:"/back-issues",onClick:()=>t(!1),className:"block px-6 py-3 text-gray-700 hover:bg-blue-50 hover:text-blue-600 transition-colors",children:"Back Issues"}),(0,n.jsx)(c.default,{href:"/videos",onClick:()=>t(!1),className:"block px-6 py-3 text-gray-700 hover:bg-blue-50 hover:text-blue-600 transition-colors",children:"Videos"}),(0,n.jsx)(c.default,{href:d.contactPageHref,onClick:()=>t(!1),className:"block px-6 py-3 text-gray-700 hover:bg-blue-50 hover:text-blue-600 transition-colors",children:"Contact & Advertising"}),(0,n.jsxs)("div",{className:"border-t border-gray-200 mt-3 pt-4 px-6 pb-4",children:[(0,n.jsx)("p",{className:"text-gray-600 mb-3",children:"Follow Us"}),(0,n.jsxs)("div",{className:"flex gap-3",children:[(0,n.jsx)("a",{href:d.socialLinks.facebook,target:"_blank",rel:"noopener noreferrer",className:"p-2 bg-gray-100 hover:bg-blue-600 hover:text-white transition-colors rounded","aria-label":"Facebook",children:(0,n.jsx)(i.Z,{className:"w-5 h-5"})}),(0,n.jsx)("a",{href:d.socialLinks.linkedin,target:"_blank",rel:"noopener noreferrer",className:"p-2 bg-gray-100 hover:bg-blue-600 hover:text-white transition-colors rounded","aria-label":"LinkedIn",children:(0,n.jsx)(o.Z,{className:"w-5 h-5"})}),(0,n.jsx)("a",{href:d.socialLinks.twitter,target:"_blank",rel:"noopener noreferrer",className:"p-2 bg-gray-100 hover:bg-blue-600 hover:text-white transition-colors rounded","aria-label":"X",children:(0,n.jsx)(l.b,{className:"w-5 h-5"})})]})]})]})]})]})]})}},1056:function(e,t,r){"use strict";r.d(t,{Header:function(){return x}});var n=r(7437),s=r(2369),a=r(875),i=r(7648),o=r(2265);function l(e){let{user:t,canViewAdminPortal:r=!1,useBrandLinks:l=!1}=e,[c,u]=(0,o.useState)(!1),d=(0,o.useRef)(null);(0,o.useEffect)(()=>{let e=e=>{let t=e.target;d.current&&!d.current.contains(t)&&u(!1)};if(c)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[c]);let h=l?"hover:opacity-75":"hover:text-gray-300",f=l?"font-bold text-brand-primary transition-colors ".concat(h):"transition-colors ".concat(h);return t?(0,n.jsxs)("div",{ref:d,className:"relative flex items-center gap-1",children:[(0,n.jsxs)(i.default,{href:"/profile",className:"flex items-center gap-2 ".concat(f),children:[(0,n.jsx)(s.Z,{className:"w-4 h-4"}),"My Profile"]}),r&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{type:"button","aria-haspopup":"menu","aria-expanded":c,"aria-controls":"profile-menu","aria-label":"Toggle profile menu",onClick:()=>u(e=>!e),onKeyDown:e=>{"Escape"===e.key&&u(!1)},className:"p-1 rounded ".concat(f),children:(0,n.jsx)(a.Z,{className:"w-4 h-4 transition-transform ".concat(c?"rotate-180":"")})}),c&&(0,n.jsx)("div",{id:"profile-menu",role:"menu","aria-label":"Profile menu",className:"absolute top-full right-0 mt-2 min-w-[180px] bg-white border border-gray-200 shadow-lg z-50",children:(0,n.jsx)("div",{className:"py-2",children:(0,n.jsx)(i.default,{href:"/admin",role:"menuitem",className:"block px-4 py-2 text-gray-700 hover:bg-blue-50 hover:text-blue-600 transition-colors",onClick:()=>u(!1),children:"Admin Portal"})})})]})]}):(0,n.jsx)(i.default,{href:"/login",className:"flex items-center gap-2 ".concat(f),children:"Login"})}var c=r(3753),u=r(6594),d=r(5346),h=r(3247),f=r(2489),m=r(3566),b=r(3145),p=r(9376);function x(e){var t;let{initialUser:r=null,headerConfig:s}=e,a=(0,o.useMemo)(()=>(0,d.e)(),[]),[x,g]=(0,o.useState)(!1),[v,w]=(0,o.useState)(!1),[y,j]=(0,o.useState)(!0),k=(0,o.useRef)(0),[N,S]=(0,o.useState)(!1),[C,_]=(0,o.useState)(""),P=(0,o.useRef)(null),E=(0,o.useRef)(null),L=(0,p.useRouter)(),A=(0,p.usePathname)(),[M,Z]=(0,o.useState)(r),[I,T]=(0,o.useState)(!1),[,R]=(0,o.useState)(!1),D=(0,o.useRef)(!1),z=(0,o.useRef)(0),H=(0,o.useRef)(0),B=(0,o.useRef)(null),U=(0,o.useCallback)(async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=Date.now();if(!t&&B.current&&r-B.current.timestamp<3e4)return B.current.value;let{isSubscribed:n}=await (0,c.g)(e);return B.current={value:n,timestamp:r},n},[]),F=(0,o.useCallback)(async e=>{let t=++z.current,{status:r,user:n,isAdmin:s}=await (0,u.Qp)();
1t===z.current&&("signed-in"===r&&(null==n?void 0:n.id)===e&&null!==s?T(s):"signed-out"===r&&T(!1))},[]);(0,o.useEffect)(()=>{r&&!D.current&&(D.current=!0,F(r.id))},[r,F]),(0,o.useEffect)(()=>{let e=null,{data:{subscription:t}}=a.auth.onAuthStateChange((t,r)=>{if("INITIAL_SESSION"===t&&!r)return;let n=++H.current;if(null!==e&&(clearTimeout(e),e=null),r){let t=r.user;Z(t),e=setTimeout(async()=>{e=null,await F(t.id);let r=await U(t,!0);n===H.current&&R(r)},0)}else z.current+=1,Z(null),T(!1),R(!1),B.current=null});return()=>{null!==e&&clearTimeout(e),t.unsubscribe()}},[a,U,F]),(0,o.useEffect)(()=>{(async()=>{let e=++H.current,{status:t,user:r}=await (0,u.qB)();if(e===H.current){if("signed-in"===t&&r){Z(r),await F(r.id);let t=await U(r);if(e!==H.current)return;R(t)}else"signed-out"===t&&(z.current+=1,Z(null),T(!1),R(!1),B.current=null)}})()},[A,a,U,F]),(0,o.useEffect)(()=>{M||w(!1)},[M]),(0,o.useEffect)(()=>{let e=()=>{let e=window.scrollY;e<k.current||e<10?j(!0):e>k.current&&e>100&&(j(!1),S(!1)),k.current=e};return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),(0,o.useEffect)(()=>{function e(e){let t=e.target,r=P.current&&P.current.contains(t),n=E.current&&E.current.contains(t);!N||r||n||(S(!1),_(""))}if(N)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[N]);let q=(0,o.useMemo)(()=>s.menuCategories.map(e=>"More"===e.title?{...e,items:e.items.filter(e=>"My Profile"!==e.label)}:e),[s.menuCategories]),K=(0,o.useCallback)(()=>{g(!1),S(!1)},[]),O=(0,o.useCallback)(()=>{C.trim()&&(L.push("/search?q=".concat(encodeURIComponent(C))),S(!1))},[C,L]),Q="apdr"===s.brandKey,W=Q?s.logoUrl:null!==(t=s.logoMobileUrl)&&void 0!==t?t:s.logoUrl,X=s.logoUrl,V=Q?400:300,G=Q?128:66,Y=Q?"block h-14 2xl:h-16 3xl:h-20 w-auto max-w-[360px] object-contain cursor-pointer":"block h-16 2xl:h-20 w-auto object-contain cursor-pointer",J=Q?"px-1.5 2xl:px-2 3xl:px-3 py-4 text-sm 3xl:text-base font-bold [&_span]:font-bold text-brand-primary hover:opacity-75 flex items-center gap-1 whitespace-nowrap":"px-1.5 2xl:px-2 py-4 text-sm text-white hover:text-gray-300 flex items-center gap-1",$=Q?"text-brand-primary":"text-white",ee=Q?"bg-white":"bg-brand-header",et=Q?"block px-5 py-3 font-medium text-brand-primary hover:bg-blue-50 hover:opacity-75 transition-colors":"block px-5 py-3 text-gray-700 hover:bg-blue-50 hover:text-brand-primary transition-colors",er=(0,n.jsxs)("nav",{className:Q?"flex items-center justify-center flex-1 min-w-0 gap-x-2 3xl:gap-x-4":"flex items-center justify-center flex-1 min-w-0",children:[(0,n.jsx)(i.default,{href:"/",className:J,children:Q?(0,n.jsx)("span",{className:"",children:"Home"}):"Home"}),q.map(e=>{let t=e.items.filter(e=>!!e.href);return 0===t.length?null:(0,n.jsxs)("div",{className:"group relative",children:[t.length>1?(0,n.jsxs)("button",{className:J,children:[(0,n.jsx)("span",{className:"",children:e.title}),(0,n.jsx)("svg",{className:"w-3 h-3 transition-transform group-hover:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}):(0,n.jsx)(i.default,{href:t[0].href,className:J,children:(0,n.jsx)("span",{className:"",children:e.title})}),t.length>1&&(0,n.jsx)("div",{className:"absolute top-full left-0 min-w-[240px] bg-white border border-gray-200 shadow-lg opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50",children:(0,n.jsx)("div",{className:"py-2",children:t.map(e=>(0,n.jsx)(i.default,{href:e.href,className:et,children:e.label},e.label))})})]},e.title)})]}),en=(0,n.jsxs)("div",{className:"relative flex items-center gap-3 flex-shrink-0 ".concat($),children:[s.enableAuth&&(0,n.jsx)(l,{user:M,canViewAdminPortal:I,useBrandLinks:Q}),(0,n.jsx)("button",{onClick:()=>S(!N),className:"p-2 ".concat($," hover:opacity-75"),children:(0,n.jsx)(h.Z,{className:"social-icons"})}),N&&(0,n.jsx)("div",{ref:P,className:"absolute top-full right-0 w-80 bg-white border shadow-lg mt-2 z-50",children:(0,n.jsxs)("div",{className:"p-4 flex",children:[(0,n.jsx)("input",{type:"text",placeholder:"",value:C,onChange:e=>_(e.target.value),onKeyDown:e=>{"Enter"===e.key&&O()},className:"w-full px-4 py-2 border focus:outline-none text-gray-900"}),(0,n.jsx)("button",{onClick:()=>O(),className:"p-2 text-white bg-brand-primary",children:"search"})]})})]});return(0,n.jsxs)("header",{className:"sticky top-0 z-40 ".concat(ee," transition-transform duration-300 ").concat(y?"translate-y-0":"-translate-y-full"),children:[(0,n.jsx)("div",{className:"hidden lg:block ".concat(ee," border-b border-gray-200"),children:(0,n.jsx)("div",{className:"container mx-auto px-4",children:(0,n.jsxs)("div",{className:"flex items-center justify-between h-32",children:[(0,n.jsx)(i.default,{href:"/",onClick:K,className:"shrink-0",children:(0,n.jsx)(b.default,{src:X,alt:s.logoAlt,width:V,height:G,className:Y,priority:!0})}),er,en]})})}),(0,n.jsx)("div",{className:"lg:hidden bg-white border-b border-gray-200",children:(0,n.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,n.jsx)("button",{onClick:()=>g(!x),children:x?(0,n.jsx)(f.Z,{className:"w-6 h-6 text-gray-700"}):(0,n.jsx)(m.Z,{className:"w-6 h-6 text-gray-700"})}),(0,n.jsx)(i.default,{href:"/","aria-label":"Go to ".concat(s.siteName," homepage"),onClick:K,children:(0,n.jsx)(b.default,{src:W,alt:s.logoAlt,width:Q?400:200,height:Q?128:44,className:Q?"h-10 w-auto object-contain":"h-9 w-auto",priority:!0,unoptimized:!1})}),(0,n.jsx)("button",{onClick:()=>S(!N),className:"p-2 ".concat(Q?"text-brand-primary hover:opacity-75":"text-gray-950"),children:(0,n.jsx)(h.Z,{className:"social-icons"})}),N&&(0,n.jsx)("div",{ref:E,className:"absolute top-full right-0 w-80 bg-white border shadow-lg mt-2 z-50",children:(0,n.jsxs)("div",{className:"p-4 flex",children:[(0,n.jsx)("input",{type:"text",placeholder:"",value:C,onChange:e=>_(e.target.value),className:"w-full px-4 py-2 border focus:outline-none text-gray-900",onKeyDown:e=>{"Enter"===e.key&&O()}}),(0,n.jsx)("button",{onClick:()=>O(),className:"p-2 text-white bg-brand-primary",children:"search"})]})})]})}),x&&(0,n.jsx)("div",{className:"lg:hidden bg-white border-t max-h-[70vh] overflow-y-auto",children:(0,n.jsxs)("nav",{children:[(0,n.jsx)("div",{className:"border-b",children:(0,n.jsx)(i.default,{href:"/",className:"block px-4 py-3 font-medium hover:bg-blue-50",onClick:()=>g(!1),children:"Home"})}),q.map(e=>(0,n.jsxs)("div",{className:"border-b",children:[(0,n.jsx)("div",{className:"px-4 py-3 bg-gray-50 font-medium",children:e.title}),e.items.filter(e=>!!e.href).map(e=>(0,n.jsx)(i.default,{href:e.href,className:"block px-6 py-3 hover:bg-blue-50",onClick:()=>g(!1),children:e.label},e.label))]},e.title)),s.enableAuth&&(0,n.jsx)("div",{className:"border-b",children:M?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center bg-[#003366] text-white",children:[(0,n.jsx)(i.default,{href:"/profile",className:"flex-1 px-4 py-3 font-medium hover:bg-[#002244] transition-colors",onClick:()=>g(!1),children:"My Profile"}),(0,n.jsx)("button",{type:"button","aria-haspopup":"menu","aria-expanded":v,"aria-label":"Toggle mobile profile menu",className:"px-4 py-3 hover:bg-[#002244] transition-colors",onClick:()=>w(e=>!e),children:(0,n.jsx)("svg",{className:"w-4 h-4 transition-transform ".concat(v?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]}),v&&I&&(0,n.jsx)(i.default,{href:"/admin",className:"block px-6 py-3 bg-white text-gray-800 hover:bg-blue-50 transition-colors",onClick:()=>{w(!1),g(!1)},children:"Admin Portal"})]}):(0,n.jsx)(i.default,{href:"/login",className:"block px-4 py-3 bg-[#003366] text-white font-medium hover:bg-[#002244] transition-colors",onClick:()=>g(!1),children:"Login"})})]})})]})}},5328:function(e,t,r){"use strict";r.d(t,{default:function(){return o}});var n=r(7437),s=r(2265),a=r(5752);let i=Date.UTC(2026,8,29,23,59,59);function o(){let e=(0,a.LR)(),t="".concat("aav-welcome-banner-dismissed","-").concat(e.brandKey),[r,o]=(0,s.use
1State)(!1);return((0,s.useEffect)(()=>{!(Date.now()>i||localStorage.getItem(t))&&(new URLSearchParams(window.location.search).has("preview_token")||o(!0))},[t]),r)?(0,n.jsxs)("div",{role:"region","aria-label":"Welcome message",style:{position:"fixed",bottom:"1.5rem",left:"50%",transform:"translateX(-50%)",zIndex:9999,maxWidth:"520px",width:"calc(100% - 2rem)",background:"#1a2744",color:"#fff",borderRadius:"10px",boxShadow:"0 4px 24px rgba(0,0,0,0.35)",padding:"1.1rem 1.4rem 1rem",display:"flex",alignItems:"flex-start",gap:"0.9rem"},children:[(0,n.jsxs)("div",{style:{flex:1},children:[(0,n.jsx)("p",{style:{margin:0,fontWeight:700,fontSize:"1rem"},children:"Friendly update"}),(0,n.jsxs)("p",{style:{margin:"0.3rem 0 0",fontSize:"0.875rem",opacity:.85,lineHeight:1.45},children:["Thanks for reading ",e.siteName,". Free readers can enjoy up to 3 articles each week. Members are allowed to view 6 articles and subscribed users get unlimited access to all content."]})]}),(0,n.jsx)("button",{onClick:function(){localStorage.setItem(t,"1"),o(!1)},"aria-label":"Dismiss welcome banner",style:{background:"none",border:"none",color:"#fff",cursor:"pointer",fontSize:"1.25rem",lineHeight:1,padding:"0.1rem 0.2rem",opacity:.7,flexShrink:0},children:"✕"})]}):null}},9949:function(e,t,r){"use strict";r.d(t,{b:function(){return s}});var n=r(7437);function s(e){let{className:t,...r}=e;return(0,n.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",focusable:"false",className:t,...r,children:(0,n.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231 5.45-6.231Zm-1.161 17.52h1.833L7.084 4.126H5.117l11.966 15.644Z"})})}},3753:function(e,t,r){"use strict";r.d(t,{g:function(){return a}});var n=r(6594),s=r(5346);async function a(e){try{let t=(0,s.e)(),r=null!=e?e:null;if(r||(r=(await (0,n.qB)()).user),!r)return{isSubscribed:!1,subscription:null,error:"User not authenticated"};let{data:a}=await t.from("profiles").select("has_comp_access, comp_access_expires_at").eq("id",r.id).maybeSingle();if(null==a?void 0:a.has_comp_access){let e=a.comp_access_expires_at;if(!e||new Date(e)>new Date)return{isSubscribed:!0,subscription:null,isComp:!0,error:null}}let{data:i,error:o}=await t.from("subscriptions").select("*").eq("user_id",r.id).in("status",["active","trialing"]).single();if(o&&"PGRST116"!==o.code)return console.error("Error checking subscription:",o),{isSubscribed:!1,subscription:null,error:o.message};if(i&&new Date(i.current_period_end)<new Date)return{isSubscribed:!1,subscription:i,error:"Subscription expired"};return{isSubscribed:!!i,subscription:i,error:null}}catch(e){return console.error("Unexpected error checking subscription:",e),{isSubscribed:!1,subscription:null,error:e instanceof Error?e.message:"Unknown error"}}}},6594:function(e,t,r){"use strict";r.d(t,{Qp:function(){return u},qB:function(){return h}});var n=r(5346);let s={status:"signed-out",user:null},a={status:"unknown",user:null};class i extends Error{constructor(){super("Timed out waiting on the Supabase auth lock."),this.name="AuthLockTimeoutError"}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8e3;return new Promise((r,n)=>{let s=setTimeout(()=>n(new i),t);Promise.resolve(e()).then(e=>{clearTimeout(s),r(e)},e=>{clearTimeout(s),n(e)})})}async function l(e){try{var t;let{data:r,error:n}=await o(()=>e.auth.getSession());if(n||!(null===(t=r.session)||void 0===t?void 0:t.user))return a;return{status:"signed-in",user:r.session.user}}catch(e){return a}}let c={...a,isAdmin:null};async function u(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3);try{let t=await fetch("/api/auth/session",{credentials:"include",cache:"no-store",signal:e.signal});if(!t.ok)return c;let r=await t.json();if(!r.user)return{status:"signed-out",user:null,isAdmin:!1};return{status:"signed-in",user:r.user,isAdmin:"boolean"==typeof r.isAdmin?r.isAdmin:null}}catch(e){return c}finally{clearTimeout(t)}}async function d(){let e=(0,n.e)();try{let{data:t,error:r}=await o(()=>e.auth.getUser());if(!r)return t.user?{status:"signed-in",user:t.user}:s;if(r instanceof Error&&"AuthSessionMissingError"===r.name)return s;return await l(e)}catch(t){if(t instanceof i)return a;
1if("object"==typeof t&&null!==t&&!0===t.isAcquireTimeout||(t instanceof DOMException?"AbortError"===t.name:t instanceof Error&&("AbortError"===t.name||t.message.includes("Lock broken by another request with the 'steal' option."))))return await l(e);return console.error("Failed to resolve auth state",t),a}}async function h(){let e=await d();if("unknown"!==e.status)return e;let{status:t,user:r}=await u();return{status:t,user:r}}},5346:function(e,t,r){"use strict";let n,s;r.d(t,{K:function(){return o},e:function(){return l}});var a=r(2990),i=r(8280);function o(){return null!=s||(s=(0,i.eI)("https://vjddfsygceajjbnhhomn.supabase.co","sb_publishable_51h8395XM9BPDM_S0-ISlw_v3Ab9lDQ",{auth:{persistSession:!1,autoRefreshToken:!1,detectSessionInUrl:!1,lock:(e,t,r)=>r()}})),s}function l(){return null!=n||(n=(0,a.createBrowserClient)("https://vjddfsygceajjbnhhomn.supabase.co","sb_publishable_51h8395XM9BPDM_S0-ISlw_v3Ab9lDQ")),n}},228:function(){},6050:function(){},3143:function(){}},function(e){e.O(0,[5147,4053,8970,2972,5878,3459,8173,5752,1378,2971,2117,1744],function(){return e(e.s=9924)}),_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.