1import{r as u,j as t,B as I,b as De,aA as Re,d as Oe,J as re,O as ze,P as Ve,Q as He,s as P,I as H,aB as We,aC as Qe}from"./index-B9VPSq2u.js";import{t as ue,b as Ge}from"./attendanceChannel-C_6QMUYr.js";import{W as Je}from"./PremiumLandingTemplate-D1vh5Q-1.js";import{P as Ke,a as Xe,b as Ye}from"./popover-ChGr7qms.js";import{C as Ze,a as Ue,b as et,c as tt,d as at,e as rt}from"./command-C3OrdmHb.js";import{S as nt}from"./slider-pX0S-soL.js";import{i as ot}from"./form-conditions-CNiPmn9l.js";import{u as st,c as Ae}from"./useCatalogCategoryTree-CZgWXOUn.js";import"./search-BGWf2lmH.js";const pe=[{code:"55",flag:"ð§ð·",name:"Brasil"},{code:"1",flag:"ðºð¸",name:"Estados Unidos"},{code:"351",flag:"ðµð¹",name:"Portugal"},{code:"54",flag:"ð¦ð·",name:"Argentina"},{code:"56",flag:"ð¨ð±",name:"Chile"},{code:"57",flag:"ð¨ð´",name:"Colômbia"},{code:"52",flag:"ð²ð½",name:"México"},{code:"598",flag:"ðºð¾",name:"Uruguai"},{code:"595",flag:"ðµð¾",name:"Paraguai"},{code:"51",flag:"ðµðª",name:"Peru"},{code:"591",flag:"ð§ð´",name:"BolÃvia"}
1,{code:"593",flag:"ðªð¨",name:"Equador"},{code:"58",flag:"ð»ðª",name:"Venezuela"},{code:"34",flag:"ðªð¸",name:"Espanha"},{code:"39",flag:"ð®ð¹",name:"Itália"},{code:"49",flag:"ð©ðª",name:"Alemanha"},{code:"33",flag:"ð«ð·",name:"França"},{code:"44",flag:"ð¬ð§",name:"Reino Unido"},{code:"41",flag:"ð¨ð",name:"SuÃça"},{code:"81",flag:"ð¯ðµ",name:"Japão"},{code:"86",flag:"ð¨ð³",name:"China"},{code:"82",flag:"ð°ð·",name:"Coreia do Sul"},{code:"91",flag:"ð®ð³",name:"Ãndia"},{code:"971",flag:"ð¦ðª",name:"Emirados Ãrabes"},{code:"972",flag:"ð®ð±",name:"Israel"},{code:"61",flag:"ð¦ðº",name:"Austrália"},{code:"64",flag:"ð³ð¿",name:"Nova Zelândia"},{code:"27",flag:"ð¿ð¦",name:"Ãfrica do Sul"},{code:"234",flag:"ð³ð¬",name:"Nigéria"},{code:"7",flag:"ð·ðº",name:"Rússia"}];function it({value:k,onChange:v,placeholder:y,required:a}){const[W,M]=u.useState(!1),[j,c]=u.useState("55"),D=u.useMemo(()=>pe.find(b=>b.code===j)||pe[0],[j]),$=u.useMemo(()=>k?k.startsWith(j)?k.slice(j.length):k:"",[k,j]),ne=b=>{const Q=b.replace(/\D/g,"");v(Q?j+Q:"")},oe=b=>{c(b),M(!1),$&&v(b+$)};return t.jsxs("div",{className:"flex gap-1.5",children:[t.jsxs(Ke,{open:W,onOpenChange:M,children:[t.jsx(Xe,{asChild:!0,children:t.jsxs(I,{type:"button",variant:"outline",role:"combobox",className:"w-[110px] shrink-0 justify-between px-2 font-normal",children:[t.jsx("span",{className:"text-base mr-1",children:D.flag}),t.jsxs("span",{className:"text-sm",children:["+",D.code]}),t.jsx(De,{className:"ml-auto h-3.5 w-3.5 opacity-50"})]})}),t.jsx(Ye,{className:"w-[260px] p-0",align:"start",children:t.jsxs(Ze,{children:[t.jsx(Ue,{placeholder:"Buscar paÃs..."}),t.jsxs(et,{children:[t.jsx(tt,{children:"Nenhum paÃs encontrado."}),t.jsx(at,{children:pe.map(b=>t.jsxs(rt,{value:b.name,onSelect:()=>oe(b.code),children:[t.jsx("span",{className:"text-base mr-2",children:b.flag}),t.jsx("span",{className:"flex-1 text-sm",children:b.name}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:["+",b.code]}),t.jsx(Re,{className:Oe("ml-2 h-3.5 w-3.5",j===b.code?"opacity-100":"opacity-0")})]},b.code+b.name))})]})]})})]}),t.jsx(re,{type:"tel",placeholder:y||"(11) 99999-9999",value:$,onChange:b=>ne(b.target.value),required:a,className:"flex-1"})]})}function lt({form:k,company:v,redirectUrl:y,isEmbed:a=!1}){const[W,M]=u.useState(!1),j=(y==null?void 0:y.includes("whatsapp.com"))||(y==null?void 0:y.startsWith("whatsapp://")),c=typeof window<"u"&&window.self!==window.top;return u.useEffect(()=>{if(!y)return;const D=setTimeout(()=>{try{if(c&&window.top){window.top.location.href=y;return}}catch{}window.location.href=y},800),$=setTimeout(()=>{M(!0)},2500);return()=>{clearTimeout(D),clearTimeout($)}},[y,c]),t.jsx("div",{className:`${a?"min-h-0":"min-h-screen bg-gradient-surface"} flex items-center justify-center text-foreground`,children:t.jsxs("div",{className:`${a?"p-0 shadow-none border-0 bg-transparent":"p-8 bg-card rounded-2xl shadow-medium border border-border"} text-center space-y-6 max-w-md w-full`,children:[t.jsx(We,{className:"w-16 h-16 mx-auto",style:{color:"hsl(var(--brand-h, 215), var(--brand-s, 78%), var(--brand-l, 54%))"}}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"text-lg font-medium",children:k.success_message||"Obrigado!"}),j&&t.jsx("p",{className:"text-sm text-muted-foreground",children:"Você será direcionado para o grupo do WhatsApp em instantes."})]}),y&&t.jsx(I,{asChild:!0,className:"w-full h-12 text-base text-primary-foreground",style:{backgroundColor:"hsl(var(--brand-h, 215), var(--brand-s, 78%), var(--brand-l, 54%))"},children:t.jsx("a",{href:y,target:c?"_top":j?void 0:"_blank",rel:"noopener noreferrer",children:j?"Entrar no grupo de WhatsApp":"Continuar"})}),W&&j&&t.jsx("p",{className:"text-sm text-muted-foreground",children:"Se não abrir automaticamente, clique no botão acima."}),!a&&(v==null?void 0:v.logo_url)&&t.jsx("img",{src:v.logo_url,alt:v.name||"Smart Dent",className:"h-8 mx-auto opacity-80"})]})})}function yt(){const{slug:k}=ze(),[v]=Ve(),{data:y}=He(),[a,W]=u.useState(null),[M,j]=u.useState([]),[c,D]=u.useState({}),[$,ne]=u.useState(!1),[oe,b]=u.useState(null),[Q,se]=u.useState(!0),[B,G]=u.useState(!1),[ge,fe]=u.useState(null),[ie,F]=u.useState(null),[Ee,he]=u.useState(0),[Y,le]=u.useState([]),[ce,$e]=u.useState(""),[R,be]=u.useState([]),[T,Fe]=u.useState(null),[x,Pe]=u.useState(null),[O,de]=u.useState([]),_=v.get("embed")==="1",xe=v.get("display")||(a==null?void 0:a.display_mode)||"list",J=xe==="step",Z=xe==="first_three",_e=u.useRef(null),ye=3,ve=2,[L,we]=u.useState(0),me=M.filter(e=>ot(e,c)),K=L+(L===0?ye:ve),Ie=me.slice(L,K),z=me,je=Z&&K<me.length,N=z.length,V=Math.min(Ee,Math.max(0,N-1)),U=J?z[V]?[z[V]]:[]:
1Z?Ie:z,ke=!J||V>=N-1;u.useEffect(()=>{if(!_)return;const e=_e.current;if(!e)return;let r=0;const n=()=>{var s;const l=Math.ceil(Math.max(e.scrollHeight,e.getBoundingClientRect().height));(s=window.parent)==null||s.postMessage({type:"smartops-form-height",height:l,slug:k},"*")},o=()=>{cancelAnimationFrame(r),r=requestAnimationFrame(()=>{n(),requestAnimationFrame(n)})};o();const i=typeof ResizeObserver<"u"?new ResizeObserver(o):null;i==null||i.observe(e);const m=[80,180,360,720].map(l=>window.setTimeout(n,l));return window.addEventListener("load",o),()=>{cancelAnimationFrame(r),m.forEach(l=>window.clearTimeout(l)),i==null||i.disconnect(),window.removeEventListener("load",o)}},[_,k,Q,$,L,U.length,ie,B]);const Ne=e=>{const r=c[e.id],n=r==null||r===""||Array.isArray(r)&&r.length===0;return e.required&&n?`Campo "${e.label}" é obrigatório.`:!n&&e.field_type==="email"&&!/^\S+@\S+\.\S+$/.test(String(r))?"Informe um e-mail válido.":!n&&e.field_type==="phone"&&String(r).replace(/\D/g,"").length<10?"Informe um telefone válido.":null},Me=()=>{const e=z[V];if(e){const r=Ne(e);if(r){F(r);return}}F(null),he(r=>Math.min(r+1,N-1))},Be=()=>{F(null),he(e=>Math.max(0,e-1))};u.useEffect(()=>{(async()=>{if(!k)return;const{data:r}=await P.from("smartops_forms").select("*").eq("slug",k).single();if(!r){fe("Formulário não encontrado."),se(!1);return}if(!r.active){fe("Formulário temporariamente indisponÃvel."),se(!1);return}W(r);const{data:n}=await P.from("smartops_form_fields").select("*").eq("form_id",r.id).order("order_index");n&&j(n),se(!1)})()},[k]);const C=(a==null?void 0:a.form_purpose)==="feira_evento",ee=Array.isArray(a==null?void 0:a.event_categories)?a.event_categories:[],{data:Ce=[]}=st(),Se=u.useMemo(()=>{if(!C||ee.length===0||O.length>0)return[];const e=new Set(ee),r=[];for(const i of Ce){const m=e.has(i.category),l=i.subcategories.filter(s=>m||e.has(Ae(i.category,s.label)));l.length>0?r.push({category:i.category,options:l.map(s=>({key:Ae(i.category,s.label),label:s.label}))}):m&&r.push({category:i.category,options:[{key:i.category,label:i.category}]})}const n=new Set(r.flatMap(i=>i.options.map(m=>m.key)).concat(r.map(i=>i.category))),o=ee.filter(i=>!n.has(i));return o.length>0&&r.push({category:"Outros",options:o.map(i=>({key:i,label:i.includes(" > ")?i.split(" > ")[1]:i}))}),r},[C,ee.join("|"),Ce,O.length]);u.useEffect(()=>{const e=a==null?void 0:a.id;if(!C||!e){le([]);return}let r=!1;return(async()=>{const{data:n,error:o}=await P.rpc("fn_public_event_consultants",{p_form_id:e});if(!r){if(o){console.warn("[form] consultores do evento",o.message),le([]);return}le(n??[])}})(),()=>{r=!0}},[C,a==null?void 0:a.id]),u.useEffect(()=>{const e=a==null?void 0:a.event_id;if(!C||!e){de([]);return}let r=!1;return(async()=>{const{data:n,error:o}=await P.rpc("fn_public_event_combos",{p_event_id:e});if(!r){if(o){de([]);return}de((n??[]).map(i=>({title:i.section_title,description:i.section_description,imageUrl:i.section_image_url??null,mainProduct:i.main_product_name??null})))}})(),()=>{r=!0}},[C,a==null?void 0:a.id,a==null?void 0:a.event_id]),u.useEffect(()=>{if(!a)return;const e=`${window.location.origin}${window.location.pathname}`,r=a.seo_title||`${a.title||a.name} | Smart Dent`,n=a.seo_description||a.subtitle||(a.description||"").replace(/\s+/g," ").slice(0,155),o=[],i=(l,s,p)=>{if(!p)return;let d=document.querySelector(`meta[${l}="${s}"]`);d||(d=document.createElement("meta"),d.setAttribute(l,s),document.head.appendChild(d),o.push(d)),d.setAttribute("content",p)};document.title=r,i("name","description",n),i("name","keywords",a.seo_keywords),i("property","og:title",r),i("property","og:description",n),i("property","og:type","website"),i("property","og:url",e),i("property","og:image",a.hero_image_url),i("name","twitter:card","summary_large_image");let m=document.querySelector('link[rel="canonical"]');return m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m),o.push(m)),m.href=e,()=>{o.forEach(l=>l.remove())}},[a]),u.useEffect(()=>{if(!a)return;const e=a.brand_color_h??215,r=a.brand_color_s??78,n=a.brand_color_l??54,o=document.documentElement;return o.style.setProperty("--brand-h",String(e)),o.style.setProperty("--brand-s",`${r}%`),o.style.setProperty("--brand-l",`${n}%`),()=>{o.style.removeProperty("--brand-h"),o.style.removeProperty("--brand-s"),o.style.removeProperty("--brand-l")}},[a==null?void 0:a.brand_color_h,a==null?void 0:a.brand_color_s,a==null?void 0:a.brand_color_l]),u.useEffect(()=>{if(!a)return;
1const e=Array.from(new Set([a.font_heading,a.font_body].filter(Boolean)));if(e.length===0)return;const n=`https://fonts.googleapis.com/css2?${e.map(i=>`family=${encodeURIComponent(i)}:wght@400;500;600;700;800`).join("&")}&display=swap`,o=document.createElement("link");return o.rel="stylesheet",o.href=n,document.head.appendChild(o),()=>{document.head.removeChild(o)}},[a]),u.useEffect(()=>{if(!a)return;const e=a,r=[],n=document.documentElement.outerHTML,o=l=>{document.head.appendChild(l),r.push(l)},i=l=>{const s=document.createElement("script");s.text=l,o(s)},m=l=>{const s=document.createElement("script");s.async=!0,s.src=l,o(s)};if(e.tracking_gtm_id&&!n.includes(e.tracking_gtm_id)&&i(`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','${e.tracking_gtm_id}');`),e.tracking_ga4_id&&!n.includes(e.tracking_ga4_id)&&(m(`https://www.googletagmanager.com/gtag/js?id=${e.tracking_ga4_id}`),i(`window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}window.gtag=window.gtag||gtag;gtag('js',new Date());gtag('config','${e.tracking_ga4_id}',{send_page_view:true});`)),e.tracking_meta_pixel_id&&!n.includes(e.tracking_meta_pixel_id)&&i(`!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init','${e.tracking_meta_pixel_id}');fbq('track','PageView');`),e.tracking_tiktok_pixel_id&&!n.includes(e.tracking_tiktok_pixel_id)&&i(`!function(w,d,t){w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie","holdConsent","revokeConsent","grantConsent"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var r="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=r,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};n=document.createElement("script");n.type="text/javascript",n.async=!0,n.src=r+"?sdkid="+e+"&lib="+t;e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e)};ttq.load('${e.tracking_tiktok_pixel_id}');ttq.page();}(window,document,'ttq');`),e.tracking_extra_head){const l=document.createElement("div");l.setAttribute("data-tracking-extra","1"),l.innerHTML=e.tracking_extra_head,l.querySelectorAll("script").forEach(s=>{const p=document.createElement("script");for(const d of Array.from(s.attributes))p.setAttribute(d.name,d.value);p.text=s.textContent||"",o(p)})}return()=>{r.forEach(l=>l.remove())}},[a]),u.useEffect(()=>{a&&!_&&ue({channel:"form",event_type:"view",form_id:a.id,campaign_slug:v.get("c")})},[a==null?void 0:a.id]),u.useEffect(()=>{var o,i,m;if(!a)return;const e=a,r=new URLSearchParams(window.location.search),n=e.seo_title||`${e.name} | Smart Dent`;document.title=n;try{const l=window.gtag;typeof l=="function"&&l("event","page_view",{page_path:window.location.pathname,page_title:n,page_location:window.location.href,page_referrer:document.referrer||void 0,form_slug:e.slug,form_name:e.name,campaign_source:r.get("utm_source")||void 0,campaign_medium:r.get("utm_medium")||void 0,campaign_name:r.get("utm_campaign")||void 0,campaign_content:r.get("utm_content")||void 0,campaign_term:r.get("utm_term")||void 0})}catch{}
1try{(o=window.fbq)==null||o.call(window,"track","ViewContent",{content_name:e.name,content_category:"form"})}catch{}try{(m=(i=window.ttq)==null?void 0:i.page)==null||m.call(i)}catch{}},[a]);const Te=e=>{try{const r=e.currentTarget,n=document.createElement("canvas");n.width=60,n.height=60;const o=n.getContext("2d");if(!o)return;o.drawImage(r,0,0,60,60);const{data:i}=o.getImageData(0,0,60,60);let m=-1,l=0,s=0,p=-1;for(let d=0;d<i.length;d+=4){const w=i[d]/255,g=i[d+1]/255,f=i[d+2]/255,h=Math.max(w,g,f),q=Math.min(w,g,f),E=(h+q)/2;if(E<.18||E>.82)continue;const S=h-q;if(S<.12)continue;const X=S/(1-Math.abs(2*E-1)),qe=X*(1-Math.abs(E-.45)*1.5);if(qe>p){p=qe;let ae=0;h===w?ae=((g-f)/S+(g<f?6:0))/6:h===g?ae=((f-w)/S+2)/6:ae=((w-g)/S+4)/6,m=Math.round(ae*360),l=Math.round(X*100),s=Math.round(E*100)}}if(m>=0){const d=document.documentElement;d.style.setProperty("--brand-h",String(m)),d.style.setProperty("--brand-s",`${l}%`),d.style.setProperty("--brand-l",`${s}%`)}}catch{}},A=(e,r)=>{D(n=>({...n,[e]:r}))},Le=async e=>{if(e.preventDefault(),!a)return;G(!0);const r=new Set(z.map(s=>s.id)),n=M.filter(s=>r.has(s.id)),o={source:"form",form_name:a.name,form_id:a.id,product_catalog_id:a.product_catalog_id,form_purpose:a.form_purpose,form_responses:n.filter(s=>c[s.id]!==void 0&&c[s.id]!==null&&c[s.id]!=="").map(s=>({label:s.label,value:Array.isArray(c[s.id])?c[s.id].join(", "):String(c[s.id])}))};if(C){if(Y.length>0&&!ce){te("Selecione o consultor que fez o atendimento."),G(!1);return}const s=Y.find(p=>p.id===ce);if(s&&(o.event_consultant_team_member_id=s.id,o.proprietario_lead_crm=s.nome_completo,o.form_responses.push({label:"Consultor",value:s.nome_completo})),a.event_id&&(o.event_id=a.event_id),R.length>0){o.event_interest_categories=R,o.form_responses.push({label:O.length>0?"Combos de interesse":"Categorias de interesse",value:R.join(", ")});const d=O.filter(w=>R.includes(w.title)).map(w=>(w.mainProduct||w.title).trim()).filter(Boolean);d.length>0&&!T&&(o.produto_interesse=d[0],o.form_responses.push({label:"Produto de interesse",value:d.join(", ")}))}if(T){const p=T.product_name;o.produto_interesse=p,o.product_catalog_id=T.product_catalog_id,o.form_responses.push({label:"Produto de interesse",value:p})}}if((a.capture_buttons_enabled&&Array.isArray(a.capture_buttons)?a.capture_buttons:[]).length>0&&!x){te("Selecione uma das opções de interesse."),G(!1);return}if(x){const s=x.product_name||x.label;o.produto_interesse=s,x.product_catalog_id&&(o.product_catalog_id=x.product_catalog_id),o.form_responses.push({label:"Produto de interesse",value:s})}const m={};for(const s of n){const p=c[s.id],d=p==null||p===""||Array.isArray(p)&&p.length===0;if(d&&s.required){te(`Campo "${s.label}" é obrigatório.`),G(!1);return}d||(s.db_column?o[s.db_column]=p:s.custom_field_name&&(m[s.custom_field_name]=p))}const l=["utm_source","utm_medium","utm_campaign","utm_term"];for(const s of l){const p=v.get(s);p&&(o[s]=p)}Object.keys(m).length>0&&(o.raw_payload={custom_fields:m}),o.field_answers=n.filter(s=>c[s.id]!==void 0&&c[s.id]!==null&&c[s.id]!=="").map(s=>({field_id:s.id,value:Array.isArray(c[s.id])?JSON.stringify(c[s.id]):String(c[s.id])})),o.email||(o.email=`form-${Date.now()}@no-email.com`),o.nome||(o.nome="Anônimo");try{const{data:s,error:p}=await P.functions.invoke("smart-ops-ingest-lead",{body:o});if(p)throw p;await P.from("smartops_forms").update({submissions_count:a.submissions_count+1}).eq("id",a.id);const d=s==null?void 0:s.lead_id;if(d){const g=v.get("channel")==="specialist"?"specialist":"form";ue({channel:g,event_type:"lead",form_id:a.id,lead_id:d,campaign_slug:v.get("c")})}if(d&&Qe(d),d&&!(s!=null&&s.answers_stored)){const g=n.map(f=>{const h=c[f.id];if(h==null||h==="")return null;const q=Array.isArray(h)?h.join(", "):String(h);return{form_id:a.id,field_id:f.id,lead_id:d,value:q,workflow_cell_target:f.workflow_cell_target??null,field_label:f.label}}).filter(Boolean);x!=null&&x.workflow_stage_target&&g.push({form_id:a.id,field_id:a.id,lead_id:d,value:x.product_name||x.label,workflow_cell_target:x.workflow_stage_target,field_label:`Botão: ${x.label}`}),g.length>0&&P.from("smartops_form_field_responses").insert(g).then(({error:f})=>{f&&console.error("[PublicFormPage] Erro ao gravar field responses:",f)})}if(d){const g=n.filter(f=>c[f.id]!==void 0&&c[f.id]!==null&&c[f.id]!=="").map(f=>({label:f.label,value:Array.isArray(c[f.id])?c[f.id].join(", "):String(c[f.id])}));g.length>0&&P.functions.invoke("smart-ops-deal-form-note",{body:{lead_id:d,form_name:a.name,responses:g}}).catch(f=>console.warn("[PublicFormPage] Deal note error:",f))}try{typeof window<"u"&&window.dataLayer&&window.dataLayer.push({event:"generate_lead",form_name:a.name??"",form_purpose:a.form_purpose??"",product_name:a.workflow_stage_target??""})}catch(g){console.error("GTM dataLayer error:",g)}try{const g=window.fbq;typeof g=="function"&&g("track","Lead",{content_name:a.name??""})}catch{}try{const g=window.gtag;typeof g=="function"&&g("event","generate_lead",{form_name:a.name??"",form_purpose:a.form_purpose??""})}catch{}try{const g=window.ttq;g&&typeof g.track=="function"&&g.track("SubmitForm",{content_name:a.name??""})}catch{}const w=a.success_redirect_url;w&&b(w),ne(!0)}catch(s){te(`Erro ao enviar: ${s.message||"tente novamente"}`)}finally{G(!1)}},te=e=>{F(e),setTimeout(()=>F(null),4e3)};return Q?t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:t.jsx("p",{className:"text-muted-foreground",children:"Carregando..."})}):ge||!a?t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:t.jsx("p",{className:"text-destructive",children:ge||"Formulário não encontrado"})}):$?t.jsx(lt,{form:a,company:y,redirectUrl:oe,isEmbed:_}):t.jsxs("div",{ref:_e,className:`public-form-page flex flex-col items-center ${_?"p-0":"min-h-screen p-4 pt-8 md:pt-16"} ${a.theme_mode==="dark"?"dark":""}`,"data-layout":a.layout_variant||"split","data-embed":_?"true":"false","data-pp-default":(()=>{const e=a,r=e.bg_type||"solid";return r==="gradient"&&e.bg_color&&e.bg_color_to||r==="image"&&e.bg_image_url||r==="solid"&&e.bg_color?"false":"true"})(),style:(()=>{const e=a,r=e.bg_type||"solid";let n={};if(r==="gradient"&&e.bg_color&&e.bg_color_to)n={background:`linear-gradient(${e.bg_gradient_angle??135}deg, ${e.bg_color}, ${e.bg_color_to})`};else if(r==="image"&&e.bg_image_url){const h=e.bg_overlay_opacity??.5;n={backgroundImage:`linear-gradient(rgba(0,0,0,${h}), rgba(0,0,0,${h})), url("${e.bg_image_url}")`,backgroundSize:"cover",backgroundPosition:"center",backgroundAttachment:"fixed"}}else r==="solid"&&e.bg_color?n={backgroundColor:e.bg_color}:n={backgroundColor:"#EEF1F6"};const o=h=>{const q=h.replace("#",""),E=q.length===3?q.split("").map(X=>X+X).join(""):q,S=parseInt(E,16);return{r:S>>16&255,g:S>>8&255,b:S&255}},i=h=>{if(!h||!/^#?[0-9a-fA-F]{3,6}$/.test(h))return e.theme_mode!=="dark";try{const{r:q,g:E,b:S}=o(h);return(q*299+E*587+S*114)/1e3>
1150}catch{return!0}},m=r==="image"?null:e.bg_color||null,l=r==="image"?!1:i(m),s=e.auto_contrast!==!1,p=l?"#0f172a":"#f8fafc",d=l?"#1f2937":"#e5e7eb",w=l?"#0f172a":"#f1f5f9",g=l?"rgba(15,23,42,0.65)":"rgba(248,250,252,0.7)",f={"--form-heading":!s&&e.heading_color?e.heading_color:p,"--form-body":!s&&e.body_color?e.body_color:d,"--form-label":!s&&e.label_color?e.label_color:w,"--form-muted":!s&&e.muted_color?e.muted_color:g};return{...n,...f}})(),children:[t.jsx("style",{children:` 2 :root { 3 --brand-h: 215; 4 --brand-s: 78%; 5 --brand-l: 54%; 6 } 7 .public-form-page[data-embed="true"] { 8 background: transparent !important; 9 min-height: 0; 10 --form-heading: #0f172a !important; 11 --form-body: #1f2937 !important; 12 --form-label: #0f172a !important; 13 --form-muted: rgba(15,23,42,0.62) !important; 14 } 15 .public-form-page[data-embed="true"] .brand-strip { display: none !important; } 16 .public-form-page[data-embed="true"] label, 17 .public-form-page[data-embed="true"] .text-foreground { 18 color: #0f172a !important; 19 font-size: 0.8125rem; 20 font-weight: 600; 21 letter-spacing: 0.01em; 22 } 23 .public-form-page[data-embed="true"] input, 24 .public-form-page[data-embed="true"] select, 25 .public-form-page[data-embed="true"] textarea { 26 background: #fff; 27 border-color: rgba(15,23,42,0.14); 28 } 29 .public-form-page { 30 --brand: hsl(var(--brand-h), var(--brand-s), var(--brand-l)); 31 --brand-dark: hsl(var(--brand-h), var(--brand-s), calc(var(--brand-l) - 12%)); 32 --brand-glow: hsl(var(--brand-h), 90%, calc(var(--brand-l) + 14%)); 33 --brand-faint: hsla(var(--brand-h), var(--brand-s), var(--brand-l), 0.12); 34 --brand-border:hsla(var(--brand-h), var(--brand-s), var(--brand-l), 0.28); 35 font-family: ${a.font_body?`"${a.font_body}", `:""}'Inter', system-ui, -apple-system, sans-serif; 36 color: var(--form-body); 37 } 38 .public-form-page h1, .public-form-page h2, .public-form-page h3 { 39 font-family: ${a.font_heading?`"${a.font_heading}", `:""}'Inter', system-ui, -apple-system, sans-serif; 40 color: var(--form-heading); 41 letter-spacing: -0.01em; 42 } 43 .public-form-page label { color: var(--form-label); } 44 .public-form-page .text-muted-foreground { color: var(--form-muted) !important; } 45 .public-form-page .text-foreground { color: var(--form-heading) !important; } 46 .public-form-page.dark input, .public-form-page.dark select, .public-form-page.dark textarea { 47 background-color: rgba(255,255,255,0.06); color: #f5f5f5 !important; border-color: rgba(255,255,255,0.18); 48 caret-color: #f5f5f5 !important; 49 } 50 .public-form-page.dark input::placeholder, 51 .public-form-page.dark select::placeholder, 52 .public-form-page.dark textarea::placeholder { 53 color: rgba(255,255,255,0.6) !important; 54 opacity: 1; 55 } 56 /* Always keep typed text legible on the light input background used by the form panel */ 57 .public-form-page:not(.dark) input, 58 .public-form-page:not(.dark) select, 59 .public-form-page:not(.dark) textarea { 60 color: #0F172A !important; 61 caret-color: #0F172A !important; 62 } 63 .public-form-page:not(.dark) input::placeholder, 64 .public-form-page:not(.dark) select::placeholder, 65 .public-form-page:not(.dark) textarea::placeholder { 66 color: #64748B !important; 67 opacity: 1; 68 } 69 /* KB-style fallback form panel (only when no custom background) */ 70 .public-form-page[data-pp-default="true"] form { 71 background: #FFFFFF; 72 border: 1px solid rgba(0,0,0,0.07); 73 border-radius: 14px; 74 box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); 75 padding: 24px; 76 } 77 .public-form-page[data-pp-default="true"] input, 78 .public-form-page[data-pp-default="true"] select, 79 .public-form-page[data-pp-default="true"] textarea { 80 background: #E8ECF4; 81 border: 1px solid #C8CACF; 82 border-radius: 10px; 83 color: #0F172A; 84 caret-color: #0F172A; 85 } 86 .public-form-page[data-pp-default="true"] input::placeholder, 87 .public-form-page[data-pp-default="true"] select::placeholder, 88 .public-form-page[data-pp-default="true"] textarea::placeholder { 89 color: #64748B; 90 opacity: 1; 91 } 92 .public-form-page[data-pp-default="true"] input:hover, 93 .public-form-page[data-pp-default="true"] select:hover, 94 .public-form-page[data-pp-default="true"] textarea:hover { background: #E2E6EE; } 95 .public-form-page button[type="submit"] { 96 border-radius: ${{none:"0",sm:"6px",md:"10px",lg:"16px",pill:"9999px"}[a.button_radius||"md"]}; 97 box-shadow: ${{none:"none",sm:"0 2px 8px rgba(0,0,0,0.08)",md:"0 8px 24px rgba(0,0,0,0.12)",glow:"0 0 32px var(--brand-faint), 0 4px 16px var(--brand-faint)"}[a.button_shadow||"sm"]}; 98 transition: transform .15s ease, box-shadow .15s ease; 99 } 100 .public-form-page button[type="submit"]:hover { transform: translateY(-1px); } 101 .public-form-page .brand-strip { 102 background: var(--brand); 103 } 104 .public-form-page input:focus, 105 .public-form-page select:focus, 106 .public-form-page textarea:focus { 107 outline: none; 108 box-shadow: 0 0 0 2px var(--brand-faint), 0 0 0 1px var(--brand-border); 109 border-color: var(--brand); 110 } 111 .public-form-page .video-glow { 112 box-shadow: 0 0 32px var(--brand-faint); 113 } 114 .public-form-page[data-layout="centered"] .form-grid { grid-template-columns: 1fr !important; max-width: 640px; margin-inline: auto; } 115 .public-form-page[data-layout="centered"] .form-grid > div:first-child { text-align: center; } 116 .public-form-page[data-layout="full"] .form-grid { grid-template-columns: 1fr !important; } 117 ${a.custom_css||""} 118 `}
118),!_&&t.jsx("div",{className:"brand-strip fixed top-0 left-0 right-0 h-1 z-50"}),!_&&a.form_purpose!=="feira_evento"&&t.jsx("a",{href:Ge({formId:a.id,product:x==null?void 0:x.product_name})+"&utm_source=form_page&utm_medium=whatsapp_lia",target:"_blank",rel:"noopener noreferrer",onClick:()=>ue({channel:"whatsapp_lia",event_type:"click",form_id:a.id}),"aria-label":"Falar pelo WhatsApp com a Dra. LIA",className:"fixed bottom-5 right-5 z-50 inline-flex h-14 w-14 items-center justify-center rounded-full text-white shadow-lg transition hover:scale-105",style:{background:"var(--lp-whatsapp, #25D366)"},children:t.jsx(Je,{className:"h-7 w-7"})}),t.jsxs("div",{className:_?"form-grid w-full max-w-xl grid grid-cols-1 items-start":"form-grid w-full max-w-5xl mt-1 grid grid-cols-1 md:grid-cols-2 gap-8 md:gap-12 items-start",children:[t.jsxs("div",{className:`space-y-6 ${_?"hidden":""}`,children:[a.hero_image_url&&t.jsx("img",{src:a.hero_image_url,alt:a.hero_image_alt??"",className:"w-full rounded-lg object-cover",crossOrigin:"anonymous",onLoad:Te}),t.jsxs("div",{className:"space-y-2",children:[a.badge_text&&t.jsx("span",{className:"inline-block text-xs font-bold uppercase tracking-widest px-3 py-1 rounded-full",style:{backgroundColor:"var(--brand-faint)",color:"var(--brand)",border:"1px solid var(--brand-border)"},children:a.badge_text}),t.jsx("h1",{className:"text-2xl font-bold",children:a.title||a.name}),a.subtitle&&t.jsx("p",{className:"text-lg text-muted-foreground",children:a.subtitle}),a.description&&t.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]})]}),t.jsx("div",{children:t.jsxs("form",{onSubmit:e=>{if(J&&!ke){e.preventDefault(),Me();return}if(je){e.preventDefault();for(const r of U){const n=Ne(r);if(n){F(n);return}}F(null),we(K);return}Le(e)},className:"space-y-5",children:[J&&a.show_progress!==!1&&N>0&&t.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted overflow-hidden",children:t.jsx("div",{className:"h-full transition-all duration-300",style:{width:`${(V+1)/N*100}%`,backgroundColor:"var(--brand)"}})}),Z&&N>0&&a.show_progress!==!1&&t.jsxs("div",{className:"space-y-1.5",children:[t.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted overflow-hidden",children:t.jsx("div",{className:"h-full transition-all duration-300",style:{width:`${Math.min(K,N)/N*100}%`,backgroundColor:"var(--brand)"}})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:U.length>1?`Perguntas ${L+1}â${Math.min(K,N)} de ${N}`:`Pergunta ${L+1} de ${N}`})]}),C&&Y.length>0&&t.jsxs("div",{className:"space-y-1.5",children:[t.jsxs(H,{style:_?{color:"#0f172a",opacity:1}:void 0,children:["Consultores no estande ",t.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),t.jsx("div",{className:"grid grid-cols-2 gap-2",children:Y.map(e=>{const r=ce===e.id;return t.jsxs("label",{className:`flex min-h-12 items-center gap-2 rounded-md border px-3 py-2.5 text-sm cursor-pointer transition-colors ${r?"border-primary bg-primary/10 ring-1 ring-primary/20":"border-input bg-card"}`,children:[t.jsx("input",{type:"checkbox",checked:r,onChange:n=>$e(n.target.checked?e.id:"")}),t.jsx("span",{className:"truncate",children:e.nome_completo})]},e.id)})})]}),C&&O.length>0&&t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{style:_?{color:"#0f172a",opacity:1}:void 0,children:"Combos promocionais do evento"}),t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:O.map(e=>{const r=R.includes(e.title);return t.jsxs("label",{className:`relative flex flex-row md:flex-col overflow-hidden rounded-lg border text-sm cursor-pointer transition-colors h-auto min-h-[5.5rem] md:h-auto ${r?"border-primary bg-primary/5":"border-input"}`,children:[t.jsx("input",{type:"checkbox",className:"absolute left-2 top-2 z-10",checked:r,onChange:n=>be(o=>n.target.checked?[...o,e.title]:o.filter(i=>i!==e.title))}),t.jsx("div",{className:"relative w-24 shrink-0 aspect-square md:w-full md:aspect-[4/3] bg-muted/40",children:e.imageUrl?t.jsx("img",{src:e.imageUrl,alt:e.title,loading:"lazy",className:"h-full w-full object-contain p-2"}):t.jsx("span",{className:"flex h-full w-full items-center justify-center px-2 text-center text-xs text-muted-foreground",children:e.title})}),t.jsx("div",{className:"flex flex-1 items-center md:items-start p-3 md:p-2",children:t.jsx("span",{className:"block font-medium leading-tight line-clamp-2",children:e.title})})]},e.title)})})]}),C&&Se.length>0&&t.jsxs("div",{className:"space-y-3",children:[t.jsx(H,{style:_?{color:"#0f172a",opacity:1}:void 0,children:"Interesses"}),Se.map(e=>t.jsxs("div",{className:"space-y-1.5",children:[t.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:e.category}),t.jsx("div",{className:"grid grid-cols-2 gap-2",children:e.options.map(r=>{const n=R.includes(r.key);return t.jsxs("label",{className:`flex min-h-12 items-center gap-2 rounded-md border px-3 py-2.5 text-sm cursor-pointer transition-colors ${n?"border-primary bg-primary/10 ring-1 ring-primary/20":"border-input bg-card"}`,children:[t.jsx("input",{type:"checkbox",checked:n,onChange:o=>be(i=>
118o.target.checked?[...i,r.key]:i.filter(m=>m!==r.key))}),t.jsx("span",{className:"leading-tight",children:r.label})]},r.key)})})]},e.category))]}),C&&Array.isArray(a.event_product_buttons)&&a.event_product_buttons.length>0&&t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(H,{style:_?{color:"#0f172a",opacity:1}:void 0,children:"Produto de interesse"}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:a.event_product_buttons.slice(0,3).map(e=>{const r=(T==null?void 0:T.product_catalog_id)===e.product_catalog_id;return t.jsx(I,{type:"button",variant:r?"default":"outline",className:"min-h-12 h-auto whitespace-normal py-2.5 text-sm","aria-pressed":r,onClick:()=>Fe(r?null:e),style:r?{backgroundColor:"var(--brand)",borderColor:"var(--brand-dark)"}:void 0,children:e.label},`${e.product_catalog_id}-${e.label}`)})})]}),a.capture_buttons_enabled&&Array.isArray(a.capture_buttons)&&a.capture_buttons.length>0&&t.jsxs("div",{className:"space-y-1.5",children:[t.jsxs(H,{style:_?{color:"#0f172a",opacity:1}:void 0,children:["Qual é o seu interesse? ",t.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:a.capture_buttons.map((e,r)=>{const n=(x==null?void 0:x.label)===e.label;return t.jsx(I,{type:"button",variant:n?"default":"outline",className:"min-h-12 h-auto whitespace-normal py-2.5 text-sm","aria-pressed":n,onClick:()=>Pe(n?null:e),style:n?{backgroundColor:"var(--brand)",borderColor:"var(--brand-dark)"}:void 0,children:e.label},`${r}-${e.label}`)})})]}),U.map(e=>t.jsxs("div",{className:"space-y-1.5",children:[e.help_text&&t.jsx("p",{className:"text-xs text-muted-foreground bg-muted/50 rounded-md px-3 py-2 border-l-2 border-primary",style:_?{color:"#475569"}:void 0,children:e.help_text}),t.jsxs(H,{style:_?{color:"#0f172a",opacity:1}:void 0,children:[e.label,e.required&&t.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),e.field_type==="text"&&t.jsx(re,{placeholder:e.placeholder||"",value:c[e.id]||"",onChange:r=>A(e.id,r.target.value),required:e.required,className:"h-12 text-base md:h-10 md:text-sm"}),e.field_type==="email"&&t.jsx(re,{type:"email",placeholder:e.placeholder||"[email protected]",value:c[e.id]||"",onChange:r=>A(e.id,r.target.value),required:e.required,className:"h-12 text-base md:h-10 md:text-sm"}),e.field_type==="phone"&&t.jsx(it,{placeholder:e.placeholder||"(11) 99999-9999",value:c[e.id]||"",onChange:r=>A(e.id,r),required:e.required}),e.field_type==="number"&&t.jsx(re,{type:"number",placeholder:e.placeholder||"",value:c[e.id]||"",onChange:r=>A(e.id,r.target.value),required:e.required,className:"h-12 text-base md:h-10 md:text-sm"}),e.field_type==="textarea"&&t.jsx("textarea",{className:"w-full border rounded-md p-3 text-base min-h-[140px] bg-background border-input md:p-2 md:text-sm md:min-h-[100px]",placeholder:e.placeholder||"",value:c[e.id]||"",onChange:r=>A(e.id,r.target.value),required:e.required}),e.field_type==="select"&&t.jsxs("select",{className:"w-full border rounded-md h-12 px-3 text-base bg-background border-input md:h-10 md:px-2 md:text-sm",value:c[e.id]||"",onChange:r=>A(e.id,r.target.value),required:e.required,children:[t.jsx("option",{value:"",children:e.placeholder||"Selecione..."}),(Array.isArray(e.options)?e.options:[]).map(r=>t.jsx("option",{value:r,children:r},r))]}),e.field_type==="radio"&&t.jsx("div",{className:"grid grid-cols-2 gap-2",children:(Array.isArray(e.options)?e.options:[]).map(r=>{const n=c[e.id]===r;return t.jsxs("label",{className:`flex min-h-12 items-center gap-2 rounded-md border px-3 py-2.5 text-sm cursor-pointer transition-colors ${n?"border-primary bg-primary/10 ring-1 ring-primary/20":"border-input bg-card"}`,children:[t.jsx("input",{type:"radio",name:`field-${e.id}`,value:r,checked:n,onChange:()=>A(e.id,r),required:e.required&&!c[e.id],className:"w-5 h-5 md:w-4 md:h-4"}),t.jsx("span",{className:"leading-tight",children:r})]},r)})}),e.field_type==="checkbox"&&t.jsx("div",{className:"grid grid-cols-2 gap-2",children:(Array.isArray(e.options)?e.options:[]).map(r=>{const n=(c[e.id]||[]).includes(r);return t.jsxs("label",{className:`flex min-h-12 items-center gap-2 rounded-md border px-3 py-2.5 text-sm cursor-pointer transition-colors ${n?"border-primary bg-primary/10 ring-1 ring-primary/20":"border-input bg-card"}`,children:[t.jsx("input",{type:"checkbox",checked:n,onChange:o=>{const i=c[e.id]||[];A(e.id,o.target.checked?[...i,r]:i.filter(m=>m!==r))},className:"w-5 h-5 md:w-4 md:h-4"}),t.jsx("span",{className:"leading-tight",children:r})]},r)})}),e.field_type==="slider"&&(()=>{const r=e.options&&!Array.isArray(e.options)?e.options:{},n=r.min??0,o=r.mid??50,i=r.max??100,m=c[e.id]??o;return t.jsxs("div",{className:"space-y-3 pt-2",children:[t.jsx(nt,{min:n,max:i,step:1,value:[m],onValueChange:([l])=>A(e.id,l)}),t.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[t.jsx("span",{children:n}),t.jsx("span",{children:o}),t.jsx("span",{children:i})]}),t.jsxs("p",{className:"text-sm font-medium text-center",children:["Valor: ",m]})]})})()]},e.id)),ie&&t.jsx("p",{className:"text-sm text-destructive",children:ie}),J?t.jsxs("div",{className:"flex gap-2",children:[V>
1180&&t.jsx(I,{type:"button",variant:"outline",className:"flex-1",onClick:Be,disabled:B,children:"Voltar"}),t.jsx(I,{type:"submit",className:"flex-1",disabled:B,style:{backgroundColor:"var(--brand)",borderColor:"var(--brand-dark)"},children:B?"Enviando...":ke?a.cta_text||"Enviar":"Próximo"})]}):t.jsxs("div",{className:"flex gap-2",children:[Z&&L>0&&t.jsx(I,{type:"button",variant:"outline",className:"flex-1",disabled:B,onClick:()=>{F(null),we(e=>e<=ye?0:e-ve)},children:"Voltar"}),t.jsx(I,{type:"submit",className:"flex-1",disabled:B,style:{backgroundColor:"var(--brand)",borderColor:"var(--brand-dark)"},children:B?"Enviando...":je?"Continuar":a.cta_text||"Enviar"})]}),a.trust_text&&t.jsx("p",{className:"text-xs text-center text-muted-foreground pt-1",children:a.trust_text})]})})]}),!_&&Array.isArray(a.extra_sections)&&a.extra_sections.length>0&&t.jsx("div",{className:"w-full max-w-5xl mt-12 space-y-12",children:a.extra_sections.map((e,r)=>!e||!e.type?null:t.jsxs("section",{className:"space-y-4",children:[e.title&&t.jsx("h2",{className:"text-2xl font-bold text-center",children:e.title}),e.type==="testimonials"&&t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:(e.items||[]).map((n,o)=>t.jsxs("div",{className:"rounded-lg border p-4 space-y-2 bg-card",children:[t.jsxs("p",{className:"text-sm italic",children:['"',n.quote,'"']}),t.jsxs("div",{className:"text-xs",children:[t.jsx("p",{className:"font-semibold",children:n.name}),n.role&&t.jsx("p",{className:"text-muted-foreground",children:n.role})]})]},o))}),e.type==="features"&&t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:(e.items||[]).map((n,o)=>t.jsxs("div",{className:"rounded-lg border p-4 space-y-2 bg-card",children:[t.jsx("div",{className:"text-2xl",children:n.icon||"â¨"}),t.jsx("h3",{className:"font-semibold",children:n.title}),t.jsx("p",{className:"text-sm text-muted-foreground",children:n.text})]},o))}),e.type==="faq"&&t.jsx("div",{className:"space-y-2 max-w-3xl mx-auto",children:(e.items||[]).map((n,o)=>t.jsxs("details",{className:"rounded-lg border p-3 bg-card",children:[t.jsx("summary",{className:"font-medium cursor-pointer",children:n.q}),t.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:n.a})]},o))}),e.type==="logos"&&t.jsx("div",{className:"flex flex-wrap items-center justify-center gap-6 opacity-80",children:(e.items||[]).map((n,o)=>n.src?t.jsx("img",{src:n.src,alt:n.alt||"",className:"h-10 object-contain",loading:"lazy"},o):null)})]},r))})]})}export{yt as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.