{"version":3,"file":"Button_forms.CL2hH86M.mjs","names":["__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/OcqB0dtxsWSlcszketQx/OpmhYCPsHcxO4PBhpWiX/Button_forms.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";// ======= CONFIG POR PÁGINA =======\nconst WJ_HASH=\"m13x0f8\"// <-- hash desta página (ex.: A=\"m13x0f8\" / B=\"promqcq\")\n;const BUTTON_TEXT=\"QUERO ESSA AULA GRATUITA!\";const FORM_TEMPLATE=\"2\";const FORM_COLOR=\"4\";function buildScriptUrl(hash){return`https://event.webinarjam.com/register/${hash}/embed-button?formTemplate=${FORM_TEMPLATE}&formColor=${FORM_COLOR}&buttonText=${encodeURIComponent(BUTTON_TEXT)}`;}/* ---------------- PERF ---------------- */function ensurePreconnect(){const add=(href,rel,cross=false)=>{if(document.querySelector(`link[rel=\"${rel}\"][href=\"${href}\"]`))return;const l=document.createElement(\"link\");l.rel=rel;l.href=href;if(cross&&rel===\"preconnect\")l.crossOrigin=\"anonymous\";document.head.appendChild(l);};add(\"https://event.webinarjam.com\",\"dns-prefetch\");add(\"https://event.webinarjam.com\",\"preconnect\",true);}function installFirstInteractionWarmup(cb){const once=()=>{cb();remove();};const remove=()=>{window.removeEventListener(\"mousemove\",once);window.removeEventListener(\"touchstart\",once);window.removeEventListener(\"keydown\",once);};window.addEventListener(\"mousemove\",once,{once:true});window.addEventListener(\"touchstart\",once,{once:true});window.addEventListener(\"keydown\",once,{once:true});return remove;}/* -------------- UI / ESTILO -------------- */function ensureStyle(){if(document.getElementById(\"wj-style-fix\"))return;const style=document.createElement(\"style\");style.id=\"wj-style-fix\";style.textContent=`\n    .wj-embed-backdrop,\n    .wj-embed-modal,\n    #wj_registration_overlay,\n    #registration-modal,\n    .iframe_modal_wrapper {\n      position: fixed !important;\n      inset: 0 !important;\n      width: 100% !important;\n      height: 100% !important;\n      z-index: 2147483647 !important;\n      display: flex !important;\n      justify-content: center !important;\n      align-items: center !important;\n    }\n    .wj-embed-modal iframe,\n    #wj_registration_overlay iframe {\n      width: 100% !important;\n      height: 100% !important;\n      display: block !important;\n      max-width: 700px;\n      margin: auto !important;\n      border: 0 !important;\n    }\n    body.wj-open { overflow: hidden !important; }\n    @keyframes wjspin { to { transform: rotate(360deg) } }\n  `;document.head.appendChild(style);}function relocate(){const sels=[\".wj-embed-modal\",\".wj-embed-backdrop\",\"#wj_registration_overlay\",\"#registration-modal\",\".iframe_modal_wrapper\"];sels.forEach(sel=>{document.querySelectorAll(sel).forEach(el=>{if(el.parentNode!==document.body)document.body.appendChild(el);});});const isOpen=!!document.querySelector(\".wj-embed-modal, #registration-modal, #wj_registration_overlay\");document.body.classList.toggle(\"wj-open\",isOpen);}function ensureObserver(){if(window.__wjObserver)return;window.__wjObserver=new MutationObserver(relocate);window.__wjObserver.observe(document.documentElement,{childList:true,subtree:true});}/* -------------- RESET “DURO” -------------- *//** Remove scripts antigos, modais e flags para trocar de hash em SPA */function resetWebinarJamEnvironment(){// remove elementos de modal/overlay\nconst garbageSel=[\".wj-embed-modal\",\".wj-embed-backdrop\",\"#wj_registration_overlay\",\"#registration-modal\",\".iframe_modal_wrapper\"].join(\",\");document.querySelectorAll(garbageSel).forEach(el=>el.remove());// remove botões anteriores (inclusive proxies ocultos)\ndocument.querySelectorAll(\".wj-embed-button\").forEach(b=>{// mantenha somente se for o proxy do hash atual (vamos recriar abaixo)\nb.remove();});// remove scripts do WJ já injetados\ndocument.querySelectorAll('script[src*=\"event.webinarjam.com/register/\"]').forEach(s=>s.remove());// zera flags globais usadas\nwindow.__wjLoaded=false;window.__wjCurrentHash=undefined;document.body.classList.remove(\"wj-open\");}/* -------------- PROXY + SCRIPT -------------- */function ensureProxy(hash){const id=`wj-proxy-${hash}`;let proxy=document.getElementById(id);if(!proxy){proxy=document.createElement(\"button\");proxy.id=id;proxy.type=\"button\";proxy.className=\"wj-embed-button\";proxy.setAttribute(\"data-webinarhash\",hash)// nome que o WJ lê (minúsculo)\n;proxy.style.position=\"fixed\";proxy.style.left=\"-9999px\";proxy.style.top=\"-9999px\";document.body.appendChild(proxy);}else{proxy.setAttribute(\"data-webinarhash\",hash);}return proxy;}function ensureScript(hash){// se já carregamos exatamente este hash, ok\nif(window.__wjLoaded&&window.__wjCurrentHash===hash){return Promise.resolve();}// se há um script antigo de OUTRO hash, fazemos reset completo e carregamos do zero\nif(window.__wjLoaded&&window.__wjCurrentHash&&window.__wjCurrentHash!==hash){resetWebinarJamEnvironment();}// carrega o script do hash atual\nreturn new Promise(resolve=>{const s=document.createElement(\"script\");s.src=buildScriptUrl(hash);s.async=true;s.onload=()=>{window.__wjLoaded=true;window.__wjCurrentHash=hash;resolve();};document.body.appendChild(s);});}/* -------------- UX LOADING + RETRY -------------- */function showLocalLoadingOverlay(){if(document.getElementById(\"wj-local-loader\"))return;const wrap=document.createElement(\"div\");wrap.id=\"wj-local-loader\";wrap.style.cssText=`\n    position: fixed; inset: 0; z-index: 2147483646;\n    display: grid; place-items: center; background: rgba(0,0,0,.35);\n    backdrop-filter: blur(2px);\n  `;const spinner=document.createElement(\"div\");spinner.style.cssText=`\n    width: 44px; height: 44px; border-radius: 50%;\n    border: 4px solid #fff; border-top-color: transparent;\n    animation: wjspin 0.8s linear infinite;\n  `;wrap.appendChild(spinner);document.body.appendChild(wrap);}function hideLocalLoadingOverlay(){const el=document.getElementById(\"wj-local-loader\");if(el)el.remove();}async function clickWithRetries(proxy,tries=10,delayMs=260){const isOpen=()=>!!document.querySelector([\".wj-embed-modal\",\".wj-embed-backdrop\",\"#wj_registration_overlay\",\"#registration-modal\",\".iframe_modal_wrapper\",'iframe[src*=\"event.webinarjam.com\"][src*=\"/register/\"]'].join(\",\"));for(let i=0;i<tries;i++){proxy.click();relocate();const opened=await new Promise(res=>{setTimeout(()=>res(isOpen()),Math.min(700,delayMs+i*90));});if(opened)return true;}return false;}/* -------------- OVERRIDES -------------- *//** Aplique numa layer estática (ex.: Page). */export function WarmUpWebinarJam(){React.useEffect(()=>{ensurePreconnect();ensureStyle();ensureObserver();// garante ambiente limpo quando a página monta (útil ao trocar A->B na SPA)\nif(window.__wjCurrentHash&&window.__wjCurrentHash!==WJ_HASH){resetWebinarJamEnvironment();}ensureProxy(WJ_HASH);ensureScript(WJ_HASH);const remove=installFirstInteractionWarmup(()=>{ensureProxy(WJ_HASH);ensureScript(WJ_HASH);});return remove;},[]);return{};}/** Aplique no botão que abre o modal. */export function OpenWebinarJamFast(){return{onMouseEnter:()=>{ensureProxy(WJ_HASH);ensureScript(WJ_HASH);},onClick:async()=>{ensurePreconnect();ensureStyle();ensureObserver();// se hash mudou desde a última página, faça reset agora também\nif(window.__wjCurrentHash&&window.__wjCurrentHash!==WJ_HASH){resetWebinarJamEnvironment();}showLocalLoadingOverlay();await ensureScript(WJ_HASH);const proxy=ensureProxy(WJ_HASH);const ok=await clickWithRetries(proxy);hideLocalLoadingOverlay();if(!ok){// Fallback: abre a página de registro em nova aba (funciona mesmo com bloqueio de cookies/modal)\nconst directUrl=`https://event.webinarjam.com/register/${WJ_HASH}`;const win=window.open(directUrl,\"_blank\",\"noopener,noreferrer\");if(!win){alert(\"N\\xe3o foi poss\\xedvel abrir o formul\\xe1rio agora. Verifique bloqueio de pop-ups e cookies de terceiros e tente de novo.\");}}}};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withWarmUpWebinarJam(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...WarmUpWebinarJam(props)});};}withWarmUpWebinarJam.displayName=\"WarmUpWebinarJam\";export function withOpenWebinarJamFast(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...OpenWebinarJamFast(props)});};}withOpenWebinarJamFast.displayName=\"OpenWebinarJamFast\";\nexport const __FramerMetadata__ = {\"exports\":{\"withOpenWebinarJamFast\":{\"type\":\"reactHoc\",\"name\":\"withOpenWebinarJamFast\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WarmUpWebinarJam\":{\"type\":\"override\",\"name\":\"WarmUpWebinarJam\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"OpenWebinarJamFast\":{\"type\":\"override\",\"name\":\"OpenWebinarJamFast\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withWarmUpWebinarJam\":{\"type\":\"reactHoc\",\"name\":\"withWarmUpWebinarJam\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Button_forms.map"],"mappings":"iSAE4F,SAAS,EAAe,EAAK,CAAC,MAAM,yCAAyC,EAAK,6BAA6B,EAAc,aAAa,EAAW,cAAc,mBAAmB,EAAY,GAAgD,SAAS,GAAkB,CAAC,IAAM,GAAK,EAAK,EAAI,EAAM,KAAQ,CAAC,GAAG,SAAS,cAAc,aAAa,EAAI,WAAW,EAAK,IAAI,CAAC,OAAO,IAAM,EAAE,SAAS,cAAc,OAAO,CAAC,EAAE,IAAI,EAAI,EAAE,KAAK,EAAQ,GAAO,IAAM,eAAa,EAAE,YAAY,aAAY,SAAS,KAAK,YAAY,EAAE,EAAG,EAAI,+BAA+B,eAAe,CAAC,EAAI,+BAA+B,aAAa,GAAK,CAAE,SAAS,EAA8B,EAAG,CAAC,IAAM,MAAS,CAAC,GAAI,CAAC,GAAQ,EAAS,MAAW,CAAC,EAAO,oBAAoB,YAAY,EAAK,CAAC,EAAO,oBAAoB,aAAa,EAAK,CAAC,EAAO,oBAAoB,UAAU,EAAK,EAAoK,OAAjK,EAAO,iBAAiB,YAAY,EAAK,CAAC,KAAK,GAAK,CAAC,CAAC,EAAO,iBAAiB,aAAa,EAAK,CAAC,KAAK,GAAK,CAAC,CAAC,EAAO,iBAAiB,UAAU,EAAK,CAAC,KAAK,GAAK,CAAC,CAAQ,EAAuD,SAAS,GAAa,CAAC,GAAG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