HEX
Server: Apache
System: Linux webm004.cluster121.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User: grainesdfo (155059)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/grainesdfo/www/wp-content/themes/jupiterx/lib/assets/dist/js/wp-color-picker-alpha.min.js
"use strict";!function(s){if(!s.wp.wpColorPicker.prototype._hasAlpha){var p="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",o='<div class="wp-picker-holder" />',e='<div class="wp-picker-container" />',i='<input type="button" class="button button-small" />',a=void 0!==wpColorPickerL10n.current;if(a)var n='<a tabindex="0" class="wp-color-result" />';else{n='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var l="<label></label>",c='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},s.widget("wp.wpColorPicker",s.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(s.support.iris){var r=this,t=r.element;if(s.extend(r.options,t.data()),"hue"===r.options.type)return r._createHueOnly();r.close=s.proxy(r.close,r),r.initialValue=t.val(),t.addClass("wp-color-picker"),a?(t.hide().wrap(e),r.wrap=t.parent(),r.toggler=s(n).insertBefore(t).css({backgroundColor:r.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),r.pickerContainer=s(o).insertAfter(t),r.button=s(i).addClass("hidden")):(t.parent("label").length||(t.wrap(l),r.wrappingLabelText=s(c).insertBefore(t).text(wpColorPickerL10n.defaultLabel)),r.wrappingLabel=t.parent(),r.wrappingLabel.wrap(e),r.wrap=r.wrappingLabel.parent(),r.toggler=s(n).insertBefore(r.wrappingLabel).css({backgroundColor:r.initialValue}),r.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),r.pickerContainer=s(o).insertAfter(r.wrappingLabel),r.button=s(i)),r.options.defaultColor?(r.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),a||r.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(r.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),a||r.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),a?t.wrap('<span class="wp-picker-input-wrap" />').after(r.button):(r.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(r.button),r.inputWrapper=t.closest(".wp-picker-input-wrap")),t.iris({target:r.pickerContainer,hide:r.options.hide,width:r.options.width,mode:r.options.mode,palettes:r.options.palettes,change:function(t,o){r.options.alpha?(r.toggler.css({"background-image":"url("+p+")"}),a?r.toggler.html('<span class="color-alpha" />'):(r.toggler.css({position:"relative"}),0==r.toggler.find("span.color-alpha").length&&r.toggler.append('<span class="color-alpha" />')),r.toggler.find("span.color-alpha").css({width:"30px",height:"24px",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:o.color.toString()})):r.toggler.css({backgroundColor:o.color.toString()}),s.isFunction(r.options.change)&&r.options.change.call(this,t,o)}}),t.val(r.initialValue),r._addListeners(),r.options.hide||r.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(t){""!==s(this).val()&&!o.element.hasClass("iris-error")||(o.options.alpha?(a&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),s.isFunction(o.options.clear)&&o.options.clear.call(this,t))}),o.button.on("click",function(t){s(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(a&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),s.isFunction(o.options.clear)&&o.options.clear.call(this,t),o.element.trigger("change")):s(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),s.widget("a8c.iris",s.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var r=this,t=r.element,o=s('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(r.picker.find(".iris-picker-inner")),e=o.find(".iris-slider-offset-alpha"),i={aContainer:o,aSlider:e};void 0!==t.data("custom-width")?r.options.customWidth=parseInt(t.data("custom-width"))||0:r.options.customWidth=100,r.options.defaultWidth=t.width(),(r._color._alpha<1||-1!=r._color.toString().indexOf("rgb"))&&t.width(parseInt(r.options.defaultWidth+r.options.customWidth)),s.each(i,function(t,o){r.controls[t]=o}),r.controls.square.css({"margin-right":"0"});var a=r.picker.width()-r.controls.square.width()-20,n=a/6,l=a/2-n;s.each(["aContainer","strip"],function(t,o){r.controls[o].width(l).css({"margin-left":n+"px"})}),r._initControls(),r._change()}},_initControls:function(){if(this._super(),this.options.alpha){var r=this;r.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*r._color._alpha),slide:function(t,o){r._color._alpha=parseFloat(o.value/100),r._change.apply(r,arguments)}})}},_change:function(){this._super();var t=this,o=t.element;if(this.options.alpha){var r=t.controls,e=parseInt(100*t._color._alpha),i=t._color.toRgb(),a=["rgb("+i.r+","+i.g+","+i.b+") 0%","rgba("+i.r+","+i.g+","+i.b+", 0) 100%"],n=t.options.defaultWidth,l=t.options.customWidth,s=t.picker.closest(".wp-picker-container").find(".wp-color-result");r.aContainer.css({background:"linear-gradient(to bottom, "+a.join(", ")+"), url("+p+")"}),s.hasClass("wp-picker-open")&&(r.aSlider.slider("value",e),t._color._alpha<1?(r.strip.attr("style",r.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),o.width(parseInt(n+l))):o.width(n))}!o.data("reset-alpha")&&1||t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()}),o.trigger("change")},_addInputListeners:function(e){function t(t){var o=new Color(e.val()),r=e.val();e.removeClass("iris-error"),o.error?""!==r&&e.addClass("iris-error"):o.toString()!==i._color.toString()&&("keyup"===t.type&&r.match(/^[0-9a-fA-F]{3}$/)||i._setOption("color",o.toString()))}var i=this;e.on("change",t).on("keyup",i._debounce(t,100)),i.options.hide&&e.on("focus",function(){i.show()})}})}}(jQuery),jQuery(document).ready(function(t){t(".color-picker").wpColorPicker()});