(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,908636,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(618566),i=e.i(311901),r=e.i(975157);function o({size:e=500,className:a,opacity:n=.12}){return(0,t.jsx)("div",{className:(0,r.f)("absolute pointer-events-none rounded-full",a),"aria-hidden":"true",style:{width:e,height:e,background:"radial-gradient(circle, var(--gradient-start) 0%, var(--gradient-end) 40%, transparent 70%)",opacity:n,filter:`blur(${.3*e}px)`}})}function s({className:e,spacing:a=32,color:n="currentColor",opacity:i=.04}){let o=encodeURIComponent(n),l=``;return(0,t.jsx)("div",{className:(0,r.f)("absolute inset-0 pointer-events-none",e),"aria-hidden":"true",style:{opacity:i,backgroundImage:`url("data:image/svg+xml,${l}")`,backgroundSize:`${a}px ${a}px`}})}var l=e.i(896507);let d={tier:"tier",role:"role",industry:"industry",skill:"skill",cert:"cert",utm_source:"utmSource",utm_medium:"utmMedium",utm_campaign:"utmCampaign",utm_term:"utmTerm",utm_content:"utmContent",gclid:"gclid",wbraid:"wbraid",gbraid:"gbraid",msclkid:"msclkid",li_fat_id:"liFatId"};function c(e){return e instanceof URLSearchParams?e:new URLSearchParams(e.startsWith("?")?e.slice(1):e)}function m(e){let t=c(e),a={};for(let[e,n]of Object.entries(d)){let i=t.get(e);i&&(a[n]=i)}return a}function u(e,t){let a=c(e),n=a.get(l.q);return{intent:n?(0,l.Z)(n,t):t,initialSeats:(0,l.B)({seats:a.get(l.J),tier:a.get("tier")}),context:m(a)}}Object.values(d),[l.q,l.J,...Object.keys(d)];var h=e.i(768877),p=e.i(268863),f=e.i(206917),b=e.i(749803),x=e.i(271567),g=e.i(226091),y=e.i(584026),N=e.i(456420);let v=(0,N.f)("user-round",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);var j=e.i(882303),w=e.i(290684),C=e.i(100207);let k={demo:{ariaLabel:"What your team training demo covers",heading:"What we'll cover",lede:"The workflows, reporting, and rollout path that matter to your organization, in one working session.",items:[{icon:b.f,title:"Admin visibility",description:"Reporting for learning activity, completions, playlist enrollments, and per-team training progress."},{icon:j.f,title:"Team rollout",description:"Seats, groups, SSO, manager access, and how to structure learning paths for your IT team."},{icon:x.f,title:"IT Trainerbot",description:`Every engineer on a Teams account gets unlimited answers ${w.n.onMobileAndIn} the CBT Nuggets platform, each one citing its source video.`}]},quote:{ariaLabel:"What happens after you request a quote",heading:"What happens next",lede:"Your request goes straight to the team that prices it. Here is what to expect while it is on its way.",items:[{icon:g.f,title:"Your quote, emailed",description:"A priced quote for the seats you chose, sent to you within two business days, with a copy to your billing contact if you add one."},{icon:v,title:"A rep on your account",description:"Your quote comes with a named CBT Nuggets rep who adjusts the seat count and answers procurement questions before you sign."},{icon:y.f,title:"Vendor-review documents",description:"W-9, VPAT, and security documentation are in the Trust Center, so your procurement review can start before the quote lands.",link:{label:C.X,href:C.T,location:"demo-agenda:trust-center"}}]}};var S=e.i(405240),q=e.i(541872);let T=(0,a.createContext)(null);function I({initialIntent:e,children:n}){let[i]=(0,a.useState)(e),[r,o]=(0,a.useState)(e),s=(0,a.useRef)(new Set),d=(0,a.useRef)([]),c=(0,a.useRef)(!1),m=(0,a.useCallback)(e=>{(0,S.f)("contact_tab_view",{properties:{tab:e,landing_tab:i,page:window.location.pathname}})},[i]);(0,a.useEffect)(()=>(0,q.Z)(()=>{for(let e of(c.current=!0,d.current.splice(0)))m(e)}),[m]),(0,a.useEffect)(()=>{s.current.has(r)||(s.current.add(r),c.current?m(r):d.current.push(r))},[m,r]),(0,a.useEffect)(()=>{let e=new URL(window.location.href),t=l.U[r];if(e.pathname===t)return;e.pathname=t;let a=e.search.replace(/^\?/,"").split("&").filter(e=>""!==e&&!e.startsWith(`${l.q}=`)&&e!==l.q);e.search=a.length?`?${a.join("&")}`:"",window.history.replaceState(null,"",e.toString())},[r]);let u=(0,a.useCallback)(e=>{o(t=>t===e?t:((0,S.f)("contact_tab_switch",{properties:{from_tab:t,to_tab:e,landing_tab:i,page:window.location.pathname}}),e))},[i]),h=(0,a.useMemo)(()=>({intent:r,initialIntent:i,switchTo:u}),[r,i,u]);return(0,t.jsx)(T.Provider,{value:h,children:n})}function U(){let e=(0,a.useContext)(T);if(!e)throw Error("useContactIntent must be used inside — the /demo page wraps the hero column and the tab shell in one.");return e}function M({mobileApp:e}){let{intent:a}=U(),n=k[a];return(0,t.jsx)("section",{className:"section-padding bg-background","aria-label":n.ariaLabel,"data-testid":"contact-agenda","data-intent":a,children:(0,t.jsxs)("div",{className:"mx-auto max-w-6xl px-6",children:[(0,t.jsx)(i.f,{children:(0,t.jsxs)("div",{className:"mx-auto max-w-3xl text-center",children:[(0,t.jsx)("h2",{className:"font-display text-h2",children:n.heading},a),(0,t.jsx)("p",{className:"text-body-lg mt-4 text-muted-foreground",children:n.lede})]})}),(0,t.jsx)("div",{className:"mt-10 grid gap-4 md:grid-cols-3",children:n.items.map((a,n)=>{let r=(0,w.I)(a.description,e),o=a.icon;return(0,t.jsx)(i.f,{delay:70*n,children:(0,t.jsx)("div",{className:"h-full rounded-2xl border border-cbt-100 bg-white p-5 shadow-sm",children:(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:"flex size-11 shrink-0 items-center justify-center rounded-xl bg-cbt-50 text-cbt-600",children:(0,t.jsx)(o,{className:"size-5"})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[(0,t.jsx)("h3",{className:"font-display text-xl",children:a.title}),(0,f.w)(a.title)&&(0,t.jsx)(f.y,{surface:"demo-agenda"}),a.link&&(0,t.jsxs)(p.TrackedLink,{href:a.link.href,location:a.link.location,external:!0,className:"inline-flex items-center gap-1 whitespace-nowrap rounded-sm align-middle font-sans text-sm font-semibold tracking-normal text-cbt-700 underline-offset-4 hover:text-cbt-900 hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-cbt-700",children:[a.link.label,(0,t.jsx)(h.f,{className:"size-3.5","aria-hidden":"true"})]})]}),(0,t.jsx)("p",{className:"mt-1 text-base leading-6 text-muted-foreground",children:r})]})]})})},a.title)})},a)]})})}var A=e.i(551757);let P={demo:{headline:"See how your IT team proves progress before skills gaps become risk.",lede:"In one focused demo we show IT leaders how CBT Nuggets fits your team size, certification goals, and compliance requirements — with the admin reporting that proves progress.",chips:["Admin reporting and audit exports","Certification paths and virtual labs","SSO, groups, and playlist rollout",`IT Trainerbot ${w.n.inPlatformAndMobile}`]},quote:{headline:"Request a quote for your team.",lede:"Tell us how many seats and where to send it. Your quote — the per-seat figure IT leaders and procurement can approve — is emailed within two business days.",chips:["Quote emailed within two business days","Per-seat, billed annually","Add seats any time","W-9, VPAT, and security docs in the Trust Center"]}};function z({mobileApp:e}){let{intent:a}=U(),n=P[a];return(0,t.jsxs)("div",{"data-testid":"contact-hero","data-intent":a,children:[(0,t.jsx)("h1",{className:"font-display text-h1 max-w-3xl text-white",children:n.headline}),(0,t.jsx)("p",{className:"text-body-lg mt-4 max-w-2xl text-cbt-100",children:n.lede}),(0,t.jsx)("div",{className:"animate-swap-fade-in mt-6 grid gap-3 sm:grid-cols-2",style:{animationDelay:"140ms"},children:n.chips.map(t=>(0,w.I)(t,e)).map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/15 bg-white/[0.07] px-4 py-2 text-sm font-medium text-cbt-50 backdrop-blur",children:[(0,t.jsx)(A.f,{className:"size-4 shrink-0 text-success-500"}),(0,t.jsx)("span",{children:(0,f.l)(e,{surface:"demo-hero-chip",tone:"dark"})})]},e))},a),(0,t.jsxs)("p",{className:"mt-6 text-base font-medium text-cbt-200",children:["Training IT teams since ",C.o.founded,"."]})]})}var $=e.i(677572),L=e.i(522016);let E=(0,N.f)("calendar",[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]]);var F=e.i(570590),B=e.i(46353),R=e.i(445105);function O(){let e=(0,a.useRef)(null);return(0,a.useCallback)(t=>(e.current=function(e,t,a=function(){if("u">typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=15&e[6]|64,e[8]=63&e[8]|128;let t=Array.from(e,e=>e.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}){return e&&e.fingerprint===t?e:{fingerprint:t,id:a()}}(e.current,JSON.stringify(Object.keys(t).sort().reduce((e,a)=>{let n=t[a];return void 0===n||(e[a]=n),e},{}))),e.current.id),[])}var K=e.i(245035);let G=["tier","role","industry","skill"];function W(e){let t=e.replace(/^#/,"");if(!t)return{};let a=new URLSearchParams(t),n={};for(let e of G){let t=a.get(e);t&&(n[e]=t)}return n}var D=e.i(311063),H=e.i(592970),V=e.i(19477),Y=e.i(793479);let _="We’ve created your request in our CRM. Pick a time below and your demo is booked on the spot, or we’ll follow up within one business day.",J="We’ve created your request in our CRM. A member of the CBT Nuggets sales team will follow up within one business day to schedule your demo.";var Z=e.i(474544);let Q="We couldn't book that time. Please try again, or pick another.";function X(e,t){return new Intl.DateTimeFormat("en-US",{timeZone:t,weekday:"short",month:"short",day:"numeric"}).format(new Date(e))}function ee(e,t){return new Intl.DateTimeFormat("en-US",{timeZone:t,hour:"numeric",minute:"2-digit"}).format(new Date(e))}function et(e){try{let t=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"short"}).formatToParts(new Date).find(e=>"timeZoneName"===e.type)?.value;return t?`${t} (${e.replace(/_/g," ")})`:e}catch{return e}}function ea({agent:e,size:a="size-14"}){let n;return e.photoUrl?(0,t.jsx)("img",{src:e.photoUrl,alt:"",className:(0,r.f)("mx-auto rounded-full object-cover ring-2 ring-white",a)}):(0,t.jsx)("span",{"aria-hidden":"true","data-testid":"demo-agent-initials",className:(0,r.f)("mx-auto flex items-center justify-center rounded-full bg-cbt-100 text-base font-semibold text-cbt-800 ring-2 ring-white",a),children:(n=e.name.trim().split(/\s+/).filter(Boolean),((n[0]?.[0]??"")+(n.length>1?n[n.length-1][0]??"":"")).toUpperCase())})}let en="rounded-full border px-3 py-1.5 text-sm font-medium transition-colors focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2",ei="border-cbt-200 bg-white text-foreground hover:border-cbt-400";function er({contactId:e,availability:n,timeZone:i=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}catch{return"UTC"}}(),onBooked:o}){let[s,l]=(0,a.useState)(n.slots),[d,c]=(0,a.useState)({kind:"times"}),[m,u]=(0,a.useState)(null),h=(0,a.useMemo)(()=>(function(e,t){let a=new Map;for(let n of e){let e=function(e,t){let a=new Intl.DateTimeFormat("en-CA",{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(new Date(e)),n=e=>a.find(t=>t.type===e)?.value??"";return`${n("year")}-${n("month")}-${n("day")}`}(n.start,t),i=a.get(e);i||(i={key:e,label:X(n.start,t),slots:[]},a.set(e,i)),i.slots.push(n)}return Array.from(a.values())})(s,i),[s,i]),[p,f]=(0,a.useState)(null),b=(0,a.useMemo)(()=>new Map(n.agents.map(e=>[e.crmUserId,e])),[n.agents]),x=(0,a.useRef)(null),g=(0,a.useRef)(null),y=(0,a.useRef)(!1),N=(0,a.useRef)(null);(0,a.useEffect)(()=>{"choose"===d.kind&&x.current?.focus()},[d]);let v=(0,a.useCallback)(e=>{u(null),(0,D.p)("demo-success-slot-pick",window.location.pathname),c({kind:"choose",slot:e})},[]),j=(0,a.useCallback)(()=>{c({kind:"times"}),requestAnimationFrame(()=>g.current?.focus())},[]),w=(0,a.useCallback)(async(t,a)=>{if(y.current)return;let n=a?b.get(a):null;(0,D.p)(`demo-success-book:${n?n.id:"first-available"}`,window.location.pathname),c({kind:"booking",slot:t,agentId:a}),u(null);let r=N.current,s=r&&r.start===t.start&&r.agentId===a?r.key:crypto.randomUUID();N.current={start:t.start,agentId:a,key:s};try{let n=await fetch("/api/teams/demo/book",{method:"POST",headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json","Idempotency-Key":s},body:JSON.stringify({contactId:e,start:t.start,agentId:a,timezone:i})}),r=await n.json().catch(()=>null);if(201===n.status&&r?.agent&&r.booking){y.current=!0;let e={agent:r.agent,start:r.booking.start,end:r.booking.end,conferenceLink:r.booking.conferenceLink??null};(0,D.p)(`demo-success-booked:${r.agent.id}`,window.location.pathname),c({kind:"booked",result:e}),o?.(e);return}if(409===n.status||404===n.status){l(e=>{var n;return n=t.start,e.flatMap(e=>{if(e.start!==n)return[e];if(null===a)return[];let t=e.agentIds.filter(e=>e!==a);return t.length>0?[{...e,agentIds:t}]:[]})}),u("That time was just taken. Please pick another."),c({kind:"times"}),requestAnimationFrame(()=>g.current?.focus());return}u(Q),c({kind:"choose",slot:t})}catch{u(Q),c({kind:"choose",slot:t})}},[b,e,o,i]);if("booked"===d.kind){let{result:e}=d;return(0,t.jsxs)("div",{className:"mt-7 rounded-2xl bg-white p-5 text-left shadow-sm","data-testid":"demo-booked",role:"status","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-success-700",children:[(0,t.jsx)(A.f,{className:"size-4"}),"Your demo is booked"]}),(0,t.jsxs)("div",{className:"mt-4 flex items-center gap-4",children:[(0,t.jsx)(ea,{agent:e.agent,size:"size-16"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-base font-semibold text-foreground",children:e.agent.name}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.agent.title}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-foreground",children:[X(e.start,i)," at ",ee(e.start,i),(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" · ",et(i)]})]})]})]}),(0,t.jsxs)("p",{className:"mt-4 text-sm text-muted-foreground",children:["A calendar invite and a confirmation email are on their way.",e.conferenceLink?(0,t.jsxs)(t.Fragment,{children:[" ","Join link:"," ",(0,t.jsxs)("a",{href:e.conferenceLink,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-cbt-600 underline-offset-4 hover:underline",children:["open the meeting room",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),"."]}):null]})]})}if("choose"===d.kind||"booking"===d.kind){let e=d.slot,a=e.agentIds.map(e=>b.get(e)).filter(e=>!!e),n="booking"===d.kind,r=`${X(e.start,i)} at ${ee(e.start,i)}`;return(0,t.jsxs)("div",{className:"mt-7 rounded-2xl bg-white p-5 text-left shadow-sm","data-testid":"demo-choose-agent",children:[(0,t.jsx)("h3",{ref:x,tabIndex:-1,className:"text-base font-semibold text-foreground focus:outline-none",children:1===a.length?"Confirm your demo":"Who would you like to meet?"}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:[r," · ",F.P," minutes"]}),m&&(0,t.jsx)("p",{role:"alert",className:"mt-3 rounded-lg bg-red-50 p-3 text-sm text-red-700",children:m}),1===a.length?(0,t.jsxs)("div",{className:"mt-4 flex items-center gap-4","data-testid":"demo-single-agent",children:[(0,t.jsx)(ea,{agent:a[0],size:"size-16"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-base font-semibold text-foreground",children:a[0].name}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:a[0].title})]}),(0,t.jsx)("button",{type:"button",disabled:n,onClick:()=>void w(e,a[0].crmUserId),className:"btn-gradient min-h-11 rounded-full px-5 text-sm font-semibold text-white disabled:cursor-not-allowed disabled:opacity-60 focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2",children:n?"Booking…":`Confirm with ${a[0].name}`})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",disabled:n,onClick:()=>void w(e,null),className:"btn-gradient mt-4 min-h-12 w-full rounded-full px-5 text-base font-semibold text-white disabled:cursor-not-allowed disabled:opacity-60 focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2",children:n&&null===d.agentId?"Booking…":"No preference — first available"}),(0,t.jsx)("p",{className:"mt-4 text-sm font-semibold text-cbt-800",children:"Or choose your account executive"}),(0,t.jsx)("ul",{className:"mt-2 grid list-none gap-3 p-0 sm:grid-cols-2",role:"list",children:a.map(a=>(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",disabled:n,onClick:()=>void w(e,a.crmUserId),"aria-label":`Book with ${a.name}`,className:"group block w-full rounded-xl border border-cbt-100 bg-background-alt p-4 text-center transition-all hover:border-cbt-300 hover:bg-white hover:shadow-md disabled:cursor-not-allowed disabled:opacity-60 focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2",children:[(0,t.jsx)(ea,{agent:a}),(0,t.jsx)("p",{className:"mt-2 text-sm font-semibold text-foreground",children:a.name}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:a.title})]})},a.id))})]}),(0,t.jsx)("button",{type:"button",disabled:n,onClick:j,className:"mt-4 text-sm font-medium text-cbt-600 underline-offset-4 hover:underline disabled:opacity-60",children:"Change time"})]})}let C=h.find(e=>e.key===p)??h[0]??null;return(0,t.jsxs)("div",{className:"mt-7 rounded-2xl bg-white p-4 text-left shadow-sm","data-testid":"demo-slot-picker",children:[(0,t.jsxs)("h3",{ref:g,tabIndex:-1,className:"mb-1 flex items-center gap-2 text-sm font-semibold text-cbt-800 focus:outline-none",children:[(0,t.jsx)(E,{className:"size-4 text-cbt-600"}),"Pick a time for your ",F.P,"-minute demo"]}),(0,t.jsxs)("p",{className:"mb-4 text-xs text-muted-foreground",children:["Times shown in ",et(i),"."]}),m&&(0,t.jsx)("p",{role:"alert",className:"mb-3 rounded-lg bg-amber-50 p-3 text-sm text-amber-800",children:m}),0===h.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"demo-no-slots",children:"No open times are left in the next few weeks. A member of the CBT Nuggets sales team will follow up within one business day to schedule your demo."}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"flex gap-2 overflow-x-auto pb-2",role:"group","aria-label":"Date",children:h.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":e.key===C?.key,onClick:()=>f(e.key),className:(0,r.f)(en,"shrink-0",e.key===C?.key?"border-cbt-600 bg-cbt-600 text-white":ei),children:e.label},e.key))}),C&&(0,t.jsx)("div",{className:"mt-3",role:"group","aria-label":`Times on ${C.label}`,children:(0,t.jsx)("ul",{className:"grid list-none grid-cols-3 gap-2 p-0 sm:grid-cols-4",role:"list",children:C.slots.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("button",{type:"button",onClick:()=>v(e),className:(0,r.f)(en,ei,"flex w-full items-center justify-center gap-1 tabular-nums"),children:[(0,t.jsx)(Z.f,{className:"size-3.5 text-cbt-600","aria-hidden":"true"}),ee(e.start,i)]})},e.start))})})]})]})}let eo={progress:"Sending your request to our team… Please keep this page open.",slow:"This is taking longer than expected. We're still sending your request — please keep this page open."};function es(e){let[t,n]=(0,a.useState)("idle"),[i,r]=(0,a.useState)(e);return i!==e&&(r(e),n("idle")),(0,a.useEffect)(()=>{if(!e)return;let t=window.setTimeout(()=>n("progress"),2e3),a=window.setTimeout(()=>n("slow"),8e3);return()=>{window.clearTimeout(t),window.clearTimeout(a)}},[e]),e?t:"idle"}function el({stage:e,submitting:a=!1,className:n}){let i="idle"===e?null:eo[e];return(0,t.jsx)("p",{role:"status","aria-live":"polite","data-testid":"lead-submit-status","data-stage":e,className:(0,r.f)("text-center text-sm text-muted-foreground",(a||i)&&"mt-3 min-h-10",n),children:i})}let ed={firstName:"",lastName:"",email:"",company:"",companyUrl:"",title:"",quantity:"",notes:"",internalTrainingInterest:!1,phone:"",marketingOptIn:!1,honeypot:""},ec=new Set(["firstName","lastName","email","company","companyUrl","title","quantity","phone","notes"]),em={firstName:100,lastName:100,email:254,company:200,companyUrl:500,title:160,phone:60,notes:500},eu=new Set(["firstName","lastName","email","company","companyUrl"]);function eh(e){let t=e.trim();return t?/^https?:\/\//i.test(t)?t:`https://${t}`:""}function ep(e){try{return!!new URL(eh(e)).hostname.includes(".")}catch{return!1}}function ef(e,t){return t.trim().length>em[e]}function eb(e){let t,a={};if(e.firstName.trim()?ef("firstName",e.firstName)&&(a.firstName=`First name must be ${em.firstName} characters or fewer`):a.firstName="First name is required",e.lastName.trim()?ef("lastName",e.lastName)&&(a.lastName=`Last name must be ${em.lastName} characters or fewer`):a.lastName="Last name is required",e.email.trim()){var n;n=e.email,(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)||ef("email",e.email))&&(a.email="Please enter a valid email address")}else a.email="Work email is required";return e.companyUrl.trim()?(!ep(e.companyUrl)||ef("companyUrl",eh(e.companyUrl)))&&(a.companyUrl="Please enter a valid company website"):a.companyUrl="Company website is required",e.company.trim()?ef("company",e.company)&&(a.company=`Company name must be ${em.company} characters or fewer`):a.company="Company name is required",ef("title",e.title)&&(a.title=`Job title must be ${em.title} characters or fewer`),e.quantity.trim()?(t=e.quantity.trim(),/^\d{1,6}$/.test(t)&&Number(t)>=1||(a.quantity=`Team size must be a whole number between 1 and ${eN.toLocaleString("en-US")}`)):a.quantity="IT team size is required",ef("phone",e.phone)&&(a.phone=`Phone must be ${em.phone} characters or fewer`),ef("notes",e.notes)&&(a.notes=`Notes must be ${em.notes} characters or fewer`),a}let ex="border-red-500 focus-visible:ring-red-500/20 aria-invalid:border-red-500",eg="border-border",ey="mt-0.5 size-4 rounded border-cbt-200 accent-cbt-500",eN=999999;function ev(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>!!e))}function ej(e){return e.split(/[-_]/).filter(Boolean).map(e=>e[0]?.toUpperCase()+e.slice(1)).join(" ")}function ew(){return ev({...m(window.location.search),currentUrl:window.location.href,referrer:document.referrer})}async function eC(){try{let e=await fetch("/api/teams/demo/agents",{cache:"no-store"});if(!e.ok)return{status:"unavailable"};let t=await e.json().catch(()=>null);if(!t||!Array.isArray(t.agents))return{status:"unavailable"};let a=t.agents.filter(e=>"object"==typeof e&&null!==e&&"string"==typeof e.id&&"string"==typeof e.name&&"string"==typeof e.scheduleUrl);return{status:"ready",agents:a}}catch{return{status:"unavailable"}}}async function ek(){try{let e=await fetch("/api/teams/demo/availability",{cache:"no-store"});if(!e.ok)return{status:"unavailable"};let t=await e.json().catch(()=>null);if(!t||!Array.isArray(t.agents)||!Array.isArray(t.slots))return{status:"unavailable"};return{status:"ready",availability:{durationMinutes:"number"==typeof t.durationMinutes?t.durationMinutes:F.P,agents:t.agents,slots:t.slots}}}catch{return{status:"unavailable"}}}function eS(e){return 1===Number(e.trim())}async function eq(e){let t=await fetch("/api/teams/demo/company-name",{method:"POST",headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},body:JSON.stringify({companyUrl:eh(e)})});if(!t.ok)return null;let a=await t.json().catch(()=>null);return a?.companyName?.trim()||null}function eT({initialContext:e={},initialIdentity:n,onIdentityChange:i,onSubmitted:o,turnstileSiteKey:s=null,unstyled:l=!1}){let{onFormFocusCapture:d,trackSubmitSuccess:c,markSubmitStarted:m,trackDuplicateSubmitAttempt:u}=(0,B.f)("teams_demo"),h=O(),p=(0,a.useRef)(null),f=(0,a.useCallback)(e=>{p.current=e},[]),{captureEmail:b}=(0,H.f)(),[x,g]=(0,a.useState)(()=>({...ed,...n})),[y,N]=(0,a.useState)({}),[v,j]=(0,a.useState)(!1),w=es(v),k=(0,a.useRef)(!1),[S,q]=(0,a.useState)(!1),[T,I]=(0,a.useState)(null),[U,M]=(0,a.useState)(null),[P,z]=(0,a.useState)({status:"loading"}),$=(0,a.useRef)(!1),G=(0,a.useCallback)(()=>{$.current||($.current=!0,eC().then(e=>{z(e),"unavailable"===e.status&&($.current=!1)}))},[]),[Z,Q]=(0,a.useState)({status:"loading"}),X=(0,a.useRef)(!1),ee=(0,a.useCallback)(()=>{X.current||(X.current=!0,ek().then(e=>{Q(e),"unavailable"===e.status&&(X.current=!1)}))},[]),[et,ea]=(0,a.useState)("idle"),en=function(){let[e]=(0,a.useState)(()=>{let e=null,t=()=>(null===e&&Object.keys(W(window.location.hash)).length>0&&(e=window.location.hash),e??"");return{subscribe(a){let n=()=>{let n=e;t(),e!==n&&a()};return window.addEventListener("hashchange",n),()=>window.removeEventListener("hashchange",n)},getSnapshot:t,getServerSnapshot:()=>""}});return(0,a.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot)}(),ei=(0,a.useMemo)(()=>({...W(en),...e}),[en,e]),eo=x.firstName||x.lastName||x.email||x.company||x.companyUrl||x.title||x.quantity||x.notes||x.phone;(0,a.useEffect)(()=>{let e=e=>{eo&&!S&&e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[eo,S]);let ef=(0,a.useCallback)(e=>{let{name:t}=e.target,a=e.target instanceof HTMLInputElement&&"checkbox"===e.target.type?e.target.checked:e.target.value;g(e=>({...e,[t]:a})),eu.has(t)&&"string"==typeof a&&i?.({[t]:a}),"email"===t&&"string"==typeof a&&b(a),"companyUrl"===t&&ea("idle"),N(e=>{if(e[t]){let a={...e};return delete a[t],a}return e})},[b,i]),eI=(0,a.useCallback)(async e=>{let{name:t}=e.target,a=eb(x);if(a[t]&&N(e=>({...e,[t]:a[t]})),"companyUrl"===t&&!x.company.trim()&&ep(x.companyUrl)){let e=x.companyUrl;ea("loading");try{let t=await eq(e);if(!t)return void ea("not-found");g(a=>a.company.trim()||a.companyUrl!==e?a:(i?.({company:t}),{...a,company:t})),N(e=>{if(!e.company)return e;let t={...e};return delete t.company,t}),ea("found")}catch{ea("not-found")}}},[i,x]),eU=(0,a.useCallback)(async e=>{if(e.preventDefault(),k.current)return void u();I(null);let t=e.currentTarget;if(x.honeypot)return;let a=eb(x);if(Object.keys(a).length>0){N(a),(0,R.f)(t);return}k.current=!0,m(),j(!0),eS(x.quantity)||(ee(),G());let n=()=>{c(),(0,V.M)({email:x.email,phone:x.phone,jobTitle:x.title,company:x.company,numberOfEmployees:x.quantity})};try{let e={...x,companyUrl:eh(x.companyUrl)},a=await p.current?.waitForToken()??void 0,i=await fetch("/api/teams/demo",{method:"POST",headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},body:JSON.stringify({...e,submissionId:h(e),turnstileToken:a,context:ev({...ei,...ew()})})}),r=await i.json().catch(()=>null);if(!i.ok){i.status>=500&&n(),p.current?.reset();let e=r?.field;if(400===i.status&&"string"==typeof e&&ec.has(e)){let a={};a[e]=r?.fieldError??r?.error??"Please check this field",N(a),(0,R.f)(t);return}I(r?.error??"We couldn't send your request. Please try again or call us directly.");return}n(),M(r?.contactId??null),q(!0),o?.()}catch{n(),I("We couldn't send your request. Please try again or call us directly.")}finally{k.current=!1,j(!1)}},[ei,o,G,ee,h,x,m,u,c]),eM=[ei.tier?`Tier: ${ej(ei.tier)}`:null,ei.role?`Role: ${ej(ei.role)}`:null,ei.industry?`Industry: ${ej(ei.industry)}`:null,ei.skill?`Skill: ${ej(ei.skill)}`:null].filter(e=>!!e);return(0,t.jsx)("div",{className:(0,r.f)(!l&&"rounded-[2rem] border border-cbt-100 bg-white p-3 shadow-xl shadow-cbt-900/5 md:p-4"),children:S?(0,t.jsxs)("div",{className:"rounded-[1.5rem] bg-green-50 p-6 text-center",role:"status","aria-live":"polite",children:[(0,t.jsx)("div",{className:"mx-auto mb-4 flex size-14 items-center justify-center rounded-full bg-white shadow-sm",children:(0,t.jsx)(A.f,{className:"size-7 text-success-600"})}),(0,t.jsx)("h2",{className:"font-display text-h3",children:"Your demo request is in."}),U&&eS(x.quantity)?(0,t.jsx)("p",{className:"mt-3 text-base leading-7 text-muted-foreground","data-testid":"demo-success-crm-copy",children:J}):U&&"ready"===Z.status&&Z.availability.slots.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mt-3 text-base leading-7 text-muted-foreground","data-testid":"demo-success-crm-copy",children:_}),(0,t.jsx)(er,{contactId:U,availability:Z.availability})]}):U&&"loading"===Z.status?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mt-3 text-base leading-7 text-muted-foreground","data-testid":"demo-success-crm-copy",children:_}),(0,t.jsxs)("div",{className:"mt-7 rounded-2xl bg-white p-4 text-left shadow-sm","data-testid":"demo-success-availability-loading",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2 text-sm font-semibold text-cbt-800",children:[(0,t.jsx)(E,{className:"size-4 text-cbt-600"}),"Pick a time for your demo"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Finding the earliest available demo times…"})]})]}):U?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"mt-3 text-base leading-7 text-muted-foreground","data-testid":"demo-success-crm-copy",children:"unavailable"===P.status||"ready"===P.status&&0===P.agents.length?J:"We’ve created your request in our CRM. Pick a time with one of our account executives now, or we’ll follow up within one business day."}),"loading"===P.status&&(0,t.jsxs)("div",{className:"mt-7 rounded-2xl bg-white p-4 text-left shadow-sm","data-testid":"demo-success-agents-loading",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2 text-sm font-semibold text-cbt-800",children:[(0,t.jsx)(E,{className:"size-4 text-cbt-600"}),"Schedule your demo now"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Finding available account executives…"})]}),"ready"===P.status&&P.agents.length>0&&(0,t.jsxs)("div",{className:"mt-7 rounded-2xl bg-white p-4 text-left shadow-sm",children:[(0,t.jsxs)("div",{className:"mb-4 flex items-center gap-2 text-sm font-semibold text-cbt-800",children:[(0,t.jsx)(E,{className:"size-4 text-cbt-600"}),"Schedule your demo now"]}),(0,t.jsx)("ul",{className:"grid list-none gap-3 p-0 sm:grid-cols-2",role:"list",children:P.agents.map(e=>{let a;return(0,t.jsx)("li",{children:(0,t.jsxs)("a",{href:function(e,t,a){try{let n=new URL(e);t&&n.searchParams.set("contactId",t),n.searchParams.set("meetingType","demo");let i=a.notes.trim();return i&&n.searchParams.set("demoFocus",i),a.quantity&&n.searchParams.set("teamSize",a.quantity),n.toString()}catch{return e}}(e.scheduleUrl,U,x),target:"_blank",rel:"noopener noreferrer",onClick:()=>{(0,D.p)(`demo-success-schedule:${e.id}`,window.location.pathname)},className:"group block rounded-xl border border-cbt-100 bg-background-alt p-4 text-center transition-all hover:border-cbt-300 hover:bg-white hover:shadow-md focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2","aria-label":`Schedule a demo with ${e.name}`,children:[e.photoUrl?(0,t.jsx)("img",{src:e.photoUrl,alt:"",className:"mx-auto size-14 rounded-full object-cover ring-2 ring-white transition-transform group-hover:scale-105"}):(0,t.jsx)("span",{"aria-hidden":"true","data-testid":"demo-agent-initials",className:"mx-auto flex size-14 items-center justify-center rounded-full bg-cbt-100 text-base font-semibold text-cbt-800 ring-2 ring-white transition-transform group-hover:scale-105",children:(a=e.name.trim().split(/\s+/).filter(Boolean),((a[0]?.[0]??"")+(a.length>1?a[a.length-1][0]??"":"")).toUpperCase())}),(0,t.jsx)("p",{className:"mt-2 text-sm font-semibold text-foreground",children:e.name}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.title})]})},e.id)})})]})]}):(0,t.jsx)("p",{className:"mt-3 text-base leading-7 text-muted-foreground","data-testid":"demo-success-inbox-copy",children:"Thanks. A member of the CBT Nuggets sales team will follow up within one business day to schedule your demo."}),(0,t.jsxs)("p",{className:"mt-5 text-sm text-muted-foreground",children:["Want to keep exploring first? See"," ",(0,t.jsxs)(L.default,{href:"/platform",target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-cbt-500 hover:underline",children:["platform features",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]})," ","or"," ",(0,t.jsxs)(L.default,{href:"/pricing",target:"_blank",rel:"noopener noreferrer",className:"font-semibold text-cbt-500 hover:underline",children:["team pricing",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),"."]})]}):(0,t.jsxs)("div",{className:(0,r.f)(!l&&"rounded-[1.5rem] border border-cbt-100 bg-background-alt p-5 md:p-6"),children:[(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("h2",{className:"font-display text-h3",children:"Request your team training demo"}),(0,t.jsx)("p",{className:"mt-2 text-base leading-6 text-muted-foreground",children:"Share a little context so our team can tailor the walkthrough to your training goals, reporting needs, and rollout plan."}),eM.length>0&&(0,t.jsx)("div",{className:"mt-3 flex flex-wrap gap-2",children:eM.map(e=>(0,t.jsx)("span",{className:"rounded-full border border-cbt-200 bg-white px-3 py-1 text-sm font-semibold text-cbt-700",children:e},e))})]}),(0,t.jsxs)("form",{"data-testid":"form-teams-demo",method:"post",onFocusCapture:d,onSubmit:eU,noValidate:!0,children:[T&&(0,t.jsx)("div",{className:"mb-4 rounded-lg bg-red-50 p-3 text-sm text-red-700",role:"alert","aria-live":"polite",children:T}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"firstName",className:"mb-1 block text-sm font-semibold text-foreground",children:"First Name *"}),(0,t.jsx)(Y.f,{id:"firstName",name:"firstName",type:"text",size:"lg",required:!0,"aria-required":"true","aria-invalid":!!y.firstName,"aria-describedby":y.firstName?"firstName-error":void 0,maxLength:em.firstName,autoComplete:"given-name",enterKeyHint:"next",inputMode:"text",value:x.firstName,onChange:ef,onBlur:eI,className:(0,r.f)(y.firstName?ex:eg)}),y.firstName&&(0,t.jsx)("p",{id:"firstName-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.firstName})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"lastName",className:"mb-1 block text-sm font-semibold text-foreground",children:"Last Name *"}),(0,t.jsx)(Y.f,{id:"lastName",name:"lastName",type:"text",size:"lg",required:!0,"aria-required":"true","aria-invalid":!!y.lastName,"aria-describedby":y.lastName?"lastName-error":void 0,maxLength:em.lastName,autoComplete:"family-name",enterKeyHint:"next",inputMode:"text",value:x.lastName,onChange:ef,onBlur:eI,className:(0,r.f)(y.lastName?ex:eg)}),y.lastName&&(0,t.jsx)("p",{id:"lastName-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.lastName})]})]}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("label",{htmlFor:"email",className:"mb-1 block text-sm font-semibold text-foreground",children:"Work Email *"}),(0,t.jsx)(Y.f,{id:"email",name:"email",type:"email",size:"lg",required:!0,"aria-required":"true","aria-invalid":!!y.email,"aria-describedby":y.email?"email-error":void 0,maxLength:em.email,autoComplete:"email",enterKeyHint:"next",inputMode:"email",value:x.email,onChange:ef,onBlur:eI,className:(0,r.f)(y.email?ex:eg)}),y.email&&(0,t.jsx)("p",{id:"email-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.email})]}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("label",{htmlFor:"companyUrl",className:"mb-1 block text-sm font-semibold text-foreground",children:"Company Website *"}),(0,t.jsx)(Y.f,{id:"companyUrl",name:"companyUrl",type:"text",size:"lg",required:!0,"aria-required":"true","aria-invalid":!!y.companyUrl,"aria-describedby":y.companyUrl?"companyUrl-error":void 0,maxLength:em.companyUrl,autoComplete:"url",enterKeyHint:"next",inputMode:"url",value:x.companyUrl,onChange:ef,onBlur:eI,className:(0,r.f)(y.companyUrl?ex:eg)}),y.companyUrl&&(0,t.jsx)("p",{id:"companyUrl-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.companyUrl})]}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"company",className:"mb-1 block text-sm font-semibold text-foreground",children:"Company Name *"}),(0,t.jsx)(Y.f,{id:"company",name:"company",type:"text",size:"lg",required:!0,"aria-required":"true","aria-invalid":!!y.company,"aria-describedby":y.company?"company-error":void 0,maxLength:em.company,autoComplete:"organization",enterKeyHint:"next",value:x.company,onChange:ef,onBlur:eI,className:(0,r.f)(y.company?ex:eg)}),y.company&&(0,t.jsx)("p",{id:"company-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.company}),(0,t.jsx)("p",{className:"sr-only","aria-live":"polite",children:"found"===et?"Company name filled in from the website. Edit it if needed.":""})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"title",className:"mb-1 block text-sm font-semibold text-foreground",children:"Job Title"}),(0,t.jsx)(Y.f,{id:"title",name:"title",type:"text",size:"lg",maxLength:em.title,"aria-invalid":!!y.title,"aria-describedby":y.title?"title-error":void 0,autoComplete:"organization-title",enterKeyHint:"next",value:x.title,onChange:ef,className:(0,r.f)(y.title?ex:eg)}),y.title&&(0,t.jsx)("p",{id:"title-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.title})]})]}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"quantity",className:"mb-1 block text-sm font-semibold text-foreground",children:"IT Team Size *"}),(0,t.jsx)(Y.f,{id:"quantity",name:"quantity",type:"number",size:"lg",required:!0,"aria-required":"true",min:1,max:eN,step:1,inputMode:"numeric","aria-invalid":!!y.quantity,"aria-describedby":y.quantity?"quantity-error":void 0,autoComplete:"off",enterKeyHint:"next",value:x.quantity,onChange:ef,onBlur:eI,className:(0,r.f)(y.quantity?ex:eg)}),y.quantity&&(0,t.jsx)("p",{id:"quantity-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.quantity})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"phone",className:"mb-1 block text-sm font-semibold text-foreground",children:"Phone (optional)"}),(0,t.jsx)(Y.f,{id:"phone",name:"phone",type:"tel",size:"lg",maxLength:em.phone,"aria-invalid":!!y.phone,"aria-describedby":y.phone?"phone-error":void 0,autoComplete:"tel",enterKeyHint:"next",inputMode:"tel",value:x.phone,onChange:ef,className:(0,r.f)(y.phone?ex:eg)}),y.phone&&(0,t.jsx)("p",{id:"phone-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.phone})]})]}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsxs)("label",{htmlFor:"notes",className:"mb-1 block text-sm font-semibold text-foreground",children:["Anything else we should know?",(0,t.jsx)("span",{className:"ml-1 font-normal text-muted-foreground",children:"(optional)"})]}),(0,t.jsx)("textarea",{id:"notes",name:"notes",rows:3,maxLength:em.notes,"aria-invalid":!!y.notes,"aria-describedby":y.notes?"notes-error":void 0,value:x.notes,onChange:ef,className:(0,r.f)("w-full rounded-lg border bg-background px-3 py-2 text-base text-foreground transition-colors focus:border-cbt-500 focus:outline-none focus:ring-2 focus:ring-cbt-500/20 md:text-base",y.notes?ex:eg)}),y.notes&&(0,t.jsx)("p",{id:"notes-error",role:"alert",className:"mt-1 text-sm text-red-600",children:y.notes})]}),(0,t.jsxs)("label",{className:"mt-4 flex items-start gap-3 text-sm text-foreground",children:[(0,t.jsx)("input",{type:"checkbox",name:"internalTrainingInterest",className:ey,checked:x.internalTrainingInterest,onChange:ef}),(0,t.jsxs)("span",{children:["I’m interested in"," ",(0,t.jsx)(L.default,{href:"/internal-training",target:"_blank",rel:"noopener noreferrer","aria-describedby":"internal-training-link-hint",className:"font-medium text-cbt-600 underline underline-offset-4 hover:text-cbt-700",children:"Internal Training"})]})]}),(0,t.jsx)("span",{id:"internal-training-link-hint",className:"sr-only",children:"Opens in a new tab"}),(0,t.jsxs)("div",{className:"absolute -left-[9999px] h-0 overflow-hidden opacity-0","aria-hidden":"true",children:[(0,t.jsx)("label",{htmlFor:"honeypot",children:"Do not fill this field"}),(0,t.jsx)("input",{id:"honeypot",name:"honeypot",type:"text",tabIndex:-1,autoComplete:"off",value:x.honeypot,onChange:ef})]}),(0,t.jsxs)("label",{className:"mt-3 flex items-start gap-3 text-sm text-foreground",children:[(0,t.jsx)("input",{type:"checkbox",name:"marketingOptIn",className:ey,checked:x.marketingOptIn,onChange:ef}),(0,t.jsx)("span",{children:"Send me CBT Nuggets team training resources and product updates. Unsubscribe any time."})]}),s&&(0,t.jsx)(K.f,{siteKey:s,action:"demo",onReady:f}),(0,t.jsx)("button",{type:"submit",disabled:v,className:(0,r.f)("btn-gradient mt-5 min-h-12 w-full rounded-full py-3 text-base font-semibold text-white transition-opacity","focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2","disabled:cursor-not-allowed disabled:bg-muted-foreground"),children:v?"Scheduling...":"Schedule Your Demo"}),(0,t.jsxs)("p",{className:"mt-3 text-center text-base font-medium text-balance text-foreground",children:["A ",F.P,"-minute walkthrough with a training specialist, built around your team."]}),(0,t.jsx)(el,{stage:w,submitting:v}),(0,t.jsxs)("p",{className:"mt-3 text-base leading-6 text-muted-foreground",children:["By submitting this form, you agree to our"," ",(0,t.jsxs)(L.default,{href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-cbt-600 underline-offset-4 hover:underline",children:["Privacy Policy",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),". Prefer to talk now? Call"," ",(0,t.jsx)("a",{href:C.o.phoneHref,"aria-label":`Call ${C.o.name} sales, ${C.o.phone}`,className:"font-medium text-cbt-600 underline-offset-4 hover:underline",children:C.o.phone}),"."]})]})]})})}let eI=(0,N.f)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);var eU=e.i(77071);let eM=[{code:"US",name:"United States"},{code:"CA",name:"Canada"},{code:"GB",name:"United Kingdom"},{code:"AU",name:"Australia"},{code:"AF",name:"Afghanistan"},{code:"AX",name:"Åland Islands"},{code:"AL",name:"Albania"},{code:"DZ",name:"Algeria"},{code:"AS",name:"American Samoa"},{code:"AD",name:"Andorra"},{code:"AO",name:"Angola"},{code:"AI",name:"Anguilla"},{code:"AG",name:"Antigua & Barbuda"},{code:"AR",name:"Argentina"},{code:"AM",name:"Armenia"},{code:"AW",name:"Aruba"},{code:"AT",name:"Austria"},{code:"AZ",name:"Azerbaijan"},{code:"BS",name:"Bahamas"},{code:"BH",name:"Bahrain"},{code:"BD",name:"Bangladesh"},{code:"BB",name:"Barbados"},{code:"BY",name:"Belarus"},{code:"BE",name:"Belgium"},{code:"BZ",name:"Belize"},{code:"BJ",name:"Benin"},{code:"BM",name:"Bermuda"},{code:"BT",name:"Bhutan"},{code:"BO",name:"Bolivia"},{code:"BA",name:"Bosnia & Herzegovina"},{code:"BW",name:"Botswana"},{code:"BR",name:"Brazil"},{code:"IO",name:"British Indian Ocean Territory"},{code:"VG",name:"British Virgin Islands"},{code:"BN",name:"Brunei"},{code:"BG",name:"Bulgaria"},{code:"BF",name:"Burkina Faso"},{code:"BI",name:"Burundi"},{code:"KH",name:"Cambodia"},{code:"CM",name:"Cameroon"},{code:"CV",name:"Cape Verde"},{code:"BQ",name:"Caribbean Netherlands"},{code:"KY",name:"Cayman Islands"},{code:"CF",name:"Central African Republic"},{code:"TD",name:"Chad"},{code:"CL",name:"Chile"},{code:"CN",name:"China"},{code:"CX",name:"Christmas Island"},{code:"CC",name:"Cocos (Keeling) Islands"},{code:"CO",name:"Colombia"},{code:"KM",name:"Comoros"},{code:"CG",name:"Congo - Brazzaville"},{code:"CD",name:"Congo - Kinshasa"},{code:"CK",name:"Cook Islands"},{code:"CR",name:"Costa Rica"},{code:"CI",name:"Côte d'Ivoire"},{code:"HR",name:"Croatia"},{code:"CU",name:"Cuba"},{code:"CW",name:"Curaçao"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czechia"},{code:"DK",name:"Denmark"},{code:"DJ",name:"Djibouti"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"EC",name:"Ecuador"},{code:"EG",name:"Egypt"},{code:"SV",name:"El Salvador"},{code:"GQ",name:"Equatorial Guinea"},{code:"ER",name:"Eritrea"},{code:"EE",name:"Estonia"},{code:"SZ",name:"Eswatini"},{code:"ET",name:"Ethiopia"},{code:"FK",name:"Falkland Islands"},{code:"FO",name:"Faroe Islands"},{code:"FJ",name:"Fiji"},{code:"FI",name:"Finland"},{code:"FR",name:"France"},{code:"GF",name:"French Guiana"},{code:"PF",name:"French Polynesia"},{code:"GA",name:"Gabon"},{code:"GM",name:"Gambia"},{code:"GE",name:"Georgia"},{code:"DE",name:"Germany"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GR",name:"Greece"},{code:"GL",name:"Greenland"},{code:"GD",name:"Grenada"},{code:"GP",name:"Guadeloupe"},{code:"GU",name:"Guam"},{code:"GT",name:"Guatemala"},{code:"GG",name:"Guernsey"},{code:"GN",name:"Guinea"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HT",name:"Haiti"},{code:"HN",name:"Honduras"},{code:"HK",name:"Hong Kong SAR China"},{code:"HU",name:"Hungary"},{code:"IS",name:"Iceland"},{code:"IN",name:"India"},{code:"ID",name:"Indonesia"},{code:"IR",name:"Iran"},{code:"IQ",name:"Iraq"},{code:"IE",name:"Ireland"},{code:"IM",name:"Isle of Man"},{code:"IL",name:"Israel"},{code:"IT",name:"Italy"},{code:"JM",name:"Jamaica"},{code:"JP",name:"Japan"},{code:"JE",name:"Jersey"},{code:"JO",name:"Jordan"},{code:"KZ",name:"Kazakhstan"},{code:"KE",name:"Kenya"},{code:"KI",name:"Kiribati"},{code:"XK",name:"Kosovo"},{code:"KW",name:"Kuwait"},{code:"KG",name:"Kyrgyzstan"},{code:"LA",name:"Laos"},{code:"LV",name:"Latvia"},{code:"LB",name:"Lebanon"},{code:"LS",name:"Lesotho"},{code:"LR",name:"Liberia"},{code:"LY",name:"Libya"},{code:"LI",name:"Liechtenstein"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"MO",name:"Macao SAR China"},{code:"MG",name:"Madagascar"},{code:"MW",name:"Malawi"},{code:"MY",name:"Malaysia"},{code:"MV",name:"Maldives"},{code:"ML",name:"Mali"},{code:"MT",name:"Malta"},{code:"MH",name:"Marshall Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MU",name:"Mauritius"},{code:"YT",name:"Mayotte"},{code:"MX",name:"Mexico"},{code:"FM",name:"Micronesia"},{code:"MD",name:"Moldova"},{code:"MC",name:"Monaco"},{code:"MN",name:"Mongolia"},{code:"ME",name:"Montenegro"},{code:"MS",name:"Montserrat"},{code:"MA",name:"Morocco"},{code:"MZ",name:"Mozambique"},{code:"MM",name:"Myanmar (Burma)"},{code:"NA",name:"Namibia"},{code:"NR",name:"Nauru"},{code:"NP",name:"Nepal"},{code:"NL",name:"Netherlands"},{code:"NC",name:"New Caledonia"},{code:"NZ",name:"New Zealand"},{code:"NI",name:"Nicaragua"},{code:"NE",name:"Niger"},{code:"NG",name:"Nigeria"},{code:"NU",name:"Niue"},{code:"NF",name:"Norfolk Island"},{code:"KP",name:"North Korea"},{code:"MK",name:"North Macedonia"},{code:"MP",name:"Northern Mariana Islands"},{code:"NO",name:"Norway"},{code:"OM",name:"Oman"},{code:"PK",name:"Pakistan"},{code:"PW",name:"Palau"},{code:"PS",name:"Palestinian Territories"},{code:"PA",name:"Panama"},{code:"PG",name:"Papua New Guinea"},{code:"PY",name:"Paraguay"},{code:"PE",name:"Peru"},{code:"PH",name:"Philippines"},{code:"PN",name:"Pitcairn Islands"},{code:"PL",name:"Poland"},{code:"PT",name:"Portugal"},{code:"PR",name:"Puerto Rico"},{code:"QA",name:"Qatar"},{code:"RE",name:"Réunion"},{code:"RO",name:"Romania"},{code:"RU",name:"Russia"},{code:"RW",name:"Rwanda"},{code:"WS",name:"Samoa"},{code:"SM",name:"San Marino"},{code:"ST",name:"São Tomé & Príncipe"},{code:"SA",name:"Saudi Arabia"},{code:"SN",name:"Senegal"},{code:"RS",name:"Serbia"},{code:"SC",name:"Seychelles"},{code:"SL",name:"Sierra Leone"},{code:"SG",name:"Singapore"},{code:"SX",name:"Sint Maarten"},{code:"SK",name:"Slovakia"},{code:"SI",name:"Slovenia"},{code:"SB",name:"Solomon Islands"},{code:"SO",name:"Somalia"},{code:"ZA",name:"South Africa"},{code:"KR",name:"South Korea"},{code:"SS",name:"South Sudan"},{code:"ES",name:"Spain"},{code:"LK",name:"Sri Lanka"},{code:"BL",name:"St. Barthélemy"},{code:"SH",name:"St. Helena"},{code:"KN",name:"St. Kitts & Nevis"},{code:"LC",name:"St. Lucia"},{code:"MF",name:"St. Martin"},{code:"PM",name:"St. Pierre & Miquelon"},{code:"VC",name:"St. Vincent & Grenadines"},{code:"SD",name:"Sudan"},{code:"SR",name:"Suriname"},{code:"SJ",name:"Svalbard & Jan Mayen"},{code:"SE",name:"Sweden"},{code:"CH",name:"Switzerland"},{code:"SY",name:"Syria"},{code:"TW",name:"Taiwan"},{code:"TJ",name:"Tajikistan"},{code:"TZ",name:"Tanzania"},{code:"TH",name:"Thailand"},{code:"TL",name:"Timor-Leste"},{code:"TG",name:"Togo"},{code:"TK",name:"Tokelau"},{code:"TO",name:"Tonga"},{code:"TT",name:"Trinidad & Tobago"},{code:"TN",name:"Tunisia"},{code:"TR",name:"Türkiye"},{code:"TM",name:"Turkmenistan"},{code:"TC",name:"Turks & Caicos Islands"},{code:"TV",name:"Tuvalu"},{code:"VI",name:"U.S. Virgin Islands"},{code:"UG",name:"Uganda"},{code:"UA",name:"Ukraine"},{code:"AE",name:"United Arab Emirates"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VU",name:"Vanuatu"},{code:"VA",name:"Vatican City"},{code:"VE",name:"Venezuela"},{code:"VN",name:"Vietnam"},{code:"WF",name:"Wallis & Futuna"},{code:"EH",name:"Western Sahara"},{code:"YE",name:"Yemen"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}],eA=new Set(["US","CA"]),eP=[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District of Columbia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PA",name:"Pennsylvania"},{code:"PR",name:"Puerto Rico"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VT",name:"Vermont"},{code:"VA",name:"Virginia"},{code:"WA",name:"Washington"},{code:"WV",name:"West Virginia"},{code:"WI",name:"Wisconsin"},{code:"WY",name:"Wyoming"}],ez=[{code:"AB",name:"Alberta"},{code:"BC",name:"British Columbia"},{code:"MB",name:"Manitoba"},{code:"NB",name:"New Brunswick"},{code:"NL",name:"Newfoundland and Labrador"},{code:"NS",name:"Nova Scotia"},{code:"NT",name:"Northwest Territories"},{code:"NU",name:"Nunavut"},{code:"ON",name:"Ontario"},{code:"PE",name:"Prince Edward Island"},{code:"QC",name:"Quebec"},{code:"SK",name:"Saskatchewan"},{code:"YT",name:"Yukon"}];var e$=e.i(992251);let eL={firstName:100,lastName:100,email:254,company:200,companyUrl:500,billingEmail:254,notes:500,line1:255,line2:255,city:100,state:100,postalCode:20};function eE(e,t){return t.trim().length>eL[e]}let eF={billingEmail:"",internalTrainingInterest:!1,companySize:"",notes:"",marketingOptIn:!1,honeypot:""},eB=new Set(["firstName","lastName","email","company","companyUrl","billingEmail","companySize"]),eR={line1:"",line2:"",city:"",state:"",postalCode:"",country:"US"},eO="h-11 w-full rounded-lg border border-border bg-background px-3 text-base text-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-cbt-500/20 focus:border-cbt-500",eK="border-red-500 focus-visible:ring-red-500/20 aria-invalid:border-red-500",eG="border-border",eW="mt-0.5 size-4 rounded border-cbt-200 accent-cbt-500";function eD(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function eH(e){let t=e.trim();return t?/^https?:\/\//i.test(t)?t:`https://${t}`:""}function eV(e){try{return!!new URL(eH(e)).hostname.includes(".")}catch{return!1}}function eY(e,t){let a={};if(e.firstName.trim()?eE("firstName",e.firstName)&&(a.firstName=`First name must be ${eL.firstName} characters or fewer`):a.firstName="First name is required",e.lastName.trim()?eE("lastName",e.lastName)&&(a.lastName=`Last name must be ${eL.lastName} characters or fewer`):a.lastName="Last name is required",e.email.trim()?(!eD(e.email)||eE("email",e.email))&&(a.email="Please enter a valid email address"):a.email="Work email is required",e.companyUrl.trim()?(!eV(e.companyUrl)||eE("companyUrl",eH(e.companyUrl)))&&(a.companyUrl="Please enter a valid company website"):a.companyUrl="Company website is required",e.company.trim()?eE("company",e.company)&&(a.company=`Company name must be ${eL.company} characters or fewer`):a.company="Company name is required",t.billingEmail.trim()&&(!eD(t.billingEmail)||eE("billingEmail",t.billingEmail))&&(a.billingEmail="Please enter a valid email address"),t.internalTrainingInterest){let e=Number(t.companySize);t.companySize.trim()&&Number.isInteger(e)&&!(e<1)||(a.companySize="Enter roughly how many employees your company has")}return a}async function e_(e){let t=await fetch("/api/teams/demo/company-name",{method:"POST",headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},body:JSON.stringify({companyUrl:eH(e)})});if(!t.ok)return null;let a=await t.json().catch(()=>null);return a?.companyName?.trim()||null}function eJ({htmlFor:e,children:a,optional:n}){return(0,t.jsxs)("label",{htmlFor:e,className:"mb-1 block text-sm font-semibold text-foreground",children:[a,n&&(0,t.jsx)("span",{className:"ml-1 font-normal text-muted-foreground",children:"(optional)"})]})}function eZ({id:e,message:a}){return a?(0,t.jsx)("p",{id:e,role:"alert",className:"mt-1 text-sm text-red-600",children:a}):null}function eQ({idPrefix:e,values:a,errors:n,onChange:i}){var o;let s="US"===(o=a.country)?eP:"CA"===o?ez:null,l=eA.has(a.country),d="US"===a.country?"ZIP code":"Postal code";return(0,t.jsxs)("div",{className:"grid gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:`${e}-line1`,children:"Street address *"}),(0,t.jsx)(Y.f,{id:`${e}-line1`,name:`${e}-line1`,maxLength:eL.line1,size:"lg",required:!0,"aria-required":"true","aria-invalid":!!n.line1,"aria-describedby":n.line1?`${e}-line1-error`:void 0,autoComplete:"shipping address-line1",value:a.line1,onChange:e=>i({line1:e.target.value}),className:(0,r.f)(n.line1?eK:eG)}),(0,t.jsx)(eZ,{id:`${e}-line1-error`,message:n.line1})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:`${e}-line2`,optional:!0,children:"Suite, floor, or unit"}),(0,t.jsx)(Y.f,{id:`${e}-line2`,name:`${e}-line2`,maxLength:eL.line2,size:"lg",autoComplete:"shipping address-line2","aria-invalid":!!n.line2,"aria-describedby":n.line2?`${e}-line2-error`:void 0,value:a.line2,onChange:e=>i({line2:e.target.value}),className:(0,r.f)(n.line2?eK:eG)}),(0,t.jsx)(eZ,{id:`${e}-line2-error`,message:n.line2})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:`${e}-city`,children:"City *"}),(0,t.jsx)(Y.f,{id:`${e}-city`,name:`${e}-city`,maxLength:eL.city,size:"lg",required:!0,"aria-required":"true","aria-invalid":!!n.city,"aria-describedby":n.city?`${e}-city-error`:void 0,autoComplete:"shipping address-level2",value:a.city,onChange:e=>i({city:e.target.value}),className:(0,r.f)(n.city?eK:eG)}),(0,t.jsx)(eZ,{id:`${e}-city-error`,message:n.city})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(eJ,{htmlFor:`${e}-state`,optional:!l,children:["CA"===a.country?"Province":"US"===a.country?"State":"State / province / region",l?" *":""]}),s?(0,t.jsxs)("select",{id:`${e}-state`,name:`${e}-state`,required:!0,"aria-required":"true","aria-invalid":!!n.state,"aria-describedby":n.state?`${e}-state-error`:void 0,autoComplete:"shipping address-level1",className:(0,r.f)(eO,n.state&&eK),value:a.state,onChange:e=>i({state:e.target.value}),children:[(0,t.jsx)("option",{value:"",disabled:!0,children:"Select…"}),s.map(e=>(0,t.jsx)("option",{value:e.code,children:e.name},e.code))]}):(0,t.jsx)(Y.f,{id:`${e}-state`,name:`${e}-state`,size:"lg",maxLength:eL.state,"aria-invalid":!!n.state,"aria-describedby":n.state?`${e}-state-error`:void 0,autoComplete:"shipping address-level1",value:a.state,onChange:e=>i({state:e.target.value})}),(0,t.jsx)(eZ,{id:`${e}-state-error`,message:n.state})]})]}),(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)(eJ,{htmlFor:`${e}-postalCode`,optional:!l,children:[d,l?" *":""]}),(0,t.jsx)(Y.f,{id:`${e}-postalCode`,name:`${e}-postalCode`,maxLength:eL.postalCode,size:"lg","aria-invalid":!!n.postalCode,"aria-describedby":n.postalCode?`${e}-postalCode-error`:void 0,autoComplete:"shipping postal-code",value:a.postalCode,onChange:e=>i({postalCode:e.target.value}),className:(0,r.f)(n.postalCode?eK:eG)}),(0,t.jsx)(eZ,{id:`${e}-postalCode-error`,message:n.postalCode})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:`${e}-country`,children:"Country *"}),(0,t.jsx)("select",{id:`${e}-country`,name:`${e}-country`,autoComplete:"shipping country",className:eO,value:a.country,onChange:e=>i({country:e.target.value,state:""}),children:eM.map(e=>(0,t.jsx)("option",{value:e.code,children:e.name},e.code))})]})]})]})}function eX(){return(0,t.jsx)("p",{"data-testid":"quote-enterprise-notice",className:"mt-3 rounded-lg border border-cbt-100 bg-cbt-50 px-4 py-3 text-sm leading-6 text-cbt-800",children:F.B})}function e0({identity:e,onIdentityChange:n,initialSeats:i,intentContext:o,onSubmitted:s,turnstileSiteKey:d=null}){let{onFormFocusCapture:c,trackSubmitSuccess:m,markSubmitStarted:u,trackDuplicateSubmitAttempt:h}=(0,B.f)("teams_quote"),p=O(),f=(0,a.useRef)(null),b=(0,a.useCallback)(e=>{f.current=e},[]),{captureEmail:x}=(0,H.f)(),[g,y]=(0,a.useState)(()=>(0,l.m)(i)),[N,v]=(0,a.useState)(eF),[j,w]=(0,a.useState)(eR),[k,S]=(0,a.useState)({}),[q,T]=(0,a.useState)({}),[I,U]=(0,a.useState)(!1),M=es(I),P=(0,a.useRef)(!1),[z,$]=(0,a.useState)(!1),[E,G]=(0,a.useState)(null),[W,D]=(0,a.useState)("idle"),_=(0,F.a)(F.R)*g,J=F.R*g,Z=e.firstName||e.lastName||e.email||e.company||e.companyUrl||j.line1||j.city||N.billingEmail||N.companySize||N.notes;(0,a.useEffect)(()=>{let e=e=>{Z&&!z&&e.preventDefault()};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[Z,z]);let Q=(0,a.useCallback)(e=>{S(t=>{if(!t[e])return t;let a={...t};return delete a[e],a})},[]),X=(0,a.useCallback)((e,t)=>{n({[e]:t}),"email"===e&&x(t),"companyUrl"===e&&D("idle"),Q(e)},[x,Q,n]),ee=(0,a.useCallback)(e=>{for(let t of(v(t=>({...t,...e})),Object.keys(e)))("billingEmail"===t||"companySize"===t)&&Q(t)},[Q]),et=(0,a.useCallback)(async()=>{let t=eY(e,N);if(t.companyUrl)return void S(e=>({...e,companyUrl:t.companyUrl}));if(e.company.trim()||!eV(e.companyUrl))return;let a=e.companyUrl;D("loading");try{let e=await e_(a);if(!e)return void D("not-found");n({company:e}),D("found")}catch{D("not-found")}},[e,n,N]),ea=(0,a.useCallback)(e=>{w(t=>({...t,...e})),T(t=>{let a={...t};for(let t of Object.keys(e))delete a[t];return a})},[]),en=(0,a.useCallback)(async t=>{let a,n;if(t.preventDefault(),P.current)return void h();G(null);let i=t.currentTarget;if(N.honeypot)return;let r=eY(e,N),l=(a={},n=eA.has(j.country),j.line1.trim()?eE("line1",j.line1)&&(a.line1=`Street address must be ${eL.line1} characters or fewer`):a.line1="Street address is required",eE("line2",j.line2)&&(a.line2=`Suite, floor, or unit must be ${eL.line2} characters or fewer`),j.city.trim()?eE("city",j.city)&&(a.city=`City must be ${eL.city} characters or fewer`):a.city="City is required",n&&!j.state.trim()?a.state="CA"===j.country?"Province is required":"State is required":eE("state",j.state)&&(a.state=`State or region must be ${eL.state} characters or fewer`),n&&!j.postalCode.trim()?a.postalCode="US"===j.country?"ZIP code is required":"Postal code is required":eE("postalCode",j.postalCode)&&(a.postalCode=`Postal code must be ${eL.postalCode} characters or fewer`),a);if(Object.keys(r).length>0||Object.keys(l).length>0){S(r),T(l),(0,R.f)(i);return}P.current=!0,u(),U(!0);let d=()=>{m(),(0,V.M)({email:e.email,phone:"",jobTitle:"",company:e.company,numberOfEmployees:String(g)})};try{let t={firstName:e.firstName,lastName:e.lastName,email:e.email,company:e.company,companyUrl:eH(e.companyUrl),seats:g,address:{line1:j.line1.trim(),line2:j.line2.trim()||void 0,city:j.city.trim(),state:j.state.trim()||void 0,postalCode:j.postalCode.trim()||void 0,countryCode:j.country},billingEmail:N.billingEmail.trim()||void 0,internalTraining:N.internalTrainingInterest?{companySize:Number(N.companySize)}:void 0,notes:N.notes.trim()||void 0,marketingOptIn:N.marketingOptIn},a=await f.current?.waitForToken()??void 0,n=await fetch("/api/teams/quote",{method:"POST",headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},body:JSON.stringify({...t,submissionId:p(t),turnstileToken:a,context:ev({...o,...ew()})})}),r=await n.json().catch(()=>null);if(!n.ok){n.status>=500&&d(),f.current?.reset();let e=r?.field;if(400===n.status&&"string"==typeof e&&eB.has(e)){let t={};t[e]=r?.fieldError??r?.error??"Please check this field",S(t),(0,R.f)(i);return}G(r?.error??"We couldn't send your request. Please try again or call us directly.");return}d(),$(!0),s?.()}catch{d(),G("We couldn't send your request. Please try again or call us directly.")}finally{P.current=!1,U(!1)}},[j,e,o,s,N,g,p,u,h,m]);if(z)return(0,t.jsxs)("div",{className:"rounded-[1.5rem] bg-green-50 p-6",role:"status","aria-live":"polite",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("div",{className:"mx-auto mb-4 flex size-14 items-center justify-center rounded-full bg-white shadow-sm",children:(0,t.jsx)(A.f,{className:"size-7 text-success-600","aria-hidden":!0})}),(0,t.jsx)("h2",{className:"font-display text-h3",children:"Your quote request is in."}),(0,t.jsxs)("p",{className:"mt-3 text-base leading-7 text-muted-foreground",children:["We’ll email your quote for ",g," ",1===g?"seat":"seats"," to"," ",(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e.email}),N.billingEmail.trim()&&(0,t.jsxs)(t.Fragment,{children:[" ","(copying"," ",(0,t.jsx)("span",{className:"font-semibold text-foreground",children:N.billingEmail.trim()}),")"]})," ","within two business days."]})]}),(0,t.jsxs)("div",{className:"mt-6 rounded-2xl bg-white p-5 text-left shadow-sm",children:[(0,t.jsx)("p",{className:"text-overline mb-3 text-cbt-500",children:"Your request"}),(0,t.jsx)("dl",{className:"divide-y divide-cbt-100 text-sm",children:[{label:`${F.C.team.web} \xb7 ${g} ${1===g?"seat":"seats"}`,value:`${(0,F.Y)(_)}/mo`,strong:!0},{label:"Billed annually",value:(0,F.Y)(J),strong:!0},{label:"Company",value:e.company},{label:"Company address",value:[j.line1,j.line2,j.city,j.state,j.postalCode,j.country].map(e=>e.trim()).filter(Boolean).join(", ")},...N.internalTrainingInterest?[{label:"Also interested in",value:`Internal Training (about ${Number(N.companySize).toLocaleString("en-US")} employees)`}]:[]].map(e=>(0,t.jsxs)("div",{className:"flex justify-between gap-6 py-2 first:pt-0 last:pb-0",children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:e.label}),(0,t.jsx)("dd",{className:(0,r.f)("text-right tabular-nums text-foreground","strong"in e&&e.strong&&"font-semibold"),children:e.value})]},e.label))})]}),(0,t.jsxs)("p",{className:"mt-5 text-center text-sm text-muted-foreground",children:["Need it sooner? Call"," ",(0,t.jsx)("a",{href:C.o.phoneHref,"aria-label":`Call ${C.o.name} sales, ${C.o.phone}`,className:"font-medium text-cbt-600 underline-offset-4 hover:underline",children:C.o.phone}),"."]})]});return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-5",children:[(0,t.jsx)("h2",{className:"font-display text-h3",children:"Request your quote"}),(0,t.jsx)("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Tell us how many seats and where to send it. We’ll email your quote within two business days."}),o.tier===l.I&&(0,t.jsx)(eX,{})]}),(0,t.jsxs)("form",{"data-testid":"form-teams-quote",method:"post",onFocusCapture:c,onSubmit:en,noValidate:!0,children:[E&&(0,t.jsx)("div",{className:"mb-4 rounded-lg bg-red-50 p-3 text-sm text-red-700",role:"alert","aria-live":"polite",children:E}),(0,t.jsx)("div",{className:"rounded-2xl border border-cbt-200 bg-white p-4",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:"quote-seats",children:"Teams seats *"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>y((0,l.m)(g-1)),className:"flex size-11 items-center justify-center rounded-lg border border-border text-foreground transition-colors hover:border-cbt-500 focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2","aria-label":"Remove one seat",children:(0,t.jsx)(eI,{className:"size-4","aria-hidden":!0})}),(0,t.jsx)(Y.f,{id:"quote-seats",name:"seats",type:"number",size:"lg",inputMode:"numeric",min:l._,max:l.K,value:g,onChange:e=>y((0,l.m)(Number(e.target.value))),className:"w-24 text-center"}),(0,t.jsx)("button",{type:"button",onClick:()=>y((0,l.m)(g+1)),className:"flex size-11 items-center justify-center rounded-lg border border-border text-foreground transition-colors hover:border-cbt-500 focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2","aria-label":"Add one seat",children:(0,t.jsx)(eU.f,{className:"size-4","aria-hidden":!0})})]})]}),(0,t.jsxs)("div",{className:"text-right","aria-live":"polite",...(0,e$.O)(e$.z.quoteSubtotal),children:[(0,t.jsx)("p",{className:"font-display text-3xl font-medium leading-none tabular-nums text-cbt-800",children:(0,F.Y)(_)}),(0,t.jsxs)("p",{className:"mt-1 text-sm uppercase tracking-wide text-muted-foreground",children:["per month for ",g," ",1===g?"seat":"seats"]}),(0,t.jsxs)("p",{className:"mt-0.5 text-sm tabular-nums text-muted-foreground","data-testid":"quote-annual-total",children:[(0,F.Y)(J)," billed annually"]})]})]})}),(0,t.jsxs)("div",{className:"mt-4 grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:"quote-firstName",children:"First Name *"}),(0,t.jsx)(Y.f,{id:"quote-firstName",name:"firstName",maxLength:eL.firstName,size:"lg",required:!0,"aria-required":"true","aria-invalid":!!k.firstName,"aria-describedby":k.firstName?"quote-firstName-error":void 0,autoComplete:"given-name",value:e.firstName,onChange:e=>X("firstName",e.target.value),className:(0,r.f)(k.firstName?eK:eG)}),(0,t.jsx)(eZ,{id:"quote-firstName-error",message:k.firstName})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:"quote-lastName",children:"Last Name *"}),(0,t.jsx)(Y.f,{id:"quote-lastName",name:"lastName",maxLength:eL.lastName,size:"lg",required:!0,"aria-required":"true","aria-invalid":!!k.lastName,"aria-describedby":k.lastName?"quote-lastName-error":void 0,autoComplete:"family-name",value:e.lastName,onChange:e=>X("lastName",e.target.value),className:(0,r.f)(k.lastName?eK:eG)}),(0,t.jsx)(eZ,{id:"quote-lastName-error",message:k.lastName})]})]}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)(eJ,{htmlFor:"quote-email",children:"Work Email *"}),(0,t.jsx)(Y.f,{id:"quote-email",name:"email",maxLength:eL.email,type:"email",size:"lg",required:!0,"aria-required":"true","aria-invalid":!!k.email,"aria-describedby":k.email?"quote-email-error":void 0,autoComplete:"email",value:e.email,onChange:e=>X("email",e.target.value),className:(0,r.f)(k.email?eK:eG)}),(0,t.jsx)(eZ,{id:"quote-email-error",message:k.email})]}),(0,t.jsxs)("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:"quote-company",children:"Company Name *"}),(0,t.jsx)(Y.f,{id:"quote-company",name:"company",maxLength:eL.company,size:"lg",required:!0,"aria-required":"true","aria-invalid":!!k.company,"aria-describedby":k.company?"quote-company-error":void 0,autoComplete:"organization",value:e.company,onChange:e=>X("company",e.target.value),className:(0,r.f)(k.company?eK:eG)}),(0,t.jsx)(eZ,{id:"quote-company-error",message:k.company}),(0,t.jsx)("p",{className:"sr-only","aria-live":"polite",children:"found"===W?"Company name filled in from the website. Edit it if needed.":""})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(eJ,{htmlFor:"quote-companyUrl",children:"Company Website *"}),(0,t.jsx)(Y.f,{id:"quote-companyUrl",name:"companyUrl",maxLength:eL.companyUrl,size:"lg",required:!0,"aria-required":"true","aria-invalid":!!k.companyUrl,"aria-describedby":k.companyUrl?"quote-companyUrl-error":void 0,autoComplete:"url",value:e.companyUrl,onChange:e=>X("companyUrl",e.target.value),onBlur:et,className:(0,r.f)(k.companyUrl?eK:eG)}),(0,t.jsx)(eZ,{id:"quote-companyUrl-error",message:k.companyUrl})]})]}),(0,t.jsxs)("fieldset",{className:"mt-5 rounded-2xl border border-cbt-100 bg-white p-4",children:[(0,t.jsx)("legend",{className:"px-1 text-sm font-semibold text-foreground",children:"Company address"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(eQ,{idPrefix:"quote-address",values:j,errors:q,onChange:ea})})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(eJ,{htmlFor:"quote-billingEmail",optional:!0,children:"Also send the quote to"}),(0,t.jsx)(Y.f,{id:"quote-billingEmail",name:"billingEmail",maxLength:eL.billingEmail,type:"email",size:"lg",autoComplete:"billing email","aria-invalid":!!k.billingEmail,"aria-describedby":k.billingEmail?"quote-billingEmail-error":void 0,placeholder:"accounts-payable@company.com",value:N.billingEmail,onChange:e=>ee({billingEmail:e.target.value}),className:(0,r.f)(k.billingEmail?eK:eG)}),(0,t.jsx)(eZ,{id:"quote-billingEmail-error",message:k.billingEmail})]}),(0,t.jsxs)("label",{className:"mt-4 flex items-start gap-3 text-sm text-foreground",children:[(0,t.jsx)("input",{type:"checkbox",name:"internalTrainingInterest",className:eW,checked:N.internalTrainingInterest,onChange:e=>ee({internalTrainingInterest:e.target.checked})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-semibold",children:"Also interested in Internal Training"}),(0,t.jsx)("span",{className:"mt-0.5 block text-muted-foreground",children:"Turn your existing documentation into training, or create your own."})]})]}),N.internalTrainingInterest&&(0,t.jsxs)("div",{id:"quote-internal-training",className:"mt-3 rounded-xl border border-cbt-100 bg-cbt-50/40 p-3",children:[(0,t.jsx)(eJ,{htmlFor:"quote-companySize",children:"Approximately how many employees does your company have? *"}),(0,t.jsx)(Y.f,{id:"quote-companySize",name:"companySize",type:"number",size:"lg",inputMode:"numeric",min:1,max:1e6,step:1,required:!0,"aria-required":"true","aria-invalid":!!k.companySize,"aria-describedby":k.companySize?"quote-companySize-error":void 0,value:N.companySize,onChange:e=>ee({companySize:e.target.value}),className:(0,r.f)("w-40",k.companySize?eK:eG)}),(0,t.jsx)(eZ,{id:"quote-companySize-error",message:k.companySize})]}),(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(eJ,{htmlFor:"quote-notes",optional:!0,children:"Anything else we should know?"}),(0,t.jsx)("textarea",{id:"quote-notes",name:"notes",rows:2,maxLength:eL.notes,value:N.notes,onChange:e=>ee({notes:e.target.value}),className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-base text-foreground transition-colors focus:border-cbt-500 focus:outline-none focus:ring-2 focus:ring-cbt-500/20"})]}),(0,t.jsxs)("div",{className:"absolute -left-[9999px] h-0 overflow-hidden opacity-0","aria-hidden":"true",children:[(0,t.jsx)("label",{htmlFor:"quote-honeypot",children:"Do not fill this field"}),(0,t.jsx)("input",{id:"quote-honeypot",name:"honeypot",type:"text",tabIndex:-1,autoComplete:"off",value:N.honeypot,onChange:e=>ee({honeypot:e.target.value})})]}),(0,t.jsxs)("label",{className:"mt-4 flex items-start gap-3 text-sm text-muted-foreground",children:[(0,t.jsx)("input",{type:"checkbox",name:"marketingOptIn",className:eW,checked:N.marketingOptIn,onChange:e=>ee({marketingOptIn:e.target.checked})}),(0,t.jsx)("span",{children:"Send me CBT Nuggets team training resources and product updates. Unsubscribe any time."})]}),d&&(0,t.jsx)(K.f,{siteKey:d,action:"quote",onReady:b}),(0,t.jsx)("button",{type:"submit",disabled:I,className:(0,r.f)("btn-gradient mt-5 min-h-12 w-full rounded-full py-3 text-base font-semibold text-white transition-opacity","focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2","disabled:cursor-not-allowed disabled:bg-muted-foreground"),children:I?"Sending...":"Request My Quote"}),(0,t.jsx)(el,{stage:M,submitting:I}),(0,t.jsxs)("p",{className:"mt-3 text-sm leading-5 text-muted-foreground",children:["A quote is not a commitment. By submitting this form, you agree to our"," ",(0,t.jsxs)(L.default,{href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-cbt-600 underline-offset-4 hover:underline",children:["Privacy Policy",(0,t.jsx)("span",{className:"sr-only",children:" (opens in a new tab)"})]}),". Prefer to talk now? Call"," ",(0,t.jsx)("a",{href:C.o.phoneHref,"aria-label":`Call ${C.o.name} sales, ${C.o.phone}`,className:"font-medium text-cbt-600 underline-offset-4 hover:underline",children:C.o.phone}),"."]})]})]})}let e1={firstName:"",lastName:"",email:"",company:"",companyUrl:""};function e2({initialSeats:e,demoContext:n,turnstileSiteKey:i=null}){let{intent:o,switchTo:s}=U(),[d,c]=(0,a.useState)(e1),[m,u]=(0,a.useState)(null),h=(0,a.useCallback)(e=>{c(t=>({...t,...e}))},[]),p=null!==m;return(0,t.jsx)("div",{className:"rounded-[2rem] border border-cbt-100 bg-white p-3 shadow-xl shadow-cbt-900/5 md:p-4",children:(0,t.jsx)("div",{className:"rounded-[1.5rem] border border-cbt-100 bg-background-alt p-5 md:p-6",children:(0,t.jsxs)($.i,{value:o,onValueChange:e=>s(e),children:[(0,t.jsxs)($.U,{className:(0,r.f)("grid h-12 w-full grid-cols-2",p&&"hidden"),children:[(0,t.jsx)($.k,{value:"quote",className:"h-11 text-base",children:l.f.quote}),(0,t.jsx)($.k,{value:"demo",className:"h-11 text-base",children:l.f.demo})]}),(0,t.jsx)($.S,{value:"quote",className:(0,r.f)(!p&&"mt-6"),children:"quote"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e0,{identity:d,onIdentityChange:h,initialSeats:e,intentContext:n,turnstileSiteKey:i,onSubmitted:()=>u("quote")}),!p&&(0,t.jsxs)("p",{className:"mt-4 border-t border-cbt-100 pt-4 text-base text-muted-foreground",children:["Want to see the platform first?"," ",(0,t.jsx)("button",{type:"button",onClick:()=>s("demo"),className:"rounded-sm font-semibold text-cbt-500 hover:underline focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2",children:"Book a demo instead"}),"."]})]})}),(0,t.jsx)($.S,{value:"demo",className:(0,r.f)(!p&&"mt-6"),children:"demo"===o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eT,{initialContext:n,initialIdentity:d,onIdentityChange:h,turnstileSiteKey:i,onSubmitted:()=>u("demo"),unstyled:!0}),!p&&(0,t.jsxs)("p",{className:"mt-4 border-t border-cbt-100 pt-4 text-base text-muted-foreground",children:["Already know you want it?"," ",(0,t.jsx)("button",{type:"button",onClick:()=>s("quote"),className:"rounded-sm font-semibold text-cbt-500 hover:underline focus-visible:outline-2 focus-visible:outline-cbt-500 focus-visible:outline-offset-2",children:"Get a quote instead"}),"."]})]})})]})})})}function e5(e){let i=(0,n.useSearchParams)().toString(),r=(0,a.useMemo)(()=>u(i,e.routeIntent),[i,e.routeIntent]);return(0,t.jsx)(e6,{...e,state:r})}let e4={demo:"Request a team training demo",quote:"Request a team training quote"};function e3({children:e}){let{intent:a}=U();return(0,t.jsx)("section",{className:"relative overflow-hidden bg-surface-darker noise-overlay","aria-label":e4[a],children:e})}function e6({mobileApp:e,turnstileSiteKey:a,state:n}){return(0,t.jsxs)(I,{initialIntent:n.intent,children:[(0,t.jsxs)(e3,{children:[(0,t.jsx)(s,{spacing:36,color:"#FFFFFF",opacity:.05}),(0,t.jsx)(o,{size:520,className:"-top-48 -right-36",opacity:.12}),(0,t.jsx)(o,{size:420,className:"bottom-0 -left-32",opacity:.08}),(0,t.jsxs)("div",{className:"relative z-10 mx-auto grid max-w-6xl items-start gap-8 px-6 py-10 md:py-12 lg:grid-cols-[0.9fr_1.1fr] lg:py-14",children:[(0,t.jsx)(z,{mobileApp:e}),(0,t.jsx)(i.f,{delay:220,direction:"right",children:(0,t.jsx)(e2,{initialSeats:n.initialSeats,demoContext:n.context,turnstileSiteKey:a})})]})]}),(0,t.jsx)(M,{mobileApp:e})]})}e.s(["LeadCaptureShell",0,function(e){let n=(0,a.useMemo)(()=>u("",e.routeIntent),[e.routeIntent]);return(0,t.jsx)(a.Suspense,{fallback:(0,t.jsx)(e6,{...e,state:n}),children:(0,t.jsx)(e5,{...e})})}],908636)}]);