Your IP : 216.73.216.162


Current Path : /home/x/b/o/xbodynamge/namtation/wp-content/
Upload File :
Current File : /home/x/b/o/xbodynamge/namtation/wp-content/helpers.da4c5c22.js.tar

home/xbodynamge/dev/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/js/helpers.da4c5c22.js000064400000116164151143322070026614 0ustar00var qe=Object.defineProperty;var Ie=(e,t,s)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var T=(e,t,s)=>Ie(e,typeof t!="symbol"?t+"":t,s);import{q as $e,d as Be,e as m,c as C,h as q,a as I,m as Le,i as b,s as oe,u as $,I as De,F as S,y as v,z as x,D as B,X as L,C as D,Y as R,Z as U,B as J,A as K,_ as Y}from"./index.4fea5b8a.js";import{d as re}from"./Caret.7cc96622.js";import{s as Re}from"./metabox.5993e7e8.js";import{c as G}from"./cleanForSlug.2f987c7a.js";import{g as ie,a as ce}from"./contentHasAssets.e1428256.js";import{a as Ue,g as E}from"./_baseSet.a1a8944e.js";import{I as Je}from"./helpers.114e9c35.js";import"./translations.d159963e.js";import{_ as p}from"./default-i18n.20001971.js";import{e as de}from"./regex.8a6101c0.js";import{n as me,g as Ke,aT as ae}from"./runtime-dom.esm-bundler.baf35205.js";function je(e,t,s){return e==null?e:Ue(e,t,s)}const d="all-in-one-seo-pack",We=()=>{const e=[{slug:"article",graphName:"Article",label:p("Article",d)},{slug:"book",graphName:"Book",label:p("Book",d)},{slug:"course",graphName:"Course",label:p("Course",d)},{slug:"dataset",graphName:"Dataset",label:p("Dataset",d)},{slug:"event",graphName:"Event",label:p("Event",d)},{slug:"faq-page",graphName:"FAQPage",label:p("FAQ",d)},{slug:"fact-check",graphName:"FactCheck",label:p("Fact Check",d)},{slug:"how-to",graphName:"HowTo",label:p("How To",d)},{slug:"job-posting",graphName:"JobPosting",label:p("Job Posting",d)},{slug:"movie",graphName:"Movie",label:p("Movie",d)},{slug:"music",graphName:"Music",label:p("Music",d)},{slug:"person",graphName:"Person",label:p("Person",d)},{slug:"product",graphName:"Product",label:p("Product",d)},{slug:"product-review",graphName:"ProductReview",label:p("Product Review",d)},{slug:"car",graphName:"Car",label:p("Car",d)},{slug:"recipe",graphName:"Recipe",label:p("Recipe",d)},{slug:"service",graphName:"Service",label:p("Service",d)},{slug:"software-application",graphName:"SoftwareApplication",label:p("Software",d)},{slug:"video",graphName:"Video",label:p("Video",d)},{slug:"web-page",graphName:"WebPage",label:p("Web Page",d)}],t={Article:[{childGraphName:"BlogPosting",label:p("Blog Post",d)},{childGraphName:"NewsArticle",label:p("News Article",d)}],Music:[{childGraphName:"MusicAlbum",label:p("Music Album",d)},{childGraphName:"MusicGroup",label:p("Music Group",d)}],WebPage:[{childGraphName:"WebPage",label:p("Web Page",d)},{childGraphName:"AboutPage",label:p("About Page",d)},{childGraphName:"CheckoutPage",label:p("Checkout Page",d)},{childGraphName:"CollectionPage",label:p("Collection Page",d)},{childGraphName:"ContactPage",label:p("Contact Page",d)},{childGraphName:"ItemPage",label:p("Item Page",d)},{childGraphName:"MedicalWebPage",label:p("Medical Page",d)},{childGraphName:"ProfilePage",label:p("Profile Page",d)},{childGraphName:"RealEstateListing",label:p("Real Estate Listing",d)},{childGraphName:"SearchResultsPage",label:p("Search Results Page",d)}]};return{childGraphs:t,graphs:e,initSchemaEditor:n=>{const o=fe(),c=JSON.stringify(o.graph);o.graph=$e(n,o.graph);const i=JSON.stringify(o.graph);JSON.stringify(c)!==JSON.stringify(i)&&(o.isDirty=!0)},getGraphObject:(n,o=!1)=>{var c;return!o&&((c=n==null?void 0:n.properties)==null?void 0:c.type)!==n.graphName&&t[n.graphName]?t[n.graphName].find(i=>i.childGraphName===n.properties.type):e.find(i=>i.slug===n.slug)},getParentGraphName:n=>{let o="";return Object.entries(t).forEach(c=>{const i=c[0];c[1].forEach(u=>{o||n===u.childGraphName&&(o=i)})}),o||n}}},fe=Be("SchemaStore",{state:()=>({custom:{graphName:"",schema:""},defaultGraphParent:"",graph:null,graphCardsKey:0,isDirty:!1,isEditingCustomGraph:!1,isEditingCustomTemplate:!1,isEditingDefaultGraph:!1,isEditingGraph:!1,isEditingTemplate:!1,modalOpenMetabox:!1,modalOpenSidebar:!1,output:"",outputKey:0,tabs:{generator:"schema-templates",templates:"schema-catalog"},templateName:"",previousOutputRequestData:null}),actions:{getCustomObject(){return{id:"#aioseo-custom-"+new Date().getTime().toString(36),custom:!0,graphName:this.custom.graphName,schema:this.custom.schema}},resetSessionState(){this.custom={graphName:"",schema:""},this.defaultGraphParent="",this.graph=null,this.templateName="",this.isEditingCustomGraph=!1,this.isEditingCustomTemplate=!1,this.isEditingDefaultGraph=!1,this.isEditingGraph=!1,this.isEditingTemplate=!1,this.isDirty=!1},addCustomAsGraph(){const e=m();e.currentPost.schema.customGraphs.push(this.getCustomObject()),e.currentPost.schema.customGraphs=e.currentPost.schema.customGraphs.sort((t,s)=>t.graphName<s.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addCustomAsTemplate(){const e=C(),t={...this.getCustomObject()},s={...JSON.parse(JSON.stringify(t)),label:"Custom Schema - "+t.graphName};e.internalOptions.internal.schema.templates.push(this.getCustomObject()),this.resetSessionState(),this.setTabTemplates("your-templates"),q.post(I.restUrl("schema/templates")).send({template:s}).then(a=>{a.body.success&&a.body.templates&&this.parseAndUpdateTemplates(a.body.templates)})},addCustomTemplateAsGraph(){const e=m();e.currentPost.schema.customGraphs.push(this.graph),e.currentPost.schema.customGraphs=e.currentPost.schema.customGraphs.sort((t,s)=>t.graphName<s.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addDefaultGraph(){const e=m();e.currentPost.schema.default.isEnabled=!0,this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addGraph(){const e=m();e.currentPost.schema.graphs.push(this.graph),e.currentPost.schema.graphs=e.currentPost.schema.graphs.sort((t,s)=>t.graphName<s.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addGraphAsTemplate(){var a,r,n,o,c;const e=We();(r=(a=this.graph)==null?void 0:a.properties)!=null&&r.type&&this.graph.properties.type!==this.graph.graphName?this.graph.label=((n=e.getGraphObject(this.graph,!0))==null?void 0:n.label)+" - "+((o=e.getGraphObject(this.graph))==null?void 0:o.label)+" - "+this.templateName:this.graph.label=((c=e.getGraphObject(this.graph,!0))==null?void 0:c.label)+" - "+this.templateName;const t=JSON.parse(JSON.stringify(this.graph));C().internalOptions.internal.schema.templates.push(this.graph),this.resetSessionState(),this.setTabTemplates("your-templates"),q.post(I.restUrl("schema/templates")).send({template:t}).then(i=>{i.body.success&&i.body.templates&&this.parseAndUpdateTemplates(i.body.templates)})},addTemplateAsGraph(e,t=""){let a=C().internalOptions.internal.schema.templates;if(t){const o=new RegExp(de(t).replace(/\s/g,"\\s"),"i");a=a.filter(c=>{var i;return(i=c==null?void 0:c.label)==null?void 0:i.match(o)})}e===void 0&&(e=a.findIndex(o=>o.id===this.graph.id));const r=JSON.parse(JSON.stringify(a[e]));r.id=r.id+new Date().getTime().toString(18);const n=m();r.custom?(n.currentPost.schema.customGraphs.push(r),n.currentPost.schema.customGraphs=n.currentPost.schema.customGraphs.sort((o,c)=>o.graphName<c.graphName?-1:1)):(n.currentPost.schema.graphs.push(r),n.currentPost.schema.graphs=n.currentPost.schema.graphs.sort((o,c)=>o.graphName<c.graphName?-1:1)),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteCustomGraph(e){const t=m();e===void 0&&(e=t.currentPost.schema.customGraphs.findIndex(s=>s.id===this.graph.id)),t.currentPost.schema.customGraphs.splice(e,1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteDefaultGraph(){const e=m();e.currentPost.schema.default.isEnabled=!1,this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteGraph(e){const t=m();e===void 0&&(e=t.currentPost.schema.graphs.findIndex(s=>s.id===this.graph.id)),t.currentPost.schema.graphs.splice(e,1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteTemplate(e){const t=this.graph.id,s=C();e===void 0&&(e=s.internalOptions.internal.schema.templates.findIndex(a=>a.id===t)),s.internalOptions.internal.schema.templates.splice(e,1),this.resetSessionState(),this.setTabTemplates("your-templates"),q.delete(I.restUrl("schema/templates")).send({templateId:t}).then(a=>{a.body.success&&a.body.templates&&this.parseAndUpdateTemplates(a.body.templates)})},editCustomGraph({customGraphIndex:e,isSidebar:t}){const s=m(),a=JSON.parse(JSON.stringify(s.currentPost.schema.customGraphs[e]));this.graph=a,this.isEditingCustomGraph=!0,this.tabs.generator="custom-schema",t?this.modalOpenSidebar=!0:this.modalOpenMetabox=!0},editDefaultGraph({isSidebar:e,parentGraphName:t}){this.defaultGraphParent=t;const s=m();s.currentPost.schema.default.data[t]&&(this.graph=s.currentPost.schema.default.data[t]),this.isEditingDefaultGraph=!0,this.tabs.generator="schema-templates",e?this.modalOpenSidebar=!0:this.modalOpenMetabox=!0},async editGraph({graphIndex:e,isSidebar:t}){const s=m(),a=JSON.parse(JSON.stringify(s.currentPost.schema.graphs[e]));this.graph=a,this.isEditingGraph=!0,this.tabs.generator="schema-templates",t?this.modalOpenSidebar=!0:this.modalOpenMetabox=!0,await me(),this.isDirty=!1},async editTemplate(e,t=""){let a=C().internalOptions.internal.schema.templates;if(t){const n=new RegExp(de(t).replace(/\s/g,"\\s"),"i");a=a.filter(o=>o.label.match(n))}const r=JSON.parse(JSON.stringify(a[e]));if(this.graph=r,r.custom)this.templateName=this.graphName,this.isEditingCustomTemplate=!0,this.tabs.generator="custom-schema";else{const n=new RegExp(`^${this.graph.graphName} -`,"i"),o=this.graph.label.replace(n,"");this.templateName=o,this.isEditingTemplate=!0}await me(),this.isDirty=!1},updateCustomGraph(){const e=m(),t=e.currentPost.schema.customGraphs.findIndex(s=>s.id===this.graph.id);t!==-1&&(e.currentPost.schema.customGraphs[t]=this.graph,e.currentPost.schema.customGraphs=e.currentPost.schema.customGraphs.sort((s,a)=>s.graphName<a.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1)},updateDefaultGraph(){const e=m();e.currentPost.schema.default.data[this.defaultGraphParent]=this.graph,this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},updateGraph(){const e=m(),t=e.currentPost.schema.graphs.findIndex(s=>s.id===this.graph.id);t!==-1&&(e.currentPost.schema.graphs[t]=this.graph,e.currentPost.schema.graphs=e.currentPost.schema.graphs.sort((s,a)=>s.graphName<a.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1)},updateSchemaOutput(){const e=m();if(Le().isUnlicensed)return;let s=e.currentPost.id;if(b()&&(s=window.wp.data.select("core/editor").getCurrentPostId()),!s||e.currentPost.context!=="post")return;const a={postId:s,graphs:e.currentPost.schema.graphs,customGraphs:e.currentPost.schema.customGraphs,default:e.currentPost.schema.default,blockGraphs:e.currentPost.schema.blockGraphs};JSON.stringify(a)!==this.previousOutputRequestData&&(this.previousOutputRequestData=JSON.stringify(a),q.post(I.restUrl("schema/validator/output")).send(a).then(r=>{if(r.body.success&&r.body.output){let n=null;try{n=JSON.parse(r.body.output)}catch{return}if(r.body.output=JSON.stringify(n,null,"	").trim(),r.body.output===this.output)return;this.output=r.body.output,this.outputKey=this.outputKey+1}}))},updateTemplate(){this.graph.label=this.graph.graphName+" - "+this.templateName;const e=JSON.parse(JSON.stringify(this.graph)),t=C(),s=t.internalOptions.internal.schema.templates.findIndex(a=>a.id===this.graph.id);s!==-1&&(t.internalOptions.internal.schema.templates[s]=this.graph,this.resetSessionState(),this.setTabTemplates("your-templates"),q.put(I.restUrl("schema/templates")).send({template:e}).then(a=>{a.body.success&&a.body.templates&&this.parseAndUpdateTemplates(a.body.templates)}))},parseAndUpdateTemplates(e){e=e.map(s=>(typeof s!="string"||(s=JSON.parse(s)),s)),e=e.sort((s,a)=>{const r=s.custom?0:1;return s.graphName<a.graphName?-1:r});const t=C();t.internalOptions.internal.schema.templates=e},setModalOpen({isOpen:e,initialTab:t,isSidebar:s}){e||(this.resetSessionState(),this.setTabTemplates("schema-catalog")),s?this.modalOpenSidebar=e:this.modalOpenMetabox=e,t&&(this.tabs.generator=t)},setTabTemplates(e){this.tabs.generator="schema-templates",this.tabs.templates=e}}}),le=(e,t="div")=>{const s=document.createElement(t);return s.innerHTML=De(e.trim()),s},te=(e,t=!0,s="textContent")=>(typeof e=="string"&&(t&&(e=e.replace(/[\t|\n]/gm,"")),e=le(e)),e[s]||e.textContent||e.innerText||""),Kt=e=>(typeof e=="string"&&(e=le(e)),(e==null?void 0:e.outerText)??""),jt=(e,t=200,s="&hellip;")=>e&&(t<e.length&&(e=e.substring(0,t).trim()+oe(s)),e),Wt=(e,t)=>{try{const s=JSON.parse(t);return s?s["@type"]&&(e===s["@type"]||Array.isArray(s["@type"])&&s["@type"].includes(e))?s:Array.isArray(s["@graph"])&&s["@graph"].find(r=>Array.isArray(r["@type"])?r["@type"].includes(e):r["@type"]===e)||!1:!1}catch{return!1}},Ht=()=>{var e;return{url:window.location.href,title:document.title||"",description:((e=document.querySelector('meta[name="description"]'))==null?void 0:e.content)||""}},zt=()=>{var t,s,a,r;const e={description:((t=document.querySelector('meta[property="og:description"]'))==null?void 0:t.content)||"",image:((s=document.querySelector('meta[property="og:image"]'))==null?void 0:s.content)||"",title:((a=document.querySelector('meta[property="og:title"]'))==null?void 0:a.content)||"",type:((r=document.querySelector('meta[property="og:type"]'))==null?void 0:r.content)||""};if(!e.title&&(e.title=document.title||"",!e.title)){const n=$();e.title=n.aioseo.urls.domain}return e},Vt=()=>{var e,t,s,a;return{card:((e=document.querySelector('meta[name="twitter:card"]'))==null?void 0:e.content)||"",description:((t=document.querySelector('meta[name="twitter:description"]'))==null?void 0:t.content)||"",image:((s=document.querySelector('meta[name="twitter:image"]'))==null?void 0:s.content)||"",title:((a=document.querySelector('meta[name="twitter:title"]'))==null?void 0:a.content)||""}},He=e=>{var s;if(typeof(window==null?void 0:window.acf)!="object"||typeof((s=window.acf)==null?void 0:s.getField)!="function")return null;const t=window.acf.getField(e)||{};return typeof(t==null?void 0:t.val)!="function"?null:t.val()||{}},ye=()=>{const t=m().currentPost.postType;if(!t)return"";const a=C().dynamicOptions.searchAppearance.postTypes[t].customFields;if(!a||!Oe)return"";const r=()=>{M(500)},n=a.replace(/\n/g,",").split(","),o=[],c=["INPUT","TEXTAREA","IMG"];n.forEach(u=>{u=u.trim();const l=document.getElementById(`${u}`)||{},f=document.querySelectorAll("#the-list > tr"),N=document.querySelectorAll(".acf-field");c.includes(l==null?void 0:l.tagName)&&!(l!=null&&l.closest(".acf-field"))?o.push(l):f.forEach(g=>{const h=g.querySelector(`#${g.id}-key`),y=g.querySelector(`#${g.id}-value`);c.includes(y==null?void 0:y.tagName)&&n.includes(h==null?void 0:h.value)&&o.push(y)}),N.forEach(g=>{var y;if(u!==g.dataset.name||g.dataset.type==="repeater"||(y=g.parentNode)!=null&&y.closest(".acf-repeater"))return"";let h=g.querySelector(`[id^="acf"][name$="[${g.dataset.key}]"]`);if(g.dataset.type==="image"&&(h=g.querySelector(".has-value img")),g.dataset.type==="gallery"&&(h=g.querySelector(".acf-gallery-attachment img")),g.dataset.type==="link"&&(h=He(g.dataset.key)||g.querySelector(`[name$="[${g.dataset.key}][url]"]`)||{},h={tagName:"INPUT",type:"url",value:(h==null?void 0:h.url)??(h==null?void 0:h.value)??""}),!h||h.type&&h.type==="hidden")return"";if(g.dataset.type==="wysiwyg"){const P=window.setInterval(()=>{var X,Q;(Q=(X=window.tinyMCE)==null?void 0:X.activeEditor)!=null&&Q.acf&&(window.clearInterval(P),window.tinyMCE.activeEditor.on("keyup",function(){M(500)}),window.tinyMCE.activeEditor.on("PostProcess",function(){re(()=>{M(500)},10)}))},50),Ge=function(X){X.forEach(Q=>{var pe;if(Q.attributeName==="class"&&g.querySelector(".wp-editor-wrap.tmce-active")&&((pe=window.tinyMCE)!=null&&pe.activeEditor)){window.tinyMCE.activeEditor.on("keyup",function(){M(500)});const se=g.querySelector(`[name="acf[${g.dataset.key}]"]`);se&&(se.addEventListener("keyup",()=>{M(500)}),se.addEventListener("paste",()=>{M(500)}))}})},Me=new MutationObserver(Ge),ue=g.querySelector(".wp-editor-wrap");ue&&Me.observe(ue,{attributes:!0})}c.includes(h.tagName)&&o.push(h)})});let i="";return o.forEach(u=>{let l="";if(c.includes(u.tagName)&&typeof(u==null?void 0:u.addEventListener)=="function"&&u.addEventListener("keyup",r),u.value&&(l=u.value),u.tagName==="IMG"&&u.src){const f=u.alt?`alt="${u.alt}"`:"";l=`<img src="${u.src}" ${f}>`}u.value&&u.type&&u.type==="url"&&(l=`<a href="${l}">${l}</a>`),l&&(i+=`${l} `)}),i},ze=(e,t=["INPUT","TEXTAREA","IMG"])=>{if(!e)return"";const s=document.getElementById(`${e}`),a=document.querySelectorAll("#the-list > tr"),r=document.querySelectorAll(".acf-field");let n="";if(s&&t.indexOf(s.tagName)!==-1&&(s.closest(".acf-field")||(n=s.tagName==="IMG"?s.getAttribute("src"):s.value)),a.length&&a.forEach(o=>{const c=o.querySelector(`#${o.id}-key`),i=o.querySelector(`#${o.id}-value`);i&&t.indexOf(i.tagName)!==-1&&c.value===e&&(n=i.tagName==="IMG"?i.getAttribute("src"):i.value)}),r.length){const o=[];r.forEach(c=>{var u;if(e!==c.dataset.name||c.dataset.type==="repeater"||(u=c.parentNode)!=null&&u.closest(".acf-repeater"))return;let i;t.forEach(l=>{const f=l.toLowerCase();i=c.querySelector(`[data-key="${c.dataset.key}"] ${f}`)||i}),i&&o.push(i.tagName==="IMG"?i.getAttribute("src"):i.value)}),n=o.join(" ")}return n},Ve=({separator:e})=>{const t=Ke(e);return{parseTags:a=>{const r=S();return!a||!r.tags?a:(r.tags.forEach(n=>{if(n.id==="custom_field"){const u=new RegExp(`#${n.id}-([a-zA-Z0-9_-]+)`,"g"),l=a.match(u);l&&l.forEach(f=>{const N=new RegExp(`#${n.id}-([a-zA-Z0-9_-]+)`),g=f.match(N);g&&g[1]&&(a=a.replace(N,ze(g[1])))});return}if(n.id==="tax_name"){const u=new RegExp(`#${n.id}-([a-zA-Z0-9_-]+)`,"g");a=a.replace(u,`[${n.name} - $1]`);return}const o=new RegExp(`#${n.id}(?![a-zA-Z0-9_])`,"g");n.id==="separator_sa"&&t.value!==void 0&&(a=a.replace(o,t.value));const c=a.match(o),i=r.liveTags[n.id]||n.value;c&&(a=a.replace(o,"%|%"+i))}),a=a.replace(/%\|%/g,""),oe(a))},separator:t}},Ze=()=>{const e=window.elementor.documents.getCurrent(),t=[];return e.$element?(e.$element.find(".elementor-widget").each((s,a)=>{const r=a.innerHTML.trim().replaceAll(/<div class="elementor-widget-container">(.*)<\/div>/g,"$1").replaceAll(/<p.*>(<img.*>)<\/p>/g,"$1");te(r)===""&&ie(r)===0&&ce(r)===0||t.push(r)}),t.join(" ")):""},j=()=>{var s;const{settings:e,config:t}=window.elementor;return{content:Ze(),title:e.page.model.get("post_title"),excerpt:e.page.model.get("post_excerpt")||"",slug:G(e.page.model.get("post_title")),permalink:t.document.urls.permalink||"",featuredImage:((s=e.page.model.get("post_featured_image"))==null?void 0:s.url)||""}},Fe=()=>{const e=E(ET_Builder,"Frames.app.frameElement",document.querySelector("iframe#et-fb-app-frame"));if(!e)return document.createElement("div");let t=e.contentWindow.document.querySelectorAll("#et-fb-app");return 1<t.length&&(t=[...t].filter(s=>s.classList.contains("et-fb-root-ancestor"))),t[0]||document.createElement("div")},Xe=()=>{const e=[],t=Fe().querySelectorAll(".et_pb_section"),s=new RegExp(["<style.*?</style>","\\[object Object\\]"].join("|"),"gi");for(const a of t){const r=a.innerHTML.replace(s,"").replaceAll(/<p.*>(<img.*>)<\/p>/g,"$1");te(r)===""&&ie(r)===0&&ce(r)===0||e.push(r)}return e.join(" ")},Qe=()=>{const e=new URL(E(ETBuilderBackendDynamic,"currentPage.permalink",""));return e.searchParams.delete("PageSpeed"),e.href},Ye=async()=>{const{wp:e}=window,t=E(ETBuilderBackendDynamic,"currentPage.thumbnailId",0);if(!e||t===0)return"";const s=e.media.attachment(t);let a="";return await s.fetch().then(()=>{a=s.get("url"),je(ETBuilderBackendDynamic,"currentPage.thumbnailUrl",a)}),a},W=()=>{const e=E(ETBuilderBackendDynamic,"postMeta.post_name","")||G(E(ETBuilderBackendDynamic,"postTitle",""));return{content:Xe(),title:E(ETBuilderBackendDynamic,"postTitle",""),excerpt:E(ETBuilderBackendDynamic,"postMeta.post_excerpt",""),slug:e,permalink:Qe(),featuredImage:Ye()}},et=e=>{let t;switch(e.type){case"header":t=document.createElement(e.settings.tag),t.innerHTML=e.settings.headerTxt.trim();break;case"image":const s=document.createElement("img");e.settings.altTxt&&s.setAttribute("alt",e.settings.altTxt),e.settings.src&&s.setAttribute("src",e.settings.src),e.settings.noFollow&&s.setAttribute("rel","nofollow"),t=s,e.settings.link&&(t=document.createElement("a"),t.setAttribute("href",e.settings.link),t.innerHTML=s.outerHTML,e.settings.noFollow&&t.setAttribute("rel","nofollow"),e.settings.openNewWindow&&t.setAttribute("target","_blank"));break;case"video":e.settings.type==="youtube"?(t=document.createElement("iframe"),t.setAttribute("src",e.settings.youtubeUrl)):(t=document.createElement("div"),t.innerHTML=e.settings.code);break;case"text":t=document.createElement("div"),t.innerHTML=e.settings.txt.trim();break;case"button":t=document.createElement("a"),t.appendChild(document.createTextNode(e.settings.btnTxt+" "+e.settings.btnSubTxt)),e.settings.link&&t.setAttribute("href",e.settings.link),e.settings.altTxt&&t.setAttribute("alt",e.settings.altTxt),e.settings.src&&t.setAttribute("src",e.settings.src),e.settings.noFollow&&t.setAttribute("rel","nofollow"),e.settings.openNewWindow&&t.setAttribute("target","_blank");break;case"bullet-list":t=document.createElement("ul"),e.settings.items.forEach(a=>{const r=document.createElement("li");r.innerHTML=a.txt,t.appendChild(r)});break;case"custom-html":t=document.createElement("div"),t.innerHTML=e.settings.code;break}return t},tt=()=>{const e=[];return JSON.parse(JSON.stringify(E(seedprod_data,"settings.document.sections",[]))).forEach(s=>{s.rows.forEach(a=>{a.cols.forEach(r=>{r.blocks.forEach(n=>{const o=et(n);o&&(te(o)===""&&ie(o)===0&&ce(o)===0||e.push(o.outerHTML))})})})}),e.join(" ")},st=()=>{const e=E(seedprod_data,"home_url",""),t=E(seedprod_data,"settings.post_name","");return`${e}/${t}/`},H=()=>({content:tt(),title:E(seedprod_data,"settings.post_title",""),excerpt:"",slug:E(seedprod_data,"settings.post_name",""),permalink:st()}),at=()=>m().currentPost.processedContent,ge=e=>{var t,s;if(e==="admin_frontend_editor"){const{vc:a}=window;return a.builder.getTitle()||((t=document.querySelector("#vc_page-title-field"))==null?void 0:t.value)}return((s=document.getElementById("#title"))==null?void 0:s.value)||""},rt=e=>{var t,s;if(e==="admin_frontend_editor"){const{vc_iframe_src:a}=window,r=new URL(a).pathname.split("/").filter(n=>n);return r[r.length-1]||((t=document.querySelector("#vc_post_name"))==null?void 0:t.value)}return((s=document.querySelector("#post_name"))==null?void 0:s.value)||""},nt=e=>{var t;if(e==="admin_frontend_editor"){const{vc_iframe_src:s}=window;return s.replace(new URL(s).search,"")}return((t=document.querySelector("#sample-permalink a"))==null?void 0:t.href)||""},z=()=>{const{vc_mode:e}=window,t=rt(e)||G(ge(e));return{content:at(),title:ge(e),excerpt:"",slug:t,permalink:nt(e),featuredImage:""}},ot=()=>{var t;return((t=m().currentPost)==null?void 0:t.processedContent)||""},it=()=>{var t;const{FusionApp:e}=window;return(e==null?void 0:e.getPost("post_title"))||((t=document.getElementById("#title"))==null?void 0:t.value)||""},ct=()=>{var t;const{FusionApp:e}=window;return(e==null?void 0:e.getPost("post_name"))||((t=document.querySelector("#post_name"))==null?void 0:t.value)||""},lt=()=>{var t;const{FusionApp:e}=window;return(e==null?void 0:e.getPost("post_permalink").replace("?fb-edit=1",""))||((t=document.querySelector("#sample-permalink a"))==null?void 0:t.href)||""},ut=async()=>{const{wp:e,FusionApp:t}=window;if(!e||!t||!t.getDynamicPost("post_meta")._thumbnail_id)return"";const s=e.media.attachment(t.getDynamicPost("post_meta")._thumbnail_id);let a="";return await s.fetch().then(()=>{a=s.get("url")}),a},V=()=>({content:ot(),title:it(),excerpt:"",slug:ct(),permalink:lt(),featuredImage:ut()}),pt=()=>{let e="";const t=["p","a","img","caption","br","video","iframe","blockquote","cite","em","strong","i","b","q","h1","h2","h3","h4","h5","h6","ul","ol","li","table","tr","th","td"],s=function(r){var o;const n=le(r);if(n.querySelectorAll(".so-panel").length===0)return r;for(const c of n.querySelectorAll("iframe, script, style, link"))c.remove();return n.querySelectorAll("*").forEach(c=>{if(!t.includes(c.tagName.toLowerCase())){const i=Array.from(c.childNodes);c.replaceWith(...i)}}),((o=n.innerHTML)==null?void 0:o.replace(/[\t|\n]/gm," "))||""},{soPanelsBuilderView:a}=window;return a&&(Array.isArray(a)?a.forEach(function(r){e+=s(r.contentPreview)}):e=s(a.contentPreview)),e},Z=()=>({content:pt(),title:"",excerpt:"",slug:"",permalink:"",featuredImage:""}),dt=()=>{var e,t;return((t=(e=TVE==null?void 0:TVE.Editor_Page)==null?void 0:e.content_manager)==null?void 0:t.get_clean_content())||""},he=()=>{var e,t;return((t=(e=TVE==null?void 0:TVE.CONST)==null?void 0:e.post)==null?void 0:t.post_title)||""},mt=()=>{var e,t;return((t=(e=TVE==null?void 0:TVE.CONST)==null?void 0:e.post)==null?void 0:t.post_name)||""},gt=()=>{var e;return((e=TVE==null?void 0:TVE.CONST)==null?void 0:e.post_url)||""},ht=()=>{var t,s,a,r,n;const e=((a=(s=(t=TVE==null?void 0:TVE.CONST)==null?void 0:t.theme)==null?void 0:s.post_featured_image)==null?void 0:a.src)||((n=(r=TVE==null?void 0:TVE.CONST)==null?void 0:r.post_image)==null?void 0:n.featured)||"";return e.includes("inc/assets/images/featured_image.png")?"":e},F=()=>({content:dt(),title:he(),excerpt:"",slug:mt()||G(he()),permalink:gt(),featuredImage:ht()}),Se=()=>{let e="";switch(!0){case K():e=j().slug;break;case J():e=W().slug;break;case U():e=H().slug;break;case R():e=z().slug;break;case D():e=V().slug;break;case L():e=Z().slug;break;case B():e=F().slug;break}return e},ft=()=>{const e=S();if(e.permalinkSlug)return e.permalinkSlug;let t="";if(v()||x()){const s=document.querySelector("#post_name");s&&(t=G(s.value))}return b()&&(t=window.wp.data.select("core/editor").getCurrentPost().slug),t||(t=Se()),t&&e.updatePermalinkSlug(t),t},ne=()=>{var t,s,a,r;let e="";if(v()||x()){const o=((t=document.querySelector("#post_name"))==null?void 0:t.value)||((s=document.querySelector("#editable-post-name-full"))==null?void 0:s.textContent)||document.querySelector("#title").value;o&&(e=G(o))}return b()&&(typeof((r=(a=window.wp)==null?void 0:a.data)==null?void 0:r.select("core/editor").getEditedPostSlug)=="function"?e=window.wp.data.select("core/editor").getEditedPostSlug():e=window.wp.data.select("core/editor").getEditedPostAttribute("slug")),e||(e=Se()),e},yt=async(e=!0)=>{let t=ft();const s=ne();if(t!==s){t=s;const a=m();if(S().updatePermalinkSlug(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},we=()=>{let e="";switch(!0){case K():e=j().permalink;break;case J():e=W().permalink;break;case U():e=H().permalink;break;case R():e=z().permalink;break;case D():e=V().permalink;break;case L():e=Z().permalink;break;case B():e=F().permalink;break}return e},St=()=>{const e=S();if(e.liveTags.permalink)return e.liveTags.permalink;let t;if(v()||x){const s=document.querySelector("#edit-slug-box a");s&&s.href&&(t=s.href)}return b()&&(t=window.wp.data.select("core/editor").getPermalink()),t||(t=we()),t&&e.updatePermalink(t),t},O=()=>{const e=$();let t;if(v()||x()){const s=document.querySelector("#edit-slug-box a");s&&s.href&&(t=s.href)}if(b()&&(t=window.wp.data.select("core/editor").getPermalink()),t||(t=we()),t&&e.aioseo.data.usingPermalinks&&ne()){const s=new URL(t),a=s.pathname.split("/").filter(r=>r!=="");a[0<a.length?a.length-1:0]=ne(),s.pathname=a.join("/")+(s.pathname.endsWith("/")?"/":""),s.search="",s.hash="",t=s.toString()}return decodeURIComponent(t)},wt=async(e=!0)=>{let t=St();const s=O();if(t!==s&&(t=s,t)){const a=m();if(S().updatePermalink(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},bt=e=>{var a;const t=e.getBody()||{},s=(t==null?void 0:t.childNodes)||[];return 1<s.length?!1:s.length===0?!0:1<((a=s[0])==null?void 0:a.childNodes.length)?!1:/^\n?$/.test((t==null?void 0:t.innerText)||(t==null?void 0:t.textContent)||"")},be=/base64,(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)/g,Ee=["acf","aioseo","core"],Pe=()=>{let e="";switch(!0){case K():e=j().content;break;case J():e=W().content;break;case U():e=H().content;break;case R():e=z().content;break;case D():e=V().content;break;case L():e=Z().content;break;case B():e=F().content;break}return e},Te=e=>{var a;if(!e.includes('<!-- wp:block {"ref":'))return e;const t=(a=window.wp.blocks)==null?void 0:a.rawHandler({HTML:e});return Je(t).forEach(r=>{var n,o,c;if(r.name==="core/block"){const i=window.wp.data.select("core").getEntityRecord("postType","wp_block",(n=r.attributes)==null?void 0:n.ref);(o=i==null?void 0:i.content)!=null&&o.raw&&(e=e.replace(`<!-- wp:block {"ref":${(c=r.attributes)==null?void 0:c.ref}} /-->`,i.content.raw))}}),e},ve=(e,t)=>(window.wp.data.select("core/block-editor").getBlocks().forEach(a=>{const[r,n]=a.name.split("/");if(t.includes(r)){if(r==="core"&&n!=="table")return;const o=document.getElementById("block-"+a.clientId);if(o&&o.innerText){const c=r==="core"?n:a.name,i=`<!-- wp:${c}.*?/wp:${c} -->|<!-- wp:${c}.*?/-->`;e=e.replace(new RegExp(i,"s"),o.innerText)}}}),e),Ce=()=>{const e=S();if(e.liveTags.post_content)return e.liveTags.post_content;let t="";if(v()&&!Y())if(window.tinyMCE||document.querySelector("#wp-content-wrap.html-active"))t=ee();else{const a=window.setInterval(()=>{window.tinyMCE&&(window.clearInterval(a),t=ee())},50)}return b()&&(t=window.wp.data.select("core/editor").getCurrentPost().content||"",t=Te(t),t=ve(t,Ee)),Y()&&(t=Pe()),m().currentPost.descriptionIncludeCustomFields&&(t=t+ye()),t=t.replace(be,""),t&&e.updatePostContent(t),t},_=(e=!1)=>{let t="";if(v()&&!Y())if(window.tinyMCE||document.querySelector("#wp-content-wrap.html-active"))t=ee();else{const a=window.setInterval(()=>{window.tinyMCE&&(window.clearInterval(a),t=ee())},50)}b()&&(t=window.wp.data.select("core/editor").getEditedPostContent(),t=Te(t),t=ve(t,Ee)),Y()&&(t=Pe());const s=m();return!e&&s.currentPost.descriptionIncludeCustomFields&&(t=t+ye()),t=t.replace(be,""),t},Et=async(e=!0)=>{let t=Ce();const s=_();if(t!==s){t=s;const a=m();if(S().updatePostContent(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},ee=()=>{let e;const t=window.tinyMCE?window.tinyMCE.get("content"):"";if(document.querySelector("#wp-content-wrap.tmce-active")&&t)e=t.getContent({format:bt(t)?"html":"raw"});else{const s=document.querySelector("textarea#content");e=s?s.value:""}return e};function Pt(e){return new Worker(""+window.__aioseoDynamicImportPreload__("main-4vgbr8_9.js"),{name:e==null?void 0:e.name})}class k{constructor(){T(this,"postId",null);T(this,"postTitle",null);T(this,"postParsedTitle",null);T(this,"postParsedDescription",null);T(this,"postDescription",null);T(this,"keyphrases",null);T(this,"postContent",null);T(this,"postSlug",null);T(this,"isAnalyzing",!1);T(this,"worker",null)}async runAnalysis({postId:t,postData:s,content:a=_(),slug:r=O()}){var y;const n=m(),o=C();if(s=s||{...n.currentPost},!((y=o.options.advanced)!=null&&y.truSeo)||!n.currentPost.page_analysis||this.isAnalyzing)return;this.worker&&this.worker.terminate();const c={separator:oe(o.options.searchAppearance.global.separator)},{parseTags:i}=Ve({separator:c.separator}),u=$(),l=S(),f=l.tags.map(P=>l.liveTags[P.id]!==void 0&&P.value!==l.liveTags[P.id]?{...P,value:l.liveTags[P.id]}:P),N={...ae(u.aioseo),tags:ae(f),currentPost:ae(n.currentPost)},g=JSON.parse(JSON.stringify({postId:t,postData:s,content:a,aioseo:N,slug:r,aioseoGlobals:c,postEditedTitle:xe(),postTitle:s.title||s.metaDefaults.title||"#post_title",postParsedTitle:i(s.title||s.metaDefaults.title||"#post_title"),postDescription:s.description||s.metaDefaults.description,postParsedDescription:i(s.description||s.metaDefaults.description)}));let h=[];this.worker=new Pt,this.worker.addEventListener("message",P=>{P.data.event==="tru-seo-analysis-complete"&&(h=P.data.analysis,this.dispatchActions(h,g),this.worker.terminate())}),this.worker.postMessage({event:"tru-seo-analysis",analysisData:g})}setSidebarButtonScore(t){const s=document.getElementById("aioseo-post-settings-sidebar-button"),a=document.getElementById("aioseo-post-score");!s||!a||(s.className=80<t?"score-green":50<t?"score-orange":"score-red",b()||(s.classList.add("aioseo-score-button","classic-editor"),t=`${t}/100`),a.textContent=t)}dispatchActions(t,s){const a=m();t.forEach(r=>{r.action==="updateState"&&s.postEditedTitle&&Oe()&&this.setSidebarButtonScore(r.data.seo_score),a[r.action](r.data)})}}const Ne=()=>{let e="";switch(!0){case K():e=j().title;break;case J():e=W().title;break;case U():e=H().title;break;case R():e=z().title;break;case D():e=V().title;break;case L():e=Z().title;break;case B():e=F().title;break}return e},Tt=()=>{const e=S();if(e.liveTags.post_title)return e.liveTags.post_title;let t;if(v()||x()){const s=document.querySelector("#post input#title");t=s?s.value:""}return b()&&(t=window.wp.data.select("core/editor").getCurrentPost().title),t||(t=Ne()),t&&e.updatePostTitle(t),t},xe=()=>{let e;if(v()||x()){const t=document.querySelector("#post input#title");e=t?t.value:""}return b()&&(e=window.wp.data.select("core/editor").getEditedPostAttribute("title")),e||(e=Ne()),e},vt=async(e=!0)=>{let t=Tt();const s=xe();if(t!==s){t=s;const a=m();if(S().updatePostTitle(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},ke=e=>e?(e=e.replaceAll(/\n\n/g," "),e=te(e,!1,"innerText"),e=e.replace(/\[.*?]/g,""),e.trim()):"",Ae=()=>{let e="";switch(!0){case K():e=j().excerpt;break;case J():e=W().excerpt;break;case U():e=H().excerpt;break;case R():e=z().excerpt;break;case D():e=V().excerpt;break;case L():e=Z().excerpt;break;case B():e=F().excerpt;break}return e},Ct=()=>{const e=S();if(e.liveTags.post_excerpt)return e.liveTags.post_excerpt;let t;return(v()||x())&&(t=_e()),b()&&(t=window.wp.data.select("core/editor").getCurrentPost().excerpt),t||(t=Ae()),t||(t=ke(Ce())),t&&e.updatePostExcerpt(t),t},Nt=()=>{let e;return(v()||x())&&(e=_e()),b()&&(e=window.wp.data.select("core/editor").getEditedPostAttribute("excerpt")),e||(e=Ae()),e||(e=ke(_())),e},xt=async(e=!0)=>{let t=Ct();const s=Nt();if(t!==s){t=s;const a=m();if(S().updatePostExcerpt(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},_e=()=>{let e="";const t=document.querySelector("#postexcerpt textarea#excerpt");if(e=t?t.value:"",document.querySelector("#wp-excerpt-wrap.tmce-active")){const s=window.tinyMCE?window.tinyMCE.get("excerpt"):"";s&&(e=s.getContent({format:"raw"}))}return e};let w="",A="";const kt=(e=!0)=>{var a,r,n,o,c,i,u;const t=S(),s=m();if(v()||x()){const l=document.querySelectorAll('#post input[name="post_category[]"]:checked');if(l.length){if((r=(a=s==null?void 0:s.currentPost)==null?void 0:a.primary_term)!=null&&r.category){const f=document.querySelector(`#categorychecklist input[value="${s.currentPost.primary_term.category}"]`);(n=f==null?void 0:f.parentNode)!=null&&n.innerText&&(w=f.parentNode.innerText,t.updateTaxonomyTitle(w))}else w!==l[0].parentNode.innerText&&(w=l[0].parentNode.innerText,t.updateTaxonomyTitle(l[0].parentNode.innerText));A=Array.from(l).map(f=>f.parentNode.innerText).join(", "),t.updateCategories(A)}else w!==""&&(w=A="",t.updateTaxonomyTitle(w),t.updateCategories(A))}if(b()){let l=[],f=[];const N=$();if(((o=N.aioseo.user.data.allcaps)!=null&&o.manageCategories||(c=N.aioseo.user.data.allcaps)!=null&&c.manage_categories)&&(l=window.wp.data.select("core").getEntityRecords("taxonomy","category"),f=window.wp.data.select("core/editor").getEditedPostAttribute("categories")),f&&f.length&&l){const g=((u=(i=s==null?void 0:s.currentPost)==null?void 0:i.primary_term)==null?void 0:u.category)||f[0],h=l.find(y=>y.id===g);h&&w!==h.name&&(w=h.name,t.updateTaxonomyTitle(w)),A=l.filter(y=>f.includes(y.id)).map(y=>y.name).join(", "),t.updateCategories(A)}else w!==""&&(w=A="",t.updateTaxonomyTitle(w),t.updateCategories(A))}e&&new k().runAnalysis({postId:s.currentPost.id})},At=(e=!1)=>{const t=m();if(t.currentPost.context!=="term")return;const s=S(),a=document.querySelector("#edittag input#name");a&&(s.updateTaxonomyTitle(a.value),a.addEventListener("input",()=>{s.updateTaxonomyTitle(a.value)}));const r=document.querySelector("#edittag textarea#description");r&&(s.updateTaxonomyDescription(r.value),r.addEventListener("input",()=>{s.updateTaxonomyDescription(r.value)}));const n=document.querySelector("#edittag input#slug");if(n){const o=G(n.value);s.updatePermalinkSlug(o),s.updatePermalink(t.currentPost.permalink.replace(`/${s.permalinkSlug}`,`/${o.replace(/ /gi,"-").replace(/[^a-z0-9-]/gi,"").toLowerCase()}`)),n.addEventListener("input",()=>{s.updatePermalinkSlug(o),s.updatePermalink(t.currentPost.permalink.replace(`/${s.permalinkSlug}`,`/${o.replace(/ /gi,"-").replace(/[^a-z0-9-]/gi,"").toLowerCase()}`))})}t.savePostState(),e&&k.runAnalysis({postId:t.currentPost.id})},_t=(e=!1)=>{const t=m();if(t.currentPost.postType!=="attachment")return;const s=S(),a=document.querySelector("textarea#attachment_caption");a&&(s.updateAttachmentCaption(a.value),a.addEventListener("input",i=>{s.updateAttachmentCaption(i.target.value)}));const r=document.querySelector("textarea#attachment-details-caption");r&&(s.updateAttachmentCaption(r.value),r.addEventListener("input",i=>{s.updateAttachmentCaption(i.target.value)}));const n=document.querySelector("textarea#attachment_content");n&&(s.updateAttachmentDescription(n.value),n.addEventListener("input",i=>{s.updateAttachmentDescription(i.target.value)}));const o=document.querySelector("input#attachment_alt");o&&(s.updateAltTag(o.value),o.addEventListener("input",i=>{s.updateAltTag(i.target.value)}));const c=document.querySelector("input#attachment-details-alt-text");c&&(s.updateAltTag(o.value),c.addEventListener("input",i=>{s.updateAltTag(i.target.value)})),e&&new k().runAnalysis({postId:t.currentPost.id})},Oe=()=>{var t,s;const e=m();return(t=e==null?void 0:e.currentPost)!=null&&t.id&&!!((s=e.currentPost)!=null&&s.isTruSeoEligible)||!1},Zt=()=>{var a,r,n;const e=$();if(!((a=e.aioseo.screen)!=null&&a.postType)||((r=e.aioseo.screen)==null?void 0:r.postType)==="web-story")return!1;const t=m();return!!((n=C().options.advanced)!=null&&n.truSeo&&Re(e.aioseo.screen.postType)&&!t.currentPost.isStaticPostsPage)},M=async(e=900,t=!0)=>{re(async()=>{const s=fe(),a=m();await vt(!1),await Et(!1),await xt(!1),await yt(!1),await wt(!1),kt(!1),At(!1),_t(!1),re(s.updateSchemaOutput,Math.max(e*2,1800)),t&&new k().runAnalysis({postId:a.currentPost.id})},e)},Ft=e=>{const t=e.getRangeAt(0),s=t.cloneRange();return s.collapse(!1),e.removeAllRanges(),e.addRange(s),e.extend(t.startContainer,t.startOffset),e},Xt=e=>{const t=new RegExp(" ","g");return e.replace(/&nbsp;/g," ").replace(t," ")},Qt=({element:e,property:t,value:s})=>{if(!e)return document.documentElement;let a=e.parentElement;for(;a;){if(a.isEqualNode(document.documentElement)||s===document.defaultView.getComputedStyle(a).getPropertyValue(t))return a;a=a.parentElement}},Yt=()=>{const e=document.createElement("div");return e.classList.add("aioseo-app"),e.style.position="absolute",e.style.zIndex="999",e.style.display="flex",e.setAttribute("tabindex",-1),e};export{Xt as A,Kt as B,Qt as C,Ft as D,Yt as E,We as F,k as T,Ve as a,j as b,W as c,V as d,F as e,ze as f,te as g,_ as h,kt as i,Oe as j,At as k,_t as l,M as m,xe as n,Ct as o,Wt as p,z as q,Zt as r,je as s,jt as t,fe as u,Z as v,zt as w,Ht as x,Vt as y,ne as z};
xbodynamge/namtation/wp-content/plugins/all-in-one-seo-pack/dist/Lite/assets/js/helpers.da4c5c22.js000064400000116164151144436340027760 0ustar00homevar qe=Object.defineProperty;var Ie=(e,t,s)=>t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var T=(e,t,s)=>Ie(e,typeof t!="symbol"?t+"":t,s);import{q as $e,d as Be,e as m,c as C,h as q,a as I,m as Le,i as b,s as oe,u as $,I as De,F as S,y as v,z as x,D as B,X as L,C as D,Y as R,Z as U,B as J,A as K,_ as Y}from"./index.4fea5b8a.js";import{d as re}from"./Caret.7cc96622.js";import{s as Re}from"./metabox.5993e7e8.js";import{c as G}from"./cleanForSlug.2f987c7a.js";import{g as ie,a as ce}from"./contentHasAssets.e1428256.js";import{a as Ue,g as E}from"./_baseSet.a1a8944e.js";import{I as Je}from"./helpers.114e9c35.js";import"./translations.d159963e.js";import{_ as p}from"./default-i18n.20001971.js";import{e as de}from"./regex.8a6101c0.js";import{n as me,g as Ke,aT as ae}from"./runtime-dom.esm-bundler.baf35205.js";function je(e,t,s){return e==null?e:Ue(e,t,s)}const d="all-in-one-seo-pack",We=()=>{const e=[{slug:"article",graphName:"Article",label:p("Article",d)},{slug:"book",graphName:"Book",label:p("Book",d)},{slug:"course",graphName:"Course",label:p("Course",d)},{slug:"dataset",graphName:"Dataset",label:p("Dataset",d)},{slug:"event",graphName:"Event",label:p("Event",d)},{slug:"faq-page",graphName:"FAQPage",label:p("FAQ",d)},{slug:"fact-check",graphName:"FactCheck",label:p("Fact Check",d)},{slug:"how-to",graphName:"HowTo",label:p("How To",d)},{slug:"job-posting",graphName:"JobPosting",label:p("Job Posting",d)},{slug:"movie",graphName:"Movie",label:p("Movie",d)},{slug:"music",graphName:"Music",label:p("Music",d)},{slug:"person",graphName:"Person",label:p("Person",d)},{slug:"product",graphName:"Product",label:p("Product",d)},{slug:"product-review",graphName:"ProductReview",label:p("Product Review",d)},{slug:"car",graphName:"Car",label:p("Car",d)},{slug:"recipe",graphName:"Recipe",label:p("Recipe",d)},{slug:"service",graphName:"Service",label:p("Service",d)},{slug:"software-application",graphName:"SoftwareApplication",label:p("Software",d)},{slug:"video",graphName:"Video",label:p("Video",d)},{slug:"web-page",graphName:"WebPage",label:p("Web Page",d)}],t={Article:[{childGraphName:"BlogPosting",label:p("Blog Post",d)},{childGraphName:"NewsArticle",label:p("News Article",d)}],Music:[{childGraphName:"MusicAlbum",label:p("Music Album",d)},{childGraphName:"MusicGroup",label:p("Music Group",d)}],WebPage:[{childGraphName:"WebPage",label:p("Web Page",d)},{childGraphName:"AboutPage",label:p("About Page",d)},{childGraphName:"CheckoutPage",label:p("Checkout Page",d)},{childGraphName:"CollectionPage",label:p("Collection Page",d)},{childGraphName:"ContactPage",label:p("Contact Page",d)},{childGraphName:"ItemPage",label:p("Item Page",d)},{childGraphName:"MedicalWebPage",label:p("Medical Page",d)},{childGraphName:"ProfilePage",label:p("Profile Page",d)},{childGraphName:"RealEstateListing",label:p("Real Estate Listing",d)},{childGraphName:"SearchResultsPage",label:p("Search Results Page",d)}]};return{childGraphs:t,graphs:e,initSchemaEditor:n=>{const o=fe(),c=JSON.stringify(o.graph);o.graph=$e(n,o.graph);const i=JSON.stringify(o.graph);JSON.stringify(c)!==JSON.stringify(i)&&(o.isDirty=!0)},getGraphObject:(n,o=!1)=>{var c;return!o&&((c=n==null?void 0:n.properties)==null?void 0:c.type)!==n.graphName&&t[n.graphName]?t[n.graphName].find(i=>i.childGraphName===n.properties.type):e.find(i=>i.slug===n.slug)},getParentGraphName:n=>{let o="";return Object.entries(t).forEach(c=>{const i=c[0];c[1].forEach(u=>{o||n===u.childGraphName&&(o=i)})}),o||n}}},fe=Be("SchemaStore",{state:()=>({custom:{graphName:"",schema:""},defaultGraphParent:"",graph:null,graphCardsKey:0,isDirty:!1,isEditingCustomGraph:!1,isEditingCustomTemplate:!1,isEditingDefaultGraph:!1,isEditingGraph:!1,isEditingTemplate:!1,modalOpenMetabox:!1,modalOpenSidebar:!1,output:"",outputKey:0,tabs:{generator:"schema-templates",templates:"schema-catalog"},templateName:"",previousOutputRequestData:null}),actions:{getCustomObject(){return{id:"#aioseo-custom-"+new Date().getTime().toString(36),custom:!0,graphName:this.custom.graphName,schema:this.custom.schema}},resetSessionState(){this.custom={graphName:"",schema:""},this.defaultGraphParent="",this.graph=null,this.templateName="",this.isEditingCustomGraph=!1,this.isEditingCustomTemplate=!1,this.isEditingDefaultGraph=!1,this.isEditingGraph=!1,this.isEditingTemplate=!1,this.isDirty=!1},addCustomAsGraph(){const e=m();e.currentPost.schema.customGraphs.push(this.getCustomObject()),e.currentPost.schema.customGraphs=e.currentPost.schema.customGraphs.sort((t,s)=>t.graphName<s.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addCustomAsTemplate(){const e=C(),t={...this.getCustomObject()},s={...JSON.parse(JSON.stringify(t)),label:"Custom Schema - "+t.graphName};e.internalOptions.internal.schema.templates.push(this.getCustomObject()),this.resetSessionState(),this.setTabTemplates("your-templates"),q.post(I.restUrl("schema/templates")).send({template:s}).then(a=>{a.body.success&&a.body.templates&&this.parseAndUpdateTemplates(a.body.templates)})},addCustomTemplateAsGraph(){const e=m();e.currentPost.schema.customGraphs.push(this.graph),e.currentPost.schema.customGraphs=e.currentPost.schema.customGraphs.sort((t,s)=>t.graphName<s.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addDefaultGraph(){const e=m();e.currentPost.schema.default.isEnabled=!0,this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addGraph(){const e=m();e.currentPost.schema.graphs.push(this.graph),e.currentPost.schema.graphs=e.currentPost.schema.graphs.sort((t,s)=>t.graphName<s.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},addGraphAsTemplate(){var a,r,n,o,c;const e=We();(r=(a=this.graph)==null?void 0:a.properties)!=null&&r.type&&this.graph.properties.type!==this.graph.graphName?this.graph.label=((n=e.getGraphObject(this.graph,!0))==null?void 0:n.label)+" - "+((o=e.getGraphObject(this.graph))==null?void 0:o.label)+" - "+this.templateName:this.graph.label=((c=e.getGraphObject(this.graph,!0))==null?void 0:c.label)+" - "+this.templateName;const t=JSON.parse(JSON.stringify(this.graph));C().internalOptions.internal.schema.templates.push(this.graph),this.resetSessionState(),this.setTabTemplates("your-templates"),q.post(I.restUrl("schema/templates")).send({template:t}).then(i=>{i.body.success&&i.body.templates&&this.parseAndUpdateTemplates(i.body.templates)})},addTemplateAsGraph(e,t=""){let a=C().internalOptions.internal.schema.templates;if(t){const o=new RegExp(de(t).replace(/\s/g,"\\s"),"i");a=a.filter(c=>{var i;return(i=c==null?void 0:c.label)==null?void 0:i.match(o)})}e===void 0&&(e=a.findIndex(o=>o.id===this.graph.id));const r=JSON.parse(JSON.stringify(a[e]));r.id=r.id+new Date().getTime().toString(18);const n=m();r.custom?(n.currentPost.schema.customGraphs.push(r),n.currentPost.schema.customGraphs=n.currentPost.schema.customGraphs.sort((o,c)=>o.graphName<c.graphName?-1:1)):(n.currentPost.schema.graphs.push(r),n.currentPost.schema.graphs=n.currentPost.schema.graphs.sort((o,c)=>o.graphName<c.graphName?-1:1)),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteCustomGraph(e){const t=m();e===void 0&&(e=t.currentPost.schema.customGraphs.findIndex(s=>s.id===this.graph.id)),t.currentPost.schema.customGraphs.splice(e,1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteDefaultGraph(){const e=m();e.currentPost.schema.default.isEnabled=!1,this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteGraph(e){const t=m();e===void 0&&(e=t.currentPost.schema.graphs.findIndex(s=>s.id===this.graph.id)),t.currentPost.schema.graphs.splice(e,1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},deleteTemplate(e){const t=this.graph.id,s=C();e===void 0&&(e=s.internalOptions.internal.schema.templates.findIndex(a=>a.id===t)),s.internalOptions.internal.schema.templates.splice(e,1),this.resetSessionState(),this.setTabTemplates("your-templates"),q.delete(I.restUrl("schema/templates")).send({templateId:t}).then(a=>{a.body.success&&a.body.templates&&this.parseAndUpdateTemplates(a.body.templates)})},editCustomGraph({customGraphIndex:e,isSidebar:t}){const s=m(),a=JSON.parse(JSON.stringify(s.currentPost.schema.customGraphs[e]));this.graph=a,this.isEditingCustomGraph=!0,this.tabs.generator="custom-schema",t?this.modalOpenSidebar=!0:this.modalOpenMetabox=!0},editDefaultGraph({isSidebar:e,parentGraphName:t}){this.defaultGraphParent=t;const s=m();s.currentPost.schema.default.data[t]&&(this.graph=s.currentPost.schema.default.data[t]),this.isEditingDefaultGraph=!0,this.tabs.generator="schema-templates",e?this.modalOpenSidebar=!0:this.modalOpenMetabox=!0},async editGraph({graphIndex:e,isSidebar:t}){const s=m(),a=JSON.parse(JSON.stringify(s.currentPost.schema.graphs[e]));this.graph=a,this.isEditingGraph=!0,this.tabs.generator="schema-templates",t?this.modalOpenSidebar=!0:this.modalOpenMetabox=!0,await me(),this.isDirty=!1},async editTemplate(e,t=""){let a=C().internalOptions.internal.schema.templates;if(t){const n=new RegExp(de(t).replace(/\s/g,"\\s"),"i");a=a.filter(o=>o.label.match(n))}const r=JSON.parse(JSON.stringify(a[e]));if(this.graph=r,r.custom)this.templateName=this.graphName,this.isEditingCustomTemplate=!0,this.tabs.generator="custom-schema";else{const n=new RegExp(`^${this.graph.graphName} -`,"i"),o=this.graph.label.replace(n,"");this.templateName=o,this.isEditingTemplate=!0}await me(),this.isDirty=!1},updateCustomGraph(){const e=m(),t=e.currentPost.schema.customGraphs.findIndex(s=>s.id===this.graph.id);t!==-1&&(e.currentPost.schema.customGraphs[t]=this.graph,e.currentPost.schema.customGraphs=e.currentPost.schema.customGraphs.sort((s,a)=>s.graphName<a.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1)},updateDefaultGraph(){const e=m();e.currentPost.schema.default.data[this.defaultGraphParent]=this.graph,this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1},updateGraph(){const e=m(),t=e.currentPost.schema.graphs.findIndex(s=>s.id===this.graph.id);t!==-1&&(e.currentPost.schema.graphs[t]=this.graph,e.currentPost.schema.graphs=e.currentPost.schema.graphs.sort((s,a)=>s.graphName<a.graphName?-1:1),this.resetSessionState(),this.graphCardsKey=this.graphCardsKey+1,this.modalOpenMetabox=!1,this.modalOpenSidebar=!1)},updateSchemaOutput(){const e=m();if(Le().isUnlicensed)return;let s=e.currentPost.id;if(b()&&(s=window.wp.data.select("core/editor").getCurrentPostId()),!s||e.currentPost.context!=="post")return;const a={postId:s,graphs:e.currentPost.schema.graphs,customGraphs:e.currentPost.schema.customGraphs,default:e.currentPost.schema.default,blockGraphs:e.currentPost.schema.blockGraphs};JSON.stringify(a)!==this.previousOutputRequestData&&(this.previousOutputRequestData=JSON.stringify(a),q.post(I.restUrl("schema/validator/output")).send(a).then(r=>{if(r.body.success&&r.body.output){let n=null;try{n=JSON.parse(r.body.output)}catch{return}if(r.body.output=JSON.stringify(n,null,"	").trim(),r.body.output===this.output)return;this.output=r.body.output,this.outputKey=this.outputKey+1}}))},updateTemplate(){this.graph.label=this.graph.graphName+" - "+this.templateName;const e=JSON.parse(JSON.stringify(this.graph)),t=C(),s=t.internalOptions.internal.schema.templates.findIndex(a=>a.id===this.graph.id);s!==-1&&(t.internalOptions.internal.schema.templates[s]=this.graph,this.resetSessionState(),this.setTabTemplates("your-templates"),q.put(I.restUrl("schema/templates")).send({template:e}).then(a=>{a.body.success&&a.body.templates&&this.parseAndUpdateTemplates(a.body.templates)}))},parseAndUpdateTemplates(e){e=e.map(s=>(typeof s!="string"||(s=JSON.parse(s)),s)),e=e.sort((s,a)=>{const r=s.custom?0:1;return s.graphName<a.graphName?-1:r});const t=C();t.internalOptions.internal.schema.templates=e},setModalOpen({isOpen:e,initialTab:t,isSidebar:s}){e||(this.resetSessionState(),this.setTabTemplates("schema-catalog")),s?this.modalOpenSidebar=e:this.modalOpenMetabox=e,t&&(this.tabs.generator=t)},setTabTemplates(e){this.tabs.generator="schema-templates",this.tabs.templates=e}}}),le=(e,t="div")=>{const s=document.createElement(t);return s.innerHTML=De(e.trim()),s},te=(e,t=!0,s="textContent")=>(typeof e=="string"&&(t&&(e=e.replace(/[\t|\n]/gm,"")),e=le(e)),e[s]||e.textContent||e.innerText||""),Kt=e=>(typeof e=="string"&&(e=le(e)),(e==null?void 0:e.outerText)??""),jt=(e,t=200,s="&hellip;")=>e&&(t<e.length&&(e=e.substring(0,t).trim()+oe(s)),e),Wt=(e,t)=>{try{const s=JSON.parse(t);return s?s["@type"]&&(e===s["@type"]||Array.isArray(s["@type"])&&s["@type"].includes(e))?s:Array.isArray(s["@graph"])&&s["@graph"].find(r=>Array.isArray(r["@type"])?r["@type"].includes(e):r["@type"]===e)||!1:!1}catch{return!1}},Ht=()=>{var e;return{url:window.location.href,title:document.title||"",description:((e=document.querySelector('meta[name="description"]'))==null?void 0:e.content)||""}},zt=()=>{var t,s,a,r;const e={description:((t=document.querySelector('meta[property="og:description"]'))==null?void 0:t.content)||"",image:((s=document.querySelector('meta[property="og:image"]'))==null?void 0:s.content)||"",title:((a=document.querySelector('meta[property="og:title"]'))==null?void 0:a.content)||"",type:((r=document.querySelector('meta[property="og:type"]'))==null?void 0:r.content)||""};if(!e.title&&(e.title=document.title||"",!e.title)){const n=$();e.title=n.aioseo.urls.domain}return e},Vt=()=>{var e,t,s,a;return{card:((e=document.querySelector('meta[name="twitter:card"]'))==null?void 0:e.content)||"",description:((t=document.querySelector('meta[name="twitter:description"]'))==null?void 0:t.content)||"",image:((s=document.querySelector('meta[name="twitter:image"]'))==null?void 0:s.content)||"",title:((a=document.querySelector('meta[name="twitter:title"]'))==null?void 0:a.content)||""}},He=e=>{var s;if(typeof(window==null?void 0:window.acf)!="object"||typeof((s=window.acf)==null?void 0:s.getField)!="function")return null;const t=window.acf.getField(e)||{};return typeof(t==null?void 0:t.val)!="function"?null:t.val()||{}},ye=()=>{const t=m().currentPost.postType;if(!t)return"";const a=C().dynamicOptions.searchAppearance.postTypes[t].customFields;if(!a||!Oe)return"";const r=()=>{M(500)},n=a.replace(/\n/g,",").split(","),o=[],c=["INPUT","TEXTAREA","IMG"];n.forEach(u=>{u=u.trim();const l=document.getElementById(`${u}`)||{},f=document.querySelectorAll("#the-list > tr"),N=document.querySelectorAll(".acf-field");c.includes(l==null?void 0:l.tagName)&&!(l!=null&&l.closest(".acf-field"))?o.push(l):f.forEach(g=>{const h=g.querySelector(`#${g.id}-key`),y=g.querySelector(`#${g.id}-value`);c.includes(y==null?void 0:y.tagName)&&n.includes(h==null?void 0:h.value)&&o.push(y)}),N.forEach(g=>{var y;if(u!==g.dataset.name||g.dataset.type==="repeater"||(y=g.parentNode)!=null&&y.closest(".acf-repeater"))return"";let h=g.querySelector(`[id^="acf"][name$="[${g.dataset.key}]"]`);if(g.dataset.type==="image"&&(h=g.querySelector(".has-value img")),g.dataset.type==="gallery"&&(h=g.querySelector(".acf-gallery-attachment img")),g.dataset.type==="link"&&(h=He(g.dataset.key)||g.querySelector(`[name$="[${g.dataset.key}][url]"]`)||{},h={tagName:"INPUT",type:"url",value:(h==null?void 0:h.url)??(h==null?void 0:h.value)??""}),!h||h.type&&h.type==="hidden")return"";if(g.dataset.type==="wysiwyg"){const P=window.setInterval(()=>{var X,Q;(Q=(X=window.tinyMCE)==null?void 0:X.activeEditor)!=null&&Q.acf&&(window.clearInterval(P),window.tinyMCE.activeEditor.on("keyup",function(){M(500)}),window.tinyMCE.activeEditor.on("PostProcess",function(){re(()=>{M(500)},10)}))},50),Ge=function(X){X.forEach(Q=>{var pe;if(Q.attributeName==="class"&&g.querySelector(".wp-editor-wrap.tmce-active")&&((pe=window.tinyMCE)!=null&&pe.activeEditor)){window.tinyMCE.activeEditor.on("keyup",function(){M(500)});const se=g.querySelector(`[name="acf[${g.dataset.key}]"]`);se&&(se.addEventListener("keyup",()=>{M(500)}),se.addEventListener("paste",()=>{M(500)}))}})},Me=new MutationObserver(Ge),ue=g.querySelector(".wp-editor-wrap");ue&&Me.observe(ue,{attributes:!0})}c.includes(h.tagName)&&o.push(h)})});let i="";return o.forEach(u=>{let l="";if(c.includes(u.tagName)&&typeof(u==null?void 0:u.addEventListener)=="function"&&u.addEventListener("keyup",r),u.value&&(l=u.value),u.tagName==="IMG"&&u.src){const f=u.alt?`alt="${u.alt}"`:"";l=`<img src="${u.src}" ${f}>`}u.value&&u.type&&u.type==="url"&&(l=`<a href="${l}">${l}</a>`),l&&(i+=`${l} `)}),i},ze=(e,t=["INPUT","TEXTAREA","IMG"])=>{if(!e)return"";const s=document.getElementById(`${e}`),a=document.querySelectorAll("#the-list > tr"),r=document.querySelectorAll(".acf-field");let n="";if(s&&t.indexOf(s.tagName)!==-1&&(s.closest(".acf-field")||(n=s.tagName==="IMG"?s.getAttribute("src"):s.value)),a.length&&a.forEach(o=>{const c=o.querySelector(`#${o.id}-key`),i=o.querySelector(`#${o.id}-value`);i&&t.indexOf(i.tagName)!==-1&&c.value===e&&(n=i.tagName==="IMG"?i.getAttribute("src"):i.value)}),r.length){const o=[];r.forEach(c=>{var u;if(e!==c.dataset.name||c.dataset.type==="repeater"||(u=c.parentNode)!=null&&u.closest(".acf-repeater"))return;let i;t.forEach(l=>{const f=l.toLowerCase();i=c.querySelector(`[data-key="${c.dataset.key}"] ${f}`)||i}),i&&o.push(i.tagName==="IMG"?i.getAttribute("src"):i.value)}),n=o.join(" ")}return n},Ve=({separator:e})=>{const t=Ke(e);return{parseTags:a=>{const r=S();return!a||!r.tags?a:(r.tags.forEach(n=>{if(n.id==="custom_field"){const u=new RegExp(`#${n.id}-([a-zA-Z0-9_-]+)`,"g"),l=a.match(u);l&&l.forEach(f=>{const N=new RegExp(`#${n.id}-([a-zA-Z0-9_-]+)`),g=f.match(N);g&&g[1]&&(a=a.replace(N,ze(g[1])))});return}if(n.id==="tax_name"){const u=new RegExp(`#${n.id}-([a-zA-Z0-9_-]+)`,"g");a=a.replace(u,`[${n.name} - $1]`);return}const o=new RegExp(`#${n.id}(?![a-zA-Z0-9_])`,"g");n.id==="separator_sa"&&t.value!==void 0&&(a=a.replace(o,t.value));const c=a.match(o),i=r.liveTags[n.id]||n.value;c&&(a=a.replace(o,"%|%"+i))}),a=a.replace(/%\|%/g,""),oe(a))},separator:t}},Ze=()=>{const e=window.elementor.documents.getCurrent(),t=[];return e.$element?(e.$element.find(".elementor-widget").each((s,a)=>{const r=a.innerHTML.trim().replaceAll(/<div class="elementor-widget-container">(.*)<\/div>/g,"$1").replaceAll(/<p.*>(<img.*>)<\/p>/g,"$1");te(r)===""&&ie(r)===0&&ce(r)===0||t.push(r)}),t.join(" ")):""},j=()=>{var s;const{settings:e,config:t}=window.elementor;return{content:Ze(),title:e.page.model.get("post_title"),excerpt:e.page.model.get("post_excerpt")||"",slug:G(e.page.model.get("post_title")),permalink:t.document.urls.permalink||"",featuredImage:((s=e.page.model.get("post_featured_image"))==null?void 0:s.url)||""}},Fe=()=>{const e=E(ET_Builder,"Frames.app.frameElement",document.querySelector("iframe#et-fb-app-frame"));if(!e)return document.createElement("div");let t=e.contentWindow.document.querySelectorAll("#et-fb-app");return 1<t.length&&(t=[...t].filter(s=>s.classList.contains("et-fb-root-ancestor"))),t[0]||document.createElement("div")},Xe=()=>{const e=[],t=Fe().querySelectorAll(".et_pb_section"),s=new RegExp(["<style.*?</style>","\\[object Object\\]"].join("|"),"gi");for(const a of t){const r=a.innerHTML.replace(s,"").replaceAll(/<p.*>(<img.*>)<\/p>/g,"$1");te(r)===""&&ie(r)===0&&ce(r)===0||e.push(r)}return e.join(" ")},Qe=()=>{const e=new URL(E(ETBuilderBackendDynamic,"currentPage.permalink",""));return e.searchParams.delete("PageSpeed"),e.href},Ye=async()=>{const{wp:e}=window,t=E(ETBuilderBackendDynamic,"currentPage.thumbnailId",0);if(!e||t===0)return"";const s=e.media.attachment(t);let a="";return await s.fetch().then(()=>{a=s.get("url"),je(ETBuilderBackendDynamic,"currentPage.thumbnailUrl",a)}),a},W=()=>{const e=E(ETBuilderBackendDynamic,"postMeta.post_name","")||G(E(ETBuilderBackendDynamic,"postTitle",""));return{content:Xe(),title:E(ETBuilderBackendDynamic,"postTitle",""),excerpt:E(ETBuilderBackendDynamic,"postMeta.post_excerpt",""),slug:e,permalink:Qe(),featuredImage:Ye()}},et=e=>{let t;switch(e.type){case"header":t=document.createElement(e.settings.tag),t.innerHTML=e.settings.headerTxt.trim();break;case"image":const s=document.createElement("img");e.settings.altTxt&&s.setAttribute("alt",e.settings.altTxt),e.settings.src&&s.setAttribute("src",e.settings.src),e.settings.noFollow&&s.setAttribute("rel","nofollow"),t=s,e.settings.link&&(t=document.createElement("a"),t.setAttribute("href",e.settings.link),t.innerHTML=s.outerHTML,e.settings.noFollow&&t.setAttribute("rel","nofollow"),e.settings.openNewWindow&&t.setAttribute("target","_blank"));break;case"video":e.settings.type==="youtube"?(t=document.createElement("iframe"),t.setAttribute("src",e.settings.youtubeUrl)):(t=document.createElement("div"),t.innerHTML=e.settings.code);break;case"text":t=document.createElement("div"),t.innerHTML=e.settings.txt.trim();break;case"button":t=document.createElement("a"),t.appendChild(document.createTextNode(e.settings.btnTxt+" "+e.settings.btnSubTxt)),e.settings.link&&t.setAttribute("href",e.settings.link),e.settings.altTxt&&t.setAttribute("alt",e.settings.altTxt),e.settings.src&&t.setAttribute("src",e.settings.src),e.settings.noFollow&&t.setAttribute("rel","nofollow"),e.settings.openNewWindow&&t.setAttribute("target","_blank");break;case"bullet-list":t=document.createElement("ul"),e.settings.items.forEach(a=>{const r=document.createElement("li");r.innerHTML=a.txt,t.appendChild(r)});break;case"custom-html":t=document.createElement("div"),t.innerHTML=e.settings.code;break}return t},tt=()=>{const e=[];return JSON.parse(JSON.stringify(E(seedprod_data,"settings.document.sections",[]))).forEach(s=>{s.rows.forEach(a=>{a.cols.forEach(r=>{r.blocks.forEach(n=>{const o=et(n);o&&(te(o)===""&&ie(o)===0&&ce(o)===0||e.push(o.outerHTML))})})})}),e.join(" ")},st=()=>{const e=E(seedprod_data,"home_url",""),t=E(seedprod_data,"settings.post_name","");return`${e}/${t}/`},H=()=>({content:tt(),title:E(seedprod_data,"settings.post_title",""),excerpt:"",slug:E(seedprod_data,"settings.post_name",""),permalink:st()}),at=()=>m().currentPost.processedContent,ge=e=>{var t,s;if(e==="admin_frontend_editor"){const{vc:a}=window;return a.builder.getTitle()||((t=document.querySelector("#vc_page-title-field"))==null?void 0:t.value)}return((s=document.getElementById("#title"))==null?void 0:s.value)||""},rt=e=>{var t,s;if(e==="admin_frontend_editor"){const{vc_iframe_src:a}=window,r=new URL(a).pathname.split("/").filter(n=>n);return r[r.length-1]||((t=document.querySelector("#vc_post_name"))==null?void 0:t.value)}return((s=document.querySelector("#post_name"))==null?void 0:s.value)||""},nt=e=>{var t;if(e==="admin_frontend_editor"){const{vc_iframe_src:s}=window;return s.replace(new URL(s).search,"")}return((t=document.querySelector("#sample-permalink a"))==null?void 0:t.href)||""},z=()=>{const{vc_mode:e}=window,t=rt(e)||G(ge(e));return{content:at(),title:ge(e),excerpt:"",slug:t,permalink:nt(e),featuredImage:""}},ot=()=>{var t;return((t=m().currentPost)==null?void 0:t.processedContent)||""},it=()=>{var t;const{FusionApp:e}=window;return(e==null?void 0:e.getPost("post_title"))||((t=document.getElementById("#title"))==null?void 0:t.value)||""},ct=()=>{var t;const{FusionApp:e}=window;return(e==null?void 0:e.getPost("post_name"))||((t=document.querySelector("#post_name"))==null?void 0:t.value)||""},lt=()=>{var t;const{FusionApp:e}=window;return(e==null?void 0:e.getPost("post_permalink").replace("?fb-edit=1",""))||((t=document.querySelector("#sample-permalink a"))==null?void 0:t.href)||""},ut=async()=>{const{wp:e,FusionApp:t}=window;if(!e||!t||!t.getDynamicPost("post_meta")._thumbnail_id)return"";const s=e.media.attachment(t.getDynamicPost("post_meta")._thumbnail_id);let a="";return await s.fetch().then(()=>{a=s.get("url")}),a},V=()=>({content:ot(),title:it(),excerpt:"",slug:ct(),permalink:lt(),featuredImage:ut()}),pt=()=>{let e="";const t=["p","a","img","caption","br","video","iframe","blockquote","cite","em","strong","i","b","q","h1","h2","h3","h4","h5","h6","ul","ol","li","table","tr","th","td"],s=function(r){var o;const n=le(r);if(n.querySelectorAll(".so-panel").length===0)return r;for(const c of n.querySelectorAll("iframe, script, style, link"))c.remove();return n.querySelectorAll("*").forEach(c=>{if(!t.includes(c.tagName.toLowerCase())){const i=Array.from(c.childNodes);c.replaceWith(...i)}}),((o=n.innerHTML)==null?void 0:o.replace(/[\t|\n]/gm," "))||""},{soPanelsBuilderView:a}=window;return a&&(Array.isArray(a)?a.forEach(function(r){e+=s(r.contentPreview)}):e=s(a.contentPreview)),e},Z=()=>({content:pt(),title:"",excerpt:"",slug:"",permalink:"",featuredImage:""}),dt=()=>{var e,t;return((t=(e=TVE==null?void 0:TVE.Editor_Page)==null?void 0:e.content_manager)==null?void 0:t.get_clean_content())||""},he=()=>{var e,t;return((t=(e=TVE==null?void 0:TVE.CONST)==null?void 0:e.post)==null?void 0:t.post_title)||""},mt=()=>{var e,t;return((t=(e=TVE==null?void 0:TVE.CONST)==null?void 0:e.post)==null?void 0:t.post_name)||""},gt=()=>{var e;return((e=TVE==null?void 0:TVE.CONST)==null?void 0:e.post_url)||""},ht=()=>{var t,s,a,r,n;const e=((a=(s=(t=TVE==null?void 0:TVE.CONST)==null?void 0:t.theme)==null?void 0:s.post_featured_image)==null?void 0:a.src)||((n=(r=TVE==null?void 0:TVE.CONST)==null?void 0:r.post_image)==null?void 0:n.featured)||"";return e.includes("inc/assets/images/featured_image.png")?"":e},F=()=>({content:dt(),title:he(),excerpt:"",slug:mt()||G(he()),permalink:gt(),featuredImage:ht()}),Se=()=>{let e="";switch(!0){case K():e=j().slug;break;case J():e=W().slug;break;case U():e=H().slug;break;case R():e=z().slug;break;case D():e=V().slug;break;case L():e=Z().slug;break;case B():e=F().slug;break}return e},ft=()=>{const e=S();if(e.permalinkSlug)return e.permalinkSlug;let t="";if(v()||x()){const s=document.querySelector("#post_name");s&&(t=G(s.value))}return b()&&(t=window.wp.data.select("core/editor").getCurrentPost().slug),t||(t=Se()),t&&e.updatePermalinkSlug(t),t},ne=()=>{var t,s,a,r;let e="";if(v()||x()){const o=((t=document.querySelector("#post_name"))==null?void 0:t.value)||((s=document.querySelector("#editable-post-name-full"))==null?void 0:s.textContent)||document.querySelector("#title").value;o&&(e=G(o))}return b()&&(typeof((r=(a=window.wp)==null?void 0:a.data)==null?void 0:r.select("core/editor").getEditedPostSlug)=="function"?e=window.wp.data.select("core/editor").getEditedPostSlug():e=window.wp.data.select("core/editor").getEditedPostAttribute("slug")),e||(e=Se()),e},yt=async(e=!0)=>{let t=ft();const s=ne();if(t!==s){t=s;const a=m();if(S().updatePermalinkSlug(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},we=()=>{let e="";switch(!0){case K():e=j().permalink;break;case J():e=W().permalink;break;case U():e=H().permalink;break;case R():e=z().permalink;break;case D():e=V().permalink;break;case L():e=Z().permalink;break;case B():e=F().permalink;break}return e},St=()=>{const e=S();if(e.liveTags.permalink)return e.liveTags.permalink;let t;if(v()||x){const s=document.querySelector("#edit-slug-box a");s&&s.href&&(t=s.href)}return b()&&(t=window.wp.data.select("core/editor").getPermalink()),t||(t=we()),t&&e.updatePermalink(t),t},O=()=>{const e=$();let t;if(v()||x()){const s=document.querySelector("#edit-slug-box a");s&&s.href&&(t=s.href)}if(b()&&(t=window.wp.data.select("core/editor").getPermalink()),t||(t=we()),t&&e.aioseo.data.usingPermalinks&&ne()){const s=new URL(t),a=s.pathname.split("/").filter(r=>r!=="");a[0<a.length?a.length-1:0]=ne(),s.pathname=a.join("/")+(s.pathname.endsWith("/")?"/":""),s.search="",s.hash="",t=s.toString()}return decodeURIComponent(t)},wt=async(e=!0)=>{let t=St();const s=O();if(t!==s&&(t=s,t)){const a=m();if(S().updatePermalink(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},bt=e=>{var a;const t=e.getBody()||{},s=(t==null?void 0:t.childNodes)||[];return 1<s.length?!1:s.length===0?!0:1<((a=s[0])==null?void 0:a.childNodes.length)?!1:/^\n?$/.test((t==null?void 0:t.innerText)||(t==null?void 0:t.textContent)||"")},be=/base64,(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)/g,Ee=["acf","aioseo","core"],Pe=()=>{let e="";switch(!0){case K():e=j().content;break;case J():e=W().content;break;case U():e=H().content;break;case R():e=z().content;break;case D():e=V().content;break;case L():e=Z().content;break;case B():e=F().content;break}return e},Te=e=>{var a;if(!e.includes('<!-- wp:block {"ref":'))return e;const t=(a=window.wp.blocks)==null?void 0:a.rawHandler({HTML:e});return Je(t).forEach(r=>{var n,o,c;if(r.name==="core/block"){const i=window.wp.data.select("core").getEntityRecord("postType","wp_block",(n=r.attributes)==null?void 0:n.ref);(o=i==null?void 0:i.content)!=null&&o.raw&&(e=e.replace(`<!-- wp:block {"ref":${(c=r.attributes)==null?void 0:c.ref}} /-->`,i.content.raw))}}),e},ve=(e,t)=>(window.wp.data.select("core/block-editor").getBlocks().forEach(a=>{const[r,n]=a.name.split("/");if(t.includes(r)){if(r==="core"&&n!=="table")return;const o=document.getElementById("block-"+a.clientId);if(o&&o.innerText){const c=r==="core"?n:a.name,i=`<!-- wp:${c}.*?/wp:${c} -->|<!-- wp:${c}.*?/-->`;e=e.replace(new RegExp(i,"s"),o.innerText)}}}),e),Ce=()=>{const e=S();if(e.liveTags.post_content)return e.liveTags.post_content;let t="";if(v()&&!Y())if(window.tinyMCE||document.querySelector("#wp-content-wrap.html-active"))t=ee();else{const a=window.setInterval(()=>{window.tinyMCE&&(window.clearInterval(a),t=ee())},50)}return b()&&(t=window.wp.data.select("core/editor").getCurrentPost().content||"",t=Te(t),t=ve(t,Ee)),Y()&&(t=Pe()),m().currentPost.descriptionIncludeCustomFields&&(t=t+ye()),t=t.replace(be,""),t&&e.updatePostContent(t),t},_=(e=!1)=>{let t="";if(v()&&!Y())if(window.tinyMCE||document.querySelector("#wp-content-wrap.html-active"))t=ee();else{const a=window.setInterval(()=>{window.tinyMCE&&(window.clearInterval(a),t=ee())},50)}b()&&(t=window.wp.data.select("core/editor").getEditedPostContent(),t=Te(t),t=ve(t,Ee)),Y()&&(t=Pe());const s=m();return!e&&s.currentPost.descriptionIncludeCustomFields&&(t=t+ye()),t=t.replace(be,""),t},Et=async(e=!0)=>{let t=Ce();const s=_();if(t!==s){t=s;const a=m();if(S().updatePostContent(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},ee=()=>{let e;const t=window.tinyMCE?window.tinyMCE.get("content"):"";if(document.querySelector("#wp-content-wrap.tmce-active")&&t)e=t.getContent({format:bt(t)?"html":"raw"});else{const s=document.querySelector("textarea#content");e=s?s.value:""}return e};function Pt(e){return new Worker(""+window.__aioseoDynamicImportPreload__("main-4vgbr8_9.js"),{name:e==null?void 0:e.name})}class k{constructor(){T(this,"postId",null);T(this,"postTitle",null);T(this,"postParsedTitle",null);T(this,"postParsedDescription",null);T(this,"postDescription",null);T(this,"keyphrases",null);T(this,"postContent",null);T(this,"postSlug",null);T(this,"isAnalyzing",!1);T(this,"worker",null)}async runAnalysis({postId:t,postData:s,content:a=_(),slug:r=O()}){var y;const n=m(),o=C();if(s=s||{...n.currentPost},!((y=o.options.advanced)!=null&&y.truSeo)||!n.currentPost.page_analysis||this.isAnalyzing)return;this.worker&&this.worker.terminate();const c={separator:oe(o.options.searchAppearance.global.separator)},{parseTags:i}=Ve({separator:c.separator}),u=$(),l=S(),f=l.tags.map(P=>l.liveTags[P.id]!==void 0&&P.value!==l.liveTags[P.id]?{...P,value:l.liveTags[P.id]}:P),N={...ae(u.aioseo),tags:ae(f),currentPost:ae(n.currentPost)},g=JSON.parse(JSON.stringify({postId:t,postData:s,content:a,aioseo:N,slug:r,aioseoGlobals:c,postEditedTitle:xe(),postTitle:s.title||s.metaDefaults.title||"#post_title",postParsedTitle:i(s.title||s.metaDefaults.title||"#post_title"),postDescription:s.description||s.metaDefaults.description,postParsedDescription:i(s.description||s.metaDefaults.description)}));let h=[];this.worker=new Pt,this.worker.addEventListener("message",P=>{P.data.event==="tru-seo-analysis-complete"&&(h=P.data.analysis,this.dispatchActions(h,g),this.worker.terminate())}),this.worker.postMessage({event:"tru-seo-analysis",analysisData:g})}setSidebarButtonScore(t){const s=document.getElementById("aioseo-post-settings-sidebar-button"),a=document.getElementById("aioseo-post-score");!s||!a||(s.className=80<t?"score-green":50<t?"score-orange":"score-red",b()||(s.classList.add("aioseo-score-button","classic-editor"),t=`${t}/100`),a.textContent=t)}dispatchActions(t,s){const a=m();t.forEach(r=>{r.action==="updateState"&&s.postEditedTitle&&Oe()&&this.setSidebarButtonScore(r.data.seo_score),a[r.action](r.data)})}}const Ne=()=>{let e="";switch(!0){case K():e=j().title;break;case J():e=W().title;break;case U():e=H().title;break;case R():e=z().title;break;case D():e=V().title;break;case L():e=Z().title;break;case B():e=F().title;break}return e},Tt=()=>{const e=S();if(e.liveTags.post_title)return e.liveTags.post_title;let t;if(v()||x()){const s=document.querySelector("#post input#title");t=s?s.value:""}return b()&&(t=window.wp.data.select("core/editor").getCurrentPost().title),t||(t=Ne()),t&&e.updatePostTitle(t),t},xe=()=>{let e;if(v()||x()){const t=document.querySelector("#post input#title");e=t?t.value:""}return b()&&(e=window.wp.data.select("core/editor").getEditedPostAttribute("title")),e||(e=Ne()),e},vt=async(e=!0)=>{let t=Tt();const s=xe();if(t!==s){t=s;const a=m();if(S().updatePostTitle(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},ke=e=>e?(e=e.replaceAll(/\n\n/g," "),e=te(e,!1,"innerText"),e=e.replace(/\[.*?]/g,""),e.trim()):"",Ae=()=>{let e="";switch(!0){case K():e=j().excerpt;break;case J():e=W().excerpt;break;case U():e=H().excerpt;break;case R():e=z().excerpt;break;case D():e=V().excerpt;break;case L():e=Z().excerpt;break;case B():e=F().excerpt;break}return e},Ct=()=>{const e=S();if(e.liveTags.post_excerpt)return e.liveTags.post_excerpt;let t;return(v()||x())&&(t=_e()),b()&&(t=window.wp.data.select("core/editor").getCurrentPost().excerpt),t||(t=Ae()),t||(t=ke(Ce())),t&&e.updatePostExcerpt(t),t},Nt=()=>{let e;return(v()||x())&&(e=_e()),b()&&(e=window.wp.data.select("core/editor").getEditedPostAttribute("excerpt")),e||(e=Ae()),e||(e=ke(_())),e},xt=async(e=!0)=>{let t=Ct();const s=Nt();if(t!==s){t=s;const a=m();if(S().updatePostExcerpt(t),!e)return;new k().runAnalysis({postId:a.currentPost.id,postData:{...a.currentPost},content:_(),slug:O()})}},_e=()=>{let e="";const t=document.querySelector("#postexcerpt textarea#excerpt");if(e=t?t.value:"",document.querySelector("#wp-excerpt-wrap.tmce-active")){const s=window.tinyMCE?window.tinyMCE.get("excerpt"):"";s&&(e=s.getContent({format:"raw"}))}return e};let w="",A="";const kt=(e=!0)=>{var a,r,n,o,c,i,u;const t=S(),s=m();if(v()||x()){const l=document.querySelectorAll('#post input[name="post_category[]"]:checked');if(l.length){if((r=(a=s==null?void 0:s.currentPost)==null?void 0:a.primary_term)!=null&&r.category){const f=document.querySelector(`#categorychecklist input[value="${s.currentPost.primary_term.category}"]`);(n=f==null?void 0:f.parentNode)!=null&&n.innerText&&(w=f.parentNode.innerText,t.updateTaxonomyTitle(w))}else w!==l[0].parentNode.innerText&&(w=l[0].parentNode.innerText,t.updateTaxonomyTitle(l[0].parentNode.innerText));A=Array.from(l).map(f=>f.parentNode.innerText).join(", "),t.updateCategories(A)}else w!==""&&(w=A="",t.updateTaxonomyTitle(w),t.updateCategories(A))}if(b()){let l=[],f=[];const N=$();if(((o=N.aioseo.user.data.allcaps)!=null&&o.manageCategories||(c=N.aioseo.user.data.allcaps)!=null&&c.manage_categories)&&(l=window.wp.data.select("core").getEntityRecords("taxonomy","category"),f=window.wp.data.select("core/editor").getEditedPostAttribute("categories")),f&&f.length&&l){const g=((u=(i=s==null?void 0:s.currentPost)==null?void 0:i.primary_term)==null?void 0:u.category)||f[0],h=l.find(y=>y.id===g);h&&w!==h.name&&(w=h.name,t.updateTaxonomyTitle(w)),A=l.filter(y=>f.includes(y.id)).map(y=>y.name).join(", "),t.updateCategories(A)}else w!==""&&(w=A="",t.updateTaxonomyTitle(w),t.updateCategories(A))}e&&new k().runAnalysis({postId:s.currentPost.id})},At=(e=!1)=>{const t=m();if(t.currentPost.context!=="term")return;const s=S(),a=document.querySelector("#edittag input#name");a&&(s.updateTaxonomyTitle(a.value),a.addEventListener("input",()=>{s.updateTaxonomyTitle(a.value)}));const r=document.querySelector("#edittag textarea#description");r&&(s.updateTaxonomyDescription(r.value),r.addEventListener("input",()=>{s.updateTaxonomyDescription(r.value)}));const n=document.querySelector("#edittag input#slug");if(n){const o=G(n.value);s.updatePermalinkSlug(o),s.updatePermalink(t.currentPost.permalink.replace(`/${s.permalinkSlug}`,`/${o.replace(/ /gi,"-").replace(/[^a-z0-9-]/gi,"").toLowerCase()}`)),n.addEventListener("input",()=>{s.updatePermalinkSlug(o),s.updatePermalink(t.currentPost.permalink.replace(`/${s.permalinkSlug}`,`/${o.replace(/ /gi,"-").replace(/[^a-z0-9-]/gi,"").toLowerCase()}`))})}t.savePostState(),e&&k.runAnalysis({postId:t.currentPost.id})},_t=(e=!1)=>{const t=m();if(t.currentPost.postType!=="attachment")return;const s=S(),a=document.querySelector("textarea#attachment_caption");a&&(s.updateAttachmentCaption(a.value),a.addEventListener("input",i=>{s.updateAttachmentCaption(i.target.value)}));const r=document.querySelector("textarea#attachment-details-caption");r&&(s.updateAttachmentCaption(r.value),r.addEventListener("input",i=>{s.updateAttachmentCaption(i.target.value)}));const n=document.querySelector("textarea#attachment_content");n&&(s.updateAttachmentDescription(n.value),n.addEventListener("input",i=>{s.updateAttachmentDescription(i.target.value)}));const o=document.querySelector("input#attachment_alt");o&&(s.updateAltTag(o.value),o.addEventListener("input",i=>{s.updateAltTag(i.target.value)}));const c=document.querySelector("input#attachment-details-alt-text");c&&(s.updateAltTag(o.value),c.addEventListener("input",i=>{s.updateAltTag(i.target.value)})),e&&new k().runAnalysis({postId:t.currentPost.id})},Oe=()=>{var t,s;const e=m();return(t=e==null?void 0:e.currentPost)!=null&&t.id&&!!((s=e.currentPost)!=null&&s.isTruSeoEligible)||!1},Zt=()=>{var a,r,n;const e=$();if(!((a=e.aioseo.screen)!=null&&a.postType)||((r=e.aioseo.screen)==null?void 0:r.postType)==="web-story")return!1;const t=m();return!!((n=C().options.advanced)!=null&&n.truSeo&&Re(e.aioseo.screen.postType)&&!t.currentPost.isStaticPostsPage)},M=async(e=900,t=!0)=>{re(async()=>{const s=fe(),a=m();await vt(!1),await Et(!1),await xt(!1),await yt(!1),await wt(!1),kt(!1),At(!1),_t(!1),re(s.updateSchemaOutput,Math.max(e*2,1800)),t&&new k().runAnalysis({postId:a.currentPost.id})},e)},Ft=e=>{const t=e.getRangeAt(0),s=t.cloneRange();return s.collapse(!1),e.removeAllRanges(),e.addRange(s),e.extend(t.startContainer,t.startOffset),e},Xt=e=>{const t=new RegExp(" ","g");return e.replace(/&nbsp;/g," ").replace(t," ")},Qt=({element:e,property:t,value:s})=>{if(!e)return document.documentElement;let a=e.parentElement;for(;a;){if(a.isEqualNode(document.documentElement)||s===document.defaultView.getComputedStyle(a).getPropertyValue(t))return a;a=a.parentElement}},Yt=()=>{const e=document.createElement("div");return e.classList.add("aioseo-app"),e.style.position="absolute",e.style.zIndex="999",e.style.display="flex",e.setAttribute("tabindex",-1),e};export{Xt as A,Kt as B,Qt as C,Ft as D,Yt as E,We as F,k as T,Ve as a,j as b,W as c,V as d,F as e,ze as f,te as g,_ as h,kt as i,Oe as j,At as k,_t as l,M as m,xe as n,Ct as o,Wt as p,z as q,Zt as r,je as s,jt as t,fe as u,Z as v,zt as w,Ht as x,Vt as y,ne as z};