PageSourceSearch

https://www.getsyllavo.com/assets/ExtensionLogin-BzXhKI1N.js

js getsyllavo.com collected 2026-10-02 01:30:43 UTC 4,691 bytes, 1 lines download raw bytes

1import{r as m,j as e,d as p,I as b,B as h}from"./index-M0tRxxsp.js";import{c as v,d as w,i as N,e as f}from"./useAuth-B_ZULDZ9.js";import"./index.esm-CFqn1pp7.js";import{u as S,H as C}from"./useExtensionHandshake-D-xBDvQD.js";import"./attribution-CJ7HoWnx.js";function L(){const n=v({redirectTo:null}),s=w({redirectTo:null}),{phase:o,attempt:d,retry:c}=S(),[i,u]=m.useState(""),[r,x]=m.useState(""),[g,a]=m.useState(null);function y(t){t.preventDefault(),a(null),n.mutate({email:i,password:r},{onError:l=>a(f(l))})}function j(){a(null),s.mutate(void 0,{onError:t=>{const l=t==null?void 0:t.code;l==="auth/popup-closed-by-user"||l==="auth/cancelled-popup-request"||a(f(t))}})}return o!=="idle"?e.jsx(E,{phase:o,attempt:d,onRetry:c}):e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 py-8",children:e.jsxs("div",{className:"w-full max-w-md rounded-xl border border-border bg-card p-6 shadow-sm",children:[e.jsx("h1",{className:"text-center text-2xl font-semibold",children:"Syllavo"}),e.jsx("p",{className:"mt-2 text-center text-sm text-muted-foreground",children:"Sign in to connect this browser to the Syllavo extension."}),e.jsxs("form",{className:"mt-6 space-y-4",onSubmit:y,children:[e.jsxs("div",{children:[e.jsx(p,{htmlFor:"extension-email",children:"Email"}),e.jsx(b,{id:"extension-email",type:"email",autoComplete:"email",required:!0,value:i,onChange:t=>u(t.target.value)})]}),e.jsxs("div",{children:[e.jsx(p,{htmlFor:"extension-password",children:"Password"}),e.jsx(b,{id:"extension-password",type:"password",autoComplete:"current-password",required:!0,value:r,onChange:t=>x(t.target.value)})]}),g&&e.jsx("p",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:g}),e.jsx(h,{type:"submit",variant:"primary",className:"w-full",disabled:n.isPending,children:n.isPending?"Signing you in…":"Connect to Syllavo"})]}),N()&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"my-5 flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-border"}),e.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"or"}),e.jsx("div",{className:"h-px flex-1 bg-border"})]}),e.jsxs(h,{type:"button",variant:"secondary",className:"w-full gap-2",disabled:s.isPending,onClick:j,children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 18 18","aria-hidden":"true",children:[e.jsx("path",{fill:"#4285F4",d:"M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62z"}),e.jsx("path",{fill:"#34A853",d:"M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.7H.96v2.33A9 9 0 0 0 9 18z"}),e.jsx("path",{fill:"#FBBC05",d:"M3.97 10.72a5.4 5.4 0 0 1 0-3.44V4.95H.96a9 9 0 0 0 0 8.1l3.01-2.33z"}),e.jsx("path",{fill:"#EA4335",d:"M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.47.89 11.43 0 9 0A9 9 0 0 0 .96 4.95l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58z"})]}),s.isPending?"Signing you in…":"Continue with Google"]})]})]})})}function E({phase:n,attempt:s,onRetry:o}){const d={connecting:{icon:"⋯",tone:"bg-muted text-muted-foreground",title:"Connecting your extension…",body:`Handing your account to the Syllavo extension (attempt ${s} of ${C}).`},connected:{icon:"✓",tone:"bg-success/20 text-success",title:"Connected — you can close this tab.",body:"The Syllavo extension has your account. Open a Canvas tab and click the Syllavo icon to sync."},"no-extension":{icon:"!",tone:"bg-warning/20 text-warning-foreground",title:"We couldn't reach the Syllavo extension",body:"You are signed in, but nothing answered from the extension. Check that it is installed and enabled at chrome://extensions, then try again."},refused:{icon:"!",tone:"bg-destructive/20 text-destructive",title:"The extension declined the connection",body:"Your sign-in worked, but the extension rejected the handoff. Reload this page and try once more; if it keeps happening, reinstall the extension."}},{icon:c,tone:i,title:u,body:r}=d[n],x=n==="no-extension"||n==="refused";return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background px-4 py-8",children:e.jsxs("div",{className:"w-full max-w-md rounded-xl border border-border bg-card p-8 text-center shadow-sm",children:[e.jsx("div",{className:`mx-auto flex h-16 w-16 items-center justify-center rounded-full text-3xl ${i}`,children:c}),e.jsx("h1",{className:"mt-4 text-2xl font-semibold",children:u}),e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:r}),x&&e.jsx(h,{type:"button",variant:"primary",className:"mt-6 w-full",onClick:o,children:"Try connecting again"})]})})}export{L 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.