import{i as o}from"./custom-select-1YHA15a-.js";jQuery(document).ready(function(t){function e(o){if(!o||!o.length)return;if(o.data("wpColorPicker"))return;let e=null;o.wpColorPicker({change:function(o){e&&window.clearTimeout(e),e=window.setTimeout(function(){try{t(o.target).wpColorPicker("close")}catch(e){}},200)}})}function c(o){const c=t(".b3-wvs-color-field"),n=c.find('label[for="b3_wvs_color"]').first(),r=t(".b3-wvs-label-field"),l=String(c.data("labelDefault")||"Color"),i=String(c.data("labelButton")||l);if(n.length&&n.text("button"===o?i:l),c.hide(),r.hide(),"color"===o||"button"===o)c.show(),e(t("#b3_wvs_color"));else{t("#b3_wvs_color").val("");try{t("#b3_wvs_color").wpColorPicker("color","")}catch(s){}t("#b3_wvs_color").trigger("change")}"button"===o&&r.show()}t(".b3-wvs-color-picker").each(function(){e(t(this))}),o(t,t(document),"#b3_wvs_type"),t(document).on("mousedown touchstart",function(o){t(o.target).closest(".wp-picker-container").length||t(".b3-wvs-color-picker").each(function(){const o=t(this);o.data("wpColorPicker")&&o.wpColorPicker("close")})}),t(document).on("change","#b3_wvs_type",function(){c(t(this).val())}),c(t("#b3_wvs_type").val())});
