import{bu as It,aL as tt,bv as nl,bw as ol,b8 as Kt,b7 as Ae,b9 as al,bx as xn,by as sl,bz as kt,bA as rl,bB as rt,bC as il,bD as En,bE as Rn,bF as kn,bG as Ln,bH as Lt,aA as it,ab as ut,bk as _e,O as ae,s as H,aK as dt,N as ee,aj as ie,ak as xe,r as x,aX as Me,aY as ct,bI as zt,a as ce,a$ as ul,q as se,o as z,c as ke,w as be,j as oe,y as I,u as F,a0 as Se,e as j,aE as Be,bJ as Qe,x as Fe,F as Je,h as lt,t as we,k as ye,A as dl,B as ze,z as Ee,p as Nn,M as Fn,v as cl,P as fl,C as hl,Q as Nt,bK as Ie,a9 as Ke,E as Ft,bL as An,bM as Mn,af as vl,m as de,bN as pl,f as Ce,G as Dt,bO as ml,b as De,bl as On,aJ as At,bg as gl,be as Ye,bi as ft,bo as T,ag as Hn,bf as Vt,bb as $e,av as Gt,aH as Yt,a1 as Ut,bn as Wn,i as bl,bP as $n,bQ as Tn,aI as Pn}from"./entry.539d3b49.js";import{b as yl,i as Bn,a as Cl,C as In}from"./el-select.a5d06e79.js";import{u as Kn,y as zn,E as Dn}from"./el-popper.6e1fd591.js";import{d as wl,t as Vn}from"./index.e7365e3c.js";import{j as nt,l as Ze,b as Gn,S as Sl,k as xl,m as Yn,i as Un,o as jn,U as ot}from"./el-input.60ea0dae.js";import{g as qn,c as Xn,k as El,d as _n,e as Qn,b as Jn,i as Zn}from"./_initCloneObject.18c5d913.js";import{d as et}from"./debounce.7822d733.js";import{u as eo,b as Mt,a as ht,c as Rl}from"./use-form-item.aa386fad.js";function Ot(e){return e}function to(e,t,l){switch(l.length){case 0:return e.call(t);case 1:return e.call(t,l[0]);case 2:return e.call(t,l[0],l[1]);case 3:return e.call(t,l[0],l[1],l[2])}return e.apply(t,l)}var lo=800,no=16,oo=Date.now;function ao(e){var t=0,l=0;return function(){var n=oo(),a=no-(n-l);if(l=n,a>0){if(++t>=lo)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function so(e){return function(){return e}}var ro=It?function(e,t){return It(e,"toString",{configurable:!0,enumerable:!1,value:so(t),writable:!0})}:Ot;const io=ro;var uo=ao(io);const kl=uo;var jt=Math.max;function Ll(e,t,l){return t=jt(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,r=jt(n.length-t,0),i=Array(r);++a1?l[a-1]:void 0,i=a>2?l[2]:void 0;for(r=e.length>3&&typeof r=="function"?(a--,r):void 0,i&&fo(l[0],l[1],i)&&(r=a<3?void 0:r,a=1),t=Object(t);++n0&&l(o)?t>1?Ht(o,t-1,l,n,a):Gn(a,o):n||(a[a.length]=o)}return a}function po(e){var t=e==null?0:e.length;return t?Ht(e,1):[]}function mo(e){return kl(Ll(e,void 0,po),e+"")}var go="[object Object]",bo=Function.prototype,yo=Object.prototype,Nl=bo.toString,Co=yo.hasOwnProperty,wo=Nl.call(Object);function So(e){if(!al(e)||xn(e)!=go)return!1;var t=qn(e);if(t===null)return!0;var l=Co.call(t,"constructor")&&t.constructor;return typeof l=="function"&&l instanceof l&&Nl.call(l)==wo}var xo=1,Eo=2;function Ro(e,t,l,n){var a=l.length,r=a,i=!n;if(e==null)return!r;for(e=Object(e);a--;){var o=l[a];if(i&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++aRe},ie64:function(){return xt.ie()&&Tl},firefox:function(){return ne()||mt},opera:function(){return ne()||gt},webkit:function(){return ne()||Ue},safari:function(){return xt.webkit()},chrome:function(){return ne()||je},windows:function(){return ne()||bt},osx:function(){return ne()||qe},linux:function(){return ne()||yt},iphone:function(){return ne()||wt},mobile:function(){return ne()||wt||St||Ct||Bl},nativeApp:function(){return ne()||Pl},android:function(){return ne()||Ct},ipad:function(){return ne()||St}},ea=xt,Ge=!!(typeof window<"u"&&window.document&&window.document.createElement),ta={canUseDOM:Ge,canUseWorkers:typeof Worker<"u",canUseEventListeners:Ge&&!!(window.addEventListener||window.attachEvent),canUseViewport:Ge&&!!window.screen,isInWorker:!Ge},Il=ta,Kl;Il.canUseDOM&&(Kl=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function la(e,t){if(!Il.canUseDOM||t&&!("addEventListener"in document))return!1;var l="on"+e,n=l in document;if(!n){var a=document.createElement("div");a.setAttribute(l,"return;"),n=typeof a[l]=="function"}return!n&&Kl&&e==="wheel"&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}var na=la,_t=10,Qt=40,Jt=800;function zl(e){var t=0,l=0,n=0,a=0;return"detail"in e&&(l=e.detail),"wheelDelta"in e&&(l=-e.wheelDelta/120),"wheelDeltaY"in e&&(l=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=l,l=0),n=t*_t,a=l*_t,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(n=e.deltaX),(n||a)&&e.deltaMode&&(e.deltaMode==1?(n*=Qt,a*=Qt):(n*=Jt,a*=Jt)),n&&!t&&(t=n<1?-1:1),a&&!l&&(l=a<1?-1:1),{spinX:t,spinY:l,pixelX:n,pixelY:a}}zl.getEventType=function(){return ea.firefox()?"DOMMouseScroll":na("wheel")?"wheel":"mousewheel"};var oa=zl;/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */const aa=function(e,t){if(e&&e.addEventListener){const l=function(n){const a=oa(n);t&&Reflect.apply(t,this,[n,a])};e.addEventListener("wheel",l,{passive:!0})}},sa={beforeMount(e,t){aa(e,t.value)}},Dl={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Lt,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},Vl={[ot]:e=>it(e)||ut(e)||_e(e),change:e=>it(e)||ut(e)||_e(e)},We=Symbol("checkboxGroupContextKey"),ra=({model:e,isChecked:t})=>{const l=ae(We,void 0),n=H(()=>{var r,i;const o=(r=l==null?void 0:l.max)==null?void 0:r.value,s=(i=l==null?void 0:l.min)==null?void 0:i.value;return!dt(o)&&e.value.length>=o&&!t.value||!dt(s)&&e.value.length<=s&&t.value});return{isDisabled:eo(H(()=>(l==null?void 0:l.disabled.value)||n.value)),isLimitDisabled:n}},ia=(e,{model:t,isLimitExceeded:l,hasOwnLabel:n,isDisabled:a,isLabeledByFormItem:r})=>{const i=ae(We,void 0),{formItem:o}=Mt(),{emit:s}=ee();function u(h){var g,m;return h===e.trueLabel||h===!0?(g=e.trueLabel)!=null?g:!0:(m=e.falseLabel)!=null?m:!1}function d(h,g){s("change",u(h),g)}function f(h){if(l.value)return;const g=h.target;s("change",u(g.checked),h)}async function p(h){l.value||!n.value&&!a.value&&r.value&&(h.composedPath().some(y=>y.tagName==="LABEL")||(t.value=u([!1,e.falseLabel].includes(t.value)),await xe(),d(t.value,h)))}const v=H(()=>(i==null?void 0:i.validateEvent)||e.validateEvent);return ie(()=>e.modelValue,()=>{v.value&&(o==null||o.validate("change").catch(h=>wl()))}),{handleChange:f,onClickRoot:p}},ua=e=>{const t=x(!1),{emit:l}=ee(),n=ae(We,void 0),a=H(()=>dt(n)===!1),r=x(!1);return{model:H({get(){var o,s;return a.value?(o=n==null?void 0:n.modelValue)==null?void 0:o.value:(s=e.modelValue)!=null?s:t.value},set(o){var s,u;a.value&&Me(o)?(r.value=((s=n==null?void 0:n.max)==null?void 0:s.value)!==void 0&&o.length>(n==null?void 0:n.max.value),r.value===!1&&((u=n==null?void 0:n.changeEvent)==null||u.call(n,o))):(l(ot,o),t.value=o)}}),isGroup:a,isLimitExceeded:r}},da=(e,t,{model:l})=>{const n=ae(We,void 0),a=x(!1),r=H(()=>{const u=l.value;return _e(u)?u:Me(u)?ct(e.label)?u.map(zt).some(d=>Bn(d,e.label)):u.map(zt).includes(e.label):u!=null?u===e.trueLabel:!!u}),i=ht(H(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value}),{prop:!0}),o=ht(H(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value})),s=H(()=>!!(t.default||e.label));return{checkboxButtonSize:i,isChecked:r,isFocused:a,checkboxSize:o,hasOwnLabel:s}},ca=(e,{model:t})=>{function l(){Me(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&l()},Gl=(e,t)=>{const{formItem:l}=Mt(),{model:n,isGroup:a,isLimitExceeded:r}=ua(e),{isFocused:i,isChecked:o,checkboxButtonSize:s,checkboxSize:u,hasOwnLabel:d}=da(e,t,{model:n}),{isDisabled:f}=ra({model:n,isChecked:o}),{inputId:p,isLabeledByFormItem:v}=Rl(e,{formItemContext:l,disableIdGeneration:d,disableIdManagement:a}),{handleChange:h,onClickRoot:g}=ia(e,{model:n,isLimitExceeded:r,hasOwnLabel:d,isDisabled:f,isLabeledByFormItem:v});return ca(e,{model:n}),{inputId:p,isLabeledByFormItem:v,isChecked:o,isDisabled:f,isFocused:i,checkboxButtonSize:s,checkboxSize:u,hasOwnLabel:d,model:n,handleChange:h,onClickRoot:g}},fa=["tabindex","role","aria-checked"],ha=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],va=["id","aria-hidden","disabled","value","name","tabindex"],pa=ce({name:"ElCheckbox"}),ma=ce({...pa,props:Dl,emits:Vl,setup(e){const t=e,l=ul(),{inputId:n,isLabeledByFormItem:a,isChecked:r,isDisabled:i,isFocused:o,checkboxSize:s,hasOwnLabel:u,model:d,handleChange:f,onClickRoot:p}=Gl(t,l),v=se("checkbox"),h=H(()=>[v.b(),v.m(s.value),v.is("disabled",i.value),v.is("bordered",t.border),v.is("checked",r.value)]),g=H(()=>[v.e("input"),v.is("disabled",i.value),v.is("checked",r.value),v.is("indeterminate",t.indeterminate),v.is("focus",o.value)]);return(m,y)=>(z(),ke(dl(!F(u)&&F(a)?"span":"label"),{class:I(F(h)),"aria-controls":m.indeterminate?m.controls:null,onClick:F(p)},{default:be(()=>[oe("span",{class:I(F(g)),tabindex:m.indeterminate?0:void 0,role:m.indeterminate?"checkbox":void 0,"aria-checked":m.indeterminate?"mixed":void 0},[m.trueLabel||m.falseLabel?Se((z(),j("input",{key:0,id:F(n),"onUpdate:modelValue":y[0]||(y[0]=b=>Be(d)?d.value=b:null),class:I(F(v).e("original")),type:"checkbox","aria-hidden":m.indeterminate?"true":"false",name:m.name,tabindex:m.tabindex,disabled:F(i),"true-value":m.trueLabel,"false-value":m.falseLabel,onChange:y[1]||(y[1]=(...b)=>F(f)&&F(f)(...b)),onFocus:y[2]||(y[2]=b=>o.value=!0),onBlur:y[3]||(y[3]=b=>o.value=!1)},null,42,ha)),[[Qe,F(d)]]):Se((z(),j("input",{key:1,id:F(n),"onUpdate:modelValue":y[4]||(y[4]=b=>Be(d)?d.value=b:null),class:I(F(v).e("original")),type:"checkbox","aria-hidden":m.indeterminate?"true":"false",disabled:F(i),value:m.label,name:m.name,tabindex:m.tabindex,onChange:y[5]||(y[5]=(...b)=>F(f)&&F(f)(...b)),onFocus:y[6]||(y[6]=b=>o.value=!0),onBlur:y[7]||(y[7]=b=>o.value=!1)},null,42,va)),[[Qe,F(d)]]),oe("span",{class:I(F(v).e("inner"))},null,2)],10,fa),F(u)?(z(),j("span",{key:0,class:I(F(v).e("label"))},[Fe(m.$slots,"default"),m.$slots.default?ye("v-if",!0):(z(),j(Je,{key:0},[lt(we(m.label),1)],64))],2)):ye("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var ga=ze(ma,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);const ba=["name","tabindex","disabled","true-value","false-value"],ya=["name","tabindex","disabled","value"],Ca=ce({name:"ElCheckboxButton"}),wa=ce({...Ca,props:Dl,emits:Vl,setup(e){const t=e,l=ul(),{isFocused:n,isChecked:a,isDisabled:r,checkboxButtonSize:i,model:o,handleChange:s}=Gl(t,l),u=ae(We,void 0),d=se("checkbox"),f=H(()=>{var v,h,g,m;const y=(h=(v=u==null?void 0:u.fill)==null?void 0:v.value)!=null?h:"";return{backgroundColor:y,borderColor:y,color:(m=(g=u==null?void 0:u.textColor)==null?void 0:g.value)!=null?m:"",boxShadow:y?`-1px 0 0 0 ${y}`:void 0}}),p=H(()=>[d.b("button"),d.bm("button",i.value),d.is("disabled",r.value),d.is("checked",a.value),d.is("focus",n.value)]);return(v,h)=>(z(),j("label",{class:I(F(p))},[v.trueLabel||v.falseLabel?Se((z(),j("input",{key:0,"onUpdate:modelValue":h[0]||(h[0]=g=>Be(o)?o.value=g:null),class:I(F(d).be("button","original")),type:"checkbox",name:v.name,tabindex:v.tabindex,disabled:F(r),"true-value":v.trueLabel,"false-value":v.falseLabel,onChange:h[1]||(h[1]=(...g)=>F(s)&&F(s)(...g)),onFocus:h[2]||(h[2]=g=>n.value=!0),onBlur:h[3]||(h[3]=g=>n.value=!1)},null,42,ba)),[[Qe,F(o)]]):Se((z(),j("input",{key:1,"onUpdate:modelValue":h[4]||(h[4]=g=>Be(o)?o.value=g:null),class:I(F(d).be("button","original")),type:"checkbox",name:v.name,tabindex:v.tabindex,disabled:F(r),value:v.label,onChange:h[5]||(h[5]=(...g)=>F(s)&&F(s)(...g)),onFocus:h[6]||(h[6]=g=>n.value=!0),onBlur:h[7]||(h[7]=g=>n.value=!1)},null,42,ya)),[[Qe,F(o)]]),v.$slots.default||v.label?(z(),j("span",{key:2,class:I(F(d).be("button","inner")),style:Ee(F(a)?F(f):void 0)},[Fe(v.$slots,"default",{},()=>[lt(we(v.label),1)])],6)):ye("v-if",!0)],2))}});var Yl=ze(wa,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);const Sa=Nn({modelValue:{type:Fn(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Lt,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),xa={[ot]:e=>Me(e),change:e=>Me(e)},Ea=ce({name:"ElCheckboxGroup"}),Ra=ce({...Ea,props:Sa,emits:xa,setup(e,{emit:t}){const l=e,n=se("checkbox"),{formItem:a}=Mt(),{inputId:r,isLabeledByFormItem:i}=Rl(l,{formItemContext:a}),o=async u=>{t(ot,u),await xe(),t("change",u)},s=H({get(){return l.modelValue},set(u){o(u)}});return cl(We,{...Zo(fl(l),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:s,changeEvent:o}),ie(()=>l.modelValue,()=>{l.validateEvent&&(a==null||a.validate("change").catch(u=>wl()))}),(u,d)=>{var f;return z(),ke(dl(u.tag),{id:F(r),class:I(F(n).b("group")),role:"group","aria-label":F(i)?void 0:u.label||"checkbox-group","aria-labelledby":F(i)?(f=F(a))==null?void 0:f.labelId:void 0},{default:be(()=>[Fe(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Ul=ze(Ra,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);const Oe=hl(ga,{CheckboxButton:Yl,CheckboxGroup:Ul});Nt(Yl);Nt(Ul);/*! * escape-html * Copyright(c) 2012-2013 TJ Holowaychuk * Copyright(c) 2015 Andreas Lubbe * Copyright(c) 2015 Tiancheng "Timothy" Gu * MIT Licensed */var ka=/["'&<>]/,La=Na;function Na(e){var t=""+e,l=ka.exec(t);if(!l)return t;var n,a="",r=0,i=0;for(r=l.index;rtypeof u=="string"?rt(o,u):u(o,s,e))):(t!=="$key"&&ct(o)&&"$value"in o&&(o=o.$value),[ct(o)?rt(o,t):o])},i=function(o,s){if(n)return n(o.value,s.value);for(let u=0,d=o.key.length;us.key[u])return 1}return 0};return e.map((o,s)=>({value:o,index:s,key:r?r(o,s):null})).sort((o,s)=>{let u=i(o,s);return u||(u=o.index-s.index),u*+l}).map(o=>o.value)},jl=function(e,t){let l=null;return e.columns.forEach(n=>{n.id===t&&(l=n)}),l},Aa=function(e,t){let l=null;for(let n=0;n{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const l=t.split(".");let n=e;for(const a of l)n=n[a];return`${n}`}else if(typeof t=="function")return t.call(null,e)},Le=function(e,t){const l={};return(e||[]).forEach((n,a)=>{l[_(n,t)]={row:n,index:a}}),l};function Ma(e,t){const l={};let n;for(n in e)l[n]=e[n];for(n in t)if(Ie(t,n)){const a=t[n];typeof a<"u"&&(l[n]=a)}return l}function Wt(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function ql(e){return e===""||e!==void 0&&(e=Wt(e),Number.isNaN(e)&&(e=80)),e}function Oa(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function Ha(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,l)=>(...n)=>t(l(...n)))}function Te(e,t,l){let n=!1;const a=e.indexOf(t),r=a!==-1,i=o=>{o==="add"?e.push(t):e.splice(a,1),n=!0,Me(t.children)&&t.children.forEach(s=>{Te(e,s,l??!r)})};return _e(l)?l&&!r?i("add"):!l&&r&&i("remove"):i(r?"remove":"add"),n}function Wa(e,t,l="children",n="hasChildren"){const a=i=>!(Array.isArray(i)&&i.length);function r(i,o,s){t(i,o,s),o.forEach(u=>{if(u[n]){t(u,null,s+1);return}const d=u[l];a(d)||r(u,d,s+1)})}e.forEach(i=>{if(i[n]){t(i,null,0);return}const o=i[l];a(o)||r(i,o,0)})}let ge;function $a(e,t,l,n,a){a=Wl({enterable:!0,showArrow:!0},a);const r=e==null?void 0:e.dataset.prefix,i=e==null?void 0:e.querySelector(`.${r}-scrollbar__wrap`);function o(){const m=a.effect==="light",y=document.createElement("div");return y.className=[`${r}-popper`,m?"is-light":"is-dark",a.popperClass||""].join(" "),l=La(l),y.innerHTML=l,y.style.zIndex=String(n()),e==null||e.appendChild(y),y}function s(){const m=document.createElement("div");return m.className=`${r}-popper__arrow`,m}function u(){d&&d.update()}ge==null||ge(),ge=()=>{try{d&&d.destroy(),v&&(e==null||e.removeChild(v)),t.removeEventListener("mouseenter",f),t.removeEventListener("mouseleave",p),i==null||i.removeEventListener("scroll",ge),ge=void 0}catch{}};let d=null,f=u,p=ge;a.enterable&&({onOpen:f,onClose:p}=Kn({showAfter:a.showAfter,hideAfter:a.hideAfter,open:u,close:ge}));const v=o();v.onmouseenter=f,v.onmouseleave=p;const h=[];if(a.offset&&h.push({name:"offset",options:{offset:[0,a.offset]}}),a.showArrow){const m=v.appendChild(s());h.push({name:"arrow",options:{element:m,padding:10}})}const g=a.popperOptions||{};return d=zn(t,v,{placement:a.placement||"top",strategy:"fixed",...g,modifiers:g.modifiers?h.concat(g.modifiers):h}),t.addEventListener("mouseenter",f),t.addEventListener("mouseleave",p),i==null||i.addEventListener("scroll",ge),d}function Xl(e){return e.children?qo(e.children,Xl):[e]}function el(e,t){return e+t.colSpan}const _l=(e,t,l,n)=>{let a=0,r=e;const i=l.states.columns.value;if(n){const s=Xl(n[e]);a=i.slice(0,i.indexOf(s[0])).reduce(el,0),r=a+s.reduce(el,0)-1}else a=e;let o;switch(t){case"left":r=i.length-l.states.rightFixedLeafColumnsLength.value&&(o="right");break;default:r=i.length-l.states.rightFixedLeafColumnsLength.value&&(o="right")}return o?{direction:o,start:a,after:r}:{}},$t=(e,t,l,n,a,r=0)=>{const i=[],{direction:o,start:s,after:u}=_l(t,l,n,a);if(o){const d=o==="left";i.push(`${e}-fixed-column--${o}`),d&&u+r===n.states.fixedLeafColumnsLength.value-1?i.push("is-last-column"):!d&&s-r===n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value&&i.push("is-first-column")}return i};function tl(e,t){return e+(t.realWidth===null||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const Tt=(e,t,l,n)=>{const{direction:a,start:r=0,after:i=0}=_l(e,t,l,n);if(!a)return;const o={},s=a==="left",u=l.states.columns.value;return s?o.left=u.slice(0,r).reduce(tl,0):o.right=u.slice(i+1).reverse().reduce(tl,0),o},He=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function Ta(e){const t=ee(),l=x(!1),n=x([]);return{updateExpandRows:()=>{const s=e.data.value||[],u=e.rowKey.value;if(l.value)n.value=s.slice();else if(u){const d=Le(n.value,u);n.value=s.reduce((f,p)=>{const v=_(p,u);return d[v]&&f.push(p),f},[])}else n.value=[]},toggleRowExpansion:(s,u)=>{Te(n.value,s,u)&&t.emit("expand-change",s,n.value.slice())},setExpandRowKeys:s=>{t.store.assertRowKey();const u=e.data.value||[],d=e.rowKey.value,f=Le(u,d);n.value=s.reduce((p,v)=>{const h=f[v];return h&&p.push(h.row),p},[])},isRowExpanded:s=>{const u=e.rowKey.value;return u?!!Le(n.value,u)[_(s,u)]:n.value.includes(s)},states:{expandRows:n,defaultExpandAll:l}}}function Pa(e){const t=ee(),l=x(null),n=x(null),a=u=>{t.store.assertRowKey(),l.value=u,i(u)},r=()=>{l.value=null},i=u=>{const{data:d,rowKey:f}=e;let p=null;f.value&&(p=(F(d)||[]).find(v=>_(v,f.value)===u)),n.value=p,t.emit("current-change",n.value,null)};return{setCurrentRowKey:a,restoreCurrentRowKey:r,setCurrentRowByKey:i,updateCurrentRow:u=>{const d=n.value;if(u&&u!==d){n.value=u,t.emit("current-change",n.value,d);return}!u&&d&&(n.value=null,t.emit("current-change",null,d))},updateCurrentRowData:()=>{const u=e.rowKey.value,d=e.data.value||[],f=n.value;if(!d.includes(f)&&f){if(u){const p=_(f,u);i(p)}else n.value=null;n.value===null&&t.emit("current-change",null,f)}else l.value&&(i(l.value),r())},states:{_currentRowKey:l,currentRow:n}}}function Ba(e){const t=x([]),l=x({}),n=x(16),a=x(!1),r=x({}),i=x("hasChildren"),o=x("children"),s=ee(),u=H(()=>{if(!e.rowKey.value)return{};const y=e.data.value||[];return f(y)}),d=H(()=>{const y=e.rowKey.value,b=Object.keys(r.value),S={};return b.length&&b.forEach(c=>{if(r.value[c].length){const E={children:[]};r.value[c].forEach(R=>{const w=_(R,y);E.children.push(w),R[i.value]&&!S[w]&&(S[w]={children:[]})}),S[c]=E}}),S}),f=y=>{const b=e.rowKey.value,S={};return Wa(y,(c,E,R)=>{const w=_(c,b);Array.isArray(E)?S[w]={children:E.map(k=>_(k,b)),level:R}:a.value&&(S[w]={children:[],lazy:!0,level:R})},o.value,i.value),S},p=(y=!1,b=(S=>(S=s.store)==null?void 0:S.states.defaultExpandAll.value)())=>{var S;const c=u.value,E=d.value,R=Object.keys(c),w={};if(R.length){const k=F(l),A=[],B=(W,D)=>{if(y)return t.value?b||t.value.includes(D):!!(b||W!=null&&W.expanded);{const V=b||t.value&&t.value.includes(D);return!!(W!=null&&W.expanded||V)}};R.forEach(W=>{const D=k[W],V={...c[W]};if(V.expanded=B(D,W),V.lazy){const{loaded:Q=!1,loading:J=!1}=D||{};V.loaded=!!Q,V.loading=!!J,A.push(W)}w[W]=V});const G=Object.keys(E);a.value&&G.length&&A.length&&G.forEach(W=>{const D=k[W],V=E[W].children;if(A.includes(W)){if(w[W].children.length!==0)throw new Error("[ElTable]children must be an empty array.");w[W].children=V}else{const{loaded:Q=!1,loading:J=!1}=D||{};w[W]={lazy:!0,loaded:!!Q,loading:!!J,expanded:B(D,W),children:V,level:""}}})}l.value=w,(S=s.store)==null||S.updateTableScrollY()};ie(()=>t.value,()=>{p(!0)}),ie(()=>u.value,()=>{p()}),ie(()=>d.value,()=>{p()});const v=y=>{t.value=y,p()},h=(y,b)=>{s.store.assertRowKey();const S=e.rowKey.value,c=_(y,S),E=c&&l.value[c];if(c&&E&&"expanded"in E){const R=E.expanded;b=typeof b>"u"?!E.expanded:b,l.value[c].expanded=b,R!==b&&s.emit("expand-change",y,b),s.store.updateTableScrollY()}},g=y=>{s.store.assertRowKey();const b=e.rowKey.value,S=_(y,b),c=l.value[S];a.value&&c&&"loaded"in c&&!c.loaded?m(y,S,c):h(y,void 0)},m=(y,b,S)=>{const{load:c}=s.props;c&&!l.value[b].loaded&&(l.value[b].loading=!0,c(y,S,E=>{if(!Array.isArray(E))throw new TypeError("[ElTable] data must be an array");l.value[b].loading=!1,l.value[b].loaded=!0,l.value[b].expanded=!0,E.length&&(r.value[b]=E),s.emit("expand-change",y,!0)}))};return{loadData:m,loadOrToggle:g,toggleTreeExpansion:h,updateTreeExpandKeys:v,updateTreeData:p,normalize:f,states:{expandRowKeys:t,treeData:l,indent:n,lazy:a,lazyTreeNodeMap:r,lazyColumnIdentifier:i,childrenColumnName:o}}}const Ia=(e,t)=>{const l=t.sortingColumn;return!l||typeof l.sortable=="string"?e:Fa(e,t.sortProp,t.sortOrder,l.sortMethod,l.sortBy)},Xe=e=>{const t=[];return e.forEach(l=>{l.children?t.push.apply(t,Xe(l.children)):t.push(l)}),t};function Ka(){var e;const t=ee(),{size:l}=fl((e=t.proxy)==null?void 0:e.$props),n=x(null),a=x([]),r=x([]),i=x(!1),o=x([]),s=x([]),u=x([]),d=x([]),f=x([]),p=x([]),v=x([]),h=x([]),g=[],m=x(0),y=x(0),b=x(0),S=x(!1),c=x([]),E=x(!1),R=x(!1),w=x(null),k=x({}),A=x(null),B=x(null),G=x(null),W=x(null),D=x(null);ie(a,()=>t.state&&ve(!1),{deep:!0});const V=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},Q=L=>{var M;(M=L.children)==null||M.forEach(P=>{P.fixed=L.fixed,Q(P)})},J=()=>{o.value.forEach(K=>{Q(K)}),d.value=o.value.filter(K=>K.fixed===!0||K.fixed==="left"),f.value=o.value.filter(K=>K.fixed==="right"),d.value.length>0&&o.value[0]&&o.value[0].type==="selection"&&!o.value[0].fixed&&(o.value[0].fixed=!0,d.value.unshift(o.value[0]));const L=o.value.filter(K=>!K.fixed);s.value=[].concat(d.value).concat(L).concat(f.value);const M=Xe(L),P=Xe(d.value),$=Xe(f.value);m.value=M.length,y.value=P.length,b.value=$.length,u.value=[].concat(P).concat(M).concat($),i.value=d.value.length>0||f.value.length>0},ve=(L,M=!1)=>{L&&J(),M?t.state.doLayout():t.state.debouncedUpdateLayout()},N=L=>c.value.includes(L),C=()=>{S.value=!1,c.value.length&&(c.value=[],t.emit("selection-change",[]))},O=()=>{let L;if(n.value){L=[];const M=Le(c.value,n.value),P=Le(a.value,n.value);for(const $ in M)Ie(M,$)&&!P[$]&&L.push(M[$].row)}else L=c.value.filter(M=>!a.value.includes(M));if(L.length){const M=c.value.filter(P=>!L.includes(P));c.value=M,t.emit("selection-change",M.slice())}},Y=()=>(c.value||[]).slice(),U=(L,M=void 0,P=!0)=>{if(Te(c.value,L,M)){const K=(c.value||[]).slice();P&&t.emit("select",K,L),t.emit("selection-change",K)}},X=()=>{var L,M;const P=R.value?!S.value:!(S.value||c.value.length);S.value=P;let $=!1,K=0;const Z=(M=(L=t==null?void 0:t.store)==null?void 0:L.states)==null?void 0:M.rowKey.value;a.value.forEach((ue,Ne)=>{const me=Ne+K;w.value?w.value.call(null,ue,me)&&Te(c.value,ue,P)&&($=!0):Te(c.value,ue,P)&&($=!0),K+=re(_(ue,Z))}),$&&t.emit("selection-change",c.value?c.value.slice():[]),t.emit("select-all",c.value)},te=()=>{const L=Le(c.value,n.value);a.value.forEach(M=>{const P=_(M,n.value),$=L[P];$&&(c.value[$.index]=M)})},le=()=>{var L,M,P;if(((L=a.value)==null?void 0:L.length)===0){S.value=!1;return}let $;n.value&&($=Le(c.value,n.value));const K=function(me){return $?!!$[_(me,n.value)]:c.value.includes(me)};let Z=!0,ue=0,Ne=0;for(let me=0,yn=(a.value||[]).length;me{var M;if(!t||!t.store)return 0;const{treeData:P}=t.store.states;let $=0;const K=(M=P.value[L])==null?void 0:M.children;return K&&($+=K.length,K.forEach(Z=>{$+=re(Z)})),$},fe=(L,M)=>{Array.isArray(L)||(L=[L]);const P={};return L.forEach($=>{k.value[$.id]=M,P[$.columnKey||$.id]=M}),P},q=(L,M,P)=>{B.value&&B.value!==L&&(B.value.order=null),B.value=L,G.value=M,W.value=P},pe=()=>{let L=F(r);Object.keys(k.value).forEach(M=>{const P=k.value[M];if(!P||P.length===0)return;const $=jl({columns:u.value},M);$&&$.filterMethod&&(L=L.filter(K=>P.some(Z=>$.filterMethod.call(null,Z,K,$))))}),A.value=L},Ve=()=>{a.value=Ia(A.value,{sortingColumn:B.value,sortProp:G.value,sortOrder:W.value})},ln=(L=void 0)=>{L&&L.filter||pe(),Ve()},nn=L=>{const{tableHeaderRef:M}=t.refs;if(!M)return;const P=Object.assign({},M.filterPanels),$=Object.keys(P);if($.length)if(typeof L=="string"&&(L=[L]),Array.isArray(L)){const K=L.map(Z=>Aa({columns:u.value},Z));$.forEach(Z=>{const ue=K.find(Ne=>Ne.id===Z);ue&&(ue.filteredValue=[])}),t.store.commit("filterChange",{column:K,values:[],silent:!0,multi:!0})}else $.forEach(K=>{const Z=u.value.find(ue=>ue.id===K);Z&&(Z.filteredValue=[])}),k.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},on=()=>{B.value&&(q(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:an,toggleRowExpansion:Bt,updateExpandRows:sn,states:rn,isRowExpanded:un}=Ta({data:a,rowKey:n}),{updateTreeExpandKeys:dn,toggleTreeExpansion:cn,updateTreeData:fn,loadOrToggle:hn,states:vn}=Ba({data:a,rowKey:n}),{updateCurrentRowData:pn,updateCurrentRow:mn,setCurrentRowKey:gn,states:bn}=Pa({data:a,rowKey:n});return{assertRowKey:V,updateColumns:J,scheduleLayout:ve,isSelected:N,clearSelection:C,cleanSelection:O,getSelectionRows:Y,toggleRowSelection:U,_toggleAllSelection:X,toggleAllSelection:null,updateSelectionByRowKey:te,updateAllSelected:le,updateFilters:fe,updateCurrentRow:mn,updateSort:q,execFilter:pe,execSort:Ve,execQuery:ln,clearFilter:nn,clearSort:on,toggleRowExpansion:Bt,setExpandRowKeysAdapter:L=>{an(L),dn(L)},setCurrentRowKey:gn,toggleRowExpansionAdapter:(L,M)=>{u.value.some(({type:$})=>$==="expand")?Bt(L,M):cn(L,M)},isRowExpanded:un,updateExpandRows:sn,updateCurrentRowData:pn,loadOrToggle:hn,updateTreeData:fn,states:{tableSize:l,rowKey:n,data:a,_data:r,isComplex:i,_columns:o,originColumns:s,columns:u,fixedColumns:d,rightFixedColumns:f,leafColumns:p,fixedLeafColumns:v,rightFixedLeafColumns:h,updateOrderFns:g,leafColumnsLength:m,fixedLeafColumnsLength:y,rightFixedLeafColumnsLength:b,isAllSelected:S,selection:c,reserveSelection:E,selectOnIndeterminate:R,selectable:w,filters:k,filteredData:A,sortingColumn:B,sortProp:G,sortOrder:W,hoverRow:D,...rn,...vn,...bn}}}function Et(e,t){return e.map(l=>{var n;return l.id===t.id?t:((n=l.children)!=null&&n.length&&(l.children=Et(l.children,t)),l)})}function Rt(e){e.forEach(t=>{var l,n;t.no=(l=t.getColumnIndex)==null?void 0:l.call(t),(n=t.children)!=null&&n.length&&Rt(t.children)}),e.sort((t,l)=>t.no-l.no)}function za(){const e=ee(),t=Ka();return{ns:se("table"),...t,mutations:{setData(i,o){const s=F(i._data)!==o;i.data.value=o,i._data.value=o,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),F(i.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):s?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(i,o,s,u){const d=F(i._columns);let f=[];s?(s&&!s.children&&(s.children=[]),s.children.push(o),f=Et(d,s)):(d.push(o),f=d),Rt(f),i._columns.value=f,i.updateOrderFns.push(u),o.type==="selection"&&(i.selectable.value=o.selectable,i.reserveSelection.value=o.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(i,o){var s;((s=o.getColumnIndex)==null?void 0:s.call(o))!==o.no&&(Rt(i._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(i,o,s,u){const d=F(i._columns)||[];if(s)s.children.splice(s.children.findIndex(p=>p.id===o.id),1),xe(()=>{var p;((p=s.children)==null?void 0:p.length)===0&&delete s.children}),i._columns.value=Et(d,s);else{const p=d.indexOf(o);p>-1&&(d.splice(p,1),i._columns.value=d)}const f=i.updateOrderFns.indexOf(u);f>-1&&i.updateOrderFns.splice(f,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(i,o){const{prop:s,order:u,init:d}=o;if(s){const f=F(i.columns).find(p=>p.property===s);f&&(f.order=u,e.store.updateSort(f,s,u),e.store.commit("changeSortCondition",{init:d}))}},changeSortCondition(i,o){const{sortingColumn:s,sortProp:u,sortOrder:d}=i,f=F(s),p=F(u),v=F(d);v===null&&(i.sortingColumn.value=null,i.sortProp.value=null);const h={filter:!0};e.store.execQuery(h),(!o||!(o.silent||o.init))&&e.emit("sort-change",{column:f,prop:p,order:v}),e.store.updateTableScrollY()},filterChange(i,o){const{column:s,values:u,silent:d}=o,f=e.store.updateFilters(s,u);e.store.execQuery(),d||e.emit("filter-change",f),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(i,o){e.store.toggleRowSelection(o),e.store.updateAllSelected()},setHoverRow(i,o){i.hoverRow.value=o},setCurrentRow(i,o){e.store.updateCurrentRow(o)}},commit:function(i,...o){const s=e.store.mutations;if(s[i])s[i].apply(e,[e.store.states].concat(o));else throw new Error(`Action not found: ${i}`)},updateTableScrollY:function(){xe(()=>e.layout.updateScrollY.apply(e.layout))}}}const Pe={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"}};function Da(e,t){if(!e)throw new Error("Table is required.");const l=za();return l.toggleAllSelection=et(l._toggleAllSelection,10),Object.keys(Pe).forEach(n=>{Ql(Jl(t,n),n,l)}),Va(l,t),l}function Va(e,t){Object.keys(Pe).forEach(l=>{ie(()=>Jl(t,l),n=>{Ql(n,l,e)})})}function Ql(e,t,l){let n=e,a=Pe[t];typeof Pe[t]=="object"&&(a=a.key,n=n||Pe[t].default),l.states[a].value=n}function Jl(e,t){if(t.includes(".")){const l=t.split(".");let n=e;return l.forEach(a=>{n=n[a]}),n}else return e[t]}class Ga{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=x(null),this.scrollX=x(!1),this.scrollY=x(!1),this.bodyWidth=x(null),this.fixedWidth=x(null),this.rightFixedWidth=x(null),this.gutterWidth=0;for(const l in t)Ie(t,l)&&(Be(this[l])?this[l].value=t[l]:this[l]=t[l]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){if(this.height.value===null)return!1;const l=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(l!=null&&l.wrapRef)){let n=!0;const a=this.scrollY.value;return n=l.wrapRef.scrollHeight>l.wrapRef.clientHeight,this.scrollY.value=n,a!==n}return!1}setHeight(t,l="height"){if(!Ke)return;const n=this.table.vnode.el;if(t=Oa(t),this.height.value=Number(t),!n&&(t||t===0))return xe(()=>this.setHeight(t,l));typeof t=="number"?(n.style[l]=`${t}px`,this.updateElsHeight()):typeof t=="string"&&(n.style[l]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(n=>{n.isColumnGroup?t.push.apply(t,n.columns):t.push(n)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let l=t;for(;l.tagName!=="DIV";){if(getComputedStyle(l).display==="none")return!0;l=l.parentElement}return!1}updateColumnsWidth(){if(!Ke)return;const t=this.fit,l=this.table.vnode.el.clientWidth;let n=0;const a=this.getFlattenColumns(),r=a.filter(s=>typeof s.width!="number");if(a.forEach(s=>{typeof s.width=="number"&&s.realWidth&&(s.realWidth=null)}),r.length>0&&t){if(a.forEach(s=>{n+=Number(s.width||s.minWidth||80)}),n<=l){this.scrollX.value=!1;const s=l-n;if(r.length===1)r[0].realWidth=Number(r[0].minWidth||80)+s;else{const u=r.reduce((p,v)=>p+Number(v.minWidth||80),0),d=s/u;let f=0;r.forEach((p,v)=>{if(v===0)return;const h=Math.floor(Number(p.minWidth||80)*d);f+=h,p.realWidth=Number(p.minWidth||80)+h}),r[0].realWidth=Number(r[0].minWidth||80)+s-f}}else this.scrollX.value=!0,r.forEach(s=>{s.realWidth=Number(s.minWidth)});this.bodyWidth.value=Math.max(n,l),this.table.state.resizeState.value.width=this.bodyWidth.value}else a.forEach(s=>{!s.width&&!s.minWidth?s.realWidth=80:s.realWidth=Number(s.width||s.minWidth),n+=s.realWidth}),this.scrollX.value=n>l,this.bodyWidth.value=n;const i=this.store.states.fixedColumns.value;if(i.length>0){let s=0;i.forEach(u=>{s+=Number(u.realWidth||u.width)}),this.fixedWidth.value=s}const o=this.store.states.rightFixedColumns.value;if(o.length>0){let s=0;o.forEach(u=>{s+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=s}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const l=this.observers.indexOf(t);l!==-1&&this.observers.splice(l,1)}notifyObservers(t){this.observers.forEach(n=>{var a,r;switch(t){case"columns":(a=n.state)==null||a.onColumnsChange(this);break;case"scrollable":(r=n.state)==null||r.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}}const{CheckboxGroup:Ya}=Oe,Ua=ce({name:"ElTableFilterPanel",components:{ElCheckbox:Oe,ElCheckboxGroup:Ya,ElScrollbar:Cl,ElTooltip:Dn,ElIcon:Ft,ArrowDown:An,ArrowUp:Mn},directives:{ClickOutside:In},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=ee(),{t:l}=vl(),n=se("table-filter"),a=t==null?void 0:t.parent;a.filterPanels.value[e.column.id]||(a.filterPanels.value[e.column.id]=t);const r=x(!1),i=x(null),o=H(()=>e.column&&e.column.filters),s=H({get:()=>{var c;return(((c=e.column)==null?void 0:c.filteredValue)||[])[0]},set:c=>{u.value&&(typeof c<"u"&&c!==null?u.value.splice(0,1,c):u.value.splice(0,1))}}),u=H({get(){return e.column?e.column.filteredValue||[]:[]},set(c){e.column&&e.upDataColumn("filteredValue",c)}}),d=H(()=>e.column?e.column.filterMultiple:!0),f=c=>c.value===s.value,p=()=>{r.value=!1},v=c=>{c.stopPropagation(),r.value=!r.value},h=()=>{r.value=!1},g=()=>{b(u.value),p()},m=()=>{u.value=[],b(u.value),p()},y=c=>{s.value=c,b(typeof c<"u"&&c!==null?u.value:[]),p()},b=c=>{e.store.commit("filterChange",{column:e.column,values:c}),e.store.updateAllSelected()};ie(r,c=>{e.column&&e.upDataColumn("filterOpened",c)},{immediate:!0});const S=H(()=>{var c,E;return(E=(c=i.value)==null?void 0:c.popperRef)==null?void 0:E.contentRef});return{tooltipVisible:r,multiple:d,filteredValue:u,filterValue:s,filters:o,handleConfirm:g,handleReset:m,handleSelect:y,isActive:f,t:l,ns:n,showFilterPanel:v,hideFilterPanel:h,popperPaneRef:S,tooltip:i}}}),ja={key:0},qa=["disabled"],Xa=["label","onClick"];function _a(e,t,l,n,a,r){const i=de("el-checkbox"),o=de("el-checkbox-group"),s=de("el-scrollbar"),u=de("arrow-up"),d=de("arrow-down"),f=de("el-icon"),p=de("el-tooltip"),v=pl("click-outside");return z(),ke(p,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:be(()=>[e.multiple?(z(),j("div",ja,[oe("div",{class:I(e.ns.e("content"))},[Ce(s,{"wrap-class":e.ns.e("wrap")},{default:be(()=>[Ce(o,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=h=>e.filteredValue=h),class:I(e.ns.e("checkbox-group"))},{default:be(()=>[(z(!0),j(Je,null,Dt(e.filters,h=>(z(),ke(i,{key:h.value,label:h.value},{default:be(()=>[lt(we(h.text),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),oe("div",{class:I(e.ns.e("bottom"))},[oe("button",{class:I({[e.ns.is("disabled")]:e.filteredValue.length===0}),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...h)=>e.handleConfirm&&e.handleConfirm(...h))},we(e.t("el.table.confirmFilter")),11,qa),oe("button",{type:"button",onClick:t[2]||(t[2]=(...h)=>e.handleReset&&e.handleReset(...h))},we(e.t("el.table.resetFilter")),1)],2)])):(z(),j("ul",{key:1,class:I(e.ns.e("list"))},[oe("li",{class:I([e.ns.e("list-item"),{[e.ns.is("active")]:e.filterValue===void 0||e.filterValue===null}]),onClick:t[3]||(t[3]=h=>e.handleSelect(null))},we(e.t("el.table.clearFilter")),3),(z(!0),j(Je,null,Dt(e.filters,h=>(z(),j("li",{key:h.value,class:I([e.ns.e("list-item"),e.ns.is("active",e.isActive(h))]),label:h.value,onClick:g=>e.handleSelect(h.value)},we(h.text),11,Xa))),128))],2))]),default:be(()=>[Se((z(),j("span",{class:I([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...h)=>e.showFilterPanel&&e.showFilterPanel(...h))},[Ce(f,null,{default:be(()=>[e.column.filterOpened?(z(),ke(u,{key:0})):(z(),ke(d,{key:1}))]),_:1})],2)),[[v,e.hideFilterPanel,e.popperPaneRef]])]),_:1},8,["visible","placement","popper-class"])}var Qa=ze(Ua,[["render",_a],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function Zl(e){const t=ee();ml(()=>{l.value.addObserver(t)}),De(()=>{n(l.value),a(l.value)}),On(()=>{n(l.value),a(l.value)}),At(()=>{l.value.removeObserver(t)});const l=H(()=>{const r=e.layout;if(!r)throw new Error("Can not find table layout.");return r}),n=r=>{var i;const o=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col"))||[];if(!o.length)return;const s=r.getFlattenColumns(),u={};s.forEach(d=>{u[d.id]=d});for(let d=0,f=o.length;d{var i,o;const s=((i=e.vnode.el)==null?void 0:i.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let d=0,f=s.length;d{g.stopPropagation()},r=(g,m)=>{!m.filters&&m.sortable?h(g,m,!1):m.filterable&&!m.sortable&&a(g),n==null||n.emit("header-click",m,g)},i=(g,m)=>{n==null||n.emit("header-contextmenu",m,g)},o=x(null),s=x(!1),u=x({}),d=(g,m)=>{if(Ke&&!(m.children&&m.children.length>0)&&o.value&&e.border){s.value=!0;const y=n;t("set-drag-visible",!0);const S=(y==null?void 0:y.vnode.el).getBoundingClientRect().left,c=l.vnode.el.querySelector(`th.${m.id}`),E=c.getBoundingClientRect(),R=E.left-S+30;gl(c,"noclick"),u.value={startMouseLeft:g.clientX,startLeft:E.right-S,startColumnLeft:E.left-S,tableLeft:S};const w=y==null?void 0:y.refs.resizeProxy;w.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const k=B=>{const G=B.clientX-u.value.startMouseLeft,W=u.value.startLeft+G;w.style.left=`${Math.max(R,W)}px`},A=()=>{if(s.value){const{startColumnLeft:B,startLeft:G}=u.value,D=Number.parseInt(w.style.left,10)-B;m.width=m.realWidth=D,y==null||y.emit("header-dragend",m.width,G-B,m,g),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",s.value=!1,o.value=null,u.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",A),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{ft(c,"noclick")},0)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",A)}},f=(g,m)=>{var y;if(m.children&&m.children.length>0)return;const b=(y=g.target)==null?void 0:y.closest("th");if(!(!m||!m.resizable)&&!s.value&&e.border){const S=b.getBoundingClientRect(),c=document.body.style;S.width>12&&S.right-g.pageX<8?(c.cursor="col-resize",Ye(b,"is-sortable")&&(b.style.cursor="col-resize"),o.value=m):s.value||(c.cursor="",Ye(b,"is-sortable")&&(b.style.cursor="pointer"),o.value=null)}},p=()=>{Ke&&(document.body.style.cursor="")},v=({order:g,sortOrders:m})=>{if(g==="")return m[0];const y=m.indexOf(g||null);return m[y>m.length-2?0:y+1]},h=(g,m,y)=>{var b;g.stopPropagation();const S=m.order===y?null:y||v(m),c=(b=g.target)==null?void 0:b.closest("th");if(c&&Ye(c,"noclick")){ft(c,"noclick");return}if(!m.sortable)return;const E=e.store.states;let R=E.sortProp.value,w;const k=E.sortingColumn.value;(k!==m||k===m&&k.order===null)&&(k&&(k.order=null),E.sortingColumn.value=m,R=m.property),S?w=m.order=S:w=m.order=null,E.sortProp.value=R,E.sortOrder.value=w,n==null||n.store.commit("changeSortCondition")};return{handleHeaderClick:r,handleHeaderContextMenu:i,handleMouseDown:d,handleMouseMove:f,handleMouseOut:p,handleSortClick:h,handleFilterClick:a}}function Za(e){const t=ae(he),l=se("table");return{getHeaderRowStyle:o=>{const s=t==null?void 0:t.props.headerRowStyle;return typeof s=="function"?s.call(null,{rowIndex:o}):s},getHeaderRowClass:o=>{const s=[],u=t==null?void 0:t.props.headerRowClassName;return typeof u=="string"?s.push(u):typeof u=="function"&&s.push(u.call(null,{rowIndex:o})),s.join(" ")},getHeaderCellStyle:(o,s,u,d)=>{var f;let p=(f=t==null?void 0:t.props.headerCellStyle)!=null?f:{};typeof p=="function"&&(p=p.call(null,{rowIndex:o,columnIndex:s,row:u,column:d}));const v=Tt(s,d.fixed,e.store,u);return He(v,"left"),He(v,"right"),Object.assign({},p,v)},getHeaderCellClass:(o,s,u,d)=>{const f=$t(l.b(),s,d.fixed,e.store,u),p=[d.id,d.order,d.headerAlign,d.className,d.labelClassName,...f];d.children||p.push("is-leaf"),d.sortable&&p.push("is-sortable");const v=t==null?void 0:t.props.headerCellClassName;return typeof v=="string"?p.push(v):typeof v=="function"&&p.push(v.call(null,{rowIndex:o,columnIndex:s,row:u,column:d})),p.push(l.e("cell")),p.filter(h=>!!h).join(" ")}}}const en=e=>{const t=[];return e.forEach(l=>{l.children?(t.push(l),t.push.apply(t,en(l.children))):t.push(l)}),t},es=e=>{let t=1;const l=(r,i)=>{if(i&&(r.level=i.level+1,t{l(s,r),o+=s.colSpan}),r.colSpan=o}else r.colSpan=1};e.forEach(r=>{r.level=1,l(r,void 0)});const n=[];for(let r=0;r{r.children?(r.rowSpan=1,r.children.forEach(i=>i.isSubColumn=!0)):r.rowSpan=t-r.level+1,n[r.level-1].push(r)}),n};function ts(e){const t=ae(he),l=H(()=>es(e.store.states.originColumns.value));return{isGroup:H(()=>{const r=l.value.length>1;return r&&t&&(t.state.isGroup.value=!0),r}),toggleAllSelection:r=>{r.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:l}}var ls=ce({name:"ElTableHeader",components:{ElCheckbox:Oe},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const l=ee(),n=ae(he),a=se("table"),r=x({}),{onColumnsChange:i,onScrollableChange:o}=Zl(n);De(async()=>{await xe(),await xe();const{prop:R,order:w}=e.defaultSort;n==null||n.store.commit("sort",{prop:R,order:w,init:!0})});const{handleHeaderClick:s,handleHeaderContextMenu:u,handleMouseDown:d,handleMouseMove:f,handleMouseOut:p,handleSortClick:v,handleFilterClick:h}=Ja(e,t),{getHeaderRowStyle:g,getHeaderRowClass:m,getHeaderCellStyle:y,getHeaderCellClass:b}=Za(e),{isGroup:S,toggleAllSelection:c,columnRows:E}=ts(e);return l.state={onColumnsChange:i,onScrollableChange:o},l.filterPanels=r,{ns:a,filterPanels:r,onColumnsChange:i,onScrollableChange:o,columnRows:E,getHeaderRowClass:m,getHeaderRowStyle:g,getHeaderCellClass:b,getHeaderCellStyle:y,handleHeaderClick:s,handleHeaderContextMenu:u,handleMouseDown:d,handleMouseMove:f,handleMouseOut:p,handleSortClick:v,handleFilterClick:h,isGroup:S,toggleAllSelection:c}},render(){const{ns:e,isGroup:t,columnRows:l,getHeaderCellStyle:n,getHeaderCellClass:a,getHeaderRowClass:r,getHeaderRowStyle:i,handleHeaderClick:o,handleHeaderContextMenu:s,handleMouseDown:u,handleMouseMove:d,handleSortClick:f,handleMouseOut:p,store:v,$parent:h}=this;let g=1;return T("thead",{class:{[e.is("group")]:t}},l.map((m,y)=>T("tr",{class:r(y),key:y,style:i(y)},m.map((b,S)=>(b.rowSpan>g&&(g=b.rowSpan),T("th",{class:a(y,S,m,b),colspan:b.colSpan,key:`${b.id}-thead`,rowspan:b.rowSpan,style:n(y,S,m,b),onClick:c=>o(c,b),onContextmenu:c=>s(c,b),onMousedown:c=>u(c,b),onMousemove:c=>d(c,b),onMouseout:p},[T("div",{class:["cell",b.filteredValue&&b.filteredValue.length>0?"highlight":""]},[b.renderHeader?b.renderHeader({column:b,$index:S,store:v,_self:h}):b.label,b.sortable&&T("span",{onClick:c=>f(c,b),class:"caret-wrapper"},[T("i",{onClick:c=>f(c,b,"ascending"),class:"sort-caret ascending"}),T("i",{onClick:c=>f(c,b,"descending"),class:"sort-caret descending"})]),b.filterable&&T(Qa,{store:v,placement:b.filterPlacement||"bottom-start",column:b,upDataColumn:(c,E)=>{b[c]=E}})])]))))))}});function ns(e){const t=ae(he),l=x(""),n=x(T("div")),{nextZIndex:a}=Hn(),r=(v,h,g)=>{var m;const y=t,b=st(v);let S;const c=(m=y==null?void 0:y.vnode.el)==null?void 0:m.dataset.prefix;b&&(S=Zt({columns:e.store.states.columns.value},b,c),S&&(y==null||y.emit(`cell-${g}`,h,S,b,v))),y==null||y.emit(`row-${g}`,h,S,v)},i=(v,h)=>{r(v,h,"dblclick")},o=(v,h)=>{e.store.commit("setCurrentRow",h),r(v,h,"click")},s=(v,h)=>{r(v,h,"contextmenu")},u=et(v=>{e.store.commit("setHoverRow",v)},30),d=et(()=>{e.store.commit("setHoverRow",null)},30);return{handleDoubleClick:i,handleClick:o,handleContextMenu:s,handleMouseEnter:u,handleMouseLeave:d,handleCellMouseEnter:(v,h,g)=>{var m;const y=t,b=st(v),S=(m=y==null?void 0:y.vnode.el)==null?void 0:m.dataset.prefix;if(b){const k=Zt({columns:e.store.states.columns.value},b,S),A=y.hoverState={cell:b,column:k,row:h};y==null||y.emit("cell-mouse-enter",A.row,A.column,A.cell,v)}if(!g)return;const c=v.target.querySelector(".cell");if(!(Ye(c,`${S}-tooltip`)&&c.childNodes.length))return;const E=document.createRange();E.setStart(c,0),E.setEnd(c,c.childNodes.length);const R=Math.round(E.getBoundingClientRect().width),w=(Number.parseInt(Vt(c,"paddingLeft"),10)||0)+(Number.parseInt(Vt(c,"paddingRight"),10)||0);(R+w>c.offsetWidth||c.scrollWidth>c.offsetWidth)&&$a(t==null?void 0:t.refs.tableWrapper,b,b.innerText||b.textContent,a,g)},handleCellMouseLeave:v=>{if(!st(v))return;const g=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",g==null?void 0:g.row,g==null?void 0:g.column,g==null?void 0:g.cell,v)},tooltipContent:l,tooltipTrigger:n}}function os(e){const t=ae(he),l=se("table");return{getRowStyle:(u,d)=>{const f=t==null?void 0:t.props.rowStyle;return typeof f=="function"?f.call(null,{row:u,rowIndex:d}):f||null},getRowClass:(u,d)=>{const f=[l.e("row")];t!=null&&t.props.highlightCurrentRow&&u===e.store.states.currentRow.value&&f.push("current-row"),e.stripe&&d%2===1&&f.push(l.em("row","striped"));const p=t==null?void 0:t.props.rowClassName;return typeof p=="string"?f.push(p):typeof p=="function"&&f.push(p.call(null,{row:u,rowIndex:d})),f},getCellStyle:(u,d,f,p)=>{const v=t==null?void 0:t.props.cellStyle;let h=v??{};typeof v=="function"&&(h=v.call(null,{rowIndex:u,columnIndex:d,row:f,column:p}));const g=Tt(d,e==null?void 0:e.fixed,e.store);return He(g,"left"),He(g,"right"),Object.assign({},h,g)},getCellClass:(u,d,f,p,v)=>{const h=$t(l.b(),d,e==null?void 0:e.fixed,e.store,void 0,v),g=[p.id,p.align,p.className,...h],m=t==null?void 0:t.props.cellClassName;return typeof m=="string"?g.push(m):typeof m=="function"&&g.push(m.call(null,{rowIndex:u,columnIndex:d,row:f,column:p})),g.push(l.e("cell")),g.filter(y=>!!y).join(" ")},getSpan:(u,d,f,p)=>{let v=1,h=1;const g=t==null?void 0:t.props.spanMethod;if(typeof g=="function"){const m=g({row:u,column:d,rowIndex:f,columnIndex:p});Array.isArray(m)?(v=m[0],h=m[1]):typeof m=="object"&&(v=m.rowspan,h=m.colspan)}return{rowspan:v,colspan:h}},getColspanRealWidth:(u,d,f)=>{if(d<1)return u[f].realWidth;const p=u.map(({realWidth:v,width:h})=>v||h).slice(f,f+d);return Number(p.reduce((v,h)=>Number(v)+Number(h),-1))}}}function as(e){const t=ae(he),l=se("table"),{handleDoubleClick:n,handleClick:a,handleContextMenu:r,handleMouseEnter:i,handleMouseLeave:o,handleCellMouseEnter:s,handleCellMouseLeave:u,tooltipContent:d,tooltipTrigger:f}=ns(e),{getRowStyle:p,getRowClass:v,getCellStyle:h,getCellClass:g,getSpan:m,getColspanRealWidth:y}=os(e),b=H(()=>e.store.states.columns.value.findIndex(({type:w})=>w==="default")),S=(w,k)=>{const A=t.props.rowKey;return A?_(w,A):k},c=(w,k,A,B=!1)=>{const{tooltipEffect:G,tooltipOptions:W,store:D}=e,{indent:V,columns:Q}=D.states,J=v(w,k);let ve=!0;return A&&(J.push(l.em("row",`level-${A.level}`)),ve=A.display),T("tr",{style:[ve?null:{display:"none"},p(w,k)],class:J,key:S(w,k),onDblclick:C=>n(C,w),onClick:C=>a(C,w),onContextmenu:C=>r(C,w),onMouseenter:()=>i(k),onMouseleave:o},Q.value.map((C,O)=>{const{rowspan:Y,colspan:U}=m(w,C,k,O);if(!Y||!U)return null;const X={...C};X.realWidth=y(Q.value,U,O);const te={store:e.store,_self:e.context||t,column:X,row:w,$index:k,cellIndex:O,expanded:B};O===b.value&&A&&(te.treeNode={indent:A.level*V.value,level:A.level},typeof A.expanded=="boolean"&&(te.treeNode.expanded=A.expanded,"loading"in A&&(te.treeNode.loading=A.loading),"noLazyChildren"in A&&(te.treeNode.noLazyChildren=A.noLazyChildren)));const le=`${k},${O}`,re=X.columnKey||X.rawColumnKey||"",fe=E(O,C,te),q=C.showOverflowTooltip&&Wl({effect:G},W,C.showOverflowTooltip);return T("td",{style:h(k,O,w,C),class:g(k,O,w,C,U-1),key:`${re}${le}`,rowspan:Y,colspan:U,onMouseenter:pe=>s(pe,w,q),onMouseleave:u},[fe])}))},E=(w,k,A)=>k.renderCell(A);return{wrappedRowRender:(w,k)=>{const A=e.store,{isRowExpanded:B,assertRowKey:G}=A,{treeData:W,lazyTreeNodeMap:D,childrenColumnName:V,rowKey:Q}=A.states,J=A.states.columns.value;if(J.some(({type:N})=>N==="expand")){const N=B(w),C=c(w,k,void 0,N),O=t.renderExpanded;return N?O?[[C,T("tr",{key:`expanded-row__${C.key}`},[T("td",{colspan:J.length,class:`${l.e("cell")} ${l.e("expanded-cell")}`},[O({row:w,$index:k,store:A,expanded:N})])])]]:(console.error("[Element Error]renderExpanded is required."),C):[[C]]}else if(Object.keys(W.value).length){G();const N=_(w,Q.value);let C=W.value[N],O=null;C&&(O={expanded:C.expanded,level:C.level,display:!0},typeof C.lazy=="boolean"&&(typeof C.loaded=="boolean"&&C.loaded&&(O.noLazyChildren=!(C.children&&C.children.length)),O.loading=C.loading));const Y=[c(w,k,O)];if(C){let U=0;const X=(le,re)=>{le&&le.length&&re&&le.forEach(fe=>{const q={display:re.display&&re.expanded,level:re.level+1,expanded:!1,noLazyChildren:!1,loading:!1},pe=_(fe,Q.value);if(pe==null)throw new Error("For nested data item, row-key is required.");if(C={...W.value[pe]},C&&(q.expanded=C.expanded,C.level=C.level||q.level,C.display=!!(C.expanded&&q.display),typeof C.lazy=="boolean"&&(typeof C.loaded=="boolean"&&C.loaded&&(q.noLazyChildren=!(C.children&&C.children.length)),q.loading=C.loading)),U++,Y.push(c(fe,k+U,q)),C){const Ve=D.value[pe]||fe[V.value];X(Ve,C)}})};C.display=!0;const te=D.value[N]||w[V.value];X(te,C)}return Y}else return c(w,k,void 0)},tooltipContent:d,tooltipTrigger:f}}const ss={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var rs=ce({name:"ElTableBody",props:ss,setup(e){const t=ee(),l=ae(he),n=se("table"),{wrappedRowRender:a,tooltipContent:r,tooltipTrigger:i}=as(e),{onColumnsChange:o,onScrollableChange:s}=Zl(l);return ie(e.store.states.hoverRow,(u,d)=>{if(!e.store.states.isComplex.value||!Ke)return;let f=window.requestAnimationFrame;f||(f=p=>window.setTimeout(p,16)),f(()=>{const p=t==null?void 0:t.vnode.el,v=Array.from((p==null?void 0:p.children)||[]).filter(m=>m==null?void 0:m.classList.contains(`${n.e("row")}`)),h=v[d],g=v[u];h&&ft(h,"hover-row"),g&&gl(g,"hover-row")})}),At(()=>{var u;(u=ge)==null||u()}),{ns:n,onColumnsChange:o,onScrollableChange:s,wrappedRowRender:a,tooltipContent:r,tooltipTrigger:i}},render(){const{wrappedRowRender:e,store:t}=this,l=t.states.data.value||[];return T("tbody",{},[l.reduce((n,a)=>n.concat(e(a,n.length)),[])])}});function Pt(e){const t=e.tableLayout==="auto";let l=e.columns||[];t&&l.every(a=>a.width===void 0)&&(l=[]);const n=a=>{const r={key:`${e.tableLayout}_${a.id}`,style:{},name:void 0};return t?r.style={width:`${a.width}px`}:r.name=a.id,r};return T("colgroup",{},l.map(a=>T("col",n(a))))}Pt.props=["columns","tableLayout"];function is(){const e=ae(he),t=e==null?void 0:e.store,l=H(()=>t.states.fixedLeafColumnsLength.value),n=H(()=>t.states.rightFixedColumns.value.length),a=H(()=>t.states.columns.value.length),r=H(()=>t.states.fixedColumns.value.length),i=H(()=>t.states.rightFixedColumns.value.length);return{leftFixedLeafCount:l,rightFixedLeafCount:n,columnsCount:a,leftFixedCount:r,rightFixedCount:i,columns:t.states.columns}}function us(e){const{columns:t}=is(),l=se("table");return{getCellClasses:(r,i)=>{const o=r[i],s=[l.e("cell"),o.id,o.align,o.labelClassName,...$t(l.b(),i,o.fixed,e.store)];return o.className&&s.push(o.className),o.children||s.push(l.is("leaf")),s},getCellStyles:(r,i)=>{const o=Tt(i,r.fixed,e.store);return He(o,"left"),He(o,"right"),o},columns:t}}var ds=ce({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const{getCellClasses:t,getCellStyles:l,columns:n}=us(e);return{ns:se("table"),getCellClasses:t,getCellStyles:l,columns:n}},render(){const{columns:e,getCellStyles:t,getCellClasses:l,summaryMethod:n,sumText:a,ns:r}=this,i=this.store.states.data.value;let o=[];return n?o=n({columns:e,data:i}):e.forEach((s,u)=>{if(u===0){o[u]=a;return}const d=i.map(h=>Number(h[s.property])),f=[];let p=!0;d.forEach(h=>{if(!Number.isNaN(+h)){p=!1;const g=`${h}`.split(".")[1];f.push(g?g.length:0)}});const v=Math.max.apply(null,f);p?o[u]="":o[u]=d.reduce((h,g)=>{const m=Number(g);return Number.isNaN(+m)?h:Number.parseFloat((h+g).toFixed(Math.min(v,20)))},0)}),T("table",{class:r.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[Pt({columns:e}),T("tbody",[T("tr",{},[...e.map((s,u)=>T("td",{key:u,colspan:s.colSpan,rowspan:s.rowSpan,class:l(e,u),style:t(s,u)},[T("div",{class:["cell",s.labelClassName]},[o[u]])]))])])])}});function cs(e){return{setCurrentRow:d=>{e.commit("setCurrentRow",d)},getSelectionRows:()=>e.getSelectionRows(),toggleRowSelection:(d,f)=>{e.toggleRowSelection(d,f,!1),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:d=>{e.clearFilter(d)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(d,f)=>{e.toggleRowExpansionAdapter(d,f)},clearSort:()=>{e.clearSort()},sort:(d,f)=>{e.commit("sort",{prop:d,order:f})}}}function fs(e,t,l,n){const a=x(!1),r=x(null),i=x(!1),o=N=>{i.value=N},s=x({width:null,height:null,headerHeight:null}),u=x(!1),d={display:"inline-block",verticalAlign:"middle"},f=x(),p=x(0),v=x(0),h=x(0),g=x(0);$e(()=>{t.setHeight(e.height)}),$e(()=>{t.setMaxHeight(e.maxHeight)}),ie(()=>[e.currentRowKey,l.states.rowKey],([N,C])=>{!F(C)||!F(N)||l.setCurrentRowKey(`${N}`)},{immediate:!0}),ie(()=>e.data,N=>{n.store.commit("setData",N)},{immediate:!0,deep:!0}),$e(()=>{e.expandRowKeys&&l.setExpandRowKeysAdapter(e.expandRowKeys)});const m=()=>{n.store.commit("setHoverRow",null),n.hoverState&&(n.hoverState=null)},y=(N,C)=>{const{pixelX:O,pixelY:Y}=C;Math.abs(O)>=Math.abs(Y)&&(n.refs.bodyWrapper.scrollLeft+=C.pixelX/5)},b=H(()=>e.height||e.maxHeight||l.states.fixedColumns.value.length>0||l.states.rightFixedColumns.value.length>0),S=H(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),c=()=>{b.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(k)};De(async()=>{await xe(),l.updateColumns(),A(),requestAnimationFrame(c);const N=n.vnode.el,C=n.refs.headerWrapper;e.flexible&&N&&N.parentElement&&(N.parentElement.style.minWidth="0"),s.value={width:f.value=N.offsetWidth,height:N.offsetHeight,headerHeight:e.showHeader&&C?C.offsetHeight:null},l.states.columns.value.forEach(O=>{O.filteredValue&&O.filteredValue.length&&n.store.commit("filterChange",{column:O,values:O.filteredValue,silent:!0})}),n.$ready=!0});const E=(N,C)=>{if(!N)return;const O=Array.from(N.classList).filter(Y=>!Y.startsWith("is-scrolling-"));O.push(t.scrollX.value?C:"is-scrolling-none"),N.className=O.join(" ")},R=N=>{const{tableWrapper:C}=n.refs;E(C,N)},w=N=>{const{tableWrapper:C}=n.refs;return!!(C&&C.classList.contains(N))},k=function(){if(!n.refs.scrollBarRef)return;if(!t.scrollX.value){const le="is-scrolling-none";w(le)||R(le);return}const N=n.refs.scrollBarRef.wrapRef;if(!N)return;const{scrollLeft:C,offsetWidth:O,scrollWidth:Y}=N,{headerWrapper:U,footerWrapper:X}=n.refs;U&&(U.scrollLeft=C),X&&(X.scrollLeft=C);const te=Y-O-1;C>=te?R("is-scrolling-right"):R(C===0?"is-scrolling-left":"is-scrolling-middle")},A=()=>{n.refs.scrollBarRef&&(n.refs.scrollBarRef.wrapRef&&Gt(n.refs.scrollBarRef.wrapRef,"scroll",k,{passive:!0}),e.fit?Yt(n.vnode.el,B):Gt(window,"resize",B),Yt(n.refs.bodyWrapper,()=>{var N,C;B(),(C=(N=n.refs)==null?void 0:N.scrollBarRef)==null||C.update()}))},B=()=>{var N,C,O;const Y=n.vnode.el;if(!n.$ready||!Y)return;let U=!1;const{width:X,height:te,headerHeight:le}=s.value,re=f.value=Y.offsetWidth;X!==re&&(U=!0);const fe=Y.offsetHeight;(e.height||b.value)&&te!==fe&&(U=!0);const q=e.tableLayout==="fixed"?n.refs.headerWrapper:(N=n.refs.tableHeaderRef)==null?void 0:N.$el;e.showHeader&&(q==null?void 0:q.offsetHeight)!==le&&(U=!0),p.value=((C=n.refs.tableWrapper)==null?void 0:C.scrollHeight)||0,h.value=(q==null?void 0:q.scrollHeight)||0,g.value=((O=n.refs.footerWrapper)==null?void 0:O.offsetHeight)||0,v.value=p.value-h.value-g.value,U&&(s.value={width:re,height:fe,headerHeight:e.showHeader&&(q==null?void 0:q.offsetHeight)||0},c())},G=ht(),W=H(()=>{const{bodyWidth:N,scrollY:C,gutterWidth:O}=t;return N.value?`${N.value-(C.value?O:0)}px`:""}),D=H(()=>e.maxHeight?"fixed":e.tableLayout),V=H(()=>{if(e.data&&e.data.length)return null;let N="100%";e.height&&v.value&&(N=`${v.value}px`);const C=f.value;return{width:C?`${C}px`:"",height:N}}),Q=H(()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{}),J=H(()=>{if(e.height)return{height:"100%"};if(e.maxHeight){if(Number.isNaN(Number(e.maxHeight)))return{maxHeight:`calc(${e.maxHeight} - ${h.value+g.value}px)`};{const N=e.maxHeight;if(p.value>=Number(N))return{maxHeight:`${p.value-h.value-g.value}px`}}}return{}});return{isHidden:a,renderExpanded:r,setDragVisible:o,isGroup:u,handleMouseLeave:m,handleHeaderFooterMousewheel:y,tableSize:G,emptyBlockStyle:V,handleFixedMousewheel:(N,C)=>{const O=n.refs.bodyWrapper;if(Math.abs(C.spinY)>0){const Y=O.scrollTop;C.pixelY<0&&Y!==0&&N.preventDefault(),C.pixelY>0&&O.scrollHeight-O.clientHeight>Y&&N.preventDefault(),O.scrollTop+=Math.ceil(C.pixelY/5)}else O.scrollLeft+=Math.ceil(C.pixelX/5)},resizeProxyVisible:i,bodyWidth:W,resizeState:s,doLayout:c,tableBodyStyles:S,tableLayout:D,scrollbarViewStyle:d,tableInnerStyle:Q,scrollbarStyle:J}}function hs(e){const t=x(),l=()=>{const a=e.vnode.el.querySelector(".hidden-columns"),r={childList:!0,subtree:!0},i=e.store.states.updateOrderFns;t.value=new MutationObserver(()=>{i.forEach(o=>o())}),t.value.observe(a,r)};De(()=>{l()}),At(()=>{var n;(n=t.value)==null||n.disconnect()})}var vs={data:{type:Array,default:()=>[]},size:Lt,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean};const ps=()=>{const e=x(),t=(r,i)=>{const o=e.value;o&&o.scrollTo(r,i)},l=(r,i)=>{const o=e.value;o&&ut(i)&&["Top","Left"].includes(r)&&o[`setScroll${r}`](i)};return{scrollBarRef:e,scrollTo:t,setScrollTop:r=>l("Top",r),setScrollLeft:r=>l("Left",r)}};let ms=1;const gs=ce({name:"ElTable",directives:{Mousewheel:sa},components:{TableHeader:ls,TableBody:rs,TableFooter:ds,ElScrollbar:Cl,hColgroup:Pt},props:vs,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t}=vl(),l=se("table"),n=ee();cl(he,n);const a=Da(n,e);n.store=a;const r=new Ga({store:n.store,table:n,fit:e.fit,showHeader:e.showHeader});n.layout=r;const i=H(()=>(a.states.data.value||[]).length===0),{setCurrentRow:o,getSelectionRows:s,toggleRowSelection:u,clearSelection:d,clearFilter:f,toggleAllSelection:p,toggleRowExpansion:v,clearSort:h,sort:g}=cs(a),{isHidden:m,renderExpanded:y,setDragVisible:b,isGroup:S,handleMouseLeave:c,handleHeaderFooterMousewheel:E,tableSize:R,emptyBlockStyle:w,handleFixedMousewheel:k,resizeProxyVisible:A,bodyWidth:B,resizeState:G,doLayout:W,tableBodyStyles:D,tableLayout:V,scrollbarViewStyle:Q,tableInnerStyle:J,scrollbarStyle:ve}=fs(e,r,a,n),{scrollBarRef:N,scrollTo:C,setScrollLeft:O,setScrollTop:Y}=ps(),U=et(W,50),X=`${l.namespace.value}-table_${ms++}`;n.tableId=X,n.state={isGroup:S,resizeState:G,doLayout:W,debouncedUpdateLayout:U};const te=H(()=>e.sumText||t("el.table.sumText")),le=H(()=>e.emptyText||t("el.table.emptyText"));return hs(n),{ns:l,layout:r,store:a,handleHeaderFooterMousewheel:E,handleMouseLeave:c,tableId:X,tableSize:R,isHidden:m,isEmpty:i,renderExpanded:y,resizeProxyVisible:A,resizeState:G,isGroup:S,bodyWidth:B,tableBodyStyles:D,emptyBlockStyle:w,debouncedUpdateLayout:U,handleFixedMousewheel:k,setCurrentRow:o,getSelectionRows:s,toggleRowSelection:u,clearSelection:d,clearFilter:f,toggleAllSelection:p,toggleRowExpansion:v,clearSort:h,doLayout:W,sort:g,t,setDragVisible:b,context:n,computedSumText:te,computedEmptyText:le,tableLayout:V,scrollbarViewStyle:Q,tableInnerStyle:J,scrollbarStyle:ve,scrollBarRef:N,scrollTo:C,setScrollLeft:O,setScrollTop:Y}}}),bs=["data-prefix"],ys={ref:"hiddenColumns",class:"hidden-columns"};function Cs(e,t,l,n,a,r){const i=de("hColgroup"),o=de("table-header"),s=de("table-body"),u=de("el-scrollbar"),d=de("table-footer"),f=pl("mousewheel");return z(),j("div",{ref:"tableWrapper",class:I([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:(e.store.states.data.value||[]).length!==0&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:Ee(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=p=>e.handleMouseLeave())},[oe("div",{class:I(e.ns.e("inner-wrapper")),style:Ee(e.tableInnerStyle)},[oe("div",ys,[Fe(e.$slots,"default")],512),e.showHeader&&e.tableLayout==="fixed"?Se((z(),j("div",{key:0,ref:"headerWrapper",class:I(e.ns.e("header-wrapper"))},[oe("table",{ref:"tableHeader",class:I(e.ns.e("header")),style:Ee(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[Ce(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),Ce(o,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[f,e.handleHeaderFooterMousewheel]]):ye("v-if",!0),oe("div",{ref:"bodyWrapper",class:I(e.ns.e("body-wrapper"))},[Ce(u,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:be(()=>[oe("table",{ref:"tableBody",class:I(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Ee({width:e.bodyWidth,tableLayout:e.tableLayout})},[Ce(i,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&e.tableLayout==="auto"?(z(),ke(o,{key:0,ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):ye("v-if",!0),Ce(s,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"])],6),e.isEmpty?(z(),j("div",{key:0,ref:"emptyBlock",style:Ee(e.emptyBlockStyle),class:I(e.ns.e("empty-block"))},[oe("span",{class:I(e.ns.e("empty-text"))},[Fe(e.$slots,"empty",{},()=>[lt(we(e.computedEmptyText),1)])],2)],6)):ye("v-if",!0),e.$slots.append?(z(),j("div",{key:1,ref:"appendWrapper",class:I(e.ns.e("append-wrapper"))},[Fe(e.$slots,"append")],2)):ye("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary?Se((z(),j("div",{key:1,ref:"footerWrapper",class:I(e.ns.e("footer-wrapper"))},[Ce(d,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:Ee(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[Ut,!e.isEmpty],[f,e.handleHeaderFooterMousewheel]]):ye("v-if",!0),e.border||e.isGroup?(z(),j("div",{key:2,class:I(e.ns.e("border-left-patch"))},null,2)):ye("v-if",!0)],6),Se(oe("div",{ref:"resizeProxy",class:I(e.ns.e("column-resize-proxy"))},null,2),[[Ut,e.resizeProxyVisible]])],46,bs)}var ws=ze(gs,[["render",Cs],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const Ss={selection:"table-column--selection",expand:"table__expand-column"},xs={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Es=e=>Ss[e]||"",Rs={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return T(Oe,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value})},renderCell({row:e,column:t,store:l,$index:n}){return T(Oe,{disabled:t.selectable?!t.selectable.call(null,e,n):!1,size:l.states.tableSize.value,onChange:()=>{l.commit("rowSelectedChanged",e)},onClick:a=>a.stopPropagation(),modelValue:l.isSelected(e)})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let l=t+1;const n=e.index;return typeof n=="number"?l=t+n:typeof n=="function"&&(l=n(t)),T("div",{},[l])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:l}){const{ns:n}=t,a=[n.e("expand-icon")];return l&&a.push(n.em("expand-icon","expanded")),T("div",{class:a,onClick:function(i){i.stopPropagation(),t.toggleRowExpansion(e)}},{default:()=>[T(Ft,null,{default:()=>[T(bl)]})]})},sortable:!1,resizable:!1}};function ks({row:e,column:t,$index:l}){var n;const a=t.property,r=a&&Wn(e,a).value;return t&&t.formatter?t.formatter(e,t,r,l):((n=r==null?void 0:r.toString)==null?void 0:n.call(r))||""}function Ls({row:e,treeNode:t,store:l},n=!1){const{ns:a}=l;if(!t)return n?[T("span",{class:a.e("placeholder")})]:null;const r=[],i=function(o){o.stopPropagation(),!t.loading&&l.loadOrToggle(e)};if(t.indent&&r.push(T("span",{class:a.e("indent"),style:{"padding-left":`${t.indent}px`}})),typeof t.expanded=="boolean"&&!t.noLazyChildren){const o=[a.e("expand-icon"),t.expanded?a.em("expand-icon","expanded"):""];let s=bl;t.loading&&(s=$n),r.push(T("div",{class:o,onClick:i},{default:()=>[T(Ft,{class:{[a.is("loading")]:t.loading}},{default:()=>[T(s)]})]}))}else r.push(T("span",{class:a.e("placeholder")}));return r}function ll(e,t){return e.reduce((l,n)=>(l[n]=n,l),t)}function Ns(e,t){const l=ee();return{registerComplexWatchers:()=>{const r=["fixed"],i={realWidth:"width",realMinWidth:"minWidth"},o=ll(r,i);Object.keys(o).forEach(s=>{const u=i[s];Ie(t,u)&&ie(()=>t[u],d=>{let f=d;u==="width"&&s==="realWidth"&&(f=Wt(d)),u==="minWidth"&&s==="realMinWidth"&&(f=ql(d)),l.columnConfig.value[u]=f,l.columnConfig.value[s]=f;const p=u==="fixed";e.value.store.scheduleLayout(p)})})},registerNormalWatchers:()=>{const r=["label","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],i={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},o=ll(r,i);Object.keys(o).forEach(s=>{const u=i[s];Ie(t,u)&&ie(()=>t[u],d=>{l.columnConfig.value[s]=d})})}}}function Fs(e,t,l){const n=ee(),a=x(""),r=x(!1),i=x(),o=x(),s=se("table");$e(()=>{i.value=e.align?`is-${e.align}`:null,i.value}),$e(()=>{o.value=e.headerAlign?`is-${e.headerAlign}`:i.value,o.value});const u=H(()=>{let c=n.vnode.vParent||n.parent;for(;c&&!c.tableId&&!c.columnId;)c=c.vnode.vParent||c.parent;return c}),d=H(()=>{const{store:c}=n.parent;if(!c)return!1;const{treeData:E}=c.states,R=E.value;return R&&Object.keys(R).length>0}),f=x(Wt(e.width)),p=x(ql(e.minWidth)),v=c=>(f.value&&(c.width=f.value),p.value&&(c.minWidth=p.value),!f.value&&p.value&&(c.width=void 0),c.minWidth||(c.minWidth=80),c.realWidth=Number(c.width===void 0?c.minWidth:c.width),c),h=c=>{const E=c.type,R=Rs[E]||{};Object.keys(R).forEach(k=>{const A=R[k];k!=="className"&&A!==void 0&&(c[k]=A)});const w=Es(E);if(w){const k=`${F(s.namespace)}-${w}`;c.className=c.className?`${c.className} ${k}`:k}return c},g=c=>{Array.isArray(c)?c.forEach(R=>E(R)):E(c);function E(R){var w;((w=R==null?void 0:R.type)==null?void 0:w.name)==="ElTableColumn"&&(R.vParent=n)}};return{columnId:a,realAlign:i,isSubColumn:r,realHeaderAlign:o,columnOrTableParent:u,setColumnWidth:v,setColumnForcedProps:h,setColumnRenders:c=>{e.renderHeader||c.type!=="selection"&&(c.renderHeader=R=>{n.columnConfig.value.label;const w=t.header;return w?w(R):c.label});let E=c.renderCell;return c.type==="expand"?(c.renderCell=R=>T("div",{class:"cell"},[E(R)]),l.value.renderExpanded=R=>t.default?t.default(R):t.default):(E=E||ks,c.renderCell=R=>{let w=null;if(t.default){const D=t.default(R);w=D.some(V=>V.type!==Tn)?D:E(R)}else w=E(R);const{columns:k}=l.value.store.states,A=k.value.findIndex(D=>D.type==="default"),B=d.value&&R.cellIndex===A,G=Ls(R,B),W={class:"cell",style:{}};return c.showOverflowTooltip&&(W.class=`${W.class} ${F(s.namespace)}-tooltip`,W.style={width:`${(R.column.realWidth||Number(R.column.width))-1}px`}),g(w),T("div",W,[G,w])}),c},getPropsData:(...c)=>c.reduce((E,R)=>(Array.isArray(R)&&R.forEach(w=>{E[w]=e[w]}),E),{}),getColumnElIndex:(c,E)=>Array.prototype.indexOf.call(c,E),updateColumnOrder:()=>{l.value.store.commit("updateColumnOrder",n.columnConfig.value)}}}var As={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:[Boolean,Object],fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}};let Ms=1;var tn=ce({name:"ElTableColumn",components:{ElCheckbox:Oe},props:As,setup(e,{slots:t}){const l=ee(),n=x({}),a=H(()=>{let S=l.parent;for(;S&&!S.tableId;)S=S.parent;return S}),{registerNormalWatchers:r,registerComplexWatchers:i}=Ns(a,e),{columnId:o,isSubColumn:s,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:v,getPropsData:h,getColumnElIndex:g,realAlign:m,updateColumnOrder:y}=Fs(e,t,a),b=d.value;o.value=`${b.tableId||b.columnId}_column_${Ms++}`,ml(()=>{s.value=a.value!==b;const S=e.type||"default",c=e.sortable===""?!0:e.sortable,E={...xs[S],id:o.value,type:S,property:e.prop||e.property,align:m,headerAlign:u,showOverflowTooltip:e.showOverflowTooltip,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:c,index:e.index,rawColumnKey:l.vnode.key};let B=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"]);B=Ma(E,B),B=Ha(v,f,p)(B),n.value=B,r(),i()}),De(()=>{var S;const c=d.value,E=s.value?c.vnode.el.children:(S=c.refs.hiddenColumns)==null?void 0:S.children,R=()=>g(E||[],l.vnode.el);n.value.getColumnIndex=R,R()>-1&&a.value.store.commit("insertColumn",n.value,s.value?c.columnConfig.value:null,y)}),Pn(()=>{a.value.store.commit("removeColumn",n.value,s.value?b.columnConfig.value:null,y)}),l.columnId=o.value,l.columnConfig=n},render(){var e,t,l;try{const n=(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1}),a=[];if(Array.isArray(n))for(const i of n)((l=i.type)==null?void 0:l.name)==="ElTableColumn"||i.shapeFlag&2?a.push(i):i.type===Je&&Array.isArray(i.children)&&i.children.forEach(o=>{(o==null?void 0:o.patchFlag)!==1024&&!it(o==null?void 0:o.children)&&a.push(o)});return T("div",a)}catch{return T("div",[])}}});const Ds=hl(ws,{TableColumn:tn}),Vs=Nt(tn);export{Vs as E,Ds as a};