1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[952],{13364:(e,t,a)=>{function s(e,t){return Number.isFinite(e)&&t>0?Math.round(e*t):0}function o(e){return Number.isFinite(e)?Math.round(e).toLocaleString("en-US"):"0"}function n(e){if(!Number.isFinite(e))return"0";let t=Math.abs(e);return t>=1e9?`${(e/1e9).toLocaleString("en-AU",{maximumFractionDigits:1})}B`:t>=1e6?`${(e/1e6).toLocaleString("en-AU",{maximumFractionDigits:1})}M`:t>=1e3?`${Math.floor(e/1e3).toLocaleString("en-AU")}K`:Math.round(e).toLocaleString("en-AU")}function r(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Math.floor(e*(1e4-t)/1e4):0}function i(e,t){return Number.isFinite(e)&&t>0?1e4*Math.floor(Math.round(e*t)/1e4):0}function l(e,t){return Math.ceil(Math.round(e)/t-1e-6)}function c(e){return`A$${(e/100).toLocaleString("en-AU",{minimumFractionDigits:2,maximumFractionDigits:2})}`}function d(e){switch(e){case"running":return"success";case"provisioning":case"starting":case"restarting":case"updating":return"warning";case"failed":case"error":return"destructive";default:return"muted"}}function u(e){return["provisioning","starting","restarting","updating","deleting"].includes(e||"")}a.d(t,{EH:()=>l,Ql:()=>o,X7:()=>i,Xc:()=>u,Zw:()=>c,di:()=>r,hJ:()=>m,iS:()=>d,o2:()=>s,rh:()=>n});let h={amex:"American Express",mastercard:"Mastercard",visa:"Visa",unionpay:"UnionPay",jcb:"JCB",diners:"Diners Club",discover:"Discover"};function m(e){return`${h[e.brand]??e.brand} \xb7\xb7\xb7\xb7${e.last4}`}},30971:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(78340).A)("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]])},36698:(e,t,a)=>{a.d(t,{I:()=>i,WorkspaceProvider:()=>c,h:()=>d});var s=a(95155),o=a(12115),n=a(27529);let r="agent37wl_workspace";function i(e,t){let a=e.trim();if(a){let e=a.split(/\s+/).filter(Boolean);return e.length>=2?(e[0][0]+e[e.length-1][0]).toUpperCase():a.slice(0,2).toUpperCase()}let s=t.split("@")[0]?.trim()??"";return s?s.slice(0,2).toUpperCase():"?"}let l=(0,o.createContext)(null);function c({initialWorkspaces:e,userEmail:t,initialFullName:a="",initialAvatarUrl:d=null,isSuperAdmin:u=!1,isPartner:h=!1,children:m}){let[p,f]=(0,o.useState)(e),g=(0,o.useRef)(e),[w,y]=(0,o.useState)(e.find(e=>e.support)?.id??e[0]?.id??null),[b,x]=(0,o.useState)(a),[k,v]=(0,o.useState)(d);(0,o.useEffect)(()=>{let e=localStorage.getItem(r);!p.some(e=>e.support)&&e&&p.some(t=>t.id===e)&&y(e)},[]);let $=(0,o.useCallback)(e=>!!g.current.some(t=>t.id===e)&&(y(e),localStorage.setItem(r,e),!0),[]),N=(0,o.useCallback)(async()=>{let{workspaces:e}=await (0,n.nr)("/api/workspaces");return g.current=e,f(e),y(t=>t&&e.some(e=>e.id===t)?t:e[0]?.id??null),e},[]),j=(0,o.useCallback)(e=>{void 0!==e.full_name&&x(e.full_name),void 0!==e.avatar_url&&v(e.avatar_url)},[]),C=(0,o.useMemo)(()=>i(b,t),[b,t]),S=(0,o.useMemo)(()=>p.find(e=>e.id===w)??null,[p,w]);return(0,s.jsx)(l.Provider,{value:{workspaces:p,current:S,setCurrentId:$,refresh:N,userEmail:t,isSuperAdmin:u,isPartner:h,fullName:b,avatarUrl:k,initials:C,updateProfile:j},children:m})}function d(){let e=(0,o.useContext)(l);if(!e)throw Error("useWorkspace must be used within a WorkspaceProvider");return e}},64882:(e,t,a)=>{a.r(t),a.d(t,{DemoWorkspace:()=>es});var s=a(95155),o=a(12115),n=a(96035),r=a(30971),i=a(42129),l=a(9199),c=a(78340);let d=(0,c.A)("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),u=(0,c.A)("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);var h=a(89239),m=a(88641),p=a(40980),f=a(32004),g=a(34461),w=a(51464),y=a(36932),b=a(49667);let x=new Set(["the","a","an","of","for","to","and","or","my","our","me","i","you","your","please","can","could","would","should","all","in","on","at","is","are","
1was","were","it","its","that","this","these","those","with","do","does","did","be","have","has","had","will","just","any","some","from","by","as","if","so"]);function k(e){return e.length<=4?e:e.replace(/(ings|ing|ers|er|ed|es|s)$/,"")}function v(e,t){let a=t.toLowerCase();return a.includes(" ")?e.bigrams.has(a)||e.raw.includes(a):e.stems.has(k(a))}function $(e,t,a=0){let s=null;for(let o of t){if(o.veto?.some(t=>v(e,t)))continue;let t=0;for(let a of o.triggers)v(e,a)&&(t+=2);for(let a of o.signals??[])a.any.some(t=>v(e,t))&&(t+=a.weight);t/=Math.sqrt(1+(o.signals?.length??0)*.25),(t+=a)>=3&&(!s||t>s.score)&&(s={play:o,score:t})}return s}var N=a(1522),j=a(17053);let C=["recurring","create","report","extract","draft","find","summarise","notify","explain"],S={recurring:/\b(every|each)\s+(day|weekday|morning|afternoon|night|week|fortnight|month|hour|monday|tuesday|wednesday|thursday|friday|saturday|sunday)\b|\b(daily|weekly|fortnightly|monthly|recurring|automate|automatically|on a schedule|remind me|from now on)\b/,create:/\b(add (it |this |that )?to the board|create a task|make a task|open a ticket|put (it|this|that) on the board|track this|add a card)\b/,report:/\b(report|dashboard|analyse|analyze|analysis|breakdown|trend|forecast|compare|kpi|metric|chart|graph|how many|how much|performance|numbers)\b/,extract:/\b(extract|parse|read|scan|ocr|transcribe|reconcile|categoris|categoriz|clean up|tidy up|convert|import|pull out|from (this|the|that) (pdf|spreadsheet|csv|file|invoice|document))\b/,draft:/\b(draft|write|compose|reply|respond|follow[- ]?up|chase|email|message|letter|proposal|quote|sms|text|post|newsletter)\b/,find:/\b(find|search|look ?up|show|list|pull|fetch|get|which|who|where|when|any)\b/,summarise:/\b(summar|recap|tl;?dr|brief|digest|overview|catch me up|what happened|bring me up)\b/,notify:/\b(alert|notify|escalate|flag|ping|warn|let .{1,20} know|tell the team)\b/,explain:/.*/},I=Array.from(new Set([...N.k.flatMap(e=>e.integrations),"Gmail","Outlook","Excel","Word","Teams","Slack","Drive","SharePoint","Dropbox","WhatsApp","Salesforce","HubSpot","Xero","MYOB","QuickBooks","Notion","Asana","Trello","Jira","Zendesk","Calendly","Stripe","Shopify","Zoom","OneDrive"])),A=/\b(today|yesterday|tomorrow|this (week|month|quarter|year|morning|afternoon)|last (week|month|quarter|year|night)|next (week|month|quarter)|past \d+ (days?|weeks?|months?)|last \d+ (days?|weeks?|months?)|q[1-4]|ytd)\b/i,U=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function L(e,t,a,s){return{name:`${e.toLowerCase()} ${t}`,label:a,ms:s}}let M="Nothing goes out until you approve it",P=new Set(["scan","pull","send","draft","check","review","chase","summarise","summarize","post","email","build","compile","find","list","update","reconcile","flag","notify","create","generate","prepare","collect","gather","monitor","track","analyse","analyze","report","look","search","read","write","make","run","sort","file","log","remind","tell","give","show","fetch","get","clean","tidy","close","open","process","extract"]);function F(e,t,a){let s=t.object||e.docNounPlural,o=t.systems[0]??e.systemNoun,n=t.systems[1]??e.apps[1]??"Slack",r=t.timeframe?` for ${t.timeframe}`:"",i=t.count??(0,j.Tq)(a,4,18),l=(0,j.Up)(a,e.metrics,e.metrics[0]);if(t.offTopic)return{reply:`That one's outside what I'm set up for here â in this demo I'm wired to ${e.industry.toLowerCase()} workflows, and in the live product I'd be connected to your own ${(0,j.Uw)(e.apps.slice(0,3))} rather than the general internet. 2 3Ask me something you'd normally hand to a team member and I'll show you how it runs.`,followUps:[`Chase overdue ${e.docNounPlural}`,`Build me a ${e.industry.split(" ")[0].toLowerCase()} report`,"What can you actually do?"]};switch(t.family){case"recurring":{let a,n=/\b(post|send|email|notify|tell|message|share|slack)\b/i.test(s)?"":`, then draft the summary for ${e.channel}`,r=(a=s.trim().split(/\s+/)[0]?.toLowerCase().replace(/[^a-z]/g,""))&&P.has(a)?`${s}${n}`:`pull ${s} from ${o}${n}`,i=t.cadence?`You asked for this ${t.cadence}`:"You asked for this on a regular basis";return{reply:`Starting with this one now â I'll ${r}. ${M}. 4 5${i}: when the next one's due, just ask here and I'll pick it up from this conversation rather than starting from scratch. If you want it running without anyone asking, that's a custom Flow+ build our team can scope for you â there's an example of one in the **Flow+** tab.`,effects:[{kind:"flow"}],followUps:[`Chase overdue ${e.docNounPlural}`,"How much does this cost?"]}}case"create":{let a=(0,j.nx)(s).slice(0,60)||`Review ${e.docNounPlural}`;return{reply:`Here's how I'd take on "${a}": 6 71. Pull what's relevant from ${(0,j.Uw)(t.systems)}. 82. Do the routine part and write up what I find right here in the chat. 93. Stop and ask you on anything that needs a decision. 10 11Add any context you have and I'll work it in as I go. If you want a write-up to hand to someone, I'll save it to Files.`,followUps:[`Chase overdue ${e.docNounPlural}`,"What does it connect to?"]}}case"report":{let a=`${e.slug}-${(s||"report").toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,28)||"report"}.xlsx`;return{tools:[L(o,"search",t.timeframe??"current period",1100),L("files","write file",a,900)],reply:`Report ready â you'll find **${a}** in Files. 12 13${l.label} is sitting at ${l.value} (${l.delta}), and I've charted the trend with a short written summary on the first tab so it can go
13straight into a meeting. 14 15In the live product these figures come from your own ${o}; here they're sample data.`,artifacts:[{name:a,kind:"xlsx"}],effects:[{kind:"file",name:a,path:`/workspace/${a}`,body:`${e.industry} â ${(0,j.nx)(s)||"Report"} 16 17${l.label}: ${l.value} (${l.delta}) 18 19Sample data generated for the ETEC+ demo.`}],followUps:["What does it connect to?","Break it down by "+e.clientNoun]}}case"extract":{let t=Math.max(1,Math.round(.15*i));return{tools:[L("files","read file",s.slice(0,24)||"attachment",950),L(o,"update",`${i-t} matched`,1100)],reply:`Worked through ${i} ${e.docNounPlural} from ${s||"the file"}${r}. 20 21${i-t} matched cleanly and are staged against ${o}. ${t} didn't match confidently, so I've flagged those for a person rather than guessing â that's deliberate, and it's the behaviour you want on anything financial.`,followUps:["Show me the flagged ones","Is my data safe?"]}}case"draft":{let a=t.people.length?(0,j.Uw)(t.people):(0,j.Uw)(e.orgs.slice(0,2));return{tools:[L(o,"search",t.timeframe??`${e.docNounPlural}`,1e3),L(n,"create draft",`${i} drafts`,900)],reply:`Drafted ${i} ${1===i?"message":"messages"} about ${s}${r} â each one references that ${e.clientNoun}'s last contact rather than reading like a mail-merge. 22 23${a} came up first; ${a.split(" and ")[0]}'s draft leads with what they asked for last time. 24 25They're sitting in ${n} as drafts. **${M}** â I don't send on your behalf.`,followUps:["Make them shorter","What does it connect to?"]}}case"find":{let t=e.orgs.slice(0,3);return{tools:[L(o,"search",s.slice(0,28)||e.docNounPlural,1e3)],reply:[`Found ${t.length} matching ${s||e.docNounPlural}${r}:`,t.map((e,t)=>`⢠**${e}** â ${0===t?"oldest, and the one I'd action today":1===t?"waiting on a reply":"no action needed yet"}`).join("\n"),"Want me to draft something for the first one?"].join("\n\n"),followUps:[`Draft a follow-up for ${t[0]}`,"What does it connect to?"]}}case"summarise":return{tools:[L(o,"search",t.timeframe??"recent activity",1050)],reply:`Here's where things stand${r||" right now"}: 26 27⢠${l.label} is at ${l.value} â ${l.delta}. 28⢠${e.orgs[0]} is the one thing I'd action today. 29⢠Everything else is tracking normally. 30 31Nothing here needed a decision from me, so nothing has been actioned.`,knowledgeChunks:2,sources:e.knowledge.slice(0,2),followUps:[`Chase overdue ${e.docNounPlural}`,"What needs my decision?"]};case"notify":{let a=t.people[0]??e.people[0];return{tools:[L(n,"post message",e.channel,800)],reply:`Posted to ${e.channel} with the full context attached, and tagged ${a}. 32 33If it goes quiet, ask me and I'll draft a nudge with the thread attached, rather than let it drop.`,followUps:[`Chase overdue ${e.docNounPlural}`]}}default:return{reply:`I'm the ${e.industry.toLowerCase()} agent â in the live product I'd be connected to your ${(0,j.Uw)(e.apps)} and working across them the way a team member would. 34 35Day to day that means: ${e.steps[0]?.replace(/^A /,"a ")??"watching for the trigger you care about"} Then I do the routine part, and stop for a human on anything that needs judgement. 36 37Ask me to do something specific and I'll show you the shape of it.`,knowledgeChunks:2,sources:e.knowledge.slice(0,2),followUps:[`Chase overdue ${e.docNounPlural}`,`Summarise ${e.industry.split(" ")[0].toLowerCase()} activity this week`,`Build me a ${e.industry.split(" ")[0].toLowerCase()} report`]}}}let T=(e,t,a)=>({name:e,label:t,ms:a}),E=[{id:"capabilities",triggers:["what can you do","capabilities","what do you do","help me with"],signals:[{any:["able","capable","good at","for"],weight:1}],suggestion:()=>"What can you actually do?",build:e=>({reply:`I work the way a team member does, across the tools you connect me to. For ${e.industry.toLowerCase()} that usually looks like three things: 38 39⢠**Look it up** â in ${e.systemNoun}, your email, your calendar and your own documents. 40⢠**Do the routine part** â read the ${e.docNoun}, reconcile it, draft the reply, build the report. 41⢠**Stop for a human** â anything involving money, risk or judgement waits for you. 42 43Everything I produce lands somewhere you can check it: an answer here in the chat, a draft in your inbox, a file in Files. Nothing is sent, paid or deleted on your behalf.`,knowledgeChunks:2,sources:e.knowledge,followUps:[`Chase overdue ${e.docNounPlural}`,"What do you connect to?","Show me a report"]})},{id:"chase-overdue",triggers:["overdue","chase","unpaid","outstanding","owes","owing","stalled","gone quiet","no reply"],signals:[{any:["follow","remind","nudge","late","aging","ageing"],weight:1.5},{any:["draft","email","message","call"],weight:1}],suggestion:e=>`Chase everyone with overdue ${e.docNounPlural}`,build:(e,t,a)=>{let s=(0,j.Up)(a,e.orgs,e.orgs[0]),o=e.metrics[1]??e.metrics[0];return{tools:[T(`${e.systemNoun.toLowerCase()} search`,"overdue > 7 days",1100),T(`${(e.apps[1]??"gmail").toLowerCase()} create draft`,"6 drafts",900)],reply:`Six ${e.clientNounPlural} are past terms. I've drafted a personalised follow-up for each, referencing their last contact rather than sending the same template six times. 44 45**${s}** is the oldest and the one I'd action first â their draft leads with the document they asked for last time, which is usually what's actually holding it up. 46 47${o.label} is currently ${o.value} (${o.delta}
47). The drafts are waiting in your outbox â **nothing sends until you approve it.**`,followUps:["Make the tone firmer","Is my data safe?"]}}},{id:"triage-queue",triggers:["triage","inbox","queue","backlog","tickets","enquiries","enquiry","sort through"],signals:[{any:["morning","today","new","unread","pile"],weight:1.5}],suggestion:()=>"Triage this morning's queue",build:(e,t,a)=>({tools:[T(`${e.systemNoun.toLowerCase()} search`,"status:new",1e3),T("files read file",(0,j.Up)(a,e.knowledge,e.knowledge[0]),700),T(`${(e.apps.find(e=>"Slack"===e)??e.apps[1]??"slack").toLowerCase()} post message`,e.channel,700)],reply:`Fourteen new items. I handled the nine routine ones using your own documented process, in your team's tone. 48 49Three need a person â they're in ${e.channel} with full context, not just a link. Two were duplicates, merged and closed. 50 51The three I escalated all involve a commitment to a ${e.clientNoun}, which is exactly the line I don't cross on my own.`,knowledgeChunks:3,sources:e.knowledge,followUps:["Why did you escalate those three?","What does it connect to?"]})},{id:"competitor-research",triggers:["competitor","competitors","market research","research","benchmark","compare the market"],signals:[{any:["pricing","rivals"],weight:1.5}],suggestion:()=>"Research our competitors and write it up",build:e=>({tools:[T("web search","competitor landscape",1200),T("files write file","competitor-scan.md",800)],reply:"I've made a start â the write-up is in **competitor-scan.md** in Files: positioning notes, pricing observations, and where you differentiate.\n\nReply here to redirect me â narrow it to a region, add a competitor I missed â and I'll pick up where I left off.",effects:[{kind:"file",name:"competitor-scan.md",path:"/workspace/competitor-scan.md",body:`# Competitor scan â ${e.industry} 52 53Sample output generated for the ETEC+ demo. 54 55- Positioning notes 56- Pricing observations 57- Where we differentiate 58`}],followUps:["What does it connect to?","How much does this cost?"]})},{id:"integrations",triggers:["integrate","integration","connect","connects","connected","plug into","work with"],signals:[{any:["app","apps","tool","tools","software","system","systems","api"],weight:1.5}],suggestion:()=>"What does it connect to?",build:e=>({reply:`For ${e.industry.toLowerCase()} the usual set is ${(0,j.Uw)(e.apps)} â but the catalogue is over a thousand apps, and you connect them per agent with a normal sign-in. No API keys to manage. 59 60Each agent only ever sees the apps you connect to *it*. Connecting Xero to your bookkeeping agent doesn't give your marketing agent access to it, which matters more than people expect once you have a few running. 61 62If something you use isn't in the catalogue, that's what the Custom Solutions form is for.`,followUps:["Is my data safe?","How much does it cost?"]})},{id:"flow-plus",triggers:["flow","workflow","automate","automated","automatically","automation","on its own","without me asking","without anyone asking"],signals:[{any:["every","daily","weekly","morning","monday","recurring","hourly","nightly"],weight:1.5}],veto:["cash flow","cashflow","cash-flow"],suggestion:()=>"Show me this as a Flow+ workflow",build:e=>({reply:`That's what **Flow+** is for. Our team builds the workflow around me: a trigger starts it â a schedule, an email arriving, a form â I do the reading and drafting in the middle, and anything that needs a decision stops for a person. 63 64There's an example for ${e.industry.toLowerCase()} in the **Flow+** tab, based on "${e.headline}". It's an illustration of a build â nothing in this demo is running. 65 66Flow+ builds are quoted by the hour on top of an agent plan. The Custom Solutions form is the place to describe the one you want.`,effects:[{kind:"flow"}],followUps:["How much does this cost?","Book a live session"]})},{id:"pricing",triggers:["cost","costs","price","pricing","how much","expensive","plans","subscription"],signals:[{any:["month","monthly","seat","agent","per","budget"],weight:1.5}],suggestion:()=>"How much does this cost?",build:()=>({reply:"Pricing is per agent, per month, in Australian dollars, and every plan includes a monthly credit allowance for the work the agent actually does. Prices exclude GST.\n\nThere's also a one-time setup fee to get your agent configured and connected, charged once per workspace at checkout the first time you choose Managed by ETEC+ on Flow+ â never again, whichever plan you move to. If you want an advanced multi-step workflow built, that's quoted separately by the hour on top of a plan.\n\nThe full current pricing is on the pricing section of the site â I'd rather point you at the live numbers than quote you something from a demo that might be out of date.\n\nThe honest short answer: most businesses start with one agent doing one job properly, and add more once it's earning its keep.",followUps:["What's included in the credits?","Book a live session"]})},{id:"security",triggers:["secure","security","safe","privacy","private","gdpr","compliance","data stored","confidential"],signals:[{any:["data","information","where","who","access","risk"],weight:1.5}],suggestion:()=>"Is my data safe?",build:e=>({reply:`Each agent runs on its own isolated machine with its own files, its own connected accounts and its own memory. Agents can't see each other's data â not across your workspaces, and not across customers. 67 68You connect apps with a normal sign-in and can disconnect any of them at any time. The agent only ever has the access you granted it. 69 70Worth saying plainly: **this demo page is a simulation**, so nothing you type here is connected to ${e.systemNoun} or any other system. The Privacy Policy on this site covers what we do keep.`,followUps:["What does it connect to?","How much does it cost?"]})},{id:"is-this-real",triggers:["are you real","is this real","actually ai","really ai","is this a
70simulation","are you a bot","pre-recorded","scripted","fake"],signals:[{any:["demo","simulation","real","actually","genuinely"],weight:2}],suggestion:()=>"Is this a real AI?",build:e=>({reply:`Straight answer: **no â this page is a simulation.** The responses here are pre-built so anyone can explore the product without an account and without it costing anything to run. 71 72What's real is the interface: this is the actual chat and files you get, and the workflows I'm showing are the ones the product genuinely does for ${e.industry.toLowerCase()} businesses. The **Flow+** tab is different again: it's an illustration of a workflow our team would build for you, not an automation running here. 73 74The live product runs a real agent on your own systems and your own data. If you want to see that, book a session and we'll run one of these against your real ${e.systemNoun}.`,followUps:["Book a live session","What can you actually do?"]})}];a(51343);var D=a(8093),W=a(13320),R=a(32797);let B=Symbol("demo-cancel");var z=a(21087),H=a(17256);function q({onLeadMoment:e}){let{ctx:t,logger:a,applyEffects:n,addUploadedFile:r,resetToken:i}=(0,f.z)(),[l,c]=(0,o.useState)(0),d=(0,o.useCallback)(()=>c(e=>e+1),[]),{messages:u,isStreaming:h,followUps:m,send:v,stop:N}=function({ctx:e,logger:t,onEffects:a,resetToken:s}){let[n,r]=(0,o.useState)([]),[i,l]=(0,o.useState)(!1),[c,d]=(0,o.useState)([]),u=(0,o.useRef)(0),h=(0,o.useRef)(!1);(0,o.useEffect)(()=>{h.current=!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},[]),(0,o.useEffect)(()=>{0!==s&&(u.current+=1,r([]),d([]),l(!1))},[s]),(0,o.useEffect)(()=>()=>{u.current+=1},[]);let m=(0,o.useCallback)(e=>{r(t=>{if(0===t.length)return t;let a=t.slice();return a[a.length-1]=e(a[a.length-1]),a})},[]),p=(0,o.useCallback)(()=>{u.current+=1,l(!1),m(e=>"assistant"===e.role?{...e,parts:(0,z.Bs)(e.parts,"stopped")}:e)},[m]),f=(0,o.useCallback)(async(e,t)=>{var s;let o=(s=h.current,{wait:(e,t)=>
74new Promise((a,o)=>{window.setTimeout(()=>u.current!==t?o(B):a(),s?0:e)}),live:e=>u.current===e});for(let a of(await o.wait(e.tools?.length?420:620,t),e.tools??[])){let e=Date.now();m(t=>({...t,parts:[...t.parts??[],{type:"tool",tool:{tool:a.name,label:a.label,status:"running",startedAt:e}}]})),await o.wait(a.ms,t),m(e=>({...e,parts:(e.parts??[]).map((e,t,s)=>t===s.length-1&&"tool"===e.type?{type:"tool",tool:{...e.tool,status:"completed",durationMs:a.ms}}:e)}))}for(let a of(m(e=>({...e,parts:[...e.parts??[],{type:"text",text:""}]})),function(e,t=55){let a=e.split(/(\s+)/).filter(e=>e.length>0);if(0===a.length)return[];let s=Math.max(2,Math.ceil(a.length/t)),o=[];for(let e=0;e<a.length;e+=s)o.push(a.slice(e,e+s).join(""));return o}(e.reply)))await o.wait(/\n\n\s*$/.test(a)?140:/[.!?]["'\)]?\s*$/.test(a)?95:/[,;:]\s*$/.test(a)?55:38,t),m(e=>{let t=(e.parts??[]).slice(),s=t[t.length-1];return s?.type==="text"&&(t[t.length-1]={type:"text",text:s.text+a}),{...e,parts:t,content:e.content+a}});o.live(t)&&(m(t=>({...t,sources:e.sources,artifacts:e.artifacts?.map(e=>({path:`/workspace/${e.name}`,name:e.name,size:null,mtime:Date.now()}))})),e.effects?.length&&a(e.effects),d(e.followUps??[]))},[a,m]);return{messages:n,isStreaming:i,followUps:c,send:(0,o.useCallback)((a,s={})=>{let o=s.attachments??[],n=a.trim();if(!n&&0===o.length)return;u.current+=1;let i=u.current;d([]),l(!0);let c=function(e,t){var a;let s,o,n,r,i,l,c,d,u,h,m,p,f,g,w,y,b,v,N,L=t.trim(),M=(0,j.sK)((0,j.YZ)(`${e.slug}::${L.toLowerCase()}`)),P=(o=function(e){for(let t of C)if(S[t].test(e))return t;return"explain"}(s=L.toLowerCase()),n=I.filter(e=>s.includes(e.toLowerCase())),r=L.match(A),i=L.match(/\b(\d{1,5})\b/),l=Array.from(new Set((L.match(/(?<!^)(?<![.!?]\s)\b[A-Z][a-z]{2,}\b/g)??[]).filter(e=>!I.some(t=>t.toLowerCase()===e.toLowerCase())))).slice(0,3),a=L.trim(),c=S[o],(h=(u=(u=(d="explain"===o?null:a.match(c))&&null!=d.index?a.slice(d.index+d[0].length):a).replace(A," ").replace(/^\s*,?\s*at\s+\d{1,2}(?::\d{2})?\s*(?:am|pm)?\b/i," ").replace(/\b(please|for me|thanks|thank you|asap|okay|ok)\b/gi," ").replace(/^[\s,:;.\-ââ]+/,"").replace(/\s+/g," ").trim()).search(/\b(every|each|daily|weekly|monthly|in|into|to|from|using|via)\b\s+\S/i))>12&&(u=u.slice(0,h)),m=u.split(/\s+/).filter(Boolean).slice(0,8).join(" ").replace(/[.,;:!?]+$/,""),p=[e.docNoun,e.docNounPlural,e.clientNoun,e.clientNounPlural,e.systemNoun,e.industry].map(e=>e.toLowerCase()),f=n.length>0||p.some(e=>s.includes(e))||/\b(work|team|business|customer|client|file|data|report|task|process|system|invoice|order|email|document|account|staff|job)\b/.test(s),g="explain"===o&&!f&&s.length>0,{family:o,object:m,systems:n.length?n.slice(0,3):e.apps.slice(0,2),timeframe:r?r[0]:null,cadence:function(e){let t=U.find(t=>RegExp(`\\b${t.slice(0,3)}\\w*\\b`,"i").test(e)),a=e.match(/\b(\d{1,2})(?::(\d{2}))?\s*(am|pm)\b/i),s=/\bmonthly\b/i.test(e)?"every month":/\bfortnightly\b/i.test(e)?"every fortnight":/\b(weekly|every week)\b/i.test(e)?"every week":/\b(daily|every day|each day|every morning)\b/i.test(e)?"every weekday":/\b(hourly|every hour)\b/i.test(e)?"every hour":null;if(!t&&!s&&!a)return null;let o=t?`every ${t[0].toUpperCase()}${t.slice(1)}`:s??"every weekday";if(!a)return o;let n=a[1],r=a[2]??"00";return`${o} at ${n}:${r}${a[3].toLowerCase()}`}(s),people:l,count:i?Number(i[1]):null,offTopic:g});if(!L)return{scenarioId:"fallback:extract",response:F(e,{...P,family:"extract"},M)};let D=(b=new Set((y=(w=L.toLowerCase().trim()).replace(/[^\p{L}\p{N}\s@.$#-]/gu," ").split(/\s+/).filter(e=>e&&!x.has(e))).map(k)),v=new Set(y.slice(0,-1).map((e,t)=>`${e} ${y[t+1]}`)),{raw:w,tokens:y,stems:b,bigrams:v}),W=[(N=e.headline.toLowerCase().split(" ").filter(e=>e.length>3),{id:`signature:${e.slug}`,triggers:[e.docNoun,e.docNounPlural,...N.slice(0,3)],signals:[{any:["run","show","demo","example","typical","walk","flagship","usual"],weight:2},{any:e.apps.map(e=>e.toLowerCase()),weight:1.5}],suggestion:()=>e.headline,build:e=>({tools:[T(`${e.systemNoun.toLowerCase()} search`,e.docNounPlural,1100),T(`${(e.apps[1]??"slack").toLowerCase()} post message`,e.channel,800)],reply:[`This is the one most ${e.industry.toLowerCase()}
74 teams start with â **${e.headline}**.`,e.steps.map((e,t)=>`${t+1}. ${e}`).join("\n"),`Anything needing a decision stops and waits for a person. ${e.outcome}`].join("\n\n"),knowledgeChunks:3,sources:e.knowledge,followUps:["How much does this cost?",`What else can you do with ${e.systemNoun}?`,"Show me this as a Flow+ workflow"]})}),...E],R=$(D,W.slice(0,1),.5),B=$(D,W.slice(1)),z=R&&B?R.score>=B.score?R:B:R??B;return z?{scenarioId:z.play.id,response:z.play.build(e,P,M)}:{scenarioId:`fallback:${P.family}`,response:F(e,P,M)}}(e,n),{response:h}=c;r(e=>[...e,{id:(0,D.Ld)("u"),role:"user",content:n,attachments:o.length?o:void 0,knowledgeChunks:h.knowledgeChunks,createdAt:Date.now()},{id:(0,D.Ld)("a"),role:"assistant",content:"",parts:[],createdAt:Date.now()}]),t.add("user",n||`[attached ${o.length} file(s)]`,null),t.add("agent",h.reply,c.scenarioId),f(h,i).then(()=>{u.current===i&&l(!1)}).catch(e=>{e!==B&&u.current===i&&l(!1)})},[e,t,f]),stop:p}}({ctx:t,logger:a,onEffects:n,resetToken:i}),L=function(e,t){let[a,s]=(0,o.useState)([]),n=(0,o.useRef)([]),r=(0,o.useRef)(new Set);(0,o.useEffect)(()=>{n.current=a},[a]);let i=(e,t)=>s(a=>a.map(a=>a.id===e?{...a,...t}:a)),l=(0,o.useCallback)(a=>{let o=Math.max(0,R.J5-n.current.length),l=Array.from(a).slice(0,o).map(e=>({id:(0,D.Ld)("f"),file:e,previewUrl:e.type.startsWith("image/")?URL.createObjectURL(e):null,status:e.size>R.u7?"error":"uploading",error:e.size>R.u7?"That file is larger than 10MB.":void 0}));if(l.length)for(let a of(s(e=>[...e,...l]),t?.(),l)){if("error"===a.status)continue;let s=window.setTimeout(()=>{r.current.delete(s),i(a.id,{status:"uploaded",path:e(a.file)}),t?.()},320+Math.floor(380*Math.random()));r.current.add(s)}},[t,e]),c=(0,o.useCallback)(e=>{s(t=>{let a=t.find(t=>t.id===e);return a?.previewUrl&&URL.revokeObjectURL(a.previewUrl),t.filter(t=>t.id!==e)})},[]),d=(0,o.useCallback)(()=>{r.current.forEach(e=>window.clearTimeout(e)),r.current.clear(),s(e=>(e.forEach(e=>e.previewUrl&&URL.revokeObjectURL(e.previewUrl)),[]))},[]),u=(0,o.useCallback)(t=>{let a=n.current.find(e=>e.id===t);if(!a)return;i(t,{status:"uploading",error:void 0});let s=window.setTimeout(()=>{r.current.delete(s),i(t,{status:"uploaded",path:e(a.file)})},300);r.current.add(s)},[e]),h=(0,o.useCallback)(()=>{let e=n.current.filter(e=>!!e.path).map(e=>({name:e.file.name,path:e.path,isImage:e.file.type.startsWith("image/")}));return d(),e},[d]),{dragOver:m,dragHandlers:p}=(0,W.t)(l);(0,o.useEffect)(()=>()=>d(),[d]);let f=a.some(e=>"uploading"===e.status),g=a.some(e=>"error"===e.status);return{files:a,dragOver:m,addFiles:l,removeFile:c,retryFile:u,takeAttachments:h,clearFiles:d,dragHandlers:p,handlePaste:e=>{let t=Array.from(e.clipboardData?.items??[]).filter(e=>"file"===e.kind);if(!t.length)return;let a=t.map(e=>e.getAsFile()).filter(e=>!!e);a.length&&(e.preventDefault(),l(a))},uploading:f,hasFiles:a.length>0,blocksSend:f||g}}(r,d),M=(0,o.useRef)(null),P=(0,o.useRef)(!0),[O,_]=(0,o.useState)(!1);(0,o.useEffect)(()=>{let e=M.current;e&&P.current&&e.scrollTo({top:e.scrollHeight})},[u]);let Q=u.filter(e=>"user"===e.role).length,X=(0,o.useRef)(!1);(0,o.useEffect)(()=>{Q>=3&&!X.current&&(X.current=!0,e())},[Q,e]);let G=0===u.length,Y=G?[t.headline,`Chase everyone with overdue ${t.docNounPlural}`,`Summarise this week and post it to ${t.channel}`,"What can you actually do?"].map(e=>(0,j.nx)(e)):m;return(0,s.jsxs)("div",{className:"relative flex h-full flex-col",...L.dragHandlers,children:[L.dragOver&&(0,s.jsx)(b.o,{label:"Drop files to attach"}),(0,s.jsx)("div",{ref:M,onScroll:()=>{let e=M.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<48;P.current=t,_(!t&&u.length>0)},className:(0,p.cn)("min-h-0 flex-1 overflow-y-auto",G&&"flex flex-col items-center justify-end"),children:G?(0,s.jsxs)("div",{className:"w-full max-w-2xl px-6 pb-2 text-center",children:[(0,s.jsx)("div",{className:(0,p.cn)("mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-xl",t.iconBg),children:(0,s.jsx)(t.Icon,{className:"h-6 w-6"})}),(0,s.jsx)("h1",{className:"text-[26px] font-semibold tracking-tight text-foreground sm:text-[30px]",children:"What can I help with?"}),(0,s.jsxs)("p",{className:"mt-2 text-sm text-muted-foreground",children:["I'm ",t.agentName,", your ",t.industry.toLowerCase()," agent."]})]}):(0,s.jsx)(w.t,{messages:u,isStreaming:h,maxWidthClass:"max-w-3xl",identity:{name:t.agentName}})}),(0,s.jsxs)("div",{className:(0,p.cn)("relative",G?"w-full px-6 md:px-10":"bg-background px-6 py-3 md:px-10 sm:py-4"),children:[!G&&(0,s.jsx)("div",{className:"pointer-events-none absolute inset-x-0 -top-8 h-8 bg-gradient-to-t from-background to-transparent"}),!G&&O&&(0,s.jsx)("button",{type:"button",onClick:()=>{let e=M.current;e&&(P.current=!0,_(!1),e.scrollTo({top:e.scrollHeight,behavior:"smooth"}))},"aria-label":"Scroll to latest message",className:"absolute -top-11 left-1/2 z-10 flex h-8 w-8 -translate-x-1/2 items-center justify-center rounded-full border bg-card text-muted-foreground shadow-md transition-colors hover:text-foreground motion-safe:animate-pill-in",children:(0,s.jsx)(g.A,{className:"h-4 w-4"})}),Y.length>0&&!h&&(0,s.jsx)("div",{className:(0,p.cn)("mx-auto mb-3 flex w-full flex-wrap gap-2",G?"max-w-2xl justify-center":"max-w-3xl"),children:Y.slice(0,4).map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>v(e),className:"rounded-full border border-border/70 bg-card px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground",children:e},e))}),(0,s.jsx)(y.V,{modelsPath:"",isStreaming:h,att:L,onSend:(e,t)=>v(e,{attachments:t.attachments}
74),onStop:N,large:G,focusToken:l,showRunControls:!1,placeholder:`Ask ${t.agentName} to do somethingâ¦`}),(0,s.jsxs)("div",{className:(0,p.cn)("mx-auto mt-2 flex w-full items-center gap-2",G?"max-w-2xl justify-center":"max-w-3xl"),children:[(0,s.jsx)(H.dM,{}),(0,s.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"Pre-built responses \xb7 please don't paste confidential information"})]})]})]})}var O=a(98500),_=a.n(O),Q=a(48368),X=a(6962),G=a(86901),Y=a(21628),Z=a(32229),J=a(64815);let K={"accounting-bookkeeping":{base:"finance",labels:{t:["6am: new Xero","invoices"],a:["Reconcile vs","bank feeds"],b1:["Queue the","daily digest"],b2:["Flag for a","human"]},icons:{t:"clock"}},"e-commerce":{base:"sales",labels:{t:["A checkout is","abandoned"],e:["Enrich the cart"],a:["Pick a margin-","safe offer"],b1:["Queue win-back","email"],b2:["Route to a","human in Slack"]},icons:{t:"receipt",b1:"mail",b2:"flag"},branches:["Standard","Big cart"]},manufacturing:{base:"operations",labels:{t:["Telemetry","reading"],p:["Compare to","thresholds"],a:["Prioritise the","work order"],o:["Open it in","MaintainX"]},icons:{t:"database",p:"search",o:"wrench"}},"allied-health":{base:"operations",labels:{t:["Every morning,","7:30am"],p:["Sync tomorrow's","bookings"],a:["Draft SMS","confirmations"],o:["Queue texts to","patients"]},icons:{o:"message"}},"real-estate":{base:"sales",labels:{t:["Portal inquiry","arrives"],e:["Add CoreLogic","history"],a:["Build the","market pack"],b1:["Offer inspection","times"]},icons:{t:"mail"},branches:["Ready","Not yet"]},"logistics-freight":{base:"support",labels:{t:["Every 15 min:","poll carriers"],c:["Recalculate","the ETA"],a:["Draft the delay","notice"],o:["Notify the","customer"]},icons:{t:"clock",o:"bell"}},"mortgage-broking":{base:"finance",labels:{t:["A new deal","is opened"],x:["Build lender","checklist"],a:["Check docs vs","the checklist"],b1:["Package for","lodgement"],b2:["Re-request","missing docs"]},icons:{t:"clipboard"},branches:["Complete","Missing"]},legal:{base:"support",labels:{t:["An inquiry","arrives"],c:["Run conflicts","check"],a:["Draft the","engagement"],o:["For solicitor","approval"]},icons:{o:"flag"}},hospitality:{base:"operations",labels:{t:["Nightly,","11:30pm"],p:["Pull reviews","and sales"],a:["Score every","dish"],o:["Draft Monday's","menu report"]},icons:{o:"fileText"}},"construction-trades":{base:"operations",labels:{t:["Daily,","4:30pm"],p:["Gather notes","and photos"],a:["Compile the","site diary"],o:["Share with the","project team"]},icons:{o:"send"}},"recruitment-staffing":{base:"sales",labels:{t:["Application","arrives"],e:["Parse the CV"],a:["Score vs the","job brief"],b1:["Book an","interview"],b2:["Add to talent","pool"]},icons:{t:"mail",b2:"users"},branches:["Strong","Not yet"]},"education-rtos":{base:"finance",labels:{t:["Enrolment","submitted"],x:["Verify the USI"],a:["Check the","record"],b1:["File to student","record"],b2:["Flag for a","trainer"]},icons:{t:"clipboard",x:"search"},branches:["Complete","Gaps"]},agriculture:{base:"operations",labels:{t:["Every 3 hours"],p:["Check the BOM","forecast"],a:["Find a spray","window"],o:["Push to crew","phones"]}},insurance:{base:"support",labels:{t:["A claim is","lodged"],c:["Extract the","details"],a:["Score and pick","an adjuster"],o:["Assign and","update"]},icons:{o:"users"}},"marketing-agencies":{base:"operations",labels:{t:["1st of the","month"],p:["Pull ads and","analytics"],a:["Draft the","commentary"],o:["Build the","client deck"]},icons:{t:"calendar",o:"fileText"}},"saas-technology":{base:"sales",labels:{t:["Hourly usage","check"],e:["Compare to","baseline"],a:["Spot churn","risk"],b1:["Open a save-play","in HubSpot"],b2:["Keep","watching"]},icons:{t:"clock",b1:"flag",b2:"search"},branches:["At risk","Healthy"]},automotive:{base:"sales",labels:{t:["Lead from","Carsales"],e:["Check the","vehicle spec"],a:["Draft an","instant reply"],b1:["Book a test","drive"]},icons:{t:"mail"},branches:["Ready","Not yet"]},nonprofit:{base:"finance",labels:{t:["Nightly","donation sync"],x:["Segment the","donor"],a:["Draft thanks","and receipt"],b1:["Queue the","receipt"],b2:["Flag for a","personal call"]},icons:{t:"clock",x:"users"},branches:["Standard","Major"]}
74,"web-digital-agencies":{base:"support",labels:{t:["A build request","arrives"],c:["Read the brief"],a:["Generate the","site"],o:["Deploy, file","for review"]}},"sales-operations":{base:"support",labels:{t:["Hourly inbox","sweep"],c:["Categorise","and file"],a:["Update HubSpot","records"],o:["Book the","follow-up"]},icons:{t:"clock",o:"calendar"}}},V={base:"operations",labels:{}};function ee(){let{files:e}=(0,f.z)(),[t,a]=(0,o.useState)(null),n=t&&e.some(e=>e.id===t.id)?t:null;return(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col p-6",children:[(0,s.jsxs)(H.Ou,{children:["The agent's working folder. Files it produces during this demo appear here, and anything you attach in Chat shows up too â ",(0,s.jsx)("strong",{children:"your files stay in your browser and are never uploaded to us."})]}),(0,s.jsxs)("div",{className:"grid min-h-0 flex-1 gap-4 md:grid-cols-[minmax(0,1fr)_minmax(0,1.1fr)]",children:[(0,s.jsx)("div",{className:"min-h-0 overflow-y-auto rounded-xl border bg-card",children:e.map(e=>{var t;return(0,s.jsxs)("button",{type:"button",onClick:()=>a(e),className:(0,p.cn)("flex w-full items-center gap-3 border-b border-border/60 px-3.5 py-2.5 text-left transition-colors last:border-b-0 hover:bg-accent",n?.id===e.id&&"bg-accent"),children:[(0,s.jsx)(Q.A,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate text-sm text-foreground",children:e.name}),(0,s.jsxs)("span",{className:"block text-[11px] text-muted-foreground",children:[(t=e.size)<1024?`${t} B`:t<1048576?`${(t/1024).toFixed(1)} KB`:`${(t/1048576).toFixed(1)} MB`," \xb7 ",function(e){if(e<1)return"just now";if(e<60)return`${e}m ago`;let t=Math.round(e/60);return t<24?`${t}h ago`:`${Math.round(t/24)}d ago`}(e.agoMinutes)]})]})]},e.id)})}),(0,s.jsx)("div",{className:"min-h-0 overflow-hidden rounded-xl border bg-card",children:n?(0,s.jsxs)("div",{className:"flex h-full flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 border-b px-3.5 py-2.5",children:[(0,s.jsx)(Q.A,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:n.name}),(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-[11px] text-muted-foreground",title:"Downloads are disabled in the demo",children:[(0,s.jsx)(X.A,{className:"h-3.5 w-3.5"}),"Demo"]})]}),(0,s.jsx)("pre",{className:"min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words px-3.5 py-3 font-mono text-xs leading-relaxed text-muted-foreground",children:n.body})]}):(0,s.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 px-6 text-center",children:[(0,s.jsx)(G.A,{className:"h-5 w-5 text-muted-foreground"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select a file to preview it"})]})})]})]})}function et(){let{ctx:e}=(0,f.z)(),t=(0,o.useMemo)(()=>{let t,a,s,o,n,r,i,l;return t=K[e.slug]??V,s=(a=J.U9.find(e=>e.id===t.base)??J.U9[0]).nodes.map(e=>({...e,label:t.labels[e.id]??e.label,icon:t.icons?.[e.id]??e.icon})),o=0,n=a.edges.filter(e=>"main"===e.kind&&e.label).length,r=a.edges.map(e=>"main"===e.kind&&e.label&&t.branches&&2===n?{...e,label:t.branches[o++]}:e),i=s.filter(e=>"sub"!==e.kind).map(e=>{var t;let a;return t=e.id,(a=s.find(e=>e.id===t))?Array.isArray(a.label)?a.label.join(" ").replace(/- /g,"-"):a.label:""}),l=2===n?[...i.slice(0,-2),`${i.at(-2)} or ${i.at(-1)}`]:i,{...a,id:`demo-${e.slug}`,team:e.industry,summary:e.headline,description:`An example ${e.industry.toLowerCase()} workflow: ${l.join(", then ")}.`,nodes:s,edges:r}},[e]);return(0,s.jsxs)("div",{className:"h-full overflow-y-auto p-4 sm:p-6",children:[(0,s.jsxs)(H.Ou,{children:["An example of the kind of Flow+ workflow our team builds for ",e.industry.toLowerCase()," businesses. It's an illustration â nothing here is running or connected to anything."]}),(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-brand-ink/40 px-2.5 py-0.5 text-[11px] font-semibold text-brand-ink",children:[(0,s.jsx)(r.A,{className:"h-3.5 w-3.5"}),"Flow+"]}),(0,s.jsx)("h3",{className:"text-sm font-semibold",children:t.summary})]}),(0,s.jsx)("div",{className:"overflow-x-auto rounded-xl border bg-card p-3 sm:p-4",children:(0,s.jsx)(Z.B,{scenario:t,run:!0})}),(0,s.jsxs)("p",{className:"mt-3 text-xs text-muted-foreground",children:["The moving highlight only shows the order the steps would run in. A trigger starts the flow, ",e.agentName," does the reading and drafting in the middle, and anything that needs a decision stops for a person."]}),(0,s.jsxs)(_(),{href:"/custom-solutions",className:"mt-4 inline-flex items-center gap-1 text-sm font-medium text-brand-ink hover:underline",children:["Scope a Flow+ build ",(0,s.jsx)(Y.A,{className:"h-4 w-4"})]})]})}let ea=[{id:"chat",label:"Chat",icon:n.A},{id:"flow",label:"Flow+",icon:r.A},{id:"files",label:"Files",icon:i.A}];function es({onLeadMoment:e}){let{ctx:t,unread:a,clearUnread:n,resetWorkspace:r}=(0,f.z)(),[i,c]=(0,o.useState)("chat"),[g,w]=(0,o.useState)(!1),y=(0,o.useCallback)(e=>{c(e),n(e)},[n]);return(0,o.useEffect)(()=>
74{if(!g)return;let e=e=>"Escape"===e.key&&w(!1);return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[g]),(0,s.jsxs)("div",{className:(0,p.cn)("flex flex-col overflow-hidden border bg-background",g?"fixed inset-0 z-50 rounded-none":"h-[86vh] rounded-xl shadow-sm sm:h-[680px] lg:h-[760px]"),children:[(0,s.jsxs)("div",{className:"flex h-12 shrink-0 items-center gap-3 border-b bg-card px-3 sm:px-4",children:[(0,s.jsx)("div",{className:(0,p.cn)("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg",t.iconBg),children:(0,s.jsx)(t.Icon,{className:"h-3.5 w-3.5"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium leading-tight",children:t.agentName}),(0,s.jsx)("p",{className:"truncate text-[11px] leading-tight text-muted-foreground",children:t.industry})]}),(0,s.jsx)(H.dM,{className:"hidden sm:inline-flex"}),(0,s.jsxs)(h.$,{variant:"ghost",size:"sm",onClick:r,title:"Clear this demo and start fresh",className:"h-8 px-2 text-muted-foreground",children:[(0,s.jsx)(l.A,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"ml-1.5 hidden sm:inline",children:"Reset"})]}),(0,s.jsx)(h.$,{variant:"ghost",size:"sm",onClick:()=>w(e=>!e),title:g?"Exit full screen (Esc)":"Full screen",className:"h-8 px-2 text-muted-foreground",children:g?(0,s.jsx)(d,{className:"h-3.5 w-3.5"}):(0,s.jsx)(u,{className:"h-3.5 w-3.5"})})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,s.jsxs)("nav",{className:"hidden w-48 shrink-0 flex-col gap-0.5 border-r bg-card p-2 sm:flex",children:[ea.map(({id:e,label:t,icon:o})=>(0,s.jsxs)("button",{type:"button",onClick:()=>y(e),className:(0,m.H)(i===e),children:[(0,s.jsx)(o,{className:"h-4 w-4 shrink-0"}),t,(a[e]??0)>0&&e!==i&&(0,s.jsx)("span",{className:"ml-auto flex h-4 min-w-4 items-center justify-center rounded-full bg-brand px-1 text-[10px] font-semibold tabular-nums text-brand-foreground motion-safe:animate-badge-pop",children:(a[e]??0)>9?"9+":a[e]})]},e)),(0,s.jsx)("p",{className:"mt-auto px-3 py-2 text-[11px] leading-relaxed text-muted-foreground",children:"Integrations and
74Settings are part of the product but aren't shown in this demo."})]}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,s.jsx)("div",{className:"flex shrink-0 gap-1 overflow-x-auto border-b bg-card px-2 py-1.5 sm:hidden",children:ea.map(({id:e,label:t,icon:o})=>(0,s.jsxs)("button",{type:"button",onClick:()=>y(e),className:(0,p.cn)("flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",i===e?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:bg-accent"),children:[(0,s.jsx)(o,{className:"h-3.5 w-3.5"}),t,(a[e]??0)>0&&e!==i&&(0,s.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-brand"})]},e))}),(0,s.jsxs)("div",{className:"min-h-0 flex-1",children:[(0,s.jsx)("div",{className:(0,p.cn)("h-full","chat"!==i&&"hidden"),children:(0,s.jsx)(q,{onLeadMoment:e})}),"flow"===i&&(0,s.jsx)(et,{}),"files"===i&&(0,s.jsx)(ee,{})]})]})]})]})}}}]);
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.