관리-도구
편집 파일: Tabs.opo0ypfq.js
import{r as de,aP as pt,w as X,O as De,aZ as Ne,i as vt,f as S,y as Fe,n as le,aX as je,b3 as ht,N as te,p as mt,g as w,u as bt,aS as yt,a2 as Co,F as K,Y as Po,h as Eo,o as v,c as _,a as T,m as z,G as M,j as U,e as fe,X as gt,Q as Ve,k as V,l as N,B as wt,q as He,T as _t,v as E,R as St,C as D,J as ie,t as A,b as $,x as se,E as _e}from"./runtime-dom.esm-bundler.h3clfjuw.js";import{u as Tt}from"./vue-router.eypfdvl5.js";import{u as Ye,b as $t,e as Ct,r as Pt}from"./index.ba51ghj9.js";import{u as Et}from"./TruSeoScore.das28gz4.js";import{_ as Mt,a as kt,c as Ot}from"./Caret.dwp6xpza.js";import{C as At}from"./ProBadge.e32os6n3.js";import{S as Lt}from"./Information.djrr3pec.js";import{S as Rt}from"./Ellipse.mhzh8c2h.js";import{T as Bt}from"./Slide.dop8j51m.js";import"./translations.b896ab1m.js";import{_ as It}from"./_plugin-vue_export-helper.oebm7xum.js";import{_ as Se}from"./default-i18n.hohxoesu.js";const zt=()=>({processSaveChanges:t=>{window.aioseoBus.$emit("saving-changes");const n=Ye();n.loading=!0;let o=!1,r=!1,i="saveChanges";setTimeout(()=>{o=!0,r&&(n.loading=!1)},1500);const a=$t();t==="htaccess-editor"&&(i="saveHtaccess",a.htaccessError=null),n.aioseo.data.isNetworkAdmin&&t==="robots-editor"&&(i="saveNetworkRobots"),a[i]().then(l=>{l&&l.body.redirection||(o||t==="htaccess-editor"?n.loading=!1:r=!0,window.aioseoBus.$emit("changes-saved"))})}}),Xe={locks:{},zIndex:2e3,enableRipple:!0};de(Xe);var Ue=de(Xe),Wt=Object.defineProperty,xt=Object.defineProperties,Dt=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Ft=Object.prototype.propertyIsEnumerable,$e=(e,t,n)=>t in e?Wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jt=(e,t)=>{for(var n in t||(t={}))Nt.call(t,n)&&$e(e,n,t[n]);if(Te)for(var n of Te(t))Ft.call(t,n)&&$e(e,n,t[n]);return e},Vt=(e,t)=>xt(e,Dt(t)),k=e=>typeof e=="string",Ht=e=>typeof e=="boolean",pe=e=>typeof e=="number",qe=e=>pe(e)||k(e)&&/^[-+]?\d+$/.test(e),Yt=e=>Object.prototype.toString.call(e)==="[object Object]";var Xt=e=>typeof e=="function",Ke=e=>Array.isArray(e);var Ut=e=>e===window,qt=()=>ne()&&"ontouchstart"in window,ne=()=>typeof window<"u";var{hasOwnProperty:Do}=Object.prototype;var Ce=(e,t)=>{if(e.length){const n=e.indexOf(t);if(n>-1)return e.splice(n,1)}};var Kt=(...e)=>e.map(t=>{if(Ke(t)){const[n,o,r=null]=t;return n?o:r}return t}),Zt=()=>typeof globalThis<"u"?globalThis:ne()?window:typeof global<"u"?global:self,ce=e=>{const t=Zt();return t.requestAnimationFrame?t.requestAnimationFrame(e):t.setTimeout(e)};var Gt=()=>new Promise(e=>{ce(e)}),Ze=()=>new Promise(e=>{ce(()=>{ce(e)})}),ve=e=>window.getComputedStyle(e),G=e=>{if(Ut(e)){const t=e.innerWidth,n=e.innerHeight,o={x:0,y:0,top:0,left:0,right:t,bottom:n,width:t,height:n};return Vt(jt({},o),{toJSON:()=>o})}return e.getBoundingClientRect()};var Jt=e=>{const t="scrollTop"in e?e.scrollTop:e.scrollY;return Math.max(t,0)},Qt=e=>{const t="scrollLeft"in e?e.scrollLeft:e.scrollX;return Math.max(t,0)};function F(e,...t){if(Ke(e))return e.map(n=>n(...t));if(e)return e(...t)}var Ge=e=>e==null?0:k(e)?(e=parseFloat(e),e=Number.isNaN(e)?0:e,e):Ht(e)?Number(e):e,en=(e,t,n)=>Math.min(n,Math.max(t,e));var tn=e=>nn(e).replace(e.charAt(0),e.charAt(0).toUpperCase()),nn=e=>e.replace(/-(\w)/g,(t,n)=>n.toUpperCase());function on(e){return t=>{const n=`${e}-${t}`,o=r=>r?r[0]==="$"?r.replace("$",e):r.startsWith("--")?`${n}${r}`:`${n}__${r}`:n;return{name:tn(n),n:o,classes:Kt}}}var rn=Object.defineProperty,J=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,Pe=(e,t,n)=>t in e?rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sn=(e,t)=>{for(var n in t||(t={}))Je.call(t,n)&&Pe(e,n,t[n]);if(J)for(var n of J(t))Qe.call(t,n)&&Pe(e,n,t[n]);return e},an=(e,t)=>{var n={};for(var o in e)Je.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&J)for(var o of J(e))t.indexOf(o)<0&&Qe.call(e,o)&&(n[o]=e[o]);return n};function et(e){let t=!1;Fe(()=>{e(),le(()=>{t=!0})}),je(()=>{t&&e()})}function ue(e,t,n,o={}){if(!ne())return;const{passive:r=!1,capture:i=!1}=o;let a=!1,l=!1;const s=f=>Xt(f)?f():bt(f),c=f=>{if(a||l)return;const b=s(f);b&&(b.addEventListener(t,n,{passive:r,capture:i}),a=!0)},d=f=>{if(!a||l)return;const b=s(f);b&&(b.removeEventListener(t,n,{capture:i}),a=!1)};let h;pt(e)&&(h=X(()=>e.value,(f,b)=>{d(b),c(f)}));const m=()=>{h==null||h(),d(e),l=!0};return et(()=>{c(e)}),De(()=>{d(e)}),Ne(()=>{d(e)}),m}function ln(e){let t=!1;Ne(()=>{t=!0,e()}),ht(()=>{t||e()})}function cn(e){const t=te();return e in t.provides}function un(e){if(!cn(e))return{index:null,parentProvider:null,bindParent:null};const n=vt(e),{childInstances:o,collect:r,clear:i}=n,a=an(n,["childInstances","collect","clear"]),l=te();return{index:S(()=>o.indexOf(l)),parentProvider:a,bindParent:d=>{Fe(()=>{le().then(()=>{r(l,d)})}),De(()=>{le().then(()=>{i(l,d)})})}}}function dn(e){const t=[],n=o=>{if(o!=null&&o.component){n(o==null?void 0:o.component.subTree);return}Array.isArray(o==null?void 0:o.children)&&o.children.forEach(r=>{yt(r)&&(t.push(r),n(r))})};return n(e),t}function fn(e){const t=te(),n=de([]),o=[],r=S(()=>n.length),i=()=>{const c=dn(t.subTree);n.sort((d,h)=>c.indexOf(d.vnode)-c.indexOf(h.vnode))},a=(c,d)=>{n.push(c),o.push(d),i()},l=(c,d)=>{Ce(n,c),Ce(o,d)};return{length:r,childProviders:o,bindChildren:c=>{mt(e,sn({childInstances:n,collect:a,clear:l},c))}}}function tt(e){ue(()=>window,"resize",e,{passive:!0}),ue(()=>window,"orientationchange",e,{passive:!0})}var pn=Object.defineProperty,vn=Object.defineProperties,hn=Object.getOwnPropertyDescriptors,Ee=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,Me=(e,t,n)=>t in e?pn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yn=(e,t)=>{for(var n in t||(t={}))mn.call(t,n)&&Me(e,n,t[n]);if(Ee)for(var n of Ee(t))bn.call(t,n)&&Me(e,n,t[n]);return e},gn=(e,t)=>vn(e,hn(t));function ae(e,t){return Array.isArray(t)?t.reduce((n,o)=>(n[o]=e[o],n),{}):e[t]}function he(e,t){const n=t??e;return n.install=function(o){const{name:r}=e;r&&o.component(r,e)},n}function me(e,t){e.setPropsDefaults=function(n){Object.entries(n).forEach(([o,r])=>{const i=t[o];if(i!=null){if(Yt(i)){t[o]=gn(yn({},i),{default:r});return}t[o]={type:i,default:r}}})}}const oe=on("var");function H(e){return{type:[Function,Array],default:e}}function wn(e,t){return e===!1?null:(e===!0&&t&&(e=t),`var-elevation--${e}`)}var _n=Object.defineProperty,Sn=Object.defineProperties,Tn=Object.getOwnPropertyDescriptors,ke=Object.getOwnPropertySymbols,$n=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,Oe=(e,t,n)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t)=>{for(var n in t||(t={}))$n.call(t,n)&&Oe(e,n,t[n]);if(ke)for(var n of ke(t))Cn.call(t,n)&&Oe(e,n,t[n]);return e},Pn=(e,t)=>Sn(e,Tn(t));const{n:ot}=oe("ripple"),Ae=250;function En(e){const{zIndex:t,position:n}=ve(e);e.style.overflow="hidden",e.style.overflowX="hidden",e.style.overflowY="hidden",n==="static"&&(e.style.position="relative"),t==="auto"&&(e.style.zIndex="1")}function Le(e){return"touches"in e}function Mn(e,t){const{top:n,left:o}=G(e),{clientWidth:r,clientHeight:i}=e,a=Math.sqrt(r**2+i**2)/2,l=a*2,s=Le(t)?t.touches[0].clientX-o:r/2,c=Le(t)?t.touches[0].clientY-n:i/2,d=(r-a*2)/2,h=(i-a*2)/2,m=s-a,f=c-a;return{x:m,y:f,centerX:d,centerY:h,size:l}}function be(e){const t=this._ripple;if(t.removeRipple(),t.disabled||t.tasker||!Ue.enableRipple)return;const n=()=>{t.tasker=null;const{x:o,y:r,centerX:i,centerY:a,size:l}=Mn(this,e),s=document.createElement("div");s.classList.add(ot()),s.style.opacity="0",s.style.transform=`translate(${o}px, ${r}px) scale3d(.3, .3, .3)`,s.style.width=`${l}px`,s.style.height=`${l}px`,t.color&&(s.style.backgroundColor=t.color),s.dataset.createdAt=String(performance.now()),En(this),this.appendChild(s),window.setTimeout(()=>{s.style.transform=`translate(${i}px, ${a}px) scale3d(1, 1, 1)`,s.style.opacity=".25"},20)};t.tasker=window.setTimeout(n,30)}function Q(){const e=this._ripple,t=()=>{const n=this.querySelectorAll(`.${ot()}`);if(!n.length)return;const o=n[n.length-1],r=Ae-performance.now()+Number(o.dataset.createdAt);window.setTimeout(()=>{o.style.opacity="0",window.setTimeout(()=>{var i;return(i=o.parentNode)==null?void 0:i.removeChild(o)},Ae)},r)};e.tasker?window.setTimeout(t,30):t()}function rt(){if(!qt()||!Ue.enableRipple)return;const e=this._ripple;e.tasker&&window.clearTimeout(e.tasker),e.tasker=null}let ee=!1;function kn(e){ee||!(e.key===" "||e.key==="Enter")||(be.call(this,e),ee=!0)}function Re(){ee&&(Q.call(this),ee=!1)}function On(e,t){var n;e._ripple=Pn(nt({tasker:null},(n=t.value)!=null?n:{}),{removeRipple:Q.bind(e)}),e.addEventListener("touchstart",be,{passive:!0}),e.addEventListener("touchmove",rt,{passive:!0}),e.addEventListener("dragstart",Q,{passive:!0}),e.addEventListener("keydown",kn),e.addEventListener("keyup",Re),e.addEventListener("blur",Re),document.addEventListener("touchend",e._ripple.removeRipple,{passive:!0}),document.addEventListener("touchcancel",e._ripple.removeRipple,{passive:!0}),document.addEventListener("dragend",e._ripple.removeRipple,{passive:!0})}function An(e){e.removeEventListener("touchstart",be),e.removeEventListener("touchmove",rt),e.removeEventListener("dragstart",Q),!(!e._ripple||!e._ripple.removeRipple)&&(document.removeEventListener("touchend",e._ripple.removeRipple),document.removeEventListener("touchcancel",e._ripple.removeRipple),document.removeEventListener("dragend",e._ripple.removeRipple))}function Ln(e,t){var n,o,r,i,a,l;const s={color:(n=t.value)==null?void 0:n.color,disabled:(o=t.value)==null?void 0:o.disabled};(s.color!==((r=e._ripple)==null?void 0:r.color)||s.disabled!==((i=e._ripple)==null?void 0:i.disabled))&&(e._ripple=nt({tasker:s.disabled?null:(a=e._ripple)==null?void 0:a.tasker,removeRipple:(l=e._ripple)==null?void 0:l.removeRipple},s))}const Rn={mounted:On,unmounted:An,updated:Ln,install(e){e.directive("ripple",this)}};var Bn=Rn;function In(e,t){throw Error(`Varlet [${e}]: ${t}`)}function zn(e){let t=e;for(;t&&!(!t.parentNode||(t=t.parentNode,t===document.body||t===document.documentElement));){const n=/(scroll|auto)/,{overflowY:o,overflow:r}=ve(t);if(n.test(o)||n.test(r))return t}return window}function Wn(){const{width:e,height:t}=G(window);return{vw:e,vh:t,vMin:Math.min(e,t),vMax:Math.max(e,t)}}const xn=e=>k(e)&&e.endsWith("rem"),Dn=e=>k(e)&&e.endsWith("px")||pe(e),Nn=e=>k(e)&&e.endsWith("vw"),Fn=e=>k(e)&&e.endsWith("vh"),jn=e=>k(e)&&e.endsWith("vmin"),Vn=e=>k(e)&&e.endsWith("vmax"),Hn=e=>{if(qe(e))return Number(e);if(Dn(e))return+e.replace("px","");if(!ne())return 0;const{vw:t,vh:n,vMin:o,vMax:r}=Wn();if(Nn(e))return+e.replace("vw","")*t/100;if(Fn(e))return+e.replace("vh","")*n/100;if(jn(e))return+e.replace("vmin","")*o/100;if(Vn(e))return+e.replace("vmax","")*r/100;if(xn(e)){const i=+e.replace("rem",""),a=ve(document.documentElement).fontSize;return i*parseFloat(a)}return k(e)?Ge(e):0},Yn=e=>{if(e!=null)return qe(e)?`${e}px`:String(e)};function Be(e,{top:t=0,left:n=0,duration:o=300,animation:r}){const i=Date.now(),a=Jt(e),l=Qt(e);return new Promise(s=>{const c=()=>{const d=(Date.now()-i)/o;if(d<1){const h=a+(t-a)*r(d),m=l+(n-l)*r(d);e.scrollTo(m,h),requestAnimationFrame(c)}else e.scrollTo(n,t),s()};requestAnimationFrame(c)})}const No=["button","input","select","textarea","[tabindex]","[href]"].map(e=>`${e}:not([disabled])`).join(", ");const Ie=e=>e;const Y={offsetTop:{type:[String,Number],default:0},zIndex:{type:[String,Number],default:10},cssMode:Boolean,disabled:Boolean,onScroll:H()};var ze=(e,t,n)=>new Promise((o,r)=>{var i=s=>{try{l(n.next(s))}catch(c){r(c)}},a=s=>{try{l(n.throw(s))}catch(c){r(c)}},l=s=>s.done?o(s.value):Promise.resolve(s.value).then(i,a);l((n=n.apply(e,t)).next())});const{name:Xn,n:Un,classes:qn}=oe("sticky");function Kn(e,t){return v(),_("div",{class:M(e.classes(e.n(),[e.enableCSSMode,e.n("--css-mode")])),ref:"stickyEl",style:U({zIndex:e.toNumber(e.zIndex),top:e.enableCSSMode?`${e.offsetTop}px`:void 0,width:e.enableFixedMode?e.fixedWidth:void 0,height:e.enableFixedMode?e.fixedHeight:void 0})},[T("div",{class:M(e.n("wrapper")),ref:"wrapperEl",style:U({zIndex:e.toNumber(e.zIndex),position:e.enableFixedMode?"fixed":void 0,width:e.enableFixedMode?e.fixedWrapperWidth:void 0,height:e.enableFixedMode?e.fixedWrapperHeight:void 0,left:e.enableFixedMode?e.fixedLeft:void 0,top:e.enableFixedMode?e.fixedTop:void 0})},[z(e.$slots,"default")],6)],6)}const it=fe({name:Xn,props:Y,setup(e){const t=w(null),n=w(null),o=w(!1),r=w("0px"),i=w("0px"),a=w("auto"),l=w("auto"),s=w("auto"),c=w("auto"),d=S(()=>!e.disabled&&e.cssMode),h=S(()=>!e.disabled&&!e.cssMode&&o.value),m=S(()=>Hn(e.offsetTop));let f;X(()=>e.disabled,L),et(()=>ze(this,null,function*(){yield Ze(),u(),g()})),ln(W),tt(L),ue(()=>window,"scroll",g);function b(){const{cssMode:C,disabled:x}=e;if(x)return;let R=0;if(f&&f!==window){const{top:p}=G(f);R=p}const B=n.value,I=t.value,{top:re,left:O}=G(I),q=re-R;return q<=m.value?(C||(a.value=`${I.offsetWidth}px`,l.value=`${I.offsetHeight}px`,r.value=`${R+m.value}px`,i.value=`${O}px`,s.value=`${B.offsetWidth}px`,c.value=`${B.offsetHeight}px`,o.value=!0),{offsetTop:m.value,isFixed:!0}):(o.value=!1,{offsetTop:q,isFixed:!1})}function u(){f=zn(t.value),f!==window&&f.addEventListener("scroll",g)}function g(){const C=b();C&&F(e.onScroll,C.offsetTop,C.isFixed)}function W(){!f||f===window||f.removeEventListener("scroll",g)}function L(){return ze(this,null,function*(){o.value=!1,yield Gt(),b()})}return{stickyEl:t,wrapperEl:n,isFixed:o,offsetTop:m,fixedTop:r,fixedLeft:i,fixedWidth:a,fixedHeight:l,fixedWrapperWidth:s,fixedWrapperHeight:c,enableCSSMode:d,enableFixedMode:h,n:Un,classes:qn,resize:L,toNumber:Ge}}});it.render=Kn;var ye=it;he(ye);me(ye,Y);var Zn=ye;const st={name:[String,Number],disabled:Boolean,ripple:{type:Boolean,default:!0},onClick:H()},at=Symbol("TABS_BIND_TAB_KEY");function Gn(){const{childProviders:e,bindChildren:t,length:n}=fn(at);return{length:n,tabList:e,bindTabList:t}}function Jn(){const{parentProvider:e,bindParent:t,index:n}=un(at);return t||In("Tab","<var-tab/> must in <var-tabs/>"),{index:n,tabs:e,bindTabs:t}}const{name:Qn,n:Z,classes:eo}=oe("tab");function to(e,t){const n=gt("ripple");return Ve((v(),_("div",{class:M(e.classes(e.n(),e.n("$--box"),e.computeColorClass(),e.n(`--${e.itemDirection}`))),ref:"tabEl",style:U({color:e.computeColorStyle()}),onClick:t[0]||(t[0]=(...o)=>e.handleClick&&e.handleClick(...o))},[z(e.$slots,"default")],6)),[[n,{disabled:e.disabled||!e.ripple}]])}const lt=fe({name:Qn,directives:{Ripple:Bn},props:st,setup(e){const t=w(null),n=S(()=>t.value),o=S(()=>e.name),r=S(()=>e.disabled),{index:i,tabs:a,bindTabs:l}=Jn(),{onTabClick:s,active:c,activeColor:d,inactiveColor:h,disabledColor:m,itemDirection:f,resize:b}=a,u={name:o,index:i,disabled:r,element:n};l(u),X(()=>[e.name,e.disabled],b);function g(){return e.name!=null?c.value===e.name:c.value===(i==null?void 0:i.value)}function W(){return e.disabled?m.value:g()?d.value:h.value}function L(){return e.disabled?Z("$-tab--disabled"):g()?Z("$-tab--active"):Z("$-tab--inactive")}function C(x){const{disabled:R,name:B,onClick:I}=e;R||(F(I,B??i.value,x),s(u))}return{tabEl:t,active:c,activeColor:d,inactiveColor:h,itemDirection:f,n:Z,classes:eo,computeColorStyle:W,computeColorClass:L,handleClick:C}}});lt.render=to;var ge=lt;he(ge);me(ge,st);var no=ge;const ct={active:{type:[String,Number],default:0},layoutDirection:{type:String,default:"horizontal"},itemDirection:{type:String,default:"horizontal"},fixedBottom:Boolean,activeColor:String,inactiveColor:String,disabledColor:String,color:String,indicatorColor:String,indicatorSize:[String,Number],elevation:{type:[Boolean,String,Number],default:!1},scrollable:{type:String,default:"auto"},indicatorPosition:{type:String,default:"normal"},safeArea:Boolean,sticky:Boolean,stickyCssMode:ae(Y,"cssMode"),stickyZIndex:ae(Y,"zIndex"),offsetTop:ae(Y,"offsetTop"),onClick:H(),onChange:H(),"onUpdate:active":H()};var We=(e,t,n)=>new Promise((o,r)=>{var i=s=>{try{l(n.next(s))}catch(c){r(c)}},a=s=>{try{l(n.throw(s))}catch(c){r(c)}},l=s=>s.done?o(s.value):Promise.resolve(s.value).then(i,a);l((n=n.apply(e,t)).next())});const{name:oo,n:ro,classes:io}=oe("tabs");function so(e,t){return v(),V(He(e.sticky?e.n("$-sticky"):e.Transition),{ref:e.sticky?"stickyComponent":void 0,"css-mode":e.sticky?e.stickyCssMode:void 0,"offset-top":e.sticky?e.offsetTop:void 0,"z-index":e.sticky?e.stickyZIndex:void 0},{default:N(()=>[T("div",wt({class:e.classes(e.n(),e.n("$--box"),e.n(`--item-${e.itemDirection}`),e.n(`--layout-${e.layoutDirection}-padding`),e.formatElevation(e.elevation,4),[e.fixedBottom,e.n("--fixed-bottom")],[e.safeArea,e.n("--safe-area")]),style:{background:e.color}},e.$attrs),[T("div",{ref:"scrollerEl",class:M(e.classes(e.n("tab-wrap"),[e.localScrollable,e.n(`--layout-${e.layoutDirection}-scrollable`)],e.n(`--layout-${e.layoutDirection}`)))},[z(e.$slots,"default"),T("div",{class:M(e.classes(e.n("indicator"),e.n(`--layout-${e.layoutDirection}${e.indicatorPosition}-indicator`))),style:U({width:e.layoutDirection==="horizontal"?e.indicatorWidth:e.toSizeUnit(e.indicatorSize),height:e.layoutDirection==="horizontal"?e.toSizeUnit(e.indicatorSize):e.indicatorHeight,transform:e.layoutDirection==="horizontal"?`translateX(${e.indicatorX})`:`translateY(${e.indicatorY})`})},[T("div",{class:M(e.classes(e.n("indicator-inner"),e.n(`--layout-${e.layoutDirection}-indicator-inner`))),style:U({background:e.indicatorColor||e.activeColor})},null,6)],6)],2)],16)]),_:3},8,["css-mode","offset-top","z-index"])}const ut=fe({name:oo,components:{VarSticky:Zn},inheritAttrs:!1,props:ct,setup(e){const t=w("0px"),n=w("0px"),o=w("0px"),r=w("0px"),i=w(!1),a=w(null),l=S(()=>e.active),s=S(()=>e.activeColor),c=S(()=>e.inactiveColor),d=S(()=>e.disabledColor),h=S(()=>e.itemDirection),m=w(null),f=S(()=>e.indicatorPosition==="reverse"?"-reverse":""),{tabList:b,bindTabList:u,length:g}=Gn();u({active:l,activeColor:s,inactiveColor:c,disabledColor:d,itemDirection:h,resize:O,onTabClick:L}),X(()=>g.value,()=>We(this,null,function*(){yield Ze(),O()})),X(()=>[e.active,e.scrollable],O),je(O),tt(O);function L(p){var y;const P=(y=p.name.value)!=null?y:p.index.value,{active:j,onChange:dt,onClick:ft}=e;F(e["onUpdate:active"],P),F(ft,P),P!==j&&F(dt,P)}function C(){return b.find(({name:p})=>e.active===p.value)}function x(p){return b.find(({index:y})=>(p??e.active)===y.value)}function R(){if(g.value===0)return;const{active:p}=e;if(pe(p)){const y=en(p,0,g.value-1);return F(e["onUpdate:active"],y),x(y)}}function B(){i.value=e.scrollable==="always"||b.length>=5}function I({element:p}){const y=p.value;y&&(e.layoutDirection==="horizontal"?(t.value=`${y.offsetWidth}px`,o.value=`${y.offsetLeft}px`):(n.value=`${y.offsetHeight}px`,r.value=`${y.offsetTop}px`))}function re({element:p}){if(!i.value)return;const y=a.value,P=p.value;if(e.layoutDirection==="horizontal"){const j=P.offsetLeft+P.offsetWidth/2-y.offsetWidth/2;Be(y,{left:j,animation:Ie})}else{const j=P.offsetTop+P.offsetHeight/2-y.offsetHeight/2;Be(y,{top:j,animation:Ie})}}function O(){const p=C()||x()||R();!p||p.disabled.value||(B(),I(p),re(p))}function q(){return We(this,null,function*(){e.sticky&&m.value&&(yield m.value.resize())})}return{stickyComponent:m,indicatorWidth:t,indicatorHeight:n,indicatorX:o,indicatorY:r,indicatorPosition:f,localScrollable:i,scrollerEl:a,Transition:_t,toSizeUnit:Yn,n:ro,classes:io,resize:O,resizeSticky:q,formatElevation:wn}}});ut.render=so;var we=ut;he(we);me(we,ct);var ao=we;const xe="all-in-one-seo-pack",lo={emits:["changed"],setup(){var a,l;const e=te();let t={name:""};(l=(a=e==null?void 0:e.root)==null?void 0:a.data)!=null&&l.screenContext||(t=Tt());const{processSaveChanges:n}=zt(),{getErrorClass:o,getErrorDisplay:r,strings:i}=Et();return{composableStrings:i,getErrorClass:o,getErrorDisplay:r,postEditorStore:Ct(),processSaveChanges:n,rootStore:Ye(),route:t}},components:{BaseButton:Mt,CoreProBadge:At,SvgCaret:kt,SvgCircleCheck:Ot,SvgCircleInformation:Lt,SvgEllipse:Rt,TransitionSlide:Bt,VarTab:no,VarTabs:ao},props:{tabs:{type:Array,required:!0},skinnyTabs:Boolean,active:String,showSaveButton:{type:Boolean,default(){return!0}},internal:Boolean,disableMobile:Boolean},data(){return{buttonLoading:!1,showMobileMenu:!0,calculateWidth:!1,showMobileTabs:!1,strings:Pt(this.composableStrings,{saveChanges:Se("Save Changes",xe),new:Se("NEW!",xe)})}},computed:{activeTab(){var e;return this.active?this.active:this.$route&&this.$route.name?this.$route.name:(e=this.tabs[0])==null?void 0:e.slug},filteredTabs(){return this.tabs.filter(e=>e.slug!==(this.active?this.active:this.$route&&this.$route.name?this.$route.name:""))}},methods:{clickMobileTabs(e){this.$emit("changed",e),this.showMobileTabs=!1},maybeChangeTab(e){if(this.active){this.$emit("changed",e);return}const t=this.tabs.find(n=>n.slug===e);t&&this.$router.push(t.url)},getActiveTabName(){const e=this.tabs.find(t=>t.slug===(this.active?this.active:this.$route&&this.$route.name?this.$route.name:""));return e?e.name:""},maybeShowMobileMenu(){if(window.matchMedia("(max-width: 782px)").matches&&!this.disableMobile){this.showMobileMenu=!0;return}let e=0;this.calculateWidth=!0,this.$nextTick(()=>{e=this.$refs["tabs-scroller"].offsetWidth,this.calculateWidth=!1;let t=0;const n=this.$refs["tabs-button"];if(n){const o=n.querySelector(".aioseo-button");t=o?o.scrollWidth:0}if(e+t>this.$refs["aioseo-tabs"].offsetWidth){this.showMobileMenu=!0;return}this.showMobileMenu=!1})},createRipple(e){const t=e.currentTarget,n=document.createElement("span"),o=Math.max(t.clientWidth,t.clientHeight),r=o/2,i=t.getBoundingClientRect();n.style.width=n.style.height=`${o}px`,n.style.left=`${e.clientX-(i.left+r)}px`,n.style.top=`${e.clientY-(i.top+r)}px`,n.classList.add("ripple");const a=t.getElementsByClassName("ripple")[0];a&&a.remove(),t.appendChild(n)}},beforeMount(){window.addEventListener("resize",this.maybeShowMobileMenu)},async mounted(){this.$nextTick(()=>{this.maybeShowMobileMenu();const e=this.$refs["aioseo-tabs"],t=e.querySelector(".var-tab--active"),n=e.querySelector(".var-tabs__indicator");if(!t||!n)return;setTimeout(()=>{n.style.width==="0px"&&(n.style.width=`${t.offsetWidth}px`,n.style.transform=`translateX(${t.offsetLeft}px)`)},300),new MutationObserver(()=>{n.style.width==="0px"&&(n.style.width=`${t.offsetWidth}px`,n.style.transform=`translateX(${t.offsetLeft}px)`)}).observe(n,{attributes:!0});const r=e.querySelectorAll(".var-tab");r.length&&r.forEach(i=>{i.addEventListener("click",this.createRipple)})})},beforeUnmount(){window.removeEventListener("resize",this.maybeShowMobileMenu)}},co={class:"tabs-scroller",ref:"tabs-scroller"},uo={class:"tab-label"},fo=["textContent"],po={key:1,class:"warning"},vo={key:0,class:"label pro-badge"},ho={key:1,class:"label new"},mo={key:0,class:"aioseo-mobile-tabs"},bo=T("span",{class:"tab-indicator"},null,-1),yo={class:"tab-links"},go={key:0,class:"new"},wo=["onClick"],_o={key:1,class:"button-right",ref:"tabs-button"},So={class:"tabs-extra"};function To(e,t,n,o,r,i){const a=E("svg-ellipse"),l=E("svg-circle-check"),s=E("svg-circle-information"),c=E("core-pro-badge"),d=E("var-tab"),h=E("var-tabs"),m=E("svg-caret"),f=E("transition-slide"),b=E("base-button");return v(),_("div",{class:M(["aioseo-tabs",{internal:n.internal,skinny:n.skinnyTabs}]),ref:"aioseo-tabs"},[Ve(T("div",co,[D(h,{active:i.activeTab,onClick:i.maybeChangeTab,ref:"var-tabs"},{default:N(()=>[(v(!0),_(K,null,ie(n.tabs,(u,g)=>(v(),V(d,{name:u.slug,key:g},{default:N(()=>[z(e.$slots,"var-tab",{tab:u},()=>[z(e.$slots,"var-tab-icon",{tab:u}),T("span",uo,A(u.name),1),u.errorCount>=0?(v(),_("span",{key:0,class:M(["tab-score",o.getErrorClass(o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors)])},[0<o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors?(v(),V(a,{key:0,width:"8"})):$("",!0),o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors===0?(v(),V(l,{key:1,width:"12"})):$("",!0),T("span",{textContent:A(o.getErrorDisplay(o.postEditorStore.currentPost.page_analysis.analysis[u.slug].errors))},null,8,fo)],2)):$("",!0),u.warning&&e.$root.$data.screenContext!=="sidebar"?(v(),_("span",po,[D(s,{width:"15",height:"15"})])):$("",!0),u.label?(v(),_(K,{key:2},[u.label==="pro"?(v(),_("span",vo,[D(c)])):$("",!0),u.label==="new"?(v(),_("span",ho,A(r.strings.new),1)):$("",!0)],64)):$("",!0)])]),_:2},1032,["name"]))),128))]),_:3},8,["active","onClick"])],512),[[St,!r.showMobileMenu||r.calculateWidth]]),r.showMobileMenu?(v(),_("div",mo,[T("div",{class:"active-tab",onClick:t[1]||(t[1]=u=>r.showMobileTabs=!r.showMobileTabs)},[T("div",null,[se(A(i.getActiveTabName())+" ",1),D(m,{onClick:t[0]||(t[0]=_e(u=>r.showMobileTabs=!r.showMobileTabs,["stop"])),class:M({rotated:!r.showMobileTabs})},null,8,["class"]),bo])]),D(f,{active:r.showMobileTabs,class:"tab-dropdown"},{default:N(()=>[T("div",yo,[n.active?$("",!0):(v(!0),_(K,{key:0},ie(i.filteredTabs,(u,g)=>(v(),V(He(n.active?"a":"router-link"),{key:g,to:u.url,onClick:t[2]||(t[2]=W=>r.showMobileTabs=!1)},{default:N(()=>[se(A(u.name)+" ",1),u.label==="new"?(v(),_("span",go,A(r.strings.new),1)):$("",!0)]),_:2},1032,["to"]))),128)),n.active?(v(!0),_(K,{key:1},ie(i.filteredTabs,(u,g)=>(v(),_("a",{href:"#",key:g,onClick:_e(W=>i.clickMobileTabs(u.slug),["prevent"])},A(u.name),9,wo))),128)):$("",!0)])]),_:1},8,["active"])])):$("",!0),n.showSaveButton?(v(),_("div",_o,[z(e.$slots,"button",{},()=>[D(b,{type:"blue",size:"medium",loading:o.rootStore.loading,onClick:t[3]||(t[3]=u=>o.processSaveChanges(o.route.name))},{default:N(()=>[se(A(r.strings.saveChanges),1)]),_:1},8,["loading"])])],512)):$("",!0),T("div",So,[z(e.$slots,"extra")])],2)}const Fo=It(lo,[["render",To]]);export{Fo as C,zt as u};