')}),l.find(".point").css("width",this.settings.point+"px").css("height",this.settings.point+"px").mouseup(function(){s._selectPoint(this)}).draggable({axis:"x",containment:"parent",drag(){s._selectPoint(this),s._renderCanvas(),s._renderToTarget()}})},this._selectPoint=function(t){const e=this;p=g(t);let s=g(t).css("backgroundColor"),i=parseInt(g(t).css("left"));i=Math.round(i/this.settings.width*100),s=(s=s.substr(4,s.length)).substr(0,s.length-1),a.ColorPickerSetColor(this._rgbToHex(s.split(","))),a.find("div").css("backgroundColor",this._rgbToHex(s.split(","))),d.html("Position: "+i+"%"),u.unbind("click").bind("click",function(){return 1'),l="-webkit-gradient(linear, left top, "+o,a="";g.each(e,function(t,e){l+=", color-stop("+e[0]+", "+e[1]+")",a+=","+e[1]+" "+e[0],n+=''}),l+=")",a=a.substr(1),n+="",t===h?(e=parseInt(h.css("borderRadius")),n+=''):n+='',n+="",n=this._base64(n),t.css("background","url(data:image/svg+xml;base64,"+n+")"),t.css("background",l),t.css("background","-moz-linear-gradient("+r+","+a+")"),t.css("background","-webkit-linear-gradient("+r+","+a+")"),t.css("background","-o-linear-gradient("+r+","+a+")"),t.css("background","-ms-linear-gradient("+r+","+a+")"),t.css("background","linear-gradient("+r+","+a+")")},this._renderToTarget=function(){null!==this.settings.target&&this._renderToElement(g(this.settings.target),f)},this._renderToCanvas=function(){const s=_.createLinearGradient(0,0,this.settings.width,0);g.each(f,function(t,e){s.addColorStop(parseInt(e[0])/100,e[1])}),_.clearRect(0,0,this.settings.width,this.settings.height),_.fillStyle=s,_.fillRect(0,0,this.settings.width,this.settings.height),this.settings.onChange(this.getString(),this.getCSS(),this.getArray())},this._getGradientFromString=function(t){const i=new Array,e=t.split(",");return g.each(e,function(t,e){let s;"100"==e.substr(e.indexOf("%")-3,e.indexOf("%"))||"100%"==e.substr(e.indexOf("%")-3,e.indexOf("%"))?s="100%":(s=1parseInt(e[0])?1:0},this._base64=function(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s="",i,o,r,n,l,a,c,h=0;for(;h>2,l=(3&i)<<4|o>>4,a=(15&o)<<2|r>>6,c=63&r,isNaN(o)?a=c=64:isNaN(r)&&(c=64),s+=e.charAt(n)+e.charAt(l)+e.charAt(a)+e.charAt(c);return s},this.__constructor()},g.fn.ClassyGradient=function(e){return this.each(function(){var t;void 0===g(this).data("ClassyGradient")&&(t=new g.ClassyGradient(this,e),g(this).data("ClassyGradient",t))})}}(jQuery),function(c){c(document).ready(function(){if("undefined"==typeof vc||void 0===window.VcColumnView)return!1;window.ULTHotspotSingleView=vc.shortcode_view.extend({editElement(t){_.isObject(t)&&t.preventDefault(),window.ULTHotspotSingleView.__super__.editElement.call(this,t),this.model.get("params");const e=this.$el,s=e.parent().attr("data-hotspot-image");t=null==e.attr("data-latest-img")||0===e.attr("data-latest-img").length?s:e.attr("data-latest-img"),e.attr("data-hotspot-image",s),null==e.parent().attr("data-hotspot-link")||0==e.parent().attr("data-hotspot-link").length||t!=s?c.ajax({type:"POST",url:window.ajaxurl,data:{action:"wpb_single_image_src",content:s,size:"full",_vcnonce:window.vcAdminNonce},dataType:"html",success(t){ULT_H_img_ID=s,ULT_H_img_link=t,e.attr("data-hotspot-link",t),e.attr("data-latest-img",s)}}):(t=e.parent().attr("data-hotspot-link"),ULT_H_img_link=t,ULT_H_img_ID=e.parent().attr("data-hotspot-image")),ULT_H_Size=e.parent().attr("data-hotspot-size"),ULT_H_custom_size=e.parent().attr("data-hotspot-custom")}});const a=vc.shortcodes;window.ULTHotspotContainerView=window.VcColumnView.extend({buildDesignHelpers(){var t=this.model.get("params");const e=this.$el;e.attr("data-model-id");let s=t.main_img;var i=t.main_img_size;let o=t.main_img_width;var r=s.split("|");let n="",l="";"undefined"!=r&&null!=r&&jQuery.each(r,function(t,e){e.startsWith("id:")&&(n=e.split("id:").pop()),e.startsWith("id^")&&(n=e.split("id^").pop()),e.startsWith("url:")&&(l=e.split("url:").pop()),e.startsWith("url^")&&(l=e.split("url^").pop())}),null!=n&&"undefined"!=n&&null!=l&&"undefined"!=l&&(s=n+"|"+l),void 0!==t.main_img_width&&(o=t.main_img_width),a.where({parent_id:this.model.id}),_.isEmpty(s)||(e.find("> .wpb_element_wrapper .wpb_column_container").attr("data-hotspot-image",s),e.find("> .wpb_element_wrapper .wpb_column_container").attr("data-hotspot-size",i),e.find("> .wpb_element_wrapper .wpb_column_container").attr("data-hotspot-custom",o),e.attr("data-hotspot-image",s),e.attr("data-hotspot-size",i),e.attr("data-hotspot-custom",o),c.ajax({type:"POST",url:window.ajaxurl,data:{action:"wpb_single_image_src",content:s,size:"full",_vcnonce:window.vcAdminNonce},dataType:"html",success(t){e.find("> .wpb_element_wrapper .wpb_column_container").attr("data-hotspot-link",t),e.attr("data-hotspot-link",t)}}))},addElement(t){_.isObject(t)&&t.preventDefault();var e=this.$el.attr("data-hotspot-image"),s=this.$el.attr("data-hotspot-link"),i=this.$el.attr("data-hotspot-size"),o=this.$el.attr("data-hotspot-custom");ULT_H_img_ID=e,ULT_H_img_link=s,ULT_H_Size=i,ULT_H_custom_size=o,window.ULTHotspotContainerView.__super__.addElement.call(this,t)}})})}(jQuery);