1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="24584a35-1866-4720-b707-e8e303fbb59f",e._sentryDebugIdIdentifier="sentry-dbid-24584a35-1866-4720-b707-e8e303fbb59f")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7439,9820],{6140:(e,t,n)=>{n.d(t,{A:()=>d,R:()=>u});var r=n(12115),o=n(39838),a=n(11060),i=n(89642);async function l(){let{getUser:e}=await Promise.all([n.e(159),n.e(9135),n.e(2619),n.e(4881),n.e(6246),n.e(2957),n.e(9758)]).then(n.bind(n,82957));return e}function u(){let{user:e}=(0,o.A)(),[t,u]=(0,r.useState)(null),[d,s]=(0,r.useState)(!0),[c,h]=(0,r.useState)(null),f=(0,r.useRef)(null),y=(0,r.useRef)(0),m=async()=>{var t;let r=null!=(t=null==e?void 0:e.uid)?t:null;f.current=r;let o=++y.current;if(!r){u(null),h(null),s(!1);return}s(!0);try{let e=await l(),t=await e(r);if(y.current!==o)return;u(t),h(null);let{syncAmplitudeSubscriptionProperties:a}=await n.e(3694).then(n.bind(n,13694));a(t)}catch(e){if(y.current!==o)return;(0,a.l)(Error("Subscription state unknown: user document read failed"),{action:"use_subscription_fetch",data:{userId:r,cause:String(e)}}),h(e instanceof Error?e:Error(String(e)))}finally{y.current===o&&s(!1)}};(0,r.useEffect)(()=>{var t;f.current!==(null!=(t=null==e?void 0:e.uid)?t:null)&&(u(null),h(null)),m()},[null==e?void 0:e.uid]);let g=(0,i.cr)(t),p=(0,i.e4)(t),k=(0,i.V_)(t);return{loading:d,userData:t,error:c,tier:g,limits:p,isPremium:k,isExpired:(0,i.ZQ)(t),isLite:(0,i.yV)(t),isAdmin:(null==t?void 0:t.isAdmin)===!0,hasActiveSubscription:(0,i.gD)(t),canCreatePortfolio:e=>(0,i.BX)(t,e),canConnectAlpaca:()=>(0,i.zM)(t),canImportAdditional:()=>(0,i.$1)(t),canUseDailyReviews:()=>(0,i._P)(t),getRemainingPortfolios:e=>(0,i.U5)(t,e),refetch:m}}let d=u},23681:(e,t,n)=>{n.d(t,{Ae:()=>o,LN:()=>s,P_:()=>m,Ss:()=>d,US:()=>i,XY:()=>f,Xj:()=>a,Yu:()=>r.Yu,bT:()=>y,cd:()=>l,eS:()=>p,i$:()=>v,s0:()=>k,t3:()=>u,ue:()=>g,uu:()=>h,ym:()=>w});var r=n(38863);let o="/dashboard",a="/pricing",i="/settings/billing",l="/portfolio/create",u="/portfolio/import",d="/portfolio/link",s="".concat(i,"?success=true"),c="".concat(i,"?canceled=true");function h(e){return e?o:"/"}function f(e){return{successUrl:"".concat(e).concat(s),cancelUrl:"".concat(e).concat(c)}}function y(e){return e.success?s:e.canceled?c:i}function m(e){return e.authReady&&e.signedIn?e.hasActiveSubscription?"billing":"checkout":"signup"}function g(e,t){return"billing"===t?i:"/signup?plan=".concat(e)}function p(e,t){return e?t:a}function k(e){return e?l:a}function w(e){return"/portfolio/".concat(e,"?tab=inbox&open=latest")}let v=a},26179:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]])},31885:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]])},33210:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},38194:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},38863:(e,t,n)=>{let r;n.d(t,{Ax:()=>k,BT:()=>a,Cr:()=>o,FO:()=>y,Mc:()=>d,Yu:()=>c,m4:()=>h,o3:()=>p,r:()=>f,xt:()=>g,xz:()=>m});let o="session-expired",a="signed-out",i="pg.loginReason",l=/^\/[^/\\]/,u=/[\t\r\n]/;function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/dashboard";return"/"===e?e:!e||u.test(e)||!l.test(e)?t:e}function s(e){return e===o||e===a}function c(e,t){let n="/login?next=".concat(encodeURIComponent(e));return(null==t?void 0:t.reason)&&(n+="&reason=".concat(encodeURIComponent(t.reason))),n}function h(e){return c(e,{reason:o})}function f(e,t){let n=new URLSearchParams;e&&"/dashboard"!==e&&n.set("next",e),(null==t?void 0:t.reason)&&s(t.reason)&&n.set("reason",t.reason);let r=n.toString();return r?"/forgot-password?".concat(r):"/forgot-password"}function y(e,t){return e&&"/dashboard"!==e||t?c(e,t?{reason:t}:void 0):"/login"}function m(){r=void 0,"undefined"!=typeof sessionStorage&&sessionStorage.removeItem(i)}function g(e){r=void 0,"undefined"!=typeof sessionStorage&&sessionStorage.setItem(i,e)}function p(){if(void 0!==r)return r;if("undefined"==typeof sessionStorage)return r=null;let e=sessionStorage.getItem(i);return sessionStorage.removeItem(i),r=s(e)?e:null}function k(e,t){return t||(s(e)?e:null)}},41313:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]])},53422:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("rss",[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]])},59878:(e,t,n)=>{n.d(t,{A:()=>r,L:()=>o});let r={expired:{maxPortfolios:0,portfolioReviewFrequency:"monthly",maxTradeSuggestionsPerMonth:0,alpacaIntegration:!1,canImportAdditional:!1,prioritySupport:!1,monthlyReviewTokens:0,monthlySuggestionTokens:0,lowReviewThreshold:0,lowSuggestionThreshold:0},lite:{maxPortfolios:3,portfolioReviewFrequency:"weekly",maxTradeSuggestionsPerMonth:10,alpacaIntegration:!1,canImportAdditional:!0,prioritySupport:!1,monthlyReviewTokens:10,monthlySuggestionTokens:10,lowReviewThreshold:5,lowSuggestionThreshold:5},premium:{maxPortfolios:1/0,portfolioReviewFrequency:"daily",maxTradeSuggestionsPerMonth:1/0,alpacaIntegration:!0,canImportAdditional:!0,prioritySupport:!0,monthlyReviewTokens:1/0,monthlySuggestionTokens:1/0,lowReviewThreshold:0,lowSuggestionThreshold:0}},o="expired"}
1,66614:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]])},68657:(e,t,n)=>{n.d(t,{CC:()=>u,Ku:()=>w,_n:()=>k,bC:()=>d,f1:()=>y,iR:()=>g});var r=n(11060),o=n(85978),a=n(40430),i=n(97273);function l(e){return!(0,a.Vy)(e)&&!(0,a.pS)(e)}let u="3M";async function d(){try{let e=await (0,a.Tc)("".concat(o.l8,"?function=get_leaderboards"),{method:"GET",headers:(0,o.rZ)()}),t=await e.json();if(!e.ok)throw Error("Failed to fetch leaderboards");return t.leaderboards}catch(e){throw console.error("Error fetching leaderboards:",e),l(e)&&(0,r.l)(e,{action:"get_leaderboards"}),e}}class s extends Error{constructor(e){super("Portfolio ".concat(e," is not public")),this.name="PortfolioNotPublicError"}}async function c(e){try{let t=await (0,a.Tc)("".concat(o.l8,"?function=refresh_portfolio_value"),{method:"POST",headers:(0,o.rZ)(),body:JSON.stringify({portfolio_id:e})}),n=await t.json();if(403===t.status)throw new s(e);if(!t.ok)throw Error("Failed to refresh portfolio ".concat(e));return n}catch(t){throw t instanceof s||(l(t)?(console.error("Error refreshing portfolio value:",t),(0,r.l)(t,{action:"refresh_portfolio_value",data:{portfolioId:e}})):console.warn("Transient network error refreshing portfolio value (will retry on interval):",e)),t}}let h=new Set,f=new Map,y=3e5;function m(e,t){let n=Date.parse(t);Number.isNaN(n)||f.set(e,n)}function g(e){for(let t of e){let e=t.latestValueTimestamp;if("string"!=typeof e||0===e.length)continue;let n=Date.parse(e);if(Number.isNaN(n))continue;let r=f.get(t.id);null!=r&&r>n||m(t.id,e)}}async function p(e,t,n){let r=[...e],o=Array.from({length:Math.min(t,r.length)},async()=>{for(;r.length>0;){let e=r.shift();if(void 0===e)return;await n(e)}});await Promise.all(o)}async function k(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new Map;if("undefined"!=typeof document&&"hidden"===document.visibilityState)return r;let o=null!=(t=n.now)?t:new Date,a=e.filter(e=>(function(e,t){if(h.has(e))return!1;let n=f.get(e);return null==n||(0,i.kg)(new Date(n),t)})(e,o));return await p(a,4,async e=>{try{let t=await c(e);m(e,t.latestValueTimestamp),r.set(e,t)}catch(t){if(t instanceof s)return void h.add(e);console.error("Failed to refresh portfolio ".concat(e,":"),t)}}),r}async function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{let r=new URLSearchParams({leaderboard_id:e,range:t,include_retired:String(n)}),i=await (0,a.Tc)("".concat(o.l8,"?function=get_leaderboard_performance&").concat(r),{method:"GET",headers:(0,o.rZ)()}),l=await i.json();if(!i.ok)throw Error("Failed to fetch leaderboard performance ".concat(e));return l}catch(t){throw console.error("Error fetching leaderboard performance:",t),l(t)&&(0,r.l)(t,{action:"get_leaderboard_performance",data:{leaderboardId:e}}),t}}},79372:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]])},88632:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("paw-print",[["circle",{cx:"11",cy:"4",r:"2",key:"vol9p0"}],["circle",{cx:"18",cy:"8",r:"2",key:"17gozi"}],["circle",{cx:"20",cy:"16",r:"2",key:"1v9bxh"}],["path",{d:"M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z",key:"1ydw1z"}]])},89123:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])},89642:(e,t,n)=>{n.d(t,{$1:()=>s,BX:()=>u,U5:()=>g,V_:()=>h,ZQ:()=>f,_P:()=>c,cr:()=>a,dM:()=>k,e4:()=>l,gD:()=>m,yV:()=>y,zM:()=>d});var r=n(59878);let o=["active","trialing","past_due","canceled"];function a(e){var t,n;if(!e)return r.L;if(e.isAdmin)return"premium";let a=e.subscription;if(!a||!o.includes(a.status))return r.L;if("canceled"===a.status&&a.currentPeriodEnd){let e=p(a.currentPeriodEnd);if(e&&new Date>e)return r.L}return t=a.tier,null!=(n=i.find(e=>e===t))?n:r.L}let i=Object.keys(r.A);function l(e){let t=a(e);return r.A[t]}function u(e,t){return t<l(e).maxPortfolios}function d(e){return l(e).alpacaIntegration}function s(e){return l(e).canImportAdditional}function c(e){return"daily"===l(e).portfolioReviewFrequency}function h(e){return"premium"===a(e)}function f(e){return"expired"===a(e)}function y(e){return"lite"===a(e)}function m(e){return"expired"!==a(e)}function g(e,t){let n=l(e);return n.maxPortfolios===1/0?1/0:Math.max(0,n.maxPortfolios-t)}function p(e){if(null==e)return null;if(e instanceof Date)return e;if("object"==typeof e&&"toDate"in e&&"function"==typeof e.toDate)return e.toDate();if("string"==typeof e){let t=new Date(e);return isNaN(t.getTime())?null:t}return null}function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=l(e);if(h(e))return{reviewTokens:n.monthlyReviewTokens===1/0?999999:n.monthlyReviewTokens,suggestionTokens:n.monthlySuggestionTokens===1/0?999999:n.monthlySuggestionTokens,tokensLastRefilled:t,needsRefill:!1};let r=null==e?void 0:e.usageTokens,o=r?p(r.tokensLastRefilled):null,a=null==r?void 0:r.reviewTokens,i=null==r?void 0:r.suggestionTokens,u=!1;if(null===o)u=!0;else o.getFullYear()===t.getFullYear()&&o.getMonth()===t.getMonth()?o>t&&(u=!0):u=!0;return u?{reviewTokens:a=n.monthlyReviewTokens,suggestionTokens:i=n.monthlySuggestionTokens,tokensLastRefilled:t,needsRefill:!0}:{reviewTokens:null!=a?a:n.monthlyReviewTokens,suggestionTokens:null!=i?i:n.monthlySuggestionTokens,tokensLastRefilled:o,needsRefill:!1}}}
1,94928:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("trophy",[["path",{d:"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978",key:"1n3hpd"}],["path",{d:"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978",key:"rfe1zi"}],["path",{d:"M18 9h1.5a1 1 0 0 0 0-5H18",key:"7xy6bh"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z",key:"1mhfuq"}],["path",{d:"M6 9H4.5a1 1 0 0 1 0-5H6",key:"tex48p"}]])},96035:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},97273:(e,t,n)=>{n.d(t,{yl:()=>h,kg:()=>f});let r=JSON.parse('[{"date":"2025-01-01","name":"New Year\'s Day"},{"date":"2025-01-09","name":"National Day of Mourning (President Carter)"},{"date":"2025-01-20","name":"Martin Luther King Jr. Day"},{"date":"2025-02-17","name":"Presidents\' Day"},{"date":"2025-04-18","name":"Good Friday"},{"date":"2025-05-26","name":"Memorial Day"},{"date":"2025-06-19","name":"Juneteenth"},{"date":"2025-07-04","name":"Independence Day"},{"date":"2025-09-01","name":"Labor Day"},{"date":"2025-11-27","name":"Thanksgiving Day"},{"date":"2025-12-25","name":"Christmas Day"},{"date":"2026-01-01","name":"New Year\'s Day"},{"date":"2026-01-19","name":"Martin Luther King Jr. Day"},{"date":"2026-02-16","name":"Presidents\' Day"},{"date":"2026-04-03","name":"Good Friday"},{"date":"2026-05-25","name":"Memorial Day"},{"date":"2026-06-19","name":"Juneteenth"},{"date":"2026-07-03","name":"Independence Day (Observed)"},{"date":"2026-09-07","name":"Labor Day"},{"date":"2026-11-26","name":"Thanksgiving Day"},{"date":"2026-12-25","name":"Christmas Day"}
1]'),o="America/New_York",a=new Set(r.map(e=>e.date)),i=null,l=null;function u(e){null!=i||(i=new Intl.DateTimeFormat("en-US",{timeZone:o,hour12:!1,weekday:"short",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}));let t=i.formatToParts(e),n=e=>{var n,r;return null!=(r=null==(n=t.find(t=>t.type===e))?void 0:n.value)?r:""},r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].indexOf(n("weekday")),a=Number(n("hour"))%24,l=Number(n("minute")),u=Number(n("second")),d=60*a+l;return{weekday:r,minutes:d,second:u,msSinceMidnight:60*d*1e3+1e3*u,isoDay:"".concat(n("year"),"-").concat(n("month"),"-").concat(n("day"))}}function d(e,t){if(!e)return null;let n=e.getTime();return Number.isNaN(n)||n-t.getTime()>12e4?null:n}function s(e){let[t,n,r]=e.split("-").map(Number),o=new Date(Date.UTC(t,n-1,r));o.setUTCDate(o.getUTCDate()-1);let a=e=>String(e).padStart(2,"0");return"".concat(o.getUTCFullYear(),"-").concat(a(o.getUTCMonth()+1),"-").concat(a(o.getUTCDate()))}function c(e){let[t,n,r]=e.split("-").map(Number),o=new Date(Date.UTC(t,n-1,r)).getUTCDay();return 0!==o&&6!==o&&!a.has(e)}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:36e5,r=d(e,t);if(null===r)return!0;let o=u(t);return!!(o.weekday>=1&&o.weekday<=5&&o.minutes>=570&&o.minutes<=960)&&(t.getTime()-r>=n||r<t.getTime()-o.msSinceMidnight+342e5)}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=d(e,t);if(null===n)return!0;let r=u(t);return function(e){if(e.weekday<1||e.weekday>5||a.has(e.isoDay))return!1;let t=60*e.minutes+e.second;return t>=34200&&t<=57600}(r)?t.getTime()-n>=9e5||n<t.getTime()-r.msSinceMidnight+342e5:n<function(e){let t=e.isoDay,n=60*e.minutes+e.second;c(t)&&n>=57600||(t=s(t));for(let e=0;e<14&&!c(t);e+=1)t=s(t);if(!c(t))return 1/0;let[r,a,i]=t.split("-").map(Number),u=Date.UTC(r,a-1,i,16,0,0);null!=l||(l=new Intl.DateTimeFormat("en-US",{timeZone:o,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}));let d=l.formatToParts(new Date(u)),h=e=>{var t,n;return null!=(n=null==(t=d.find(t=>t.type===e))?void 0:t.value)?n:""};return u-(Date.UTC(Number(h("year")),Number(h("month"))-1,Number(h("day")),Number(h("hour"))%24,Number(h("minute")),Number(h("second")))-u)}(r)-9e5}},97810:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])},98401:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(78340).A)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]])}}]);
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.