PageSourceSearch

https://forefront.ai/_next/static/chunks/pages/app/onboarding/welcome-3c03a8521ee1b51d.js

js forefront.ai collected 2026-10-02 05:58:15 UTC 6,688 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2373],{55355:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/app/onboarding/welcome",function(){return a(24191)}])},5877:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});var s=a(85893);function l(e){let{step:t,totalSteps:a}=e;return(0,s.jsx)("div",{className:"absolute bottom-0 py-6 w-full flex items-center justify-center gap-3",style:{background:"var(--vertical-gradient)"},children:Array(a).fill(0).map((e,a)=>a<=t-1?(0,s.jsx)("div",{className:"w-2 h-2 rounded-full bg-th-brand-primary"}):(0,s.jsx)("div",{className:"w-2 h-2 rounded-full bg-th-background-hover"}))})}},91245:function(e,t,a){"use strict";a.d(t,{Z:function(){return r}});var s=a(85893),l=a(99369),i=a(70473);function r(){let{signOut:e}=(0,i.aC)();return(0,s.jsxs)("nav",{className:"fixed z-50 top-0 bg-th-background website-width bg-th-background border-b border-th-border-primary flex justify-between items-center py-3 px-4 md:px-6",children:[(0,s.jsx)(l.Z,{className:"h-8 w-8 text-th-primary-dark"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{className:"secondary-button bg-th-background-secondary",onClick:()=>window.open("mailto:[email protected]"),children:"Contact support"}),(0,s.jsx)("button",{className:"secondary-button bg-th-background-secondary",onClick:()=>e(),children:"Sign out"})]})]})}},24191:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return g}});var s=a(85893),l=a(67294),i=a(39332),r=a(13209),n=a(70473),o=a(60995),c=a(77159),d=a(5017),u=a(49057),m=a(91245),h=a(5877),x=a(4298),p=a.n(x),f=a(99893);function g(){let[e,t]=(0,l.useState)(""),[a,x]=(0,l.useState)(""),[g,b]=(0,l.useState)(!1),{setCurrentTeamId:v}=(0,r.A)(),{user:y}=(0,n.aF)(),j=(0,i.useRouter)(),w=(0,l.useRef)(null),[N,k]=(0,l.useState)(),{refetch:C}=o.S.teams.listTeams.useQuery(),A=o.S.teams.createTeam.useMutation(),{data:_,isLoading:S}=o.S.teams.checkTeamPrefix.useQuery({prefix:a});async function T(){var t;let s=await (null===(t=window)||void 0===t?void 0:t.turnstile).getResponse();try{b(!0),await A.mutateAsync({name:e,prefix:a,turnstile:s}).then(async e=>{let t=null==e?void 0:e.team;console.log(t),localStorage.setItem("default:app:".concat(null==y?void 0:y.id),null==t?void 0:t.id),v(null==t?void 0:t.id);try{if(N){let t=await new Promise((e,t)=>{let a=new FileReader;a.readAsDataURL(N),a.onload=()=>e(a.result),a.onerror=e=>t(e)}),a=t.split(";")[0].split(":")[1];if(!a||!a.includes("image"))throw Error("Invalid image");await Z.mutateAsync({name:null==N?void 0:N.name,teamId:null==e?void 0:e.team.id,base64Image:t})}}catch(e){console.error(e)}b(!1),await C(),j.push("/app/onboarding/plans")})}catch(e){f.ZP.capture("team_creation_failed",{}),console.error(e),b(!1)}}let Z=o.S.teams.updateAvatar.useMutation();async function P(e){try{let t=e.target.files[0];k(t)}catch(e){console.error(e)}}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p(),{src:"https://challenges.cloudflare.com/turnstile/v0/api.js",async:!0,defer:!0}),(0,s.jsxs)("main",{className:"flex flex-col items-center px-4 md:px-6 w-screen h-screen bg-th-background overflow-y-scroll",children:[(0,s.jsx)(m.Z,{}),(0,s.jsxs)("div",{className:"flex max-w-[640px] py-32 w-full flex-col items-stretch gap-6",children:[(0,s.jsx)("div",{onClick:()=>window.open("https://chat.forefront.ai"),className:"px-3 py-2 cursor-pointer hover:border-th-brand-primary bg-th-background-secondary border border-th-border-primary rounded",children:(0,s.jsxs)("p",{className:" text-base",children:["Looking for"," ",(0,s.jsx)("span",{className:"font-semibold text-th-brand-primary",children:"Forefront AI Chat"}),"? Click here"]})}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("h1",{className:"website-h2 text-left",children:"\uD83D\uDC4B Forefront Developer Platform"}),(0,s.jsx)("p",{className:"website-p1 text-left",children:"Fine-tune and inference open-source language models."})]}),(0,s.jsxs)("form",{onSubmit:()=>{fetch("/api/createTeamHP").then(e=>e.json())},className:"hidden",children:[(0,s.jsxs)("div",{className:"hidden",children:[(0,s.jsx)("label",{htmlFor:"hp",children:"Create a team HP"}),(0,s.jsx)("input",{id:"hp",name:"hp",type:"text"})]}),(0,s.jsx)("button",{type:"submit",children:"Submit"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"my-label",children:"Team logo"}),(0,s.jsxs)("div",{onClick:()=>{var e;return null===(e=w.current)||void 0===e?void 0:e.click()}
1,className:"group relative w-fit rounded-lg overflow-hidden",children:[(0,s.jsx)("input",{type:"file",accept:"image/*",ref:w,className:"hidden",onChange:P}),N?(0,s.jsx)("img",{className:"w-16 h-16 ",src:N?URL.createObjectURL(N):""}):(0,s.jsx)("div",{className:"w-16 h-16 bg-gradient-to-r from-indigo-500 to-indigo-700 rounded-lg flex"}),(0,s.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-black/[0.5] flex justify-center items-center opacity-0 group-hover:opacity-100 transition",children:(0,s.jsx)("p",{className:"text-xs font-medium antialiased text-white/[0.66] cursor-pointer hover:text-white",children:"Change"})})]}),(0,s.jsx)("p",{className:"text-sm antialiased text-th-primary-light",children:"Pick your team logo. Recommended size is 256x256px."})]}),(0,s.jsx)(c.Z,{label:"Team name",placeholder:"Acme",type:"text",value:e,onChange:e=>{t(e.target.value),x((0,d.Z)(e.target.value))}}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(c.Z,{label:"Team prefix",description:"This cannot be changed later. It will be used to prefix any public models or datasets you release.",placeholder:"acme",type:"text",value:a,onChange:e=>x(e.target.value),onBlur:e=>x((0,d.Z)(e.target.value))}),(null==_?void 0:_.isAvailable)||S?(null==_?void 0:_.isAvailable)&&""!==a&&!S?(0,s.jsx)("p",{className:"px-2 text-xs antialiased text-th-primary-light",children:"This prefix is available."}):(0,s.jsx)("p",{className:"px-2 text-xs antialiased text-th-primary-light opacity-0",children:"Checking availability..."}):(0,s.jsx)("p",{className:"px-2 text-xs antialiased text-th-primary-light",children:"This prefix is already taken. Please try another one."})]}),(0,s.jsx)("div",{className:"cf-turnstile","data-sitekey":"0x4AAAAAAAREvORfuVsfYJJ8","data-callback":"log"}),(0,s.jsx)(u.Z,{buttonText:"Continue",disabled:""===e||""==a||!/^[a-z0-9]+(-[a-z0-9]+)*$/.test(a)||!(null==_?void 0:_.isAvailable)||S,className:"w-fit",loading:g,onClick:T})]})]}),(0,s.jsx)(h.Z,{step:1,totalSteps:4})]})]})}},4298:function(e,t,a){e.exports=a(23773)}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=55355)}),_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.