|
1
|
|
-var bitform_init=function(){"use strict";function e(e=null){"undefined"!=typeof hidden_token_field&&hidden_token_field(e),"undefined"!=typeof initAllCustomFlds&&initAllCustomFlds(e),"undefined"!=typeof initAddOtherOpt&&initAddOtherOpt(e),"undefined"!=typeof setSliderFieldValue&&setSliderFieldValue(e),"undefined"!=typeof setBitInputMaskToInput&&setBitInputMaskToInput(e),"undefined"!=typeof initCheckDisableOnMax&&initCheckDisableOnMax(e),"undefined"!=typeof initTextLengthHelper&&initTextLengthHelper(e),"undefined"!=typeof initPasswordStrengthHelper&&initPasswordStrengthHelper(e),"undefined"!=typeof validate_focus&&validate_focus(e),"undefined"!=typeof submit_form&&submit_form(e),"undefined"!=typeof bit_form_abandonment&&bit_form_abandonment(e),"undefined"!=typeof setFieldValues&&setFieldValues(e),"undefined"!=typeof bit_multi_step_form&&bit_multi_step_form(e),"undefined"!=typeof bit_conversational_form&&bit_conversational_form(e),"undefined"!=typeof bfTogglePasswordVisibility&&bfTogglePasswordVisibility(e)}return"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(()=>{e()})):e(),e}(); |
|
1
|
+var bitform_init=function(){"use strict";const t=["hidden_token_field","initAllCustomFlds","initAddOtherOpt","setSliderFieldValue","setBitInputMaskToInput","initCheckDisableOnMax","initTextLengthHelper","initPasswordStrengthHelper","validate_focus","submit_form","bit_form_abandonment","setFieldValues","bit_multi_step_form","bit_conversational_form","bfTogglePasswordVisibility","bfHtmlFieldValueTags"],n=new WeakSet;function e(e=null){(e?[e]:function(){const t=new Set(Object.keys(window.bf_globals||{}));return document.querySelectorAll("script.bf-form-config[data-bf-form]").forEach(n=>{const e=n.dataset.bfForm;e&&t.add(e)}),Array.from(t)}()).forEach(e=>function(e){const i=document.getElementById(e);i&&(n.has(i)||(function(t){window.bf_globals||(window.bf_globals={});const n=window.bf_globals[t];if(n?.fields)return!0;const e=document.querySelector(`script.bf-form-config[data-bf-form="${t}"]`);if(!e)return!1;const i=function(t){try{return JSON.parse(t)}catch(t){}const n=t.indexOf('{"');if(n<0)return null;let e=t.lastIndexOf("}");for(let i=0;i<5&&e>n;i+=1)try{return JSON.parse(t.slice(n,e+1))}catch(n){e=t.lastIndexOf("}",e-1)}return null}(e.textContent);i&&(window.bf_globals[t]={inits:{},contentId:t,...n||{},...i})}(e),window.bf_globals?.[e]?.fields&&(t.forEach(t=>{const n=globalThis[t];if("function"==typeof n)try{n(e)}catch(n){const i=window.bf_globals[e];i.initErrors=i.initErrors||{},i.initErrors[t]=String(n&&n.message||n)}}),n.add(i),i.dataset.bfInited="true")))}(e))}return window.bitformInit=e,document.addEventListener("bitform/reinit",t=>{e(t?.detail?.contentId||null)}),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{e()}):e(),window.addEventListener("load",()=>{e()}),e}(); |