((e=document,t="script",o="querySelectorAll",r="innerHTML",s="replace",n=".hs-form-html",a="https://forms.hsforms.com/embed/v4/render-definition/ssr")=>{const c=(...e)=>{console.error("[hubspot-forms-v4]:",...e)},d=(e,t)=>e[s](/{{hs_form_instance_id_placeholder}}/g,t),i=(e,t)=>t&&"na1"!==t?e[s](/\/\/(.*?)\./,`//$1-${t}.`):e,l=(e,t)=>"qa"===t?e[s](/\.([^/]*?)\./,".$1qa."):e,f=(s,n)=>{s[r]=n;for(const n of s[o](t)){var a;const o=e.createElement(t);for(const{name:e,value:t}of n.attributes)o.setAttribute(e,t);o.appendChild(e.createTextNode(n[r]));null===(a=n.parentNode)||void 0===a||a.replaceChild(o,n)}},h=()=>"randomUUID"in crypto?crypto.randomUUID():([1e7]+-1e3+-4e3+8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))),m=t=>e[o](`${n}:not([data-portal-id="${t}"])[data-fetched]`).length>0,p=e=>{const{portalId:t,region:o,env:r}=e.dataset,s=e.cloneNode(!0);s.classList.replace("hs-form-html","hs-form-frame");return`