PageSourceSearch

https://siscertifications.com/assets/LeadForm-CLoTifX9.js

js siscertifications.com collected 2026-10-02 10:31:59 UTC 4,813 bytes, 1 lines download raw bytes

1import{A as B,b as Q,a as T,r as a,j as e,P as U,C as _,s as z}from"./index-DeMTOXWV.js";import{c as H}from"./index-CILREnT9.js";const R=["ISO 9001","ISO 14001","ISO 45001","ISO/IEC 27001","ISO/IEC 27701","SOC 2 Type 2"],A=[{value:"certification",label:"Certification"},{value:"training",label:"Training"},{value:"both",label:"Both certification and training"}],J=["Management System","IT & Cyber","Product & Regulatory"];function X({title:b="Get Your Certification Quote",defaultStandards:h=[]}){const{user:i}=B(),{open:D}=Q(),{config:x}=T(),[j,g]=a.useState((i==null?void 0:i.name)??""),[C,S]=a.useState((i==null?void 0:i.email)??""),[y,N]=a.useState(x.defaultDialCode),[v,k]=a.useState(""),[r,L]=a.useState("certification"),[n,w]=a.useState(h),[m,$]=a.useState(!1),[F,E]=a.useState(!1),[c,I]=a.useState(""),[q,O]=a.useState(!1),[d,o]=a.useState("idle"),[W,p]=a.useState(""),f=a.useMemo(()=>[...h.filter(s=>!R.includes(s)),...R],[h]),M=a.useMemo(()=>{const t=new Set(f),s=c.trim().toLowerCase();return J.map(l=>({group:l,items:H.filter(u=>u.group===l&&!t.has(u.name)).filter(u=>!s||u.name.toLowerCase().includes(s))})).filter(l=>l.items.length)},[f,c]),G=a.useMemo(()=>n.length===0?"Choose standard(s)":n.length<=2?n.join(", "):`${n.length} standards`,[n]);function P(t){w(s=>s.includes(t)?s.filter(l=>l!==t):[...s,t])}async function Y(t){var s;if(t.preventDefault(),r!=="training"&&n.length===0){p("Pick at least one standard, or choose Training if that is what you need."),o("error");return}o("submitting"),p("");try{await z("lead-quote",{need:((s=A.find(l=>l.value===r))==null?void 0:s.label)??r,standards:n,name:j,email:C,phone:`${y} ${v}`}),o("done"),g(""),S(""),k(""),N(x.defaultDialCode),w([]),O(!1)}catch(l){o("error"),p(l.message)}}return d==="done"?e.jsxs("div",{className:"lead-card",id:"hero-form",children:[e.jsx("p",{className:"lead-title",children:b}),e.jsx("div",{className:"form-ok",style:{display:"block"},children:"✔ Thank you — a specialist will be in touch within 2 business hours."}),e.jsx("button",{className:"btn ghost-dark",type:"button",onClick:()=>o("idle"),children:"Send another"})]}):e.jsxs("form",{className:"lead-card",id:"hero-form",onSubmit:Y,children:[e.jsx("p",{className:"lead-title",children:b}),e.jsx("label",{htmlFor:"lf-name",children:"Name *"}),e.jsx("input",{id:"lf-name",required:!0,placeholder:"Full name",value:j,onChange:t=>g(t.target.value)}),e.jsx("label",{htmlFor:"lf-email",children:"Email *"}),e.jsx("input",{id:"lf-email",type:"email",required:!0,placeholder:"[email protected]",value:C,onChange:t=>S(t.target.value)}),e.jsx("label",{htmlFor:"lf-phone",children:"Phone / WhatsApp *"}),e.jsx(U,{code:y,number:v,onCodeChange:N,onNumberChange:k}),e.jsx("label",{htmlFor:"lf-need",children:"What do you need? *"}),e.jsx("select",{id:"lf-need",value:r,onChange:t=>L(t.target.value),children:A.map(t=>e.jsx("option",{value:t.value,children:t.label},t.value))}),r!=="training"&&e.jsxs(e.Fragment,{children:[e.jsx("label",{htmlFor:"lf-std",children:"Which standard? *"}),e.jsxs("button",{type:"button",id:"lf-std",className:`std-pick${n.length?" has":""}`,"aria-expanded":m,onClick:()=>$(t=>!t),children:[e.jsx("span",{children:G}),e.jsx("i",{"aria-hidden":"true",children:m?"▴":"▾"})]}),m&&e.jsxs("div",{className:"chips std-primary",children:[f.map(t=>e.jsx("button",{type:"button",className:`chip${n.includes(t)?" sel":""}`,"aria-pressed":n.includes(t),onClick:()=>P(t),children:t},t)),!F&&e.jsx("button",{type:"button",className:"chip more",onClick:()=>E(!0),children:"See more +"})]}),F&&e.jsxs("div",{className:"std-more",children:[e.jsx("input",{type:"search",className:"std-more-find",placeholder:"Search all 45 standards…",value:c,onChange:t=>I(t.target.value)}),M.map(t=>e.jsxs("div",{className:"std-more-group",children:[e.jsx("span",{className:"std-more-head",children:t.group}),e.jsx("div",{className:"chips",children:t.items.map(s=>e.jsx("button",{type:"button",className:`chip${n.includes(s.name)?" sel":""}`,"aria-pressed":n.includes(s.name),onClick:()=>P(s.name),children:s.name},s.name))})]},t.group)),M.length===0&&e.jsxs("p",{className:"hint",children:["Nothing else matches “",c,"”."]}),e.jsx("button",{type:"button",className:"std-more-close",onClick:()=>{E(!1),I("")},children:"Show fewer"})]})]}
1),e.jsx(_,{id:"lf-consent",checked:q,onChange:O}),e.jsx("button",{className:"btn",type:"submit",disabled:d==="submitting",children:d==="submitting"?"Sending…":"Send"}),e.jsxs("p",{className:"lead-foot",children:["A specialist responds within 2 business hours ·"," ",e.jsx("button",{type:"button",className:"lead-alt",onClick:D,children:"schedule a meeting instead"})]}),d==="error"&&e.jsx("div",{className:"form-ok",style:{display:"block",background:"#fdecec",borderColor:"#f3b8b8",color:"#a02323"},children:W})]})}export{X as L};

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.