PageSourceSearch

https://my.optscale.ai/assets/index-CUCNCDk2.js

js optscale.ai collected 2026-10-05 12:23:16 UTC 4,864 bytes, 1 lines download raw bytes

1import{j as t,l9 as F,M as _,hm as O,B as r,l7 as d,T as E,b as A,C as w,a8 as C,r as g,aI as Q,g as v,fr as P,H as z,fs as N,ft as U,l3 as S,nR as B,nS as $,nT as D,nU as G,av as H,v as R,q as W,N as Y,cO as V,p as q,o as J,aF as K,nV as X,S as Z,a as tt,L as at}from"./index-44unHauk.js";import{M as y}from"./MailTo-Dgud-MRC.js";import{I as et}from"./Invitations-G4jV_w79.js";import"./InvitationActionsContainer-Dja4k5mk.js";import"./SubTitle-Mgfq_mYh.js";import"./CloseOutlined-BHnOTQ24.js";import"./TypographyLoader-CIAvIO6e.js";const h=({messageId:a,messageValues:e,dataTestId:s})=>t.jsx(F,{dataTestId:s,align:"center",px:2,children:t.jsx(_,{id:a,values:e})}),b=()=>{const a=O();return t.jsxs(t.Fragment,{children:[t.jsxs(r,{children:[t.jsx(h,{dataTestId:"p_issue_occurred_during_initialization_process",messageId:"anIssueOccurredDuringTheInitializationProcess",messageValues:{email:t.jsx(y,{email:d,text:d}),br:t.jsx("br",{})}}),t.jsx(E,{align:"center",variant:"body2",px:2,children:t.jsx(_,{id:"pleaseSignInAgainAndIfTheProblemPersists",values:{email:t.jsx(y,{email:d,text:d})}})})]}),t.jsx(r,{height:60,display:"flex",alignItems:"center",gap:2,children:t.jsx(A,{size:"medium",messageId:"signOut",color:"primary",onClick:a})})]})},m=()=>t.jsxs(t.Fragment,{children:[t.jsx(h,{messageId:"initializingOptscaleAi",dataTestId:"p_initializing"}),t.jsx(r,{height:60,children:t.jsx(w,{"data-test-id":"svg_loading"})})]}),st=a=>{const{[N]:e=z,[U]:s,[P]:i=!1}=v(),c=s?s===a?e:z:e,o=new URL(c,window.location.origin);return i&&o.searchParams.set(P,i),`${o.pathname}${o.search}`},it=a=>{const[e]=a.split(/[?#]/);return e===S||e.startsWith(`${S}/`)},L=()=>{const{userEmail:a}=C(),e=st(a),s=it(e);return g.useEffect(()=>{s&&window.location.replace(e)},[s,e]),s?t.jsx(m,{}):t.jsxs(t.Fragment,{children:[t.jsx(m,{}),t.jsx(Q,{to:e})]})},nt=a=>`${a}'s Organization`,rt=({userEmail:a,refetchOrganizations:e})=>{const s=O(),[i,n]=g.useState("creating"),[c,o]=g.useState(!1),[u,{error:j}]=B(),[x]=$({fetchPolicy:"network-only"}),I=g.useCallback(async()=>{const{data:p}=await u({variables:{organizationName:nt(a)}}),l=p==null?void 0:p.createOrganization;if(!(l!=null&&l.id))throw new Error("Organization creation failed: no ID returned");if(n("waitingForProxy"),!await D(l.id,x)){o(!0);return}await e()},[a,u,x,e]);g.useEffect(()=>{(async()=>{try{await I()}catch(l){console.error("Error while setup organization: ",l)}})()},[I]);const f=j?{messageId:"organizationCreationFailed",dataTestId:"p_organization_creation_failed"}:c?{messageId:"aiGatewaySetupFailed",dataTestId:"p_ai_gateway_setup_failed"}:null;if(f)return t.jsxs(t.Fragment,{children:[t.jsxs(r,{children:[t.jsx(h,{dataTestId:f.dataTestId,messageId:f.messageId}),t.jsx(E,{align:"center",variant:"body2",px:2,children:t.jsx(_,{id:"pleaseSignInAgainAndIfTheProblemPersists",values:{email:t.jsx(y,{email:d,text:d,dataTestId:"p_organization_creation_failed_email"})}})})]}),t.jsx(r,{height:60,display:"flex",alignItems:"center",gap:2,children:t.jsx(A,{size:"medium",messageId:"signOut",color:"primary",onClick:s})})]});const k=i==="creating"?"creatingOrganization":"llmProxyStarting",M=i==="creating"?"p_creating_organization":"p_llm_proxy_starting";return t.jsxs(t.Fragment,{children:[t.jsx(h,{dataTestId:M,messageId:k}),t.jsx(r,{height:60,children:t.jsx(w,{"data-test-id":"svg_loading"})})]})},T=()=>{const{userEmail:a}=C(),{data:e,networkStatus:s,error:i,refetch:n}=G({fetchPolicy:"no-cache",notifyOnNetworkStatusChange:!0});return s===H.loading?t.jsx(m,{}):i?t.jsx(b,{}):R((e==null?void 0:e.organizations)??[])?t.jsx(rt,{userEmail:a,refetchOrganizations:n}):t.jsx(L,{})},ot=V()(a=>({dashboardButton:{[a.breakpoints.up("md")]:{position:"absolute",right:40,bottom:40},padding:a.spacing(J),"& > *:not(:last-child)":{marginRight:a.spacing(q)}}})),ct=({invitations:a,refetchInvitations:e,onProceed:s})=>{const{classes:i}=ot();return t.jsxs(t.Fragment,{children:[t.jsx(r,{pl:2,pr:2,children:t.jsx(et,{invitations:a,styleProps:{buttonsJustifyContent:"center"},onSuccessAccept:()=>{e()},onSuccessDecline:()=>{e()},isLoading:!1})}),t.jsx(r,{children:t.jsx(W,{dataTestId:"btn_proceed_to_optscale_ai",messageId:"proceedToOptscaleAi",size:"medium",color:"primary",variant:"contained",onClick:s,startIcon:t.jsx(Y,{}),customWrapperClass:i.dashboardButton})})]})},lt=()=>{const[a,e]=g.useState(!1),{[N]:s}=v(),i=!!(s!=null&&s.startsWith(K)),{data:n,loading:c,error:o,refetch:u}=X({fetchPolicy:"no-cache",skip:i}
1);if(i)return t.jsx(L,{});const j=c,x=o;return j?t.jsx(m,{}):x?t.jsx(b,{}):a?t.jsx(T,{}):R((n==null?void 0:n.invitations)??[])?t.jsx(T,{}):t.jsx(ct,{invitations:(n==null?void 0:n.invitations)??[],refetchInvitations:u,onProceed:()=>{e(!0)}})},dt=()=>t.jsxs(Z,{spacing:tt,alignItems:"center",children:[t.jsx(r,{children:t.jsx(at,{width:200,dataTestId:"img_logo"})}),t.jsx(lt,{})]}),ft=()=>t.jsx(dt,{});export{ft 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.