!function(){hulk_customer_email="";let e="https://formbuilder.hulkapps.com";function t(t,o){let r=document.getElementById("frame_"+o);if(!r){let l=``;t.innerHTML=l,r=t.querySelector("iframe")}let a=r.closest(".layout-panel-flex");a&&(a.style.display="block"),function t(o){let r="frame_"+o,l=o;function a(t){if(t.origin!==e)return;let o=document.getElementById(r);if(o&&t.data.formid===l&&(window.FbThemeAppExtSettingsHash&&o.contentWindow.postMessage(JSON.stringify(window.FbThemeAppExtSettingsHash),"*"),o.style.height=t.data.height+"px",t.data.scroll_to)){let a=document.querySelector("#"+r),n=a.getBoundingClientRect(),i=a.offsetTop>0?a.offsetTop-50:.8*(n.top+window.scrollY),s=performance.now(),d=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;function p(e){var t;let o=e-s,r=(t=Math.min(o/1e3,1),t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1);window.scrollTo(0,d+(i-d)*r),o<1e3&&requestAnimationFrame(p)}requestAnimationFrame(p)}}window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent&&window.attachEvent("onmessage",a)}(o)}window.form_url=e,window.formbuilder_customer?.email&&(hulk_customer_email=window.formbuilder_customer.email),window.GetCorePage=function(){let e=document.getElementsByClassName("pxFormGenerator");Array.from(e).forEach(e=>{let t=e.id;t&&window.shouldLoadPopup(t)})},window.shouldLoadPopup=function(e){let o=document.getElementById(e);if(!o)return;let r=window.hulkFormBuilder.form_data?.["form_"+e];if(r){let l=r.form_data?.form_load_as_popup;if("yes"==l&&window.hulkFormBuilder.plan_features?.shop_plan_features.includes("load_form_as_popup")){FBcreatePopupContent(e);return}RenderFormById(e);return}t(o,e)},window.FBcreatePopupContent=function(e){let t=document.getElementById("FBpopupFormWrapper-"+e);if(t)return;let o=document.getElementById(e);if(!o)return;let r=document.createElement("div");r.id="FBpopupFormWrapper-"+e,r.style.display="none",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.right="0",r.style.bottom="0",r.style.background="rgba(0,0,0,0.6)",r.style.zIndex="9998",r.style.justifyContent="center",r.style.alignItems="center";let l=document.createElement("div");l.className="popup_content",l.style.background="#fff",l.style.padding="30px",l.style.borderRadius="10px",l.style.position="relative",l.style.maxWidth="90%",l.style.maxHeight="calc(100vh - 60px)",l.style.overflowY="auto",l.style.width="700px";let a=document.createElement("span");a.innerHTML="✕",a.style.position="absolute",a.style.top="10px",a.style.right="15px",a.style.cursor="pointer",a.style.fontSize="20px",a.onclick=function(){r.style.display="none"},l.appendChild(a),l.appendChild(o),r.appendChild(l),document.body.appendChild(r),window.FBcreateBtnpopup(e)},window.RenderFormById=function(e){let o=document.getElementById(e);if(!o)return;let r=window.hulkFormBuilder.form_data?.["form_"+e];if(!r){t(o,e);return}window.hulkFormBuilder.shop_id=r.shop_uuid||null;let l=window.hulkFormBuilder.shop_data?.["shop_"+window.hulkFormBuilder.shop_id];if(window.hulkFormBuilder.shop=l,!l||l.is_skip_metafield||l.shop_deleted||l.shop_disabled){t(o,e);return}if(!r.is_spam_form){if(function e(t){let o=t.form_data?.formElements||[],r=o.some(e=>["image","file","signature","page_break","time","date","newdate","phone","booking"].includes(e.type));return t.form_data.advance_js||t.form_data.after_submit_script||"yes"===t.form_data.captcha_enable||"yes"===t.form_data.captcha_honeypot||"yes"===t.form_data.captcha_version_3_enable||"yes"===t.form_data.payment_gateway_integration||r||t.form_data.no_allow_submission>=0||!window.hulkFormBuilder.features_data?.shop_plan_features}(r))t(o,e);else{var a,n,i;a=r,i=o,hulkFBFontAwesomeScript(),hulkFBFormLayout(a.form_data,a.uuid,i),hulkFBAddtionalFormJS(a.form_data,a.uuid),hulkFBPopulateCountryDropdowns(),hulkFBHandleAnalyticsIntegrationsScript(a.form_data)}}}}(),"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){if(document.querySelector(".pxFormGenerator")){let e=window.hulkFormBuilder.assets||{};if(e.extraStyles){let t=document.createElement("link");t.rel="stylesheet",t.href=e.extraStyles,document.head.appendChild(t)}if(e.bootstrapStyles){let o=document.createElement("link");o.rel="stylesheet",o.href=e.bootstrapStyles,document.head.appendChild(o)}if(e.extraFunctions){let r=document.createElement("script");r.src=e.extraFunctions,r.onload=function(){"function"==typeof GetCorePage&&GetCorePage(),"function"==typeof hulkFBInitFormBuilder&&hulkFBInitFormBuilder(),"function"==typeof hulkFBKeyboardAccess&&hulkFBKeyboardAccess()},r.onerror=function(){console.error("Failed to load extra-functions.js")},document.body.appendChild(r)}}});