PageSourceSearch

https://cdn.sheetsfinance.com/public-site/_nuxt/BsASuSZE.js

js sheetsfinance.com collected 2026-09-24 14:02:28 UTC 11,117 bytes, 1 lines download raw bytes

1import{_ as $}from"./BazINwiL.js";import{E as I}from"./B3sxJKiA.js";import{E as N}from"./CAYZMAcB.js";import{_ as P,l as T,o,G as l,M as r,c as u,O as B,J as v,K as m,V as d,m as x,U as w,n as p,a3 as L,$ as k,Y as j,Q as S,a0 as C,P as D,a4 as O}from"./1_UnC8sM.js";/* empty css        */import"./l0sNRNKZ.js";import{r as U}from"./BuYjIP5U.js";import{r as Y}from"./CjP7gnAB.js";import{E as F}from"./DncRq4FT.js";import{v as V}from"./SKTN75BZ.js";import{E as y}from"./wK0-O32G.js";import{c as q}from"./ztpOsgVE.js";import{r as G}from"./BvhgDQtg.js";import{r as E}from"./ilbXuEuB.js";import{r as A}from"./B1ksYQxX.js";import"./C2n3FOin.js";import"./BUADUvnR.js";import"./BbSfVKWN.js";import"./DlWEZPkf.js";const H={name:"TrialSelectionCard",components:{CheckIcon:U,QuestionMarkCircleIcon:Y},props:{trial:{type:Object,required:!0},selected:{type:Boolean,default:!1},prioritised:{type:Boolean,default:!1}},emits:["toggle"],computed:{cardClass(){const e="w-full rounded-2xl p-6 text-left ring-1 transition focus:outline-none focus-visible:ring-2 focus-visible:ring-sf-green";if(!this.trial.eligible)return`${e} cursor-not-allowed bg-gray-50 opacity-60 ring-gray-200`;if(this.selected){const t=this.prioritised?"shadow-xl shadow-sf-green/10":"shadow-lg";return`${e} bg-sf-green/5 ${t} ring-2 ring-sf-green`}return`${e} bg-white shadow-sm ring-gray-200 hover:bg-gray-50 hover:shadow-md`},checkboxClass(){const e="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border-2";return this.trial.eligible?this.selected?`${e} border-sf-green bg-sf-green text-white`:`${e} border-gray-300 bg-white text-white`:`${e} border-gray-200 bg-gray-100 text-gray-300`},trialLimitTooltip(){return`Trials include ${this.trial.limit}, which covers most evaluation use cases. Paid plans start at 10,000/day.`}}},Q=["disabled","aria-pressed"],R={class:"flex items-start justify-between gap-4"},z={class:"flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-gray-50 ring-1 ring-gray-900/5"},W={class:"mt-6 text-left"},J={class:"flex flex-wrap items-center gap-2"},K={class:"text-lg font-semibold text-gray-900"},X={key:0,class:"rounded-full bg-sf-green/10 px-2.5 py-1 text-[11px] font-bold uppercase tracking-wide text-sf-green"},Z={class:"mt-3 text-sm leading-6 text-gray-500"},ee={class:"mt-4 flex flex-wrap items-center gap-2"},te={class:"inline-flex items-center gap-1 rounded-full bg-sf-green/10 px-3 py-1 text-xs font-semibold text-sf-green"},se=r("span",{class:"rounded-full bg-gray-100 px-3 py-1 text-xs font-semibold text-gray-600"}," No payment details ",-1),re={key:0,class:"mt-4 text-sm font-semibold text-gray-400"};function ie(e,t,s,c,a,i){const f=T("CheckIcon"),g=I,b=T("QuestionMarkCircleIcon"),_=N;return o(),l("button",{type:"button",disabled:!s.trial.eligible,"aria-pressed":s.selected,class:v(i.cardClass),onClick:t[0]||(t[0]=n=>e.$emit("toggle",s.trial.group))},[r("div",R,[r("div",z,[(o(),u(B(s.trial.icon),{class:"h-7 w-7 text-sf-dark"}))]),r("div",{class:v(i.checkboxClass)},[s.selected?(o(),u(f,{key:0,class:"h-6 w-6"})):m("",!0)],2)]),r("div",W,[r("div",J,[r("h2",K,d(s.trial.label),1),s.prioritised?(o(),l("span",X," From your sign-up ")):s.trial.isNew?(o(),u(g,{key:1,size:"small"},{default:x(()=>[w("NEW")]),_:1})):m("",!0)]),r("p",Z,d(s.trial.description),1),r("div",ee,[r("span",te,[w(" 15 days free "),p(_,{placement:"top",effect:"light",content:i.trialLimitTooltip},{default:x(()=>[p(b,{class:"h-3.5 w-3.5 cursor-help text-sf-green"})]),_:1},8,["content"])]),se]),s.trial.eligible?m("",!0):(o(),l("p",re," Trial already used "))])],10,Q)}const M=P(H,[["render",ie]]),h=["data","brokerage","options"],oe={components:{BuildingLibraryIcon:G,ChartBarSquareIcon:E,CircleStackIcon:A,TrialSelectionCard:M},mixins:[q],data(){return{loadingProfile:!0,submitting:!1,profile:null,selectedGroups:[],errorMessage:"",trials:[{group:"data",label:"Market Data",description:"Global stocks, ETFs, crypto, forex, and fundamentals. 80k+ symbols, 30+ years of history, and real-time updates.",limit:"1,000 calls/day",icon:A,eligible:!0},{group:"brokerage",label:"Brokerage",description:"Connect unlimited brokerage accounts. Sync holdings, balances, transactions, and orders from your brokers.",limit:"1,000 calls/day",icon:G,eligible:!0},{group:"options",label:"Options",description:"Full OPRA Chains, Greeks, volatility surfaces, IV analytics, and 20+ years of history. Serious options data for research and analysis.",limit:"500 calls/day",icon:E,eligible:!0,isNew:!0}]}},computed:{sourceTrial(){const e=this.$route.query.trial_group;return h.includes(e)&&this.trials.find(t=>t.group===e&&t.eligible)||null},otherTrials(){return this.sourceTrial?this.trials.filter(e=>e.group!==this.sourceTrial.group):[]},onboardingHeading(){return this.sourceTrial?`Your ${this.sourceTrial.label} trial is ready.`:"Choose your free trials"},onboardingDescription(){return this.sourceTrial?`Your ${this.sourceTrial.label} trial is preselected. Add another trial now, or continue with just this product.`:"Choose the products you want to try now. You can start your other trials at any time. No payment details required."},startButtonLabel(){if(this.selectedGroups.length===0)return"Select a trial to continue";if(this.selectedGroups.length===1){const e=this.trials.find(t=>t.group===this.selectedGroups[0]);return`Start ${(e==null?void 0:e.label)||"free"} trial`}return`Start ${this.selectedGroups.length} free trials`}},mounted(){this.getProfileData()},methods:{...L(O,["updateUser"]),hasAvailableTrial(e=this.profile){return h.some(t=>!(e!=null&&e[`has_trialed_${t}`]))},hasAnyTrialHistory(e=this.profile){return h.some(t=>e==null?void 0:e[`has_trialed_${t}`])},getProfileData(){this.loadingProfile=!0,k(`${this.$config.public.API_URL}
1/users/profile/`,{credentials:"include",headers:{Accept:"application/json"}}).then(e=>{if(this.profile=e,this.updateUser(e),!this.hasAvailableTrial()||this.hasAnyTrialHistory()){this.loadingProfile=!1,this.$router.replace({name:"account"});return}this.updateEligibleTrials(),this.setInitialSelection(),this.loadingProfile=!1}).catch(e=>{this.loadingProfile=!1,this.errorMessage=this.getErrorMessage(e)})},updateEligibleTrials(){this.trials=this.trials.map(e=>{var t;return{...e,eligible:!((t=this.profile)!=null&&t[`has_trialed_${e.group}`])}}),this.trials.some(e=>e.eligible)||(y({title:"Trials Unavailable",message:"You've already used your free trials. Please select a paid plan to continue.",type:"warning"}),this.$router.replace("/pricing"))},setInitialSelection(){const e=this.$route.query.trial_group,t=h.includes(e)?e:"data",s=this.trials.find(a=>a.group===t&&a.eligible);if(s){this.selectedGroups=[s.group];return}const c=this.trials.find(a=>a.eligible);this.selectedGroups=c?[c.group]:[]},toggleTrial(e){const t=this.trials.find(s=>s.group===e);t!=null&&t.eligible&&(this.selectedGroups.includes(e)?this.selectedGroups=this.selectedGroups.filter(s=>s!==e):this.selectedGroups=[...this.selectedGroups,e])},isSelected(e){return this.selectedGroups.includes(e)},getErrorMessage(e){const t=e==null?void 0:e.data;if(!t)return"Something went wrong. Please try again.";if(typeof t=="string")return t;if(t.message||t.msg||t.detail)return t.message||t.msg||t.detail;const s=Object.values(t).find(c=>c);return Array.isArray(s)?s[0]:typeof s=="string"?s:"Something went wrong. Please try again."},beginSelectedTrials(){const e=Array.from(new Set(this.selectedGroups)).filter(t=>{const s=this.trials.find(c=>c.group===t);return h.includes(t)&&(s==null?void 0:s.eligible)});if(e.length===0){this.errorMessage="Please select at least one trial to continue.";return}this.submitting=!0,this.errorMessage="",k(`${this.$config.public.API_URL}/subscription/begin-selected-trials/`,{method:"POST",credentials:"include",headers:{Accept:"application/json"},body:JSON.stringify({groups:e})}).then(t=>{const s=e.length>1?"Your free trials have begun 🎉":"Your free trial has begun 🎉";y({title:"Success",message:s,type:"success"}),t!=null&&t.profile&&(this.profile=t.profile,this.updateUser(t.profile)),this.goToAccount()}).catch(t=>{this.errorMessage=this.getErrorMessage(t),y({title:"Error",message:this.errorMessage,type:"error"})}).finally(()=>{this.submitting=!1})},goToAccount(){this.$router.push({name:"account"})}}},ae={class:"flex min-h-screen items-center bg-white pb-28 pt-8 sm:pt-10 md:pb-10"},le={class:"mx-auto w-full max-w-6xl px-6 lg:px-8"},ne={class:"flex justify-center"},ce={class:"mt-10"},de={class:"mx-auto max-w-3xl text-center"},ue=r("p",{class:"text-base font-semibold leading-7 text-sf-green"}," Welcome to SheetsFinance ",-1),ge={class:"mt-2 text-4xl font-bold tracking-tight text-gray-900 sm:text-5xl"},he={class:"mx-auto mt-6 max-w-2xl text-lg leading-8 text-gray-600"},me={key:0,class:"mx-auto mt-12 max-w-4xl"},pe={key:0,class:"mt-10"},fe=r("div",{class:"text-center sm:text-left"},[r("h2",{class:"text-2xl font-bold tracking-tight text-gray-900"}," Add another trial "),r("p",{class:"mt-2 text-sm leading-6 text-gray-500"}," Start other eligible products now, or save them for later. ")],-1),be={class:"mt-5 grid grid-cols-1 gap-5 md:grid-cols-2"},_e={key:1,class:"mt-12 grid grid-cols-1 gap-5 md:grid-cols-3 lg:gap-6"},ye={class:"fixed inset-x-0 bottom-0 z-20 flex flex-col items-center justify-center gap-4 border-t border-gray-200 bg-white/95 px-6 py-4 shadow-[0_-12px_30px_rgba(15,23,42,0.08)] backdrop-blur md:static md:mt-10 md:flex-row md:border-0 md:bg-transparent md:px-0 md:py-0 md:shadow-none"},xe=["disabled"],we={key:0},Te={key:1};function ve(e,t,s,c,a,i){const f=$,g=M,b=F,_=V;return o(),l("div",ae,[j((o(),l("div",le,[r("div",ne,[p(f,{src:"/img/brand3_long.svg",class:"h-10 w-auto",alt:"SheetsFinance"})]),r("div",ce,[r("div",de,[ue,r("h1",ge,d(i.onboardingHeading),1),r("p",he,d(i.onboardingDescription),1)]),i.sourceTrial?(o(),l("div",me,[p(g,{trial:i.sourceTrial,selected:i.isSelected(i.sourceTrial.group),prioritised:"",onToggle:i.toggleTrial},null,8,["trial","selected","onToggle"]),i.otherTrials.length?(o(),l("div",pe,[fe,r("div",be,[(o(!0),l(S,null,C(i.otherTrials,n=>(o(),u(g,{key:n.group,trial:n,selected:i.isSelected(n.group),onToggle:i.toggleTrial},null,8,["trial","selected","onToggle"]))),128))])])):m("",!0)])):(o(),l("div",_e,[(o(!0),l(S,null,C(a.trials,n=>(o(),u(g,{key:n.group,trial:n,selected:i.isSelected(n.group),onToggle:i.toggleTrial},null,8,["trial","selected","onToggle"]))),128))])),a.errorMessage?(o(),u(b,{key:2,type:"error",closable:!0,class:"mt-8",onClose:t[0]||(t[0]=n=>a.errorMessage="")},{default:x(()=>[w(d(a.errorMessage),1)]),_:1})):m("",!0),r("div",ye,[r("button",{type:"button",class:"w-full rounded-md bg-sf-green px-5 py-3.5 text-sm font-semibold text-white transition hover:bg-sf-green-hover disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto 
1sm:min-w-64",disabled:a.selectedGroups.length===0||a.submitting,onClick:t[1]||(t[1]=D((...n)=>i.beginSelectedTrials&&i.beginSelectedTrials(...n),["prevent"]))},[a.submitting?(o(),l("span",we,"Starting trials...")):(o(),l("span",Te,d(i.startButtonLabel)+" →",1))],8,xe)])])])),[[_,a.loadingProfile]])])}const Ve=P(oe,[["render",ve]]);export{Ve as default};

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.