"),RVS.DOC.trigger("extendmetas"),RVS.DOC.on("click",".ssmbtn",(function(){jQuery(this.dataset.inside).find(".ssmbtn.selected, .ssm_content.selected").removeClass("selected"),this.className+=" selected",void 0!==this.dataset.hidessm&&jQuery(this.dataset.hidessm+".selected").removeClass("selected"),jQuery(this.dataset.showssm).addClass("selected"),void 0!==this.dataset.evt&&RVS.DOC.trigger(this.dataset.evt,this.dataset.evtparam)})),RVS.DOC.on("click",".input_presets_dropdown",(function(){jQuery(".input_presets_wrap.infocus").removeClass("infocus"),this.parentElement.className+=" infocus"})),RVS.DOC.on("blur","input",(function(){RVS.S.respInfoBar.toolbar&&(RVS.S.respInfoBar.visible=!1,RVS.S.respInfoBar.toolbar[0].style.display="none")}))},RVS.F.updateMetaTranslate=function(e){RVS.LIB.META={},jQuery(".mdl_group_member").each((function(){var e=this.dataset.val.split(":");e=e.length>1?e[0]+".*?}}":e[0],RVS.LIB.META[e]=jQuery(this).find(".mdl_placeholder_content").text()}))},RVS.F.updateSortByPosts=function(){try{if("post"!==RVS.SLIDER.settings.sourcetype)return;let e=jQuery("#post_sortby"),t="popular"==RVS.SLIDER.settings.source.post.fetchType,i=document.querySelectorAll('option[value="meta_num_total_sales"]').length>0,a=!1,r=!1;e.find("option").each((function(){t&&"comment_count"!==this.value?this.setAttribute("disabled","disabled"):this.removeAttribute("disabled"),"meta_num_total_sales"===this.value&&(a=!0),"meta_num__wc_average_rating"===this.value&&(r=!0)})),t&&"comment_count"!==e.val()&&"meta_num_total_sales"!==e.val()&&"meta_num__wc_average_rating"!==e.val()&&RVS.F.setS2Option({select:e,selectValue:"comment_count"}),t||"meta_num_total_sales"!=e.val()&&"meta_num__wc_average_rating"!=e.val()||RVS.F.setS2Option({select:e,selectValue:"comment_count"}),t&&!a&&i&&e.append(''),t&&!r&&i&&e.append(''),!t&&a&&e.find('option[value="meta_num_total_sales"]').remove(),!t&&r&&e.find('option[value="meta_num__wc_average_rating"]').remove(),RVS.SLIDER.settings.source.post.sortBy=e.val()}catch(e){}},RVS.F.updatePostCategories=function(e){if(Array.isArray(e.postTypes)||(e.postTypes=e.postTypes.split(",")),!Array.isArray(e.postTypes)){var t=[];t.push(e.postTypes),e.postTypes=t}var i="";for(var a in e.postTypes)if(e.postTypes.hasOwnProperty(a)){var r=RVS.LIB.POST_TYPES_CAT[e.postTypes[a]];for(var o in r)r.hasOwnProperty(o)&&(i+="")}e.categories[0].innerHTML=i,RVS.F.setS2Option({select:e.categories,update:!0})},RVS.F.showFieldResponsiveValues=function(e){if(RVS.S.respInfoBar.field=void 0!==e?jQuery(e):RVS.S.respInfoBar.field,"slider"===RVS.eMode.top||1===RVS.selLayers.length&&void 0!==RVS.S.respInfoBar.field&&RVS.S.respInfoBar.visible){RVS.S.respInfoBar.toolbar||(RVS.S.respInfoBar.toolbar=jQuery(''),jQuery("#the_right_toolbar").append(RVS.S.respInfoBar.toolbar));var t=0,i="";for(var a in i+=''+RVS_LANG.intinheriting+"",RVS.V.sizes)RVS.V.sizes.hasOwnProperty(a)&&RVS.V.sizes[a]!==RVS.screen&&RVS.SLIDER.settings.size.custom[RVS.V.sizes[a]]&&(i+='
",t++);if(t>0){RVS.S.respInfoBar.toolbar[0].style.display="block",RVS.S.respInfoBar.toolbar[0].innerHTML=i;var r=RVS.S.respInfoBar.field.offset();RVS.S.respInfoBar.toolbar.width();tpGS.gsap.set(RVS.S.respInfoBar.toolbar,{top:r.top,left:-85})}else RVS.S.respInfoBar.visible=!1,RVS.S.respInfoBar.toolbar[0].style.display="none"}},RVS.F.initCopyClipboard=function(e){if(jQuery(e).length>0&&-1==jQuery.inArray(e,p)){(p=void 0===p?[]:p).push(e);var t=new RSClipboard(e);t.on("success",(function(e){jQuery(":focus").blur(),RVS.F.showInfo({content:"Copied To Clipboard",type:"success",showdelay:0,hidedelay:1,hideon:"",event:""}),tpGS.gsap.fromTo(jQuery(e.trigger),.4,{autoAlpha:0},{autoAlpha:1,ease:"power3.inOut"})})),t.on("error",(function(e){(e=jQuery(e.trigger)).addClass("errorcopy"),setTimeout((function(){e.removeClass("errorcopy")}),400)}))}},RVS.F.switchButtonInit=function(e){(e=void 0===e?{}:e).container=void 0===e.container?"#builderView":e.container,e.init=void 0===e.init||e.init,e.init&&jQuery(e.container).find(".switch_button").each((function(){var e=jQuery(this),t=this.dataset;e.hasClass("activeswitch")||(e.addClass("activeswitch"),RVS.F.changeSwitchState({el:this,state:t.start_state}),e.on("click",(function(){RVS.F.changeSwitchState({el:this,callEvent:!0})})))}))},RVS.F.changeSwitchState=function(e){if(null!==e.el){var t=e.el.dataset,i=jQuery(e.el),a=t.states.split(",");t.state=void 0!==e.state?e.state:t.state===a[0]?a[1]:a[0],i.find(".switch_button_state").html(t[t.state+"_state"]),i.find(".switch_button_icon").html(t[t.state+"_icon"]),void 0!==e.callEvent&&RVS.DOC.trigger(t[t.state])}},RVS.F.getPresetIcon=function(e){var t='';return e.replace("*",t).replace("*","").replace("*",t).replace("*","").replace("*",t).replace("*","")},RVS.F.isOnList=function(e,t){if(void 0===e)return!1;if(Array.isArray(e))return jQuery.inArray(t,e)>=0;if(void 0!==e[t])return!0;var i=!1;for(var a in e)e.hasOwnProperty(a)&&!1===i&&(i=e[a]===t||i);return i},RVS.F.showHidePresetFavorits=function(e,t){var i,a=RVS.S.allPresets[t];if(void 0!==a&&null!=e&&(Array.isArray(e)||"object"==typeof e)&&0!==e.length){var r={},o={};for(var s in a)if(a.hasOwnProperty(s)&&"object"==typeof a[s])for(var n in void 0===r[s]&&(r[s]={show:!1,id:a[s].id}),a[s])if(a[s].hasOwnProperty(n)&&"object"==typeof a[s][n])for(var l in void 0===o[s+"_"+n]&&(o[s+"_"+n]={show:!1,id:a[s][n].id}),a[s][n].groups)a[s][n].groups.hasOwnProperty(l)&&null!=(i=document.getElementById(a[s][n].groups[l].id))&&(RVS.F.isOnList(e,l)?(r[s].show=!0,o[s+"_"+n].show=!0,i.classList.add("prs_is_favorit")):i.classList.remove("prs_is_favorit"));for(var d in r)null!=(i=document.getElementById(r[d].id))&&(r[d].show?i.classList.add("prs_is_favorit"):i.classList.remove("prs_is_favorit"));for(var d in o)null!=(i=document.getElementById(o[d].id))&&(o[d].show?i.classList.add("prs_is_favorit"):i.classList.remove("prs_is_favorit"))}},RVS.F.createPresets=function(e){e.groupid=void 0===e.groupid?"preset_list_"+Math.round(1e5*Math.random()):e.groupid,e.groupclass=void 0===e.groupclass?"pres_list_group_"+Math.round(1e5*Math.random()):e.groupclass,e.maingrpclass=void 0===e.maingrpclass?"preslisinner_"+Math.round(1e5*Math.random()):e.maingrpclass,e.ref=void 0===e.ref?Math.round(1e5*Math.random()):e.ref,RVS.S.allPresets=void 0===RVS.S.allPresets?{}:RVS.S.allPresets,RVS.S.allPresets[e.maingrpclass]=void 0===RVS.S.allPresets[e.maingrpclass]?{}:RVS.S.allPresets[e.maingrpclass],RVS.S.allPresets[e.maingrpclass][e.ref]=void 0===RVS.S.allPresets[e.maingrpclass][e.ref]?{}:RVS.S.allPresets[e.maingrpclass][e.ref];var t='
',i="",a=void 0===e.prefix?"":e.prefix+"_";for(var r in RVS.S.allPresets[e.maingrpclass][e.ref].id=e.groupid,t+='\t
',e.groups)if(e.groups.hasOwnProperty(r)&&"grp_title"!=r&&"icon"!=r&&"noSubLevel"!==r&&"eclass"!==r){for(var o in RVS.S.allPresets[e.maingrpclass][e.ref][r]={id:e.groupid+"_"+r,class:e.groups[r].custom||"custom"===r?"custompresetgroup ":""},i+='
"},RVS.F.createMetaGroups=function(e){var t=0!==jQuery("#"+e.id).length,i=t?jQuery("#"+e.id):jQuery('');for(var a in e.title=void 0===RVS_LANG[e.id]?e.id:RVS_LANG[e.id],t||i.append('
",RVS.fileDrop=jQuery(e.textblock),RVS.fileDropForm=RVS.fileDrop.find("#filedrop_zone"),tpGS.gsap.fromTo(RVS.fileDrop,.3,{autoAlpha:0,scale:.9},{zIndex:5e6,autoAlpha:1,scale:1,ease:"power3.inOut"}),jQuery(document.body).append(RVS.fileDrop),void 0===RVS.fileDropListener&&(jQuery("html").on("dragover drop dragleave dragend",(function(e){clearTimeout(window.htmldragout),"drop"===e.type?(jQuery("#filedrop").remove(),jQuery("#wpwrap").removeClass("blurred")):"dragleave"===e.type&&(window.htmldragout=setTimeout((function(){0==RVS.S.overFileDropZone&&(tpGS.gsap.to(RVS.fileDrop,.3,{autoAlpha:0,scale:.9,ease:"power3.inOut"}),jQuery("#wpwrap").removeClass("blurred"))}),50)),e.preventDefault(),e.stopPropagation()})).on("dragenter",(function(){RVS.S.overFileDropZone=!1,!0!==e.onlydrop&&jQuery("#wpwrap").addClass("blurred"),!0===e.onlydrop&&(tpGS.gsap.set(RVS.fileDropForm,{width:RVS.S.editorSize.w-50,height:RVS.S.editorSize.h-50,top:90,left:41,xPercent:0,yPercent:0}),tpGS.gsap.set(RVS.fileDrop,{background:"transparent"})),tpGS.gsap.to(RVS.fileDrop,.3,{autoAlpha:1,scale:1,ease:"power3.inOut"})})),RVS.fileDropForm.on("drag dragstart dragend dragover dragenter dragleave drop",(function(e){e.preventDefault(),e.stopPropagation()})).on("dragover dragenter",(function(e){RVS.S.overFileDropZone=!0,RVS.fileDropForm[0].className="is-dragover"})).on("dragleave dragend",(function(){RVS.S.overFileDropZone=!1,RVS.fileDropForm[0].className=""})).on("drop",(function(t){for(var i in RVS.fileDropForm[0].className="is-processing",jQuery("#importing_processing_files").html(""),t.originalEvent.dataTransfer.files)if(t.originalEvent.dataTransfer.files.hasOwnProperty(i)&&"object"==typeof t.originalEvent.dataTransfer.files[i]){var a=t.originalEvent.dataTransfer.files[i].name+" ("+Math.round(t.originalEvent.dataTransfer.files[i].size/1024)+"kb)";jQuery("#importing_processing_files").append('
'+a+'
')}"custom"===e.type?e.callBack({files:t.originalEvent.dataTransfer.files,fileindex:0,report:"#fileprocessing_",success:e.success}):RVS.F.uploadFiles({form:RVS.fileDropForm,files:t.originalEvent.dataTransfer.files,fileindex:0,report:"#fileprocessing_",success:e.success,action:e.action})})),jQuery("#file").on("change",(function(t){for(var i in RVS.fileDropForm[0].className="is-processing",t.target.files)if(t.target.files.hasOwnProperty(i)&&"object"==typeof t.target.files[i]){var a=t.target.files[i].name+" ("+Math.round(t.target.files[i].size/1024)+"kb)";jQuery("#importing_processing_files").append('
'+a+'
')}"custom"===e.type?e.callBack({files:t.target.files,fileindex:0,report:"#fileprocessing_",success:e.success}):RVS.F.uploadFiles({form:RVS.fileDropForm,files:t.target.files,fileindex:0,report:"#fileprocessing_",success:e.success,action:e.action})})))},close:function(){jQuery("#filedrop").remove(),jQuery("#wpwrap").removeClass("blurred")}},RVS.F.uploadFiles=function(e){e.fileindex=void 0===e.fileindex?0:e.fileindex,jQuery(e.report+e.fileindex).find(".fileupload_status").html("autorenew").addClass("rotating");var t=new FormData;t.append("import_file",e.files[e.fileindex]),t.append("action",RVS.ENV.ajax_pre+"_ajax_action"),t.append("client_action",void 0===e.action?"import_slider":e.action),t.append("nonce",RVS.ENV.nonce),void 0!==e.customs&&t.append("customs",JSON.stringify(e.customs)),jQuery.ajax({url:ajaxurl,type:"post",contentType:!1,processData:!1,data:t,success:function(t){(t=JSON.parse(t)).success?(jQuery(e.report+e.fileindex).find(".fileupload_status").html("done").removeClass("rotating").addClass("doneupload"),void 0!==e.success&&RVS.DOC.trigger(e.success,t)):(e.anyError=!0,jQuery(e.report+e.fileindex).find(".fileupload_status").html("priority_high").removeClass("rotating").addClass("errorupload"),jQuery(e.report+e.fileindex).find(".fileupload_message").html(t.message)),e.fileindex++,e.files.length>e.fileindex?RVS.F.uploadFiles(e):!0!==e.anyError?(jQuery("#file_upload_mininfo").html(RVS_LANG.successImportFile),jQuery("#file_upload_processicon").removeClass("rotating").addClass("done").html("done"),void 0!==e.successFinal&&RVS.DOC.trigger(e.successFinal,t),setTimeout((function(){RVS.F.browserDroppable.close()}),500)):(jQuery("#file_upload_mininfo").html(RVS_LANG.importReport),jQuery("#file_upload_processicon").removeClass("rotating").addClass("error").html("error")),t?.slider?.id&&(RVS.F.updateRVSLIBSLIDERS&&RVS.F.updateRVSLIBSLIDERS(t.slider),void 0!==RVS.F.createToMigrateList&&RVS.F.createToMigrateList()&&RVS.F.migrateSr6toSr7())},error:function(t){e.anyError=!0,jQuery(e.report+e.fileindex).find(".fileupload_status").html("priority_high").removeClass("rotating").addClass("errorupload"),jQuery(e.report+e.fileindex).find(".fileupload_message").html(t.message),e.fileindex++,e.files.length>e.fileindex?RVS.F.uploadFiles(e):!0!==e.anyError?(jQuery("#file_upload_mininfo").html(RVS_LANG.successImportFile),jQuery("#file_upload_processicon").removeClass("rotating").addClass("done").html("done"),setTimeout((function(){RVS.F.browserDroppable.close()}),500)):(jQuery("#file_upload_mininfo").html(RVS_LANG.importReport),jQuery("#file_upload_processicon").removeClass("rotating").addClass("error").html("error"))}})},RVS.F.slideinWork=function(e){RVS.SLIDER.inWork=void 0===RVS.SLIDER.inWork?[]:RVS.SLIDER.inWork,-1===jQuery.inArray(e,RVS.SLIDER.inWork)&&-1===jQuery.inArray(""+e,RVS.SLIDER.inWork)&&RVS.SLIDER.inWork.push(""+e)},RVS.F.convertIDStoTxt=function(){for(var e in RVS.SLIDER.slideIDs)RVS.SLIDER.slideIDs.hasOwnProperty(e)&&(RVS.SLIDER.slideIDs[e]=""+RVS.SLIDER.slideIDs[e]);for(var e in RVS.SLIDER.inWork)RVS.SLIDER.inWork.hasOwnProperty(e)&&(RVS.SLIDER.inWork[e]=""+RVS.SLIDER.inWork[e])},RVS.F.saveSlides=function(e){if(e.index=0){try{RVS.F.compareLayerAnimPresets(RVS.SLIDER[e.slides[e.index]].layers)}catch(e){console.log(e)}var a=JSON.stringify(RVS.F.simplifySlide(RVS.SLIDER[e.slides[e.index]].slide)),r=JSON.stringify(RVS.F.simplifyAllLayer(RVS.SLIDER[e.slides[e.index]].layers));if(RVS.F.compareLayerAnimPresets,!0===e.force||void 0===RVS.S.lastSaved||void 0===RVS.S.lastSaved[t]||a!==RVS.S.lastSaved[t].params||r!==RVS.S.lastSaved[t].layers){var o={slider_id:RVS.ENV.sliderID,slide_id:e.slides[e.index],params:a,layers:r,slide_order:e.order};RVS.DOC.trigger("rs_save_slide_params",[o]),RVS.F.ajaxRequest("save_slide",o,(function(i){i.success&&(RVS.S.lastSaved=void 0===RVS.S.lastSaved?{}:RVS.S.lastSaved,RVS.S.lastSaved[t]={params:a,layers:r},e.index++,RVS.F.saveSlides(e))}),void 0,void 0,RVS_LANG.saveslide+' "'+RVS.SLIDER[e.slides[e.index]].slide.title+'"')}else e.index++,RVS.F.saveSlides(e)}else e.index++,RVS.F.saveSlides(e)}else RVS.SLIDER.inWork=[],RVS.F.slideinWork(RVS.S.slideId),RVS.S.need_to_save=!1,void 0!==e.trigger&&e.trigger()},RVS.F.convertArrayToObjects=function(){RVS.SLIDER.settings.nav.arrows.presets=Object.assign({},RVS.SLIDER.settings.nav.arrows.presets),RVS.SLIDER.settings.nav.bullets.presets=Object.assign({},RVS.SLIDER.settings.nav.bullets.presets),RVS.SLIDER.settings.nav.thumbs.presets=Object.assign({},RVS.SLIDER.settings.nav.thumbs.presets),RVS.SLIDER.settings.nav.tabs.presets=Object.assign({},RVS.SLIDER.settings.nav.tabs.presets),RVS.SLIDER.settings.nav.scrubber.presets=Object.assign({},RVS.SLIDER.settings.nav.scrubber.presets),void 0!==RVS.SLIDER.settings.skins&&void 0!==RVS.SLIDER.settings.skins.colors&&(RVS.SLIDER.settings.skins.colors=Object.assign({},RVS.SLIDER.settings.skins.colors))},RVS.F.saveSliderSettings=function(){var e=JSON.stringify(RVS.SLIDER.settings),t=RVS.SLIDER.slideIDs.slice(),i=-1;for(var a in t)t.hasOwnProperty(a)&&(""+t[a]).indexOf("static")>=0&&(i=a);t.splice(i,1);let r=[];for(let e of RVS.SLIDER.slideIDs)for(let t in RVS.SLIDER[e].layers)if(RVS.SLIDER[e].layers.hasOwnProperty(t)&&RVS.SLIDER[e].layers[t]?.actions?.action){let i=RVS.SLIDER[e].layers[t].actions?.action;for(let e in i)i.hasOwnProperty(e)&&i[e]?.modalslide&&-1==r.indexOf(i[e].modalslid)&&r.push(i[e].modalslide.replace("rs-",""))}RVS.F.ajaxRequest("save_slider",{slider_id:RVS.ENV.sliderID,params:e,trans_ids:r,slide_ids:t},(function(e){e.success&&void 0!==e.missing&&e.missing.length>0&&RVS.F.saveSlides({index:0,slides:RVS.SLIDER.slideIDs,works:e.missing}),RVS.F.saveIntoSR7(e.v7),e.success&&RVS.DOC.trigger("slidersaved")}),void 0,void 0,RVS_LANG.saveslide+' '+RVS_LANG.slidersettings+"")},RVS.F.getAllSliderDatas=function(e){RVS.F.convertIDStoTxt();var t={slider:e?RVS.SLIDER.settings:JSON.stringify(RVS.SLIDER.settings),slide_order:e?RVS.SLIDER.slideIDs:JSON.stringify(RVS.SLIDER.slideIDs)},i=RVS.SLIDER.slideIDs.slice();for(var a in i)if(i.hasOwnProperty(a)){var r=!1,o=i[a];RVS.SLIDER.settings.general.useWPML&&void 0!==RVS.SLIDER[o]&&void 0!==RVS.SLIDER[o].slide&&void 0!==RVS.SLIDER[o].slide.child&&""!==RVS.SLIDER[o].slide.child.parentId&&void 0!==RVS.SLIDER[o].slide.child.parentId&&-1===jQuery.inArray(""+RVS.SLIDER[o].slide.child.parentId,RVS.SLIDER.slideIDs)&&(r=!0),!0!==r&&(t[i[a]]={params:e?RVS.F.simplifySlide(RVS.SLIDER[i[a]].slide):JSON.stringify(RVS.F.simplifySlide(RVS.SLIDER[i[a]].slide)),layers:e?RVS.F.simplifyAllLayer(RVS.SLIDER[i[a]].layers):JSON.stringify(RVS.F.simplifyAllLayer(RVS.SLIDER[i[a]].layers))})}return t},RVS.F.saveIntoSR7=function(e){function t(e){return new Promise(((t,i)=>{let a=document.createElement("script");a.src=e,a.onload=()=>{t()},a.onerror=t=>{i(new Error(`Failed to load the script ${e}`))},document.head.append(a)}))}!function(e){new Promise((async(i,a)=>{try{await t(RVS.ENV.plugin_url+"public/js/libs/tptools.js"),await t(RVS.ENV.plugin_url+"public/js/save.js"),await t(RVS.ENV.plugin_url+"public/js/migration.js"),await t(RVS.ENV.plugin_url+"public/js/defaults.js"),SR7.E??={},SR7.E.v6v7ids=e,SR7.migrate.saveIntoSr7(RVS.SLIDER.id).then((()=>{i()})).catch((e=>{a(new Error(`Failed to execute saveIntoSr7: ${e.message}`))}))}catch(e){a(e)}}))}(e)},RVS.F.addOnContainer={create:function(e){if(e.slug&&e.icon&&e.alias){var t="";!0===e.slider&&(jQuery("#gst_sl_collector").append('