!function(){"use strict";var e={n:function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,{a:o}),o},d:function(t,o){for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.jQuery,o=e.n(t);document.addEventListener("DOMContentLoaded",(()=>{o()(".wp-color-picker").wpColorPicker()}));document.addEventListener("DOMContentLoaded",(()=>(()=>{const e=document.querySelector("#wpmastertoolkit-browser-theme-color"),t=document.querySelector(".wp-mastertoolkit__preview-browser-theme-color.black"),o=document.querySelector(".wp-mastertoolkit__preview-browser-theme-color.white"),r=()=>{const r=e.value,n=(e=>{const t=parseInt(e.substr(1,2),16)/255,o=parseInt(e.substr(3,2),16)/255,r=parseInt(e.substr(5,2),16)/255,[n,c,l]=[t,o,r].map((e=>e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))),s=.2126*n+.7152*c+.0722*l;return(s+.05)/.05>1.05/(s+.05)?"#000000":"#FFFFFF"})(r);t.style.backgroundColor=r,o.style.backgroundColor=r,"#000000"===n?(t.style.display="block",o.style.display="none"):(t.style.display="none",o.style.display="block")};e&&(jQuery(e).wpColorPicker({change:function(t,o){const n=o.color.toString();e.value=n,r()},clear:function(){e.value="",r()}}),r())})()))}();