text: (function(factory){typeof exports=="object"?factory(require("jquery")):typeof define=="function"&&define.amd?define(["jquery"],factory):factory(jQuery)})(function($){$.extend({bez:function(encodedFuncName,coOrdArray){$.isArray(encodedFuncName)&&(coOrdArray=encodedFuncName,encodedFuncName="bez_"+coOrdArray.join("_").replace(/\./g,"p"));if(typeof $.easing[encodedFuncName]!="function"){var polyBez=function(p1,p2){var A=[null,null],B=[null,null],C=[null,null],bezCoOrd=function(t,ax){return C[ax]=3*p1[ax],B[ax]=3*(p2[ax]-p1[ax])-C[ax],A[ax]=1-C[ax]-B[ax],t*(C[ax]+t*(B[ax]+t*A[ax]))},xDeriv=function(t){return C[0]+t*(2*B[0]+3*A[0]*t)},xForT=function(t){var x=t,i=0,z;while(++i<14){z=bezCoOrd(x,0)-t;if(Math.abs(z)<.001)break;x-=z/xDeriv(x)}return x};return function(t){return bezCoOrd(xForT(t),1)}};$.easing[encodedFuncName]=function(x,t,b,c,d){return c*polyBez([coOrdArray[0],coOrdArray[1]],[coOrdArray[2],coOrdArray[3]])(t/d)+b}}return encodedFuncName}})}),function($){"use strict";$.fn.get_oembed=function(callback,onlycode,done,error){var $this=$(this),$getoembed=$this.next(".oembed_code");if($getoembed[0]){var $getcode=$getoembed.html();$getoembed.remove();var data={action:"get_oembed",onlycode:onlycode,urlOembed:escape($getcode),dataType:"json"};$.post(SiteParameters.admin_ajax,data,function(data){if(data!="")try{var parsedData=JSON.parse(data);parsedData.code=="null"?($this.html("<b>oEmbed not supported.</b>"),$this.closest(".uploader-uncode-media").find(".spinner").removeClass("visible")):$this.html(parsedData.code);if(callback&&onlycode){var mime,imgWidth,imgHeight;mime=parsedData.mime,parsedData.mime=="image/url"?$(parsedData.code).on("load",function(event){imgWidth=$(event.target)[0].width,imgHeight=$(event.target)[0].height,callback(mime,imgWidth,imgHeight)}):(imgWidth=parsedData.width,imgHeight=parsedData.height,callback(mime,imgWidth,imgHeight))}}catch(e){$this.closest(".uploader-uncode-media").find(".spinner").removeClass("visible")}}).done(function(){typeof done!="undefined"&&$.isFunction(done)&&done()}).error(function(){typeof error!="undefined"&&$.isFunction(error)&&error()})}},$(document).on("ready",function(){$(document).on("DOMNodeInserted",function(e){try{if($(e.target).closest(".media-modal").length||$(e.target).closest(".wpb_el_type_media_element").length||$(e.target).closest(".attachments").length)$(e.target).is(".attachment")&&$(e.target).find(".oembed").length>0&&$(e.target).find(".oembed:not(.rendered)").get_oembed(null,!0),$(e.target).find(".attachment-media-view").length>0&&$(e.target).find(".oembed").length>0&&$(e.target).find(".oembed:not(.rendered)").get_oembed(null,!0),$(e.target).is(".format-settings")&&$.each($(".oembed:not(.rendered)",e.target),function(index,val){$(this).get_oembed(null,!0)})}catch(e){}})}),$(".vc_welcome-header").add(".vc_welcome-brand").add("#vc_no-content-add-text-block").remove(),$("#vc_no-content-helper .vc_ui-help-block a").attr("href","https://support.undsgn.com/hc/en-us")}(jQuery),function($){function EasyDropDown(){this.isField=!0,this.down=!1,this.inFocus=!1,this.disabled=!1,this.cutOff=!1,this.hasLabel=!1,this.keyboardMode=!1,this.nativeTouch=!0,this.wrapperClass="colors-dropdown",this.onChange=null}function count_recursive(data,count){var count=typeof count=="undefined"?-1:count;for(var i=0;i<data.length;i++)$.isArray(data[i])?(count--,count+=count_r(data[i],1)):count++;return count}function count_theme_options_inputs(data){var count=count_recursive(data);return count}function calculate_max_input_vars(vars){var vars=typeof vars=="undefined"?1e4:vars,param=[],var_string,intData;for(i=0;i<vars;i++)param[i]="var_"+i;$.ajax({url:ajaxurl,data:{action:"uncode_test_vars",test_input_vars_from_theme_options_nonce:SiteParameters.theme_options_input_vars.max_vars_nonce,content:param},type:"post",error:function(data){show_max_input_vars_modal(),SiteParameters.enable_debug==1&&console.log("Max vars test failed")},success:function(response){response&&response.success===!1?(show_max_input_vars_modal(),SiteParameters.enable_debug==1&&console.log("Max vars test failed")):response&&response.success===!0?(intData=parseInt(response.data.count),intData<vars-1?(SiteParameters.enable_debug==1&&console.log("Real allowed max vars (after calculation): "+parseInt(intData,10)),intData<theme_options_number_of_inputs?show_max_input_vars_modal():save_theme_options()):calculate_max_input_vars(vars+1e4),$.ajax({url:ajaxurl,type:"post",data:{action:"uncode_update_max_input_vars",calculated_vars:intData,update_input_vars_from_theme_options_nonce:SiteParameters.theme_options_input_vars.max_vars_nonce,theme_options_number_of_inputs:theme_options_number_of_inputs}}).done(function(response){SiteParameters.enable_debug==1&&response&&response.success===!1&&console.log("Max vars update failed")}).fail(function(){SiteParameters.enable_debug==1&&console.log("Max vars update failed")})):(show_max_input_vars_modal(),SiteParameters.enable_debug==1&&console.log("Unknown error during max vars text"))}})}function show_max_input_vars_modal(){var default_recommended_vars=parseInt(SiteParameters.theme_options_input_vars.recommended_max_input_vars,10),theme_options_suggested_vars=theme_options_number_of_inputs<default_recommended_vars?default_recommended_vars:Math.ceil(theme_options_number_of_inputs/1e3)*1e3,modal_content=SiteParameters.theme_options_input_vars.locale.content.replace("dddd",theme_options_suggested_vars);modal_content+='<label class="uncode-dismiss-max-vars-modal-checkbox"><input id="uncode-dismiss-max-vars-modal-checkbox" type="checkbox" name="uncode-dismiss-max-vars-modal">'+SiteParameters.theme_options_input_vars.locale.button_cancel+"</label>",$("<div />").html(modal_content).dialog({autoOpen:!0,modal:!0,dialogClass:"uncode-modal uncode-modal-max-vars",title:SiteParameters.theme_options_input_vars.locale.title,minHeight:500,minWidth:500,buttons:[{text:SiteParameters.theme_options_input_vars.locale.button_confirm,"class":"uncode-save-max-vars-modal",click:function(){var dismiss_checkbox=$("#uncode-dismiss-max-vars-modal-checkbox");dismiss_checkbox.prop("checked")&&set_dismiss_max_vars_modal_cookie(),save_theme_options(),$(this).dialog("close")}}]})}function set_dismiss_max_vars_modal_cookie(){document.cookie="uncode-dismiss-max-vars-modal=1"}function save_number_of_theme_options_inputs(){$.ajax({url:ajaxurl,type:"post",data:{action:"uncode_update_theme_options_number_of_inputs",update_theme_options_number_of_inputs_nonce:SiteParameters.theme_options_input_vars.number_of_inputs_nonce,theme_options_number_of_inputs:theme_options_number_of_inputs}}).done(function(response){SiteParameters.enable_debug==1&&response&&response.success===!1&&console.log("Theme Options inputs update failed")}).fail(function(){SiteParameters.enable_debug==1&&console.log("Theme Options inputs update failed")})}function save_theme_options(){theme_options_form.hasClass("ajax-enabled")||theme_options_form.submit();var _this=theme_options_form.removeClass("uncode-ajax-error").removeClass("uncode-ajax-saved"),formData=_this.serialize(),$spinner=$("#option-tree-sub-header button.option-tree-save-button .uncode-ot-spinner"),timeOut;return tinyMCE.triggerSave(),clearTimeout(timeOut),$("#theme-options-ajax-message .theme-options-ajax-message").remove(),_this.addClass("uncode-ajax-loading"),$.post("options.php",formData).fail(function(xhr,status,error){var message='<p class="theme-options-ajax-message__text">'+SiteParameters.ajax_save_message.error+"</p>";xhr.status&&(message+='<p class="theme-options-ajax-message__error"><span class="theme-options-ajax-message__code">['+xhr.status+"]</span> "+SiteParameters.http_errors[xhr.status]+"</p>",message||(message+='<p class="theme-options-ajax-message__error">'+SiteParameters.http_errors.unknown+"</p>")),_this.removeClass("uncode-ajax-loading").addClass("uncode-ajax-error").addClass("uncode-ajax-error-text"),$("#theme-options-ajax-message").append('<span class="theme-options-ajax-message">'+message+"</span>").fadeIn(250),timeOut=setTimeout(function(){_this.removeClass("uncode-ajax-error"),$("#theme-options-ajax-message").fadeOut(500,function(){_this.removeClass("uncode-ajax-error-text")})},3e3),SiteParameters.enable_debug==1&&console.log(xhr)}).done(function(res){if(res.indexOf('<body id="error-page">')!==-1){_this.removeClass("uncode-ajax-loading").addClass("uncode-ajax-error").addClass("uncode-ajax-error-text");var message='<p class="theme-options-ajax-message__text">'+SiteParameters.ajax_save_message.error;message+='<span class="theme-options-ajax-message__error"> '+SiteParameters.http_errors.unknown+"</span></p>",$("#theme-options-ajax-message").append('<span class="theme-options-ajax-message">'+message+"</span>").fadeIn(250)}else if(res.indexOf('<body class="login ')!==-1){_this.removeClass("uncode-ajax-loading").addClass("uncode-ajax-error").addClass("uncode-ajax-error-text");var message='<p class="theme-options-ajax-message__text">'+SiteParameters.ajax_save_message.error;message+='<span class="theme-options-ajax-message__error"> '+SiteParameters.http_errors.login+"</span></p>",$("#theme-options-ajax-message").append('<span class="theme-options-ajax-message">'+message+"</span>").fadeIn(250)}else{reloadDynamicData(),_this.removeClass("uncode-ajax-loading").addClass("uncode-ajax-saved").addClass("uncode-ajax-saved-text");var message='<p class="theme-options-ajax-message__text">'+SiteParameters.ajax_save_message.success+"</p>";$("#theme-options-ajax-message").append('<span class="theme-options-ajax-message">'+message+"</span>").fadeIn(250)}timeOut=setTimeout(function(){_this.removeClass("uncode-ajax-saved").removeClass("uncode-ajax-error"),$("#theme-options-ajax-message").fadeOut(500,function(){_this.removeClass("uncode-ajax-saved-text").removeClass("uncode-ajax-error-text")})},3e3)}),!1}function reloadDynamicData(){var hasPaletteChanged=hasDynamicListChanged("_uncode_custom_colors_list"),hasFontFamilyChanged=hasDynamicListChanged("_uncode_font_groups"),hasFontSizeChanged=hasDynamicListChanged("_uncode_heading_font_sizes"),hasLineHeightChanged=hasDynamicListChanged("_uncode_heading_font_heights"),hasLetterSpacingChanged=hasDynamicListChanged("_uncode_heading_font_spacings");hasPaletteChanged&&refreshColorPalettes(),hasFontFamilyChanged&&refreshFontFamily(),hasFontSizeChanged&&refreshFontSize(),hasLineHeightChanged&&refreshLineHeight(),hasLetterSpacingChanged&&refreshLetterSpacing(),hasPaletteChanged&&refreshCSS()}function hasDynamicListChanged(list){var el=$('ul[data-name="'+list+'"]');return el.length?el.hasClass("changed")?!0:!1:!1}function refreshColorPalettes(){$.ajax({url:ajaxurl,data:{action:"uncode_get_colors"},success:function(response){var dropdowns=$(".uncode-color-select"),optionsString="",listString="";$.each(response,function(i,val){optionsString+='<option class="'+val.value+'" value="'+val.value+'">'+val.label+"</option>",listString+="<li>"+val.label+" <small>:"+val.value+' </small><span class="color style-'+val.value+'-bg"></span></li>'}),dropdowns.each(function(){var _this=$(this),selected=_this.val();_this.find("option:gt(0)").remove(),_this.append(optionsString),selected&&_this.find('option[value="'+selected+'"]').attr("selected",!0);if(window.navigator.userAgent.indexOf("Windows NT 10.0")==-1){var colorList=_this.closest(".colors-dropdown").find(".dropdown-colors-list ul");colorList.find("li:gt(0)").remove(),colorList.append(listString),_this.easyDropDown("update")}})}})}function refreshFontFamily(){$.ajax({url:ajaxurl,data:{action:"uncode_get_font_family"},success:function(response){var dropdowns=$(".uncode_font_family_dropdown"),optionsString="";$.each(response,function(i,val){optionsString+='<option value="'+val.value+'">'+val.label+"</option>"}),dropdowns.each(function(){var _this=$(this),selected=_this.val();_this.find("option").remove(),_this.append(optionsString),selected&&_this.find('option[value="'+selected+'"]').attr("selected",!0)})}})}function refreshFontSize(){$.ajax({url:ajaxurl,data:{action:"uncode_get_font_size"},success:function(response){var dropdowns=$(".uncode_font_size_dropdown"),optionsString="";$.each(response,function(i,val){optionsString+='<option value="'+val.value+'">'+val.label+"</option>"}),dropdowns.each(function(){var _this=$(this),selected=_this.val();_this.find("option").remove(),_this.append(optionsString),selected&&_this.find('option[value="'+selected+'"]').attr("selected",!0)})}})}function refreshLineHeight(){$.ajax({url:ajaxurl,data:{action:"uncode_get_line_height"},success:function(response){var dropdowns=$(".uncode_line_height_dropdown"),optionsString="";$.each(response,function(i,val){optionsString+='<option value="'+val.value+'">'+val.label+"</option>"}),dropdowns.each(function(){var _this=$(this),selected=_this.val();_this.find("option").remove(),_this.append(optionsString),selected&&_this.find('option[value="'+selected+'"]').attr("selected",!0)})}})}function refreshLetterSpacing(){$.ajax({url:ajaxurl,data:{action:"uncode_get_letter_spacing"},success:function(response){var dropdowns=$(".uncode_letter_spacing_dropdown"),optionsString="";$.each(response,function(i,val){optionsString+='<option value="'+val.value+'">'+val.label+"</option>"}),dropdowns.each(function(){var _this=$(this),selected=_this.val();_this.find("option").remove(),_this.append(optionsString),selected&&_this.find('option[value="'+selected+'"]').attr("selected",!0)})}})}function refreshCSS(){var cssURL=$("#uncode-custom-style-css").attr("href");cssURL=updateQueryStringParameter(cssURL,"id",Math.random(0,1e4)),$("#uncode-custom-style-css").attr("href",cssURL)}function updateQueryStringParameter(uri,key,value){var re=new RegExp("([?&])"+key+"=.*?(&|$)","i"),separator=uri.indexOf("?")!==-1?"&":"?";return uri.match(re)?uri.replace(re,"$1"+key+"="+value+"$2"):uri+separator+key+"="+value}EasyDropDown.prototype={constructor:EasyDropDown,instances:{},init:function(domNode,settings){var self=this;$.extend(self,settings),self.$select=$(domNode),self.id=domNode.id,self.options=[],self.$options=self.$select.find("option"),self.isTouch="ontouchstart"in window||navigator.maxTouchPoints,self.$select.removeClass(self.wrapperClass+" dropdown"),self.$select.is(":disabled")&&(self.disabled=!0),self.$options.length&&(self.$options.each(function(i){var $option=$(this);$option.is(":selected")&&(self.selected={index:i,title:$option.text(),color:$option.attr("class")},self.focusIndex=i),$option.hasClass("label")&&i==0?(self.hasLabel=!0,self.label=$option.text(),$option.attr("value","")):self.options.push({domNode:$option[0],title:$option.text(),value:$option.val(),color:$option.attr("class"),disabled:$option.is(":disabled"),selected:$option.is(":selected")})}),self.selected||(self.selected={index:0,title:self.$options.eq(0).text()},self.focusIndex=0),self.render())},render:function(){var self=this,touchClass=self.isTouch&&self.nativeTouch?" touch":"",disabledClass=self.disabled?" disabled":"";self.$container=self.$select.wrap('<div class="'+self.wrapperClass+touchClass+disabledClass+'"><span class="old"/></div>').parent().parent(),self.$active=$('<span class="selected">'+self.selected.title+(self.selected.color!=""?" <small>: "+self.selected.color+" </small>":"")+'<span class="color style-'+self.selected.color+'-bg"></span></span>').appendTo(self.$container),self.$carat=$('<span class="carat"/>').appendTo(self.$container),self.$scrollWrapper=$('<div class="dropdown-colors-list"><ul/></div>').appendTo(self.$container),self.$dropDown=self.$scrollWrapper.find("ul"),self.$form=self.$container.closest("form"),$.each(self.options,function(){var option=this,disabled=option.disabled?" disabled":"",active=option.selected?" active":"",liclass="";if(disabled!=""||active!="")liclass=' class="'+disabled+active+'"';self.$dropDown.append("<li"+liclass+">"+option.title+(option.color!=""?" <small>: "+option.color+" </small>":"")+'<span class="color style-'+option.color+'-bg"></span></li>')}),self.$items=self.$dropDown.find("li"),self.cutOff&&self.$items.length>self.cutOff&&self.$container.addClass("scrollable"),self.getMaxHeight(),self.isTouch&&self.nativeTouch?self.bindTouchHandlers():self.bindHandlers()},getMaxHeight:function(){var self=this;self.maxHeight=0;for(i=0;i<self.$items.length;i++){var $item=self.$items.eq(i);self.maxHeight+=$item.outerHeight();if(self.cutOff==i+1)break}},bindTouchHandlers:function(){var self=this;self.$container.on("click.easyDropDown",function(){self.$select.focus()}),self.$select.on({change:function(){var $selected=$(this).find("option:selected"),title=$selected.text(),value=$selected.val();self.$active.text(title),typeof self.onChange=="function"&&self.onChange.call(self.$select[0],{title:title,value:value})},focus:function(){self.$container.addClass("focus")},blur:function(){self.$container.removeClass("focus")}})},bindHandlers:function(){var self=this;self.query="",self.$container.on({"click.easyDropDown":function(){!self.down&&!self.disabled?self.open():self.close()},"mousemove.easyDropDown":function(){self.keyboardMode&&(self.keyboardMode=!1)}}),$("body").on("click.easyDropDown."+self.id,function(e){var $target=$(e.target),classNames=self.wrapperClass.split(" ").join(".");!$target.closest("."+classNames).length&&self.down&&self.close()}),self.$items.on({"click.easyDropDown":function(){var index=$(this).index();self.select(index),self.$select.focus()},"mouseover.easyDropDown":function(){if(!self.keyboardMode){var $t=$(this);$t.addClass("focus").siblings().removeClass("focus"),self.focusIndex=$t.index()}},"mouseout.easyDropDown":function(){self.keyboardMode||$(this).removeClass("focus")}}),self.$select.on({"focus.easyDropDown":function(){self.$container.addClass("focus"),self.inFocus=!0},"blur.easyDropDown":function(){self.$container.removeClass("focus"),self.inFocus=!1},"keydown.easyDropDown":function(e){if(self.inFocus){self.keyboardMode=!0;var key=e.keyCode;if(key==38||key==40||key==32)e.preventDefault(),key==38?(self.focusIndex--,$(self.$items[self.focusIndex]).hasClass("disabled")&&self.focusIndex--,self.focusIndex=self.focusIndex<0?0:self.focusIndex):key==40&&(self.focusIndex++,$(self.$items[self.focusIndex]).hasClass("disabled")&&self.focusIndex++,self.focusIndex=self.focusIndex>self.$items.length-1?self.$items.length-1:self.focusIndex),self.down||self.open(),self.$items.removeClass("focus").eq(self.focusIndex).addClass("focus"),self.cutOff&&self.scrollToView(),self.query="";if(self.down)if(key==9||key==27)self.close();else{if(key==13)return e.preventDefault(),self.select(self.focusIndex),self.close(),!1;if(key==8)return e.preventDefault(),self.query=self.query.slice(0,-1),self.search(),clearTimeout(self.resetQuery),!1;if(key!=38&&key!=40){var letter=String.fromCharCode(key);self.query+=letter,self.search(),clearTimeout(self.resetQuery)}}}},"keyup.easyDropDown":function(){self.resetQuery=setTimeout(function(){self.query=""},1200)}}),self.$dropDown.on("scroll.easyDropDown",function(e){self.$dropDown[0].scrollTop>=self.$dropDown[0].scrollHeight-self.maxHeight?self.$container.addClass("bottom"):self.$container.removeClass("bottom")}),self.$form.length&&self.$form.on("reset.easyDropDown",function(){var active=self.hasLabel?self.label:self.options[0].title;self.$active.text(active)})},unbindHandlers:function(){var self=this;self.$container.add(self.$select).add(self.$items).add(self.$form).add(self.$dropDown).off(".easyDropDown"),$("body").off("."+self.id)},open:function(){var self=this,scrollTop=window.scrollY||document.documentElement.scrollTop,scrollLeft=window.scrollX||document.documentElement.scrollLeft,scrollOffset=self.notInViewport(scrollTop);self.closeAll(),self.getMaxHeight(),self.$select.focus(),self.$container.addClass("open"),self.$scrollWrapper.css("height",self.maxHeight+"px"),self.down=!0},close:function(){var self=this;self.$container.removeClass("open"),self.$scrollWrapper.css("height","0px"),self.focusIndex=self.selected.index,self.query="",self.down=!1},closeAll:function(){var self=this,instances=Object.getPrototypeOf(self).instances;for(var key in instances){var instance=instances[key];instance.close()}},select:function(index){var self=this;typeof index=="string"&&(index=self.$select.find("option[value="+index+"]").index()-1);var option=self.options[index],selectIndex=self.hasLabel?index+1:index;self.$items.removeClass("active").eq(index).addClass("active"),self.$active.html(option.title+(option.color!=""?" <small>: "+option.color+" </small>":"")+'<span class="color style-'+option.color+'-bg"></span>'),self.$select.find("option").removeAttr("selected").eq(selectIndex).prop("selected",!0).parent().trigger("change"),self.selected={index:index,title:option.title},self.focusIndex=i,typeof self.onChange=="function"&&self.onChange.call(self.$select[0],{title:option.title,value:option.value})},search:function(){var self=this,lock=function(i){self.focusIndex=i,self.$items.removeClass("focus").eq(self.focusIndex).addClass("focus"),self.scrollToView()},getTitle=function(i){return self.options[i].title.toUpperCase()};for(i=0;i<self.options.length;i++){var title=getTitle(i);if(title.indexOf(self.query)==0){lock(i);return}}for(i=0;i<self.options.length;i++){var title=getTitle(i);if(title.indexOf(self.query)>-1){lock(i);break}}},scrollToView:function(){var self=this;if(self.focusIndex>=self.cutOff){var $focusItem=self.$items.eq(self.focusIndex),scroll=$focusItem.outerHeight()*(self.focusIndex+1)-self.maxHeight;self.$dropDown.scrollTop(scroll)}},notInViewport:function(scrollTop){var self=this,range={min:scrollTop,max:scrollTop+(window.innerHeight||document.documentElement.clientHeight)},menuBottom=self.$dropDown.offset().top+self.maxHeight;return menuBottom>=range.min&&menuBottom<=range.max?0:menuBottom-range.max+5},destroy:function(){var self=this;self.unbindHandlers(),self.$select.unwrap().siblings().remove(),self.$select.unwrap(),delete Object.getPrototypeOf(self).instances[self.$select[0].id]},disable:function(){var self=this;self.disabled=!0,self.$container.addClass("disabled"),self.$select.attr("disabled",!0),self.down||self.close()},enable:function(){var self=this;self.disabled=!1,self.$container.removeClass("disabled"),self.$select.attr("disabled",!1)},update:function(){var self=this;self.$options=self.$select.find("option"),self.options=[],self.$options.each(function(){var $option=$(this);self.options.push({domNode:$option[0],title:$option.text(),value:$option.val(),color:$option.attr("class"),disabled:$option.is(":disabled"),selected:$option.is(":selected")})}),self.$items=self.$dropDown.find("li"),self.unbindHandlers(),self.bindHandlers()}};var instantiate=function(domNode,settings){domNode.id=domNode.id?domNode.id:"EasyDropDown"+rand();var instance=new EasyDropDown;instance.instances[domNode.id]||(instance.instances[domNode.id]=instance,instance.init(domNode,settings))},rand=function(){return("00000"+(Math.random()*16777216<<0).toString(16)).substr(-6).toUpperCase()};$.fn.easyDropDown=function(){var args=arguments,dataReturn=[],eachReturn;return eachReturn=this.each(function(){if(args&&typeof args[0]=="string"){var data=EasyDropDown.prototype.instances[this.id][args[0]](args[1],args[2]);data&&dataReturn.push(data)}else instantiate(this,args[0])}),dataReturn.length?dataReturn.length>1?dataReturn:dataReturn[0]:eachReturn},$(function(){typeof Object.getPrototypeOf!="function"&&(typeof "test".__proto__=="object"?Object.getPrototypeOf=function(object){return object.__proto__}:Object.getPrototypeOf=function(object){return object.constructor.prototype})}),$.fn.uncode_init_upload=function(){$(document).on("click",".ot_upload_media",function(e){e.preventDefault();var uncode_frames={},frame_id="uncode-editor",default_view=wp.media.view.AttachmentsBrowser,media=wp.media,field_id=$(this).parent(".option-tree-ui-upload-parent").find("input").attr("id"),post_id=$(this).attr("rel"),save_attachment_id=$("#"+field_id).val(),btnContent="";if(uncode_frames[frame_id]){uncode_frames[frame_id].open();return}media.view.uploadMediaView=media.View.extend({tagName:"div",className:"uploader-uncode-media",template:media.template("uploader-uncode-media"),events:{"click .close":"hide","paste #mle-code":"entercode","input #mle-code":"entercode"},oembed_callback:function($mime,$width,$height){var $this=window["workflow"]!=undefined?workflow:wp.media.frame,$el=$this.$el;$button=$el.find(".media-button"),$spinner=$el.find(".spinner"),$mime!=""&&($el.find("#mle-mime").val($mime),$el.find("#mle-width").val($width),$el.find("#mle-height").val($height),$button.removeAttr("disabled"),$spinner.removeClass("visible"))},entercode:function(event){var _this=this,$el=$(this.$el),$codeInput=$el.find("#mle-code"),$codeDiv=$el.find(".oembed_code"),$oEmbedRender=$el.find(".oembed"),$spinner=$el.find(".spinner"),$code;setTimeout(function(){$code=$codeInput.val(),$codeDiv.length==0?$oEmbedRender.after('<div class="oembed_code">'+$code+"</div>"):$codeDiv.html($code),$oEmbedRender.get_oembed(_this.oembed_callback,!0),$spinner.addClass("visible")},100)},recordmedia:function(){var $this=this,$el=$(this.$el),$button=uncode_frames[frame_id].$el.find(".media-button-select");uncode_frames[frame_id].content.get().el.className=="uploader-uncode-media"?($button.attr("disabled","disabled"),$.ajax({type:"POST",dataType:"json",url:ajaxurl+"?action=recordMedia",data:$el.find("input[name],select[name],textarea[name]").serialize(),success:function(data){!isNaN(data.id)&&data!=undefined&&(btnContent+='<div class="option-tree-ui-image-wrap"><div class="oembed"><span class="spinner" style="display: block; float: left;"></span></div><div class="oembed_code" style="display: none;">'+data.url+"</div></div>",$("#"+field_id).val(data.id),$("#"+field_id+"_media").remove(),$("#"+field_id).parent().parent("div").append('<div class="option-tree-ui-media-wrap" id="'+field_id+'_media" />'),$("#"+field_id+"_media").append(btnContent).slideDown(),$("#"+field_id+"_media .oembed").get_oembed(null,!0),$("#"+field_id+"_media .spinner").removeClass("visible"),$button.removeAttr("disabled"),uncode_frames[frame_id].off("select"),uncode_frames[frame_id].close())}})):$this.select()},ready:function(){var $this=this,$button=uncode_frames[frame_id].$el.find(".media-button-select");$button.off("click").on("click",function(){$this.recordmedia()})},select:function(){var selection=media.frame.toolbar.get("selection").selection.single();media.frame.close()}}),uncode_frames[frame_id]=media({title:$(this).attr("title"),button:{text:option_tree.upload_text},multiple:!1}),uncode_frames[frame_id].on("router:render:browse",function(routerView){routerView.set({upload:{text:"Upload Files",priority:20},browse:{text:"Media Library",priority:40},uncode:{text:"Upload oEmbed",priority:30}})}),uncode_frames[frame_id].on("content:render:uncode",function(){uncode_frames[frame_id].content.set(new media.view.uploadMediaView({controller:this}))}),uncode_frames[frame_id].on("close",function(){wp.media.view.AttachmentsBrowser=default_view}),uncode_frames[frame_id].on("select",function(){var attachment=uncode_frames[frame_id].state().get("selection").first(),href=attachment.attributes.url,attachment_id=attachment.attributes.id,mime=attachment.attributes.mime,regex=/^image\/(?:jpe?g|png|url|gif|x-icon)$/i;mime=="oembed/svg"?btnContent+='<div class="option-tree-ui-image-wrap">'+attachment.attributes.description+"</div>":mime.match(regex)?btnContent+='<div class="option-tree-ui-image-wrap"><img src="'+href+'" alt="" /></div>':btnContent+='<div class="option-tree-ui-image-wrap"><div class="oembed"><span class="spinner" style="display: block; float: left;"></span></div><div class="oembed_code" style="display: none;">'+href+"</div></div>",btnContent+='<a href="#" class="option-tree-ui-remove-media option-tree-ui-button button button-secondary light" title="'+option_tree.remove_media_text+'"><span class="icon fa fa-minus2"></span>'+option_tree.remove_media_text+"</a>",$("#"+field_id).val(attachment_id),$("#"+field_id+"_media").remove(),$("#"+field_id).parent().parent("div").append('<div class="option-tree-ui-media-wrap" id="'+field_id+'_media" />'),$("#"+field_id+"_media").append(btnContent).slideDown(),$("#"+field_id+"_media .oembed").get_oembed(),uncode_frames[frame_id].off("select"),uncode_frames[frame_id].close()}),uncode_frames[frame_id].on("open",function(){var selection=uncode_frames[frame_id].state().get("selection"),attachment=media.attachment(save_attachment_id);attachment.fetch(),selection.set(attachment)}),uncode_frames[frame_id].open()}),$(document).on("click",".option-tree-ui-remove-media",function(e){e.preventDefault();var cont=$(e.currentTarget).closest("td"),$input=cont.find(".option-tree-ui-upload-parent input"),$placeholder=cont.find(".option-tree-ui-media-wrap");$input.attr("value",""),$placeholder.remove()})};if(typeof wp!="undefined"&&wp.media&&wp.media.view.AttachmentFilters){var MediaLibraryTaxonomyFilter=wp.media.view.AttachmentFilters.extend({className:"attachment-filters",createFilters:function(){var filters={};_.each(SiteParameters.media_cats.terms||{},function(value,index){filters[index]={text:value.name,props:{"media-category":value.slug}}}),filters.all={text:SiteParameters.media_cats.all_label,props:{"media-category":""},priority:10},this.filters=filters}}),AttachmentsBrowser=wp.media.view.AttachmentsBrowser;wp.media.view.AttachmentsBrowser=wp.media.view.AttachmentsBrowser.extend({createToolbar:function(){AttachmentsBrowser.prototype.createToolbar.call(this),this.toolbar.set("MediaLibraryTaxonomyFilter",(new MediaLibraryTaxonomyFilter({controller:this.controller,model:this.collection.props,priority:-80})).render())}}),wp.media.view.Attachment.Library=wp.media.view.Attachment.Library.extend({className:function(){return this.model.get("customClass")?"attachment "+this.model.get("customClass"):"attachment"}})}$("html").delegate(".media-terms input","change",function(){var obj=$(this),container=obj.parents(".media-terms"),row=container.parent(),data={action:"save-media-terms",term_ids:[],attachment_id:container.data("id"),taxonomy:container.data("taxonomy")};container.find("input:checked").each(function(){data.term_ids.push($(this).val())}),row.addClass("media-save-terms"),container.find("input").prop("disabled","disabled"),$.post(ajaxurl,data,function(response){row.removeClass("media-save-terms"),container.find("input").removeProp("disabled")})}),$("html").delegate(".toggle-add-media-term","click",function(e){e.preventDefault(),$(this).parent().find(".add-new-term").toggle()}),$("html").delegate(".save-media-category","click",function(e){var obj=$(this),termField=obj.parent().find("input"),termParent=obj.parent().find("select"),data={action:"add-media-term",attachment_id:obj.data("id"),taxonomy:obj.data("taxonomy"),parent:termParent.val(),term:termField.val()};if(""==data.term){termField.focus();return}$.post(ajaxurl,data,function(response){obj.parents(".field").find(".media-terms ul:first").html(response.checkboxes),obj.parents(".field").find("select").replaceWith(response.selectbox),termField.val("")},"json")});var theme_options_form=$("#option-tree-settings-api"),theme_options_form_data,theme_options_number_of_inputs=0;$(".option-tree-save-button").on("click",function(e){e.preventDefault(),theme_options_form_data=theme_options_form.serializeArray(),theme_options_number_of_inputs=count_theme_options_inputs(theme_options_form_data),SiteParameters.enable_debug==1&&(console.log("Form inputs count: "+theme_options_number_of_inputs),console.log("Declared allowed max vars: "+parseInt(SiteParameters.theme_options_input_vars.max_input_vars,10)),console.log("Dismiss cookie: "+(document.cookie.indexOf("uncode-dismiss-max-vars-modal=")===-1?"off":"on"))),document.cookie.indexOf("uncode-dismiss-max-vars-modal=")===-1&&SiteParameters.theme_options_input_vars.enable_max_input_vars_popup&&parseInt(SiteParameters.theme_options_input_vars.max_input_vars,10)<theme_options_number_of_inputs?calculate_max_input_vars():(save_number_of_theme_options_inputs(),save_theme_options())});var themeRegistrationForm=$("#uncode-registration-form"),themeRegistrationTermsCheckbox=document.getElementById("uncode-registration-accept-terms"),themeRegistrationButton=document.getElementById("envato_update_info");themeRegistrationTermsCheckbox!==null&&themeRegistrationTermsCheckbox.checked&&(themeRegistrationButton.disabled=!1),themeRegistrationTermsCheckbox!==null&&themeRegistrationTermsCheckbox.addEventListener("change",function(){themeRegistrationTermsCheckbox.checked?themeRegistrationButton.disabled=!1:themeRegistrationButton.disabled=!0}),$(themeRegistrationButton).on("click",function(e){e.preventDefault();var _this=$(this),purchaseCode=themeRegistrationForm.find("#envato-purchase-code"),noticesContainer=themeRegistrationForm.find("#uncode-admin-registration-notice-container");if($(themeRegistrationButton).hasClass("uncode-ajax-loading"))return!1;$(themeRegistrationButton).removeClass("uncode-ajax-saved uncode-ajax-error"),themeRegistrationForm.find(".uncode-ui-notice").remove();if(!purchaseCode.val())return noticesContainer.append('<p class="uncode-ui-notice uncode-ui-notice--error">'+SiteParameters.theme_registration.locale.empty_purchase_code+"</p>"),!1;if(!themeRegistrationTermsCheckbox.checked)return noticesContainer.append('<p class="uncode-ui-notice uncode-ui-notice--error">'+SiteParameters.theme_registration.locale.empty_terms+"</p>"),!1;$(themeRegistrationButton).addClass("uncode-ajax-loading");var post_data={uncode_theme_registration_purchase_code:purchaseCode.val(),action:"save_purchase_code",uncode_theme_registration_nonce:SiteParameters.theme_registration.nonce};$.post(ajaxurl,post_data,function(response){response&&(response.success===!1?noticesContainer.append('<p class="uncode-ui-notice uncode-ui-notice--error">'+response.data.message+"</p>"):(noticesContainer.append('<p class="uncode-ui-notice uncode-ui-notice--success">'+response.data.message+"</p>"),setTimeout(function(){noticesContainer.hide(),$(".deregister-product-fields-container").show(),themeRegistrationForm.find(".register-product-fields-container").hide(),$(".registration-error-message").hide(),$(".registration-ok-message").show()},3500)))}).done(function(){$(themeRegistrationButton).addClass("uncode-ajax-saved")}).fail(function(){$(themeRegistrationButton).addClass("uncode-ajax-error")}).always(function(){$(themeRegistrationButton).removeClass("uncode-ajax-loading"),setTimeout(function(){$(themeRegistrationButton).removeClass("uncode-ajax-saved uncode-ajax-error")},3e3)})})}(jQuery),function($){"use strict";var UNCODE=window.UNCODE||{};UNCODE.dismissAdminNotices=function(){$("#uncode_vc_admin_notice").on("click",".notice-dismiss",function(){$.ajax({url:ajaxurl,data:{action:"uncode_vc_admin_notice_dismiss"}})})},UNCODE.messagePosition=function(){var $form=$("#option-tree-settings-api"),$wrap=$("#theme-options-ajax-message",$form),$message=$("#uncode-ot-message");if(!$form.length||!$wrap.length||!$message.length)return;$form.addClass("uncode-ajax-saved-text");var message='<p class="theme-options-ajax-message__text">'+$message.text()+"</p>";$wrap.append('<span class="theme-options-ajax-message">'+message+"</span>"),$message.remove(),setTimeout(function(){$wrap.fadeIn(500)},1500),setTimeout(function(){$("#theme-options-ajax-message").fadeOut(500,function(){$form.removeClass("uncode-ajax-error-text")})},7e3)},UNCODE.managePageOptions=function(){$(".ot-numeric-slider-wrap").has("#_uncode_product_media_size").each(function(){var $input=$(".ot-numeric-slider-helper-input",this),$slide=$(".ot-numeric-slider",this);$input.val()==0&&$input.val("Inherit"),$slide.on("slide slidechange",function(event,ui){ui.value==0&&$input.val("Inherit")})})},UNCODE.toggleDescription=function(){var $sections=$(".format-settings, .vc_shortcode-param, .loop_params_holder .vc_row, .system-status-list tr"),$descriptions=$("small.description, .vc_description").hide();$(".format-settings.desc-active, .vc_shortcode-param.desc-active, .loop_params_holder .vc_row, .system-status-list tr").removeClass("desc-active"),$sections.each(function(){var $section=$(this),$toggle=$(".toggle-description",$section),$description=$("small.description, .vc_description",$section).eq(0);$toggle.off("click").on("click",function(){$(".format-settings.desc-active, .vc_shortcode-param.desc-active, .loop_params_holder .vc_row, .system-status-list tr").not($section).removeClass("desc-active"),$section.toggleClass("desc-active"),$descriptions.not($description).slideUp(350,$.bez([.685,.595,.02,.72]));var opacityToggle=$section.hasClass("desc-active")?1:0;$description.slideToggle(350,$.bez([.685,.595,.02,.72])).animate({opacity:opacityToggle},{queue:!1,duration:350},$.bez([.685,.595,.02,.72]))})});var $holders=$(".loop_params_holder, .vc_param_group-list");$holders.each(function(){var $holder=$(this),$holdParent=$holder.closest(".vc_shortcode-param");$holder.hover(function(){$holdParent.addClass("no-propagate")},function(){$holdParent.removeClass("no-propagate")})})},UNCODE.toggleIconDetector=function(){var runToggleIconDetector=function(){var $selectors=$(".vc-icons-selector");$selectors.each(function(){var $sel=$(this),$selector=$(".selector",$sel),$button=$(".selector-button",$sel),$popup=$(".selector-popup",$sel),avoidMult;$button.on("click",function(){clearTimeout(avoidMult),avoidMult=setTimeout(function(){$popup.is(":visible")?$sel.addClass("open"):$sel.removeClass("open")},450)})})},$picker=$(".vc-iconpicker").on("change",runToggleIconDetector)},UNCODE.stickyButton=function(){function onScroll(evt){requestAnimFrame(stickyButtonRun)}var $form=$("#option-tree-settings-api"),$header=$("#option-tree-sub-header",$form),$bodyContent=$("#post-body-content",$form),wrapTop=document.getElementById("wpwrap").offsetTop,client,off,offTop,offLeft,offW;if(!$form.length||!$header.length||!$bodyContent.length)return;var stickyButtonRun=function(){client=$bodyContent[0].getClientRects(),off=$bodyContent.offset(),offTop=client[0].top,offLeft=off.left,offW=client[0].width,wrapTop>=offTop?($header.addClass("uncode-sticky"),$header[0].style.position="fixed",$header[0].style.top=wrapTop+"px",$header[0].style.left=offLeft+"px",$header[0].style.width=offW+"px"):($header.removeClass("uncode-sticky"),$header[0].style.position="absolute",$header[0].style.top=0,$header[0].style.left=$("body").hasClass("rtl")?"0px":"300px",$header[0].style.width="calc(100% - 300px)")};stickyButtonRun(),window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/60)}}(),window.addEventListener("scroll",onScroll,!1),window.addEventListener("resize",onScroll,!1),onScroll()},UNCODE.initTabs=function(){$(".wrap.settings-wrap .ui-tabs").tabs({fx:{opacity:"toggle",duration:"fast"}}),$(".wrap.settings-wrap .ui-tabs a.ui-tabs-anchor").on("click",function(event,ui){var obj="input[name='_wp_http_referer']";if($(obj).length>0){var url=$(obj).val(),hash=$(this).attr("href");if(url.indexOf("#")!=-1){var o=url.split("#")[1],n=hash.split("#")[1];url=url.replace(o,n)}else url+=hash;$(obj).val(url)}}),$(".page-options-header-section").on("click",function(event,ui){$('li[aria-controls="setting__uncode_header_tab"] a').trigger("click")})},UNCODE.rowDividers=function(){$("body").on("change",".uncode_radio_image",function(){var $parent=$(this).parents(".uncode-radio-image").eq(0),$input=$parent.find('input[type="hidden"]'),$label=$(this).parents("label").eq(0);$input.val($(this).val()),$(this).is(":checked")&&($("label",$parent).not($label).removeClass("checked"),$label.addClass("checked"))})},UNCODE.numericTextField=function(){var set;$("body").on("input",".uncode_numeric_textfield",function(){var $this=$(this),val=$this.val();val=val.replace(/\D/g,""),$this.val(val)})},$(function(){UNCODE.dismissAdminNotices(),UNCODE.messagePosition(),UNCODE.managePageOptions(),UNCODE.toggleDescription(),UNCODE.stickyButton(),UNCODE.initTabs(),UNCODE.rowDividers(),UNCODE.numericTextField(),$("#vc_ui-panel-edit-element").on("vcPanel.shown",function(){UNCODE.toggleDescription(),UNCODE.toggleIconDetector(),$(document).on("vc.display.template vc.display.lists",function(e){UNCODE.toggleDescription()})})})}(jQuery)