PageSourceSearch

https://www.teleserv.ai/assets/welcome-MPucjLzd.js

js teleserv.ai collected 2026-10-09 22:57:54 UTC 37,808 bytes, 64 lines download raw bytes

1import{b8 as ae,aF as le,_ as Si,J as Ni,S as Ti,r as l,ai as Ci,b9 as Pe,ba as Ee,aD as Re,j as e,c as zi,bb as Ii,bc as Pi,ab as Ei,bd as C,be as Ae,bf as Ri,bg as $e,bh as Ai,bi as $i,bj as Wi,bk as Di,bl as Mi,bm as Oi}from"./index-CyIDn5oY.js";import{S as Fi}from"./StepRail-BVLvo5BT.js";import{T as We}from"./Toggle-C8FngQhV.js";import{M as De,o as _i,a as Li,m as Vi}from"./alertTriggers-DCfRuJve.js";import{D as re,P as M}from"./voices-D_CNCoPH.js";import{u as Yi,s as Bi}from"./useOfferedVoices-Xw_it_ao.js";import{p as Gi,t as Hi,a as Ui}from"./timezones-BzENA8rn.js";const ce="welcome.resume",d=o=>`color-mix(in srgb, #201e1d ${o}%, transparent)`,Ki="var(--color-success, #1f8a5b)",z=[{id:"vera",name:"Vera",accent:"British · warm",photo:"/agents/vera.jpg",blurb:"Calm and reassuring. Leads with what needs you, holds the rest.",voiceId:M.vera},{id:"james",name:"James",accent:"British · measured",photo:"/agents/james.jpg",blurb:"Understated and precise. Gives you the facts without the flourish.",voiceId:M.james},{id:"sofia",name:"Sofia",accent:"American · warm",photo:"/agents/sofia.jpg",blurb:"Friendly and upbeat. Celebrates the wins, gentle on the misses.",voiceId:M.sofia},{id:"marcus",name:"Marcus",accent:"American · confident",photo:"/agents/marcus.jpg",blurb:"Direct and decisive. Straight to the number that matters.",voiceId:M.marcus},{id:"amara",name:"Amara",accent:"Neutral · calm",photo:"/agents/amara.jpg",blurb:"Even and unhurried. A steady read, morning after morning.",voiceId:M.amara}],I={agent:"briefingAgent",voice:"customVoiceId",active:"briefingVoiceId",name:"customVoiceName",photo:"customPhoto"},P=[{key:"profile",label:"Your profile",icon:"ph-user-circle",title:"Set up your profile",desc:"Your name, title, and how to reach you"},{key:"persona",label:"Digital employee",icon:"ph-user-sound",title:"Choose your digital employee",desc:"Who greets you and reads your briefing each morning"},{key:"mailbox",label:"Your mailbox",icon:"ph-envelope-simple",title:"Connect your mailbox",desc:"Follow-ups you approve go out from your own address"},{key:"notifications",label:"Your notifications",icon:"ph-bell-ringing",title:"Set your notifications",desc:"Briefing time, and which flagged calls reach you"}],Me=[{key:"any_high",label:"Any high / critical flag",icon:"ph-siren"},{key:"very_negative",label:"Very negative call",icon:"ph-smiley-sad"},{key:"any_flag",label:"Any flag at all",icon:"ph-flag-banner"},{key:"missed",label:"Missed call, never reached",icon:"ph-phone-x"}],qi=[{key:"customer",label:"Customers",icon:"ph-user",types:["customer"]},{key:"affiliate",label:"Affiliates",icon:"ph-handshake",types:["affiliate"]},{key:"internal",label:"Internal",icon:"ph-steering-wheel",types:["internal"]},{key:"spam_other",label:"Spam / Other",icon:"ph-dots-three",types:["spam","other"]}],Ji=o=>o.some(a=>a==="any_high"||a==="very_negative")?"Urgent":o.length?"High":"Medium",Zi=(o,a)=>o.trim().split(/\s+/)[0]||a.split("@")[0]||"there",E=o=>{const[a,h]=o.split(":").map(Number);return Number.isNaN(a)?o:`${a%12||12}:${String(Number.isNaN(h)?0:h).padStart(2,"0")} ${a>=12?"PM":"AM"}`},G=o=>o.trim().toLowerCase(),Oe=/^([01]\d|2[0-3]):[0-5]\d$/,Xi=o=>[...new Set(o)],Qi=`
2.wl-root{display:flex;min-height:100vh;background:var(--color-canvas,#f3f2f2);color:#201e1d;font-size:14px;line-height:1.5}
3.wl-root.mobile{flex-direction:column}
4.wl-main{flex:1;min-width:0;display:flex;flex-direction:column}
5.wl-col{width:100%;max-width:720px;margin:0 auto;padding:64px 48px 40px;box-sizing:border-box;flex:1}
6.wl-col.mobile{padding:24px 16px 32px}
7.wl-eyebrow{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#7f93a3;font-weight:600}
8.wl-h1{font-family:'Source Serif 4',Georgia,serif;font-weight:600;letter-spacing:-.02em;font-size:30px;margin:8px 0 0;line-height:1.15}
9.wl-h1.big{font-size:44px}
10.wl-lede{font-size:15px;color:rgba(32,30,29,.66);line-height:1.6;margin:12px 0 0;max-width:60ch}
11.wl-card{background:var(--color-card,#fbfbfb);border:1px solid rgba(32,30,29,.14);border-radius:14px;padding:22px 24px}
12.wl-card.tight{padding:18px 20px}
13.wl-lbl{display:block;font-size:12.5px;font-weight:600;color:#4e6579;margin-bottom:6px}
14.wl-lbl em{font-style:italic;font-weight:400;color:#7f93a3}
15.cd-in{width:100%;box-sizing:border-box;border:1px solid var(--color-divider);background:var(--color-bg);border-radius:9px;padding:10px 12px;min-height:40px;font-size:13.5px;color:var(--color-text);outline:none;font-family:inherit}
16.cd-in:focus{border-color:var(--color-accent);box-shadow:0 0 0 3px color-mix(in srgb,#0088b0 15%,transparent)}
17.cd-in::placeholder{color:#7f93a3}
18.wl-ro{display:flex;align-items:center;box-sizing:border-box;border:1px solid transparent;background:#eef3f7;border-radius:9px;padding:0 12px;min-height:40px;font-size:13.5px;color:rgba(32,30,29,.72);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
19.wl-note{font-size:12.5px;color:rgba(32,30,29,.55);line-height:1.6}
20.wl-chip{display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(32,30,29,.14);background:var(--color-card,#fbfbfb);border-radius:999px;padding:8px 13px;min-height:40px;box-sizing:border-box;font:inherit;font-size:12.5px;font-weight:600;color:rgba(32,30,29,.66);
20cursor:pointer}
21.wl-chip:hover{border-color:rgba(32,30,29,.3)}
22.wl-chip.sel{background:var(--color-ink-chip,#2d2b2b);color:#fff;border-color:var(--color-ink-chip,#2d2b2b)}
23.wl-chip.dashed{border-style:dashed;color:#7f93a3;cursor:default}
24.wl-chip.dashed:hover{border-color:rgba(32,30,29,.14)}
25.wl-grp{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#6f8494;font-weight:600}
26.wl-prev{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(32,30,29,.14);background:var(--color-card,#fbfbfb);cursor:pointer;font:inherit;font-size:12.5px;font-weight:600;color:#004961;padding:6px 12px;min-height:34px;border-radius:999px}
27.wl-prev.on{border-color:#0088b0;background:rgba(0,136,176,.1)}
28.wl-prev:disabled{cursor:default;opacity:.7}
29.wl-pcard{background:var(--color-card,#fbfbfb);border:1.5px solid rgba(32,30,29,.14);border-radius:16px;padding:18px;cursor:pointer;position:relative;display:flex;flex-direction:column;gap:12px;text-align:left;font:inherit;color:inherit;transition:border-color .12s,box-shadow .12s}
30.wl-pcard:hover{border-color:rgba(0,136,176,.45)}
31.wl-pcard.on{border-color:#0088b0;background:#f3f9fb;box-shadow:0 0 0 3px rgba(0,136,176,.12)}
32.wl-badge{position:absolute;top:12px;right:12px;width:22px;height:22px;border-radius:50%;background:#0088b0;color:#fff;display:grid;place-items:center;font-size:12px}
33.wl-foot{position:sticky;bottom:0;background:rgba(243,242,242,.92);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:1px solid rgba(32,30,29,.14);padding:14px 48px}
34.wl-foot.mobile{padding:12px 16px}
35.wl-foot-in{max-width:720px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:10px}
36.wl-root .primary,.wl-root .ghostbtn{min-height:40px;box-sizing:border-box}
37.wl-linkbtn{border:none;background:transparent;font:inherit;font-size:13px;font-weight:600;color:#006786;cursor:pointer;padding:8px 10px;min-height:40px;border-radius:9px}
38.wl-linkbtn:hover{color:#004961;background:rgba(0,136,176,.06)}
39.wl-danger{color:#aa0b56;border-color:rgba(170,11,86,.35);background:transparent}
40.wl-danger:hover:not(:disabled){background:#fff1f4;color:#aa0b56}
41.wl-err{background:#ffe1eb;border:1px solid rgba(170,11,86,.25);border-radius:10px;padding:10px 14px;font-size:12.5px;color:#aa0b56;display:flex;align-items:center;gap:8px}
42.wl-ok{font-size:12.5px;color:${Ki};display:inline-flex;align-items:center;gap:6px}
43@keyframes wl-spin{to{transform:rotate(360deg)}}
44/* Phones: 16px fields (.cd-in is this page's own input class, so the global .fld-in rule never reaches it and iOS would zoom),
45   40px preview pills, cards without the desktop side padding, step headings one size down, chips that can never push past the
46   column, and a footer with a full-width Continue that also clears the home indicator. */
47@media (max-width:820px){
48  .wl-root .cd-in{font-size:16px}
49  .wl-root .wl-prev{min-height:40px}
50  .wl-root .wl-chip{max-width:100%}
51  .wl-root .wl-note{font-size:13.5px}
52  .wl-col.mobile .wl-card{padding:18px 16px}
53  .wl-col.mobile .wl-card.tight{padding:16px}
54  .wl-col.mobile .wl-h1{font-size:27px}
55  .wl-foot.mobile{padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
56  /* Stacked on phones: the Continue group takes the top row and Back sits alone at the left of the bottom row, so the
57     bottom-right corner stays free for the assistant pill (about 117px wide, 44px tall) while the bar is stuck mid-scroll. */
58  .wl-foot.mobile .wl-foot-in{gap:10px;flex-wrap:wrap}
59  .wl-foot.mobile .wl-foot-in>div{flex:1 1 100%;justify-content:flex-end}
60  .wl-foot.mobile .wl-foot-in>.ghostbtn{order:1}
61  .wl-foot.mobile .primary{flex:1;justify-content:center;min-height:44px;min-width:0}
62  .wl-foot.mobile .ghostbtn{min-height:44px;flex:none}
63}
64`;function ro(){const{profile:o,ownerName:a,prefs:h,mail:s,brief:c,admins:R,rules:de,flagRules:_e,userId:O,phoneProvider:Le}=ae.useLoaderData(),pe=ae.useSearch(),{org:F}=ae.useRouteContext(),H=le(F.timezone),r=pe.step??0,he=Si(),Ve=Ni(),u=Ti(),U=o.orgName||"your company",me=Zi(o.name,o.email),_=G(o.email),A=i=>{m(null),he({to:"/welcome",search:{step:i}}),typeof window<"u"&&window.scrollTo({top:0})};l.useEffect(()=>{const i=Ci("session",ce);if(!i||(Pe("session",ce),pe.step!==void 0))return;const t=Number(i);Number.isInteger(t)&&t>=1&&t<=Ee&&he({to:"/welcome",search:{step:t},replace:!0})},[]);const[ge,m]=l.useState(null),[f,w]=l.useState(!1),g=O?de.find(i=>i.recipientIds.includes(O))??null:null,[ue,Ye]=l.useState({profile:!1,persona:!1,mailbox:s.connected,notifications:!!g}),S=(i,t=!0)=>Ye(n=>({...n,[i]:t})),K=P.filter(i=>ue[i.key]).length,[q,Be]=l.useState(o.name),[fe,Ge]=l.useState(o.title),[xe,He]=l.useState(o.phone),[$,Ue]=l.useState({name:o.name,title:o.title,phone:o.phone}),Ke=async()=>
64{if(!q.trim())throw new Error("Add your name so the team knows who sent what.");const i={name:q.trim(),title:fe.trim(),phone:xe.trim()};(i.name!==$.name||i.title!==$.title||i.phone!==$.phone)&&(await $e({data:i}),Ue(i),window.dispatchEvent(new CustomEvent("tsv-profile-updated"))),S("profile")},[x,J]=l.useState(h?.briefingAgent||"vera"),[L,qe]=l.useState(h?.customName??""),[y,ye]=l.useState(h?.customVoiceId||re),[W,Je]=l.useState(h?.customPhoto??null),{voices:Z,drop:Ze}=Yi();l.useEffect(()=>{const i=Bi(y,Z);i!==y&&ye(i)},[Z,y]);const Xe=i=>i==="custom"?y||re:z.find(t=>t.id===i)?.voiceId??re,Qe=async()=>{await Ai({data:{briefingAgent:x,customVoiceId:y,customName:L.trim()||null,customPhoto:W}}),C("local",I.agent,x),C("local",I.active,Xe(x)),C("local",I.voice,y),C("local",I.name,L.trim()),W?C("local",I.photo,W):Pe("local",I.photo),S("persona")},b=x==="custom"?{name:L.trim()||"your digital employee",photo:W}:{name:z.find(i=>i.id===x)?.name??"Vera",photo:z.find(i=>i.id===x)?.photo??"/agents/vera.jpg"},X=l.useRef(null),V=l.useRef(0),[ei,be]=l.useState(null),[we,Q]=l.useState(null),ee=()=>{const i=X.current;i&&i.pause(),Q(null)},ii=async(i,t)=>{if(we===i){ee();return}if(ee(),!t)return;const n=++V.current;be(i),m(null);try{const p=await Ri({data:{voiceId:t}});if(n!==V.current)return;if(!p.dataUri)m(p.message||"Couldn't play that preview just now. Try again in a moment."),Ze(t);
64else{const k=X.current;k&&(k.src=p.dataUri,await k.play(),Q(i))}}catch(p){if(n!==V.current)return;const k=p instanceof Error?p.message:"";m(k.includes("ELEVENLABS_API_KEY")?"Voices aren't connected yet. You can still pick one; previews arrive once the voice service is set up.":"Couldn't play that preview just now. Try again in a moment.")}n===V.current&&be(null)};l.useEffect(()=>()=>ee(),[]);const oi=async()=>{w(!0),m(null);try{const i=window.location.origin+"/integrations/callback",{url:t,state:n}=await Pi({data:{redirectUri:i}});sessionStorage.setItem("ms_oauth_state",n),sessionStorage.setItem("ms_oauth_redirect",i),sessionStorage.setItem("ms_oauth_return","/welcome?step=3"),await Ei(),C("session",ce,"3"),window.location.href=t}catch(i){m(i instanceof Error?i.message:"Couldn't start the connection."),w(!1)}},ti=async()=>{if(await zi({title:s.email?`Disconnect "${s.email}"?`:"Disconnect this mailbox?",body:"Follow-ups will stop sending from this mailbox until you sign in with Microsoft again; this cannot be undone from here.",confirmLabel:"Disconnect mailbox",danger:!0})){w(!0),m(null);try{await Ii(),S("mailbox",!1),await Ve.invalidate()}catch(i){m(i instanceof Error?i.message:"Couldn't disconnect.")}w(!1)}},ie=c.recipients.map(G),ve=ie.length===0,je=ve||ie.includes(_),[N,ni]=l.useState(je),[ke,Se]=l.useState(null),si=async()=>{if(N===je)return;const i=ve?R.map(n=>G(n.email)):ie,t=N?Xi([...i,_]):i.filter(n=>n!==_);if(!t.length)throw new Error(`You're the only one on the briefing list. Leave it on for now, or ask ${a} to add someone first.`);if(await Wi({data:{enabled:c.enabled,deliverTime:c.deliverTime,overnightStart:c.overnightStart,recipients:t}}),N){const n=await Di().catch(()=>null);n&&!n.recipients.map(G).includes(_)&&Se(`Your address isn't on the admin list yet, so the briefing can't reach it. Ask ${a} to check your access.`)}},[v,ai]=l.useState(o.timezone),[D,oe]=l.useState(!!o.briefDeliverTime),[T,li]=l.useState(o.briefDeliverTime??c.deliverTime),Ne=v??F.timezone,te=c.enabled&&D&&Oe.test(T)?Gi(F.timezone,c.deliverTime,Ne,T):null,ri=async()=>{const i=D?T:null;v===o.timezone&&i===o.briefDeliverTime||await $e({data:{timezone:v,briefDeliverTime:i}})},ci=s.connected&&s.email||o.email,Te=_e.filter(i=>i.enabled).map(i=>({key:i.key,label:Re(i.key),icon:"ph-tag"})),di=i=>Me.find(t=>t.key===i)?.label??Re(i),[ne,pi]=l.useState(g?g.enabled:!0),se=Vi(Le),hi=g?.triggers??[],[j,mi]=l.useState(g?.triggers.length?g.triggers:["any_high","very_negative",...se?[De]:[]]),[Ce,gi]=l.useState(g?.callerTypes??[]),ze=i=>mi(t=>t.includes(i)?t.filter(n=>n!==i):[...t,i]),ui=i=>gi(t=>i.every(p=>t.includes(p))?t.filter(p=>!i.includes(p)):[...new Set([...t,...i])]),fi=async()=>{if(!ne){g?.enabled&&await Mi({data:{id:g.id,enabled:!1}});return}if(!O)throw new Error("Couldn't identify your account. You can set alerts later under Notifications.");if(!j.length)throw new Error("Pick at least one thing worth interrupting you for, or turn alerts off.");const i=$.name.trim()||o.email,t=`${j.map(di).join(", ")} → ${i}`.slice(0,200);await Oi({data:{id:g?.id,title:t,desc:"",priority:Ji(j),triggers:j,channels:{slack:!1,email:!0,sms:!1},recipientIds:[O],recipientRoles:[],callerTypes:Ce,enabled:!0,position:g?.position??de.reduce((n,p)=>Math.max(n,p.position),-1)+1}})},[xi,yi]=l.useState(!1),bi=async()=>{if(D&&!Oe.test(T))throw new Error("Pick a time for your briefing, or go with the company edition.");await si(),await ri(),await fi(),await Ae(),$i(),yi(!0),S("notifications")},wi=async()=>{if(!f){w(!0),m(null);try{r===1?await Ke():r===2?await Qe():r===3?S("mailbox",s.connected):r===4&&await bi(),A(Math.min(r+1,Ee))}catch(i){m(i instanceof Error?i.message:"Something went wrong. Try again.")}w(!1)}},vi=async()=>{w(!0),xi||await Ae().catch(()=>{}),window.location.href="/briefing"},Ie=(i,t)=>{const n=ei===i,p=we===i;return e.jsxs("button",{type:"button",className:`wl-prev ${p?"on":""}`,onClick:k=>{k.stopPropagation(),ii(i,t)},disabled:n,children:[e.jsx("i",{className:`ph-duotone ${n?"ph-circle-notch":p?"ph-stop":"ph-play"}`,style:n?{animation:"wl-spin .8s linear infinite"}:void 0}),n?"Loading":p?"Stop":"Preview"]})},Y=r>=1&&r<=4?r-1:-1,B=Y>=0?`Step ${r} of 4 · ${P[Y].label}`:r===5?"All set":"Welcome to TeleServ",ji=K>=4||r===5?"All done":`${K} of 4 done · about ${4-K} min left`,ki=e.jsxs(e.Fragment,{children:[U," is already connected and listening. ",e.jsx("b",{children:a})," did the company setup; this part is just you."]});return e.jsxs("div",{className:`wl-root ${u?"mobile":""}`,children:[e.jsx("style",{children:Qi}),e.jsx("audio",{ref:X,onEnded:()=>Q(null),style:{display:"none"}}),e.jsx(Fi,{heading:"Your setup",steps:P.map(i=>({key:i.key,label:i.label,done:ue[i.key]})),activeKey:Y>=0?P[Y].key:null,onSelect:i=>{const t=P.findIndex(n=>n.key===i);t>=0&&A(t+1)},progressLabel:ji,user:{name:$.name||o.email,email:o.email,role:o.role==="Member"?"Member":"Admin",note:`invited by ${a}`},aside:ki}),e.jsxs("div",{className:"wl-main",children:[e.jsxs("div",{className:`wl-col ${u?"mobile":""}`,children:[r===0&&e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"},children:[e.jsx("div",{style:{display:"flex"},children:z.map((i,t)=>e.jsx("img",{src:i.photo,alt:"",style:{width:44,height:44,borderRadius:"50%",objectFit:"cover",marginLeft:t?-10:0,boxShadow:"0 0 0 2px var(--color-canvas, #f3f2f2)",position:"relative",zIndex:z.length-t}},i.id))}),e.jsx("span",{style:{fontSize:13,color:d(58)},children:"Your digital employees are waiting to meet you"})]}),e.jsxs("h1",{className:"wl-h1 big",style:{marginTop:22,fontSize:u?34:44},children:["Welcome aboard, ",me,"."]}),e.jsxs("p",{className:"wl-lede",style:{fontSize:16},children:[a," just made you an admin at ",U,". From tomorrow you'll know what happened on every call before your first coffee, and hear about the ones that need you the moment they land. Four quick steps and you're set."]}),e.jsx("div",{className:"wl-card",style:{marginTop:28,padding:0,overflow:"hidden"},children:P.map((i,t)=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"14px 18px",borderTop:t?"1px solid rgba(32,30,29,.08)":"none"},children:[e.jsx("span",{style:{width:38,height:38,borderRadius:10,background:"rgba(0,136,176,.08)",color:"#006786",display:"grid",placeItems:"center",flex:"none"},children:e.jsx("i",{className:`ph-duotone ${i.icon}`,style:{fontSize:19}})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontSize:14,fontWeight:600},children:i.title}),e.jsx("div",{style:{fontSize:12.5,color:d(55),marginTop:1},children:i.desc})]}),e.jsx("span",{style:{fontSize:11,fontWeight:600,color:"#4e6579",background:"#eef3f7",borderRadius:999,padding:"3px 9px",flex:"none"},children:"1 min"})]},i.key))}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,marginTop:26,flexWrap:"wrap"},children:[e.jsxs("button",{type:"button",className:"primary",style:{padding:"10px 20px",fontSize:14},onClick:()=>A(1),children:["Let's go",e.jsx("i",{className:"ph-duotone ph-arrow-right"})]}),e.jsx("span",{style:{fontSize:12.5,color:d(50)},children:"About 4 minutes"})]})]}),r===1&&e.jsxs("div",{children:[e.jsx("div",{className:"wl-eyebrow",children:B}),e.jsx("h1",{className:"wl-h1",children:"Your profile."}
64),e.jsxs("p",{className:"wl-lede",children:["How your name appears on follow-ups and coaching notes, and where alerts reach you. ",a," set up the company; this is just about you."]}),e.jsxs("div",{className:"wl-card",style:{marginTop:24},children:[e.jsx("div",{className:"seclbl",children:"About you"}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:u?"1fr":"1fr 1fr",gap:"14px 16px",marginTop:14},children:[e.jsxs("div",{children:[e.jsx("label",{className:"wl-lbl",htmlFor:"wl-name",children:"Full name"}),e.jsx("input",{id:"wl-name",className:"cd-in",value:q,onChange:i=>Be(i.target.value),autoComplete:"name"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"wl-lbl",htmlFor:"wl-title",children:"Title"}),e.jsx("input",{id:"wl-title",className:"cd-in",value:fe,onChange:i=>Ge(i.target.value),placeholder:"e.g. Operations manager",autoComplete:"organization-title"})]}),e.jsxs("div",{children:[e.jsx("span",{className:"wl-lbl",children:"Sign-in email"}),e.jsxs("div",{className:"wl-ro",title:o.email,children:[e.jsx("i",{className:"ph-duotone ph-lock-simple",style:{marginRight:7,color:"#7f93a3",flex:"none"}}),e.jsx("span",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.email})]})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"wl-lbl",htmlFor:"wl-phone",children:["Mobile ",e.jsx("em",{children:"· for text alerts, when they arrive"})]}),e.jsx("input",{id:"wl-phone",className:"cd-in",value:xe,onChange:i=>He(i.target.value),placeholder:"(555) 555-0100",inputMode:"tel",autoComplete:"tel"})]})]})]}),e.jsx("p",{className:"wl-note",style:{marginTop:14},children:"Your email signature and password live under My profile once you're in."})]}),r===2&&e.jsxs("div",{children:[e.jsx("div",{className:"wl-eyebrow",children:B}),e.jsx("h1",{className:"wl-h1",children:"Choose your digital employee."}),e.jsx("p",{className:"wl-lede",children:"Greets you each morning, reads your briefing aloud, and answers when you ask. Preview the voices, pick one, or create your own."}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:u?"1fr":"repeat(2, 1fr)",gap:14,marginTop:24},children:[z.map(i=>{const t=x===i.id;return e.jsxs("div",{role:"button",tabIndex:0,className:`wl-pcard ${t?"on":""}`,onClick:()=>J(i.id),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),J(i.id))},children:[t&&e.jsx("span",{className:"wl-badge",children:e.jsx("i",{className:"ph ph-check"})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[e.jsx("img",{src:i.photo,alt:i.name,style:{width:48,height:48,borderRadius:"50%",objectFit:"cover",flex:"none"}}),e.jsxs("div",{children:[e.jsx("div",{className:"serif",style:{fontSize:17,fontWeight:600},children:i.name}),e.jsx("div",{style:{fontSize:12,color:d(52),marginTop:2},children:i.accent})]})]}),e.jsx("div",{style:{fontSize:13,color:d(66),lineHeight:1.55,flex:1},children:i.blurb}),e.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:Ie(i.id,i.voiceId)})]},i.id)}),e.jsx(eo,{on:x==="custom",name:L,voiceId:y,voices:Z,photo:W,onPick:()=>J("custom"),onName:qe,onVoice:ye,onPhoto:Je,onPhotoError:m,preview:Ie("custom",y)})]}),e.jsx("p",{className:"wl-note",style:{marginTop:16},children:'Your pick sets the voice and manner of your daily briefing and of "Ask". Change it anytime under Settings, Digital employee.'})]}),r===3&&e.jsxs("div",{children:[e.jsx("div",{className:"wl-eyebrow",children:B}),e.jsx("h1",{className:"wl-h1",children:"Connect your mailbox."}),e.jsx("p",{className:"wl-lede",children:"This one is yours alone. Customer follow-ups you approve send from your address and land in your Sent items."}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:u?"1fr":"1fr 1fr",gap:14,marginTop:24},children:[e.jsx(Fe,{icon:"ph-microsoft-outlook-logo",name:"Microsoft 365",sub:"Outlook · your work account",desc:`Sign in with your ${U} account. Approved follow-ups send from it and land in your Sent items.`,status:s.connected?"connected":"available",email:s.email,busy:f,onConnect:()=>{oi()},onDisconnect:()=>{ti()}}
64),e.jsx(Fe,{icon:"ph-google-logo",name:"Google Workspace",sub:"Gmail · your Google account",desc:"Sign in with Google. Same approval step; each follow-up lands in your Sent folder.",status:"coming_soon",email:null,busy:!1})]}),e.jsxs("div",{className:"wl-card tight",style:{marginTop:14,display:"flex",gap:12,alignItems:"flex-start"},children:[e.jsx("i",{className:"ph-duotone ph-shield-check",style:{fontSize:20,color:"#006786",marginTop:1,flex:"none"}}),e.jsxs("div",{className:"wl-note",children:[e.jsx("b",{style:{color:"#201e1d"},children:"Secure sign-in through your provider."})," TeleServ never sees your password. This connection only sends the follow-ups you approve, and you can disconnect any time."]})]})]}),r===4&&e.jsxs("div",{children:[e.jsx("div",{className:"wl-eyebrow",children:B}),e.jsx("h1",{className:"wl-h1",children:"Your notifications."}),e.jsx("p",{className:"wl-lede",children:"Your briefing, your alerts. Only your own; every admin sets their own. Change any of it later in My profile."}),e.jsxs("div",{className:"wl-card",style:{marginTop:24},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:14},children:[e.jsx("span",{style:{width:44,height:44,borderRadius:"50%",background:"#e2ebf1",boxShadow:"0 0 0 2px #fff, 0 0 0 4px #62c5ee",display:"grid",placeItems:"center",overflow:"hidden",flex:"none"},children:b.photo?e.jsx("img",{src:b.photo,alt:"",style:{width:44,height:44,objectFit:"cover",display:"block"}}):e.jsx("span",{className:"serif",style:{fontSize:16,fontWeight:600,color:"#004961"},children:b.name[0]?.toUpperCase()??"A"})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{className:"serif",style:{fontSize:17,fontWeight:600},children:["Morning briefing from ",b.name]}),e.jsx("div",{style:{fontSize:13,color:d(62),marginTop:4,lineHeight:1.55},children:"Read aloud in the app, and sent to your inbox if you want it there too. Mondays cover the whole weekend."})]}),e.jsx(We,{checked:N,onChange:i=>{ni(i),Se(null)},label:"Send the briefing to my inbox"})]}),e.jsxs("div",{style:{marginTop:14,paddingTop:14,borderTop:"1px solid rgba(32,30,29,.08)",fontSize:13,color:d(66),lineHeight:1.55},children:[c.enabled?e.jsxs(e.Fragment,{children:["Your briefing arrives at ",e.jsxs("b",{style:{color:"#201e1d"},children:[E(c.deliverTime)," ",H]}),", set by ",a,", and covers calls since ",E(c.overnightStart)," the evening before.",N?" It goes to your inbox too.":" It stays in the app; nothing lands in your inbox."]}):e.jsxs(e.Fragment,{children:["The inbox briefing isn't scheduled yet. ",a," turns it on under Notifications",N?"; you'll be on the list when it starts.":"; you've chosen to stay off the list."]}),ke&&e.jsxs("div",{style:{marginTop:8,color:"#a86a16",display:"flex",gap:6,alignItems:"flex-start"},children:[e.jsx("i",{className:"ph-duotone ph-warning",style:{marginTop:2,flex:"none"}}),ke]})]}),e.jsxs("div",{style:{marginTop:14,paddingTop:14,borderTop:"1px solid rgba(32,30,29,.08)"},children:[e.jsxs("div",{style:{display:"grid",gridTemplateColumns:u?"1fr":"1fr 1fr",gap:"14px 16px"},children:[e.jsxs("div",{children:[e.jsx("label",{className:"wl-lbl",htmlFor:"wl-tz",children:"My time zone"}),e.jsxs("select",{id:"wl-tz",className:"cd-in",value:v??"",onChange:i=>ai(i.target.value||null),children:[e.jsxs("option",{value:"",children:["Same as the company (",Hi(F.timezone),")"]}),Ui(v).map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"wl-lbl",children:"Deliver my briefing"}),e.jsxs("div",{role:"radiogroup","aria-label":"Deliver my briefing",style:{display:"flex",flexDirection:"column",gap:8,fontSize:13.5,color:d(72)},children:[e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:"pointer",minHeight:40},children:[e.jsx("input",{type:"radio",name:"wl-deliver",checked:!D,onChange:()=>oe(!1),style:{accentColor:"var(--color-accent)",margin:0}}),e.jsxs("span",{children:["When the company edition goes out",c.enabled?` (${E(c.deliverTime)} ${H})`:""]})]}),e.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:"pointer",flexWrap:"wrap"},children:[e.jsx("input",{type:"radio",name:"wl-deliver",checked:D,onChange:()=>oe(!0),style:{accentColor:"var(--color-accent)",margin:0}}),e.jsx("span",{children:"At"}),e.jsx("input",{type:"time",className:"cd-in",style:{width:"auto"},value:T,onChange:i=>li(i.target.value),onFocus:()=>oe(!0),"aria-label":"My delivery time"}),e.jsxs("span",{children:["my time",v?` (${le(v)})`:""]})]})]})]})]}),e.jsxs("div",{className:"wl-note",style:{marginTop:10},children:[c.enabled?`The edition is written at ${E(c.deliverTime)} ${H}. A time earlier than that in your zone arrives the next morning.`:`Once ${a}
64 schedules the edition, a time earlier than it in your zone arrives the next morning.`,te?` With this setting each edition reaches you at ${E(T)} ${le(Ne)} ${te.nextDay?"the next day":"the same day"}, ${te.hoursText} after it is written.`:""]})]})]}),e.jsxs("div",{className:"wl-card",style:{marginTop:14},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:14},children:[e.jsx("span",{style:{width:44,height:44,borderRadius:11,background:"#ffe1eb",color:"#aa0b56",display:"grid",placeItems:"center",flex:"none"},children:e.jsx("i",{className:"ph-duotone ph-bell-ringing",style:{fontSize:22}})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{className:"serif",style:{fontSize:17,fontWeight:600},children:"Alert me the moment a call is flagged"}),e.jsx("div",{style:{fontSize:13,color:d(62),marginTop:4,lineHeight:1.55},children:"How you want to be reached, then what is worth interrupting you for."})]}),e.jsx(We,{checked:ne,onChange:pi,label:"Alert me when a call is flagged"})]}),ne&&e.jsxs("div",{style:{marginTop:16,display:"flex",flexDirection:"column",gap:16},children:[e.jsxs("div",{children:[e.jsx("div",{className:"wl-grp",children:"Reach me by"}),e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:8},children:[e.jsxs("span",{className:"wl-chip sel",style:{cursor:"default",overflowWrap:"anywhere"},children:[e.jsx("i",{className:"ph-duotone ph-envelope-simple"}),"Email · ",ci]}),e.jsxs("span",{className:"wl-chip dashed",children:[e.jsx("i",{className:"ph-duotone ph-chat-circle-text"}),"Text · coming soon"]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"wl-grp",children:"When these come up"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:8},children:Me.filter(i=>_i(i.key,se,hi)).map(i=>e.jsxs("button",{type:"button",className:`wl-chip ${j.includes(i.key)?"sel":""}`,onClick:()=>ze(i.key),children:[e.jsx("i",{className:`ph-duotone ${i.icon}`}),i.label]},i.key))}),!se&&j.includes(De)&&e.jsx("div",{className:"wl-note",style:{marginTop:8},children:Li})]}),Te.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"wl-grp",children:"Specific flags"}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:8},children:Te.map(i=>e.jsxs("button",{type:"button",className:`wl-chip ${j.includes(i.key)?"sel":""}`,onClick:()=>ze(i.key),children:[e.jsx("i",{className:`ph-duotone ${i.icon}`}),i.label]},i.key))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"wl-grp",children:["From ",e.jsx("span",{style:{textTransform:"none",letterSpacing:0,fontWeight:400,color:"#7f93a3"},children:"· leave all off for any caller"})]}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginTop:8},children:qi.map(i=>{const t=i.types.every(n=>Ce.includes(n));return e.jsxs("button",{type:"button",className:`wl-chip ${t?"sel":""}`,onClick:()=>ui(i.types),children:[e.jsx("i",{className:`ph-duotone ${i.icon}`}),i.label]},i.key)})})]})]})]}),e.jsxs("p",{className:"wl-note",style:{marginTop:14,display:"flex",gap:8,alignItems:"flex-start"},children:[e.jsx("i",{className:"ph-duotone ph-sparkle",style:{color:"#7c3aed",fontSize:16,marginTop:2,flex:"none"}}),e.jsx("span",{children:"Alerts learn. Mark them worth it or not as you review, and they narrow themselves over time."})]})]}),r===5&&e.jsxs("div",{children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:14},children:[e.jsx("span",{style:{width:56,height:56,borderRadius:"50%",background:"#e2ebf1",boxShadow:"0 0 0 2px #fff, 0 0 0 4px #62c5ee",display:"grid",placeItems:"center",overflow:"hidden",flex:"none"},children:b.photo?e.jsx("img",{src:b.photo,alt:"",style:{width:56,height:56,objectFit:"cover",display:"block"}}):e.jsx("span",{className:"serif",style:{fontSize:19,fontWeight:600,color:"#004961"},children:b.name[0]?.toUpperCase()??"A"})}),e.jsxs("div",{className:"wl-card tight",style:{borderRadius:"4px 16px 16px 16px",fontSize:14,lineHeight:1.5},children:["Hi ",me,", I'm ",b.name,". See you at ",E(c.deliverTime)," tomorrow."]})]}),e.jsx("h1",{className:"wl-h1 big",style:{marginTop:26,fontSize:u?34:44},children:"You're all set."}),e.jsx("p",{className:"wl-lede",style:{fontSize:16},children:"Your first briefing lands tomorrow morning, and you'll hear about flagged calls as they happen. Everything else, calls, scorecards, account health, is already live and waiting for you."}),e.jsx("div",{style:{marginTop:26},children:e.jsxs("button",{type:"button",className:"primary",style:{padding:"10px 20px",fontSize:14},onClick:()=>{vi()},disabled:f,children:[f?"Opening":"Open the briefing",e.jsx("i",{className:"ph-duotone ph-arrow-right"})]})})]}),ge&&e.jsxs("div",{className:"wl-err",style:{marginTop:18},children:[e.jsx("i",{className:"ph-duotone ph-warning-circle",style:{fontSize:16,flex:"none"}}),ge]})]}),r>=1&&r<=4&&e.jsx("div",{className:`wl-foot ${u?"mobile":""}`,children:e.jsxs("div",{className:"wl-foot-in",children:[e.jsxs("button",{type:"button",className:"ghostbtn",onClick:()=>A(r-1),disabled:f,children:[e.jsx("i",{className:"ph-duotone ph-arrow-left"}),"Back"]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[r===3&&!s.connected&&e.jsx("button",{type:"button",className:"wl-linkbtn",onClick:()=>{S("mailbox",!1),A(4)},disabled:f,children:"Skip for now"}),e.jsxs("button",{type:"button",className:"primary",onClick:()=>{wi()},disabled:f,children:[f?e.jsx("i",{className:"ph-duotone ph-circle-notch",style:{animation:"wl-spin .8s linear infinite"}}
64):null,r===4?"Finish":"Continue",!f&&e.jsx("i",{className:"ph-duotone ph-arrow-right"})]})]})]})})]})]})}function eo(o){const a=l.useRef(null),h=s=>{const c=s.target.files?.[0];if(!c)return;if(c.size>18e5){o.onPhotoError("That photo is too large. Pick one under 1.8 MB.");return}const R=new FileReader;R.onload=()=>{o.onPhoto(String(R.result)),o.onPick()},R.readAsDataURL(c)};return e.jsxs("div",{role:"button",tabIndex:0,className:`wl-pcard ${o.on?"on":""}`,style:{borderStyle:o.on?"solid":"dashed"},onClick:o.onPick,onKeyDown:s=>{s.key==="Enter"&&s.target===s.currentTarget&&o.onPick()},children:[o.on&&e.jsx("span",{className:"wl-badge",children:e.jsx("i",{className:"ph ph-check"})}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[e.jsx("button",{type:"button",onClick:s=>{s.stopPropagation(),a.current?.click()},title:"Upload a photo",style:{width:48,height:48,borderRadius:"50%",border:o.photo?"1px solid rgba(32,30,29,.14)":"1px dashed rgba(32,30,29,.3)",background:o.photo?"transparent":d(6),color:d(55),display:"grid",placeItems:"center",flex:"none",cursor:"pointer",overflow:"hidden",padding:0},children:o.photo?e.jsx("img",{src:o.photo,alt:"",style:{width:"100%",height:"100%",objectFit:"cover"}}):e.jsx("i",{className:"ph-duotone ph-camera",style:{fontSize:20}})}),e.jsx("input",{ref:a,type:"file",accept:"image/*",onClick:s=>s.stopPropagation(),onChange:h,style:{display:"none"}}),e.jsxs("div",{children:[e.jsx("div",{className:"serif",style:{fontSize:17,fontWeight:600},children:"Create your own"}),e.jsx("div",{style:{fontSize:12,color:d(52),marginTop:2},children:"Name, photo and voice"})]})]}),e.jsx("input",{className:"cd-in",value:o.name,onClick:s=>s.stopPropagation(),onFocus:o.onPick,onChange:s=>o.onName(s.target.value),placeholder:"Name (optional)","aria-label":"Digital employee name"}),e.jsx("select",{className:"cd-in",value:o.voiceId,onClick:s=>s.stopPropagation(),onFocus:o.onPick,onChange:s=>o.onVoice(s.target.value),"aria-label":"Voice",children:o.voices.map(s=>e.jsx("option",{value:s.id,children:s.label},s.id))}),e.jsx("div",{style:{display:"flex",justifyContent:"flex-end"},children:o.preview})]})}function Fe(o){const a=o.status==="connected",h=o.status==="coming_soon";return e.jsxs("div",{className:"wl-card tight",style:{display:"flex",flexDirection:"column",gap:12,borderColor:a?"rgba(0,136,176,.45)":void 0,opacity:h?.7:1},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:12},children:[e.jsx("span",{style:{width:44,height:44,borderRadius:11,background:a?"rgba(0,136,176,.10)":d(5),color:a?"#004961":d(60),display:"grid",placeItems:"center",flex:"none"},children:e.jsx("i",{className:`ph-duotone ${o.icon}`,style:{fontSize:22}})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[e.jsx("span",{className:"serif",style:{fontSize:16.5,fontWeight:600},children:o.name}),a?e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:11,fontWeight:600,padding:"3px 9px",borderRadius:999,background:"rgba(0,136,176,.12)",color:"#004961"},children:[e.jsx("i",{className:"ph-duotone ph-check-circle"}),"Connected"]}):h?e.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"3px 9px",borderRadius:999,background:"#f5ead6",color:"#a86a16"},children:"Coming soon"}):e.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"3px 9px",borderRadius:999,background:"#eef3f7",color:"#4e6579"},children:"Not connected"})]}),e.jsx("div",{style:{fontSize:12,color:d(50),marginTop:2},children:o.sub}),e.jsx("div",{style:{fontSize:13,color:d(62),marginTop:6,lineHeight:1.5},children:o.desc})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:10,marginTop:"auto",paddingTop:12,borderTop:"1px solid rgba(32,30,29,.10)"},children:[e.jsx("span",{style:{flex:1,minWidth:0,minHeight:36,display:"inline-flex",alignItems:"center",gap:6,fontSize:12,color:d(52)},children:a?e.jsxs(e.Fragment,{children:[e.jsx("i",{className:"ph-duotone ph-envelope",style:{color:"#1186ac",flex:"none"}}),e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o.email||"Follow-ups send from here"})]}):h?"Google sign-in is on its way":"Signs in with your provider"}),a?e.jsx("button",{type:"button",className:"ghostbtn wl-danger",onClick:o.onDisconnect,disabled:o.busy,children:o.busy?"Working":"Disconnect"}):h?e.jsxs("button",{type:"button",className:"ghostbtn",disabled:!0,style:{opacity:.6,cursor:"not-allowed"},children:[e.jsx("i",{className:"ph-duotone ph-plugs-connected"}),"Connect"]}):e.jsxs("button",{type:"button",className:"primary",onClick:o.onConnect,disabled:o.busy,children:[e.jsx("i",{className:"ph-duotone ph-plugs-connected"}),o.busy?"Opening":"Connect"]})]})]})}export{ro as component};

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.