1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,871522,e=>{"use strict";var t=e.i(843476);let r={color:"/brand/logo/oneresume-wordmark.svg",white:"/brand/logo/oneresume-wordmark-white.svg",mono:"/brand/logo/oneresume-wordmark-mono.svg"},n=628/140;function a({variant:e="color",height:a=28,className:i=""}){let o=Math.round(a*n);return(0,t.jsx)("img",{src:r[e],alt:"OneResume.ai",width:o,height:a,style:{height:a,width:"auto"},className:i})}e.s(["default",()=>a])},475254,e=>{"use strict";var t=e.i(271645);let r=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)},n=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim();var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,iconNode:u,...c},d)=>(0,t.createElement)("svg",{ref:d,...a,width:r,height:r,stroke:e,strokeWidth:o?24*Number(i)/Number(r):i,className:n("lucide",s),...!l&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(c)&&{"aria-hidden":"true"},...c},[...u.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(l)?l:[l]])),o=(e,a)=>{let o=(0,t.forwardRef)(({className:o,...s},l)=>(0,t.createElement)(i,{ref:l,iconNode:a,className:n(`lucide-${r(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...s}));return o.displayName=r(e),o};e.s(["default",()=>o],475254)},233525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},998183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(190809)._(e.r(998183)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},818581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(271645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=i(e,n)),t&&(a.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esMo
1dule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},718967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return b},MiddlewareNotFoundError:function(){return j},MissingStaticPage:function(){return w},NormalizeError:function(){return x},PageNotFoundError:function(){return y},SP:function(){return m},ST:function(){return g},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let m="undefined"!=typeof performance,g=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class b extends Error{}class x extends Error{}class y extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class w extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class j extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(718967),a=e.r(652817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return y}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(190809),o=e.r(843476),s=i._(e.r(271645)),l=e.r(195057),u=e.r(8372),c=e.r(818581),d=e.r(718967),f=e.r(405550);e.r(233525);let h=e.r(91949),p=e.r(573668),m=e.r(509396);function g(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function b(t){var r;let n,a,i,[l,b]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),y=(0,s.useRef)(null),{href:w,as:j,children:v,prefetch:k=null,passHref:C,replace:N,shallow:P,scroll:S,onClick:O,onMouseEnter:_,onTouchStart:T,legacyBehavior:E=!1,onNavigate:R,ref:A,unstable_dynamicOnHover:$,...I}=t;n=v,E&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let L=s.default.useContext(u.AppRouterContext),M=!1!==k,U=!1!==k?null===(r=k)||"auto"===r?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,{href:F,as:z}=s.default.useMemo(()=>{let e=g(w);return{href:e,as:j?g(j):e}},[w,j]);if(E){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>
1` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(n)}let B=E?a&&"object"==typeof a&&a.ref:A,D=s.default.useCallback(e=>(null!==L&&(y.current=(0,h.mountLinkInstance)(e,F,L,U,M,b)),()=>{y.current&&((0,h.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,h.unmountPrefetchableInstance)(e)}),[M,F,L,U,b]),G={ref:(0,c.useMergedRef)(D,B),onClick(t){E||"function"!=typeof O||O(t),E&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!L||t.defaultPrevented||function(t,r,n,a,i,o,l){if("undefined"!=typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(699781);s.default.startTransition(()=>{d(n||r,i?"replace":"push",o??!0,a.current)})}}(t,F,z,y,N,S,R)},onMouseEnter(e){E||"function"!=typeof _||_(e),E&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),L&&M&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){E||"function"!=typeof T||T(e),E&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),L&&M&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,d.isAbsoluteUrl)(z)?G.href=z:E&&!C&&("a"!==a.type||"href"in a.props)||(G.href=(0,f.addBasePath)(z)),i=E?s.default.cloneElement(a,G):(0,o.jsx)("a",{...I,...G,children:n}),(0,o.jsx)(x.Provider,{value:l,children:i})}e.r(284508);let x=(0,s.createContext)(h.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},37727,e=>{"use strict";let t=(0,e.i(475254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},492161,e=>{"use strict";let t=(0,e.i(475254).default)("menu",[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]);e.s(["Menu",()=>t],492161)},70119,e=>{"use strict";var t=e.i(843476),r=e.i(522016),n=e.i(618566),a=e.i(271645),i=e.i(492161),o=e.i(37727),s=e.i(791432),l=e.i(871522);function u(){let e=(0,n.usePathname)(),u="/"===e,c=u||"/free-score"===e||"/unique-value-proposition"===e,[d,f]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1),{user:m,loading:g}=(0,s.useAuth)();(0,a.useEffect)(()=>{let e=()=>{f(window.scrollY>10)};return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]);let b=[{name:"How it Works",href:"/how-it-works"},{name:"Features",href:"/features"},{name:"Career Fit",href:"/features/career-fit"},{name:"Pricing",href:"/pricing"},{name:"For Coaches",href:"/career-coach"},{name:"Blog",href:"/blog"}];return(0,t.jsx)("header",{className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${d?"bg-white/80 dark:bg-slate-900/80 backdrop-blur-md shadow-sm py-4":"bg-transparent py-6"}`,children:(0,t.jsxs)("div",{className:"container mx-auto px-6 flex items-center justify-between",children:[(0,t.jsx)(r.default,{href:"/",className:"flex items-center gap-2 z-50","aria-label":"OneResume.ai home",children:!d&&c?(0,t.jsx)(l.default,{variant:"white",height:28}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.default,{variant:"color",height:28,className:"block dark:hidden transition-opacity duration-300"}),(0,t.jsx)(l.default,{variant:"white",height:28,className:"hidden dark:block transition-opacity duration-300"})]})}),(0,t.jsxs)("nav",{className:"hidden md:flex items-center gap-8",children:[b.map(e=>(0,t.jsx)(r.default,{href:e.href,className:`text-sm font-medium transition-colors ${d?"text-slate-600 dark:text-slate-300 hover:text-primary":c?"text-white/80 hover:text-white":"text-slate-600 dark:text-slate-300 hover:text-primary"}`,children:e.name},e.name)),g?null:m?(0,t.jsx)(r.default,{href:"/dashboard",className:`px-5 py-2.5 text-sm font-medium rounded-full transition-all ${d?"bg-primary text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20":c?"bg-white text-primary hover:bg-white/90 shadow-lg shadow-black/10":"bg-primary text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20"}`,children:"Go to Dashboard"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{href:"/login",className:`text-sm font-medium transition-colors ${d?"text-slate-600 dar
1k:text-slate-300 hover:text-primary":u?"text-white/80 hover:text-white":"text-slate-600 dark:text-slate-300 hover:text-primary"}`,children:"Sign in"}),(0,t.jsx)(r.default,{href:"/signup",className:`px-5 py-2.5 text-sm font-medium rounded-full transition-all ${d?"bg-primary text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20":u?"bg-white text-primary hover:bg-white/90 shadow-lg shadow-black/10":"bg-primary text-white hover:bg-blue-600 shadow-lg shadow-blue-500/20"}`,children:"Get started"})]})]}),(0,t.jsx)("button",{className:`md:hidden z-50 transition-colors ${h||d?"text-slate-800 dark:text-white":c?"text-white":"text-slate-800 dark:text-white"}`,onClick:()=>p(!h),"aria-label":h?"Close menu":"Open menu","aria-expanded":h,children:h?(0,t.jsx)(o.X,{size:24,"aria-hidden":"true"}):(0,t.jsx)(i.Menu,{size:24,"aria-hidden":"true"})}),h&&(0,t.jsxs)("div",{className:"fixed inset-0 bg-white dark:bg-slate-900 z-40 flex flex-col items-center justify-center gap-8 md:hidden",children:[b.map(e=>(0,t.jsx)(r.default,{href:e.href,onClick:()=>p(!1),className:"text-xl font-medium text-slate-800 dark:text-white",children:e.name},e.name)),m?(0,t.jsx)(r.default,{href:"/dashboard",onClick:()=>p(!1),className:"px-8 py-3 bg-primary text-white text-lg font-medium rounded-full hover:bg-blue-600 transition-colors",children:"Go to Dashboard"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.default,{href:"/login",onClick:()=>p(!1),className:"text-xl font-medium text-slate-800 dark:text-white",children:"Sign in"}),(0,t.jsx)(r.default,{href:"/signup",onClick:()=>p(!1),className:"px-8 py-3 bg-primary text-white text-lg font-medium rounded-full hover:bg-blue-600 transition-colors",children:"Get started"})]})]})]})})}e.s(["default",()=>u])},643531,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],643531)},652354,e=>{"use strict";e.s(["TRIAL_DAYS",0,7])},33281,e=>{"use strict";let t="/settings";function r(e){if("string"!=typeof e)return t;let r=e.trim();return!r.startsWith("/")||r.startsWith("//")||r.includes("\\")||/^\/[^/?#]*:/.test(r)||r.startsWith("/billing/return")||r.length>1024?t:r}function n(){return`${window.location.pathname}${window.location.search}`}e.s(["currentReturnTo",()=>n,"safeReturnTo",()=>r])},409899,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(522016),i=e.i(531278),o=e.i(791432),s=e.i(942047),l=e.i(558249),u=e.i(865012);function c({className:e}){let c=(0,n.useRouter)(),{user:d,loading:f}=(0,o.useAuth)(),{isCoach:h,loading:p}=(0,s.useSubscription)(),[m,g]=(0,r.useState)(!1),[b,x]=(0,r.useState)("");if(f||p&&d)return(0,t.jsx)("button",{disabled:!0,className:e,"aria-busy":"true",children:(0,t.jsx)(i.Loader2,{size:16,className:"animate-spin inline"})});if(d&&h)return(0,t.jsx)(a.default,{href:"/coach",className:e,children:"Manage clients"});let y=async()=>{if(x(""),(0,l.trackUpgradeCtaClick)("pricing_page","coach"),!d)return void c.push(`/signup?next=${encodeURIComponent("/pricing?plan=coach")}`);if(!d.email)return void x("Missing account email.");g(!0);try{let e=await fetch("/api/stripe/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:d.uid,email:d.email,plan:"coach",gaClientId:(0,l.getGaClientId)(),attribution:(0,u.buildCheckoutAttribution)((0,u.getAttribution)())})}),t=await e.json();t.url?((0,l.trackPurchaseInitiated)({plan:"coach"}),window.location.href=t.url):(x(t.error||"Failed to start checkout."),g(!1))}catch{x("Failed to start checkout. Please try again."),g(!1)}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:y,disabled:m,className:e,children:m?(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(i.Loader2,{size:16,className:"animate-spin"})," Processingâ¦"]}):"Get Career Coach"}),b&&(0,t.jsx)("p",{className:"mt-2 text-xs text-red-500 text-center",children:b})]})}e.s(["default",()=>c])},462606,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(531278),i=e.i(643531),o=e.i(791432),s=e.i(942047),l=e.i(558249),u=e.i(865012),c=e.i(652354),d=e.i(33281);let f=`Card required \xb7 $39/mo after ${c.TRIAL_DAYS} days \xb7 cancel any time`,h="/pricing?plan=pro-plus&trial=1";function p({plan:e,label:c,className:f,trial:p=!1,subLine:m,subLineClassName:g=""}){let b=(0,n.useRouter)(),{user:x,loading:y}=(0,o.useAuth)(),{plan:w,loading:j}
1=(0,s.useSubscription)(),[v,k]=(0,r.useState)(!1),[C,N]=(0,r.useState)(""),P="pro"===e&&"pro"===w||"pro-plus"===e&&"pro-plus"===w,S=!P&&("pro"!==e||"pro-plus"!==w),O=async()=>{N("");let t=p&&"pro-plus"===e;if((0,l.trackUpgradeCtaClick)("pricing_page",t?"pro-plus-trial":e),!y){if(!x){let r=encodeURIComponent(t?h:`/pricing?plan=${e}`);b.push(`/signup?next=${r}`);return}if(!x.email)return void N("Missing account email.");k(!0);try{let r=await fetch("/api/stripe/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:x.uid,email:x.email,plan:e,...t?{trial:!0}:{},gaClientId:(0,l.getGaClientId)(),attribution:(0,u.buildCheckoutAttribution)((0,u.getAttribution)()),returnTo:x?"/dashboard?upgraded=1":(0,d.currentReturnTo)()})}),n=await r.json();n.url?((0,l.trackPurchaseInitiated)({plan:e,trial:!!n.trialApplied}),window.location.href=n.url):(N(n.error||"Failed to start checkout."),k(!1))}catch{N("Failed to start checkout. Please try again."),k(!1)}}};return y||j&&x?(0,t.jsx)("button",{disabled:!0,className:f,"aria-busy":"true",children:(0,t.jsx)(a.Loader2,{size:16,className:"animate-spin inline"})}):P?(0,t.jsx)("button",{disabled:!0,className:`${f} opacity-70 cursor-default`,children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(i.Check,{size:16})," Current Plan"]})}):S?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{onClick:O,disabled:v,className:f,"data-testid":p?"pricing-cta-trial":`pricing-cta-${e}`,children:v?(0,t.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(a.Loader2,{size:16,className:"animate-spin"})," Processingâ¦"]}):c}),m&&(0,t.jsx)("p",{className:`mt-2 text-xs text-center ${g||"text-slate-500"}`,children:m}),C&&(0,t.jsx)("p",{className:"mt-2 text-xs text-red-500 text-center",children:C})]}):(0,t.jsx)("button",{onClick:async()=>{k(!0);try{let e=await fetch("/api/stripe/portal",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:x?.uid,email:x?.email})}),t=await e.json();t.url?window.location.href=t.url:k(!1)}catch{k(!1)}},className:f,children:v?(0,t.jsx)(a.Loader2,{size:16,className:"animate-spin inline"}):"Manage in Billing Portal"})}e.s(["PRICING_TRIAL_NEXT",0,h,"PRICING_TRIAL_SUBLINE",0,f,"default",()=>p])},78873,e=>{"use strict";var t=e.i(271645),r=e.i(618566),n=e.i(791432),a=e.i(942047),i=e.i(558249),o=e.i(865012);function s(){let e=(0,r.useRouter)(),s=(0,r.useSearchParams)(),{user:l,loading:u}=(0,n.useAuth)(),{plan:c,loading:d}=(0,a.useSubscription)(),f=(0,t.useRef)(!1);return(0,t.useEffect)(()=>{if(f.current||u||d)return;let t=s.get("plan");if("pro"!==t&&"pro-plus"!==t&&"coach"!==t||!l?.email||c===t||"pro-plus"===c&&"pro"===t)return;let r="1"===s.get("trial")&&"pro-plus"===t;f.current=!0,(async()=>{try{let n=await fetch("/api/stripe/checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({uid:l.uid,email:l.email,plan:t,...r?{trial:!0}:{},gaClientId:(0,i.getGaClientId)(),attribution:(0,o.buildCheckoutAttribution)((0,o.getAttribution)())})}),a=await n.json();a.url?((0,i.trackPurchaseInitiated)({plan:t,trial:!!a.trialApplied}),window.location.href=a.url):e.replace("/pricing")}catch{e.replace("/pricing")}})()},[u,d,l,c,s,e]),null}e.s(["default",()=>s])}]);
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.