PageSourceSearch

https://eumilitar.com/_next/static/chunks/1632-8afdef0394c31dc5.js

js eumilitar.com collected 2026-10-09 17:10:44 UTC 12,226 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1632,3857,6038],{8649:(e,t,a)=>{a.d(t,{Hw:()=>o,MY:()=>i,bx:()=>s,l3:()=>n,vr:()=>r});let r=!0,n=!1,o=!0,i=!0,s=!1},13857:(e,t,a)=>{a.d(t,{IX:()=>c,ZS:()=>l,evaluateSmokeFlag:()=>d,initExperiment:()=>u}),a(12115);let r="control",n=null,o=null,i=!1,s=new Set;function l(){return i}async function u(e){if(e)return o||(o=(async()=>{let{Experiment:t}=await Promise.all([a.e(5376),a.e(1410)]).then(a.bind(a,81410)),r=t.initializeWithAmplitudeAnalytics(e,{automaticFetchOnAmplitudeIdentityChange:!0});for(let e of(n=r,await r.fetch(),i=!0,s))e()})().catch(e=>{o=null,n=null,i=!1,"undefined"!=typeof console&&console.warn('[experiment] init/fetch falhou — variantes ficam em "control", sem exposure:',e)}))}function c(e){if(!n)return r;try{let t=n.variant(e);return t?.value||r}catch{return r}}function d(){c("cro-smoke-test")}},16083:(e,t,a)=>{a.d(t,{cn:()=>r});function r(...e){let t=[];for(let a of e)if(a)if("string"==typeof a||"number"==typeof a)t.push(String(a));else for(let[e,r]of Object.entries(a))r&&t.push(e);return t.join(" ")}},32451:(e,t,a)=>{a.d(t,{N:()=>n});var r=a(95155);function n(){return(0,r.jsx)("div",{"aria-hidden":"true",className:"absolute h-0 w-0 overflow-hidden",children:(0,r.jsx)("input",{type:"text",name:"empresa",defaultValue:"",tabIndex:-1,autoComplete:"off","aria-hidden":"true"})})}},56038:(e,t,a)=>{a.d(t,{JL:()=>d,T3:()=>c,rr:()=>u,writeIdentity:()=>l,xN:()=>s});let r="em_lead_v1";function n(){try{return window.localStorage??void 0}catch{return}}function o(e){return"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function i(e){return"string"==typeof e&&e.trim()?e.trim():void 0}function s(e=n(),t=Date.now()){let a,l;if(!e)return;try{a=e.getItem(r)}catch{return}if(!a)return;try{l=JSON.parse(a)}catch{return}if("object"!=typeof l||null===l)return;let u=l;if(1!==u.v||!o(u.email))return;let c=u.ts;if("number"==typeof c&&Number.isFinite(c)&&!(t-c>15552e6))return{v:1,email:u.email,nome:i(u.nome),whatsapp:i(u.whatsapp),ts:c,produtoSigla:i(u.produtoSigla)}}function l(e,t=n(),a=Date.now()){if(!t||!o(e.email))return!1;let s={v:1,email:e.email,nome:i(e.nome),whatsapp:i(e.whatsapp),ts:a,produtoSigla:i(e.produtoSigla)};try{return t.setItem(r,JSON.stringify(s)),!0}catch{return!1}}function u(e=n(),t=Date.now()){return void 0!==s(e,t)}function c(e,t=n(),a=Date.now()){if(!e)return!0;let r=s(t,a);return!r||r.produtoSigla===e}async function d(e,t=1200){return Promise.race([(async()=>{try{return{ok:(await fetch("/api/lead",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({email:e.email,nome:e.nome,whatsapp:e.whatsapp,formulario:"intencao-compra",produto_sigla:e.produtoSigla,produto_nome:e.produtoNome,...e.utm??{}})})).ok,timedOut:!1}}catch{return{ok:!1,timedOut:!1}}})(),new Promise(e=>{setTimeout(()=>e({ok:!1,timedOut:!0}),t)})])}},58581:(e,t,a)=>{a.d(t,{D8:()=>g});var r=a(95155),n=a(12115),o=a(70667),i=a(32451),s=a(56038);function l({ofertaNome:e,onConfirm:t,onSkip:a,onDismiss:l,escapeVisivel:u=!0}){let[c,d]=(0,n.useState)("idle"),m=u?a:l??(()=>{}),p=(0,n.useRef)(null),f=(0,n.useRef)(null),h=(0,n.useId)(),g=(0,n.useId)(),x=(0,s.xN)();async function b(e){if(e.preventDefault(),"loading"===c)return;let a=new FormData(e.currentTarget),r={nome:(a.get("nome")??"").trim(),email:(a.get("email")??"").trim(),whatsapp:(a.get("whatsapp")??"").trim()||void 0,empresa:(a.get("empresa")??"").trim()||void 0};d("loading");try{await t(r)}catch{d("error")}}return(0,n.useEffect)(()=>{f.current?.focus()},[]),(0,n.useEffect)(()=>{let{body:e}=document,t=e.style.overflow,a=e.style.paddingRight,r=window.innerWidth-document.documentElement.clientWidth;return e.style.overflow="hidden",r>0&&(e.style.paddingRight=`${r}px`),()=>{e.style.overflow=t,e.style.paddingRight=a}},[]),(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center bg-black/60 p-0 sm:items-center sm:p-4",onClick:e=>{e.target===e.currentTarget&&m()},children:(0,r.jsxs)("div",{ref:p,role:"dialog","aria-modal":"true","aria-labelledby":h,"aria-describedby":g,onKeyDown:function(e){if("Escape"===e.key){e.stopPropagation(),m();return}if("Tab"!==e.key)return;let t=p.current?.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([tabindex="-1"]), [tabindex]:not
1([tabindex="-1"])');if(!t||0===t.length)return;let a=t[0],r=t[t.length-1],n=document.activeElement;e.shiftKey&&n===a?(e.preventDefault(),r.focus()):e.shiftKey||n!==r||(e.preventDefault(),a.focus())},className:"w-full max-w-md rounded-t-2xl bg-surface p-6 shadow-card sm:rounded-2xl",children:[!u&&(0,r.jsx)("button",{type:"button",onClick:m,"aria-label":"Fechar e voltar para a p\xe1gina",className:"float-right -mr-2 -mt-2 rounded p-2 text-text-3 hover:text-text",children:(0,r.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",focusable:"false",children:(0,r.jsx)("path",{d:"M5 5l10 10M15 5L5 15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),(0,r.jsx)("h2",{id:h,className:"font-display text-xl font-bold text-text",children:u?"Falta pouco para garantir sua vaga":"Falta s\xf3 um passo"}),(0,r.jsx)("p",{id:g,className:"mt-2 text-sm text-text-2",children:u?(0,r.jsxs)(r.Fragment,{children:["Preencha para a gente j\xe1 deixar seu cadastro pronto no pagamento — e te avisar se aparecer alguma condi\xe7\xe3o especial para o ",e,"."]}):(0,r.jsxs)(r.Fragment,{children:["Precisamos do seu contato para liberar o acesso ao ",e," e te avisar sobre o edital. Leva 20 segundos e voc\xea segue direto para o pagamento."]})}),(0,r.jsxs)("form",{onSubmit:b,className:"mt-4",children:[(0,r.jsxs)("div",{className:"grid gap-3",children:[(0,r.jsxs)("label",{className:"text-sm",children:[(0,r.jsx)("span",{className:"font-semibold text-text",children:"Nome"}),(0,r.jsx)("input",{ref:f,name:"nome",type:"text",required:!0,autoComplete:"name",defaultValue:x?.nome??"",className:"mt-1 w-full rounded border border-border bg-paper px-3 py-2 text-text outline-none focus:border-orange"})]}),(0,r.jsxs)("label",{className:"text-sm",children:[(0,r.jsx)("span",{className:"font-semibold text-text",children:"E-mail"}),(0,r.jsx)("input",{name:"email",type:"email",required:!0,autoComplete:"email",defaultValue:x?.email??"",className:"mt-1 w-full rounded border border-border bg-paper px-3 py-2 text-text outline-none focus:border-orange"})]}),(0,r.jsxs)("label",{className:"text-sm",children:[(0,r.jsxs)("span",{className:"font-semibold text-text",children:["WhatsApp ",(0,r.jsx)("span",{className:"font-normal text-text-3",children:"(opcional)"})]}),(0,r.jsx)("input",{name:"whatsapp",type:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(00) 00000-0000",defaultValue:x?.whatsapp??"",className:"mt-1 w-full rounded border border-border bg-paper px-3 py-2 text-text outline-none focus:border-orange"})]}),(0,r.jsx)(i.N,{})]}),"error"===c&&(0,r.jsx)("p",{role:"alert","aria-live":"assertive",className:"mt-3 rounded border border-red/40 bg-red-soft px-3 py-2 text-sm text-red-700",children:u?"N\xe3o conseguimos salvar seus dados — mas isso n\xe3o impede a compra. Use o link abaixo para ir direto ao pagamento.":"N\xe3o conseguimos salvar seus dados. Tente enviar de novo — se o erro insistir, feche e clique em comprar outra vez."}),(0,r.jsx)(o.$,{type:"submit",block:!0,className:"mt-4",disabled:"loading"===c,"aria-busy":"loading"===c,children:"loading"===c?"Enviando…":"Continuar para o pagamento"}),u&&(0,r.jsx)("button",{type:"button",onClick:a,className:"mt-3 block w-full text-center text-sm text-text-2 underline hover:text-text",children:"Ir direto para o pagamento sem preencher"}),(0,r.jsxs)("p",{className:"mt-3 text-xs text-text-3",children:["Ao continuar, voc\xea concorda em receber comunica\xe7\xf5es do EuMilitar. Veja nossa"," ",(0,r.jsx)("a",{href:"/privacidade/",className:"underline",children:"Pol\xedtica de Privacidade"}),"."]})]})]})})}var u=a(8649),c=a(13857);function d(e,t){let a;if(!/^https?:\/\//i.test(e))return e;let r=t.nome?.trim(),n=t.email?.trim(),o=function(e){if(!e)return;let t=e.replace(/\D/g,"");if((12===t.length||13===t.length)&&t.startsWith("55")&&(t=t.slice(2)),11===t.length&&t.startsWith("0")&&(t=t.slice(1)),12===t.length&&t.startsWith("0")&&(t=t.slice(1)),10!==t.length&&11!==t.length)return;let a=t.slice(0,2);if(!(11>Number(a)))return{ac:a,number:t.slice(2)}}(t.whatsapp);if(!r&&!n&&!o)return e;try{a=new URL(e)}catch{return e}let i=(e,t)=>{a.searchParams.has(e)||a.searchParams.set(e,t)};return r&&i("name",r),n&&i("email",n),o&&(i("phoneac",o.ac),i("phonenumber",o.number)),a.toString()}var m=a(89843);let p="variant-b",f=["variant-a",p];function h(e,t){let a=e.currentTarget,r=""!==a.target&&"_self"!==a.target;0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||r||(e.preventDefault(),window.location.assign(d(a.href,t)))}function g({ofertaNome:e,payload:t}={}
1){let[a,o]=(0,n.useState)(null),i=(0,n.useRef)(null),b=(0,n.useMemo)(()=>t??{},[t]),v=(0,n.useCallback)(e=>({...b,variante:e}),[b]),y=(0,n.useCallback)(t=>{let a="string"==typeof b.sigla?b.sigla:void 0,r=function(e){if(!e.gateAtivo)return{acao:"seguir",motivo:"flag-local-desligada"};if(!e.experimentoPronto())return{acao:"seguir",motivo:"experimento-nao-pronto"};let t=e.avaliarVariante();return e.variantesTratadas.includes(t)?e.usuarioConhecido()?e.ofertaJaRegistrada()?{acao:"seguir",motivo:"usuario-conhecido"}:{acao:"recapturar-em-silencio"}:{acao:"abrir-modal",variante:t}:{acao:"seguir",motivo:"controle"}}({gateAtivo:u.Hw,experimentoPronto:c.ZS,avaliarVariante:()=>(0,c.IX)("cro-checkout-identity-gate-202608"),variantesTratadas:f,usuarioConhecido:()=>(0,s.rr)(),ofertaJaRegistrada:()=>(0,s.T3)(a)});if("seguir"===r.acao){if("usuario-conhecido"===r.motivo&&u.MY){let e=(0,s.xN)();e&&h(t,e)}return!1}if("recapturar-em-silencio"===r.acao){let r=(0,s.xN)();return r&&((0,s.writeIdentity)({...r,produtoSigla:a}),(0,s.JL)({email:r.email,nome:r.nome,whatsapp:r.whatsapp,produtoSigla:a,produtoNome:e,utm:x()}),u.MY&&h(t,r)),!1}return t.preventDefault(),i.current=t.currentTarget,o({href:t.currentTarget.href,variante:r.variante}),(0,m.x2)("identity_gate_viewed",v(r.variante)),!0},[b,v,e]),w=(0,n.useCallback)((e,t)=>{let a=u.MY&&t?d(e,t):e;o(null),(0,m.sv)(b),window.location.assign(a)},[b]),N=(0,n.useCallback)(()=>{a&&((0,m.x2)("identity_gate_skipped",v(a.variante)),i.current?.focus(),w(a.href))},[a,w,v]),j=(0,n.useCallback)(()=>{a&&((0,m.x2)("identity_gate_dismissed",v(a.variante)),o(null),i.current?.focus())},[a,v]),k=(0,n.useCallback)(async t=>{if(!a)return;let{href:r,variante:n}=a;if(t.empresa)return void w(r);let o={nome:t.nome,email:t.email,whatsapp:t.whatsapp},i="string"==typeof b.sigla?b.sigla:void 0;(0,s.writeIdentity)({...o,produtoSigla:i}),(await (0,s.JL)({email:t.email,nome:t.nome,whatsapp:t.whatsapp,produtoSigla:i,produtoNome:e,utm:x()})).ok&&(0,m.x2)("identity_gate_submitted",v(n)),w(r,o)},[a,w,b,v,e]);return{interceptClick:y,modal:a?(0,r.jsx)(l,{ofertaNome:e??"seu curso",onConfirm:k,onSkip:N,onDismiss:j,escapeVisivel:a.variante!==p}):null}}function x(){let e={};if("undefined"==typeof sessionStorage)return e;try{for(let t of["utm_source","utm_medium","utm_campaign","utm_content","utm_term"]){let a=sessionStorage.getItem(t);a&&(e[t]=a)}}catch{}return e}},59540:(e,t,a)=>{a.d(t,{OU:()=>n,c6:()=>o,cu:()=>r});let r=6e3;function n(){let e=!1;return{tryAcquire:()=>!e&&(e=!0,!0),release(){e=!1},get locked(){return e}}}function o(e){return"checkout_redirect"===e?"Redirecionando…":"Carregando…"}},70667:(e,t,a)=>{a.d(t,{$:()=>s});var r=a(95155),n=a(16083);let o={sm:"btn--sm",md:!1,lg:"btn--lg"},i={primary:!1,explore:"btn--explore",secondary:"btn--secondary",outline:"btn--outline",ghost:!1};function s(e){let{variant:t="primary",size:a="md",block:s,className:l,children:u,...c}=e,d="ghost"===t?(0,n.cn)("btn-ghost",s&&"w-full justify-center",l):(0,n.cn)("btn",i[t],o[a],s&&"btn--block",l);if("href"in c&&void 0!==c.href){let{href:e,...a}=c;return a["aria-disabled"]?(0,r.jsx)("span",{className:(0,n.cn)(d,"ghost"!==t&&"btn--disabled"),"aria-disabled":"true",title:a.title,children:u}):(0,r.jsx)("a",{href:e,className:d,...a,children:u})}return(0,r.jsx)("button",{className:d,...c,children:u})}}}]);

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.