Files
roi-theme/wp-content/plugins/thrive-visual-editor/editor/js/dist/notifications-main.min.js
root a22573bf0b Commit inicial - WordPress Análisis de Precios Unitarios
- 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>
2025-11-03 21:04:30 -06:00

1 line
66 KiB
JavaScript
Executable File

(()=>{var t={5529:t=>{const e=function(t,i,n,s){if(!Object.defineProperty)return t;Array.isArray(i)||(i=[i]),_.each(i,function(i){let o;t.hasOwnProperty(i)||Object.defineProperty(t,i,{enumerable:!0,get:()=>o,set(t){if(!e.skip_once&&t!==o){const e=o;o=t,n.apply(s||null,[i,t,e])}delete e.skip_once}})})};e.skip_one=function(){return this.skip_once=!0,this},t.exports=e},8382:t=>{t.exports={applyDefaultRules(t){const e={[TVE.main.responsive.desktop.media]:{".notifications-content":{"box-shadow":"rgba(0, 0, 0, 25%) 0px 4px 9px 0px",margin:0,padding:0,width:"501px","min-height":"20px","border-radius":"2px",border:"2px solid","border-color":"var(--notification-color)","background-color":"rgb(255, 255, 255)"},".thrv-columns":{margin:"0!important"},".tcb-flex-row":{padding:"0!important","margin-left":"0px"},".tcb-flex-col":{"padding-left":"0px"},".thrv_icon":{border:"none","border-radius":0,width:"27px",height:"27px","--tve-icon-size":"27px","font-size":"27px",margin:"0!important",color:"rgb(255, 255, 255)","--tcb-local-color-icon":"var(--notification-color)","--tcb-local-color-var":"var(--notification-color)","background-image":"linear-gradient(var(--tcb-local-color-icon), var(--tcb-local-color-icon))",padding:"16px !important"},".thrv-notification_message":{margin:0,"text-align":"center","font-size":"16px",color:"#191f28"},".tcb-flex-col:first-child":{"max-width":"12%"}},[TVE.main.responsive.mobile.media]:{".notifications-content":{width:"unset","min-width":"360px","background-color":"var(--notification-color) !important",border:"none","border-radius":0},".thrv-notification_message":{"min-width":"auto",color:"rgb(255, 255, 255)","text-align":"left"},".thrv_icon":{width:"24px",height:"24px","--tve-icon-size":"24px","font-size":"24px"},".thrv-columns":{width:"65%","margin-left":"auto !important","margin-right":"auto !important",float:"none"},".tcb-flex-col:first-child":{"max-width":"27%"}}};["success","warning","error"].forEach(t=>{TVE.FLAGS.notification_state=t;for(const t in e)for(const i in e[t])TVE.inner_$(i).head_css(e[t][i],t)}),delete TVE.FLAGS.notification_state,t&&TVE.Editor_Page.save(!0,null,{},!0)},initializeNotificationEditor(t){TVE.inner_$(`.notifications-content.notification-${t}`).children().addClass("tve-prevent-content-edit"),tve_notification.elements.forEach(t=>{const e=TVE.identifier(t);TVE.inner_$(e).each((e,i)=>{"notification_message"===t?i.classList.add("tcb-selector-no_save","tcb-selector-no_clone"):i.classList.add("tve_no_icons")})})},_updateMainFrameVars(t){TVE.changeCssVariableValue("--notification-color",{success:"rgb(74, 178, 93)",warning:"rgb(243, 156, 15)",error:"rgb(214, 54, 56)"}[t])},updatePreviewLink:(t="success")=>{const e=TVE.$(".preview-content");let i=e.attr("href");i.includes("notification-state")&&(i=i.split("&notification-state=")[0]),e.attr("href",i.concat(`&notification-state=${t}`))},updateNotificationSidebarOptions(t){TVE.main.EditMode.$componentPanel.find("#tve-layout-component,#tve-background-component,#tve-borders-component,#tve-shadow-component,#tve-responsive-component,#tve-styles-templates-component").toggle(t),TVE.main.EditMode.$componentPanel.find("#tve-notification-component .non-edit-mode-controls").toggle(!t),TVE.main.EditMode.$componentPanel.find("#tve-notification-component .edit-mode-controls").toggle(t),TVE.main.EditMode.$componentPanel.find("#tve-cloud-templates-component").toggle(!t)}}},13617:(t,e,i)=>{const n=i(16668);t.exports=n.component.extend({extra_states:!0,controls_init(t){const e=this;t.ParagraphStyle&&t.ParagraphStyle.set_drop_panel(t.ParagraphStylePicker),t.ToggleControls.update=function(){_.delay(_.bind(function(){const t=this.$(".tve-btn:visible:first").attr("data-value");this.clearActive(),this.setActive(t),e.$(".tcb-typography-toggle-element").hide(),e.$(`.${t}`).show()},this))},t.ToggleControls.input=_.bind(function(e,i){const n=i.getAttribute("data-value");this.$(".tcb-typography-toggle-element").hide(),this.$("."+n).show(),"tcb-typography-line-height"===n&&(t.LineHeight.before_update(t.LineHeight.readFrom()),t.LineHeight.update(t.LineHeight.readFrom()))},this),t.FontFace.update=function(){if($element=this.applyTo(),!TVE.froala.editor)return this.initial_font=$element.head_css("--tve-font-family")||$element.head_css("font-family",!1,this.config.css_suffix,!0,this.config.css_prefix),this.inherited=!this.initial_font||"inherit"===this.initial_font,this.initial_weight=$element.css("font-weight"),this.readFont($element),void this.setInputValue(this.initial_font);this.initial_font=$element.head_css("--tve-font-family")||$element.head_css("font-family",!1,this.config.css_suffix,!0,this.config.css_prefix),this.inherited=!this.initial_font||"inherit"===this.initial_font,this.initial_weight=TVE.froala.get_css("font-weight");const t=TVE.froala.get_selection_element();"bold"===this.initial_weight&&(this.initial_weight=t.closest("p").css("font-weight"));const e=jQuery(TVE.froala.editor.selection.element()).find("strong");e.length?this.initial_bold=e.css("font-weight"):this.initial_bold=TVE.froala.editor.tcb.getBlockElement().head_css("font-weight",null," strong",!0,this.config.css_prefix)||TVE.froala.editor.tcb.getBlockElement().head_css("font-weight",null," strong"),this.readFont($element),this.setInputValue(this.initial_font)},t.FontSize.input=function(t,i){e.applyContainerStyle(this,t,"font-size",i.value+this.getUM())},t.FontSize.update=function(){const t=this.applyTo();this.setValue(t.head_css("--tve-font-size")||t.head_css("font-size",!1,this.config.css_suffix,!0,this.config.css_prefix))},t.FontColor.input=function(t){e.applyContainerStyle(this,this.applyTo(),"color",String(t)),this.applyElementCss({"--tcb-applied-color":t&&String(t).replace("var","var$")||""})},t.FontColor.update=function(){const t=this.applyTo();this.setValue(t.head_css("--tve-color")||t.head_css("color",!1,this.config.css_suffix,!0,this.config.css_prefix))},t.LineHeight.input=function(t,i){e.applyContainerStyle(this,t,"line-height",i.value+this.getUM())},t.LineHeight.update=function(t){let e=this.applyTo().head_css("--tve-line-height")||this.applyTo().head_css("line-height",!1,this.config.css_suffix,!1,this.config.css_prefix);e||(e=t.css("line-height"),this.config.css_suffix&&t.find(this.config.css_suffix).length&&(t=t.find(this.config.css_suffix)),e&&-1!==e.indexOf("px")&&(e=parseFloat(e)/parseFloat(t.css("font-size"))+"em")),"normal"===e&&(e="1.12em"),this.setValue(e)},t.LetterSpacing.input=function(t,i){e.applyContainerStyle(this,t,"letter-spacing",i.value+this.getUM())},t.LetterSpacing.update=function(){const t=this.applyTo();this.setValue(t.head_css("--tve-letter-spacing")||t.head_css("letter-spacing",!1,this.config.css_suffix,!0,this.config.css_prefix))},t.LetterSpacing.prepareValue=t=>(TVE.SKIP_CSS_STATE||(t=parseFloat(t).toFixed(2),isNaN(t)&&(t=0)),t),t.TextAlign.applyStyles=function(t,e){const i={};this.config.property&&this.config.property_val?i[this.config.property]=this.config.property_val[e.getAttribute("data-value")]:i["text-align"]=e.getAttribute("data-value")+(this.config.important?" !important":""),TVE.do_action(`tcb.typography.${TVE._type(t)}.text_align`,this,t,e),this.applyElementCss(i,t)},t.TextAlign.update=function(){let t;this.config.property&&this.config.property_val?(t=this.applyTo().head_css(this.config.property,!1,this.config.css_suffix,!0),t=_.invert(this.config.property_val)[t]):(t=this.applyTo().head_css("text-align",!1,this.config.css_suffix,!0),t="start"===t?"left":t),this.setActive(t)},t.TextTransform.applyStyles=function(t,i){e.applyContainerStyle(this,t,"text-transform",i.dataset.value)},t.TextTransform.update=function(){const t=this.applyTo();this.setActive(t.head_css("--tve-text-transform")||t.head_css("text-transform",!1,this.config.css_suffix,!0)||"none")},_.each(["p","h1","h2","h3"],function(e){t[`${e}_spacing`]&&(t[e+"_spacing"].$(".width-input").attr("placeholder","auto"),t[e+"_spacing"].$(".width-input").on("focusout",function(){t[e+"_spacing"].update()}),t[e+"_spacing"].input=function(t,e){let i=e.value,n=this.getUM();"auto"!==i&&""!==i||(n="",i="auto");const s={padding:"0px 0px "+i+n+" 0px !important",margin:"0px !important"};"auto"===e.value&&(s.margin=s.padding=""),this.applyElementCss(s,t)},t[e+"_spacing"].update=function(t){let e=this.applyTo().head_css("padding-bottom",null,this.config.css_suffix,!1,this.config.css_prefix);e?("auto"===e&&this.$(".tve-input").val("auto"),this.setValue(e.replace("!important",""))):t.length?(e=parseInt(t.css("margin-bottom"))+parseInt(t.css("padding-bottom"))+"px",this.setValue(e)):this.$(".tve-input").val("auto")},t[e+"_spacing"].convertUM=t[e+"_spacing"].pixel_em_conversion)}),t.TextStyle.writeStyle=function(t,i){e.applyContainerStyle(this,this.applyTo(),i,t[i].replace("!important",""))}},clear_formatting(t,e="",i=""){_.each({FontFace:["font-family"],FontSize:["font-size"],FontColor:["color","fill","--tcb-applied-color"],LineHeight:["line-height"],LetterSpacing:["letter-spacing"],TextAlign:["text-align","align-items","justify-content"],TextStyle:["font-weight","font-style","text-decoration"],TextTransform:["text-transform"],p_spacing:["padding","margin"],h1_spacing:["padding","margin"],h2_spacing:["padding","margin"],h3_spacing:["padding","margin"]},(n,s)=>{const o={},a=this.controls[s],r={};a&&(n.forEach(t=>{o[t]="",o[`${TVE.CONST.cssVarPrefix}${t}`]="",r[`--tve-${t}`]="",r[`${TVE.CONST.cssVarPrefix}--tve-${t}`]=""}),t&&t.jquery?(t.head_css(o,!1,e,!1,i).css(o),t.head_css(r).css(r)):(a.applyTo().head_css(o,!1,a.config.css_suffix,!1,a.config.css_prefix).css(o),a.applyTo().head_css(r).tcbCss(r)))}),this.controls.ParagraphStylePicker&&this.controls.ParagraphStylePicker.clear(),TVE.ActiveElement.removeAttr("data-child-styles"),TVE.do_action(`tcb.typography.${TVE._type(TVE.ActiveElement)}.clear_formatting`),this.update(),TVE.Editor_Page.reposition_icons()},paragraphStylePicker:()=>i(58057),applyContainerStyle(t,e,i,n){t.applyElementCss({[i]:t.cssImportant(`var(--tve-${i}, ${n})`)},t.applyTo(),t.config.css_suffix,t.css_prefix),t.applyElementCss({[`--tve-${i}`]:n},e,"","")}})},16668:(t,e,i)=>{function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach(function(e){o(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function o(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}let a,r,l,c;const h=i(5529),d=i(48828),p=i(40248),f=i(74144);!function(t){let e=!1;a=Backbone.View.extend({events:{"click .click":"_call","input .input":"_call","change .change":"_call","mousedown .mousedown":"_call","mouseenter .mouseenter":"_call","mouseleave .mouseleave":"_call","mouseup .mouseup":"_call","mouseover .mouseover":"_call","keyup .keyup":"_call","keyup .keyup-enter":"_keyup_enter","keydown .keydown":"_call","click .dropdown-header":"toggleControls","focus input":"selectInput","focusout .focusout":"_call","focusin .focusin":"_call"},initialize(t){"function"==typeof this.beforeInitialize?this.beforeInitialize(t):"function"==typeof this.before_initialize&&this.before_initialize(t),this.render(t),"function"==typeof this.afterInitialize?this.afterInitialize(t):"function"==typeof this.after_initialize&&this.after_initialize(t)},_call(t){if(t.currentTarget.disabled||t.currentTarget.classList.contains("tve-disabled"))return!1;const e=t.currentTarget.getAttribute("data-fn-"+t.type)||t.currentTarget.getAttribute("data-fn");if(e&&"__return_false"===e)return t.stopPropagation(),t.preventDefault(),!1;if("function"==typeof this[e])return this[e].call(this,t,t.currentTarget);if(e&&0===e.indexOf("f:")){let i=TVE,n=window;const s=e.split(":")[1].split(".");for(;i&&s.length;)n=i,i=i[s.shift()];if("function"==typeof i)return i.call(n,t)}},_keyup_enter(t){return 13!==t.which||this._call(t)},show(t){return this.visible()||(t||this.trigger("show"),this.$el.data("hide")||this.$el.show()),this},hide(t){return this.visible()&&(t||this.trigger("hide"),this.$el[0].style.display="none"),this},toggle(t,e){return t?this.show(e):this.hide(e)},visible(){return this.$el.is(":visible")},toggleControls(){},checkbox_values(t){const e=[];return this.$(t+":checked").each(function(){e.push(this.value)}),e},destroy(){this.undelegateEvents(),this.$el.removeData().off(),this.remove(),Backbone.View.prototype.remove.call(this),this.onDestroy&&this.onDestroy()},render(t){if("function"==typeof this.beforeRender?this.beforeRender(t):"function"==typeof this.before_render&&this.before_render(t),this.template&&_.isString(this.template)&&(this.template=TVE.tpl(this.template)),this.template){const e=t&&t.render_function||"html";this.$el[e](this.template())}return"function"==typeof this.afterRender?this.afterRender(t):"function"==typeof this.after_render&&this.after_render(t),this},render_template(t){return _.isString(t)&&(t=TVE.tpl(t)),this.$el.html(t.call(this)),this},inline_message(e,i,n){void 0===n&&(n=this.$el.children().last()),i=i||"info",e=e||{};let s=this.$(".inline-message");return s.length||(s=t('<div class="inline-message"></div>')),s.removeClass("m-success m-info m-error").addClass("m-"+i).empty(),n.after(s),s.text(e),s},is_visible(){return void 0!==this._visible&&this._visible},disable(){this.$el.addClass("tcb-disabled")},enable(){this.$el.removeClass("tcb-disabled")},bind(t){if(null==t)return t;if("string"==typeof t&&this[t]&&(t=this[t]),"function"!=typeof t)throw new TypeError("bind must be called on a function");return _.bind.apply(_,[t,this].concat(Array.prototype.slice.call(arguments,1)))},toggle_disabled(t){return this.$el.toggleClass("tcb-disabled",t),this},select_element:t=>(TVE.Editor_Page.focus_element(TVE.inner_$(t.currentTarget.dataset.el||t.currentTarget.dataset.element)),!1),get(t,e){return f.deepGet(this,t,e)},get_config(t,e){return this.get("model.config."+t,e)},get_control(t){return(t=t.replace(".controls","").split(".")).splice(1,0,"controls"),t=t.join("."),this.get.call(TVE.Components,t)},selectInput(t){TVE.apply_filters("tcb.allow_input_focus",!0,t)&&t.target.select()}}),c=a.extend({events:()=>_.extend(a.prototype.events,{"change [data-setting]":"change_value"}),initialize(){const t=this;"function"==typeof this.before_initialize&&this.before_initialize(arguments),this.data={},this.render(),this.$("[data-setting]").each(function(){const e=this.getAttribute("data-setting");h(t.data,e,t.value_changed,t)}),"function"==typeof this.after_initialize&&this.after_initialize(arguments)},change_value(t,e){h.skip_one(),this.data[e.getAttribute("data-setting")]=this.$(e).val()},value_changed(t,e){this.$(`[data-setting="${t}"]`).val(e)}}),r=a.extend({initialize(t){return t.component&&(this.component=t.component),a.prototype.initialize.apply(this,arguments)},applyTo(i,n,s){if(n=!!n,s=s||!1,!TVE.ActiveElement)return t();const o=this.config&&this.config.to||"";let a=TVE.ActiveElement;return!1===n&&(e||s)&&(a=a.filter(".edit_mode"),a.length||(a=TVE.ActiveElement)),0===o.indexOf("main::")?a=TVE.inner_$(o.replace("main::","")):0===o.indexOf("closest::")?a=TVE.ActiveElement.closest(o.replace("closest::","")):o&&(a=a.find(o),a.length||(a=TVE.ActiveElement.closest(".thrv_wrapper").find(o))),i&&(a=a[0]),a},readFrom(){let t=this.applyTo(!1,!1,TVE.is_group_editing);if(t=f.getElementForDataSelector(t),this.config&&this.config.css_suffix){const e=TVE.apply_filters("tcb.element.suffix",this.config.css_suffix,t);t=f.elementForSuffix(t,e)}return t},_call(t){const e=t.currentTarget.getAttribute("data-fn-"+t.type)||t.currentTarget.getAttribute("data-fn");if(e&&"__return_false"===e)return t.stopPropagation(),t.preventDefault(),!1;if("input"===t.type?TVE.SKIP_CSS_STATE=!0:TVE.SKIP_CSS_STATE=!1,this.currentEventType=t.type,"function"==typeof this[e]){let i=this.applyTo();"function"==typeof this.prepare&&(i=this.prepare(i));const n=this[e].call(this,i,t.currentTarget,t);return delete this.currentEventType,n}return!1},setConfig(e,i,n){this.config={to:i,css_suffix:n||""},void 0!==e&&t.extend(!0,this.config,e),this.afterConfig()},change(t,e){TVE.SkipUpdate=!0,this.input(t,e),TVE.SkipUpdate=!1},input(){throw new Error(this.key()+": Input function not implemented!")},clear(){},update(){throw new Error(this.key()+": Update function not implemented!")},before_update(){},after_update(){},afterConfig(){},getDefault(){return this.default||this.model.default||this.model.config.default||""},key(){return this.$el.data("key")||this.$el.data("view")||""},prepareValue(t,e){if(""===t||isNaN(t))"-"!==t.slice(-1)&&(t=0);else{const i=(String(t).split(".")[1]||[]).length;switch(e){case"%":i>1&&(t=parseFloat(t).toFixed(1));break;case"em":case"vh":i>2&&(t=parseFloat(t).toFixed(2));break;case"s":TVE.SKIP_CSS_STATE&&"."!==!t.slice(-1)||(t=f.toFixed(t,2));break;default:t=parseInt(t)}}return t},before_render(){return this.model||(this.model={}),this.model.config||(this.model.config={}),this},cssImportant(t=""){return String(t)+(this.get_config("important")||this.config.important||this.config&&this.config.config&&this.config.config.important?" !important":"")},applyElementCss(t,e=this.applyTo(),i=this.config.css_suffix,n=this.config.css_prefix,o=!1){let a=o?e:(t=>{if(TVE.ActiveElement&&TVE.ActiveElement.hasClass("tcb_similar_edit"))if(this.config&&this.config.to){const e=TVE.ActiveElement;TVE.ActiveElement=TVE.ActiveElement.add(TVE.inner_$(".tcb_similar_edit")),t=this.applyTo(),TVE.ActiveElement=e}else t=t.add(TVE.inner_$(".tcb_similar_edit"));return t=f.getElementForDataSelector(t),f.elementForSuffix(t,i)})(e);a=TVE.apply_filters("tcb.apply_element_css",a,t);const r=new RegExp("(::[^\\s\\+>~\\.\\[:]+|:before|:after)");let l=-1===_.findIndex(Array.isArray(i)?i:[i],t=>t&&r.test(t));const c=TVE.Elements[TVE._type(e)];if(l&&c&&c.expanded&&!c.expanded_state_apply_inline&&(l=!1),l=TVE.apply_filters("tcb.css.can_apply_inline",l,e,i,n),l&&TVE.SKIP_CSS_STATE)TVE.state_manager.is_hover()&&Object.keys(t).forEach(e=>t[e]=t[e]&&!String(t[e]).includes("important")?t[e]+" !important":t[e]),TVE.state_manager.is_default()||(a=a.filter(`${TVE.state_manager.css_class()}, ${TVE.state_manager.css_class()} *`)),a.tcbCss(t);else{const o={};Object.keys(t).forEach(e=>{if(TVE.CONST.cssVarProps.includes(e)){let i=t[e];"string"!=typeof i&&(i=d(i).toRgbString()),o[`${TVE.CONST.cssVarPrefix}${e}`]=i.replace(/var/g,"var$")}}),t=s(s({},t),o),e.head_css(t,null,i,!1,n);const r={};Object.keys(t).forEach(t=>r[t]=""),a.tcbCss(r)}}}),l=a.extend({extra_states:!1,updateOnMouseLeave:!0,initialize(e){this.config=e.config,this.renderer=e.renderer,this.disabled_devices&&(t.each(this.disabled_devices,(t,e)=>{this.$el.addClass("disabled-"+e)}),this.disabled_tooltip&&this.$el.attr("data-disabled-tooltip",this.disabled_tooltip).attr("data-width","258px")),this.hide(),this.controls={},this.key=e.key||"",this.$(".tve-control").each((e,i)=>{const n=t(i),s=n.data(),o=s.key||s.view,a=s.initializer;let r=s.view;this.config[o]||(this.config[o]={}),this.config[o].config||(this.config[o].config={});const l=this.config[o];s&&(s.extends&&(l.extends=s.extends),delete s.extends,delete s.view,delete s.key,Object.assign(l.config,{},s)),void 0!==l.extends&&(r=l.extends),"function"==typeof this["__config_"+o]&&this["__config_"+o](l.config),r=a&&"function"==typeof this[a]?this[a]():void 0===TVE.Views.Controls[r]?TVE.Views.Base.control:TVE.Views.Controls[r],this.controls[o]=new r({el:n,model:l,component:this}),this.controls[o].component=this,"function"==typeof this.controls[o].after_init&&this.controls[o].after_init()}),this.options=e.options||{},"function"==typeof this.after_init&&this.after_init.call(this,e),"function"==typeof this.afterInit&&this.afterInit.call(this,e),this.controls_init(this.controls),TVE.do_action("tcb.component.after_init."+this.key,this)},setKey(t){this.key=t},open_group_options(t){TVE.Components.group.enter_group_mode(t)},close_group_options(){if(arguments&&arguments[1]&&"a"===arguments[1].tagName.toLowerCase()){const t=TVE.Components.group.mainElement.closest(".thrv_wrapper");return TVE.Editor_Page.blur(),TVE.Editor_Page.focus_element(t),void(TVE.main.EditMode.in_edit()&&TVE.main.EditMode.element().is(t)&&TVE.main.EditMode.exit())}TVE.do_action("tcb.group.on_blur",TVE.Components.group.mainElement),TVE.Components.group.exit_group_mode(),TVE.main.switch_menu_to("elements")},setOrder(t){(void 0===t||isNaN(t))&&(t=0),this.$el.css("order",t)},is_placeholder:t=>t.hasClass("tcb-elem-placeholder"),update(i){if(e=TVE.is_group_editing,void 0!==i&&this.controls[i])return this.controls[i].update(this.controls[i].applyTo()),e=!1,this;this.deps&&this.deps.forEach(t=>TVE.Components[t]&&TVE.Components[t].update()),this.before_update(),t.each(this.controls,function(t,e){if(!e.$el.tcbHasClass("control-hide")){const t=e.readFrom();e.before_update(t),e.update(t),e.after_update(t)}}),this.after_update(),e=!1,TVE.do_action("component.update."+this.key,this),TVE.do_action("component.update."+this.key+"."+TVE._type(TVE.ActiveElement),this)},setConfig(e){t.each(this.controls,function(t,i){i.setConfig(e[t]||{},e.to,e.css_suffix)})},disable_controls(t,e="control-hide",i=!0){this.$("."+e).removeClass(e),_.each(t,function(t,i){let n,s="";_.isString(i)&&(s=t,t=i),n=this.controls&&this.controls[t]?this.controls[t].$el:this.$(t),n.tcbAddClass(e),s&&n.attr({"data-tooltip":s,"data-width":"element"})},this),i&&"function"==typeof this.disable_extra_controls&&this.disable_extra_controls(t)},block_controls(t){this.$(".disabled-children").removeAttr("data-tooltip"),this.disable_controls(t,"disabled-children",!1)},controls_init(t){},toggleControls(e){const i=e.currentTarget.getAttribute("data-prop");this[i]=t(e.currentTarget),e.ctrlKey||e.metaKey?this.toggleDropdown(i,!t(e.currentTarget).hasClass("open")):this.toggleDropdown(i),TVE.CONST.display[this.key]||(TVE.CONST.display[this.key]={}),TVE.CONST.display[this.key][i]=this[i].hasClass("open"),p.setComponentMeta(this.key,i,TVE.CONST.display[this.key][i]),TVE.Views.Controls.DropPanel.close_all(),e.stopPropagation()},change_state(t){},reinit(){},reset(){},isOpen(){return TVE.ActiveElement&&this.$('.dropdown-header.open[data-prop="docked"]').length},toggleDropdown(t,e){return void 0===t?Promise.resolve(this):(TVE.TIMEOUT_UPDATE=TVE.TIMEOUT_UPDATE||[],void 0===this[t]&&(this[t]=this.$el.find(`.dropdown-header[data-prop="${t}"]`)),void 0===e?(this[t].tcbHasClass("open")||"advanced"===t||_.contains(TVE.main.no_auto_collapse_components.concat("shared-styles"),this.key)||TVE.main.collapse_components(TVE.main.no_auto_collapse_components.concat("shared-styles")),this.$el.toggleClass("tve-active-component"),this[t].tcbToggleClass("open")):this[t][e?"tcbAddClass":"tcbRemoveClass"]("open"),TVE.main.states_dropdown.hide_dropdown(),TVE.ActiveElement&&"docked"===t&&this[t].tcbHasClass("open")?new Promise(t=>{TVE.TIMEOUT_UPDATE.push(setTimeout(()=>{this.update(),t(this)}))}):Promise.resolve(this))},map(t){const e=Array.prototype.slice.call(arguments,1);return _.each(this.controls,function(i){"string"==typeof t&&i[t]?i[t].apply(i,e):"function"==typeof t&&t(i)})},before_update(){},after_update(){},toggleHighlight(t=!1){this.el.classList[t?"add":"remove"]("tve-component-highlight")},open(e={},i="",n=TVE.CONST.display[this.key]||{}){let s=e.disabled_controls||[];!Array.isArray(s)&&t.isPlainObject(s)&&(s=Object.values(s));let o=[...s];e.config&&(o=o.concat(Object.keys(e.config).filter(t=>e.config[t].hidden))),o=TVE.apply_filters(`tcb.hidden_controls.${this.key}.${i}`,o,e,this,i),this.disable_controls(o);const a=TVE.apply_filters(`tcb.blocked_controls.${this.key}.${i}`,_.extend({},e.blocked_controls));return this.block_controls(a||[]),this.setConfig(e.config),this.setOrder(e.order),this.toggleDropdown("docked",!!n.docked&&0===TVE.getClassThatContains(TVE.ActiveElement,TVE.CONST.global_cls_prefix).length),this.toggleDropdown("advanced",!!n.advanced),this.$el[0].style.display="block",this._visible=!0,this.toggleDropdown("docked",!!n.docked&&0===TVE.getClassThatContains(TVE.ActiveElement,TVE.CONST.global_cls_prefix).length)}})}(jQuery),t.exports={base_view:a,base_view_model:c,control:r,component:l}},32434:(t,e,i)=>{!function(e){const n=i(16668).control,s=i(89926);t.exports=n.extend({template:TVE.tpl("controls/text/line-spacing"),getElement:()=>TVE.apply_filters("tve.line_spacing.element",TVE.froala.get_block_element().closest(":not(a)")),after_render(){const t={top:0,bottom:0};let i;this.$(".m-handle, .m-value").draggable({axis:"y",start:(n,s)=>{e("body").addClass("cursor-resize-y"),i=s.helper.closest(".m-handle").data("side"),t[i]="top"===i?s.offset.top+this.values[i]:s.offset.top-this.values[i]},stop:(n,s)=>{const o=Math.max(0,"top"===i?t[i]-s.offset.top:s.offset.top-t[i]);e("body").removeClass("cursor-resize-y"),this.values[i]=parseFloat(this.$preview.css(`padding-${i}`)),this.sizes[i].set("value",this.values[i]),this.triggerChange(o,i)},drag:(e,n)=>{const s=Math.max(0,"top"===i?t[i]-n.offset.top:n.offset.top-t[i]).toFixed(0);this.$preview.css(`padding-${i}`,s+"px"),this.$(`.${i} .value`).html(s),this.triggerInput(s,i)}}),this.$preview=this.$(".m-preview")},shouldConvertMarginToPadding(t){if(t.is("blockquote")||t.is("pre"))return!1;const e=parseInt(t.css("margin-top")),i=parseInt(t.css("margin-bottom"));return!(!e&&!i)&&{"padding-top":parseInt(t.css("padding-top"))+e+"px","padding-bottom":parseInt(t.css("padding-bottom"))+i+"px","margin-top":this.cssImportant("0px"),"margin-bottom":this.cssImportant("0px")}},readValues(){const t={top:"",bottom:""};if(this.$element=this.getElement(),!this.$element||!this.$element.length)return t;const e=this.shouldConvertMarginToPadding(this.$element);return e?(t.top=e["padding-top"],t.bottom=e["padding-bottom"]):(t.top=this.$element.head_css("padding-top",!1,this.config.css_suffix,!0,this.config.css_prefix),t.bottom=this.$element.head_css("padding-bottom",!1,this.config.css_suffix,!0,this.config.css_prefix)),t},moveMarginToPadding(){this.getElement().each((t,e)=>{const i=TVE.inner_$(e),n=this.shouldConvertMarginToPadding(i);n&&this.writeStyle(n,i)})},update(){const t=this.readValues();this.sizes={top:new s(t.top),bottom:new s(t.bottom)},this.values={top:this.sizes.top.get_real_value(0),bottom:this.sizes.bottom.get_real_value(0)},this.$preview.css({paddingTop:this.values.top,paddingBottom:this.values.bottom}),this.$(".top .value").html(this.values.top),this.$(".top .uom").html(this.sizes.top.get("uom")),this.$(".bottom .value").html(this.values.bottom),this.$(".bottom .uom").html(this.sizes.bottom.get("uom"))},triggerInput(t,e,i="px"){TVE.ElementEditIcons.toggle(!1),TVE.SKIP_CSS_STATE=!0,this.input(t,e,i),TVE.SKIP_CSS_STATE=!1},triggerChange(t,e,i="px"){TVE.SKIP_CSS_STATE=!1,this.input(t,e,i),TVE.Editor_Page.reposition_icons(),TVE.ElementEditIcons.toggle(!0)},input(t,e,i="px"){const n={};n[`padding-${e}`]=this.cssImportant(t+i),n[`margin-${e}`]=this.cssImportant("0px"),this.writeStyle(n)},writeStyle(t,e=this.$element){this.applyElementCss(t,e),TVE.do_action("tve.line_spacing.write",e)}})}(jQuery)},36829:(t,e,i)=>{t.exports=TVE.Views.Base.component.extend({after_init(){TVE.Editor_Page.editor.find(".animated").removeClass("animated")},controls_init(t){let e,i,n;function s(t,n=!1){a(),r(t);const s=t.attr("data-timer"),l=t.attr("data-animation");t.hide(),t.addClass("editor-preview"),n&&(TVE.inner_$("html, body").on("mousedown.notification",()=>{o(t)}),TVE.$("html, body").on("mousedown.notification_main",()=>{o(t)})),e=setTimeout(()=>{t.show(),t.removeAttr("data-animation"),n?i=setTimeout(()=>{"none"!==l?r(t):t.hide(),o(t)},s):setTimeout(()=>{t.removeClass("editor-preview"),r(t)},1e3)},300)}function o(t){a(),n=setTimeout(()=>{t.removeClass("editor-preview"),void 0===t.attr("data-animation")&&r(t),t.show(),TVE.inner_$("html, body").off("mousedown.notification"),TVE.inner_$("html, body").off("mousedown.notification_main")},500)}function a(){[e,i,n].forEach(t=>{void 0!==t&&clearTimeout(t)})}function r(e){const i=t.AnimationDirection.$el.find(".tve-select")[0].value;"none"!==i&&e.attr("data-animation",i)}function l(e){const i=e.attr("data-position").split("-")[0];["top","bottom"].includes(i)?(t.VerticalSpacing.$el.show(),t.VerticalSpacing.$el.find(".input-label").text(`${i} spacing`),t.VerticalSpacing.setValue(e.css(`${i}`).split("px")[0])):t.VerticalSpacing.hide()}function c(e){const i=e.attr("data-position").split("-")[1];["left","right"].includes(i)&&"mobile"!==TVE.main.device?(t.HorizontalSpacing.$el.show(),t.HorizontalSpacing.setValue(e.css(`${i}`).split("px")[0])):t.HorizontalSpacing.hide()}t.DisplayPosition.input=function(t,e){const i=e.getAttribute("data-value"),n=i.split("-")[0];let s=i.split("-")[1];"mobile"===TVE.main.device&&(s=t.attr("data-position").split("-")[1]),t.attr("data-position",n.concat("-",s)),l(t),c(t)},t.DisplayPosition.update=function(t){let e=t.attr("data-position");this.$(".items-9").removeClass("mobile"),this.$(".active").removeClass("active"),"mobile"===TVE.main.device&&(e=e.split("-")[0].concat("-center"),this.$(".items-9").addClass("mobile")),this.$(`[data-value=${e}]`).addClass("active")},t.VerticalSpacing.input=function(e,i){isNaN(i.value)&&t.VerticalSpacing.setValue(0);const n=e.attr("data-position").split("-")[0];e.head_css({[n]:i.value+"px"},!1,`${TVE.identifier("notification")}[data-position*="${n}"]`,!0,"")},t.VerticalSpacing.update=function(t){l(t)},t.HorizontalSpacing.input=function(e,i){isNaN(i.value)&&t.VerticalSpacing.setValue(0);const n=e.attr("data-position").split("-")[1];e.head_css({[n]:i.value+"px"},!1,`${TVE.identifier("notification")}[data-position*="${n}"]`,!0,"")},t.HorizontalSpacing.update=function(t){c(t)},t.AnimationDirection.input=function(t,e){t.attr("data-animation",e.value),t.toggleClass("tcb-animated","none"!==e.value),s(t)},t.AnimationDirection.update=function(t){this.setValue(t.attr("data-animation"))},t.AnimationTime.input=function(t,e){t.attr("data-timer",1e3*e.value)},t.AnimationTime.change=function(t){s(t,!0)},t.AnimationTime.update=function(t){let e=t.attr("data-timer");e<0?t.attr("data-timer",3e3):e>10&&(e/=1e3),this.setValue(e)},t.VerticalPosition.applyStyles=function(t,e){const i=t.attr("data-state");t.find(`.notifications-content.notification-${i}`).css("justify-content",e.getAttribute("data-value"))},t.VerticalPosition.update=function(t){const e=t.attr("data-state");let i=t.find(`.notifications-content.notification-${e}`).css("justify-content");i="normal"===i?"flex-start":i,this.setActive(i)},t.MaximumWidth.input=function(t,e){const i=t.attr("data-state");this.applyElementCss({"max-width":e.value+"px"},t.find(`.notifications-content.notification-${i}`),"","")},t.MaximumWidth.update=function(t){const e=t.attr("data-state");let i=t.find(`.notifications-content.notification-${e}`).css("max-width").split("px")[0];const n=t.find(`.notifications-content.notification-${e}`).css("width").split("px")[0];"none"===i&&(i=n,t.find(`.notifications-content.notification-${e}`).head_css({"max-width":n+"px"})),this.setValue(i)},t.MinimumHeight.input=function(t,e){const i=t.attr("data-state");this.applyElementCss({"min-height":e.value+"px"},t.find(`.notifications-content.notification-${i}`),"","")},t.MinimumHeight.update=function(t){const e=t.attr("data-state");this.setValue(t.find(`.notifications-content.notification-${e}`).css("min-height").split("px")[0])}},editNotifications(){const t=TVE.inner_$(TVE.identifier("notification")),e=t.attr("data-state"),n=i(8382);TVE.main.sidebar_extra.$(".sidebar-item.add-element").show(),t.find(".tve-prevent-content-edit").removeClass("tve-prevent-content-edit"),n.updateNotificationSidebarOptions(!0),TVE.main.EditMode.enter(t,{show_default_message:!0,can_insert_elements:!0,view_label:"Editing Notification",element_selectable:!0,restore_state:!1,states:[{label:"Success",value:"success",default:"success"===e},{label:"Warning",value:"warning",default:"warning"===e},{label:"Error",value:"error",default:"error"===e}],callbacks:{exit:()=>{const e=t.attr("data-state");t.addClass("tve_no_icons"),TVE.main.sidebar_extra.$(".sidebar-item.add-element").hide(),TVE.inner_$(`.notifications-content.notification-${e}`).children().addClass("tve-prevent-content-edit"),TVE.Editor_Page.focus_element(t),n.updateNotificationSidebarOptions(!1),n.updatePreviewLink(e)},state_change:e=>{t.attr("data-state",e),TVE.Components.notification.controls.VerticalPosition.update(t),TVE.Editor_Page.focus_element(t),n._updateMainFrameVars(e)}}})}})},36976:(t,e,i)=>{t.exports={Notification:i(36829),NotificationMessage:i(47235)}},40248:t=>{const e={setItem(t,e){},getItem(t){},removeItem(t){}};function i(){this.api=window.localStorage||e,this.keys={link_new_tab:"tcb-lnk-new-tab",link_no_follow:"tcb-lnk-no-follow",jump_animation:"smooth-anim",video:{autoplay:"tcb-video-autoplay",controls:"tcb-video-controls",loop:"tcb-video-loop",showinfo:"tcb-video-showinfo",modestbranding:"tcb-video-modestbranding",byline:"tcb-video-byline","play-bar":"tcb-video-play-bar",fs:"tcb-video-fs",rel:"tcb-video-rel"},audio:{"data-autoplay":"tcb-audio-autoplay",loop:"tcb-audio-loop","no-download":"tcb-audio-no-download",auto_play:"tcb-audio-auto_play",show_artwork:"tcb-audio-show_artwork",show_user:"tcb-audio-show_user"}},jQuery(window).on("storage.tcb",jQuery.proxy(function(t){let e=(t=t.originalEvent).newValue,i=t.oldValue;try{e=JSON.parse(e),i=JSON.parse(i)}catch(t){}jQuery(this).trigger(t.key,[e,i])},this))}i.prototype.set=function(t,e){if(!t||null==e)return this;"object"==typeof e&&(e=JSON.stringify(e));try{this.api.setItem(t,e)}catch(t){}return this},i.prototype.get=function(t){if(!t)return;const e=this.api.getItem(t);if(!e)return e;try{return JSON.parse(e)}catch(t){return e}},i.prototype.unset=function(t){if(!t)return this;try{this.api.removeItem(t)}catch(t){}return this},i.prototype.on=function(t,e){return jQuery(this).on(t,function(t,i,n){e(i,n)})},i.prototype.off=function(t){return jQuery(this).off(t)},i.prototype.setComponentMeta=function(t,e,i){const n=this.get("tcb-components-display")||{};n[t]=n[t]||{},n[t][e]=i,this.set("tcb-components-display",n)},i.instance=function(){return this._instance||(this._instance=new i),this._instance},t.exports=i.instance()},43456:(t,e,i)=>{t.exports=i(16668).control.extend({template:TVE.tpl("controls/button-group"),toggle:!1,initialize(t){this.model&&this.render(t),t.toggle&&(this.toggle=t.toggle)},triggerChange(t,e){const i="function"==typeof this.applyStyles,n=i=>{this.currentEventType="change",this[i](t,e),this.trigger("change"),delete this.currentEventType};i?(this.currentEventType="input",this.applyStyles(t,e),delete this.currentEventType,setTimeout(()=>TVE.Editor_Page.reposition_icons()),setTimeout(()=>n("applyStyles"),100)):n("change")},_click(t,e){if(TVE.apply_filters("tcb.button-group.click",!0,t,this)){if(this.toggle&&e.className.includes("active"))return e.classList.remove("active"),this.triggerChange(t,e),!1;if(this.model.config.checkbox){if(e.classList.toggle("active"),this.model.config.required&&!this.getValue())return void e.classList.add("active")}else this.clearActive(),e.classList.add("active")}this.triggerChange(t,e)},setActive(t,e=!1){if(this.model.config.checkbox||this.clearActive(),Array.isArray(t))this.$(".tve-btn").each(function(){this.classList[t.includes(this.dataset.value)?"add":"remove"]("active")});else{const i=this.$('.tve-btn[data-value="'+t+'"]');i.length?i.addClass("active"):this.$(".default").addClass("active"),e&&this.$(".active").trigger("click")}},toggleChanged(t,e){this.$(`[data-value="${t}"]`).toggleClass("changed",e)},toggleActive(t,e){void 0===e&&(e=!this.isActive(t)),this.$(`.tve-btn[data-value="${t}"]`).toggleClass("active",e)},setValue(t,e=!1){this.setActive(t,e)},removeActive(t){this.$(`.tve-btn[data-value="${t}"]`).removeClass("active")},getValue(){return this.$(".tve-btn.active").attr("data-value")||null},isActive(t){return this.$(`.tve-btn.active[data-value="${t}"]`).length>0},clearActive(){this.$(".tve-btn").removeClass("active")},toggleDisabled(t,e){return this.$(`[data-value="${t}"]`).toggleClass("tcb-disabled",e),this},toggleInfoText(t){return this.$(".info-text").css("display",t?"":"none"),this},summary(t,e){return(e=e||!0)?(this.$(".control-summary").text(this.get_summary(t)).show(),this):(this.$(".control-summary").hide(),this)},hasSelectedValue(t){return this.$(`[data-value="${t}"]`).hasClass("active")},get_css_class(){let t="";return this.model.config.name&&!this.model.config["full-width"]||(t+="full-width"),this.model.config.no_border&&(t+=" hide-borders"),this.model.config.large_buttons&&(t+=" tcb-large-buttons"),this.model.config.small_buttons&&(t+=" tcb-small-buttons"),this.model.config.large_buttons_text&&(t+=" tcb-large-buttons tcb-large-buttons-text"),t?t+" ":""},get_buttons(){return this.model.config.buttons},get_summary(t={}){const e=[];if(this.$(".tve-btn.active").each(function(){e.push(this.dataset.name||this.textContent)}),e.length===this.model.config.buttons.length)return t.all||"All";if(!e.length)return t.none||"None";let i=e.pop();return e.length&&(i=e.join(", ")+" & "+i),i+(t.suffix||"")},openInstructionsLightbox(t,e){TVE.modal_open("instructions",{element:TVE.ActiveElement,target:e})},redirectToInstructionsUrl(t,e){const i=e.getAttribute("data-link");i?window.open(i,"_blank"):console.error("No URL found in data-link attribute.")},updateButtonContent(t,e){this.$(`[data-value="${e}"]`).html(t)}})},47235:(t,e,i)=>{const n=i(13617);t.exports=n.extend({getTargetElement:()=>TVE.ActiveElement.add(TVE.ActiveElement.find(".tve_editable")).not(".tcb-el-group"),controls_init(t){n.prototype.controls_init.apply(this,Array.from(arguments)),t.LineSpacing.getElement=function(){return TVE.ActiveElement},t.LineSpacing.readValues=function(){const t=this.getElement();return{top:t.css("padding-top"),bottom:t.css("padding-bottom")}},t.LineSpacing.writeStyle=function(t){this.applyElementCss(t,TVE.ActiveElement,"","")},TVE.add_action("tcb.typography.notification_message.clear_formatting",()=>{TVE.ActiveElement[0].style.setProperty("padding-top","0px","important"),TVE.ActiveElement[0].style.setProperty("padding-bottom","0px","important")})},lineSpacingControl:()=>i(32434)})},48828:t=>{!function(){let e=/^[\s,#]+/,i=/\s+$/,n=0,s=Math,o=s.round,a=s.min,r=s.max,l=s.random;var c=function(t,l){if(l=l||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,l);const h=function(t){let n={r:0,g:0,b:0},o=1,l=!1,c=!1;var h,d,p;return"string"==typeof t&&(t=function(t){t=t.replace(e,"").replace(i,"").toLowerCase();let n,s=!1;if(C[t])t=C[t],s=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(n=I.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=I.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=I.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=I.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=I.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=I.hsva.exec(t))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=I.hex8.exec(t))?{a:(o=n[1],P(o)/255),r:P(n[2]),g:P(n[3]),b:P(n[4]),format:s?"name":"hex8"}:(n=I.hex6.exec(t))?{r:P(n[1]),g:P(n[2]),b:P(n[3]),format:s?"name":"hex"}:!!(n=I.hex3.exec(t))&&{r:P(n[1]+""+n[1]),g:P(n[2]+""+n[2]),b:P(n[3]+""+n[3]),format:s?"name":"hex"};var o}(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(h=t.r,d=t.g,p=t.b,n={r:255*A(h,255),g:255*A(d,255),b:255*A(p,255)},l=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(t.s=F(t.s),t.v=F(t.v),n=function(t,e,i){t=6*A(t,360),e=A(e,100),i=A(i,100);const n=s.floor(t),o=t-n,a=i*(1-e),r=i*(1-o*e),l=i*(1-(1-o)*e),c=n%6;return{r:255*[i,r,a,a,l,i][c],g:255*[l,i,i,r,a,a][c],b:255*[a,a,l,i,i,r][c]}}(t.h,t.s,t.v),l=!0,c="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(t.s=F(t.s),t.l=F(t.l),n=function(t,e,i){let n,s,o;function a(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}if(t=A(t,360),e=A(e,100),i=A(i,100),0===e)n=s=o=i;else{const r=i<.5?i*(1+e):i+e-i*e,l=2*i-r;n=a(l,r,t+1/3),s=a(l,r,t),o=a(l,r,t-1/3)}return{r:255*n,g:255*s,b:255*o}}(t.h,t.s,t.l),l=!0,c="hsl"),t.hasOwnProperty("a")&&(o=t.a)),o=k(o),{ok:l,format:t.format||c,r:a(255,r(n.r,0)),g:a(255,r(n.g,0)),b:a(255,r(n.b,0)),a:o}}(t);this._originalInput=t,this._r=h.r,this._g=h.g,this._b=h.b,this._a=h.a,this._roundA=o(100*this._a)/100,this._format=l.format||h.format,this._gradientType=l.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=h.ok,this._tc_id=n++};function h(t,e,i){t=A(t,255),e=A(e,255),i=A(i,255);const n=r(t,e,i),s=a(t,e,i);let o,l,c=(n+s)/2;if(n==s)o=l=0;else{const a=n-s;switch(l=c>.5?a/(2-n-s):a/(n+s),n){case t:o=(e-i)/a+(e<i?6:0);break;case e:o=(i-t)/a+2;break;case i:o=(t-e)/a+4}o/=6}return{h:o,s:l,l:c}}function d(t,e,i){t=A(t,255),e=A(e,255),i=A(i,255);const n=r(t,e,i),s=a(t,e,i);let o,l,c=n;const h=n-s;if(l=0===n?0:h/n,n==s)o=0;else{switch(n){case t:o=(e-i)/h+(e<i?6:0);break;case e:o=(i-t)/h+2;break;case i:o=(t-e)/h+4}o/=6}return{h:o,s:l,v:c}}function p(t,e,i,n){const s=[j(o(t).toString(16)),j(o(e).toString(16)),j(o(i).toString(16))];return n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function f(t,e,i,n){var s;return[j((s=n,Math.round(255*parseFloat(s)).toString(16))),j(o(t).toString(16)),j(o(e).toString(16)),j(o(i).toString(16))].join("")}function u(t,e){e=0===e?0:e||10;const i=c(t).toHsl();return i.s-=e/100,i.s=O(i.s),c(i)}function g(t,e){e=0===e?0:e||10;const i=c(t).toHsl();return i.s+=e/100,i.s=O(i.s),c(i)}function m(t){return c(t).desaturate(100)}function _(t,e){e=0===e?0:e||10;const i=c(t).toHsl();return i.l+=e/100,i.l=O(i.l),c(i)}function b(t,e){e=0===e?0:e||10;const i=c(t).toRgb();return i.r=r(0,a(255,i.r-o(-e/100*255))),i.g=r(0,a(255,i.g-o(-e/100*255))),i.b=r(0,a(255,i.b-o(-e/100*255))),c(i)}function v(t,e){e=0===e?0:e||10;const i=c(t).toHsl();return i.l-=e/100,i.l=O(i.l),c(i)}function y(t,e){const i=c(t).toHsl(),n=(o(i.h)+e)%360;return i.h=n<0?360+n:n,c(i)}function E(t){const e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function T(t){const e=c(t).toHsl(),i=e.h;return[c(t),c({h:(i+120)%360,s:e.s,l:e.l}),c({h:(i+240)%360,s:e.s,l:e.l})]}function x(t){const e=c(t).toHsl(),i=e.h;return[c(t),c({h:(i+90)%360,s:e.s,l:e.l}),c({h:(i+180)%360,s:e.s,l:e.l}),c({h:(i+270)%360,s:e.s,l:e.l})]}function V(t){const e=c(t).toHsl(),i=e.h;return[c(t),c({h:(i+72)%360,s:e.s,l:e.l}),c({h:(i+216)%360,s:e.s,l:e.l})]}function w(t,e,i){e=e||6,i=i||30;const n=c(t).toHsl(),s=360/i,o=[c(t)];for(n.h=(n.h-(s*e>>1)+720)%360;--e;)n.h=(n.h+s)%360,o.push(c(n));return o}function $(t,e){e=e||6;const i=c(t).toHsv();let n=i.h,s=i.s,o=i.v;const a=[],r=1/e;for(;e--;)a.push(c({h:n,s,v:o})),o=(o+r)%1;return a}c.prototype={isDark(){return this.getBrightness()<128},isLight(){return!this.isDark()},isValid(){return this._ok},getOriginalInput(){return this._originalInput},getFormat(){return this._format},getAlpha(){return this._a},getBrightness(){const t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha(t){return this._a=k(t),this._roundA=o(100*this._a)/100,this},toHsv(){const t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString(){const t=d(this._r,this._g,this._b),e=o(360*t.h),i=o(100*t.s),n=o(100*t.v);return 1==this._a?"hsv("+e+", "+i+"%, "+n+"%)":"hsva("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},toHsl(){const t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString(){const t=h(this._r,this._g,this._b),e=o(360*t.h),i=o(100*t.s),n=o(100*t.l);return 1==this._a?"hsl("+e+", "+i+"%, "+n+"%)":"hsla("+e+", "+i+"%, "+n+"%, "+this._roundA+")"},toHex(t){return p(this._r,this._g,this._b,t)},toHexString(t){return"#"+this.toHex(t)},toHex8(){return f(this._r,this._g,this._b,this._a)},toHex8String(){return"#"+this.toHex8()},toRgb(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb(){return{r:o(100*A(this._r,255))+"%",g:o(100*A(this._g,255))+"%",b:o(100*A(this._b,255))+"%",a:this._a}},toPercentageRgbString(){return 1==this._a?"rgb("+o(100*A(this._r,255))+"%, "+o(100*A(this._g,255))+"%, "+o(100*A(this._b,255))+"%)":"rgba("+o(100*A(this._r,255))+"%, "+o(100*A(this._g,255))+"%, "+o(100*A(this._b,255))+"%, "+this._roundA+")"},toName(){return 0===this._a?"transparent":!(this._a<1)&&(S[p(this._r,this._g,this._b,!0)]||!1)},toFilter(t){const e="#"+f(this._r,this._g,this._b,this._a);let i=e;const n=this._gradientType?"GradientType = 1, ":"";return t&&(i=c(t).toHex8String()),"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+i+")"},toString(t){const e=!!t;t=t||this._format;let i=!1;const n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"name"!==t?("rgb"===t&&(i=this.toRgbString()),"prgb"===t&&(i=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(i=this.toHexString()),"hex3"===t&&(i=this.toHexString(!0)),"hex8"===t&&(i=this.toHex8String()),"name"===t&&(i=this.toName()),"hsl"===t&&(i=this.toHslString()),"hsv"===t&&(i=this.toHsvString()),i||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},_applyModification(t,e){const i=t.apply(null,[this].concat([].slice.call(e)));return this._r=i._r,this._g=i._g,this._b=i._b,this.setAlpha(i._a),this},lighten(){return this._applyModification(_,arguments)},brighten(){return this._applyModification(b,arguments)},darken(){return this._applyModification(v,arguments)},desaturate(){return this._applyModification(u,arguments)},saturate(){return this._applyModification(g,arguments)},greyscale(){return this._applyModification(m,arguments)},spin(){return this._applyModification(y,arguments)},_applyCombination(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous(){return this._applyCombination(w,arguments)},complement(){return this._applyCombination(E,arguments)},monochromatic(){return this._applyCombination($,arguments)},splitcomplement(){return this._applyCombination(V,arguments)},triad(){return this._applyCombination(T,arguments)},tetrad(){return this._applyCombination(x,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){const e={};for(const i in t)t.hasOwnProperty(i)&&(e[i]="a"===i?t[i]:F(t[i]));t=e}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,i){i=0===i?0:i||50;const n=c(t).toRgb(),s=c(e).toRgb(),o=i/100,a=2*o-1,r=s.a-n.a;let l;l=a*r==-1?a:(a+r)/(1+a*r),l=(l+1)/2;const h=1-l,d={r:s.r*l+n.r*h,g:s.g*l+n.g*h,b:s.b*l+n.b*h,a:s.a*o+n.a*(1-o)};return c(d)},c.readability=function(t,e){const i=c(t),n=c(e),s=i.toRgb(),o=n.toRgb(),a=i.getBrightness(),r=n.getBrightness(),l=Math.max(s.r,o.r)-Math.min(s.r,o.r)+Math.max(s.g,o.g)-Math.min(s.g,o.g)+Math.max(s.b,o.b)-Math.min(s.b,o.b);return{brightness:Math.abs(a-r),color:l}},c.isReadable=function(t,e){const i=c.readability(t,e);return i.brightness>125&&i.color>500},c.mostReadable=function(t,e){let i=null,n=0,s=!1;for(let o=0;o<e.length;o++){const a=c.readability(t,e[o]),r=a.brightness>125&&a.color>500,l=a.brightness/125*3+a.color/500;(r&&!s||r&&s&&l>n||!r&&!s&&l>n)&&(s=r,n=l,i=c(e[o]))}return i};const C=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"};var S=c.hexNames=function(t){const e={};for(const i in t)t.hasOwnProperty(i)&&(e[t[i]]=i);return e}(C);function k(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function A(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");const i=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=a(e,r(0,parseFloat(t))),i&&(t=parseInt(t*e,10)/100),s.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function O(t){return a(1,r(0,t))}function P(t){return parseInt(t,16)}function j(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}const I=function(){const t="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",e="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{rgb:new RegExp("rgb"+e),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+e),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+e),hsva:new RegExp("hsva"+i),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();t.exports=c}()},50732:(t,e,i)=>{!function(e){const n=i(16668);let s=e(),o=1;const a=n.control.extend({_template:TVE.tpl("controls/drop-panel"),panel_position:"left",allow_force_close:!0,key(){return this.$el.data("view")||o++},initialize(t){e.extend(!0,this,t),void 0===this.template&&this.model.config.template&&(this.template=TVE.tpl(this.model.config.template)),this.template||(this.template=e.noop),this.append_element(t),this.$el.data("dp-instance",this).on("click",function(t){t.stopPropagation()}),n.control.prototype.initialize.apply(this,arguments),t&&t.no_buttons&&this.$el.addClass("panel-bare"),t&&t.class&&this.$el.addClass(t.class),this.el.style.display="none",TVE.add_action("tcb.editor_page.disable_clicks",_.bind(function(t){this.isOpen()&&t.panel_action_btn&&this.$(".action-buttons").addClass("tcb-disabled")},this)),TVE.add_action("tcb.editor_page.enable_clicks",_.bind(function(t){t.panel_action_btn&&this.$(".action-buttons").removeClass("tcb-disabled")},this))},getPanelClass:()=>"",handleOpenPanel(){},append_element(t){const i=t.appendTo||TVE.main["right"===this.panel_position?"$dropPanelsRight":"$dropPanels"];this.setElement(e("<div>",{id:"tcb-drop-"+(this.$el.data("view")||this.key()),class:`tcb-drop-panel ${this.getPanelClass()}`,html:this._template(),"data-view":this.key()}).appendTo(i)[0])},render(){return this.$(".popup-content").html(this.template()),"function"==typeof this.after_render&&this.after_render(),this},addToOpened(){s=s.add(this.$el)},removeFromOpened(){s=s.not(this.$el)},open(t,e){return a.close_all(),this.addToOpened(),this.visible=!0,this.show(),this.handleOpenPanel(),this.position(e),this.onOpen(t,e,this.$el),TVE.main.scroll_panel_to(this.$(".drop-panel")),this.$(".drop-panel").find("input:not([type=hidden]):not([type=radio]):not([type=checkbox]),textarea").filter(":visible").first().trigger("focus"),this.$(".scroll-wrapper").length&&this.$el.addClass("scrolled"),"function"==typeof this.after_open&&this.after_open(),!1},isOpen(){return this.$el.is(":visible")},hide(t,e){this.visible=!1,TVE.main.$cpanel.find(".tve-panel").removeClass("drop-panel-open"),this.last_target&&this.last_target.removeClass("drop-panel-focus"),this.el.style.display="none",this.handleOpenPanel(),this.$(".color-picker").spectrum("hide"),this.trigger("close"),this.onClose(t,e),this.removeFromOpened(),this.$el.removeClass("tcb-drop-panel-active")},isVisible(){return this.visible},show(){return this.el.style.display="block",this.$el.toggleClass("tcb-drop-panel-active"),TVE.$document.off("keydown.drop_panel").on("keydown.drop_panel",t=>{this.isOpen()&&(27!==t.which||TVE.prevent_blur||(t.target.blur&&t.target.blur(),this.$(".btn-cancel").trigger("click")),13===t.which&&TVE.apply_filters("tcb.droppanel.enter.pressed",!0,e(t.target),t)&&(t.target.blur&&t.target.blur(),this.$(".btn-apply").trigger("click")))}),TVE.main.$cpanel.find(".tve-panel").addClass("drop-panel-open"),this},position(t,i){if(!t)return;let n=e(t);const s=n.offset(),o=this.$(".drop-panel").offset()||{top:0,left:9};n.is("svg")&&(n=n.parent()),this.$el.css({top:s.top-this.$el.parent().offset().top+"px"}),this.$(".tcb-panel-arrow").css({left:s.left-o.left+n.outerWidth()/2+"px"}),void 0===i&&(i=n),this.last_target=i.addClass("drop-panel-focus")},onCancel(t,e){this.isVisible()&&(this.hide(t,e),this.cancel(t,e))},onApply(t,e){this.isVisible()&&(!0===this.validate(t,e)?(this.apply(t,e),this.hide(t,e)):this.FORCE_CLOSE&&this.hide(t,e))},validate:()=>!0,cancel(){throw new Error(this.key()+": Cancel function not implemented for this drop panel!!!")},apply(){},onOpen(){},onClose(){}},{close_all(){s.each(function(){const t=e(this).data("dp-instance");t&&t.allow_force_close&&(t.FORCE_CLOSE=!0,t.onApply(t.applyTo()),delete t.FORCE_CLOSE)}),s=e()}});t.exports=a}(jQuery)},56164:(t,e,i)=>{const n=i(50732),s=i(43456),o=i(5529);t.exports=n.extend({template:TVE.tpl("controls/style"),_template:TVE.tpl("controls/drop-panel-light"),after_initialize(){o(this.model,"selected",this.change,this),this.hasTabSwitch()&&(this.styleTabs=new s({el:this.$(".style-picker-button-group"),model:this.getTabModel()}),this.styleTabs.change=this.onTabChanged)},open(t,e){n.prototype.open.call(this,t,e),e.closest(".tve-control").getAttribute("data-has-palettes-v2")&&this.$(".tve-style-options").addClass("palettes-v2")},getTabModel:()=>({}),hasTabSwitch:()=>!1,onTabChanged(t,e){},box_class:()=>"tve-style-options",container_class:()=>"",container_el:()=>"div",change(){this.trigger("update",this.getLabel(this.model.selected)),this.$el.find(".tve-select-item").removeClass("active").filter('[data-value="'+this.model.selected+'"]').addClass("active")},select(t,e){this.model.selected=e.dataset.value,this.input(t,e)},getLabel(t){if(!(t=void 0===t?this.model.selected:t)||!this.model.config.items[t])return this.model.config.default_label?this.model.config.default_label:"";const e=this.model.config.items[t];return this.modifyLabel(e.label?e.label:e)},modifyLabel:t=>t,render_item(t,e){return this.item_template()({key:t,label:e.label||e,value:e})},item_template:()=>TVE.tpl("implement me"),read_from_element(){throw new Error("Implement read_from_element function")},update(){const t=this.read_from_element();this.model.selected=t,this.model.selected_old=t},set_color(t,e,i,n){this.setStyleColor("--tcb-main-master-h",t,n),this.setStyleColor("--tcb-main-master-s",e,n),this.setStyleColor("--tcb-main-master-l",i,n)}})},58057:(t,e,i)=>{!function(e){const n=i(56164);t.exports=n.extend({_template:TVE.tpl("controls/drop-panel-light"),initialize(t){t.model.config.items=this.getItems(),n.prototype.initialize.call(this,t),this.$el.addClass("tcb-style-wrap"),TVE.CONST.landing_page&&this.$el.addClass("tve_lp").attr("id","tcb_landing_page"),TVE.add_action("global_styles.text.update",()=>{this.model.config.items=this.getItems(),this.render(),this.$("."+this.box_class()).scrollbar({disableBodyScroll:!0})})},getItems:()=>[{name:TVE.CONST.landing_page?TVE.t.lp_default:TVE.t.State_Default,cls:"",id:""}].concat(TVE.CONST.global_styles.text.filter(t=>"p"===t.attr.tag)),item_template:()=>TVE.tpl("controls/typography/paragraph-style-picker-item"),box_class:()=>"tve-style-options",container_class:()=>"",update(){const t=(TVE.ActiveElement.tcbJsonData("child-styles").text||{}).p||"";if(this.$(".tve-select-item").removeClass("active").filter(`[data-value="${t}"]`).addClass("active"),this.model.selected_old=this.model.selected=t,this.selectedStyle=_.findWhere(this.model.config.items,{id:t}),this.parent_control){const t=this.selectedStyle&&this.selectedStyle.name||this.model.config.default_label;this.parent_control.set_value(t)}},onOpen(){},input(){const t=TVE.ActiveElement.tcbJsonData("child-styles")||{};e.extend(!0,t,{text:{p:this.model.selected}}),TVE.ActiveElement.tcbJsonData("child-styles",t),this.selectedStyle=_.findWhere(this.model.config.items,{id:this.model.selected}),TVE.ActiveElement.applyChildrenGlobalStyle()},clear(){this.model.selected="",this.input()},apply(){this.trigger("change",this.model.selected,this),this.component.update()},cancel(){this.model.selected=this.model.selected_old,this.input()}})}(jQuery)},74144:t=>{var e;e=jQuery,t.exports={toFixed:(t,e=1)=>Number(Math.round(parseFloat(t)+"e"+e)+"e-"+e),getRealSelector(t,e=[" strong",".tve-state-active",".tve-state-expanded",".tcb-states"]){let i="(:hover|:active|:after|:focus|:visited|::after|:before|::before|::placeholder";e.length&&(i+=`|${e.join("|")}`),i+=")";const n=TVE.apply_filters("tcb.css.selector.strip",new RegExp(i,"g"));return(t.selectorText||t).replace(n,"")},elementForSuffix(t,i=""){if(!i||_.isEmpty(i))return t._tve_selector="",t;const n=i=>{if(!i.trim())return t._tve_selector="",[t,""];const n=i;if(i.includes("::placeholder"))return[e(),""];if((i=this.getRealSelector(i,[])).length<2)return t._tve_selector=n,[t,n];let s=t;if(".#:[".includes(i.charAt(0))){const t=i.split(" ");s=s.filter(t.shift()),i=t.join(" ")}return s=i?s.find(i):s,s._tve_selector=n,[s,n]};if(Array.isArray(i)){let e=t.constructor(),s=!1;return i.forEach(t=>{const[i,o]=n(t);i.length&&!1===s&&(s=o),e=e.add(i)}),e._tve_selector=s,e}return n(i)[0]},deepGet(t,e,i=null){if(!t)return i;_.isString(e)&&(e=e.split("."));let n,s=t;for(;e.length;){if(n=e.shift(),void 0===s[n])return i;s=s[n]}return s},filterObjectPropertiesByKey:(t={},e=[])=>Object.keys(t).filter(t=>e.includes(t)).reduce((e,i)=>(e[i]=t[i],e),{}),validateConfigElement:(t={},e={})=>0===Object.keys(e).map(i=>[i,(0,e[i])(t[i])]).reduce((t,e)=>(!1===e[1]&&t.push(new Error(`${e[0]} is invalid.`)),t),[]).length,getStyleBySelector(t,e,i=!1){if(t&&t.cssRules)for(let n=t.cssRules.length-1;n>=0;n--){const s=t.cssRules[n];if(s.selectorText===e||i&&s.selectorText.includes(e))return s.style}return null},ensurePromise:t=>t&&"function"==typeof t.then?t:new Promise(t=>{t()}),getElementForDataSelector(t){const e=t.attr("data-selector"),i=t=>{if(t.is(e))return t;let i=t.find(e);return i.length||(i=t.parent().find(e)),i};return e&&(TVE.main.EditMode.in_edit()?(!(t=i(TVE.main.EditMode.element())).length&&TVE.main.EditMode.isStacked()&&(t=i(TVE.main.EditMode.getOuterMostElement())),0===t.length&&(t=TVE.inner_$(e))):t=TVE.inner_$(e)),t},initControls(t){const e={};return t.find(".tve-control").each((t,i)=>{const n=i.dataset.key||i.dataset.view;e[n]=new TVE.Views.Controls[i.dataset.view]({el:i,model:{config:i.dataset}})}),e}}},75024:(t,e,i)=>{function n(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach(function(e){o(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function o(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}t.exports={"tcb.includes":t=>(t.Views.Components=s(s({},t.Views.Components),i(36976)),t),tcb_filter_html_before_save:t=>{const e=t.find(TVE.identifier("notification"));return e.attr("data-timer")<0&&e.attr("data-timer",3e3),t.find(".notification-edit-mode").removeClass("notification-edit-mode"),t.find(".tve_no_icons").removeClass("tve_no_drag tve_no_icons"),t},tcb_save_post_data_after:t=>("tve_notifications"===TVE.CONST.post.post_type&&TVE.$.ajax({url:ajaxurl,type:"post",data:{action:"notification_update_template",post_id:t.post_id}}),t),only_inner_drop:t=>t+",.notifications-content","tve.drag.position.insert":(t,e,i)=>(i.is(".notifications-content")&&(t="mid"),t),"tve.insert.near.target":t=>(t.is(TVE.identifier("notification"))&&(t=t.find(`.notifications-content.notification-${t.attr("data-state")}`)),t),"tve.edit.mode.refocus":()=>!1,tcb_head_css_prefix:(t,e)=>(e.parents(".notifications-content-wrapper").length>0&&!e.is(".notifications-content,.thrv-notification_message,.notifications-content-wrapper")&&(t=`.notification-${TVE.FLAGS.notification_state||TVE.inner_$(TVE.identifier("notification")).attr("data-state")} `),t),"tcb.cloud_templates.notification":t=>{const e={id:"-1",name:"Default Notifications",local:!0,thumb:`${TVE.CONST.plugin_url}editor/css/images/notification_template_default.jpg`,thumb_size:{w:655,h:326},v:1};return t.unshift(e),t},"tcb.cloud_template.notification":(t,e)=>e<0&&{content:`${TVE.tpl("elements/notification")()}`,custom_css:"",head_css:"",id:"-1",name:"Default Notifications",type:"notification",v:1}}},89926:(t,e,i)=>{const n=i(74144),s=Backbone.Model.extend({defaults:()=>({raw:"",value:"",uom:"px"}),initialize(t){"string"==typeof t&&(t=s.parse(t)),Object.assign(this.attributes,t)},is_empty(){const t=this.get("raw");return!t||"none"===t||""===t||"auto"===t||"unset"===t},is_valid(){return!!this.is_empty()||!isNaN(this.get("value"))&&this.get("uom")},get_value(t){return this.is_empty()||!this.is_valid()?"auto":(void 0===t&&(t=1),"px"===this.get("uom")&&(t=0),n.toFixed(this.get("value"),t))},get_real_value(t){const e=this.get("value");return void 0===t?e:isNaN(e)?t:e},get_css_value(t){return(this.is_empty()?"unset":this.get("value")+this.get("uom"))+(t?" !important":"")},reset(t){return Object.assign(this.attributes,s.parse(t)),this.trigger("change"),this},set(t,e,i){return"uom"===t?this.convert_to(e,i):Backbone.Model.prototype.set.apply(this,arguments)},value_in_px(t){return"px"===this.get("uom")?this.get_real_value():this.get_real_value()*o[this.get("uom")](t)},convert_to(t,e){if(!this.is_empty()&&this.is_valid()){let i=this.value_in_px(e);"px"!==t&&(i/=o[t](e)),this.set("value",i)}return Backbone.Model.prototype.set.apply(this,["uom",t,e]),this},is_positive(){return this.get_real_value()>0},is_negative(){return this.get_real_value()<0},is_non_negative(){return this.get_real_value()>=0},is_non_positive(){return this.get_real_value()<=0},getValueIn(t,e,i=2){if(this.is_empty()||!this.is_valid())return this.get("raw");if(i="px"===t?0:i,this.get("uom")===t)return this.get_value(i);let s=this.value_in_px(e);return"px"!==t&&(s/=o[t](e)),n.toFixed(s,i)},toString(){return this.get_css_value()}},{parse(t){t=(t||"").replace(/!(\s*)important/,"").trim();const e=new RegExp("("+Object.keys(o).join("|")+")$").exec(t),i={raw:t};return e&&e[1]&&(i.uom=e[1]),t=t.replace(i.uom,""),i.value=isNaN(t)?t:parseFloat(t),i}});t.exports=s;const o={px:()=>1,"%":t=>t.parent_size/100,vw:()=>TVE.inner.window.innerWidth/100,vh:()=>TVE.inner.window.innerHeight/100,em:t=>parseInt(t.em_size),rem:()=>parseInt(TVE.inner_$("html").css("font-size"))}},95488:(t,e,i)=>{const{applyDefaultRules:n,initializeNotificationEditor:s,_updateMainFrameVars:o,updatePreviewLink:a,updateNotificationSidebarOptions:r}=i(8382);t.exports={"tcb-ready":()=>{const t=TVE.inner_$(TVE.identifier("notification")),e=t.find(".notifications-content");t.addClass("thrv_wrapper"),e.removeClass("thrv_wrapper"),void 0===t.attr("data-ct")&&t.attr({"data-ct":"notification-0","data-ct-name":"Default notification"});const i=t.attr("data-state");TVE.Editor_Page.focus_element(t),s(i),o(i),a();const r=["text","image","button","columns","contentbox","divider","icon","notification_message"],l=Object.keys(TVE.Elements).filter(t=>!r.includes(t));TVE.main.sidebar_toggle_elements(l,!1),0===TVE.stylesheet.cssRules.length&&n(!0)},"tcb.element.focus":t=>{const e=t.is(TVE.identifier("notification"));e&&(TVE.Components.layout.disable_extra_controls(["top","right","bottom","left"].map(t=>"margin-"+t)),r(TVE.$body.hasClass("edit-mode-active"))),TVE.Components.layout.$el.find('.tve-control[data-prop="width"] .tve-input-um[data-value="%"]').toggle(!e),TVE.main.$(".tve-active-element").addClass("no-states")},"tcb.after-insert":t=>{t.is(".thrv-notification_message")&&t.addClass("tcb-selector-no_save tcb-selector-no_clone"),TVE.main.$(".tve-active-element").addClass("no-states")},tcb_after_cloud_template:t=>{t.is(TVE.identifier("notification"))&&(t.addClass("notification-edit-mode"),a(t.attr("data-state")),s(t.attr("data-state")),"notification--1"===t.attr("data-ct")&&n(!1))}}}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,i),o.exports}jQuery(window).on("tcb.register-hooks",()=>{_.each(i(75024),(t,e)=>{TVE.add_filter(e,t)}),_.each(i(95488),(t,e)=>{TVE.add_action(e,t)})})})();