import{f as b,i as g,j as r,U as V,a0 as c,v as n,au as C,R as S,P as y,ao as P,ap as x,an as f,h}from"./js/vendor-vue-ui.de3ab35f.js";import{l as E}from"./js/index.faac30d2.js";import{l as v}from"./js/index.d71ed80b.js";import{e as d,aU as k,m as w,u as A,l as T}from"./js/app-core.a6d808ce.js";import{h as B}from"./js/helpers.a3c68658.js";import{k as D}from"./js/vendor-lodash.8e35bd59.js";import{V as L,_ as $,a as R}from"./js/vendor-other.7b559694.js";import{_ as j}from"./js/App.6e23fe0d.js";import{_ as U}from"./js/ScoreButton.3b868378.js";import{S as N}from"./js/LogoGear.6afc7f21.js";import"./js/Button.a549093d.js";import"./js/_plugin-vue_export-helper.eefbdd86.js";import"./js/Input.77b5ee76.js";import"./js/Index.52399193.js";import"./js/Close.098d4b76.js";import"./js/Pencil.405b16d2.js";import"./js/Trash.d35f8063.js";import"./js/Select.a288249f.js";import"./js/Caret.a017b70a.js";import"./js/Toggle.26ac9b1a.js";/* empty css                */import"./js/ScrollAndHighlight.3b248cee.js";import"./js/ScrollTo.f4df02aa.js";import"./js/LicenseKeyBar.a2fd2799.js";import"./js/vendor-phone.8b9bc15d.js";import"./js/icon.5572a14b.js";import"./js/Tabs.c5d4ce83.js";import"./js/ProBadge.fd60f711.js";import"./js/Information.278772ab.js";import"./js/Slide.e6618126.js";import"./js/Index.16a854da.js";import"./js/SettingsRow.0c329e43.js";import"./js/Row.6337df55.js";import"./js/Settings.9925e4db.js";import"./js/Build.693cf766.js";import"./js/AiContent.ac754618.js";import"./js/Suggestion.94b951e4.js";let p={};const m=()=>{const t={...p},e=k();D(t,e)||(p=e,w())},O=()=>{TVE.add_action("tcb-ready",m),["tcb.after-insert","tcb.element.remove","tcb.element.duplicate","tcb.froala.focus","tcb.froala.blur","tcb.image.change","after_undo_redo"].forEach(t=>{TVE.add_action(t,()=>{d(m,200)})}),TVE.add_action("tve.save_post.success",()=>{d(B,100)})};let i=!1;const M=()=>{TVE.$("#sidebar-top, #aioseo-score-btn-settings").on("click",".aioseo-score-button",()=>{const t=document.querySelector(".tcb-sidebar-icon-aioseo"),e=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});t?.dispatchEvent(e)}),TVE.$("#settings-action-btn").on("click",()=>{i=!i,TVE.$(".tcb-aioseo #settings-action-btn").toggleClass("active",i),TVE.$body.toggleClass("aioseo-settings-enabled",i),TVE.ajax("update_option","post",{option_name:"is_aioseo_settings_enabled",option_value:i}).done(()=>{})})},q=()=>{TVE.add_action("tcb.drawer.toggle",t=>{t==="settings"&&setTimeout(()=>{const e=TVE.$("#aioseo-panel"),o=TVE.$(".tcb-sidebar-icon-aioseo").hasClass("active");o?e.show():e.hide(),u(o)},100)}),TVE.add_action("tcb.drawer.hide",()=>{setTimeout(()=>{const t=TVE.$(".tcb-sidebar-icon-aioseo").hasClass("active");u(t)},110)})},u=t=>{TVE.$("#aioseo-score-btn-header .aioseo-score-button").toggleClass("aioseo-score-button--active",t),TVE.$body.toggleClass("aioseo-settings-active",t)},H=()=>{if(TVE.$("#aioseo-panel").length)return;const t=TVE.$(".settings"),e=TVE.$("<div>",{id:"aioseo-panel"}).hide();t.append(e)},W=()=>{if(TVE.$("#aioseo-score-btn-header").length)return;const t=TVE.$("#tcb-sidebar-top-right .button-group"),e=TVE.$("<div>",{id:"aioseo-score-btn-header"});t.append(e)},z=()=>{i=TVE.CONST.is_aioseo_settings_enabled==="true"||TVE.CONST.is_aioseo_settings_enabled==="1",i&&(TVE.$(".tcb-aioseo #settings-action-btn").addClass("active"),TVE.$body.addClass("aioseo-settings-enabled")),TVE.$("html").attr("dir",L()?"rtl":"ltr"),TVE.$("body").addClass("wp-core-ui"),TVE.$("html").removeClass("no-js").addClass("js"),H(),W(),q(),M()},a={id:"aioseo-limit-modified-date-thrive",param:"aioseo_limit_modified_date",title:$("Save (Don't Modify Date)","all-in-one-seo-pack"),flag:!1},G=()=>{TVE.$("#tve-save-dash-return").after(`
		<a
			href="javascript:void(0)"
			id="${a.id}"
			title="${a.title}"
		>
			${a.title}
		</a>
	`)},F=()=>{TVE.add_filter("tcb_save_post_data_before",t=>(t[a.param]=a.flag,t)),TVE.add_action("tve.save_post.success",()=>{a.flag=!1}),TVE.$body.on("click",`#${a.id}`,()=>{a.flag=!0,TVE.main.editor_settings.save()})},I=()=>{G(),F()},J={class:"edit-post-sidebar editor-sidebar aioseo-thrive-sidebar"},K={class:"aioseo-thrive-sidebar__header"},Q={class:"aioseo-thrive-sidebar__header-title"},X={class:"aioseo-thrive-sidebar__content"},_={__name:"Sidebar",setup(t){const o={headerTitle:R($("%1$s Settings","all-in-one-seo-pack"),"AIOSEO")};return(s,l)=>(b(),g("div",J,[r("div",K,[r("div",Q,V(o.headerTitle),1)]),r("div",X,[c(n(j))])]))}},Y={class:"aioseo-thrive-score-button"},Z={__name:"Button",props:{buttonContext:{type:String}},setup(t){const{currentPost:e}=C(A());return(o,s)=>(b(),g("div",Y,[c(n(U),{score:n(e).seo_score,class:y([t.buttonContext==="Settings"?"aioseo-score-button--active":""])},{icon:S(()=>[c(n(N))]),_:1},8,["score","class"])]))}},tt=()=>{const t=P({history:x(),routes:[{path:"/",component:_}]});let e=f({name:"Standalone/ThriveArchitect",data(){return{tableContext:window.aioseo.currentPost.context,screenContext:"sidebar"}},render:()=>h(_)});e=E(e),e=v(e),e.use(t),t.app=e,T(e,t),e.mount("#aioseo-panel")},et=()=>{["aioseo-score-btn-settings","aioseo-score-btn-header"].forEach(e=>{const o=e.replace("aioseo-score-btn-","").replace(/^\w/,l=>l.toUpperCase());let s=f({name:`Standalone/ThriveArchitect/Score${o}`,render:()=>h(Z)},{buttonContext:o});s=E(s),s=v(s),T(s),s.mount(`#${e}`)})},ot=()=>{z(),tt(),et(),I(),O()};ot();
