관리-도구
편집 파일: Main.hgdabzxf.js
import{u as T,b as V,l as I}from"./index.ba51ghj9.js";import E from"./BadBotBlocker.no7lip8g.js";import{C as R}from"./Index.fxj7ex2u.js";import U from"./DatabaseTools.oxsx519d.js";import{C as Y,S as H}from"./Caret.dwp6xpza.js";import{C as K}from"./Card.0q0mr1wq.js";import{C as z}from"./Tabs.opo0ypfq.js";import{C as P}from"./Index.kqt70nj0.js";import{C as F}from"./Upload.m21pxd0d.js";import{C as G}from"./SettingsRow.d9u0swi1.js";import{B as W}from"./Checkbox.cv4w58s0.js";import{G as q,a as J}from"./Row.h4gujlzc.js";import"./translations.b896ab1m.js";import{_ as v}from"./_plugin-vue_export-helper.oebm7xum.js";import{_ as D,a as w}from"./default-i18n.hohxoesu.js";import{v as a,o as n,c as h,C as p,l as d,F as x,J as L,k as g,x as A,t as m,a as l,b as k,q as M,E as j}from"./runtime-dom.esm-bundler.h3clfjuw.js";import{D as Q}from"./datetime.hyfm7zez.js";import{u as X}from"./ToolsStore.hg4wu5k3.js";import Z from"./HtaccessEditor.nkfzypeb.js";import ee from"./ImportExport.ooku5geq.js";import oe from"./RobotsEditor.l7yf13bk.js";import te from"./SystemStatus.gdsowsat.js";import se from"./WpCode.e7egz5fw.js";import"./helpers.lwqbledo.js";import"./Textarea.gulsuctc.js";import"./Tooltip.i4md1nj9.js";import"./index.kaabvvzj.js";import"./Slide.dop8j51m.js";import"./vue-router.eypfdvl5.js";import"./license.ij9c7ra4.js";import"./upperFirst.bgyeasim.js";import"./_stringToArray.mpukyt2g.js";import"./toString.oppn28a8.js";import"./allowed.o46uhc7o.js";/* empty css */import"./params.k8e95b6q.js";import"./Header.k1z0z7e2.js";import"./addons.eq04tz3m.js";import"./LicenseKeyBar.gh3b5rkr.js";import"./ScrollTo.ntqtkazp.js";import"./LogoGear.gxsz2m6s.js";import"./AnimatedNumber.mqxvivps.js";import"./numbers.busvl4mt.js";import"./Logo.nueehhao.js";import"./Support.eets7z2w.js";import"./date.ozs95ujh.js";import"./constants.hcfrsngk.js";import"./Url.e5jo61ge.js";import"./Exclamation.f0pmbpi9.js";import"./Gear.dx9icaxx.js";import"./Network.ftjr0n1b.js";import"./ToolsSettings.ky78qcmu.js";import"./Checkmark.d5kkjaf5.js";import"./Blur.mu93d3e2.js";import"./Index.jq0lth54.js";import"./RequiredPlans.fcb8z72b.js";import"./TruSeoScore.das28gz4.js";import"./postSlug.ms4f44w2.js";import"./metabox.y83zoorm.js";import"./cleanForSlug.dzbbaoug.js";import"./_baseTrim.ohbpllmu.js";import"./_baseSet.ipousrvi.js";import"./regex.bekpgw04.js";import"./ProBadge.e32os6n3.js";import"./Information.djrr3pec.js";import"./Ellipse.mhzh8c2h.js";import"./Editor.ipgvvrs0.js";import"./isEqual.dwjbg1yu.js";import"./_baseIsEqual.j7gru8tk.js";import"./_getTag.fx9iqlmr.js";import"./_baseClone.n1l9l19s.js";import"./_arrayEach.n8ou32wp.js";import"./Plus.e1tf1dpc.js";import"./History.hax23um8.js";import"./Refresh.mu9plox9.js";import"./Radio.n2kbmrhz.js";import"./Download.cmimu09k.js";import"./vuedraggable.umd.nq8tf44u.js";import"./External.h5te4wqm.js";import"./Row.ld0va2bo.js";const ie="all-in-one-seo-pack",ne={emits:["update"],setup(){return{rootStore:T()}},components:{BaseCheckbox:W,GridColumn:q,GridRow:J},props:{loading:Boolean,disabled:Boolean},data(){return{options:{},strings:{updateOptions:D("Update Options",ie)}}},mounted(){this.rootStore.aioseo.deprecatedOptions.forEach(e=>{e.enabled&&(this.options[e.value]=!0)})}},re={class:"aioseo-deprecated-options"},ae=l("br",null,null,-1),le=l("br",null,null,-1),ce=l("br",null,null,-1);function de(e,t,i,u,o,r){const c=a("base-checkbox"),b=a("grid-column"),S=a("grid-row"),f=a("base-button");return n(),h("div",re,[p(S,{class:"settings"},{default:d(()=>[(n(!0),h(x,null,L(u.rootStore.aioseo.deprecatedOptions,(_,y)=>(n(),g(b,{key:y,xl:"6",sm:"12"},{default:d(()=>[p(c,{size:"medium",modelValue:o.options[_.value],"onUpdate:modelValue":C=>o.options[_.value]=C,disabled:i.disabled},{default:d(()=>[A(m(_.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1024))),128))]),_:1}),ae,p(f,{type:"blue",size:"medium",onClick:t[0]||(t[0]=_=>e.$emit("update",o.options)),loading:i.loading,disabled:i.disabled},{default:d(()=>[A(m(o.strings.updateOptions),1)]),_:1},8,["loading","disabled"]),le,ce])}const ue=v(ne,[["render",de]]),pe={setup(){return{optionsStore:V()}},computed:{infoItems(){return[{label:"Migrated Version",value:this.optionsStore.internalOptions.internal.migratedVersion},{label:"First Activated",value:this.optionsStore.internalOptions.internal.firstActivated!==0?Q.fromMillis(this.optionsStore.internalOptions.internal.firstActivated*1e3).toFormat("MMMM d, yyyy"):!1}]}}},me={class:"v3-migration-info aioseo-description"},he={class:"info-items"},ge={key:0},_e={key:1};function be(e,t,i,u,o,r){return n(),h("div",me,[l("ul",he,[(n(!0),h(x,null,L(r.infoItems,(c,b)=>(n(),h("li",{key:b},[c.value?(n(),h("span",ge,m(c.label),1)):k("",!0),c.value?(n(),h("span",_e,m(c.value),1)):k("",!0)]))),128))])])}const fe=v(pe,[["render",be]]),we={setup(){return{rootStore:T(),toolsStore:X()}},components:{CoreAlert:Y,CoreCard:K,CoreMainTabs:z,CoreModal:P,CoreNetworkSiteSelector:F,CoreSettingsRow:G,DeprecatedOptions:ue,MigrationInfo:fe,SvgClose:H},props:{extraActions:{type:Array,required:!1}},data(){return{site:{},tabsKey:0,doingActionKey:0,activeTab:"general",currentAction:"",showAreYouSureModal:!1,doingAction:[],strings:{selectSite:"Select Site",cardLabel:"Debug",selectLabel:"Select a Debug Action:",buttonLabel:"Run Action",alertWarning:"Before you run any action, please make sure that you have fully read the description and understand the consequences as these cannot be reverted.",cannotBeUndone:"This action cannot be undone.",yesDoAction:"Yes, run this action",noChangedMind:"No, I changed my mind"},alertLink:I.getPlainLink("Click here to open to the Scheduled Actions panel",this.rootStore.aioseo.urls.admin.scheduledActions,!0)}},computed:{areYouSureTitle(){return`Are you sure you want to run the "${this.currentAction.label}" action?`},tabs(){const e=w('<a href="%1$s" target="_blank">Scheduled Actions</a>',this.rootStore.aioseo.urls.admin.scheduledActions),t=this.rootStore.aioseo.data.isNetworkAdmin?"<br><strong>NOTE: If no site is selected, this will clear the network cache.</strong>":"",i=this.rootStore.aioseo.data.isNetworkAdmin?"<br><strong>NOTE: If no site is selected, this will clear the network plugin updates transient.</strong>":"";return[{slug:"general",name:"General",actions:[{label:"Clear Cache",slug:"clear-cache",shortDescription:`This action deletes all records of the <code>aioseo_cache</code> table in the database.${t}`,longDescription:"",showModal:!1,network:!0},{label:"Clear Plugin Updates Transient",slug:"clear-plugin-updates-transient",shortDescription:`This action clears the plugin updates transient, which forces WordPress Core to check for plugin updates.${i}`,longDescription:"",showModal:!1,network:!0},{label:"Readd Capabilities",slug:"readd-capabilities",shortDescription:"This action will readd our capabilities (access permissions) for all users.",longDescription:"",showModal:!1},{label:"Reset Data",slug:"reset-data",shortDescription:"This action will <strong>delete</strong> all our custom tables and options.",longDescription:"",showModal:!0}]},{slug:"sitemap",name:"Sitemap",actions:[{label:"Clear Image Data",slug:"clear-image-data",shortDescription:"This action removes all image data from the database, forcing a site-wide rescan via Action Scheduler.",longDescription:w("To speed up the image scan, go to %1$s and run the <code>aioseo_image_sitemap_scan</code> action.",e),showModal:!1}]},{slug:"migrations",name:"Migrations",actions:[{label:"Rerun V4+ Migrations",slug:"rerun-migrations",shortDescription:"This action will rerun all update migrations since 4.0.0, excluding the V3 migration.",longDescription:"",showModal:!0}]},{slug:"old-issues",name:"Old Issues",actions:[{label:"Remove Duplicates",slug:"remove-duplicates",shortDescription:"This action will delete any duplicate records that are found in the <code>aioseo_posts</code> and <code>aioseo_terms</code> tables.",longDescription:"",showModal:!1},{label:"Unescape Data",slug:"unescape-data",shortDescription:"This action will clean <code>aioseo_posts</code> and <code>aioseo_term</code> records whose data is corrupted.",longDescription:w("The action will trigger a routine which runs in batches via Action Scheduler. It may take some time for this routine to complete, To speed up this process, go to %1$s and run the <code>aioseo_unslash_escaped_data_posts</code> or <code>aioseo_unslash_escaped_data_terms</code> action.",e),showModal:!1}]},{slug:"deprecated-options",name:"Deprecated Options",actions:[{label:"Deprecated Options",slug:"deprecated-options",shortDescription:"Enable or disable any options that have been deprecated in AIOSEO.",longDescription:"<strong>These options are not guaranteed to work and all support has been dropped.</strong>",showModal:!1,component:"deprecated-options"}]}]},activeTabObject(){return this.tabs.find(e=>e.slug===this.activeTab)}},methods:{isActionDisabled(e){return this.rootStore.aioseo.data.isNetworkAdmin?this.site.blog_id?this.site.blog_id==="network"&&e.network?!1:this.site.blog_id==="network"&&!e.network:!0:!1},isLoading(e){return!!this.doingAction[e.slug]},getSelectedActionObject(e){let t=null;return this.actions.forEach(i=>{const u=i.options.find(o=>o.value===e);u&&(t=u)}),t},maybeDoAction(e,t){if(this.currentAction=e,e.showModal){this.showAreYouSureModal=!0;return}this.doAction(t)},doAction(e){this.doingAction[this.currentAction.slug]=!0,this.showAreYouSureModal=!1,this.doingActionKey++,this.toolsStore.doTask({action:this.currentAction.slug,siteId:this.site.blog_id||this.rootStore.aioseo.data.currentBlogId,data:e}).then(()=>{console.log(`Action "${this.currentAction.label}" has been completed.`)}).catch(t=>{console.error(`Action "${this.currentAction.label}" could not be completed: `,t)}).finally(()=>{this.doingAction[this.currentAction.slug]=!1,this.doingActionKey++})}},beforeMount(){var t;let e=-1;if(this.rootStore.aioseo.data.v3Options&&(e=this.tabs.findIndex(i=>i.slug.toLowerCase()==="migrations"),e!==-1)){const i=w('<a href="%1$s" target="_blank">Scheduled Actions</a>',this.rootStore.aioseo.urls.admin.scheduledActions);this.tabs[e].actions.push({label:"Rerun V3 Migration",slug:"restart-v3-migration",shortDescription:"This action restarts the migration from V3 to V4.",longDescription:w("All settings will be migrated immediately. However, the post/term meta needs to be migrated via a routine which runs in batches via Action Scheduler. To speed up the post/term meta migration, go to %1$s and run the <code>aioseo_migrate_post_meta</code> or <code>aioseo_migrate_term_meta</code> action.",i),infoComponent:"MigrationInfo",showModal:!0})}(t=this.extraActions)!=null&&t.length&&this.extraActions.forEach(i=>{if(e=this.tabs.findIndex(u=>u.slug.toLowerCase()===i.slug.toLowerCase()),e!==-1){this.tabs[e].actions=this.tabs[e].actions.concat(i.actions);return}this.tabs.push(i)})}},Ae={class:"aioseo-tools-debug"},ve={key:0,class:"aioseo-settings-row"},ke={class:"select-site"},Se=["innerHTML"],ye=["innerHTML"],Ce=["innerHTML"],De={class:"aioseo-modal-body"},Me=["innerHTML"];function Te(e,t,i,u,o,r){const c=a("core-network-site-selector"),b=a("core-alert"),S=a("core-main-tabs"),f=a("base-button"),_=a("core-settings-row"),y=a("svg-close"),C=a("core-modal"),B=a("core-card");return n(),h("div",Ae,[p(B,{slug:"debug","header-text":o.strings.cardLabel},{default:d(()=>[u.rootStore.aioseo.data.isNetworkAdmin?(n(),h("div",ve,[l("div",ke,m(o.strings.selectSite),1),p(c,{onSelectedSite:t[0]||(t[0]=s=>o.site=s),"show-network":""})])):k("",!0),p(b,{type:"yellow"},{default:d(()=>[l("div",null,m(o.strings.alertWarning),1),l("div",{innerHTML:o.alertLink},null,8,Se)]),_:1}),(n(),g(S,{internal:"",key:o.tabsKey,tabs:r.tabs,active:o.activeTab,showSaveButton:!1,onChanged:t[1]||(t[1]=s=>o.activeTab=s)},null,8,["tabs","active"])),(n(!0),h(x,null,L(r.activeTabObject.actions,(s,N)=>(n(),g(_,{key:o.activeTab+N,name:s.label,align:""},{content:d(()=>[s.component?(n(),g(M(s.component),{key:0,onUpdate:$=>r.maybeDoAction(s,$),loading:o.doingAction[s.slug],disabled:r.isActionDisabled(s)},null,40,["onUpdate","loading","disabled"])):(n(),g(f,{type:"blue",size:"medium",onClick:$=>r.maybeDoAction(s),loading:o.doingAction[s.slug],key:o.doingActionKey,disabled:r.isActionDisabled(s)},{default:d(()=>[A(m(o.strings.buttonLabel),1)]),_:2},1032,["onClick","loading","disabled"])),l("div",{class:"aioseo-description",innerHTML:s.shortDescription},null,8,ye),l("div",{class:"aioseo-description",innerHTML:s.longDescription},null,8,Ce),s.infoComponent?(n(),g(M(s.infoComponent),{key:2})):k("",!0)]),_:2},1032,["name"]))),128)),p(C,{show:o.showAreYouSureModal,"no-header":"",onClose:t[5]||(t[5]=s=>o.showAreYouSureModal=!1),classes:["aioseo-debug-modal"]},{body:d(()=>[l("div",De,[l("button",{class:"close",onClick:t[3]||(t[3]=j(s=>o.showAreYouSureModal=!1,["stop"]))},[p(y,{onClick:t[2]||(t[2]=s=>o.showAreYouSureModal=!1)})]),l("h3",null,m(r.areYouSureTitle),1),l("div",{class:"description",innerHTML:o.strings.cannotBeUndone},null,8,Me),p(f,{type:"blue",size:"medium",onClick:r.doAction},{default:d(()=>[A(m(o.strings.yesDoAction),1)]),_:1},8,["onClick"]),p(f,{type:"gray",size:"medium",onClick:t[4]||(t[4]=s=>o.showAreYouSureModal=!1)},{default:d(()=>[A(m(o.strings.noChangedMind),1)]),_:1})])]),_:1},8,["show"])]),_:1},8,["header-text"])])}const xe=v(we,[["render",Te]]),Le={components:{Debug:xe}};function $e(e,t,i,u,o,r){const c=a("debug",!0);return n(),g(c)}const Oe=v(Le,[["render",$e]]),O="all-in-one-seo-pack",Be={setup(){return{rootStore:T()}},components:{BadBotBlocker:E,CoreMain:R,DatabaseTools:U,Debug:Oe,HtaccessEditor:Z,ImportExport:ee,RobotsEditor:oe,SystemStatus:te,WpCode:se},data(){return{strings:{pageName:this.rootStore.aioseo.data.isNetworkAdmin?D("Network Tools",O):D("Tools",O)}}},computed:{showSaveButton(){return this.$route.name!=="system-status"&&this.$route.name!=="import-export"&&this.$route.name!=="database-tools"&&this.$route.name!=="debug"&&this.$route.name!=="wp-code"}}};function Ne(e,t,i,u,o,r){const c=a("core-main");return n(),g(c,{"page-name":o.strings.pageName,"show-save-button":r.showSaveButton},{default:d(()=>[(n(),g(M(e.$route.name)))]),_:1},8,["page-name","show-save-button"])}const lt=v(Be,[["render",Ne]]);export{lt as default};