HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/html/toniolo/wp-content/plugins/arforms/js/jscolor.js
"use strict";window.jscolor||(window.jscolor=function(){var jsc={register:function(){jsc.attachDOMReadyEvent(jsc.init),jsc.attachEvent(document,"mousedown",jsc.onDocumentMouseDown),jsc.attachEvent(document,"touchstart",jsc.onDocumentTouchStart),jsc.attachEvent(window,"resize",jsc.onWindowResize)},init:function(){jsc.jscolor.lookupClass&&jsc.jscolor.installByClassName(jsc.jscolor.lookupClass)},tryInstallOnElements:function(e,t){for(var s,r=new RegExp("(^|\\s)("+t+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),i=0;i<e.length;i+=1)if(void 0===e[i].type||"color"!=e[i].type.toLowerCase()||!jsc.isColorAttrSupported)if(!e[i].jscolor&&e[i].className&&(s=e[i].className.match(r))){var o=e[i],n=null,a=jsc.getDataAttr(o,"jscolor");null!==a?n=a:s[4]&&(n=s[4]);a={};if(n)try{a=new Function("return ("+n+")")()}catch(e){jsc.warn("Error parsing jscolor options: "+e+":\n"+n)}o.jscolor=new jsc.jscolor(o,a)}},isColorAttrSupported:(l=document.createElement("input"),!(!l.setAttribute||(l.setAttribute("type","color"),"color"!=l.type.toLowerCase()))),isCanvasSupported:(m=document.createElement("canvas"),!(!m.getContext||!m.getContext("2d"))),fetchElement:function(e){return"string"==typeof e?document.getElementById(e):e},isElementType:function(e,t){return e.nodeName.toLowerCase()===t.toLowerCase()},getDataAttr:function(e,t){t=e.getAttribute("data-"+t);return null!==t?t:null},attachEvent:function(e,t,s){e.addEventListener?e.addEventListener(t,s,!1):e.attachEvent&&e.attachEvent("on"+t,s)},detachEvent:function(e,t,s){e.removeEventListener?e.removeEventListener(t,s,!1):e.detachEvent&&e.detachEvent("on"+t,s)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,s,r){jsc._attachedGroupEvents.hasOwnProperty(e)||(jsc._attachedGroupEvents[e]=[]),jsc._attachedGroupEvents[e].push([t,s,r]),jsc.attachEvent(t,s,r)},detachGroupEvents:function(e){if(jsc._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<jsc._attachedGroupEvents[e].length;t+=1){var s=jsc._attachedGroupEvents[e][t];jsc.detachEvent(s[0],s[1],s[2])}delete jsc._attachedGroupEvents[e]}},attachDOMReadyEvent:function(e){function t(){r||(r=!0,e())}var s,r=!1;"complete"!==document.readyState?document.addEventListener?(document.addEventListener("DOMContentLoaded",t,!1),window.addEventListener("load",t,!1)):document.attachEvent&&(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&(document.detachEvent("onreadystatechange",arguments.callee),t())}),window.attachEvent("onload",t),document.documentElement.doScroll&&window==window.top&&(s=function(){if(document.body)try{document.documentElement.doScroll("left"),t()}catch(e){setTimeout(s,1)}})()):setTimeout(t,1)},warn:function(e){window.console&&window.console.warn&&"Cannot link jscolor twice to the same element. Skipping."!=e&&window.console.warn(e)},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(jsc._capturedTarget=e,jsc._capturedTarget.setCapture())},releaseTarget:function(){jsc._capturedTarget&&(jsc._capturedTarget.releaseCapture(),jsc._capturedTarget=null)},fireEvent:function(e,t){var s;e&&(document.createEvent?((s=document.createEvent("HTMLEvents")).initEvent(t,!0,!0),e.dispatchEvent(s)):document.createEventObject?(s=document.createEventObject(),e.fireEvent("on"+t,s)):e["on"+t]&&e["on"+t]())},classNameToList:function(e){return e.replace(/^\s+|\s+$/g,"").split(/\s+/)},hasClass:function(e,t){return!!t&&-1!=(" "+e.className.replace(/\s+/g," ")+" ").indexOf(" "+t+" ")},setClass:function(e,t){for(var s=jsc.classNameToList(t),r=0;r<s.length;r+=1)jsc.hasClass(e,s[r])||(e.className+=(e.className?" ":"")+s[r])},unsetClass:function(e,t){for(var s=jsc.classNameToList(t),r=0;r<s.length;r+=1){var i=new RegExp("^\\s*"+s[r]+"\\s*|\\s*"+s[r]+"\\s*$|\\s+"+s[r]+"(\\s+)","g");e.className=e.className.replace(i,"$1")}},getStyle:function(e){return window.getComputedStyle?window.getComputedStyle(e):e.currentStyle},setStyle:(fa=document.createElement("div"),ha={borderRadius:ga(["borderRadius","MozBorderRadius","webkitBorderRadius"]),boxShadow:ga(["boxShadow","MozBoxShadow","webkitBoxShadow"])},function(e,t,s){var r;"opacity"===t.toLowerCase()?(r=Math.round(100*parseFloat(s)),e.style.opacity=s,e.style.filter="alpha(opacity="+r+")"):e.style[ha[t]]=s}),setBorderRadius:function(e,t){jsc.setStyle(e,"borderRadius",t||"0")},setBoxShadow:function(e,t){jsc.setStyle(e,"boxShadow",t||"none")},getElementPos:function(e,t){var s=0,r=0,e=e.getBoundingClientRect(),s=e.left,r=e.top;return t||(s+=(t=jsc.getViewPos())[0],r+=t[1]),[s,r]},getElementSize:function(e){return[e.offsetWidth,e.offsetHeight]},getAbsPointerPos:function(e){var t=0,s=0;return void 0!==(e=e||window.event).changedTouches&&e.changedTouches.length?(t=e.changedTouches[0].clientX,s=e.changedTouches[0].clientY):"number"==typeof e.clientX&&(t=e.clientX,s=e.clientY),{x:t,y:s}},getRelPointerPos:function(e){var t=((e=e||window.event).target||e.srcElement).getBoundingClientRect(),s=0,r=0;return void 0!==e.changedTouches&&e.changedTouches.length?(s=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY):"number"==typeof e.clientX&&(s=e.clientX,r=e.clientY),{x:s-t.left,y:r-t.top}},getViewPos:function(){var e=document.documentElement;return[(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0),(window.pageYOffset||e.scrollTop)-(e.clientTop||0)]},getViewSize:function(){var e=document.documentElement;return[window.innerWidth||e.clientWidth,window.innerHeight||e.clientHeight]},redrawPosition:function(){if(jsc.picker&&jsc.picker.owner){var e,t,s,r,i=jsc.picker.owner,o=i.fixed?(e=jsc.getElementPos(i.targetElement,!0),[0,0]):(e=jsc.getElementPos(i.targetElement),jsc.getViewPos()),n=jsc.getElementSize(i.targetElement),a=jsc.getViewSize(),l=jsc.getPickerOuterDims(i);switch(i.position.toLowerCase()){case"left":s=0,r=-(t=1);break;case"right":s=0,r=t=1;break;case"top":t=0,r=-(s=1);break;default:t=0,r=s=1}var c,d=(n[s]+l[s])/2,o=(c=i.smartPosition?[-o[t]+e[t]+l[t]>a[t]&&-o[t]+e[t]+n[t]/2>a[t]/2&&0<=e[t]+n[t]-l[t]?e[t]+n[t]-l[t]:e[t],-o[s]+e[s]+n[s]+l[s]-d+d*r>a[s]?-o[s]+e[s]+n[s]/2>a[s]/2&&0<=e[s]+n[s]-d-d*r?e[s]+n[s]-d-d*r:e[s]+n[s]-d+d*r:0<=e[s]+n[s]-d+d*r?e[s]+n[s]-d+d*r:e[s]+n[s]-d-d*r]:[e[t],e[s]+n[s]-d+d*r])[t],a=c[s],d=i.fixed?"fixed":"absolute",n=(c[0]+l[0]>e[0]||c[0]<e[0]+n[0])&&c[1]+l[1]<e[1]+n[1];jsc._drawPosition(i,o,a,d,n)}},_drawPosition:function(e,t,s,r,i){i=i?0:e.shadowBlur;jsc.picker.wrap.style.position=r,jsc.picker.wrap.style.left=t+"px",jsc.picker.wrap.style.top=s+"px",jsc.setBoxShadow(jsc.picker.boxS,e.shadow?new jsc.BoxShadow(0,i,e.shadowBlur,0,e.shadowColor):null)},getPickerDims:function(e){var t=!!jsc.getSliderComponent(e);return[2*e.insetWidth+2*e.padding+e.width+(t?2*e.insetWidth+jsc.getPadToSliderPadding(e)+e.sliderSize:0),2*e.insetWidth+2*e.padding+e.height+(e.closable?2*e.insetWidth+e.padding+e.buttonHeight:0)]},getPickerOuterDims:function(e){var t=jsc.getPickerDims(e);return[t[0]+2*e.borderWidth,t[1]+2*e.borderWidth]},getPadToSliderPadding:function(e){return Math.max(e.padding,1.5*(2*e.pointerBorderWidth+e.pointerThickness))},getPadYComponent:function(e){return"v"===e.mode.charAt(1).toLowerCase()?"v":"s"},getSliderComponent:function(e){if(2<e.mode.length)switch(e.mode.charAt(2).toLowerCase()){case"s":return"s";case"v":return"v"}return null},onDocumentMouseDown:function(e){var t=(e=e||window.event).target||e.srcElement;t._jscLinkedInstance?t._jscLinkedInstance.showOnClick&&t._jscLinkedInstance.show():t._jscControlName?jsc.onControlPointerStart(e,t,t._jscControlName,"mouse"):!jsc.picker||!jsc.picker.owner||jQuery(t).hasClass("arf_add_favorite_color")||jQuery(t).parents().hasClass("arf_add_favorite_color")||jQuery(t).hasClass("arf_color_picker_input_div")||jQuery(t).parents().hasClass("arf_color_picker_input_div")||jsc.picker.owner.hide()},onDocumentTouchStart:function(e){var t=(e=e||window.event).target||e.srcElement;t._jscLinkedInstance?t._jscLinkedInstance.showOnClick&&t._jscLinkedInstance.show():t._jscControlName?jsc.onControlPointerStart(e,t,t._jscControlName,"touch"):jsc.picker&&jsc.picker.owner&&jsc.picker.owner.hide()},onWindowResize:function(e){jsc.redrawPosition()},onParentScroll:function(e){jsc.picker&&jsc.picker.owner&&jsc.picker.owner.hide()},_pointerMoveEvent:{mouse:"mousemove",touch:"touchmove"},_pointerEndEvent:{mouse:"mouseup",touch:"touchend"},_pointerOrigin:null,_capturedTarget:null,onControlPointerStart:function(s,r,i,o){var e=r._jscInstance;jsc.preventDefault(s),jsc.captureTarget(r);var t=function(e,t){jsc.attachGroupEvent("drag",e,jsc._pointerMoveEvent[o],jsc.onDocumentPointerMove(s,r,i,o,t)),jsc.attachGroupEvent("drag",e,jsc._pointerEndEvent[o],jsc.onDocumentPointerEnd(s,r,i,o))};t(document,[0,0]),window.parent&&window.frameElement&&(n=[-(n=window.frameElement.getBoundingClientRect()).left,-n.top],t(window.parent.window.document,n));var t=jsc.getAbsPointerPos(s),n=jsc.getRelPointerPos(s);switch(jsc._pointerOrigin={x:t.x-n.x,y:t.y-n.y},i){case"pad":switch(jsc.getSliderComponent(e)){case"s":0===e.hsv[1]&&e.fromHSV(null,100,null);break;case"v":0===e.hsv[2]&&e.fromHSV(null,null,100)}jsc.setPad(e,s,0,0);break;case"sld":jsc.setSld(e,s,0)}jsc.dispatchFineChange(e)},onDocumentPointerMove:function(e,s,r,t,i){return function(e){var t=s._jscInstance;switch(r){case"pad":e=e||window.event,jsc.setPad(t,e,i[0],i[1]),jsc.dispatchFineChange(t);break;case"sld":e=e||window.event,jsc.setSld(t,e,i[1]),jsc.dispatchFineChange(t)}}},onDocumentPointerEnd:function(e,s,t,r){return function(e){var t=s._jscInstance;jsc.detachGroupEvents("drag"),jsc.releaseTarget(),jsc.dispatchChange(t)}},dispatchChange:function(e){e.valueElement&&jsc.isElementType(e.valueElement,"input")&&jsc.fireEvent(e.valueElement,"change")},dispatchFineChange:function(e){e.onFineChange&&("string"==typeof e.onFineChange?new Function(e.onFineChange):e.onFineChange).call(e)},setPad:function(e,t,s,r){var t=jsc.getAbsPointerPos(t),s=s+t.x-jsc._pointerOrigin.x-e.padding-e.insetWidth,t=r+t.y-jsc._pointerOrigin.y-e.padding-e.insetWidth,i=s*(360/(e.width-1)),o=100-t*(100/(e.height-1));switch(jsc.getPadYComponent(e)){case"s":e.fromHSV(i,o,null,jsc.leaveSld);break;case"v":e.fromHSV(i,null,o,jsc.leaveSld)}},setSld:function(e,t,s){var r=100-(s+jsc.getAbsPointerPos(t).y-jsc._pointerOrigin.y-e.padding-e.insetWidth)*(100/(e.height-1));switch(jsc.getSliderComponent(e)){case"s":e.fromHSV(null,r,null,jsc.leavePad);break;case"v":e.fromHSV(null,null,r,jsc.leavePad)}},_vmlNS:"jsc_vml_",_vmlCSS:"jsc_vml_css_",_vmlReady:!1,initVML:function(){if(!jsc._vmlReady){var e=document;if(e.namespaces[jsc._vmlNS]||e.namespaces.add(jsc._vmlNS,"urn:schemas-microsoft-com:vml"),!e.styleSheets[jsc._vmlCSS]){var t=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","rect","roundrect","oval","arc","image"],s=e.createStyleSheet();s.owningElement.id=jsc._vmlCSS;for(var r=0;r<t.length;r+=1)s.addRule(jsc._vmlNS+"\\:"+t[r],"behavior:url(#default#VML);")}jsc._vmlReady=!0}},createPalette:function(){var i,o,r,n,a,l,c,e,t={elm:null,draw:null};return jsc.isCanvasSupported?(i=document.createElement("canvas"),o=i.getContext("2d"),e=function(e,t,s){i.width=e,i.height=t,o.clearRect(0,0,i.width,i.height);t=o.createLinearGradient(0,0,i.width,0);t.addColorStop(0,"#F00"),t.addColorStop(1/6,"#FF0"),t.addColorStop(2/6,"#0F0"),t.addColorStop(.5,"#0FF"),t.addColorStop(4/6,"#00F"),t.addColorStop(5/6,"#F0F"),t.addColorStop(1,"#F00"),o.fillStyle=t,o.fillRect(0,0,i.width,i.height);var r=o.createLinearGradient(0,0,0,i.height);switch(s.toLowerCase()){case"s":r.addColorStop(0,"rgba(255,255,255,0)"),r.addColorStop(1,"rgba(255,255,255,1)");break;case"v":r.addColorStop(0,"rgba(0,0,0,0)"),r.addColorStop(1,"rgba(0,0,0,1)")}o.fillStyle=r,o.fillRect(0,0,i.width,i.height)},t.elm=i):(jsc.initVML(),(r=document.createElement("div")).style.position="relative",r.style.overflow="hidden",(n=document.createElement(jsc._vmlNS+":fill")).type="gradient",n.method="linear",n.angle="90",n.colors="16.67% #F0F, 33.33% #00F, 50% #0FF, 66.67% #0F0, 83.33% #FF0",(a=document.createElement(jsc._vmlNS+":rect")).style.position="absolute",a.style.left="-1px",a.style.top="-1px",a.stroked=!1,a.appendChild(n),r.appendChild(a),(l=document.createElement(jsc._vmlNS+":fill")).type="gradient",l.method="linear",l.angle="180",l.opacity="0",(c=document.createElement(jsc._vmlNS+":rect")).style.position="absolute",c.style.left="-1px",c.style.top="-1px",c.stroked=!1,c.appendChild(l),r.appendChild(c),e=function(e,t,s){switch(r.style.width=e+"px",r.style.height=t+"px",a.style.width=c.style.width=e+1+"px",a.style.height=c.style.height=t+1+"px",n.color="#F00",n.color2="#F00",s.toLowerCase()){case"s":l.color=l.color2="#FFF";break;case"v":l.color=l.color2="#000"}},t.elm=r),t.draw=e,t},createSliderGradient:function(){var i,o,n,a,l,e,t={elm:null,draw:null};return jsc.isCanvasSupported?(i=document.createElement("canvas"),o=i.getContext("2d"),e=function(e,t,s,r){i.width=e,i.height=t,o.clearRect(0,0,i.width,i.height);t=o.createLinearGradient(0,0,0,i.height);t.addColorStop(0,s),t.addColorStop(1,r),o.fillStyle=t,o.fillRect(0,0,i.width,i.height)},t.elm=i):(jsc.initVML(),(n=document.createElement("div")).style.position="relative",n.style.overflow="hidden",(a=document.createElement(jsc._vmlNS+":fill")).type="gradient",a.method="linear",a.angle="180",(l=document.createElement(jsc._vmlNS+":rect")).style.position="absolute",l.style.left="-1px",l.style.top="-1px",l.stroked=!1,l.appendChild(a),n.appendChild(l),e=function(e,t,s,r){n.style.width=e+"px",n.style.height=t+"px",l.style.width=e+1+"px",l.style.height=t+1+"px",a.color=s,a.color2=r},t.elm=n),t.draw=e,t},leaveValue:1,leaveStyle:2,leavePad:4,leaveSld:8,BoxShadow:(Sb.prototype.toString=function(){var e=[Math.round(this.hShadow)+"px",Math.round(this.vShadow)+"px",Math.round(this.blur)+"px",Math.round(this.spread)+"px",this.color];return this.inset&&e.push("inset"),e.join(" ")},Sb),jscolor:function(targetElement,options){function RGB_HSV(e,t,s){e/=255,t/=255,s/=255;var r=Math.min(Math.min(e,t),s),i=Math.max(Math.max(e,t),s),o=i-r;if(0==o)return[null,0,100*i];e=e===r?3+(s-t)/o:t===r?5+(e-s)/o:1+(t-e)/o;return[60*(6==e?0:e),o/i*100,100*i]}function HSV_RGB(e,t,s){var r=s/100*255;if(null===e)return[r,r,r];e/=60,t/=100;var s=Math.floor(e),i=r*(1-t),o=r*(1-t*(s%2?e-s:1-(e-s)));switch(s){case 6:case 0:return[r,o,i];case 1:return[o,r,i];case 2:return[i,r,o];case 3:return[i,o,r];case 4:return[o,i,r];case 5:return[r,i,o]}}function detachPicker(){jsc.unsetClass(THIS.targetElement,THIS.activeClass),null!=jsc.picker.wrap.parentNode&&jsc.picker.wrap.parentNode.removeChild(jsc.picker.wrap),delete jsc.picker.owner}function drawPicker(){function setBtnBorder(){var e=THIS.insetColor.split(/\s+/),e=e.length<2?e[0]:e[1]+" "+e[0]+" "+e[0]+" "+e[1];p.btn.style.borderColor=e}if(!jQuery(THIS.targetElement).hasClass("arf_editor_basic_colorpicker")&&!jQuery(THIS.targetElement).hasClass("arfdisablediv")){var is_disabled=jQuery(THIS.targetElement).parents(".arf_field_type_colorpicker").attr("data-view")||!1;if(0==is_disabled||"arf_disable"!=is_disabled){THIS._processParentElementsInDOM(),setTimeout(function(){jQuery(".arf_add_favorite_color").remove(),jQuery(".arf_color_picker_input_div").remove()},100),jsc.picker||(jsc.picker={owner:null,wrap:document.createElement("div"),box:document.createElement("div"),boxS:document.createElement("div"),boxB:document.createElement("div"),pad:document.createElement("div"),padB:document.createElement("div"),padM:document.createElement("div"),padPal:jsc.createPalette(),cross:document.createElement("div"),crossBY:document.createElement("div"),crossBX:document.createElement("div"),crossLY:document.createElement("div"),crossLX:document.createElement("div"),sld:document.createElement("div"),sldB:document.createElement("div"),sldM:document.createElement("div"),sldGrad:jsc.createSliderGradient(),sldPtrS:document.createElement("div"),sldPtrIB:document.createElement("div"),sldPtrMB:document.createElement("div"),sldPtrOB:document.createElement("div"),btn:document.createElement("div"),btnT:document.createElement("span"),temp:document.createElement("div")},jsc.picker.pad.appendChild(jsc.picker.padPal.elm),jsc.picker.padB.appendChild(jsc.picker.pad),jsc.picker.cross.appendChild(jsc.picker.crossBY),jsc.picker.cross.appendChild(jsc.picker.crossBX),jsc.picker.cross.appendChild(jsc.picker.crossLY),jsc.picker.cross.appendChild(jsc.picker.crossLX),jsc.picker.padB.appendChild(jsc.picker.cross),jsc.picker.box.appendChild(jsc.picker.padB),jsc.picker.box.appendChild(jsc.picker.padM),jsc.picker.sld.appendChild(jsc.picker.sldGrad.elm),jsc.picker.sldB.appendChild(jsc.picker.sld),jsc.picker.sldB.appendChild(jsc.picker.sldPtrOB),jsc.picker.sldPtrOB.appendChild(jsc.picker.sldPtrMB),jsc.picker.sldPtrMB.appendChild(jsc.picker.sldPtrIB),jsc.picker.sldPtrIB.appendChild(jsc.picker.sldPtrS),jsc.picker.box.appendChild(jsc.picker.sldB),jsc.picker.box.appendChild(jsc.picker.sldM),jsc.picker.btn.appendChild(jsc.picker.btnT),jsc.picker.box.appendChild(jsc.picker.btn),jsc.picker.boxB.appendChild(jsc.picker.box),jsc.picker.wrap.appendChild(jsc.picker.boxS),jsc.picker.wrap.appendChild(jsc.picker.boxB)),jsc.picker.color_input_hex_div=document.createElement("div"),jsc.picker.color_input_hex_div.setAttribute("class","color_input_hex_div"),jsc.picker.color_input_hex_div.innerHTML="#",jsc.picker.color_input=document.createElement("input"),jsc.picker.color_input.setAttribute("class","arf_color_picker_input"),jsc.picker.color_input.setAttribute("id","arf_color_picker_input"),void 0!==jQuery(THIS.valueElement).attr("value")&&jsc.picker.color_input.setAttribute("value",jQuery(THIS.valueElement).attr("value").replace("#","")),jsc.picker.color_input.setAttribute("data-value",jQuery(THIS.valueElement).attr("id")),jsc.picker.color_input.addEventListener("change",function(e){var id=jQuery(this).attr("data-value"),is_item=!1,elm,is_item,elm,elm,elm,elm,elm;/(itemmeta_(\d+))/gi.test(id)?(elm=jQuery("#"+id)[0],is_item=!0):elm=(jQuery("#"+id).hasClass("arf_js_colorpicker")?jQuery("#"+id):/(upload_btn_color_[\d+]|upload_font_color_[\d+]|star_rating_color_[\d+]|arf_divider_bg_color_[\d+]|like_bg_color_[\d+]|dislike_bg_color_[\d+]|slider_bg_color_[\d+]|slider_bg_color2_[\d+]|slider_handle_color_[\d+])/.test(id)?jQuery("#"+id).prev().find(".arf_coloroption"):/(arf_modal_bg_color|arf_modal_btn_bg_color|arf_modal_btn_txt_color)/.test(id)?jQuery("#"+id).parent(".arf_coloroption_sub").find(".arf_coloroption"):/field\_[a-zA-Z0-9]{6}\_(\d+)/gi.test(id)?jQuery("[data-fid='"+id+"']"):jQuery("#"+id).prev())[0];var color="#"+jQuery(this).val();"undefined"!=typeof __JSPICKER&&jQuery(__JSPICKER).each(function(n){var array=__JSPICKER[n];if(void 0===array)return!0;var target=array.targetElement;elm===target&&(__JSPICKER[n].fromString(color.replace("#","")),eval(array.onFineChange))})}),jsc.picker.color_input.addEventListener("paste",function(event){event.preventDefault();var clipboardData=event.clipboardData.getData("text"),clipboardData=clipboardData.replace("#","");jQuery(this).val(clipboardData).trigger("change");var id=jQuery(this).attr("data-value"),color=jQuery(this).val(),elm,elm,elm,elm,elm,elm;elm=(/(itemmeta_(\d+))/gi.test(id)||jQuery("#"+id).hasClass("arf_js_colorpicker")?jQuery("#"+id):/(upload_btn_color_[\d+]|upload_font_color_[\d+]|star_rating_color_[\d+]|arf_divider_bg_color_[\d+]|like_bg_color_[\d+]|dislike_bg_color_[\d+]|slider_bg_color_[\d+]|slider_bg_color2_[\d+]|slider_handle_color_[\d+])/.test(id)?jQuery("#"+id).prev().find(".arf_coloroption"):/(arf_modal_bg_color|arf_modal_btn_bg_color|arf_modal_btn_txt_color)/.test(id)?jQuery("#"+id).parent(".arf_coloroption_sub").find(".arf_coloroption"):/field\_[a-zA-Z0-9]{6}\_(\d+)/gi.test(id)?jQuery("[data-fid='"+id+"']"):jQuery("#"+id).prev())[0],"undefined"!=typeof __JSPICKER&&jQuery(__JSPICKER).each(function(n){var array=__JSPICKER[n],target=array.targetElement;elm===target&&(__JSPICKER[n].fromString(color.replace("#","")),eval(array.onFineChange))})}),jsc.picker.color_input_div=document.createElement("div"),jsc.picker.color_input_div.setAttribute("class","arf_color_picker_input_div"),jsc.picker.color_input_div.setAttribute("id","arf_color_picker_input_div"),jsc.picker.color_input_div.appendChild(jsc.picker.color_input_hex_div),jsc.picker.color_input_div.appendChild(jsc.picker.color_input),setTimeout(function(){jsc.picker.box.appendChild(jsc.picker.color_input_div)},200),jsc.picker.fav=document.createElement("div"),jsc.picker.favW=document.createElement("div"),jsc.picker.favB=document.createElement("div"),jsc.picker.favI=document.createElement("i"),jsc.picker.favB.setAttribute("data-value",jQuery(THIS.valueElement).attr("id")),jsc.picker.favI.setAttribute("class","fas fa-heart"),jsc.picker.favB.appendChild(jsc.picker.favI),jsc.picker.favW.setAttribute("class","arf_favorite_color_buttons"),jsc.picker.fav.appendChild(jsc.picker.favW),jsc.picker.favB.setAttribute("class","arf_add_favorite_color_btn"),jsc.picker.favB.setAttribute("data-tipso","Add to Favourite"),jsc.picker.favB.setAttribute("title","Add to Favourite"),jsc.picker.favB.setAttribute("id","arf_add_favorite_color_btn");var favorite_colors=getCookie("arf_fav_color[colors]");if(void 0!==favorite_colors&&""!==favorite_colors&&null!==favorite_colors){var fav_cols=favorite_colors.split(","),n;for(n in fav_cols){var color=fav_cols[n],div=document.createElement("div");div.setAttribute("class","select_from_fav_color"),div.setAttribute("value",color),div.setAttribute("style","background:"+color),n<7&&jsc.picker.favW.appendChild(div)}}jsc.picker.fav.appendChild(jsc.picker.favB),jsc.picker.fav.setAttribute("class","arf_add_favorite_color"),jsc.picker.fav.setAttribute("id","arf_add_favorite_color"),setTimeout(function(){jsc.picker.box.appendChild(jsc.picker.fav)},200);var p=jsc.picker,displaySlider=!!jsc.getSliderComponent(THIS),dims=jsc.getPickerDims(THIS),crossOuterSize=2*THIS.pointerBorderWidth+THIS.pointerThickness+2*THIS.crossSize,padToSliderPadding=jsc.getPadToSliderPadding(THIS),borderRadius=Math.min(THIS.borderRadius,Math.round(THIS.padding*Math.PI)),padCursor="crosshair";p.wrap.setAttribute("class","arf_js_colorpicker"),p.wrap.style.clear="both",p.wrap.style.width=dims[0]+2*THIS.borderWidth+"px",p.wrap.style.height=dims[1]+2*THIS.borderWidth+65+"px",p.wrap.style.zIndex=THIS.zIndex,p.fav.style.top=dims[1]+2*THIS.borderWidth-5+"px",p.box.style.width=dims[0]+"px",p.box.style.height=dims[1]+65+"px",p.boxS.style.position="absolute",p.boxS.style.left="0",p.boxS.style.top="0",p.boxS.style.width="100%",p.boxS.style.height="100%",jsc.setBorderRadius(p.boxS,borderRadius+"px"),void 0!==jsc.picker.rbncls&&null!==jsc.picker.rbncls&&delete jsc.picker.rbncls,p.boxB.style.position="relative",p.boxB.style.border=THIS.borderWidth+"px solid",p.boxB.style.borderColor=THIS.borderColor,p.boxB.style.background=THIS.backgroundColor,jsc.setBorderRadius(p.boxB,borderRadius+"px"),p.padM.style.background=p.sldM.style.background="#FFF",jsc.setStyle(p.padM,"opacity","0"),jsc.setStyle(p.sldM,"opacity","0"),p.pad.style.position="relative",p.pad.style.width=THIS.width+"px",p.pad.style.height=THIS.height+"px",p.padPal.draw(THIS.width,THIS.height,jsc.getPadYComponent(THIS)),p.padB.style.position="absolute",p.padB.style.left=THIS.padding+"px",p.padB.style.top=THIS.padding+"px",p.padB.style.border=THIS.insetWidth+"px solid",p.padB.style.borderColor=THIS.insetColor,p.padM._jscInstance=THIS,p.padM._jscControlName="pad",p.padM.style.position="absolute",p.padM.style.left="0",p.padM.style.top="0",p.padM.style.width=THIS.padding+2*THIS.insetWidth+THIS.width+padToSliderPadding/2+"px",p.padM.style.height=dims[1]+"px",p.padM.style.cursor=padCursor,p.cross.style.position="absolute",p.cross.style.left=p.cross.style.top="0",p.cross.style.width=p.cross.style.height=crossOuterSize+"px",p.crossBY.style.position=p.crossBX.style.position="absolute",p.crossBY.style.background=p.crossBX.style.background=THIS.pointerBorderColor,p.crossBY.style.width=p.crossBX.style.height=2*THIS.pointerBorderWidth+THIS.pointerThickness+"px",p.crossBY.style.height=p.crossBX.style.width=crossOuterSize+"px",p.crossBY.style.left=p.crossBX.style.top=Math.floor(crossOuterSize/2)-Math.floor(THIS.pointerThickness/2)-THIS.pointerBorderWidth+"px",p.crossBY.style.top=p.crossBX.style.left="0",p.crossLY.style.position=p.crossLX.style.position="absolute",p.crossLY.style.background=p.crossLX.style.background=THIS.pointerColor,p.crossLY.style.height=p.crossLX.style.width=crossOuterSize-2*THIS.pointerBorderWidth+"px",p.crossLY.style.width=p.crossLX.style.height=THIS.pointerThickness+"px",p.crossLY.style.left=p.crossLX.style.top=Math.floor(crossOuterSize/2)-Math.floor(THIS.pointerThickness/2)+"px",p.crossLY.style.top=p.crossLX.style.left=THIS.pointerBorderWidth+"px",p.sld.style.overflow="hidden",p.sld.style.width=THIS.sliderSize+"px",p.sld.style.height=THIS.height+"px",p.sldGrad.draw(THIS.sliderSize,THIS.height,"#000","#000"),p.sldB.style.display=displaySlider?"block":"none",p.sldB.style.position="absolute",p.sldB.style.right=THIS.padding+"px",p.sldB.style.top=THIS.padding+"px",p.sldB.style.border=THIS.insetWidth+"px solid",p.sldB.style.borderColor=THIS.insetColor,p.sldM._jscInstance=THIS,p.sldM._jscControlName="sld",p.sldM.style.display=displaySlider?"block":"none",p.sldM.style.position="absolute",p.sldM.style.right="0",p.sldM.style.top="0",p.sldM.style.width=THIS.sliderSize+padToSliderPadding/2+THIS.padding+2*THIS.insetWidth+"px",p.sldM.style.height=dims[1]+"px",p.sldM.style.cursor="default",p.sldPtrIB.style.border=p.sldPtrOB.style.border=THIS.pointerBorderWidth+"px solid "+THIS.pointerBorderColor,p.sldPtrOB.style.position="absolute",p.sldPtrOB.style.left=-(2*THIS.pointerBorderWidth+THIS.pointerThickness)+"px",p.sldPtrOB.style.top="0",p.sldPtrMB.style.border=THIS.pointerThickness+"px solid "+THIS.pointerColor,p.sldPtrS.style.width=THIS.sliderSize+"px",p.sldPtrS.style.height=sliderPtrSpace+"px",p.btn.style.display=THIS.closable?"block":"none",p.btn.style.position="absolute",p.btn.style.left=THIS.padding+"px",p.btn.style.bottom=THIS.padding+"px",p.btn.style.padding="0 15px",p.btn.style.height=THIS.buttonHeight+"px",p.btn.style.border=THIS.insetWidth+"px solid",setBtnBorder(),p.btn.style.color=THIS.buttonColor,p.btn.style.font="12px sans-serif",p.btn.style.textAlign="center";try{p.btn.style.cursor="pointer"}catch(eOldIE){p.btn.style.cursor="hand"}p.btn.onmousedown=function(){THIS.hide()},p.btnT.style.lineHeight=THIS.buttonHeight+"px",p.btnT.innerHTML="",p.btnT.appendChild(document.createTextNode(THIS.closeText)),redrawPad(),redrawSld(),jsc.picker.owner&&jsc.picker.owner!==THIS&&jsc.unsetClass(jsc.picker.owner.targetElement,THIS.activeClass),jsc.picker.owner=THIS,jsc.isElementType(container,"body")?jsc.redrawPosition():jsc._drawPosition(THIS,0,0,"relative",!1),p.wrap.parentNode!=container&&container.appendChild(p.wrap),jsc.setClass(THIS.targetElement,THIS.activeClass),"function"==typeof jQuery().tipso&&setTimeout(function(){jQuery(".arftooltipster").tipso({position:"bottom",background:"#43B4FB",width:"auto"})},250)}}}function redrawPad(){switch(jsc.getPadYComponent(THIS)){case"s":var e=1;break;case"v":e=2}var t=Math.round(THIS.hsv[0]/360*(THIS.width-1)),s=Math.round((1-THIS.hsv[e]/100)*(THIS.height-1)),r=2*THIS.pointerBorderWidth+THIS.pointerThickness+2*THIS.crossSize,r=-Math.floor(r/2);switch(jsc.picker.cross.style.left=t+r+"px",jsc.picker.cross.style.top=s+r+"px",jsc.getSliderComponent(THIS)){case"s":var i=HSV_RGB(THIS.hsv[0],100,THIS.hsv[2]),o=HSV_RGB(THIS.hsv[0],0,THIS.hsv[2]),n="rgb("+Math.round(i[0])+","+Math.round(i[1])+","+Math.round(i[2])+")",i="rgb("+Math.round(o[0])+","+Math.round(o[1])+","+Math.round(o[2])+")";jsc.picker.sldGrad.draw(THIS.sliderSize,THIS.height,n,i),"arf_advanced_color_picker"===jQuery(THIS.styleElement).attr("id")&&jsc.picker.sldGrad.draw(THIS.sliderSize,THIS.height+20,n,i);break;case"v":o=HSV_RGB(THIS.hsv[0],THIS.hsv[1],100),n="rgb("+Math.round(o[0])+","+Math.round(o[1])+","+Math.round(o[2])+")",i="#000";jsc.picker.sldGrad.draw(THIS.sliderSize,THIS.height,n,i),"arf_advanced_color_picker"===jQuery(THIS.styleElement).attr("id")&&jsc.picker.sldGrad.draw(THIS.sliderSize,THIS.height+20,n,i)}}function redrawSld(){var e=jsc.getSliderComponent(THIS);if(e){switch(e){case"s":var t=1;break;case"v":t=2}e=Math.round((1-THIS.hsv[t]/100)*(THIS.height-1));jsc.picker.sldPtrOB.style.top=e-(2*THIS.pointerBorderWidth+THIS.pointerThickness)-Math.floor(sliderPtrSpace/2)+"px"}}function isPickerOwner(){return jsc.picker&&jsc.picker.owner===THIS}function blurValue(){THIS.importColor()}for(var opt in this.value=null,this.valueElement=targetElement,this.styleElement=targetElement,this.required=!0,this.refine=!0,this.hash=!1,this.uppercase=!0,this.onFineChange=null,this.activeClass="jscolor-active",this.minS=0,this.maxS=100,this.minV=0,this.maxV=100,this.hsv=[0,0,100],this.rgb=[255,255,255],this.width=181,this.height=101,this.showOnClick=!0,this.mode="HSV",this.position="bottom",this.smartPosition=!0,this.sliderSize=16,this.crossSize=8,this.closable=!1,this.closeText="Close",this.buttonColor="#000000",this.buttonHeight=18,this.padding=12,this.backgroundColor="#EBEBEB",this.borderWidth=1,this.borderColor="#BBBBBB",this.borderRadius=8,this.insetWidth=1,this.insetColor="#BBBBBB",this.shadow=!0,this.shadowBlur=15,this.shadowColor="rgba(0,0,0,0.2)",this.pointerColor="#4C4C4C",this.pointerBorderColor="#FFFFFF",this.pointerBorderWidth=1,this.pointerThickness=2,this.zIndex=1e3,this.container=null,options)options.hasOwnProperty(opt)&&(this[opt]=options[opt]);var id,elm,THIS,container,sliderPtrSpace,origCallback,updateField;this.hide=function(){isPickerOwner()&&detachPicker()},this.show=function(){drawPicker()},this.redraw=function(){isPickerOwner()&&drawPicker()},this.importColor=function(){this.valueElement&&jsc.isElementType(this.valueElement,"input")?this.refine?!this.required&&/^\s*$/.test(this.valueElement.value)?(this.valueElement.value="",this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(jsc.leaveValue|jsc.leaveStyle)):this.fromString(this.valueElement.value)||this.exportColor():this.fromString(this.valueElement.value,jsc.leaveValue)||(this.styleElement&&(this.styleElement.style.backgroundImage=this.styleElement._jscOrigStyle.backgroundImage,this.styleElement.style.backgroundColor=this.styleElement._jscOrigStyle.backgroundColor,this.styleElement.style.color=this.styleElement._jscOrigStyle.color),this.exportColor(jsc.leaveValue|jsc.leaveStyle)):this.exportColor()},this.exportColor=function(e){var t;e&jsc.leaveValue||!this.valueElement||(t=this.toString(),this.uppercase&&(t=t.toUpperCase()),this.hash&&(t="#"+t),"string"==typeof this.valueElement&&(this.valueElement=jQuery("#"+this.valueElement)[0]),jsc.isElementType(this.valueElement,"input")?this.valueElement.value=t:this.valueElement.innerHTML=t),e&jsc.leaveStyle||this.styleElement&&(this.styleElement.style.backgroundImage="none",hasClass(this.styleElement,"arf_editor_colorpicker")?this.styleElement.style.backgroundColor="#"+this.toString()+" !important":this.styleElement.style.backgroundColor="#"+this.toString(),this.styleElement.style.color=this.isLight()?"#000":"#FFF"),e&jsc.leavePad||!isPickerOwner()||redrawPad(),e&jsc.leaveSld||!isPickerOwner()||redrawSld()},this.fromHSV=function(e,t,s,r){if(null!==e){if(isNaN(e))return!1;e=Math.max(0,Math.min(360,e))}if(null!==t){if(isNaN(t))return!1;t=Math.max(0,Math.min(100,this.maxS,t),this.minS)}if(null!==s){if(isNaN(s))return!1;s=Math.max(0,Math.min(100,this.maxV,s),this.minV)}this.rgb=HSV_RGB(null===e?this.hsv[0]:this.hsv[0]=e,null===t?this.hsv[1]:this.hsv[1]=t,null===s?this.hsv[2]:this.hsv[2]=s),this.exportColor(r)},this.fromRGB=function(e,t,s,r){if(null!==e){if(isNaN(e))return!1;e=Math.max(0,Math.min(255,e))}if(null!==t){if(isNaN(t))return!1;t=Math.max(0,Math.min(255,t))}if(null!==s){if(isNaN(s))return!1;s=Math.max(0,Math.min(255,s))}s=RGB_HSV(null===e?this.rgb[0]:e,null===t?this.rgb[1]:t,null===s?this.rgb[2]:s);null!==s[0]&&(this.hsv[0]=Math.max(0,Math.min(360,s[0]))),0!==s[2]&&(this.hsv[1]=null===s[1]?null:Math.max(0,this.minS,Math.min(100,this.maxS,s[1]))),this.hsv[2]=null===s[2]?null:Math.max(0,this.minV,Math.min(100,this.maxV,s[2]));s=HSV_RGB(this.hsv[0],this.hsv[1],this.hsv[2]);this.rgb[0]=s[0],this.rgb[1]=s[1],this.rgb[2]=s[2],this.exportColor(r)},this.fromString=function(e,t){if(s=e.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))return 6===s[1].length?this.fromRGB(parseInt(s[1].substr(0,2),16),parseInt(s[1].substr(2,2),16),parseInt(s[1].substr(4,2),16),t):this.fromRGB(parseInt(s[1].charAt(0)+s[1].charAt(0),16),parseInt(s[1].charAt(1)+s[1].charAt(1),16),parseInt(s[1].charAt(2)+s[1].charAt(2),16),t),!0;if(s=e.match(/^\W*rgba?\(([^)]*)\)\W*$/i)){var e=s[1].split(","),s=/^\s*(\d*)(\.\d+)?\s*$/;if(3<=e.length&&(r=e[0].match(s))&&(i=e[1].match(s))&&(o=e[2].match(s))){var r=parseFloat((r[1]||"0")+(r[2]||"")),i=parseFloat((i[1]||"0")+(i[2]||"")),o=parseFloat((o[1]||"0")+(o[2]||""));return this.fromRGB(r,i,o,t),!0}}return!1},this.toString=function(){return(256|Math.round(this.rgb[0])).toString(16).substr(1)+(256|Math.round(this.rgb[1])).toString(16).substr(1)+(256|Math.round(this.rgb[2])).toString(16).substr(1)},this.toHEXString=function(){return"#"+this.toString().toUpperCase()},this.toRGBString=function(){return"rgb("+Math.round(this.rgb[0])+","+Math.round(this.rgb[1])+","+Math.round(this.rgb[2])+")"},this.isLight=function(){return 127.5<.213*this.rgb[0]+.715*this.rgb[1]+.072*this.rgb[2]},this._processParentElementsInDOM=function(){if(!this._linkedElementsProcessed){this._linkedElementsProcessed=!0;var e=this.targetElement;do{var t=jsc.getStyle(e)}while(t&&"fixed"===t.position.toLowerCase()&&(this.fixed=!0),e!==this.targetElement&&(e._jscEventsAttached||(jsc.attachEvent(e,"scroll",jsc.onParentScroll),e._jscEventsAttached=!0)),(e=e.parentNode)&&!jsc.isElementType(e,"body"))}},"string"==typeof targetElement?(id=targetElement,elm=document.getElementById(id),elm?this.targetElement=elm:jsc.warn("Could not find target element with ID '"+id+"'")):targetElement?this.targetElement=targetElement:jsc.warn("Invalid target element: '"+targetElement+"'"),this.targetElement._jscLinkedInstance?jsc.warn("Cannot link jscolor twice to the same element. Skipping."):(this.targetElement._jscLinkedInstance=this,this.valueElement=jsc.fetchElement(this.valueElement),this.styleElement=jsc.fetchElement(this.styleElement),THIS=this,container=this.container?jsc.fetchElement(this.container):document.getElementsByTagName("body")[0],sliderPtrSpace=3,jsc.isElementType(this.targetElement,"button")&&(this.targetElement.onclick?(origCallback=this.targetElement.onclick,this.targetElement.onclick=function(e){return origCallback.call(this,e),!1}):this.targetElement.onclick=function(){return!1}),this.valueElement&&jsc.isElementType(this.valueElement,"input")&&(updateField=function(){THIS.fromString(THIS.valueElement.value,jsc.leaveValue),jsc.dispatchFineChange(THIS)},jsc.attachEvent(this.valueElement,"keyup",updateField),jsc.attachEvent(this.valueElement,"input",updateField),jsc.attachEvent(this.valueElement,"blur",blurValue),this.valueElement.setAttribute("autocomplete","off")),this.styleElement&&(this.styleElement._jscOrigStyle={backgroundImage:this.styleElement.style.backgroundImage,backgroundColor:this.styleElement.style.backgroundColor,color:this.styleElement.style.color}),this.value?this.fromString(this.value)||this.exportColor():this.importColor())}},fa,ha,m,l;function Sb(e,t,s,r,i,o){this.hShadow=e,this.vShadow=t,this.blur=s,this.spread=r,this.color=i,this.inset=!!o}function ga(e){for(var t=0;t<e.length;t+=1)if(e[t]in fa.style)return e[t]}return jsc.jscolor.lookupClass="jscolor",jsc.jscolor.installByClassName=function(e){var t=document.getElementsByTagName("input"),s=document.getElementsByTagName("button");jsc.tryInstallOnElements(t,e),jsc.tryInstallOnElements(s,e);s=document.getElementsByTagName("div");jsc.tryInstallOnElements(s,e)},jsc.register(),jsc.jscolor}());