index of
/
home
/
thefkyzp
/
public_html
/
wp-content
/
themes
/
oceanwp
/
inc
/
customizer
/
assets
/
min
/
js
/
File: /home/thefkyzp/public_html/wp-content/themes/oceanwp/inc/customizer/assets/min/js/color.min.js
function acp_get_alpha_value_from_color(a){var o;return o=(a=a.replace(/ /g,"")).match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)?(o=100*parseFloat(a.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2),parseInt(o)):100}function acp_update_alpha_value_on_color_control(a,o,l,e){var t=o.data("a8cIris"),r=o.data("wpWpColorPicker");t._color._alpha=a,t=t._color.toString(),o.val(t),r.toggler.css({"background-color":t}),e&&acp_update_alpha_value_on_alpha_slider(a,l),o.wpColorPicker("color",t)}function acp_update_alpha_value_on_alpha_slider(a,o){o.slider("value",a),o.find(".ui-slider-handle").text(a.toString())}Color.prototype.toString=function(a){if("no-alpha"==a)return this.toCSS("rgba","1").replace(/\s+/g,"");if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var o=parseInt(this._color,10).toString(16);if(this.error)return"";if(o.length<6)for(var l=6-o.length-1;0<=l;l--)o="0"+o;return"#"+o},jQuery(document).ready(function(t){t(".alpha-color-control").each(function(){var r,c,i=t(this),e=i.val().replace(/\s+/g,""),a=i.attr("data-show-opacity"),n=i.attr("data-default-color"),o={change:function(a,o){var l,e=i.attr("data-customize-setting-link"),t=i.wpColorPicker("color");n==t&&(l=acp_get_alpha_value_from_color(t),c.find(".ui-slider-handle").text(l)),wp.customize(e,function(a){a.set(t)}),r.find(".transparency").css("background-color",o.color.toString("no-alpha"))},palettes:oceanwpLocalize.colorPalettes};i.wpColorPicker(o),r=i.parents(".wp-picker-container:first"),t('<div class="alpha-color-picker-container"><div class="min-click-zone click-zone"></div><div class="max-click-zone click-zone"></div><div class="alpha-slider"></div><div class="transparency"></div></div>').appendTo(r.find(".wp-picker-holder")),c=r.find(".alpha-slider"),o=acp_get_alpha_value_from_color(e),c.slider({create:function(a,o){var l=t(this).slider("value");t(this).find(".ui-slider-handle").text(l),t(this).siblings(".transparency ").css("background-color",e)},value:o,range:"max",step:1,min:0,max:100,animate:300}),"true"==a&&c.find(".ui-slider-handle").addClass("show-opacity"),r.find(".min-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(0,i,c,!0)}),r.find(".max-click-zone").on("click",function(){acp_update_alpha_value_on_color_control(100,i,c,!0)}),r.find(".iris-palette").on("click",function(a){var o;a.preventDefault(),acp_update_alpha_value_on_alpha_slider(a=acp_get_alpha_value_from_color(o=t(this).css("background-color")),c),100!=a&&(o=o.replace(/[^,]+(?=\))/,(a/100).toFixed(2))),i.wpColorPicker("color",o)}),r.find(".button.wp-picker-clear").on("click",function(a){a.preventDefault();a=i.attr("data-customize-setting-link");i.wpColorPicker("color","#ffffff"),wp.customize(a,function(a){a.set("")}),acp_update_alpha_value_on_alpha_slider(100,c)}),r.find(".button.wp-picker-default").on("click",function(a){a.preventDefault(),acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(n),c)}),i.on("input",function(a){a.preventDefault(),acp_update_alpha_value_on_alpha_slider(acp_get_alpha_value_from_color(t(this).val()),c)}),c.slider().on("slide",function(a,o){acp_update_alpha_value_on_color_control(parseFloat(o.value)/100,i,c,!1),t(this).find(".ui-slider-handle").text(o.value)}),t(".iris-picker, .alpha-color-control").on("click",function(a){a.preventDefault()})})});