import{aCasje,aDasnt,aEasht,cjasmt,dhasgt,aras$t,sasW,easke,b7asme,dasre,rasJ,kasH,Cash,aQasie,cuasZ,b8asCe,aJasT,aSasF,aYaswe,cyasD,oasTe,a1asoe,bnasyt,boasxt,diashe,aRaste,aXasge,a$as_t,bbasSt,bdasCt,beasTt,bfasot,cAaswt,djasit,aLasrt,bUasPt,b0asRt,bcasIt,dkasEt,cVasDe,aMasBt,cFasLt,bEasAt,aUasxe,aTasDt,aVasOt}from"./duE3vYYf.js";import{uaskt,EasMt,MasNt,_asWt}from"./DzjjIXML.js";import{DasHt}from"./D-TlYZRa.js";import{RasFe}from"./CemtNwzZ.js";import{uaszt}from"./DICRAoac.js";import{hasGt}from"./D_KB5k-f.js";import{fasKt}from"./BNH2XnOs.js";import{iasXt}from"./BbN7I0i_.js";import{uasVe}from"./BqpIgsZa.js";import{iasYe}from"./DW20HMxs.js";functionjt(e,t,a,i){if(!je(e))returne;t=nt(t,e);for(varo=-1,r=t.length,n=r-1,s=e;s!=null&&++o<r;){varv=ht(t[o]),c=a;if(v==="__proto__"||v==="constructor"||v==="prototype")returne;if(o!=n){varp=s[v];c=void0,c===void0&&(c=je(p)?p:mt(t[o+1])?[]:{})}gt(s,v,c),s=s[v]}returne}functionFt(e,t,a){for(vari=-1,o=t.length,r={};++i<o;){varn=t[i],s=$t(e,n);a(s,n)&&jt(r,nt(n,e),s)}returnr}functionVt(e,t){returnFt(e,t,function(a,i){returnGt(e,i)})}varlt=Kt(function(e,t){returne==null?{}:Vt(e,t)});functionYt(e){constt=W(),a=W(!1);functioni(){for(varo=arguments.length,r=newArray(o),n=0;n<o;n++)r[n]=arguments[n];a.value||(me.cancel(t.value),t.value=me(()=>{e(...r)}))}returnke(()=>{a.value=!0,me.cancel(t.value)}),i}functionUt(e){constt=W([]),a=W(typeofe=="function"?e():e),i=Yt(()=>{letr=a.value;t.value.forEach(n=>{r=n(r)}),t.value=[],a.value=r});functiono(r){t.value.push(r),i()}return[a,o]}constqt=re({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:a,attrs:i}=t;consto=J();functionr(v){varc;!((c=e.tab)===null||c===void0)&&c.disabled||e.onClick(v)}a({domRef:o});functionn(v){varc;v.preventDefault(),v.stopPropagation(),e.editable.onEdit("remove",{key:(c=e.tab)===null||c===void0?void0:c.key,event:v})}consts=H(()=>{varv;returne.editable&&e.closable!==!1&&!(!((v=e.tab)===null||v===void0)&&v.disabled)});return()=>{varv;const{prefixCls:c,id:p,active:S,tab:{key:m,tab:d,disabled:y,closeIcon:x},renderWrapper:w,removeAriaLabel:C,editable:O,onFocus:G}=e,k=`${c}-tab`,l=h("div",{key:m,ref:o,class:ie(k,{[`${k}-with-remove`]:s.value,[`${k}-active`]:S,[`${k}-disabled`]:y}),style:i.style,onClick:r},[h("div",{role:"tab","aria-selected":S,id:p&&`${p}-tab-${m}`,class:`${k}-btn`,"aria-controls":p&&`${p}-panel-${m}`,"aria-disabled":y,tabindex:y?null:0,onClick:g=>{g.stopPropagation(),r(g)},onKeydown:g=>{[Z.SPACE,Z.ENTER].includes(g.which)&&(g.preventDefault(),r(g))},onFocus:G},[typeofd=="function"?d():d]),s.value&&h("button",{type:"button","aria-label":C||"remove",tabindex:0,class:`${k}-remove`,onClick:g=>{g.stopPropagation(),n(g)}},[(x==null?void0:x())||((v=O.removeIcon)===null||v===void0?void0:v.call(O))||"×"])]);returnw?w(l):l}}}),Ue={width:0,height:0,left:0,top:0};functionZt(e,t){consta=J(newMap);returnCe(()=>{vari,o;constr=newMap,n=e.value,s=t.value.get((i=n[0])===null||i===void0?void0:i.key)||Ue,v=s.left+s.width;for(letc=0;c<n.length;c+=1){const{key:p}=n[c];letS=t.value.get(p);S||(S=t.value.get((o=n[c-1])===null||o===void0?void0:o.key)||Ue);constm=r.get(p)||T({},S);m.right=v-m.left-m.width,r.set(p,m)}a.value=newMap(r)}),a}constst=re({compatConfig:{MODE:3},name:"AddButton",inheritAttrs:!1,props:{prefixCls:String,editable:{type:Object},locale:{type:Object,default:void0}},setup(e,t){let{expose:a,attrs:i}=t;consto=J();returna({domRef:o}),()=>{const{prefixCls:r,editable:n,locale:s}=e;return!n||n.showAdd===!1?null:h("button",{ref:o,type:"button",class:`${r}-nav-add`,style:i.style,"aria-label":(s==null?void0:s.addAriaLabel)||"Add ta
right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before,&::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,