import{m as ve,_ as he,E as V,f as Te,g as ze,h as Oe,p as Be,d as ce}from"./axios-8d343c26.js";import{t as ae,h as me,i as Ie,j as ke,f as G,b as Le,U as be}from"./el-button-49a463b1.js";import{R as Fe,$ as De,b as x,i as ne,d as L,j as re,u as X,m as y,F as $,E as oe,o as pe,v as ge,n as Ee,e as k,f as $e,O as J,c as Y,s as se,a4 as ie,y as R,p as Ue,r as Ce,L as Qe,k as He,a5 as Ke,a6 as fe,q as Ye,a7 as Ve,G as Ge,Y as We,J as xe,h as Xe,a8 as Je,S as K}from"./index-51b73230.js";import{c as D}from"./strings-9bebeb74.js";import{f as qe}from"./vnode-7c22ce0d.js";const Ze=(o,c,d)=>qe(o.subTree).filter(l=>{var n;return De(l)&&((n=l.type)==null?void 0:n.name)===c&&!!l.component}).map(l=>l.component.uid).map(l=>d[l]).filter(l=>!!l),je=(o,c)=>{const d={},f=Fe([]);return{children:f,addChild:n=>{d[n.uid]=n,f.value=Ze(o,c,d)},removeChild:n=>{delete d[n],f.value=f.value.filter(e=>e.uid!==n)}}},q=Symbol("tabsRootContextKey"),et=x({tabs:{type:ne(Array),default:()=>ve([])}}),we="ElTabBar",tt=L({name:we}),at=L({...tt,props:et,setup(o,{expose:c}){const d=o,f=J(),v=re(q);v||ae(we,"");const l=X("tabs"),n=y(),e=y(),t=()=>{let r=0,s=0;const i=["top","bottom"].includes(v.props.tabPosition)?"width":"height",u=i==="width"?"x":"y",b=u==="x"?"left":"top";return d.tabs.every(E=>{var w,h;const C=(h=(w=f.parent)==null?void 0:w.refs)==null?void 0:h[`tab-${E.uid}`];if(!C)return!1;if(!E.active)return!0;r=C[`offset${D(b)}`],s=C[`client${D(i)}`];const N=window.getComputedStyle(C);return i==="width"&&(d.tabs.length>1&&(s-=Number.parseFloat(N.paddingLeft)+Number.parseFloat(N.paddingRight)),r+=Number.parseFloat(N.paddingLeft)),!1}),{[i]:`${s}px`,transform:`translate${D(u)}(${r}px)`}},a=()=>e.value=t();return $(()=>d.tabs,async()=>{await oe(),a()},{immediate:!0}),me(n,()=>a()),c({ref:n,update:a}),(r,s)=>(pe(),ge("div",{ref_key:"barRef",ref:n,class:Ee([k(l).e("active-bar"),k(l).is(k(v).props.tabPosition)]),style:$e(e.value)},null,6))}});var nt=he(at,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);const rt=x({panes:{type:ne(Array),default:()=>ve([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),ot={tabClick:(o,c,d)=>d instanceof Event,tabRemove:(o,c)=>c instanceof Event},de="ElTabNav",st=L({name:de,props:rt,emits:ot,setup(o,{expose:c,emit:d}){const f=J(),v=re(q);v||ae(de,"");const l=X("tabs"),n=Ie(),e=ke(),t=y(),a=y(),r=y(),s=y(),i=y(!1),u=y(0),b=y(!1),E=y(!0),w=Y(()=>["top","bottom"].includes(v.props.tabPosition)?"width":"height"),h=Y(()=>({transform:`translate${w.value==="width"?"X":"Y"}(-${u.value}px)`})),C=()=>{if(!t.value)return;const p=t.value[`offset${D(w.value)}`],M=u.value;if(!M)return;const m=M>p?M-p:0;u.value=m},N=()=>{if(!t.value||!a.value)return;const p=a.value[`offset${D(w.value)}`],M=t.value[`offset${D(w.value)}`],m=u.value;if(p-m<=M)return;const _=p-m>M*2?m+M:p-M;u.value=_},g=async()=>{const p=a.value;if(!i.value||!r.value||!t.value||!p)return;await oe();const M=r.value.querySelector(".is-active");if(!M)return;const m=t.value,_=["top","bottom"].includes(v.props.tabPosition),P=M.getBoundingClientRect(),S=m.getBoundingClientRect(),z=_?p.offsetWidth-S.width:p.offsetHeight-S.height,O=u.value;let A=O;_?(P.leftS.right&&(A=O+P.right-S.right)):(P.topS.bottom&&(A=O+(P.bottom-S.bottom))),A=Math.max(A,0),u.value=Math.min(A,z)},T=()=>{var p;if(!a.value||!t.value)return;o.stretch&&((p=s.value)==null||p.update());const M=a.value[`offset${D(w.value)}`],m=t.value[`offset${D(w.value)}`],_=u.value;m0&&(u.value=0))},F=p=>{const M=p.code,{up:m,down:_,left:P,right:S}=G;if(![m,_,P,S].includes(M))return;const z=Array.from(p.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),O=z.indexOf(p.target);let A;M===P||M===m?O===0?A=z.length-1:A=O-1:O{E.value&&(b.value=!0)},I=()=>b.value=!1;return $(n,p=>{p==="hidden"?E.value=!1:p==="visible"&&setTimeout(()=>E.value=!0,50)}),$(e,p=>{p?setTimeout(()=>E.value=!0,50):E.value=!1}),me(r,T),se(()=>setTimeout(()=>g(),0)),ie(()=>T()),c({scrollToActiveTab:g,removeFocus:I}),$(()=>o.panes,()=>f.update(),{flush:"post",deep:!0}),()=>{const p=i.value?[R("span",{class:[l.e("nav-prev"),l.is("disabled",!i.value.prev)],onClick:C},[R(V,null,{default:()=>[R(Te,null,null)]})]),R("span",{class:[l.e("nav-next"),l.is("disabled",!i.value.next)],onClick:N},[R(V,null,{default:()=>[R(ze,null,null)]})])]:null,M=o.panes.map((m,_)=>{var P,S,z,O;const A=m.uid,Z=m.props.disabled,j=(S=(P=m.props.name)!=null?P:m.index)!=null?S:`${_}`,ee=!Z&&(m.isClosable||o.editable);m.index=`${_}`;const Se=ee?R(V,{class:"is-icon-close",onClick:U=>d("tabRemove",m,U)},{default:()=>[R(Oe,null,null)]}):null,Ae=((O=(z=m.slots).label)==null?void 0:O.call(z))||m.props.label,ye=!Z&&m.active?0:-1;return R("div",{ref:`tab-${A}`,class:[l.e("item"),l.is(v.props.tabPosition),l.is("active",m.active),l.is("disabled",Z),l.is("closable",ee),l.is("focus",b.value)],id:`tab-${j}`,key:`tab-${A}`,"aria-controls":`pane-${j}`,role:"tab","aria-selected":m.active,tabindex:ye,onFocus:()=>B(),onBlur:()=>I(),onClick:U=>{I(),d("tabClick",m,j,U)},onKeydown:U=>{ee&&(U.code===G.delete||U.code===G.backspace)&&d("tabRemove",m,U)}},[Ae,Se])});return R("div",{ref:r,class:[l.e("nav-wrap"),l.is("scrollable",!!i.value),l.is(v.props.tabPosition)]},[p,R("div",{class:l.e("nav-scroll"),ref:t},[R("div",{class:[l.e("nav"),l.is(v.props.tabPosition),l.is("stretch",o.stretch&&["top","bottom"].includes(v.props.tabPosition))],ref:a,style:h.value,role:"tablist",onKeydown:F},[o.type?null:R(nt,{ref:s,tabs:[...o.panes]},null),M])])])}}}),it=x({type:{type:String,values:["card","border-card",""],default:""},activeName:{type:[String,Number]},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:ne(Function),default:()=>!0},stretch:Boolean}),te=o=>Qe(o)||He(o),lt={[be]:o=>te(o),tabClick:(o,c)=>c instanceof Event,tabChange:o=>te(o),edit:(o,c)=>["remove","add"].includes(c),tabRemove:o=>te(o),tabAdd:()=>!0};var ut=L({name:"ElTabs",props:it,emits:lt,setup(o,{emit:c,slots:d,expose:f}){var v,l;const n=X("tabs"),{children:e,addChild:t,removeChild:a}=je(J(),"ElTabPane"),r=y(),s=y((l=(v=o.modelValue)!=null?v:o.activeName)!=null?l:"0"),i=h=>{s.value=h,c(be,h),c("tabChange",h)},u=async h=>{var C,N,g;if(!(s.value===h||ce(h)))try{await((C=o.beforeLeave)==null?void 0:C.call(o,h,s.value))!==!1&&(i(h),(g=(N=r.value)==null?void 0:N.removeFocus)==null||g.call(N))}catch{}},b=(h,C,N)=>{h.props.disabled||(u(C),c("tabClick",h,N))},E=(h,C)=>{h.props.disabled||ce(h.props.name)||(C.stopPropagation(),c("edit",h.props.name,"remove"),c("tabRemove",h.props.name))},w=()=>{c("edit",void 0,"add"),c("tabAdd")};return Le({from:'"activeName"',replacement:'"model-value" or "v-model"',scope:"ElTabs",version:"2.3.0",ref:"https://element-plus.org/en-US/component/tabs.html#attributes",type:"Attribute"},Y(()=>!!o.activeName)),$(()=>o.activeName,h=>u(h)),$(()=>o.modelValue,h=>u(h)),$(s,async()=>{var h;await oe(),(h=r.value)==null||h.scrollToActiveTab()}),Ue(q,{props:o,currentName:s,registerPane:t,unregisterPane:a}),f({currentName:s}),()=>{const h=o.editable||o.addable?R("span",{class:n.e("new-tab"),tabindex:"0",onClick:w,onKeydown:g=>{g.code===G.enter&&w()}},[R(V,{class:n.is("icon-plus")},{default:()=>[R(Be,null,null)]})]):null,C=R("div",{class:[n.e("header"),n.is(o.tabPosition)]},[h,R(st,{ref:r,currentName:s.value,editable:o.editable,type:o.type,panes:e.value,stretch:o.stretch,onTabClick:b,onTabRemove:E},null)]),N=R("div",{class:n.e("content")},[Ce(d,"default")]);return R("div",{class:[n.b(),n.m(o.tabPosition),{[n.m("card")]:o.type==="card",[n.m("border-card")]:o.type==="border-card"}]},[...o.tabPosition!=="bottom"?[C,N]:[N,C]])}}});const ct=x({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),ft=["id","aria-hidden","aria-labelledby"],Ne="ElTabPane",dt=L({name:Ne}),vt=L({...dt,props:ct,setup(o){const c=o,d=J(),f=Ke(),v=re(q);v||ae(Ne,"usage: ");const l=X("tab-pane"),n=y(),e=Y(()=>c.closable||v.props.closable),t=fe(()=>{var u;return v.currentName.value===((u=c.name)!=null?u:n.value)}),a=y(t.value),r=Y(()=>{var u;return(u=c.name)!=null?u:n.value}),s=fe(()=>!c.lazy||a.value||t.value);$(t,u=>{u&&(a.value=!0)});const i=Ye({uid:d.uid,slots:f,props:c,paneName:r,active:t,index:n,isClosable:e});return se(()=>{v.registerPane(i)}),Ve(()=>{v.unregisterPane(i.uid)}),(u,b)=>k(s)?Ge((pe(),ge("div",{key:0,id:`pane-${k(r)}`,class:Ee(k(l).b()),role:"tabpanel","aria-hidden":!k(t),"aria-labelledby":`tab-${k(r)}`},[Ce(u.$slots,"default")],10,ft)),[[We,k(t)]]):xe("v-if",!0)}});var Me=he(vt,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);const Mt=Xe(ut,{TabPane:Me}),Rt=Je(Me);const Pt=""+new URL("front-4f5f6873.png",import.meta.url).href,_t=""+new URL("back-807cf0a8.png",import.meta.url).href;/*! * qrcode.vue v3.4.0 * A Vue.js component to generate QRCode. * © 2017-2023 @scopewu(https://github.com/scopewu) * MIT License. */var W=function(){return W=Object.assign||function(c){for(var d,f=1,v=arguments.length;fn.MAX_VERSION)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var s=[],i=0;i7)throw new RangeError("Invalid value");var u,b;for(u=a;;u++){var E=n.getNumDataCodewords(u,t)*8,w=l.getTotalBits(e,u);if(w<=E){b=w;break}if(u>=r)throw new RangeError("Data too long")}for(var h=0,C=[n.Ecc.MEDIUM,n.Ecc.QUARTILE,n.Ecc.HIGH];h>>3]|=S<<7-(z&7)}),new n(u,t,P,s)},n.prototype.getModule=function(e,t){return 0<=e&&e>>9)*1335;var s=(t<<10|a)^21522;v(s>>>15==0);for(var r=0;r<=5;r++)this.setFunctionModule(8,r,f(s,r));this.setFunctionModule(8,7,f(s,6)),this.setFunctionModule(8,8,f(s,7)),this.setFunctionModule(7,8,f(s,8));for(var r=9;r<15;r++)this.setFunctionModule(14-r,8,f(s,r));for(var r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,f(s,r));for(var r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,f(s,r));this.setFunctionModule(8,this.size-8,!0)},n.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var a=this.version<<12|e;v(a>>>18==0);for(var t=0;t<18;t++){var r=f(a,t),s=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(s,i,r),this.setFunctionModule(i,s,r)}}},n.prototype.drawFinderPattern=function(e,t){for(var a=-4;a<=4;a++)for(var r=-4;r<=4;r++){var s=Math.max(Math.abs(r),Math.abs(a)),i=e+r,u=t+a;0<=i&&i=u)&&T.push(I[B])})},h=0;h=1;a-=2){a==6&&(a=5);for(var r=0;r>>3],7-(t&7)),t++)}}v(t==e.length*8)},n.prototype.applyMask=function(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(var t=0;t5&&e++):(this.finderPenaltyAddHistory(r,s),a||(e+=this.finderPenaltyCountPatterns(s)*n.PENALTY_N3),a=this.modules[t][i],r=1);e+=this.finderPenaltyTerminateAndCount(a,r,s)*n.PENALTY_N3}for(var i=0;i5&&e++):(this.finderPenaltyAddHistory(u,s),a||(e+=this.finderPenaltyCountPatterns(s)*n.PENALTY_N3),a=this.modules[t][i],u=1);e+=this.finderPenaltyTerminateAndCount(a,u,s)*n.PENALTY_N3}for(var t=0;tn.MAX_VERSION)throw new RangeError("Version number out of range");var t=(16*e+128)*e+64;if(e>=2){var a=Math.floor(e/7)+2;t-=(25*a-10)*a-55,e>=7&&(t-=36)}return v(208<=t&&t<=29648),t},n.getNumDataCodewords=function(e,t){return Math.floor(n.getNumRawDataModules(e)/8)-n.ECC_CODEWORDS_PER_BLOCK[t.ordinal][e]*n.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][e]},n.reedSolomonComputeDivisor=function(e){if(e<1||e>255)throw new RangeError("Degree out of range");for(var t=[],a=0;a>>8||t>>>8)throw new RangeError("Byte out of range");for(var a=0,r=7;r>=0;r--)a=a<<1^(a>>>7)*285,a^=(t>>>r&1)*e;return v(a>>>8==0),a},n.prototype.finderPenaltyCountPatterns=function(e){var t=e[1];v(t<=this.size*3);var a=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(a&&e[0]>=t*4&&e[6]>=t?1:0)+(a&&e[6]>=t*4&&e[0]>=t?1:0)},n.prototype.finderPenaltyTerminateAndCount=function(e,t,a){return e&&(this.finderPenaltyAddHistory(t,a),t=0),t+=this.size,this.finderPenaltyAddHistory(t,a),this.finderPenaltyCountPatterns(a)},n.prototype.finderPenaltyAddHistory=function(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)},n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],n}();o.QrCode=c;function d(n,e,t){if(e<0||e>31||n>>>e)throw new RangeError("Value out of range");for(var a=e-1;a>=0;a--)t.push(n>>>a&1)}function f(n,e){return(n>>>e&1)!=0}function v(n){if(!n)throw new Error("Assertion error")}var l=function(){function n(e,t,a){if(this.mode=e,this.numChars=t,this.bitData=a,t<0)throw new RangeError("Invalid argument");this.bitData=a.slice()}return n.makeBytes=function(e){for(var t=[],a=0,r=e;a=1<-1}}}),bt=L({name:"QRCodeSvg",props:ue,setup:function(o){var c=y(0),d=y(""),f=function(){var v=o.value,l=o.level,n=o.margin,e=H.QrCode.encodeText(v,le[l]).getModules();c.value=e.length+n*2,d.value=_e(e,n)};return f(),ie(f),function(){return K("svg",{width:o.size,height:o.size,"shape-rendering":"crispEdges",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(c.value," ").concat(c.value)},[K("path",{fill:o.background,d:"M0,0 h".concat(c.value,"v").concat(c.value,"H0z")}),K("path",{fill:o.foreground,d:d.value})])}}}),pt=L({name:"QRCodeCanvas",props:ue,setup:function(o){var c=y(null),d=function(){var f=o.value,v=o.level,l=o.size,n=o.margin,e=o.background,t=o.foreground,a=c.value;if(a){var r=a.getContext("2d");if(r){var s=H.QrCode.encodeText(f,le[v]).getModules(),i=s.length+n*2,u=window.devicePixelRatio||1,b=l/i*u;a.height=a.width=l*u,r.scale(b,b),r.fillStyle=e,r.fillRect(0,0,i,i),r.fillStyle=t,ht?r.fill(new Path2D(_e(s,n))):s.forEach(function(E,w){E.forEach(function(h,C){h&&r.fillRect(C+n,w+n,1,1)})})}}};return se(d),ie(d),function(){return K("canvas",{ref:c,style:{width:"".concat(o.size,"px"),height:"".concat(o.size,"px")}})}}}),St=L({name:"Qrcode",render:function(){var o=this.$props,c=o.renderAs,d=o.value,f=o.size,v=o.margin,l=o.level,n=o.background,e=o.foreground,t=f>>>0,a=v>>>0,r=Pe(l)?l:Re;return K(c==="svg"?bt:pt,{value:d,size:t,margin:a,level:r,background:n,foreground:e})},props:mt});export{Rt as E,St as Q,Pt as _,_t as a,Mt as b};