2 lines
42 KiB
Python
2 lines
42 KiB
Python
import{d as ne,i as Re,g as P,c as S,S as dn,U as Nl,o as I,a as k,w as R,l as Te,E as K,n as A,u as L,b as x,v as Xe,T as Ll,D as H,m as se,G as ze,C as U,q as V,p as $l,h as De,B as Je,a4 as Sn,r as ge,e as Il,M as Q,f as Al,a7 as Ye,a0 as zl,t as Rl,F as ue,K as ae,Q as Vl,Y as me,ad as $e,ae as Ol,s as cn,a2 as ie,aa as On,H as Cl,L as Y,af as Cn,V as wn}from"./index-d28c4cfd.js";import{aI as Tn,ad as Pl,aJ as En,ag as ql,af as Ln,ah as kl,ai as Fl,aK as In,aL as An,au as Pn,b as Dl,_ as he,u as ce,y as Mn,aB as Ml,c as Bl,d as $n,i as Ce,O as Ul,aa as Hl,w as fn,aA as zn,an as j,A as Kl,Y as Rn,q as Dn,aM as Bn,n as Hn,v as Kn,a6 as Gl,U as de,aN as Wn,C as pn,E as Nn,B as Vn,Q as Ql,a0 as qn,a8 as kn,aO as Fn,x as vn}from"./request-153d5234.js";import{U as Yl,w as jl,r as Xl,f as Jl,S as wl,h as Un,E as Gn,x as Qn,z as Yn}from"./el-popper-6ac00b48.js";import{s as jn,E as Xn,t as Jn}from"./el-tag-d0c5f5ad.js";var Zn=/\s/;function xn(e){for(var l=e.length;l--&&Zn.test(e.charAt(l)););return l}var _n=/^\s+/;function et(e){return e&&e.slice(0,xn(e)+1).replace(_n,"")}var Zl=0/0,lt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,tt=/^0o[0-7]+$/i,ot=parseInt;function xl(e){if(typeof e=="number")return e;if(Tn(e))return Zl;if(Pl(e)){var l=typeof e.valueOf=="function"?e.valueOf():e;e=Pl(l)?l+"":l}if(typeof e!="string")return e===0?e:+e;e=et(e);var t=nt.test(e);return t||tt.test(e)?ot(e.slice(2),t?2:8):lt.test(e)?Zl:+e}var it="__lodash_hash_undefined__";function at(e){return this.__data__.set(e,it),this}function rt(e){return this.__data__.has(e)}function je(e){var l=-1,t=e==null?0:e.length;for(this.__data__=new En;++l<t;)this.add(e[l])}je.prototype.add=je.prototype.push=at;je.prototype.has=rt;function st(e,l){for(var t=-1,r=e==null?0:e.length;++t<r;)if(l(e[t],t,e))return!0;return!1}function ut(e,l){return e.has(l)}var dt=1,ct=2;function mn(e,l,t,r,f,a){var s=t&dt,c=e.length,u=l.length;if(c!=u&&!(s&&u>c))return!1;var m=a.get(e),g=a.get(l);if(m&&g)return m==l&&g==e;var d=-1,y=!0,w=t&ct?new je:void 0;for(a.set(e,l),a.set(l,e);++d<c;){var C=e[d],o=l[d];if(r)var b=s?r(o,C,d,l,e,a):r(C,o,d,e,l,a);if(b!==void 0){if(b)continue;y=!1;break}if(w){if(!st(l,function(T,E){if(!ut(w,E)&&(C===T||f(C,T,t,r,a)))return w.push(E)})){y=!1;break}}else if(!(C===o||f(C,o,t,r,a))){y=!1;break}}return a.delete(e),a.delete(l),y}function ft(e){var l=-1,t=Array(e.size);return e.forEach(function(r,f){t[++l]=[f,r]}),t}function pt(e){var l=-1,t=Array(e.size);return e.forEach(function(r){t[++l]=r}),t}var vt=1,mt=2,gt="[object Boolean]",ht="[object Date]",bt="[object Error]",yt="[object Map]",St="[object Number]",Ot="[object RegExp]",Ct="[object Set]",wt="[object String]",Tt="[object Symbol]",Et="[object ArrayBuffer]",Lt="[object DataView]",_l=ql?ql.prototype:void 0,Tl=_l?_l.valueOf:void 0;function It(e,l,t,r,f,a,s){switch(t){case Lt:if(e.byteLength!=l.byteLength||e.byteOffset!=l.byteOffset)return!1;e=e.buffer,l=l.buffer;case Et:return!(e.byteLength!=l.byteLength||!a(new Yl(e),new Yl(l)));case gt:case ht:case St:return Ln(+e,+l);case bt:return e.name==l.name&&e.message==l.message;case Ot:case wt:return e==l+"";case yt:var c=ft;case Ct:var u=r&vt;if(c||(c=pt),e.size!=l.size&&!u)return!1;var m=s.get(e);if(m)return m==l;r|=mt,s.set(e,l);var g=mn(c(e),c(l),r,f,a,s);return s.delete(e),g;case Tt:if(Tl)return Tl.call(e)==Tl.call(l)}return!1}var At=1,Pt=Object.prototype,Mt=Pt.hasOwnProperty;function $t(e,l,t,r,f,a){var s=t&At,c=jl(e),u=c.length,m=jl(l),g=m.length;if(u!=g&&!s)return!1;for(var d=u;d--;){var y=c[d];if(!(s?y in l:Mt.call(l,y)))return!1}var w=a.get(e),C=a.get(l);if(w&&C)return w==l&&C==e;var o=!0;a.set(e,l),a.set(l,e);for(var b=s;++d<u;){y=c[d];var T=e[y],E=l[y];if(r)var D=s?r(E,T,y,l,e,a):r(T,E,y,e,l,a);if(!(D===void 0?T===E||f(T,E,t,r,a):D)){o=!1;break}b||(b=y=="constructor")}if(o&&!b){var W=e.constructor,$=l.constructor;W!=$&&"constructor"in e&&"constructor"in l&&!(typeof W=="function"&&W instanceof W&&typeof $=="function"&&$ instanceof $)&&(o=!1)}return a.delete(e),a.delete(l),o}var zt=1,en="[object Arguments]",ln="[object Array]",Qe="[object Object]",Rt=Object.prototype,nn=Rt.hasOwnProperty;function Dt(e,l,t,r,f,a){var s=kl(e),c=kl(l),u=s?ln:Xl(e),m=c?ln:Xl(l);u=u==en?Qe:u,m=m==en?Qe:m;var g=u==Qe,d=m==Qe,y=u==m;if(y&&Jl(e)){if(!Jl(l))return!1;s=!0,g=!1}if(y&&!g)return a||(a=new wl),s||Un(e)?mn(e,l,t,r,f,a):It(e,l,u,t,r,f,a);if(!(t&zt)){var w=g&&nn.call(e,"__wrapped__"),C=d&&nn.call(l,"__wrapped__");if(w||C){var o=w?e.value():e,b=C?l.value():l;return a||(a=new wl),f(o,b,t,r,a)}}return y?(a||(a=new wl),$t(e,l,t,r,f,a)):!1}function gn(e,l,t,r,f){return e===l?!0:e==null||l==null||!Fl(e)&&!Fl(l)?e!==e&&l!==l:Dt(e,l,t,r,gn,f)}var Bt=function(){return In.Date.now()};const El=Bt;var Ht="Expected a function",Kt=Math.max,Wt=Math.min;function tn(e,l,t){var r,f,a,s,c,u,m=0,g=!1,d=!1,y=!0;if(typeof e!="function")throw new TypeError(Ht);l=xl(l)||0,Pl(t)&&(g=!!t.leading,d="maxWait"in t,a=d?Kt(xl(t.maxWait)||0,l):a,y="trailing"in t?!!t.trailing:y);function w(h){var v=r,M=f;return r=f=void 0,m=h,s=e.apply(M,v),s}function C(h){return m=h,c=setTimeout(T,l),g?w(h):s}function o(h){var v=h-u,M=h-m,q=l-v;return d?Wt(q,a-M):q}function b(h){var v=h-u,M=h-m;return u===void 0||v>=l||v<0||d&&M>=a}function T(){var h=El();if(b(h))return E(h);c=setTimeout(T,o(h))}function E(h){return c=void 0,y&&r?w(h):(r=f=void 0,s)}function D(){c!==void 0&&clearTimeout(c),m=0,r=u=f=c=void 0}function W(){return c===void 0?s:E(El())}function $(){var h=El(),v=b(h);if(r=arguments,f=this,u=h,v){if(c===void 0)return C(u);if(d)return clearTimeout(c),c=setTimeout(T,l),w(u)}return c===void 0&&(c=setTimeout(T,l)),s}return $.cancel=D,$.flush=W,$}function on(e,l){return gn(e,l)}const Nt=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Vt=e=>An[e||"default"],qt=e=>["",...Pn].includes(e),we=4,kt={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Ft=({move:e,size:l,bar:t})=>({[t.size]:l,transform:`translate${t.axis}(${e}%)`}),hn=Symbol("scrollbarContextKey"),Ut=Dl({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Gt="Thumb",Qt=ne({__name:"thumb",props:Ut,setup(e){const l=e,t=Re(hn),r=ce("scrollbar");t||Mn(Gt,"can not inject scrollbar context");const f=P(),a=P(),s=P({}),c=P(!1);let u=!1,m=!1,g=Bl?document.onselectstart:null;const d=S(()=>kt[l.vertical?"vertical":"horizontal"]),y=S(()=>Ft({size:l.size,move:l.move,bar:d.value})),w=S(()=>f.value[d.value.offset]**2/t.wrapElement[d.value.scrollSize]/l.ratio/a.value[d.value.offset]),C=h=>{var v;if(h.stopPropagation(),h.ctrlKey||[1,2].includes(h.button))return;(v=window.getSelection())==null||v.removeAllRanges(),b(h);const M=h.currentTarget;M&&(s.value[d.value.axis]=M[d.value.offset]-(h[d.value.client]-M.getBoundingClientRect()[d.value.direction]))},o=h=>{if(!a.value||!f.value||!t.wrapElement)return;const v=Math.abs(h.target.getBoundingClientRect()[d.value.direction]-h[d.value.client]),M=a.value[d.value.offset]/2,q=(v-M)*100*w.value/f.value[d.value.offset];t.wrapElement[d.value.scroll]=q*t.wrapElement[d.value.scrollSize]/100},b=h=>{h.stopImmediatePropagation(),u=!0,document.addEventListener("mousemove",T),document.addEventListener("mouseup",E),g=document.onselectstart,document.onselectstart=()=>!1},T=h=>{if(!f.value||!a.value||u===!1)return;const v=s.value[d.value.axis];if(!v)return;const M=(f.value.getBoundingClientRect()[d.value.direction]-h[d.value.client])*-1,q=a.value[d.value.offset]-v,X=(M-q)*100*w.value/f.value[d.value.offset];t.wrapElement[d.value.scroll]=X*t.wrapElement[d.value.scrollSize]/100},E=()=>{u=!1,s.value[d.value.axis]=0,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",E),$(),m&&(c.value=!1)},D=()=>{m=!1,c.value=!!l.size},W=()=>{m=!0,c.value=u};dn(()=>{$(),document.removeEventListener("mouseup",E)});const $=()=>{document.onselectstart!==g&&(document.onselectstart=g)};return Ml(Nl(t,"scrollbarElement"),"mousemove",D),Ml(Nl(t,"scrollbarElement"),"mouseleave",W),(h,v)=>(I(),k(Ll,{name:L(r).b("fade"),persisted:""},{default:R(()=>[Te(K("div",{ref_key:"instance",ref:f,class:A([L(r).e("bar"),L(r).is(L(d).key)]),onMousedown:o},[K("div",{ref_key:"thumb",ref:a,class:A(L(r).e("thumb")),style:x(L(y)),onMousedown:C},null,38)],34),[[Xe,h.always||c.value]])]),_:1},8,["name"]))}});var an=he(Qt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);const Yt=Dl({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}}),jt=ne({__name:"bar",props:Yt,setup(e,{expose:l}){const t=e,r=P(0),f=P(0);return l({handleScroll:s=>{if(s){const c=s.offsetHeight-we,u=s.offsetWidth-we;f.value=s.scrollTop*100/c*t.ratioY,r.value=s.scrollLeft*100/u*t.ratioX}}}),(s,c)=>(I(),H(ze,null,[se(an,{move:r.value,ratio:s.ratioX,size:s.width,always:s.always},null,8,["move","ratio","size","always"]),se(an,{move:f.value,ratio:s.ratioY,size:s.height,vertical:"",always:s.always},null,8,["move","ratio","size","always"])],64))}});var Xt=he(jt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);const Jt=Dl({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:$n([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20}}),Zt={scroll:({scrollTop:e,scrollLeft:l})=>[e,l].every(Ce)},xt="ElScrollbar",_t=ne({name:xt}),eo=ne({..._t,props:Jt,emits:Zt,setup(e,{expose:l,emit:t}){const r=e,f=ce("scrollbar");let a,s;const c=P(),u=P(),m=P(),g=P("0"),d=P("0"),y=P(),w=P(1),C=P(1),o=S(()=>{const v={};return r.height&&(v.height=Ul(r.height)),r.maxHeight&&(v.maxHeight=Ul(r.maxHeight)),[r.wrapStyle,v]}),b=S(()=>[r.wrapClass,f.e("wrap"),{[f.em("wrap","hidden-default")]:!r.native}]),T=S(()=>[f.e("view"),r.viewClass]),E=()=>{var v;u.value&&((v=y.value)==null||v.handleScroll(u.value),t("scroll",{scrollTop:u.value.scrollTop,scrollLeft:u.value.scrollLeft}))};function D(v,M){Al(v)?u.value.scrollTo(v):Ce(v)&&Ce(M)&&u.value.scrollTo(v,M)}const W=v=>{Ce(v)&&(u.value.scrollTop=v)},$=v=>{Ce(v)&&(u.value.scrollLeft=v)},h=()=>{if(!u.value)return;const v=u.value.offsetHeight-we,M=u.value.offsetWidth-we,q=v**2/u.value.scrollHeight,X=M**2/u.value.scrollWidth,J=Math.max(q,r.minSize),z=Math.max(X,r.minSize);w.value=q/(v-q)/(J/(v-J)),C.value=X/(M-X)/(z/(M-z)),d.value=J+we<v?`${J}px`:"",g.value=z+we<M?`${z}px`:""};return U(()=>r.noresize,v=>{v?(a==null||a(),s==null||s()):({stop:a}=Hl(m,h),s=Ml("resize",h))},{immediate:!0}),U(()=>[r.maxHeight,r.height],()=>{r.native||V(()=>{var v;h(),u.value&&((v=y.value)==null||v.handleScroll(u.value))})}),$l(hn,De({scrollbarElement:c,wrapElement:u})),Je(()=>{r.native||V(()=>{h()})}),Sn(()=>h()),l({wrapRef:u,update:h,scrollTo:D,setScrollTop:W,setScrollLeft:$,handleScroll:E}),(v,M)=>(I(),H("div",{ref_key:"scrollbarRef",ref:c,class:A(L(f).b())},[K("div",{ref_key:"wrapRef",ref:u,class:A(L(b)),style:x(L(o)),onScroll:E},[(I(),k(Il(v.tag),{ref_key:"resizeRef",ref:m,class:A(L(T)),style:x(v.viewStyle)},{default:R(()=>[ge(v.$slots,"default")]),_:3},8,["class","style"]))],38),v.native?Q("v-if",!0):(I(),k(Xt,{key:0,ref_key:"barRef",ref:y,height:d.value,width:g.value,always:v.always,"ratio-x":C.value,"ratio-y":w.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var lo=he(eo,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);const no=fn(lo),re=new Map;let rn;Bl&&(document.addEventListener("mousedown",e=>rn=e),document.addEventListener("mouseup",e=>{for(const l of re.values())for(const{documentHandler:t}of l)t(e,rn)}));function sn(e,l){let t=[];return Array.isArray(l.arg)?t=l.arg:zn(l.arg)&&t.push(l.arg),function(r,f){const a=l.instance.popperRef,s=r.target,c=f==null?void 0:f.target,u=!l||!l.instance,m=!s||!c,g=e.contains(s)||e.contains(c),d=e===s,y=t.length&&t.some(C=>C==null?void 0:C.contains(s))||t.length&&t.includes(c),w=a&&(a.contains(s)||a.contains(c));u||m||g||d||y||w||l.value(r,f)}}const to={beforeMount(e,l){re.has(e)||re.set(e,[]),re.get(e).push({documentHandler:sn(e,l),bindingFn:l.value})},updated(e,l){re.has(e)||re.set(e,[]);const t=re.get(e),r=t.findIndex(a=>a.bindingFn===l.oldValue),f={documentHandler:sn(e,l),bindingFn:l.value};r>=0?t.splice(r,1,f):t.push(f)},unmounted(e){re.delete(e)}},bn=Symbol("ElSelectGroup"),Ze=Symbol("ElSelect");function oo(e,l){const t=Re(Ze),r=Re(bn,{disabled:!1}),f=S(()=>Object.prototype.toString.call(e.value).toLowerCase()==="[object object]"),a=S(()=>t.props.multiple?d(t.props.modelValue,e.value):y(e.value,t.props.modelValue)),s=S(()=>{if(t.props.multiple){const o=t.props.modelValue||[];return!a.value&&o.length>=t.props.multipleLimit&&t.props.multipleLimit>0}else return!1}),c=S(()=>e.label||(f.value?"":e.value)),u=S(()=>e.value||e.label||""),m=S(()=>e.disabled||l.groupDisabled||s.value),g=zl(),d=(o=[],b)=>{if(f.value){const T=t.props.valueKey;return o&&o.some(E=>Ye(j(E,T))===j(b,T))}else return o&&o.includes(b)},y=(o,b)=>{if(f.value){const{valueKey:T}=t.props;return j(o,T)===j(b,T)}else return o===b},w=()=>{!e.disabled&&!r.disabled&&(t.hoverIndex=t.optionsArray.indexOf(g.proxy))};U(()=>c.value,()=>{!e.created&&!t.props.remote&&t.setSelected()}),U(()=>e.value,(o,b)=>{const{remote:T,valueKey:E}=t.props;if(Object.is(o,b)||(t.onOptionDestroy(b,g.proxy),t.onOptionCreate(g.proxy)),!e.created&&!T){if(E&&typeof o=="object"&&typeof b=="object"&&o[E]===b[E])return;t.setSelected()}}),U(()=>r.disabled,()=>{l.groupDisabled=r.disabled},{immediate:!0});const{queryChange:C}=Ye(t);return U(C,o=>{const{query:b}=L(o),T=new RegExp(Nt(b),"i");l.visible=T.test(c.value)||e.created,l.visible||t.filteredOptionsCount--},{immediate:!0}),{select:t,currentLabel:c,currentValue:u,itemSelected:a,isDisabled:m,hoverItem:w}}const io=ne({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:{type:Boolean,default:!1}},setup(e){const l=ce("select"),t=S(()=>[l.be("dropdown","item"),l.is("disabled",L(s)),{selected:L(a),hover:L(g)}]),r=De({index:-1,groupDisabled:!1,visible:!0,hitState:!1,hover:!1}),{currentLabel:f,itemSelected:a,isDisabled:s,select:c,hoverItem:u}=oo(e,r),{visible:m,hover:g}=Rl(r),d=zl().proxy;c.onOptionCreate(d),dn(()=>{const w=d.value,{selected:C}=c,b=(c.props.multiple?C:[C]).some(T=>T.value===d.value);V(()=>{c.cachedOptions.get(w)===d&&!b&&c.cachedOptions.delete(w)}),c.onOptionDestroy(w,d)});function y(){e.disabled!==!0&&r.groupDisabled!==!0&&c.handleOptionSelect(d)}return{ns:l,containerKls:t,currentLabel:f,itemSelected:a,isDisabled:s,select:c,hoverItem:u,visible:m,hover:g,selectOptionClick:y,states:r}}});function ao(e,l,t,r,f,a){return Te((I(),H("li",{class:A(e.containerKls),onMouseenter:l[0]||(l[0]=(...s)=>e.hoverItem&&e.hoverItem(...s)),onClick:l[1]||(l[1]=ae((...s)=>e.selectOptionClick&&e.selectOptionClick(...s),["stop"]))},[ge(e.$slots,"default",{},()=>[K("span",null,ue(e.currentLabel),1)])],34)),[[Xe,e.visible]])}var Wl=he(io,[["render",ao],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);const ro=ne({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=Re(Ze),l=ce("select"),t=S(()=>e.props.popperClass),r=S(()=>e.props.multiple),f=S(()=>e.props.fitInputWidth),a=P("");function s(){var c;a.value=`${(c=e.selectWrapper)==null?void 0:c.offsetWidth}px`}return Je(()=>{s(),Hl(e.selectWrapper,s)}),{ns:l,minWidth:a,popperClass:t,isMultiple:r,isFitInputWidth:f}}});function so(e,l,t,r,f,a){return I(),H("div",{class:A([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:x({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[ge(e.$slots,"default")],6)}var uo=he(ro,[["render",so],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);function co(e){const{t:l}=Kl();return De({options:new Map,cachedOptions:new Map,createdLabel:null,createdSelected:!1,selected:e.multiple?[]:{},inputLength:20,inputWidth:0,optionsCount:0,filteredOptionsCount:0,visible:!1,selectedLabel:"",hoverIndex:-1,query:"",previousQuery:null,inputHovering:!1,cachedPlaceHolder:"",currentPlaceholder:l("el.select.placeholder"),menuVisibleOnFocus:!1,isOnComposition:!1,prefixWidth:11,mouseEnter:!1,focused:!1})}const fo=(e,l,t)=>{const{t:r}=Kl(),f=ce("select");Rn({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},S(()=>e.suffixTransition===!1));const a=P(null),s=P(null),c=P(null),u=P(null),m=P(null),g=P(null),d=P(null),y=P(null),w=P(-1),C=Vl({query:""}),o=Vl(""),b=P([]);let T=0;const{form:E,formItem:D}=Dn(),W=S(()=>!e.filterable||e.multiple||!l.visible),$=S(()=>e.disabled||(E==null?void 0:E.disabled)),h=S(()=>{const n=e.multiple?Array.isArray(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!=="";return e.clearable&&!$.value&&l.inputHovering&&n}),v=S(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),M=S(()=>f.is("reverse",v.value&&l.visible&&e.suffixTransition)),q=S(()=>(E==null?void 0:E.statusIcon)&&(D==null?void 0:D.validateState)&&Bn[D==null?void 0:D.validateState]),X=S(()=>e.remote?300:0),J=S(()=>e.loading?e.loadingText||r("el.select.loading"):e.remote&&l.query===""&&l.options.size===0?!1:e.filterable&&l.query&&l.options.size>0&&l.filteredOptionsCount===0?e.noMatchText||r("el.select.noMatch"):l.options.size===0?e.noDataText||r("el.select.noData"):null),z=S(()=>{const n=Array.from(l.options.values()),i=[];return b.value.forEach(p=>{const O=n.findIndex(B=>B.currentLabel===p);O>-1&&i.push(n[O])}),i.length?i:n}),xe=S(()=>Array.from(l.cachedOptions.values())),_e=S(()=>{const n=z.value.filter(i=>!i.created).some(i=>i.currentLabel===l.query);return e.filterable&&e.allowCreate&&l.query!==""&&!n}),fe=Hn(),el=S(()=>["small"].includes(fe.value)?"small":"default"),ll=S({get(){return l.visible&&J.value!==!1},set(n){l.visible=n}});U([()=>$.value,()=>fe.value,()=>E==null?void 0:E.size],()=>{V(()=>{Z()})}),U(()=>e.placeholder,n=>{l.cachedPlaceHolder=l.currentPlaceholder=n,e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(l.currentPlaceholder="")}),U(()=>e.modelValue,(n,i)=>{e.multiple&&(Z(),n&&n.length>0||s.value&&l.query!==""?l.currentPlaceholder="":l.currentPlaceholder=l.cachedPlaceHolder,e.filterable&&!e.reserveKeyword&&(l.query="",te(l.query))),Ee(),e.filterable&&!e.multiple&&(l.inputLength=20),!on(n,i)&&e.validateEvent&&(D==null||D.validate("change").catch(p=>Kn()))},{flush:"post",deep:!0}),U(()=>l.visible,n=>{var i,p,O,B,N;n?((p=(i=u.value)==null?void 0:i.updatePopper)==null||p.call(i),e.filterable&&(l.filteredOptionsCount=l.optionsCount,l.query=e.remote?"":l.selectedLabel,(B=(O=c.value)==null?void 0:O.focus)==null||B.call(O),e.multiple?(N=s.value)==null||N.focus():l.selectedLabel&&(l.currentPlaceholder=`${l.selectedLabel}`,l.selectedLabel=""),te(l.query),!e.multiple&&!e.remote&&(C.value.query="",$e(C),$e(o)))):(e.filterable&&(me(e.filterMethod)&&e.filterMethod(""),me(e.remoteMethod)&&e.remoteMethod("")),l.query="",l.previousQuery=null,l.selectedLabel="",l.inputLength=20,l.menuVisibleOnFocus=!1,nl(),V(()=>{s.value&&s.value.value===""&&l.selected.length===0&&(l.currentPlaceholder=l.cachedPlaceHolder)}),e.multiple||(l.selected&&(e.filterable&&e.allowCreate&&l.createdSelected&&l.createdLabel?l.selectedLabel=l.createdLabel:l.selectedLabel=l.selected.currentLabel,e.filterable&&(l.query=l.selectedLabel)),e.filterable&&(l.currentPlaceholder=l.cachedPlaceHolder))),t.emit("visible-change",n)}),U(()=>l.options.entries(),()=>{var n,i,p;if(!Bl)return;(i=(n=u.value)==null?void 0:n.updatePopper)==null||i.call(n),e.multiple&&Z();const O=((p=d.value)==null?void 0:p.querySelectorAll("input"))||[];Array.from(O).includes(document.activeElement)||Ee(),e.defaultFirstOption&&(e.filterable||e.remote)&&l.filteredOptionsCount&&He()},{flush:"post"}),U(()=>l.hoverIndex,n=>{Ce(n)&&n>-1?w.value=z.value[n]||{}:w.value={},z.value.forEach(i=>{i.hover=w.value===i})});const Z=()=>{V(()=>{var n,i;if(!a.value)return;const p=a.value.$el.querySelector("input");T=T||(p.clientHeight>0?p.clientHeight+2:0);const O=g.value,B=Vt(fe.value||(E==null?void 0:E.size)),N=fe.value||B===T||T<=0?B:T;!(p.offsetParent===null)&&(p.style.height=`${(l.selected.length===0?N:Math.max(O?O.clientHeight+(O.clientHeight>N?6:0):0,N))-2}px`),l.visible&&J.value!==!1&&((i=(n=u.value)==null?void 0:n.updatePopper)==null||i.call(n))})},te=async n=>{if(!(l.previousQuery===n||l.isOnComposition)){if(l.previousQuery===null&&(me(e.filterMethod)||me(e.remoteMethod))){l.previousQuery=n;return}l.previousQuery=n,V(()=>{var i,p;l.visible&&((p=(i=u.value)==null?void 0:i.updatePopper)==null||p.call(i))}),l.hoverIndex=-1,e.multiple&&e.filterable&&V(()=>{const i=s.value.value.length*15+20;l.inputLength=e.collapseTags?Math.min(50,i):i,Be(),Z()}),e.remote&&me(e.remoteMethod)?(l.hoverIndex=-1,e.remoteMethod(n)):me(e.filterMethod)?(e.filterMethod(n),$e(o)):(l.filteredOptionsCount=l.optionsCount,C.value.query=n,$e(C),$e(o)),e.defaultFirstOption&&(e.filterable||e.remote)&&l.filteredOptionsCount&&(await V(),He())}},Be=()=>{l.currentPlaceholder!==""&&(l.currentPlaceholder=s.value.value?"":l.cachedPlaceHolder)},He=()=>{const n=z.value.filter(O=>O.visible&&!O.disabled&&!O.states.groupDisabled),i=n.find(O=>O.created),p=n[0];l.hoverIndex=Ve(z.value,i||p)},Ee=()=>{var n;if(e.multiple)l.selectedLabel="";else{const p=Ke(e.modelValue);(n=p.props)!=null&&n.created?(l.createdLabel=p.props.value,l.createdSelected=!0):l.createdSelected=!1,l.selectedLabel=p.currentLabel,l.selected=p,e.filterable&&(l.query=l.selectedLabel);return}const i=[];Array.isArray(e.modelValue)&&e.modelValue.forEach(p=>{i.push(Ke(p))}),l.selected=i,V(()=>{Z()})},Ke=n=>{let i;const p=Ol(n).toLowerCase()==="object",O=Ol(n).toLowerCase()==="null",B=Ol(n).toLowerCase()==="undefined";for(let le=l.cachedOptions.size-1;le>=0;le--){const G=xe.value[le];if(p?j(G.value,e.valueKey)===j(n,e.valueKey):G.value===n){i={value:n,currentLabel:G.currentLabel,isDisabled:G.isDisabled};break}}if(i)return i;const N=p?n.label:!O&&!B?n:"",ee={value:n,currentLabel:N};return e.multiple&&(ee.hitState=!1),ee},nl=()=>{setTimeout(()=>{const n=e.valueKey;e.multiple?l.selected.length>0?l.hoverIndex=Math.min.apply(null,l.selected.map(i=>z.value.findIndex(p=>j(p,n)===j(i,n)))):l.hoverIndex=-1:l.hoverIndex=z.value.findIndex(i=>Se(i)===Se(l.selected))},300)},tl=()=>{var n,i;ol(),(i=(n=u.value)==null?void 0:n.updatePopper)==null||i.call(n),e.multiple&&Z()},ol=()=>{var n;l.inputWidth=(n=a.value)==null?void 0:n.$el.offsetWidth},il=()=>{e.filterable&&l.query!==l.selectedLabel&&(l.query=l.selectedLabel,te(l.query))},al=tn(()=>{il()},X.value),rl=tn(n=>{te(n.target.value)},X.value),pe=n=>{on(e.modelValue,n)||t.emit(pn,n)},Le=n=>{if(n.code!==Gl.delete){if(n.target.value.length<=0&&!Ae()){const i=e.modelValue.slice();i.pop(),t.emit(de,i),pe(i)}n.target.value.length===1&&e.modelValue.length===0&&(l.currentPlaceholder=l.cachedPlaceHolder)}},We=(n,i)=>{const p=l.selected.indexOf(i);if(p>-1&&!$.value){const O=e.modelValue.slice();O.splice(p,1),t.emit(de,O),pe(O),t.emit("remove-tag",i.value)}n.stopPropagation(),be()},Ne=n=>{n.stopPropagation();const i=e.multiple?[]:"";if(!cn(i))for(const p of l.selected)p.isDisabled&&i.push(p.value);t.emit(de,i),pe(i),l.hoverIndex=-1,l.visible=!1,t.emit("clear"),be()},Ie=n=>{var i;if(e.multiple){const p=(e.modelValue||[]).slice(),O=Ve(p,n.value);O>-1?p.splice(O,1):(e.multipleLimit<=0||p.length<e.multipleLimit)&&p.push(n.value),t.emit(de,p),pe(p),n.created&&(l.query="",te(""),l.inputLength=20),e.filterable&&((i=s.value)==null||i.focus())}else t.emit(de,n.value),pe(n.value),l.visible=!1;sl(),!l.visible&&V(()=>{oe(n)})},Ve=(n=[],i)=>{if(!Al(i))return n.indexOf(i);const p=e.valueKey;let O=-1;return n.some((B,N)=>Ye(j(B,p))===j(i,p)?(O=N,!0):!1),O},sl=()=>{const n=s.value||a.value;n&&(n==null||n.focus())},oe=n=>{var i,p,O,B,N;const ee=Array.isArray(n)?n[0]:n;let le=null;if(ee!=null&&ee.value){const G=z.value.filter(Sl=>Sl.value===ee.value);G.length>0&&(le=G[0].$el)}if(u.value&&le){const G=(B=(O=(p=(i=u.value)==null?void 0:i.popperRef)==null?void 0:p.contentRef)==null?void 0:O.querySelector)==null?void 0:B.call(O,`.${f.be("dropdown","wrap")}`);G&&jn(G,le)}(N=y.value)==null||N.handleScroll()},ul=n=>{l.optionsCount++,l.filteredOptionsCount++,l.options.set(n.value,n),l.cachedOptions.set(n.value,n)},dl=(n,i)=>{l.options.get(n)===i&&(l.optionsCount--,l.filteredOptionsCount--,l.options.delete(n))},cl=n=>{n.code!==Gl.backspace&&Ae(!1),l.inputLength=s.value.value.length*15+20,Z()},Ae=n=>{if(!Array.isArray(l.selected))return;const i=l.selected[l.selected.length-1];if(i)return n===!0||n===!1?(i.hitState=n,n):(i.hitState=!i.hitState,i.hitState)},fl=n=>{const i=n.target.value;if(n.type==="compositionend")l.isOnComposition=!1,V(()=>te(i));else{const p=i[i.length-1]||"";l.isOnComposition=!Wn(p)}},pl=()=>{V(()=>oe(l.selected))},vl=n=>{l.focused||((e.automaticDropdown||e.filterable)&&(e.filterable&&!l.visible&&(l.menuVisibleOnFocus=!0),l.visible=!0),l.focused=!0,t.emit("focus",n))},be=()=>{var n,i;l.visible?(n=s.value||a.value)==null||n.focus():(i=a.value)==null||i.focus()},_=()=>{var n,i,p;l.visible=!1,(n=a.value)==null||n.blur(),(p=(i=c.value)==null?void 0:i.blur)==null||p.call(i)},Pe=n=>{var i,p,O;(i=u.value)!=null&&i.isFocusInsideContent(n)||(p=m.value)!=null&&p.isFocusInsideContent(n)||(O=d.value)!=null&&O.contains(n.relatedTarget)||(l.visible&&ye(),l.focused=!1,t.emit("blur",n))},qe=n=>{Ne(n)},ye=()=>{l.visible=!1},ml=n=>{l.visible&&(n.preventDefault(),n.stopPropagation(),l.visible=!1)},ke=n=>{n&&!l.mouseEnter||$.value||(l.menuVisibleOnFocus?l.menuVisibleOnFocus=!1:(!u.value||!u.value.isFocusInsideContent())&&(l.visible=!l.visible),be())},Fe=()=>{l.visible?z.value[l.hoverIndex]&&Ie(z.value[l.hoverIndex]):ke()},Se=n=>Al(n.value)?j(n.value,e.valueKey):n.value,gl=S(()=>z.value.filter(n=>n.visible).every(n=>n.disabled)),Me=S(()=>l.selected.slice(0,e.maxCollapseTags)),hl=S(()=>l.selected.slice(e.maxCollapseTags)),Ue=n=>{if(!l.visible){l.visible=!0;return}if(!(l.options.size===0||l.filteredOptionsCount===0)&&!l.isOnComposition&&!gl.value){n==="next"?(l.hoverIndex++,l.hoverIndex===l.options.size&&(l.hoverIndex=0)):n==="prev"&&(l.hoverIndex--,l.hoverIndex<0&&(l.hoverIndex=l.options.size-1));const i=z.value[l.hoverIndex];(i.disabled===!0||i.states.groupDisabled===!0||!i.visible)&&Ue(n),V(()=>oe(w.value))}},Ge=()=>{l.mouseEnter=!0},bl=()=>{l.mouseEnter=!1},yl=(n,i)=>{var p,O;We(n,i),(O=(p=m.value)==null?void 0:p.updatePopper)==null||O.call(p)},Oe=S(()=>({maxWidth:`${L(l.inputWidth)-32-(q.value?22:0)}px`,width:"100%"}));return{optionList:b,optionsArray:z,selectSize:fe,handleResize:tl,debouncedOnInputChange:al,debouncedQueryChange:rl,deletePrevTag:Le,deleteTag:We,deleteSelected:Ne,handleOptionSelect:Ie,scrollToOption:oe,readonly:W,resetInputHeight:Z,showClose:h,iconComponent:v,iconReverse:M,showNewOption:_e,collapseTagSize:el,setSelected:Ee,managePlaceholder:Be,selectDisabled:$,emptyText:J,toggleLastOptionHitState:Ae,resetInputState:cl,handleComposition:fl,onOptionCreate:ul,onOptionDestroy:dl,handleMenuEnter:pl,handleFocus:vl,focus:be,blur:_,handleBlur:Pe,handleClearClick:qe,handleClose:ye,handleKeydownEscape:ml,toggleMenu:ke,selectOption:Fe,getValueKey:Se,navigateOptions:Ue,handleDeleteTooltipTag:yl,dropMenuVisible:ll,queryChange:C,groupQueryChange:o,showTagList:Me,collapseTagList:hl,selectTagsStyle:Oe,reference:a,input:s,iOSInput:c,tooltipRef:u,tagTooltipRef:m,tags:g,selectWrapper:d,scrollbar:y,handleMouseEnter:Ge,handleMouseLeave:bl}};var po=ne({name:"ElOptions",emits:["update-options"],setup(e,{slots:l,emit:t}){let r=[];function f(a,s){if(a.length!==s.length)return!1;for(const[c]of a.entries())if(a[c]!=s[c])return!1;return!0}return()=>{var a,s;const c=(a=l.default)==null?void 0:a.call(l),u=[];function m(g){Array.isArray(g)&&g.forEach(d=>{var y,w,C,o;const b=(y=(d==null?void 0:d.type)||{})==null?void 0:y.name;b==="ElOptionGroup"?m(!cn(d.children)&&!Array.isArray(d.children)&&me((w=d.children)==null?void 0:w.default)?(C=d.children)==null?void 0:C.default():d.children):b==="ElOption"?u.push((o=d.props)==null?void 0:o.label):Array.isArray(d.children)&&m(d.children)})}return c.length&&m((s=c[0])==null?void 0:s.children),f(u,r)||(r=u,t("update-options",u)),c}}});const un="ElSelect",vo=ne({name:un,componentName:un,components:{ElInput:Nn,ElSelectMenu:uo,ElOption:Wl,ElOptions:po,ElTag:Xn,ElScrollbar:no,ElTooltip:Gn,ElIcon:Vn},directives:{ClickOutside:to},props:{name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:{type:String,validator:qt},effect:{type:String,default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Object,default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:{type:Boolean,default:!1},maxCollapseTags:{type:Number,default:1},teleported:Qn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Ql,default:qn},fitInputWidth:{type:Boolean,default:!1},suffixIcon:{type:Ql,default:kn},tagType:{...Jn.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:{type:Boolean,default:!1},suffixTransition:{type:Boolean,default:!0},placement:{type:String,values:Yn,default:"bottom-start"}},emits:[de,pn,"remove-tag","clear","visible-change","focus","blur"],setup(e,l){const t=ce("select"),r=ce("input"),{t:f}=Kl(),a=co(e),{optionList:s,optionsArray:c,selectSize:u,readonly:m,handleResize:g,collapseTagSize:d,debouncedOnInputChange:y,debouncedQueryChange:w,deletePrevTag:C,deleteTag:o,deleteSelected:b,handleOptionSelect:T,scrollToOption:E,setSelected:D,resetInputHeight:W,managePlaceholder:$,showClose:h,selectDisabled:v,iconComponent:M,iconReverse:q,showNewOption:X,emptyText:J,toggleLastOptionHitState:z,resetInputState:xe,handleComposition:_e,onOptionCreate:fe,onOptionDestroy:el,handleMenuEnter:ll,handleFocus:Z,focus:te,blur:Be,handleBlur:He,handleClearClick:Ee,handleClose:Ke,handleKeydownEscape:nl,toggleMenu:tl,selectOption:ol,getValueKey:il,navigateOptions:al,handleDeleteTooltipTag:rl,dropMenuVisible:pe,reference:Le,input:We,iOSInput:Ne,tooltipRef:Ie,tagTooltipRef:Ve,tags:sl,selectWrapper:oe,scrollbar:ul,queryChange:dl,groupQueryChange:cl,handleMouseEnter:Ae,handleMouseLeave:fl,showTagList:pl,collapseTagList:vl,selectTagsStyle:be}=fo(e,a,l),{inputWidth:_,selected:Pe,inputLength:qe,filteredOptionsCount:ye,visible:ml,selectedLabel:ke,hoverIndex:Fe,query:Se,inputHovering:gl,currentPlaceholder:Me,menuVisibleOnFocus:hl,isOnComposition:Ue,options:Ge,cachedOptions:bl,optionsCount:yl,prefixWidth:Oe}=Rl(a),n=S(()=>{const F=[t.b()],ve=L(u);return ve&&F.push(t.m(ve)),e.disabled&&F.push(t.m("disabled")),F}),i=S(()=>[t.e("tags"),t.is("disabled",L(v))]),p=S(()=>[t.b("tags-wrapper"),{"has-prefix":L(Oe)&&L(Pe).length}]),O=S(()=>[t.e("input"),t.is(L(u)),t.is("disabled",L(v))]),B=S(()=>[t.e("input"),t.is(L(u)),t.em("input","iOS")]),N=S(()=>[t.is("empty",!e.allowCreate&&!!L(Se)&&L(ye)===0)]),ee=S(()=>({maxWidth:`${L(_)>123?L(_)-123:L(_)-75}px`})),le=S(()=>({marginLeft:`${L(Oe)}px`,flexGrow:1,width:`${L(qe)/(L(_)-32)}%`,maxWidth:`${L(_)-42}px`}));$l(Ze,De({props:e,options:Ge,optionsArray:c,cachedOptions:bl,optionsCount:yl,filteredOptionsCount:ye,hoverIndex:Fe,handleOptionSelect:T,onOptionCreate:fe,onOptionDestroy:el,selectWrapper:oe,selected:Pe,setSelected:D,queryChange:dl,groupQueryChange:cl})),Je(()=>{a.cachedPlaceHolder=Me.value=e.placeholder||(()=>f("el.select.placeholder")),e.multiple&&Array.isArray(e.modelValue)&&e.modelValue.length>0&&(Me.value=""),Hl(oe,g),e.remote&&e.multiple&&W(),V(()=>{const F=Le.value&&Le.value.$el;if(F&&(_.value=F.getBoundingClientRect().width,l.slots.prefix)){const ve=F.querySelector(`.${r.e("prefix")}`);Oe.value=Math.max(ve.getBoundingClientRect().width+11,30)}}),D()}),e.multiple&&!Array.isArray(e.modelValue)&&l.emit(de,[]),!e.multiple&&Array.isArray(e.modelValue)&&l.emit(de,"");const G=S(()=>{var F,ve;return(ve=(F=Ie.value)==null?void 0:F.popperRef)==null?void 0:ve.contentRef});return{isIOS:Fn,onOptionsRendered:F=>{s.value=F},prefixWidth:Oe,selectSize:u,readonly:m,handleResize:g,collapseTagSize:d,debouncedOnInputChange:y,debouncedQueryChange:w,deletePrevTag:C,deleteTag:o,handleDeleteTooltipTag:rl,deleteSelected:b,handleOptionSelect:T,scrollToOption:E,inputWidth:_,selected:Pe,inputLength:qe,filteredOptionsCount:ye,visible:ml,selectedLabel:ke,hoverIndex:Fe,query:Se,inputHovering:gl,currentPlaceholder:Me,menuVisibleOnFocus:hl,isOnComposition:Ue,options:Ge,resetInputHeight:W,managePlaceholder:$,showClose:h,selectDisabled:v,iconComponent:M,iconReverse:q,showNewOption:X,emptyText:J,toggleLastOptionHitState:z,resetInputState:xe,handleComposition:_e,handleMenuEnter:ll,handleFocus:Z,focus:te,blur:Be,handleBlur:He,handleClearClick:Ee,handleClose:Ke,handleKeydownEscape:nl,toggleMenu:tl,selectOption:ol,getValueKey:il,navigateOptions:al,dropMenuVisible:pe,reference:Le,input:We,iOSInput:Ne,tooltipRef:Ie,popperPaneRef:G,tags:sl,selectWrapper:oe,scrollbar:ul,wrapperKls:n,tagsKls:i,tagWrapperKls:p,inputKls:O,iOSInputKls:B,scrollbarKls:N,selectTagsStyle:be,nsSelect:t,tagTextStyle:ee,inputStyle:le,handleMouseEnter:Ae,handleMouseLeave:fl,showTagList:pl,collapseTagList:vl,tagTooltipRef:Ve}}}),mo=["disabled","autocomplete"],go=["disabled"],ho={style:{height:"100%",display:"flex","justify-content":"center","align-items":"center"}};function bo(e,l,t,r,f,a){const s=ie("el-tag"),c=ie("el-tooltip"),u=ie("el-icon"),m=ie("el-input"),g=ie("el-option"),d=ie("el-options"),y=ie("el-scrollbar"),w=ie("el-select-menu"),C=On("click-outside");return Te((I(),H("div",{ref:"selectWrapper",class:A(e.wrapperKls),onMouseenter:l[22]||(l[22]=(...o)=>e.handleMouseEnter&&e.handleMouseEnter(...o)),onMouseleave:l[23]||(l[23]=(...o)=>e.handleMouseLeave&&e.handleMouseLeave(...o)),onClick:l[24]||(l[24]=ae((...o)=>e.toggleMenu&&e.toggleMenu(...o),["stop"]))},[se(c,{ref:"tooltipRef",visible:e.dropMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onShow:e.handleMenuEnter},{default:R(()=>[K("div",{class:"select-trigger",onMouseenter:l[20]||(l[20]=o=>e.inputHovering=!0),onMouseleave:l[21]||(l[21]=o=>e.inputHovering=!1)},[e.multiple?(I(),H("div",{key:0,ref:"tags",tabindex:"-1",class:A(e.tagsKls),style:x(e.selectTagsStyle),onClick:l[15]||(l[15]=(...o)=>e.focus&&e.focus(...o))},[e.collapseTags&&e.selected.length?(I(),k(Ll,{key:0,onAfterLeave:e.resetInputHeight},{default:R(()=>[K("span",{class:A(e.tagWrapperKls)},[(I(!0),H(ze,null,Cl(e.showTagList,o=>(I(),k(s,{key:e.getValueKey(o),closable:!e.selectDisabled&&!o.isDisabled,size:e.collapseTagSize,hit:o.hitState,type:e.tagType,"disable-transitions":"",onClose:b=>e.deleteTag(b,o)},{default:R(()=>[K("span",{class:A(e.nsSelect.e("tags-text")),style:x(e.tagTextStyle)},ue(o.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128)),e.selected.length>e.maxCollapseTags?(I(),k(s,{key:0,closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":""},{default:R(()=>[e.collapseTagsTooltip?(I(),k(c,{key:0,ref:"tagTooltipRef",disabled:e.dropMenuVisible,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:R(()=>[K("span",{class:A(e.nsSelect.e("tags-text"))},"+ "+ue(e.selected.length-e.maxCollapseTags),3)]),content:R(()=>[K("div",{class:A(e.nsSelect.e("collapse-tags"))},[(I(!0),H(ze,null,Cl(e.collapseTagList,o=>(I(),H("div",{key:e.getValueKey(o),class:A(e.nsSelect.e("collapse-tag"))},[se(s,{class:"in-tooltip",closable:!e.selectDisabled&&!o.isDisabled,size:e.collapseTagSize,hit:o.hitState,type:e.tagType,"disable-transitions":"",style:{margin:"2px"},onClose:b=>e.handleDeleteTooltipTag(b,o)},{default:R(()=>[K("span",{class:A(e.nsSelect.e("tags-text")),style:x({maxWidth:e.inputWidth-75+"px"})},ue(o.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):(I(),H("span",{key:1,class:A(e.nsSelect.e("tags-text"))},"+ "+ue(e.selected.length-e.maxCollapseTags),3))]),_:1},8,["size","type"])):Q("v-if",!0)],2)]),_:1},8,["onAfterLeave"])):Q("v-if",!0),e.collapseTags?Q("v-if",!0):(I(),k(Ll,{key:1,onAfterLeave:e.resetInputHeight},{default:R(()=>[K("span",{class:A(e.tagWrapperKls),style:x(e.prefixWidth&&e.selected.length?{marginLeft:`${e.prefixWidth}px`}:"")},[(I(!0),H(ze,null,Cl(e.selected,o=>(I(),k(s,{key:e.getValueKey(o),closable:!e.selectDisabled&&!o.isDisabled,size:e.collapseTagSize,hit:o.hitState,type:e.tagType,"disable-transitions":"",onClose:b=>e.deleteTag(b,o)},{default:R(()=>[K("span",{class:A(e.nsSelect.e("tags-text")),style:x({maxWidth:e.inputWidth-75+"px"})},ue(o.currentLabel),7)]),_:2},1032,["closable","size","hit","type","onClose"]))),128))],6)]),_:1},8,["onAfterLeave"])),e.filterable&&!e.selectDisabled?Te((I(),H("input",{key:2,ref:"input","onUpdate:modelValue":l[0]||(l[0]=o=>e.query=o),type:"text",class:A(e.inputKls),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:x(e.inputStyle),onFocus:l[1]||(l[1]=(...o)=>e.handleFocus&&e.handleFocus(...o)),onBlur:l[2]||(l[2]=(...o)=>e.handleBlur&&e.handleBlur(...o)),onKeyup:l[3]||(l[3]=(...o)=>e.managePlaceholder&&e.managePlaceholder(...o)),onKeydown:[l[4]||(l[4]=(...o)=>e.resetInputState&&e.resetInputState(...o)),l[5]||(l[5]=Y(ae(o=>e.navigateOptions("next"),["prevent"]),["down"])),l[6]||(l[6]=Y(ae(o=>e.navigateOptions("prev"),["prevent"]),["up"])),l[7]||(l[7]=Y((...o)=>e.handleKeydownEscape&&e.handleKeydownEscape(...o),["esc"])),l[8]||(l[8]=Y(ae((...o)=>e.selectOption&&e.selectOption(...o),["stop","prevent"]),["enter"])),l[9]||(l[9]=Y((...o)=>e.deletePrevTag&&e.deletePrevTag(...o),["delete"])),l[10]||(l[10]=Y(o=>e.visible=!1,["tab"]))],onCompositionstart:l[11]||(l[11]=(...o)=>e.handleComposition&&e.handleComposition(...o)),onCompositionupdate:l[12]||(l[12]=(...o)=>e.handleComposition&&e.handleComposition(...o)),onCompositionend:l[13]||(l[13]=(...o)=>e.handleComposition&&e.handleComposition(...o)),onInput:l[14]||(l[14]=(...o)=>e.debouncedQueryChange&&e.debouncedQueryChange(...o))},null,46,mo)),[[Cn,e.query]]):Q("v-if",!0)],6)):Q("v-if",!0),Q(" fix: https://github.com/element-plus/element-plus/issues/11415 "),e.isIOS&&!e.multiple&&e.filterable&&e.readonly?(I(),H("input",{key:1,ref:"iOSInput",class:A(e.iOSInputKls),disabled:e.selectDisabled,type:"text"},null,10,go)):Q("v-if",!0),se(m,{id:e.id,ref:"reference",modelValue:e.selectedLabel,"onUpdate:modelValue":l[16]||(l[16]=o=>e.selectedLabel=o),type:"text",placeholder:typeof e.currentPlaceholder=="function"?e.currentPlaceholder():e.currentPlaceholder,name:e.name,autocomplete:e.autocomplete,size:e.selectSize,disabled:e.selectDisabled,readonly:e.readonly,"validate-event":!1,class:A([e.nsSelect.is("focus",e.visible)]),tabindex:e.multiple&&e.filterable?-1:void 0,onFocus:e.handleFocus,onBlur:e.handleBlur,onInput:e.debouncedOnInputChange,onPaste:e.debouncedOnInputChange,onCompositionstart:e.handleComposition,onCompositionupdate:e.handleComposition,onCompositionend:e.handleComposition,onKeydown:[l[17]||(l[17]=Y(ae(o=>e.navigateOptions("next"),["stop","prevent"]),["down"])),l[18]||(l[18]=Y(ae(o=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),Y(ae(e.selectOption,["stop","prevent"]),["enter"]),Y(e.handleKeydownEscape,["esc"]),l[19]||(l[19]=Y(o=>e.visible=!1,["tab"]))]},wn({suffix:R(()=>[e.iconComponent&&!e.showClose?(I(),k(u,{key:0,class:A([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:R(()=>[(I(),k(Il(e.iconComponent)))]),_:1},8,["class"])):Q("v-if",!0),e.showClose&&e.clearIcon?(I(),k(u,{key:1,class:A([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:R(()=>[(I(),k(Il(e.clearIcon)))]),_:1},8,["class","onClick"])):Q("v-if",!0)]),_:2},[e.$slots.prefix?{name:"prefix",fn:R(()=>[K("div",ho,[ge(e.$slots,"prefix")])])}:void 0]),1032,["id","modelValue","placeholder","name","autocomplete","size","disabled","readonly","class","tabindex","onFocus","onBlur","onInput","onPaste","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown"])],32)]),content:R(()=>[se(w,null,{default:R(()=>[Te(se(y,{ref:"scrollbar",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:A(e.scrollbarKls)},{default:R(()=>[e.showNewOption?(I(),k(g,{key:0,value:e.query,created:!0},null,8,["value"])):Q("v-if",!0),se(d,{onUpdateOptions:e.onOptionsRendered},{default:R(()=>[ge(e.$slots,"default")]),_:3},8,["onUpdateOptions"])]),_:3},8,["wrap-class","view-class","class"]),[[Xe,e.options.size>0&&!e.loading]]),e.emptyText&&(!e.allowCreate||e.loading||e.allowCreate&&e.options.size===0)?(I(),H(ze,{key:0},[e.$slots.empty?ge(e.$slots,"empty",{key:0}):(I(),H("p",{key:1,class:A(e.nsSelect.be("dropdown","empty"))},ue(e.emptyText),3))],64)):Q("v-if",!0)]),_:3})]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onShow"])],34)),[[C,e.handleClose,e.popperPaneRef]])}var yo=he(vo,[["render",bo],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);const So=ne({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:{type:Boolean,default:!1}},setup(e){const l=ce("select"),t=P(!0),r=zl(),f=P([]);$l(bn,De({...Rl(e)}));const a=Re(Ze);Je(()=>{f.value=s(r.subTree)});const s=u=>{const m=[];return Array.isArray(u.children)&&u.children.forEach(g=>{var d;g.type&&g.type.name==="ElOption"&&g.component&&g.component.proxy?m.push(g.component.proxy):(d=g.children)!=null&&d.length&&m.push(...s(g))}),m},{groupQueryChange:c}=Ye(a);return U(c,()=>{t.value=f.value.some(u=>u.visible===!0)},{flush:"post"}),{visible:t,ns:l}}});function Oo(e,l,t,r,f,a){return Te((I(),H("ul",{class:A(e.ns.be("group","wrap"))},[K("li",{class:A(e.ns.be("group","title"))},ue(e.label),3),K("li",null,[K("ul",{class:A(e.ns.b("group"))},[ge(e.$slots,"default")],2)])],2)),[[Xe,e.visible]])}var yn=he(So,[["render",Oo],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);const Lo=fn(yo,{Option:Wl,OptionGroup:yn}),Io=vn(Wl);vn(yn);export{to as C,Io as E,Lo as a,gn as b,no as c,tn as d,on as i};
|