!function(){function t(t,e,n){if(""===t||"string"!=typeof t&&"number"!=typeof t||isNaN(Number(t)))return"";let r="string"==typeof t?parseFloat(t):t;return"number"==typeof e&&"number"==typeof n?(r<e&&(r=e),r>n&&(r=n)):"number"==typeof e?r<e&&(r=e):"number"==typeof n&&r>n&&(r=n),r}wp.customize.controlConstructor["wpbf-generic"]=wp.customize.wpbfDynamicControl.extend({initWpbfControl:function(e){let n=(e=e||this).params;"wpbf-generic"===n.type&&e.container.find(".wpbf-control-form input, .wpbf-control-form textarea").on("input",function(){let r=this instanceof HTMLInputElement||this instanceof HTMLTextAreaElement?this.value:"";if("number"===n.subtype||"number-unit"===n.subtype){var i,u;n.max=(i=n.min,u=n.max,void 0===i||void 0===u||null===i||null===u?u:Math.max(i,u)),r="number"===n.subtype?t(r,n.min,n.max):function(e,n,r){if(""===e||"string"!=typeof e&&"number"!=typeof e||isNaN(Number(e)))return"";let i=function(t){if(""===t||"string"!=typeof t&&"number"!=typeof t||isNaN(Number(t)))return{number:"",unit:""};let e="string"==typeof t?t:String(t),n=e.replace(/\d+/g,"")||"",r=n?e.replace(n,""):e;return""===r?{number:"",unit:""}:{number:parseFloat(r),unit:n}}(e),u=i.number,o=i.unit;if(""===u)return"";let f=t(u,n,r);return o?`${f}${o}`:f}(r,n.min,n.max)}e.setting.set(r)})}})}();
