- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 line
18 KiB
JavaScript
Executable File
1 line
18 KiB
JavaScript
Executable File
(()=>{var t={140:t=>{jQuery,t.exports={tpl_ajax:function(t,e,a){var n={type:"post",dataType:"json",url:tve_ult_page_data.ajaxurl};if(void 0!==a&&a||TVE.main.overlay(),t.action=tve_ult_page_data.tpl_action,t.design_id=t.design_id||tve_ult_page_data.design_id,t.post_id=tve_ult_page_data.post_id,t.security=tve_ult_page_data.security,n.data=t,e)for(var i in e)n[i]=e[i];return jQuery.ajax(n,t)},state_ajax:function(t,e){var a={type:"post",dataType:"json",url:tve_ult_page_data.ajaxurl};if(t.action=tve_ult_page_data.state_action,t.design_id=t.design_id||tve_ult_page_data.design_id,t.post_id=tve_ult_page_data.post_id,t.security=tve_ult_page_data.security,a.data=t,e)for(var n in e)a[n]=e[n];return jQuery.ajax(a,t)},stateResponse:function(t,e){if(!t||!1===t.success){var a="Something went wrong";return t&&!1===t.success&&(a+=": "+t.message),TVE.page_message(a,!0),void TVE.main.overlay("close")}t.main_page_content&&e.insertResponse(t),jQuery(".design-states").replaceWith(t.state_bar),TVE.main.overlay("close")},insertResponse:function(t){if(!t||!1===t.success)return TVE.page_message("Something went wrong"+(t&&!1===t.success?": "+t.message:""),!0),void setTimeout((function(){TVE.main.overlay("close")}),1);function e(){tve_ult_page_data=jQuery.extend(tve_ult_page_data,t.tve_ult_page_data,!0),TVE.CONST=jQuery.extend(TVE.CONST,t.tve_path_params,!0),TVE.inner_$("#tve-ult-editor-replace").replaceWith(t.main_page_content),TVE.Editor_Page.initEditorActions()}var a,n;"sheet"in document.createElement("link")?(a="sheet",n="cssRules"):(a="styleSheet",n="rules"),TVE.inner_$(".tve_custom_style,.tve_user_custom_style").remove(),TVE.CSS_Rule_Cache.clear(),TVE.USE_GLOBALSHEET=!0,TVE.CSS_Rule_Cache.clear(),TVE.USE_GLOBALSHEET=!1,t.custom_css&&t.custom_css.length&&TVE.inner_$("head").append(t.custom_css),TVE.Editor_Page.content_manager.refresh_global_style_node();var i=!1,o=jQuery();TVE.inner_$.each(t.css,(function(t,e){if(!TVE.inner_$("link#"+t+"-css").length){i=!0;var a=TVE.inner_$("<link />",{rel:"stylesheet",type:"text/css",id:t+"-css",href:e}).appendTo("head");-1===e.indexOf("fonts.googleapis")&&(o=o.add(a))}})),i?function t(e,i){var o=!0;window.tvu_loaded_count=window.tvu_loaded_count||1,window.tvu_loaded_count++,e.each((function(){try{if(!this[a]||!this[a][n]||!this[a][n].length)return o=!1,!1}catch(t){return o=!1,!1}})),o||window.tvu_loaded_count>40?i():setTimeout((function(){t(e,i)}),500)}(o,e):e()}}},657:t=>{t.exports={tvu_set_01:{".tve_countdown_2 .tve_t_part":{background:"","border-color":""}},tvu_set_02:{".tve_countdown_2 .tve_t_part":{background:"","border-color":""}},tvu_set_03:{'.tve_countdown_1 .tve_t_part [class*="part-"]':{color:""}},tvu_set_05:{".tve_countdown_2 .tve_t_part":{background:"","border-color":""}},tvu_set_09:{".tve_countdown_2 .tve_t_part":{background:"","border-color":""}},tvu_set_10:{".tve_countdown_2 .tve_t_part":{background:"","border-color":""}},tvu_set_11:{".tve_countdown_2 .tve_t_part":{background:"","border-color":""}},tvu_set_12:{".tve_countdown_2 .tve_t_part":{background:"","border-color":""}},tvu_set_18:{".tve_countdown_3 .tve_t_part .part-1":{color:""},".tve_countdown_3 .tve_t_part .part-2":{color:""}},tvu_set_22:{".tve_countdown_3 .sc_timer_content":{background:""}},tvu_set_20:{".tve_countdown_3 .tve_t_part":{"background-color":"","border-color":""},".tve_countdown_3 .tve_t_part::before":{"border-color":""},".tve_countdown_3 .tve_t_part::after":{"border-color":""}},tvu_set_23:{".tve_countdown_3 .sc_timer_content":{"border-color":""},".tve_countdown_3 .tve_t_part::before":{"border-color":""},".tve_countdown_3 .tve_t_part::after":{"border-color":""}},tvu_set_24:{".tve_countdown_1 .t-digits":{"border-color":""}},tvu_set_25:{".tve_countdown_3 .tve_t_part::after":{background:"","border-color":""}},tvu_set_26:{".tve_countdown_2 .tve_t_part":{background:""}},tvu_set_27:{".tve_countdown_2 .tve_t_part":{"border-color":""}},tvu_set_28:{".tve_countdown_2 .t-digits":{"border-color":""}}}},3801:(t,e,a)=>{var n=null,i=a(140);t.exports=TVE.modal.base.extend({after_initialize:function(t){this.$el.addClass("medium")},before_open:function(){this.$("input#tve-ult-state-name").val(""),this.state_id&&this.state_name&&this.$("input#tve-ult-state-name").val(this.state_name)},save:function(){var t=this.$("input#tve-ult-state-name").val(),e=this;t&&t.length>0?(TVE.main.overlay(),TVE.Editor_Page.save(!1,(function(){e.state_id&&e.state_name?i.state_ajax({custom_action:"edit_name",post_title:t,id:e.state_id}).done((function(t){i.stateResponse(t,i),e.close()})):i.state_ajax({custom_action:"add",post_title:t}).done((function(t){i.stateResponse(t,i),e.close()}))}))):TVE.page_message(tve_ult_page_data.L.state_name_required,!0,5e3)}},{get_instance:function(t){return n||(n=new TVE_Ult_Int.AddEditState({el:t})),n}})},3955:(t,e,a)=>{var n,i,o;n=jQuery,i=null,o=a(140),t.exports=TVE.CloudTemplatesCategories.extend({$$type:"ultimatum_"+tve_ult_page_data.design_type,templateName:TVE.ucFirst("bar"===tve_ult_page_data.design_type?"ribbon":tve_ult_page_data.design_type),categoryId:"countdown_type",before_open:function(){this.applyTo=TVE.Editor_Page.editor.children(".thrv_wrapper"),TVE.ActiveElement||(TVE.ActiveElement=this.applyTo.addClass("edit_mode")),TVE.CONST[this.collectionName]?this.$('[data-item="Saved Templates"] .lp-group-count').text(tve_ult_page_data.saved_tpls.length):this.fetchTemplates(this.$$type),this.resetFilters(),!this.applyTo.hasClass("tcb-ct-placeholder")&&this.applyTo.attr("tcb-template-name")?this.$warning.show().find(".tcb-notification-content").html(TVE.t.warning_change_ct.replace(/%s/g,this.templateName)):this.$warning.hide(),this.selectDefault()},selectDefault:function(){this.filter({},this.$typesWrapper.find('[data-item="Cloud Templates"]'))},on_success:function(t){var e=this;if(t.error)return this.on_error({responseJSON:t});this.collection.reset(t.templates),this.build_preview(),this.types={},_.each(t.templates,(function(t){var a=t.config["tve_tpl_".concat(e.$$type,"_meta")][e.categoryId];a&&!e.types[a]&&(e.types[a]=0),e.types[a]++})),this.$typesWrapper.empty().append(this.group_item({group:"All Cloud Templates",counter:t.templates.length})),_.each(this.types,(function(t,a){e.$typesWrapper.append(e.group_item({group:a,counter:t}))})),this.$typesWrapper.append(this.group_item({group:"Saved Templates",counter:tve_ult_page_data.saved_tpls.length})),this.selectDefault(),TVE.CONST[this.collectionName]=t.templates},build_preview:function(){var t=this,e="",a=this;if(this.filters.group.length>0&&(-1!==this.filters.group[0].indexOf("Cloud")?this.collection.reset(TVE.CONST[this.collectionName]):-1!==this.filters.group[0].indexOf("Countdown")?this.collection.reset(TVE.CONST[this.collectionName].filter((function(e){return e.config["tve_tpl_".concat(t.$$type,"_meta")][t.categoryId]===t.filters.group[0]}))):this.collection.reset(tve_ult_page_data.saved_tpls)),this.instance.collection.each((function(t){e+=a.item_template({item:t.toJSON(),selected:""})})),e.length){this.$content.html(e);var i=parseInt(this.$content.find(this.itemClass).outerWidth(!0));this.$content.find("img").each((function(){var t=this.getAttribute("data-ratio");t&&n(this).closest(".cloud-template-item").css("height",i*parseFloat(t))})),this.applyMasonry()}else this.$content.html(this.no_templates());this.on_finished()},select_template:function(t){this.selected=String(t),this.applyTo.addClass("tcb-block-placeholder tcb-elem-placeholder").empty(),this.close(),TVE.inner_$("html").stop().animate({scrollTop:this.applyTo.offset().top-50},{duration:500}),-1!==this.selected.indexOf("tvu-tpl")?this.saveSavedTemplate():this.save()},saveSavedTemplate:function(){var t=this;o.tpl_ajax({custom:"get_saved_tpl",tpl_id:this.selected}).done((function(e){t.applyTo.replaceWith(n(e.content)),TVE.Editor_Page.content_manager.insert_head_css(e.inline_css).done((function(){TVE.Editor_Page.editor.find("[data-css]").addBack("[data-css]").each((function(){TVE.inner_$(this).head_css_clone()})),TVE.main.overlay(!0),TVE.Editor_Page.save(!0)}))}))},alter_wrapper_attributes:function(t,e){return this.applyTo.length>1&&(this.applyTo=this.applyTo.filter(":not(style)"),TVE.ClickedElement=TVE.ActiveElement=this.applyTo),{"tcb-template-name":e.name,"tcb-template-id":e.id,"tvu-tpl-id":"cloud_"+e.type+"-"+e.id,"tcb-template-pack":e.pack,"data-keep-css_id":1}},afterTemplateCssApplied:function(){TVE.Editor_Page.editor.children("style").slice(1).remove()}},{get_instance:function(t){return i||(i=new TVE_Ult_Int.DesignTemplates({el:t})).$el.addClass("tcb-modal-cloud-templates-categories"),i}})},3687:(t,e,a)=>{var n=null,i=a(140);t.exports=TVE.modal.base.extend({after_initialize:function(){this.$el.addClass("medium")},reset:function(){var t=this;i.tpl_ajax({custom:"reset"}).done((function(e){i.insertResponse(e),t.close(),TVE.main.overlay("close")}))}},{get_instance:function(t){return n||(n=new TVE_Ult_Int.DesignReset({el:t})),n}})},9151:(t,e,a)=>{var n=null,i=a(140);t.exports=TVE.modal.base.extend({after_initialize:function(){this.$el.addClass("medium")},checkUniqueName:function(t){var e=!0;return tve_ult_page_data.saved_tpls.forEach((function(a){a.name===t&&(e=!1)})),e},save:function(){var t=this.$("input#tve-template-name").val(),e=this;t&&t.length>0?(t=t.trim(),this.checkUniqueName(t)?TVE.main.editor_settings.save(null,null,(function(){i.tpl_ajax({custom:"save",name:t}).done((function(a){a&&a.saved_tpls&&(tve_ult_page_data.saved_tpls=a.saved_tpls),TVE_Ult_Int.savePreview(t,(function(e){var a=tve_ult_page_data.saved_tpls.findIndex((function(e){return e.name===t}));-1!==a&&(tve_ult_page_data.saved_tpls[a].thumb=e.thumb,tve_ult_page_data.saved_tpls[a].thumb_size=e.thumb_size)})),e.close(),TVE.main.overlay("close")}))})):TVE.page_message(tve_ult_page_data.L.tpl_existing_name,!0,5e3)):TVE.page_message(tve_ult_page_data.L.tpl_name_required,!0,5e3)}},{get_instance:function(t){return n||(n=new TVE_Ult_Int.DesignSave({el:t})),n}})},8855:(t,e,a)=>{var n=null,i=a(140);t.exports=TVE.modal.base.extend({saved_tpl_delete_confirmation:TVE.tpl("landing-pages/delete-confirmation"),events:function(){return _.extend({},TVE.modal.base.prototype.events(),{"click .tcb-cancel-delete-template":"no_delete_template","click .tcb-apply-delete-template":"yes_delete_template"})},after_initialize:function(){this.$el.addClass("medium"),this.$tabs=this.$(".tab-item"),this.$content=this.$(".tve-tab-content")},tab_click:function(t){var e=t.currentTarget.getAttribute("data-content");this.$tabs.removeClass("active"),t.currentTarget.classList.add("active"),this.$content.removeClass("active"),this.$content.filter('[data-content="'+e+'"]').addClass("active"),"saved"===e&&this.get_saved()},get_saved:function(){var t=this;this.$(".tve-saved-templates-list").html(tve_ult_page_data.L.fetching_saved_templates),i.tpl_ajax({custom:"get_saved"},{dataType:"html"},!0).done((function(e){TVE.main.overlay("close"),t.$(".tve-saved-templates-list").html(e)}))},select_template:function(t){this.$(".template-wrapper.active").removeClass("active"),t.currentTarget.classList.toggle("active")},delete_confirmation:function(t){var e=jQuery(t.currentTarget).closest(".tve-template-item");e.find(".template-wrapper").hide(),e.append(this.saved_tpl_delete_confirmation())},no_delete_template:function(t){var e=jQuery(t.currentTarget).closest(".tve-template-item");e.find(".template-wrapper").show(),e.find(".tcb-delete-template-confirmation").remove()},yes_delete_template:function(t){var e=jQuery(t.currentTarget).closest(".tve-template-item");TVE.main.overlay(),i.tpl_ajax({custom:"delete"},{dataType:"html"},!0).done((function(){e.remove(),TVE.main.overlay("close")}))},save:function(){var t=this.$(".tve-template-item .active"),e=this;t&&t.length?i.tpl_ajax({custom:"choose",tpl:t.data("key")}).done((function(t){i.insertResponse(t),TVE.main.overlay("close"),e.close()})):TVE.page_message(TVE.t.SelectTemplate,!0,5e3)}},{get_instance:function(t){return n||(n=new TVE_Ult_Int.DesignTemplates({el:t})),n}})},2952:(t,e,a)=>{var n=a(140);t.exports=TVE.Views.Base.base_view.extend({after_initialize:function(){this.dom={btn:this.$(".states-button-container")}},expand:function(){this.$(".design-states").show(),this.dom.btn.hide()},collapse:function(){this.$(".design-states").hide(),this.dom.btn.show()},add:function(t){this.collapse();var e=TVE_Ult_Int.AddEditState.get_instance(TVE.modal.get_element("add-edit-state"));return e.state_name=null,e.state_id=null,e.open({top:"20%"}),!1},edit:function(t){this.collapse();var e=TVE_Ult_Int.AddEditState.get_instance(TVE.modal.get_element("add-edit-state"));return e.state_name=t.currentTarget.getAttribute("data-state-name"),e.state_id=t.currentTarget.getAttribute("data-id"),e.open({top:"20%"}),!1},select:function(t){return this.collapse(),TVE.main.overlay(),TVE.Editor_Page.save(!1,(function(){n.state_ajax({custom_action:"display",id:t.currentTarget.getAttribute("data-id")}).done((function(t){n.stateResponse(t,n)}))})),!1},duplicate:function(t,e){return this.collapse(),TVE.main.overlay(),TVE.Editor_Page.save(!1,(function(){n.state_ajax({custom_action:"duplicate",id:e.getAttribute("data-id")}).done((function(t){n.stateResponse(t,n)}))})),!1},remove:function(t,e){return this.collapse(),TVE.main.overlay(),n.state_ajax({custom_action:"delete",id:e.getAttribute("data-id")}).done((function(t){TVE.page_message("State Deleted"),n.stateResponse(t,n)})),!1}})}},e={};function a(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,a),o.exports}var n,i=window.TVE_Ult_Int=i||{},o=!1,s=1,r=["tve_ult_close"],l=a(657);(n=jQuery)(window).on("tcb_main_ready",(function(){o=Boolean(parseInt(tve_ult_page_data.with_cloud_tpl)),i.DesignTemplates=a(o?3955:8855),i.DesignReset=a(3687),i.DesignSave=a(9151),i.AddEditState=a(3801);var t=a(2952);function e(){var t=o?"design-cloud-templates":"design-templates";i.DesignTemplates.get_instance(TVE.modal.get_element(t)).open({top:"5%",css:{width:"80%",left:"10%"},dismissible:tve_ult_page_data.has_content})}i.States=new t({el:jQuery("#tu-form-states")[0]}),i.savePreview=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tve_ult_page_data.design_id,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;TVE.Editor_Page.blur(),TVE.Editor_Page.editor.find(".on_hover").removeClass("on_hover"),TVE.generateElementPreview(TVE.Editor_Page.editor,(function(a){var i=new FormData;a&&i.append("preview_file",a,t+".png"),i.append("custom","save_thumbnail"),i.append("action",tve_ult_page_data.tpl_action),i.append("design_id",tve_ult_page_data.design_id),i.append("post_id",tve_ult_page_data.post_id),i.append("security",tve_ult_page_data.security),i.append("file_name",t),n.ajax({type:"POST",url:tve_ult_page_data.ajaxurl,data:i,processData:!1,contentType:!1}).done((function(t){"function"==typeof e&&e(JSON.parse(t))}))}),{},!0)},TVE.add_filter("editor_loaded_callback",(function(){n(TVE.main).on("tcb.open_templates_picker",(function(t){t.preventDefault(),e()})),TVE.main.sidebar_extra.tve_ult_save_template=function(){var t=i.DesignSave.get_instance(TVE.modal.get_element("design-save"));return TVE.main.sidebar_extra.hide_drawers(),t.open({top:"20%"}),!1},TVE.main.sidebar_extra.tve_ult_reset_template=function(){return TVE.Editor_Page.blur(),i.DesignReset.get_instance(TVE.modal.get_element("design-reset")).open({top:"20%"}),!1},tve_ult_page_data.has_content||(o&&TVE.Editor_Page.editor.append(tve_ult_page_data.placeholder),e()),TVE.inner_$(".thrv_countdown_timer .t-caption:not(.thrv-inline-text)").each((function(){jQuery(this).addClass("thrv-inline-text")})),TVE.StorageManager.unset("tvu_design-"+tve_ult_page_data.design_id)})),TVE.add_action("tcb.element.focus",(function(t){if(t.hasClass("thrv_countdown_timer")&&tve_ult_page_data.tpl_action){var e=TVE.inner_$(".tl-style").attr("id");TVE.Components.countdown_old.controls.Color.config.css_suffix="",l[e]&&(TVE.Components.countdown_old.controls.Color.config.config.style_default_color=l[e])}})),TVE.add_filter("tcb.editor.default_ajax_config",(function(t){return t.data.ultimatum_editor_page=1,t})),TVE.add_filter("tve.countdown.state",(function(t){return"tve_ult_campaign"===TVE.CONST.post_type&&(t=[]),t})),o&&(TVE.add_action("tcb_after_cloud_template_css_inserted",(function(t){t.attr("tvu-tpl-id")&&-1!==t.attr("tvu-tpl-id").indexOf("ultimatum_".concat(tve_ult_page_data.design_type))&&TVE.Editor_Page.save(!0)})),TVE.add_filter("tcb_save_post_data_before",(function(t){var e=TVE.Editor_Page.editor.find('[tvu-tpl-id*="ultimatum_'.concat(tve_ult_page_data.design_type,'"]'));if(e.length&&(t.tve_ult_tpl="".concat(e.first().attr("tvu-tpl-id"))),"tve_ult_campaign"===TVE.CONST.post_type){var a={m:"600px",t:"1023px",d:"1366px"};t["form-height"]={};var n=TVE.Editor_Page.editor.find(".tve-editor-main-content"),i=TVE.main.$frame.width();for(var o in 0===n.length&&(n=TVE.Editor_Page.editor),n.css("border","1px solid transparent"),a)TVE.main.$frame.width(a[o]),t["form-height"][o]=n.outerHeight(!0);n.css("border",""),TVE.main.$frame.width(i)}return t})),TVE.add_action("tve.save_post.success",(function(){TVE.StorageManager.set("tvu_design-"+tve_ult_page_data.design_id,!0),i.savePreview()})),TVE.add_filter("tcb.elem.type",(function(t,e){return"icon"===t&&e.tcbHasClass("tve-ult-bar-close-editable")&&(t="ultimatum_close"),t})),TVE.add_action("tcb.element.click",(function(t,a){t.currentTarget.classList.contains("tve-ult-cloud-placeholder")&&e()}))),TVE.add_filter("tcb_froala_config",(function(){return{linkEventActions:{getHtml:function(){var t={tve_ult_close:TVE.Components.animation.options.actions.tve_ult_close};return TVE.tpl("froala-ult")({actions:t,current_id:++s})},bindEvents:function(t){t.on("change",".fr-extra-action",(function(e){t.find(".ult-action-config").hide(),this.checked?(t.find(".ult-action-opts-"+this.getAttribute("data-key")).show(),t.find(".fr-link-atts,.fr-link-url,.tve-top-tabs").hide(),t.find(".fr-extra-action").not(this).prop("checked",!1)):t.find(".fr-link-atts,.fr-link-url,.tve-top-tabs").show()}))},hasSelected:function(t){return t.find(".fr-extra-action:checked").length},getEventConfig:function(t){var e=t.find(".fr-extra-action:checked").attr("data-key");return{a:e,t:"click",config:{s:t.find(".ult-action-opts-"+e+' select[name="s"]').val(),anim:t.find(".ult-action-opts-"+e+' select[name="a"]').val()}}},reset:function(t){t.find(".fr-extra-action").prop("checked",!1),t.find(".fr-link-atts,.fr-link-url,.tve-top-tabs").show(),t.find(".ult-action-config").hide()},updateFromLink:function(t,e){var a=!1;if(this.reset(e),t.hasClass("tve_evt_manager_listen")){var n=TVE.EventManager.get(t,"click");n&&r.includes(n.a)&&(e.find('.fr-extra-action[data-key="'+n.a+'"]').prop("checked",!0).trigger("change"),e.find(".ult-action-opts-"+n.a+' select[name="s"]').val(n.config.s),a=!0,e.find(".ult-action-opts-"+n.a+' select[name="a"]').val(n.config.anim||"instant"))}return a}}}}))}))})(); |