@acedatacloud/nexior 3.17.4 → 3.17.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/assets/{Auth-UrOnsReI.js → Auth-M-wj0J-w.js} +1 -1
  2. package/dist/assets/{BotPlaceholder-D1brFsYP.js → BotPlaceholder-C1Azl5K7.js} +1 -1
  3. package/dist/assets/{Callback-CEfkP7EZ.js → Callback-Bz3B9nx6.js} +1 -1
  4. package/dist/assets/{Console-BJNJrrBO.js → Console-BzLhkikT.js} +1 -1
  5. package/dist/assets/{Conversation-Bs7qIsnf.js → Conversation-LVJfixVu.js} +2 -2
  6. package/dist/assets/{CopyToClipboard-DcdEVT8q.js → CopyToClipboard-AFrGC6zu.js} +1 -1
  7. package/dist/assets/{Detail-DXinej4R.js → Detail-CqdREk_1.js} +1 -1
  8. package/dist/assets/{EditArray-DX1XTYOn.js → EditArray-CGbwGpRK.js} +1 -1
  9. package/dist/assets/{Extra-CQ_WfrlD.js → Extra-yKXFVG1a.js} +1 -1
  10. package/dist/assets/{FilePreview-BH4xmpTP.js → FilePreview-Dt2uzjGl.js} +1 -1
  11. package/dist/assets/{History-yDLoSPoJ.js → History-Dc-8wkvv.js} +1 -1
  12. package/dist/assets/{ImagePreview-D-KnXoir.js → ImagePreview-Vw_6gGQd.js} +1 -1
  13. package/dist/assets/{ImageWrapper-BBcaUhxm.js → ImageWrapper-BHZ6v6Hu.js} +1 -1
  14. package/dist/assets/{Index-D2Afinxd.js → Index-0kgZhs6d.js} +1 -1
  15. package/dist/assets/{Index-IXPq-mGt.js → Index-BpDPvB2e.js} +1 -1
  16. package/dist/assets/{Index-yCRh5IX4.js → Index-C06T2dzl.js} +1 -1
  17. package/dist/assets/{Index-BhmQ4Z0s.js → Index-CTsXrHyW.js} +1 -1
  18. package/dist/assets/{Index-Dn2Quw1D.js → Index-CfbuVnfs.js} +1 -1
  19. package/dist/assets/{Index-DwxOZYA3.js → Index-CojbKmR3.js} +1 -1
  20. package/dist/assets/{Index-D3Agcw9z.js → Index-Cqzgq7iB.js} +1 -1
  21. package/dist/assets/{Index-C7ZAf6tR.js → Index-D2oiKbFP.js} +1 -1
  22. package/dist/assets/{Index-CfLG3wTC.js → Index-D_AMTZIC.js} +1 -1
  23. package/dist/assets/{Index-DYJDydgE.js → Index-J7JlA35c.js} +1 -1
  24. package/dist/assets/{Index-DEXMW4cW.js → Index-QMfw1hIR.js} +1 -1
  25. package/dist/assets/{Index-VKzm7erR.js → Index-QeCRKHNv.js} +1 -1
  26. package/dist/assets/{Index-C3vVbohs.js → Index-YDLgar-q.js} +1 -1
  27. package/dist/assets/Index-auc3aXY9.js +1 -0
  28. package/dist/assets/Index-lGPUVGER.css +1 -0
  29. package/dist/assets/{InfoIcon-Br1f42SZ.js → InfoIcon-aG3xky6z.js} +1 -1
  30. package/dist/assets/{Invitees-muoz1tFS.js → Invitees-EIz5GH1N.js} +1 -1
  31. package/dist/assets/{List-BZuNTZXS.js → List-DY6olt_K.js} +1 -1
  32. package/dist/assets/{List-CHvsB5jh.js → List-DoLXxtF6.js} +1 -1
  33. package/dist/assets/{List-BEH8NtBh.js → List-eOJcJP2B.js} +1 -1
  34. package/dist/assets/{Login-DcH8DxMO.js → Login-o4ywAw_b.js} +1 -1
  35. package/dist/assets/{Main-cNk_aIFV.js → Main-utEpcTki.js} +1 -1
  36. package/dist/assets/{Navigator-BGl1_Pgt.js → Navigator-BL82vOxY.js} +1 -1
  37. package/dist/assets/{NoTasks-CgeVr5YB.js → NoTasks-D6aQEQ_z.js} +1 -1
  38. package/dist/assets/{Pagination-CEoqyF7v.js → Pagination-BUIYUPlC.js} +1 -1
  39. package/dist/assets/{Status-BLLZc2aA.js → Status-DvmAEWo4.js} +1 -1
  40. package/dist/assets/{Subscribe-UQUcC7CS.js → Subscribe-CB1ThAcy.js} +1 -1
  41. package/dist/assets/{VideoPlayer-DUY52eya.js → VideoPlayer-B4hwt6p9.js} +1 -1
  42. package/dist/assets/{_Uint8Array-Cp8E3K79.js → _Uint8Array-CKCrVCIW.js} +1 -1
  43. package/dist/assets/{_baseClone-DyBfXBsi.js → _baseClone-2NfMeWJP.js} +1 -1
  44. package/dist/assets/{_baseIteratee-B9I0pDUN.js → _baseIteratee-DrOJ5XUl.js} +1 -1
  45. package/dist/assets/{_initCloneObject-Rg_w1aJn.js → _initCloneObject-CfGFlXWr.js} +1 -1
  46. package/dist/assets/{castArray-B7L7jPOI.js → castArray-DVyev9bJ.js} +1 -1
  47. package/dist/assets/{debounce-BXWQzEeG.js → debounce-Dnlkicc5.js} +1 -1
  48. package/dist/assets/{distribution-HZUNEO37.js → distribution-BbSVq125.js} +1 -1
  49. package/dist/assets/{dropdown-1Tl9Db1N.js → dropdown-CxuXHpft.js} +1 -1
  50. package/dist/assets/{index-Dbfp85VL.js → index-B099pfCb.js} +1 -1
  51. package/dist/assets/{index-DWUYlHcq.js → index-B3Ntk-No.js} +1 -1
  52. package/dist/assets/{index-Dkgd-CmS.js → index-BEf6ot_1.js} +1 -1
  53. package/dist/assets/{index-CcPgf95n.js → index-BFW05bY6.js} +1 -1
  54. package/dist/assets/{index-Bd5hlKhP.js → index-BGGxyBYT.js} +1 -1
  55. package/dist/assets/{index-FSR3bkwo.js → index-BTbYbX3l.js} +1 -1
  56. package/dist/assets/{index-C-YxCum6.js → index-BZuQIN64.js} +1 -1
  57. package/dist/assets/{index-QJ0n_1Kf.js → index-BnwSAYOH.js} +1 -1
  58. package/dist/assets/{index-D8sqLsu8.js → index-BoPdW-Of.js} +1 -1
  59. package/dist/assets/{index-mRzx9BSD.js → index-By0D1Y9r.js} +1 -1
  60. package/dist/assets/{index-B5o8qRlX.js → index-ByY_tD9H.js} +1 -1
  61. package/dist/assets/{index-BWm3U-BN.js → index-CGl7iLF3.js} +1 -1
  62. package/dist/assets/{index-IdqXq7O8.js → index-CY75twqY.js} +1 -1
  63. package/dist/assets/{index-7-cfxo6X.js → index-CZ5FRTN3.js} +1 -1
  64. package/dist/assets/{index-KXI5e-q0.js → index-D-xE_DuU.js} +1 -1
  65. package/dist/assets/{index-BRp_12fg.js → index-D67IuHtq.js} +1 -1
  66. package/dist/assets/{index-B5W4Ro1I.js → index-D7SIBJVO.js} +1 -1
  67. package/dist/assets/{index-DpZ5x9eg.js → index-DDIFQJDx.js} +1 -1
  68. package/dist/assets/{index-BDnu8Rx2.js → index-DI_C3Ao9.js} +4 -4
  69. package/dist/assets/{index-BpN23C33.js → index-DLRLNopw.js} +1 -1
  70. package/dist/assets/{index-dcR5mro7.js → index-DPVwLadf.js} +1 -1
  71. package/dist/assets/{index-BerRn096.js → index-DgyERZhI.js} +1 -1
  72. package/dist/assets/{index-Cvzwn5DL.js → index-DlFjlQy3.js} +1 -1
  73. package/dist/assets/{index-BHstLZkN.js → index-DqzgaH2_.js} +1 -1
  74. package/dist/assets/{index-BjeXTDuD.js → index-PU4oJo9l.js} +1 -1
  75. package/dist/assets/{index-DmRA92w7.js → index-Uz6VpvEs.js} +1 -1
  76. package/dist/assets/{index-BqB8EtmR.js → index-bcWh3aiG.js} +1 -1
  77. package/dist/assets/{index-CJFnLzQ-.js → index-ml3LR6LG.js} +1 -1
  78. package/dist/assets/{index-DZxnN0Hy.js → index-sVUmFHgv.js} +1 -1
  79. package/dist/assets/{index.es-BcVUdKzU.js → index.es-Sv2RX3tE.js} +1 -1
  80. package/dist/assets/{isEqual-oRaCHLap.js → isEqual-rNurVTiM.js} +1 -1
  81. package/dist/assets/{isPlainObject-D0l8uyMi.js → isPlainObject-BiS_yJCA.js} +1 -1
  82. package/dist/assets/midjourney-BCDKTBps.js +1 -0
  83. package/dist/assets/midjourney-BPcmoRqB.js +1 -0
  84. package/dist/assets/midjourney-Bn_bnom2.js +1 -0
  85. package/dist/assets/midjourney-C9rsTTmv.js +1 -0
  86. package/dist/assets/{midjourney-tCFio6uZ.js → midjourney-CKT0ckpN.js} +1 -1
  87. package/dist/assets/midjourney-CkXL5sd0.js +1 -0
  88. package/dist/assets/midjourney-D4nnkrfR.js +1 -0
  89. package/dist/assets/midjourney-DMiOZ3gh.js +1 -0
  90. package/dist/assets/midjourney-DQsIqxRE.js +1 -0
  91. package/dist/assets/midjourney-Dd0w-JCt.js +1 -0
  92. package/dist/assets/midjourney-Dja-dCmE.js +1 -0
  93. package/dist/assets/midjourney-DlwRY6Im.js +1 -0
  94. package/dist/assets/midjourney-Dr2BQ3dQ.js +1 -0
  95. package/dist/assets/midjourney-Dvt_BL0B.js +1 -0
  96. package/dist/assets/midjourney-nm2wEVEf.js +1 -0
  97. package/dist/assets/{order-B4JxV1l_.js → order-qoLDORAh.js} +1 -1
  98. package/dist/assets/{price-kIEvtbxH.js → price-CV9K1ebj.js} +1 -1
  99. package/dist/assets/{strings-DEKOZWkP.js → strings-CKxhwaoH.js} +1 -1
  100. package/dist/assets/{typescript-DhyxNYRx.js → typescript-8pw9sVHl.js} +1 -1
  101. package/dist/assets/{use-form-item-B7j42EP5.js → use-form-item-D6NQ9sNV.js} +1 -1
  102. package/dist/index.html +1 -1
  103. package/package.json +1 -1
  104. package/dist/assets/Index-8ecEfh5u.js +0 -1
  105. package/dist/assets/Index-IjNohCrs.css +0 -1
  106. package/dist/assets/midjourney-BK68rw4v.js +0 -1
  107. package/dist/assets/midjourney-Bc96BM98.js +0 -1
  108. package/dist/assets/midjourney-BxBWHaOt.js +0 -1
  109. package/dist/assets/midjourney-BxOyD_dl.js +0 -1
  110. package/dist/assets/midjourney-CCAZM0l6.js +0 -1
  111. package/dist/assets/midjourney-CvJ_CJAc.js +0 -1
  112. package/dist/assets/midjourney-D1IbLd1m.js +0 -1
  113. package/dist/assets/midjourney-DJ_2P23a.js +0 -1
  114. package/dist/assets/midjourney-DKLOMMVC.js +0 -1
  115. package/dist/assets/midjourney-DM4jVekc.js +0 -1
  116. package/dist/assets/midjourney-DPAw3bi8.js +0 -1
  117. package/dist/assets/midjourney-DlQvz4Bo.js +0 -1
  118. package/dist/assets/midjourney-DtAVhT0M.js +0 -1
  119. package/dist/assets/midjourney-tsH3Y0i-.js +0 -1
@@ -1 +1 @@
1
- import{c as e,aD as o,aK as u}from"./index-BDnu8Rx2.js";const i=["class","style"],E=/^on[A-Z]/,f=(a={})=>{const{excludeListeners:c=!1,excludeKeys:t}=a,l=e(()=>(t?.value||[]).concat(i)),s=u();return s?e(()=>{var n;return o(Object.entries((n=s.proxy)==null?void 0:n.$attrs).filter(([r])=>!l.value.includes(r)&&!(c&&E.test(r))))}):e(()=>({}))};export{f as u};
1
+ import{c as e,aD as o,aK as u}from"./index-DI_C3Ao9.js";const i=["class","style"],E=/^on[A-Z]/,f=(a={})=>{const{excludeListeners:c=!1,excludeKeys:t}=a,l=e(()=>(t?.value||[]).concat(i)),s=u();return s?e(()=>{var n;return o(Object.entries((n=s.proxy)==null?void 0:n.$attrs).filter(([r])=>!l.value.includes(r)&&!(c&&E.test(r))))}):e(()=>({}))};export{f as u};
@@ -1,4 +1,4 @@
1
- import{aN as te,bh as Pe,aM as Te,aj as Fe,ap as de,c9 as Ce,al as $,c as E,_ as De,d as Y,bG as ce,bo as ze,a as qe,aw as re,am as Ue,ca as Ge,cb as xe,b as Je,o as pe,r as k,n as G,e as x,aL as Ke,bN as st,an as ne,bE as ot,av as Ze,ao as Ye,bU as ft,k as ie,F as lt,bc as He,aF as ve,u as ut,aW as dt,cc as ct,bn as Se,cd as fe,t as Ae,j as le,i as pt,y as je,b8 as vt,f as Re,D as mt,x as Ne,ce as ht,w as gt,g as yt}from"./index-BDnu8Rx2.js";import{c as me}from"./castArray-B7L7jPOI.js";import{b as bt}from"./typescript-DhyxNYRx.js";import{b as wt}from"./_baseClone-DyBfXBsi.js";var Ft=4;function Ve(i){return wt(i,Ft)}const qt=Fe({size:{type:String,values:Ce},disabled:Boolean}),xt=Fe({...qt,model:Object,rules:{type:de(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean],default:!0}}),Ot={validate:(i,e,t)=>(te(i)||Pe(i))&&Te(e)&&Pe(t)};function Et(){const i=$([]),e=E(()=>{if(!i.value.length)return"0";const a=Math.max(...i.value);return a?`${a}px`:""});function t(a){const s=i.value.indexOf(a);return s===-1&&e.value,s}function r(a,s){if(a&&s){const o=t(s);i.value.splice(o,1,a)}else a&&i.value.push(a)}function n(a){const s=t(a);s>-1&&i.value.splice(s,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:n}}const Q=(i,e)=>{const t=me(e).map(r=>te(r)?r.join("."):r);return t.length>0?i.filter(r=>r.propString&&t.includes(r.propString)):i},_t="ElForm",Pt=Y({name:_t}),St=Y({...Pt,props:xt,emits:Ot,setup(i,{expose:e,emit:t}){const r=i,n=$(),a=ce([]),s=ze(),o=qe("form"),u=E(()=>{const{labelPosition:l,inline:m}=r;return[o.b(),o.m(s.value||"default"),{[o.m(`label-${l}`)]:l,[o.m("inline")]:m}]}),w=l=>Q(a,[l])[0],p=l=>{a.push(l)},g=l=>{l.prop&&a.splice(a.indexOf(l),1)},F=(l=[])=>{r.model&&Q(a,l).forEach(m=>m.resetField())},O=(l=[])=>{Q(a,l).forEach(m=>m.clearValidate())},S=E(()=>!!r.model),c=l=>{if(a.length===0)return[];const m=Q(a,l);return m.length?m:[]},y=async l=>j(void 0,l),f=async(l=[])=>{if(!S.value)return!1;const m=c(l);if(m.length===0)return!0;let b={};for(const R of m)try{await R.validate(""),R.validateState==="error"&&R.resetField()}catch(_){b={...b,..._}}return Object.keys(b).length===0?!0:Promise.reject(b)},j=async(l=[],m)=>{let b=!1;const R=!Ke(m);try{return b=await f(l),b===!0&&await m?.(b),b}catch(_){if(_ instanceof Error)throw _;const W=_;if(r.scrollToError&&n.value){const B=n.value.querySelector(`.${o.b()}-item.is-error`);B?.scrollIntoView(r.scrollIntoViewOptions)}return!b&&await m?.(!1,W),R&&Promise.reject(W)}},v=l=>{var m;const b=w(l);b&&((m=b.$el)==null||m.scrollIntoView(r.scrollIntoViewOptions))};return re(()=>r.rules,()=>{r.validateOnRuleChange&&y().catch(l=>st())},{deep:!0,flush:"post"}),Ue(xe,ce({...Ge(r),emit:t,resetFields:F,clearValidate:O,validateField:j,getField:w,addField:p,removeField:g,...Et()})),e({validate:y,validateField:j,resetFields:F,clearValidate:O,scrollToField:v,getField:w,fields:a}),(l,m)=>(pe(),Je("form",{ref_key:"formRef",ref:n,class:G(x(u))},[k(l.$slots,"default")],2))}});var At=De(St,[["__file","form.vue"]]);function T(){return T=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},T.apply(this,arguments)}function jt(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,Z(i,e)}function he(i){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},he(i)}function Z(i,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Z(i,e)}function Rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ee(i,e,t){return Rt()?ee=Reflect.construct.bind():ee=function(n,a,s){var o=[null];o.push.apply(o,a);var u=Function.bind.apply(n,o),w=new u;return s&&Z(w,s.prototype),w},ee.apply(null,arguments)}function Nt(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function ge(i){var e=typeof Map=="function"?new Map:void 0;return ge=function(r){if(r===null||!Nt(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,n)}function n(){return ee(r,arguments,he(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Z(n,r)},ge(i)}var Vt=/%[sdj%]/g,Mt=function(){};function ye(i){if(!i||!i.length)return null;var e={};return i.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function M(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var n=0,a=t.length;if(typeof i=="function")return i.apply(null,t);if(typeof i=="string"){var s=i.replace(Vt,function(o){if(o==="%%")return"%";if(n>=a)return o;switch(o){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch{return"[Circular]"}break;default:return o}});return s}return i}function Wt(i){return i==="string"||i==="url"||i==="hex"||i==="email"||i==="date"||i==="pattern"}function P(i,e){return!!(i==null||e==="array"&&Array.isArray(i)&&!i.length||Wt(e)&&typeof i=="string"&&!i)}function It(i,e,t){var r=[],n=0,a=i.length;function s(o){r.push.apply(r,o||[]),n++,n===a&&t(r)}i.forEach(function(o){e(o,s)})}function Me(i,e,t){var r=0,n=i.length;function a(s){if(s&&s.length){t(s);return}var o=r;r=r+1,o<n?e(i[o],a):t([])}a([])}function Lt(i){var e=[];return Object.keys(i).forEach(function(t){e.push.apply(e,i[t]||[])}),e}var We=function(i){jt(e,i);function e(t,r){var n;return n=i.call(this,"Async Validation Error")||this,n.errors=t,n.fields=r,n}return e}(ge(Error));function $t(i,e,t,r,n){if(e.first){var a=new Promise(function(F,O){var S=function(f){return r(f),f.length?O(new We(f,ye(f))):F(n)},c=Lt(i);Me(c,t,S)});return a.catch(function(F){return F}),a}var s=e.firstFields===!0?Object.keys(i):e.firstFields||[],o=Object.keys(i),u=o.length,w=0,p=[],g=new Promise(function(F,O){var S=function(y){if(p.push.apply(p,y),w++,w===u)return r(p),p.length?O(new We(p,ye(p))):F(n)};o.length||(r(p),F(n)),o.forEach(function(c){var y=i[c];s.indexOf(c)!==-1?Me(y,t,S):It(y,t,S)})});return g.catch(function(F){return F}),g}function Bt(i){return!!(i&&i.message!==void 0)}function Tt(i,e){for(var t=i,r=0;r<e.length;r++){if(t==null)return t;t=t[e[r]]}return t}function Ie(i,e){return function(t){var r;return i.fullFields?r=Tt(e,i.fullFields):r=e[t.field||i.fullField],Bt(t)?(t.field=t.field||i.fullField,t.fieldValue=r,t):{message:typeof t=="function"?t():t,fieldValue:r,field:t.field||i.fullField}}}function Le(i,e){if(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r=="object"&&typeof i[t]=="object"?i[t]=T({},i[t],r):i[t]=r}}return i}var Qe=function(e,t,r,n,a,s){e.required&&(!r.hasOwnProperty(e.field)||P(t,s||e.type))&&n.push(M(a.messages.required,e.fullField))},Ct=function(e,t,r,n,a){(/^\s+$/.test(t)||t==="")&&n.push(M(a.messages.whitespace,e.fullField))},X,Dt=function(){if(X)return X;var i="[a-fA-F\\d:]",e=function(l){return l&&l.includeBoundaries?"(?:(?<=\\s|^)(?="+i+")|(?<="+i+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",n=(`
1
+ import{aN as te,bh as Pe,aM as Te,aj as Fe,ap as de,c9 as Ce,al as $,c as E,_ as De,d as Y,bG as ce,bo as ze,a as qe,aw as re,am as Ue,ca as Ge,cb as xe,b as Je,o as pe,r as k,n as G,e as x,aL as Ke,bN as st,an as ne,bE as ot,av as Ze,ao as Ye,bU as ft,k as ie,F as lt,bc as He,aF as ve,u as ut,aW as dt,cc as ct,bn as Se,cd as fe,t as Ae,j as le,i as pt,y as je,b8 as vt,f as Re,D as mt,x as Ne,ce as ht,w as gt,g as yt}from"./index-DI_C3Ao9.js";import{c as me}from"./castArray-DVyev9bJ.js";import{b as bt}from"./typescript-8pw9sVHl.js";import{b as wt}from"./_baseClone-2NfMeWJP.js";var Ft=4;function Ve(i){return wt(i,Ft)}const qt=Fe({size:{type:String,values:Ce},disabled:Boolean}),xt=Fe({...qt,model:Object,rules:{type:de(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:[Object,Boolean],default:!0}}),Ot={validate:(i,e,t)=>(te(i)||Pe(i))&&Te(e)&&Pe(t)};function Et(){const i=$([]),e=E(()=>{if(!i.value.length)return"0";const a=Math.max(...i.value);return a?`${a}px`:""});function t(a){const s=i.value.indexOf(a);return s===-1&&e.value,s}function r(a,s){if(a&&s){const o=t(s);i.value.splice(o,1,a)}else a&&i.value.push(a)}function n(a){const s=t(a);s>-1&&i.value.splice(s,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:n}}const Q=(i,e)=>{const t=me(e).map(r=>te(r)?r.join("."):r);return t.length>0?i.filter(r=>r.propString&&t.includes(r.propString)):i},_t="ElForm",Pt=Y({name:_t}),St=Y({...Pt,props:xt,emits:Ot,setup(i,{expose:e,emit:t}){const r=i,n=$(),a=ce([]),s=ze(),o=qe("form"),u=E(()=>{const{labelPosition:l,inline:m}=r;return[o.b(),o.m(s.value||"default"),{[o.m(`label-${l}`)]:l,[o.m("inline")]:m}]}),w=l=>Q(a,[l])[0],p=l=>{a.push(l)},g=l=>{l.prop&&a.splice(a.indexOf(l),1)},F=(l=[])=>{r.model&&Q(a,l).forEach(m=>m.resetField())},O=(l=[])=>{Q(a,l).forEach(m=>m.clearValidate())},S=E(()=>!!r.model),c=l=>{if(a.length===0)return[];const m=Q(a,l);return m.length?m:[]},y=async l=>j(void 0,l),f=async(l=[])=>{if(!S.value)return!1;const m=c(l);if(m.length===0)return!0;let b={};for(const R of m)try{await R.validate(""),R.validateState==="error"&&R.resetField()}catch(_){b={...b,..._}}return Object.keys(b).length===0?!0:Promise.reject(b)},j=async(l=[],m)=>{let b=!1;const R=!Ke(m);try{return b=await f(l),b===!0&&await m?.(b),b}catch(_){if(_ instanceof Error)throw _;const W=_;if(r.scrollToError&&n.value){const B=n.value.querySelector(`.${o.b()}-item.is-error`);B?.scrollIntoView(r.scrollIntoViewOptions)}return!b&&await m?.(!1,W),R&&Promise.reject(W)}},v=l=>{var m;const b=w(l);b&&((m=b.$el)==null||m.scrollIntoView(r.scrollIntoViewOptions))};return re(()=>r.rules,()=>{r.validateOnRuleChange&&y().catch(l=>st())},{deep:!0,flush:"post"}),Ue(xe,ce({...Ge(r),emit:t,resetFields:F,clearValidate:O,validateField:j,getField:w,addField:p,removeField:g,...Et()})),e({validate:y,validateField:j,resetFields:F,clearValidate:O,scrollToField:v,getField:w,fields:a}),(l,m)=>(pe(),Je("form",{ref_key:"formRef",ref:n,class:G(x(u))},[k(l.$slots,"default")],2))}});var At=De(St,[["__file","form.vue"]]);function T(){return T=Object.assign?Object.assign.bind():function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i},T.apply(this,arguments)}function jt(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,Z(i,e)}function he(i){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},he(i)}function Z(i,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Z(i,e)}function Rt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ee(i,e,t){return Rt()?ee=Reflect.construct.bind():ee=function(n,a,s){var o=[null];o.push.apply(o,a);var u=Function.bind.apply(n,o),w=new u;return s&&Z(w,s.prototype),w},ee.apply(null,arguments)}function Nt(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function ge(i){var e=typeof Map=="function"?new Map:void 0;return ge=function(r){if(r===null||!Nt(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,n)}function n(){return ee(r,arguments,he(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Z(n,r)},ge(i)}var Vt=/%[sdj%]/g,Mt=function(){};function ye(i){if(!i||!i.length)return null;var e={};return i.forEach(function(t){var r=t.field;e[r]=e[r]||[],e[r].push(t)}),e}function M(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];var n=0,a=t.length;if(typeof i=="function")return i.apply(null,t);if(typeof i=="string"){var s=i.replace(Vt,function(o){if(o==="%%")return"%";if(n>=a)return o;switch(o){case"%s":return String(t[n++]);case"%d":return Number(t[n++]);case"%j":try{return JSON.stringify(t[n++])}catch{return"[Circular]"}break;default:return o}});return s}return i}function Wt(i){return i==="string"||i==="url"||i==="hex"||i==="email"||i==="date"||i==="pattern"}function P(i,e){return!!(i==null||e==="array"&&Array.isArray(i)&&!i.length||Wt(e)&&typeof i=="string"&&!i)}function It(i,e,t){var r=[],n=0,a=i.length;function s(o){r.push.apply(r,o||[]),n++,n===a&&t(r)}i.forEach(function(o){e(o,s)})}function Me(i,e,t){var r=0,n=i.length;function a(s){if(s&&s.length){t(s);return}var o=r;r=r+1,o<n?e(i[o],a):t([])}a([])}function Lt(i){var e=[];return Object.keys(i).forEach(function(t){e.push.apply(e,i[t]||[])}),e}var We=function(i){jt(e,i);function e(t,r){var n;return n=i.call(this,"Async Validation Error")||this,n.errors=t,n.fields=r,n}return e}(ge(Error));function $t(i,e,t,r,n){if(e.first){var a=new Promise(function(F,O){var S=function(f){return r(f),f.length?O(new We(f,ye(f))):F(n)},c=Lt(i);Me(c,t,S)});return a.catch(function(F){return F}),a}var s=e.firstFields===!0?Object.keys(i):e.firstFields||[],o=Object.keys(i),u=o.length,w=0,p=[],g=new Promise(function(F,O){var S=function(y){if(p.push.apply(p,y),w++,w===u)return r(p),p.length?O(new We(p,ye(p))):F(n)};o.length||(r(p),F(n)),o.forEach(function(c){var y=i[c];s.indexOf(c)!==-1?Me(y,t,S):It(y,t,S)})});return g.catch(function(F){return F}),g}function Bt(i){return!!(i&&i.message!==void 0)}function Tt(i,e){for(var t=i,r=0;r<e.length;r++){if(t==null)return t;t=t[e[r]]}return t}function Ie(i,e){return function(t){var r;return i.fullFields?r=Tt(e,i.fullFields):r=e[t.field||i.fullField],Bt(t)?(t.field=t.field||i.fullField,t.fieldValue=r,t):{message:typeof t=="function"?t():t,fieldValue:r,field:t.field||i.fullField}}}function Le(i,e){if(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r=="object"&&typeof i[t]=="object"?i[t]=T({},i[t],r):i[t]=r}}return i}var Qe=function(e,t,r,n,a,s){e.required&&(!r.hasOwnProperty(e.field)||P(t,s||e.type))&&n.push(M(a.messages.required,e.fullField))},Ct=function(e,t,r,n,a){(/^\s+$/.test(t)||t==="")&&n.push(M(a.messages.whitespace,e.fullField))},X,Dt=function(){if(X)return X;var i="[a-fA-F\\d:]",e=function(l){return l&&l.includeBoundaries?"(?:(?<=\\s|^)(?="+i+")|(?<="+i+")(?=\\s|$))":""},t="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",n=(`
2
2
  (?:
3
3
  (?:`+r+":){7}(?:"+r+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
4
4
  (?:`+r+":){6}(?:"+t+"|:"+r+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
@@ -1 +1 @@
1
- import{aC as tt,al as E,c as u,aj as al,an as ge,bE as nt,as as F,d0 as at,cZ as X,aw as j,aK as ye,_ as Se,d as re,J as ae,K as ke,b as I,o as g,r as k,t as V,x as W,ah as B,n as v,a as se,aW as ol,e as Ee,ca as De,bG as ie,ao as sl,bc as H,y as M,f as he,av as Re,b1 as ot,d2 as st,aN as P,ck as it,bo as rt,bF as be,bx as Ze,bJ as ut,aL as ne,bN as Xe,d3 as dt,ch as Z,aI as ct,cs as pt,cg as il,aB as ft,ak as vt,bh as mt,d4 as bt,ap as le,d5 as Ye,A as ht,bI as _e,cn as gt,bS as yt,l as G,cN as St,k as q,j as L,i as A,F as xe,v as el,D as ll,c8 as te,d6 as Ct,b8 as Ve,d7 as Ot,E as wt,c7 as It,am as rl,bK as Et,cz as Vt,w as ul,g as Tt}from"./index-BDnu8Rx2.js";import{u as tl,b as kt,E as Dt}from"./index-BjeXTDuD.js";import{s as Rt,E as Mt}from"./index-KXI5e-q0.js";import{e as $t}from"./strings-DEKOZWkP.js";import{c as U}from"./castArray-B7L7jPOI.js";import{i as oe}from"./isEqual-oRaCHLap.js";import{b as Q,d as Lt}from"./typescript-DhyxNYRx.js";import{u as Nt,a as Bt}from"./use-form-item-B7j42EP5.js";import{u as Wt,a as Ft}from"./index-BHstLZkN.js";import{d as Pt}from"./debounce-BXWQzEeG.js";import{b as zt}from"./_baseIteratee-B9I0pDUN.js";import{u as Kt}from"./index-DZxnN0Hy.js";import{C as At}from"./index-BqB8EtmR.js";function Ht(e,o,a,m){e.length;for(var c=a+1;c--;)if(o(e[c],c,e))return c;return-1}function Ut(e,o,a){var m=e==null?0:e.length;if(!m)return-1;var c=m-1;return Ht(e,zt(o),c)}function jt(){const e=tt(),o=E(0),a=11,m=u(()=>({minWidth:`${Math.max(o.value,a)}px`}));return Q(e,()=>{var S,t;o.value=(t=(S=e.value)==null?void 0:S.getBoundingClientRect().width)!=null?t:0}),{calculatorRef:e,calculatorWidth:o,inputStyle:m}}const dl=Symbol("ElSelectGroup"),Ce=Symbol("ElSelect"),Te="ElOption",Gt=al({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function qt(e,o){const a=ge(Ce);a||nt(Te,"usage: <el-select><el-option /></el-select/>");const m=ge(dl,{disabled:!1}),c=u(()=>f(U(a.props.modelValue),e.value)),S=u(()=>{var s;if(a.props.multiple){const p=U((s=a.props.modelValue)!=null?s:[]);return!c.value&&p.length>=a.props.multipleLimit&&a.props.multipleLimit>0}else return!1}),t=u(()=>{var s;return(s=e.label)!=null?s:F(e.value)?"":e.value}),C=u(()=>e.value||e.label||""),h=u(()=>e.disabled||o.groupDisabled||S.value),b=ye(),f=(s=[],p)=>{if(F(e.value)){const w=a.props.valueKey;return s&&s.some(T=>at(X(T,w))===X(p,w))}else return s&&s.includes(p)},d=()=>{!e.disabled&&!m.disabled&&(a.states.hoveringIndex=a.optionsArray.indexOf(b.proxy))},i=s=>{const p=new RegExp($t(s),"i");o.visible=p.test(String(t.value))||e.created};return j(()=>t.value,()=>{!e.created&&!a.props.remote&&a.setSelected()}),j(()=>e.value,(s,p)=>{const{remote:w,valueKey:T}=a.props;if((w?s!==p:!oe(s,p))&&(a.onOptionDestroy(p,b.proxy),a.onOptionCreate(b.proxy)),!e.created&&!w){if(T&&F(s)&&F(p)&&s[T]===p[T])return;a.setSelected()}}),j(()=>m.disabled,()=>{o.groupDisabled=m.disabled},{immediate:!0}),{select:a,currentLabel:t,currentValue:C,itemSelected:c,isDisabled:h,hoverItem:d,updateOption:i}}const Qt=re({name:Te,componentName:Te,props:Gt,setup(e){const o=se("select"),a=ol(),m=u(()=>[o.be("dropdown","item"),o.is("disabled",Ee(C)),o.is("selected",Ee(t)),o.is("hovering",Ee(i))]),c=ie({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:S,itemSelected:t,isDisabled:C,select:h,hoverItem:b,updateOption:f}=qt(e,c),{visible:d,hover:i}=De(c),s=ye().proxy;h.onOptionCreate(s),sl(()=>{const w=s.value,{selected:T}=h.states,D=T.some(y=>y.value===s.value);H(()=>{h.states.cachedOptions.get(w)===s&&!D&&h.states.cachedOptions.delete(w)}),h.onOptionDestroy(w,s)});function p(){C.value||h.handleOptionSelect(s)}return{ns:o,id:a,containerKls:m,currentLabel:S,itemSelected:t,isDisabled:C,select:h,visible:d,hover:i,states:c,hoverItem:b,updateOption:f,selectOptionClick:p}}});function Jt(e,o){return ae((g(),I("li",{id:e.id,class:v(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:B(e.selectOptionClick,["stop"])},[k(e.$slots,"default",{},()=>[V("span",null,W(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[ke,e.visible]])}var Me=Se(Qt,[["render",Jt],["__file","option.vue"]]);const Zt=re({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ge(Ce),o=se("select"),a=u(()=>e.props.popperClass),m=u(()=>e.props.multiple),c=u(()=>e.props.fitInputWidth),S=E("");function t(){var C;S.value=`${(C=e.selectRef)==null?void 0:C.offsetWidth}px`}return Re(()=>{t(),Q(e.selectRef,t)}),{ns:o,minWidth:S,popperClass:a,isMultiple:m,isFitInputWidth:c}}});function Xt(e,o,a,m,c,S){return g(),I("div",{class:v([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:he({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(g(),I("div",{key:0,class:v(e.ns.be("dropdown","header"))},[k(e.$slots,"header")],2)):M("v-if",!0),k(e.$slots,"default"),e.$slots.footer?(g(),I("div",{key:1,class:v(e.ns.be("dropdown","footer"))},[k(e.$slots,"footer")],2)):M("v-if",!0)],6)}var Yt=Se(Zt,[["render",Xt],["__file","select-dropdown.vue"]]);const _t=(e,o)=>{const{t:a}=ot(),m=ol(),c=se("select"),S=se("input"),t=ie({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),C=E(),h=E(),b=E(),f=E(),d=E(),i=E(),s=E(),p=E(),w=E(),T=E(),D=E(),y=E(!1),N=E(),{form:ue,formItem:z}=Nt(),{inputId:pl}=Bt(e,{formItemContext:z}),{valueOnClear:fl,isEmptyValue:vl}=st(e),{isComposing:$e,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl}=Wt({afterComposition:l=>He(l)}),Y=u(()=>e.disabled||!!ue?.disabled),{wrapperRef:Le,isFocused:Ne,handleBlur:gl}=Ft(d,{disabled:Y,afterFocus(){e.automaticDropdown&&!y.value&&(y.value=!0,t.menuVisibleOnFocus=!0)},beforeBlur(l){var n,r;return((n=b.value)==null?void 0:n.isFocusInsideContent(l))||((r=f.value)==null?void 0:r.isFocusInsideContent(l))},afterBlur(){var l;y.value=!1,t.menuVisibleOnFocus=!1,e.validateEvent&&((l=z?.validate)==null||l.call(z,"blur").catch(n=>Xe()))}}),Oe=u(()=>P(e.modelValue)?e.modelValue.length>0:!vl(e.modelValue)),yl=u(()=>{var l;return(l=ue?.statusIcon)!=null?l:!1}),Sl=u(()=>e.clearable&&!Y.value&&t.inputHovering&&Oe.value),Be=u(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Cl=u(()=>c.is("reverse",!!(Be.value&&y.value))),we=u(()=>z?.validateState||""),Ol=u(()=>we.value&&it[we.value]),wl=u(()=>e.remote?300:0),Il=u(()=>e.remote&&!t.inputValue&&t.options.size===0),El=u(()=>e.loading?e.loadingText||a("el.select.loading"):e.filterable&&t.inputValue&&t.options.size>0&&_.value===0?e.noMatchText||a("el.select.noMatch"):t.options.size===0?e.noDataText||a("el.select.noData"):null),_=u(()=>R.value.filter(l=>l.visible).length),R=u(()=>{const l=Array.from(t.options.values()),n=[];return t.optionValues.forEach(r=>{const O=l.findIndex($=>$.value===r);O>-1&&n.push(l[O])}),n.length>=l.length?n:l}),Vl=u(()=>Array.from(t.cachedOptions.values())),Tl=u(()=>{const l=R.value.filter(n=>!n.created).some(n=>n.currentLabel===t.inputValue);return e.filterable&&e.allowCreate&&t.inputValue!==""&&!l}),We=()=>{e.filterable&&ne(e.filterMethod)||e.filterable&&e.remote&&ne(e.remoteMethod)||R.value.forEach(l=>{var n;(n=l.updateOption)==null||n.call(l,t.inputValue)})},Fe=rt(),kl=u(()=>["small"].includes(Fe.value)?"small":"default"),Dl=u({get(){return y.value&&!Il.value},set(l){y.value=l}}),Rl=u(()=>{if(e.multiple&&!be(e.modelValue))return U(e.modelValue).length===0&&!t.inputValue;const l=P(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||be(l)?!t.inputValue:!0}),Ml=u(()=>{var l;const n=(l=e.placeholder)!=null?l:a("el.select.placeholder");return e.multiple||!Oe.value?n:t.selectedLabel}),$l=u(()=>Ze?null:"mouseenter");j(()=>e.modelValue,(l,n)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(t.inputValue="",de("")),ce(),!oe(l,n)&&e.validateEvent&&z?.validate("change").catch(r=>Xe())},{flush:"post",deep:!0}),j(()=>y.value,l=>{l?de(t.inputValue):(t.inputValue="",t.previousQuery=null,t.isBeforeHide=!0),o("visible-change",l)}),j(()=>t.options.entries(),()=>{ft&&(ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value&&Pe())},{flush:"post"}),j([()=>t.hoveringIndex,R],([l])=>{vt(l)&&l>-1?N.value=R.value[l]||{}:N.value={},R.value.forEach(n=>{n.hover=N.value===n})}),ut(()=>{t.isBeforeHide||We()});const de=l=>{t.previousQuery===l||$e.value||(t.previousQuery=l,e.filterable&&ne(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&ne(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value?H(Pe):H(Ll))},Pe=()=>{const l=R.value.filter($=>$.visible&&!$.disabled&&!$.states.groupDisabled),n=l.find($=>$.created),r=l[0],O=R.value.map($=>$.value);t.hoveringIndex=qe(O,n||r)},ce=()=>{if(e.multiple)t.selectedLabel="";else{const n=P(e.modelValue)?e.modelValue[0]:e.modelValue,r=ze(n);t.selectedLabel=r.currentLabel,t.selected=[r];return}const l=[];be(e.modelValue)||U(e.modelValue).forEach(n=>{l.push(ze(n))}),t.selected=l},ze=l=>{let n;const r=pt(l);for(let J=t.cachedOptions.size-1;J>=0;J--){const K=Vl.value[J];if(r?X(K.value,e.valueKey)===X(l,e.valueKey):K.value===l){n={value:l,currentLabel:K.currentLabel,get isDisabled(){return K.isDisabled}};break}}if(n)return n;const O=r?l.label:l??"";return{value:l,currentLabel:O}},Ll=()=>{t.hoveringIndex=R.value.findIndex(l=>t.selected.some(n=>ve(n)===ve(l)))},Nl=()=>{t.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},Bl=()=>{t.collapseItemWidth=T.value.getBoundingClientRect().width},Ie=()=>{var l,n;(n=(l=b.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ke=()=>{var l,n;(n=(l=f.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ae=()=>{t.inputValue.length>0&&!y.value&&(y.value=!0),de(t.inputValue)},He=l=>{if(t.inputValue=l.target.value,e.remote)Ue();else return Ae()},Ue=Pt(()=>{Ae()},wl.value),x=l=>{oe(e.modelValue,l)||o(il,l)},Wl=l=>Ut(l,n=>{const r=t.cachedOptions.get(n);return r&&!r.disabled&&!r.states.groupDisabled}),Fl=l=>{if(e.multiple&&l.code!==ct.delete&&l.target.value.length<=0){const n=U(e.modelValue).slice(),r=Wl(n);if(r<0)return;const O=n[r];n.splice(r,1),o(Z,n),x(n),o("remove-tag",O)}},Pl=(l,n)=>{const r=t.selected.indexOf(n);if(r>-1&&!Y.value){const O=U(e.modelValue).slice();O.splice(r,1),o(Z,O),x(O),o("remove-tag",n.value)}l.stopPropagation(),fe()},je=l=>{l.stopPropagation();const n=e.multiple?[]:fl.value;if(e.multiple)for(const r of t.selected)r.isDisabled&&n.push(r.value);o(Z,n),x(n),t.hoveringIndex=-1,y.value=!1,o("clear"),fe()},Ge=l=>{var n;if(e.multiple){const r=U((n=e.modelValue)!=null?n:[]).slice(),O=qe(r,l);O>-1?r.splice(O,1):(e.multipleLimit<=0||r.length<e.multipleLimit)&&r.push(l.value),o(Z,r),x(r),l.created&&de(""),e.filterable&&!e.reserveKeyword&&(t.inputValue="")}else o(Z,l.value),x(l.value),y.value=!1;fe(),!y.value&&H(()=>{pe(l)})},qe=(l,n)=>be(n)?-1:F(n.value)?l.findIndex(r=>oe(X(r,e.valueKey),ve(n))):l.indexOf(n.value),pe=l=>{var n,r,O,$,J;const K=P(l)?l[0]:l;let me=null;if(K?.value){const ee=R.value.filter(lt=>lt.value===K.value);ee.length>0&&(me=ee[0].$el)}if(b.value&&me){const ee=($=(O=(r=(n=b.value)==null?void 0:n.popperRef)==null?void 0:r.contentRef)==null?void 0:O.querySelector)==null?void 0:$.call(O,`.${c.be("dropdown","wrap")}`);ee&&dt(ee,me)}(J=D.value)==null||J.handleScroll()},zl=l=>{t.options.set(l.value,l),t.cachedOptions.set(l.value,l)},Kl=(l,n)=>{t.options.get(l)===n&&t.options.delete(l)},Al=u(()=>{var l,n;return(n=(l=b.value)==null?void 0:l.popperRef)==null?void 0:n.contentRef}),Hl=()=>{t.isBeforeHide=!1,H(()=>{var l;(l=D.value)==null||l.update(),pe(t.selected)})},fe=()=>{var l;(l=d.value)==null||l.focus()},Ul=()=>{var l;if(y.value){y.value=!1,H(()=>{var n;return(n=d.value)==null?void 0:n.blur()});return}(l=d.value)==null||l.blur()},jl=l=>{je(l)},Gl=l=>{if(y.value=!1,Ne.value){const n=new FocusEvent("focus",l);H(()=>gl(n))}},ql=()=>{t.inputValue.length>0?t.inputValue="":y.value=!1},Qe=()=>{Y.value||(Ze&&(t.inputHovering=!0),t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:y.value=!y.value)},Ql=()=>{if(!y.value)Qe();else{const l=R.value[t.hoveringIndex];l&&!l.isDisabled&&Ge(l)}},ve=l=>F(l.value)?X(l.value,e.valueKey):l.value,Jl=u(()=>R.value.filter(l=>l.visible).every(l=>l.isDisabled)),Zl=u(()=>e.multiple?e.collapseTags?t.selected.slice(0,e.maxCollapseTags):t.selected:[]),Xl=u(()=>e.multiple?e.collapseTags?t.selected.slice(e.maxCollapseTags):[]:[]),Je=l=>{if(!y.value){y.value=!0;return}if(!(t.options.size===0||_.value===0||$e.value)&&!Jl.value){l==="next"?(t.hoveringIndex++,t.hoveringIndex===t.options.size&&(t.hoveringIndex=0)):l==="prev"&&(t.hoveringIndex--,t.hoveringIndex<0&&(t.hoveringIndex=t.options.size-1));const n=R.value[t.hoveringIndex];(n.isDisabled||!n.visible)&&Je(l),H(()=>pe(N.value))}},Yl=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},_l=u(()=>{const l=Yl();return{maxWidth:`${T.value&&e.maxCollapseTags===1?t.selectionWidth-t.collapseItemWidth-l:t.selectionWidth}px`}}),xl=u(()=>({maxWidth:`${t.selectionWidth}px`})),et=l=>{o("popup-scroll",l)};return Q(h,Nl),Q(p,Ie),Q(Le,Ie),Q(w,Ke),Q(T,Bl),Re(()=>{ce()}),{inputId:pl,contentId:m,nsSelect:c,nsInput:S,states:t,isFocused:Ne,expanded:y,optionsArray:R,hoverOption:N,selectSize:Fe,filteredOptionsCount:_,updateTooltip:Ie,updateTagTooltip:Ke,debouncedOnInputChange:Ue,onInput:He,deletePrevTag:Fl,deleteTag:Pl,deleteSelected:je,handleOptionSelect:Ge,scrollToOption:pe,hasModelValue:Oe,shouldShowPlaceholder:Rl,currentPlaceholder:Ml,mouseEnterEventName:$l,needStatusIcon:yl,showClose:Sl,iconComponent:Be,iconReverse:Cl,validateState:we,validateIcon:Ol,showNewOption:Tl,updateOptions:We,collapseTagSize:kl,setSelected:ce,selectDisabled:Y,emptyText:El,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl,onOptionCreate:zl,onOptionDestroy:Kl,handleMenuEnter:Hl,focus:fe,blur:Ul,handleClearClick:jl,handleClickOutside:Gl,handleEsc:ql,toggleMenu:Qe,selectOption:Ql,getValueKey:ve,navigateOptions:Je,dropdownMenuVisible:Dl,showTagList:Zl,collapseTagList:Xl,popupScroll:et,tagStyle:_l,collapseTagStyle:xl,popperRef:Al,inputRef:d,tooltipRef:b,tagTooltipRef:f,prefixRef:i,suffixRef:s,selectRef:C,wrapperRef:Le,selectionRef:h,scrollbarRef:D,menuRef:p,tagMenuRef:w,collapseItemRef:T}};var xt=re({name:"ElOptions",setup(e,{slots:o}){const a=ge(Ce);let m=[];return()=>{var c,S;const t=(c=o.default)==null?void 0:c.call(o),C=[];function h(b){P(b)&&b.forEach(f=>{var d,i,s,p;const w=(d=f?.type||{})==null?void 0:d.name;w==="ElOptionGroup"?h(!mt(f.children)&&!P(f.children)&&ne((i=f.children)==null?void 0:i.default)?(s=f.children)==null?void 0:s.default():f.children):w==="ElOption"?C.push((p=f.props)==null?void 0:p.value):P(f.children)&&h(f.children)})}return t.length&&h((S=t[0])==null?void 0:S.children),oe(C,m)||(m=C,a&&(a.states.optionValues=C)),t}}});const en=al({name:String,id:String,modelValue:{type:le([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:yt,effect:{type:le(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:le(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:Boolean,maxCollapseTags:{type:Number,default:1},teleported:tl.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:_e,default:gt},fitInputWidth:Boolean,suffixIcon:{type:_e,default:ht},tagType:{...Ye.type,default:"info"},tagEffect:{...Ye.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:le(String),values:kt,default:"bottom-start"},fallbackPlacements:{type:le(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:tl.appendTo,...bt,...Kt(["ariaLabel"])});Rt.scroll;const nl="ElSelect",ln=re({name:nl,componentName:nl,components:{ElSelectMenu:Yt,ElOption:Me,ElOptions:xt,ElTag:It,ElScrollbar:Mt,ElTooltip:Dt,ElIcon:wt},directives:{ClickOutside:At},props:en,emits:[Z,il,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:o,slots:a}){const m=ye();m.appContext.config.warnHandler=(...i)=>{!i[0]||i[0].includes('Slot "default" invoked outside of the render function')||console.warn(...i)};const c=u(()=>{const{modelValue:i,multiple:s}=e,p=s?[]:void 0;return P(i)?s?i:p:s?p:i}),S=ie({...De(e),modelValue:c}),t=_t(S,o),{calculatorRef:C,inputStyle:h}=jt(),b=i=>i.reduce((s,p)=>(s.push(p),p.children&&p.children.length>0&&s.push(...b(p.children)),s),[]),f=i=>{Et(i||[]).forEach(p=>{var w;if(F(p)&&(p.type.name==="ElOption"||p.type.name==="ElTree")){const T=p.type.name;if(T==="ElTree"){const D=((w=p.props)==null?void 0:w.data)||[];b(D).forEach(N=>{N.currentLabel=N.label||(F(N.value)?"":N.value),t.onOptionCreate(N)})}else if(T==="ElOption"){const D={...p.props};D.currentLabel=D.label||(F(D.value)?"":D.value),t.onOptionCreate(D)}}})};j(()=>{var i;return(i=a.default)==null?void 0:i.call(a)},i=>{e.persistent||f(i)},{immediate:!0}),rl(Ce,ie({props:S,states:t.states,selectRef:t.selectRef,optionsArray:t.optionsArray,setSelected:t.setSelected,handleOptionSelect:t.handleOptionSelect,onOptionCreate:t.onOptionCreate,onOptionDestroy:t.onOptionDestroy}));const d=u(()=>e.multiple?t.states.selected.map(i=>i.currentLabel):t.states.selectedLabel);return sl(()=>{m.appContext.config.warnHandler=void 0}),{...t,modelValue:c,selectedLabel:d,calculatorRef:C,inputStyle:h}}});function tn(e,o){const a=G("el-tag"),m=G("el-tooltip"),c=G("el-icon"),S=G("el-option"),t=G("el-options"),C=G("el-scrollbar"),h=G("el-select-menu"),b=St("click-outside");return ae((g(),I("div",{ref:"selectRef",class:v([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[Ot(e.mouseEnterEventName)]:f=>e.states.inputHovering=!0,onMouseleave:f=>e.states.inputHovering=!1},[q(m,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,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,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:f=>e.states.isBeforeHide=!1},{default:L(()=>{var f;return[V("div",{ref:"wrapperRef",class:v([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:B(e.toggleMenu,["prevent"])},[e.$slots.prefix?(g(),I("div",{key:0,ref:"prefixRef",class:v(e.nsSelect.e("prefix"))},[k(e.$slots,"prefix")],2)):M("v-if",!0),V("div",{ref:"selectionRef",class:v([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?k(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(g(!0),I(xe,null,el(e.showTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.tagStyle),onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(g(),A(m,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,teleported:e.teleported},{default:L(()=>[V("div",{ref:"collapseItemRef",class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.collapseTagStyle)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))}," + "+W(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:L(()=>[V("div",{ref:"tagMenuRef",class:v(e.nsSelect.e("selection"))},[(g(!0),I(xe,null,el(e.collapseTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):M("v-if",!0)]):M("v-if",!0),V("div",{class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[ae(V("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:v([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:he(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((f=e.hoverOption)==null?void 0:f.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[te(B(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),te(B(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),te(B(e.handleEsc,["stop","prevent"]),["esc"]),te(B(e.selectOption,["stop","prevent"]),["enter"]),te(B(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:B(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[Ct,e.states.inputValue]]),e.filterable?(g(),I("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:v(e.nsSelect.e("input-calculator")),textContent:W(e.states.inputValue)},null,10,["textContent"])):M("v-if",!0)],2),e.shouldShowPlaceholder?(g(),I("div",{key:1,class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?k(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[V("span",null,W(e.currentPlaceholder),1)]):(g(),I("span",{key:1},W(e.currentPlaceholder),1))],2)):M("v-if",!0)],2),V("div",{ref:"suffixRef",class:v(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(g(),A(c,{key:0,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:L(()=>[(g(),A(Ve(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),e.showClose&&e.clearIcon?(g(),A(c,{key:1,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:L(()=>[(g(),A(Ve(e.clearIcon)))]),_:1},8,["class","onClick"])):M("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(g(),A(c,{key:2,class:v([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:L(()=>[(g(),A(Ve(e.validateIcon)))]),_:1},8,["class"])):M("v-if",!0)],2)],10,["onClick"])]}),content:L(()=>[q(h,{ref:"menuRef"},{default:L(()=>[e.$slots.header?(g(),I("div",{key:0,class:v(e.nsSelect.be("dropdown","header")),onClick:B(()=>{},["stop"])},[k(e.$slots,"header")],10,["onClick"])):M("v-if",!0),ae(q(C,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:v([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:L(()=>[e.showNewOption?(g(),A(S,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):M("v-if",!0),q(t,null,{default:L(()=>[k(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[ke,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(g(),I("div",{key:1,class:v(e.nsSelect.be("dropdown","loading"))},[k(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(g(),I("div",{key:2,class:v(e.nsSelect.be("dropdown","empty"))},[k(e.$slots,"empty",{},()=>[V("span",null,W(e.emptyText),1)])],2)):M("v-if",!0),e.$slots.footer?(g(),I("div",{key:3,class:v(e.nsSelect.be("dropdown","footer")),onClick:B(()=>{},["stop"])},[k(e.$slots,"footer")],10,["onClick"])):M("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[b,e.handleClickOutside,e.popperRef]])}var nn=Se(ln,[["render",tn],["__file","select.vue"]]);const an=re({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const o=se("select"),a=E(),m=ye(),c=E([]);rl(dl,ie({...De(e)}));const S=u(()=>c.value.some(b=>b.visible===!0)),t=b=>{var f;return b.type.name==="ElOption"&&!!((f=b.component)!=null&&f.proxy)},C=b=>{const f=U(b),d=[];return f.forEach(i=>{var s;Vt(i)&&(t(i)?d.push(i.component.proxy):P(i.children)&&i.children.length?d.push(...C(i.children)):(s=i.component)!=null&&s.subTree&&d.push(...C(i.component.subTree)))}),d},h=()=>{c.value=C(m.subTree)};return Re(()=>{h()}),Lt(a,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:S,ns:o}}});function on(e,o,a,m,c,S){return ae((g(),I("ul",{ref:"groupRef",class:v(e.ns.be("group","wrap"))},[V("li",{class:v(e.ns.be("group","title"))},W(e.label),3),V("li",null,[V("ul",{class:v(e.ns.b("group"))},[k(e.$slots,"default")],2)])],2)),[[ke,e.visible]])}var cl=Se(an,[["render",on],["__file","option-group.vue"]]);const Sn=Tt(nn,{Option:Me,OptionGroup:cl}),Cn=ul(Me);ul(cl);export{Cn as E,Sn as a};
1
+ import{aC as tt,al as E,c as u,aj as al,an as ge,bE as nt,as as F,d0 as at,cZ as X,aw as j,aK as ye,_ as Se,d as re,J as ae,K as ke,b as I,o as g,r as k,t as V,x as W,ah as B,n as v,a as se,aW as ol,e as Ee,ca as De,bG as ie,ao as sl,bc as H,y as M,f as he,av as Re,b1 as ot,d2 as st,aN as P,ck as it,bo as rt,bF as be,bx as Ze,bJ as ut,aL as ne,bN as Xe,d3 as dt,ch as Z,aI as ct,cs as pt,cg as il,aB as ft,ak as vt,bh as mt,d4 as bt,ap as le,d5 as Ye,A as ht,bI as _e,cn as gt,bS as yt,l as G,cN as St,k as q,j as L,i as A,F as xe,v as el,D as ll,c8 as te,d6 as Ct,b8 as Ve,d7 as Ot,E as wt,c7 as It,am as rl,bK as Et,cz as Vt,w as ul,g as Tt}from"./index-DI_C3Ao9.js";import{u as tl,b as kt,E as Dt}from"./index-PU4oJo9l.js";import{s as Rt,E as Mt}from"./index-D-xE_DuU.js";import{e as $t}from"./strings-CKxhwaoH.js";import{c as U}from"./castArray-DVyev9bJ.js";import{i as oe}from"./isEqual-rNurVTiM.js";import{b as Q,d as Lt}from"./typescript-8pw9sVHl.js";import{u as Nt,a as Bt}from"./use-form-item-D6NQ9sNV.js";import{u as Wt,a as Ft}from"./index-DqzgaH2_.js";import{d as Pt}from"./debounce-Dnlkicc5.js";import{b as zt}from"./_baseIteratee-DrOJ5XUl.js";import{u as Kt}from"./index-sVUmFHgv.js";import{C as At}from"./index-bcWh3aiG.js";function Ht(e,o,a,m){e.length;for(var c=a+1;c--;)if(o(e[c],c,e))return c;return-1}function Ut(e,o,a){var m=e==null?0:e.length;if(!m)return-1;var c=m-1;return Ht(e,zt(o),c)}function jt(){const e=tt(),o=E(0),a=11,m=u(()=>({minWidth:`${Math.max(o.value,a)}px`}));return Q(e,()=>{var S,t;o.value=(t=(S=e.value)==null?void 0:S.getBoundingClientRect().width)!=null?t:0}),{calculatorRef:e,calculatorWidth:o,inputStyle:m}}const dl=Symbol("ElSelectGroup"),Ce=Symbol("ElSelect"),Te="ElOption",Gt=al({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function qt(e,o){const a=ge(Ce);a||nt(Te,"usage: <el-select><el-option /></el-select/>");const m=ge(dl,{disabled:!1}),c=u(()=>f(U(a.props.modelValue),e.value)),S=u(()=>{var s;if(a.props.multiple){const p=U((s=a.props.modelValue)!=null?s:[]);return!c.value&&p.length>=a.props.multipleLimit&&a.props.multipleLimit>0}else return!1}),t=u(()=>{var s;return(s=e.label)!=null?s:F(e.value)?"":e.value}),C=u(()=>e.value||e.label||""),h=u(()=>e.disabled||o.groupDisabled||S.value),b=ye(),f=(s=[],p)=>{if(F(e.value)){const w=a.props.valueKey;return s&&s.some(T=>at(X(T,w))===X(p,w))}else return s&&s.includes(p)},d=()=>{!e.disabled&&!m.disabled&&(a.states.hoveringIndex=a.optionsArray.indexOf(b.proxy))},i=s=>{const p=new RegExp($t(s),"i");o.visible=p.test(String(t.value))||e.created};return j(()=>t.value,()=>{!e.created&&!a.props.remote&&a.setSelected()}),j(()=>e.value,(s,p)=>{const{remote:w,valueKey:T}=a.props;if((w?s!==p:!oe(s,p))&&(a.onOptionDestroy(p,b.proxy),a.onOptionCreate(b.proxy)),!e.created&&!w){if(T&&F(s)&&F(p)&&s[T]===p[T])return;a.setSelected()}}),j(()=>m.disabled,()=>{o.groupDisabled=m.disabled},{immediate:!0}),{select:a,currentLabel:t,currentValue:C,itemSelected:c,isDisabled:h,hoverItem:d,updateOption:i}}const Qt=re({name:Te,componentName:Te,props:Gt,setup(e){const o=se("select"),a=ol(),m=u(()=>[o.be("dropdown","item"),o.is("disabled",Ee(C)),o.is("selected",Ee(t)),o.is("hovering",Ee(i))]),c=ie({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:S,itemSelected:t,isDisabled:C,select:h,hoverItem:b,updateOption:f}=qt(e,c),{visible:d,hover:i}=De(c),s=ye().proxy;h.onOptionCreate(s),sl(()=>{const w=s.value,{selected:T}=h.states,D=T.some(y=>y.value===s.value);H(()=>{h.states.cachedOptions.get(w)===s&&!D&&h.states.cachedOptions.delete(w)}),h.onOptionDestroy(w,s)});function p(){C.value||h.handleOptionSelect(s)}return{ns:o,id:a,containerKls:m,currentLabel:S,itemSelected:t,isDisabled:C,select:h,visible:d,hover:i,states:c,hoverItem:b,updateOption:f,selectOptionClick:p}}});function Jt(e,o){return ae((g(),I("li",{id:e.id,class:v(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:B(e.selectOptionClick,["stop"])},[k(e.$slots,"default",{},()=>[V("span",null,W(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[ke,e.visible]])}var Me=Se(Qt,[["render",Jt],["__file","option.vue"]]);const Zt=re({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=ge(Ce),o=se("select"),a=u(()=>e.props.popperClass),m=u(()=>e.props.multiple),c=u(()=>e.props.fitInputWidth),S=E("");function t(){var C;S.value=`${(C=e.selectRef)==null?void 0:C.offsetWidth}px`}return Re(()=>{t(),Q(e.selectRef,t)}),{ns:o,minWidth:S,popperClass:a,isMultiple:m,isFitInputWidth:c}}});function Xt(e,o,a,m,c,S){return g(),I("div",{class:v([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:he({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(g(),I("div",{key:0,class:v(e.ns.be("dropdown","header"))},[k(e.$slots,"header")],2)):M("v-if",!0),k(e.$slots,"default"),e.$slots.footer?(g(),I("div",{key:1,class:v(e.ns.be("dropdown","footer"))},[k(e.$slots,"footer")],2)):M("v-if",!0)],6)}var Yt=Se(Zt,[["render",Xt],["__file","select-dropdown.vue"]]);const _t=(e,o)=>{const{t:a}=ot(),m=ol(),c=se("select"),S=se("input"),t=ie({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),C=E(),h=E(),b=E(),f=E(),d=E(),i=E(),s=E(),p=E(),w=E(),T=E(),D=E(),y=E(!1),N=E(),{form:ue,formItem:z}=Nt(),{inputId:pl}=Bt(e,{formItemContext:z}),{valueOnClear:fl,isEmptyValue:vl}=st(e),{isComposing:$e,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl}=Wt({afterComposition:l=>He(l)}),Y=u(()=>e.disabled||!!ue?.disabled),{wrapperRef:Le,isFocused:Ne,handleBlur:gl}=Ft(d,{disabled:Y,afterFocus(){e.automaticDropdown&&!y.value&&(y.value=!0,t.menuVisibleOnFocus=!0)},beforeBlur(l){var n,r;return((n=b.value)==null?void 0:n.isFocusInsideContent(l))||((r=f.value)==null?void 0:r.isFocusInsideContent(l))},afterBlur(){var l;y.value=!1,t.menuVisibleOnFocus=!1,e.validateEvent&&((l=z?.validate)==null||l.call(z,"blur").catch(n=>Xe()))}}),Oe=u(()=>P(e.modelValue)?e.modelValue.length>0:!vl(e.modelValue)),yl=u(()=>{var l;return(l=ue?.statusIcon)!=null?l:!1}),Sl=u(()=>e.clearable&&!Y.value&&t.inputHovering&&Oe.value),Be=u(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Cl=u(()=>c.is("reverse",!!(Be.value&&y.value))),we=u(()=>z?.validateState||""),Ol=u(()=>we.value&&it[we.value]),wl=u(()=>e.remote?300:0),Il=u(()=>e.remote&&!t.inputValue&&t.options.size===0),El=u(()=>e.loading?e.loadingText||a("el.select.loading"):e.filterable&&t.inputValue&&t.options.size>0&&_.value===0?e.noMatchText||a("el.select.noMatch"):t.options.size===0?e.noDataText||a("el.select.noData"):null),_=u(()=>R.value.filter(l=>l.visible).length),R=u(()=>{const l=Array.from(t.options.values()),n=[];return t.optionValues.forEach(r=>{const O=l.findIndex($=>$.value===r);O>-1&&n.push(l[O])}),n.length>=l.length?n:l}),Vl=u(()=>Array.from(t.cachedOptions.values())),Tl=u(()=>{const l=R.value.filter(n=>!n.created).some(n=>n.currentLabel===t.inputValue);return e.filterable&&e.allowCreate&&t.inputValue!==""&&!l}),We=()=>{e.filterable&&ne(e.filterMethod)||e.filterable&&e.remote&&ne(e.remoteMethod)||R.value.forEach(l=>{var n;(n=l.updateOption)==null||n.call(l,t.inputValue)})},Fe=rt(),kl=u(()=>["small"].includes(Fe.value)?"small":"default"),Dl=u({get(){return y.value&&!Il.value},set(l){y.value=l}}),Rl=u(()=>{if(e.multiple&&!be(e.modelValue))return U(e.modelValue).length===0&&!t.inputValue;const l=P(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||be(l)?!t.inputValue:!0}),Ml=u(()=>{var l;const n=(l=e.placeholder)!=null?l:a("el.select.placeholder");return e.multiple||!Oe.value?n:t.selectedLabel}),$l=u(()=>Ze?null:"mouseenter");j(()=>e.modelValue,(l,n)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(t.inputValue="",de("")),ce(),!oe(l,n)&&e.validateEvent&&z?.validate("change").catch(r=>Xe())},{flush:"post",deep:!0}),j(()=>y.value,l=>{l?de(t.inputValue):(t.inputValue="",t.previousQuery=null,t.isBeforeHide=!0),o("visible-change",l)}),j(()=>t.options.entries(),()=>{ft&&(ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value&&Pe())},{flush:"post"}),j([()=>t.hoveringIndex,R],([l])=>{vt(l)&&l>-1?N.value=R.value[l]||{}:N.value={},R.value.forEach(n=>{n.hover=N.value===n})}),ut(()=>{t.isBeforeHide||We()});const de=l=>{t.previousQuery===l||$e.value||(t.previousQuery=l,e.filterable&&ne(e.filterMethod)?e.filterMethod(l):e.filterable&&e.remote&&ne(e.remoteMethod)&&e.remoteMethod(l),e.defaultFirstOption&&(e.filterable||e.remote)&&_.value?H(Pe):H(Ll))},Pe=()=>{const l=R.value.filter($=>$.visible&&!$.disabled&&!$.states.groupDisabled),n=l.find($=>$.created),r=l[0],O=R.value.map($=>$.value);t.hoveringIndex=qe(O,n||r)},ce=()=>{if(e.multiple)t.selectedLabel="";else{const n=P(e.modelValue)?e.modelValue[0]:e.modelValue,r=ze(n);t.selectedLabel=r.currentLabel,t.selected=[r];return}const l=[];be(e.modelValue)||U(e.modelValue).forEach(n=>{l.push(ze(n))}),t.selected=l},ze=l=>{let n;const r=pt(l);for(let J=t.cachedOptions.size-1;J>=0;J--){const K=Vl.value[J];if(r?X(K.value,e.valueKey)===X(l,e.valueKey):K.value===l){n={value:l,currentLabel:K.currentLabel,get isDisabled(){return K.isDisabled}};break}}if(n)return n;const O=r?l.label:l??"";return{value:l,currentLabel:O}},Ll=()=>{t.hoveringIndex=R.value.findIndex(l=>t.selected.some(n=>ve(n)===ve(l)))},Nl=()=>{t.selectionWidth=Number.parseFloat(window.getComputedStyle(h.value).width)},Bl=()=>{t.collapseItemWidth=T.value.getBoundingClientRect().width},Ie=()=>{var l,n;(n=(l=b.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ke=()=>{var l,n;(n=(l=f.value)==null?void 0:l.updatePopper)==null||n.call(l)},Ae=()=>{t.inputValue.length>0&&!y.value&&(y.value=!0),de(t.inputValue)},He=l=>{if(t.inputValue=l.target.value,e.remote)Ue();else return Ae()},Ue=Pt(()=>{Ae()},wl.value),x=l=>{oe(e.modelValue,l)||o(il,l)},Wl=l=>Ut(l,n=>{const r=t.cachedOptions.get(n);return r&&!r.disabled&&!r.states.groupDisabled}),Fl=l=>{if(e.multiple&&l.code!==ct.delete&&l.target.value.length<=0){const n=U(e.modelValue).slice(),r=Wl(n);if(r<0)return;const O=n[r];n.splice(r,1),o(Z,n),x(n),o("remove-tag",O)}},Pl=(l,n)=>{const r=t.selected.indexOf(n);if(r>-1&&!Y.value){const O=U(e.modelValue).slice();O.splice(r,1),o(Z,O),x(O),o("remove-tag",n.value)}l.stopPropagation(),fe()},je=l=>{l.stopPropagation();const n=e.multiple?[]:fl.value;if(e.multiple)for(const r of t.selected)r.isDisabled&&n.push(r.value);o(Z,n),x(n),t.hoveringIndex=-1,y.value=!1,o("clear"),fe()},Ge=l=>{var n;if(e.multiple){const r=U((n=e.modelValue)!=null?n:[]).slice(),O=qe(r,l);O>-1?r.splice(O,1):(e.multipleLimit<=0||r.length<e.multipleLimit)&&r.push(l.value),o(Z,r),x(r),l.created&&de(""),e.filterable&&!e.reserveKeyword&&(t.inputValue="")}else o(Z,l.value),x(l.value),y.value=!1;fe(),!y.value&&H(()=>{pe(l)})},qe=(l,n)=>be(n)?-1:F(n.value)?l.findIndex(r=>oe(X(r,e.valueKey),ve(n))):l.indexOf(n.value),pe=l=>{var n,r,O,$,J;const K=P(l)?l[0]:l;let me=null;if(K?.value){const ee=R.value.filter(lt=>lt.value===K.value);ee.length>0&&(me=ee[0].$el)}if(b.value&&me){const ee=($=(O=(r=(n=b.value)==null?void 0:n.popperRef)==null?void 0:r.contentRef)==null?void 0:O.querySelector)==null?void 0:$.call(O,`.${c.be("dropdown","wrap")}`);ee&&dt(ee,me)}(J=D.value)==null||J.handleScroll()},zl=l=>{t.options.set(l.value,l),t.cachedOptions.set(l.value,l)},Kl=(l,n)=>{t.options.get(l)===n&&t.options.delete(l)},Al=u(()=>{var l,n;return(n=(l=b.value)==null?void 0:l.popperRef)==null?void 0:n.contentRef}),Hl=()=>{t.isBeforeHide=!1,H(()=>{var l;(l=D.value)==null||l.update(),pe(t.selected)})},fe=()=>{var l;(l=d.value)==null||l.focus()},Ul=()=>{var l;if(y.value){y.value=!1,H(()=>{var n;return(n=d.value)==null?void 0:n.blur()});return}(l=d.value)==null||l.blur()},jl=l=>{je(l)},Gl=l=>{if(y.value=!1,Ne.value){const n=new FocusEvent("focus",l);H(()=>gl(n))}},ql=()=>{t.inputValue.length>0?t.inputValue="":y.value=!1},Qe=()=>{Y.value||(Ze&&(t.inputHovering=!0),t.menuVisibleOnFocus?t.menuVisibleOnFocus=!1:y.value=!y.value)},Ql=()=>{if(!y.value)Qe();else{const l=R.value[t.hoveringIndex];l&&!l.isDisabled&&Ge(l)}},ve=l=>F(l.value)?X(l.value,e.valueKey):l.value,Jl=u(()=>R.value.filter(l=>l.visible).every(l=>l.isDisabled)),Zl=u(()=>e.multiple?e.collapseTags?t.selected.slice(0,e.maxCollapseTags):t.selected:[]),Xl=u(()=>e.multiple?e.collapseTags?t.selected.slice(e.maxCollapseTags):[]:[]),Je=l=>{if(!y.value){y.value=!0;return}if(!(t.options.size===0||_.value===0||$e.value)&&!Jl.value){l==="next"?(t.hoveringIndex++,t.hoveringIndex===t.options.size&&(t.hoveringIndex=0)):l==="prev"&&(t.hoveringIndex--,t.hoveringIndex<0&&(t.hoveringIndex=t.options.size-1));const n=R.value[t.hoveringIndex];(n.isDisabled||!n.visible)&&Je(l),H(()=>pe(N.value))}},Yl=()=>{if(!h.value)return 0;const l=window.getComputedStyle(h.value);return Number.parseFloat(l.gap||"6px")},_l=u(()=>{const l=Yl();return{maxWidth:`${T.value&&e.maxCollapseTags===1?t.selectionWidth-t.collapseItemWidth-l:t.selectionWidth}px`}}),xl=u(()=>({maxWidth:`${t.selectionWidth}px`})),et=l=>{o("popup-scroll",l)};return Q(h,Nl),Q(p,Ie),Q(Le,Ie),Q(w,Ke),Q(T,Bl),Re(()=>{ce()}),{inputId:pl,contentId:m,nsSelect:c,nsInput:S,states:t,isFocused:Ne,expanded:y,optionsArray:R,hoverOption:N,selectSize:Fe,filteredOptionsCount:_,updateTooltip:Ie,updateTagTooltip:Ke,debouncedOnInputChange:Ue,onInput:He,deletePrevTag:Fl,deleteTag:Pl,deleteSelected:je,handleOptionSelect:Ge,scrollToOption:pe,hasModelValue:Oe,shouldShowPlaceholder:Rl,currentPlaceholder:Ml,mouseEnterEventName:$l,needStatusIcon:yl,showClose:Sl,iconComponent:Be,iconReverse:Cl,validateState:we,validateIcon:Ol,showNewOption:Tl,updateOptions:We,collapseTagSize:kl,setSelected:ce,selectDisabled:Y,emptyText:El,handleCompositionStart:ml,handleCompositionUpdate:bl,handleCompositionEnd:hl,onOptionCreate:zl,onOptionDestroy:Kl,handleMenuEnter:Hl,focus:fe,blur:Ul,handleClearClick:jl,handleClickOutside:Gl,handleEsc:ql,toggleMenu:Qe,selectOption:Ql,getValueKey:ve,navigateOptions:Je,dropdownMenuVisible:Dl,showTagList:Zl,collapseTagList:Xl,popupScroll:et,tagStyle:_l,collapseTagStyle:xl,popperRef:Al,inputRef:d,tooltipRef:b,tagTooltipRef:f,prefixRef:i,suffixRef:s,selectRef:C,wrapperRef:Le,selectionRef:h,scrollbarRef:D,menuRef:p,tagMenuRef:w,collapseItemRef:T}};var xt=re({name:"ElOptions",setup(e,{slots:o}){const a=ge(Ce);let m=[];return()=>{var c,S;const t=(c=o.default)==null?void 0:c.call(o),C=[];function h(b){P(b)&&b.forEach(f=>{var d,i,s,p;const w=(d=f?.type||{})==null?void 0:d.name;w==="ElOptionGroup"?h(!mt(f.children)&&!P(f.children)&&ne((i=f.children)==null?void 0:i.default)?(s=f.children)==null?void 0:s.default():f.children):w==="ElOption"?C.push((p=f.props)==null?void 0:p.value):P(f.children)&&h(f.children)})}return t.length&&h((S=t[0])==null?void 0:S.children),oe(C,m)||(m=C,a&&(a.states.optionValues=C)),t}}});const en=al({name:String,id:String,modelValue:{type:le([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:yt,effect:{type:le(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:le(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:Boolean,maxCollapseTags:{type:Number,default:1},teleported:tl.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:_e,default:gt},fitInputWidth:Boolean,suffixIcon:{type:_e,default:ht},tagType:{...Ye.type,default:"info"},tagEffect:{...Ye.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:le(String),values:kt,default:"bottom-start"},fallbackPlacements:{type:le(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:tl.appendTo,...bt,...Kt(["ariaLabel"])});Rt.scroll;const nl="ElSelect",ln=re({name:nl,componentName:nl,components:{ElSelectMenu:Yt,ElOption:Me,ElOptions:xt,ElTag:It,ElScrollbar:Mt,ElTooltip:Dt,ElIcon:wt},directives:{ClickOutside:At},props:en,emits:[Z,il,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:o,slots:a}){const m=ye();m.appContext.config.warnHandler=(...i)=>{!i[0]||i[0].includes('Slot "default" invoked outside of the render function')||console.warn(...i)};const c=u(()=>{const{modelValue:i,multiple:s}=e,p=s?[]:void 0;return P(i)?s?i:p:s?p:i}),S=ie({...De(e),modelValue:c}),t=_t(S,o),{calculatorRef:C,inputStyle:h}=jt(),b=i=>i.reduce((s,p)=>(s.push(p),p.children&&p.children.length>0&&s.push(...b(p.children)),s),[]),f=i=>{Et(i||[]).forEach(p=>{var w;if(F(p)&&(p.type.name==="ElOption"||p.type.name==="ElTree")){const T=p.type.name;if(T==="ElTree"){const D=((w=p.props)==null?void 0:w.data)||[];b(D).forEach(N=>{N.currentLabel=N.label||(F(N.value)?"":N.value),t.onOptionCreate(N)})}else if(T==="ElOption"){const D={...p.props};D.currentLabel=D.label||(F(D.value)?"":D.value),t.onOptionCreate(D)}}})};j(()=>{var i;return(i=a.default)==null?void 0:i.call(a)},i=>{e.persistent||f(i)},{immediate:!0}),rl(Ce,ie({props:S,states:t.states,selectRef:t.selectRef,optionsArray:t.optionsArray,setSelected:t.setSelected,handleOptionSelect:t.handleOptionSelect,onOptionCreate:t.onOptionCreate,onOptionDestroy:t.onOptionDestroy}));const d=u(()=>e.multiple?t.states.selected.map(i=>i.currentLabel):t.states.selectedLabel);return sl(()=>{m.appContext.config.warnHandler=void 0}),{...t,modelValue:c,selectedLabel:d,calculatorRef:C,inputStyle:h}}});function tn(e,o){const a=G("el-tag"),m=G("el-tooltip"),c=G("el-icon"),S=G("el-option"),t=G("el-options"),C=G("el-scrollbar"),h=G("el-select-menu"),b=St("click-outside");return ae((g(),I("div",{ref:"selectRef",class:v([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[Ot(e.mouseEnterEventName)]:f=>e.states.inputHovering=!0,onMouseleave:f=>e.states.inputHovering=!1},[q(m,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,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,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:f=>e.states.isBeforeHide=!1},{default:L(()=>{var f;return[V("div",{ref:"wrapperRef",class:v([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:B(e.toggleMenu,["prevent"])},[e.$slots.prefix?(g(),I("div",{key:0,ref:"prefixRef",class:v(e.nsSelect.e("prefix"))},[k(e.$slots,"prefix")],2)):M("v-if",!0),V("div",{ref:"selectionRef",class:v([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?k(e.$slots,"tag",{key:0,data:e.states.selected,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>[(g(!0),I(xe,null,el(e.showTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.tagStyle),onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(g(),A(m,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom","popper-class":e.popperClass,teleported:e.teleported},{default:L(()=>[V("div",{ref:"collapseItemRef",class:v(e.nsSelect.e("selected-item"))},[q(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:he(e.collapseTagStyle)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))}," + "+W(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:L(()=>[V("div",{ref:"tagMenuRef",class:v(e.nsSelect.e("selection"))},[(g(!0),I(xe,null,el(e.collapseTagList,d=>(g(),I("div",{key:e.getValueKey(d),class:v(e.nsSelect.e("selected-item"))},[q(a,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:i=>e.deleteTag(i,d)},{default:L(()=>[V("span",{class:v(e.nsSelect.e("tags-text"))},[k(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[ll(W(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","teleported"])):M("v-if",!0)]):M("v-if",!0),V("div",{class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[ae(V("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:v([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:he(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((f=e.hoverOption)==null?void 0:f.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[te(B(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),te(B(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),te(B(e.handleEsc,["stop","prevent"]),["esc"]),te(B(e.selectOption,["stop","prevent"]),["enter"]),te(B(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:B(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[Ct,e.states.inputValue]]),e.filterable?(g(),I("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:v(e.nsSelect.e("input-calculator")),textContent:W(e.states.inputValue)},null,10,["textContent"])):M("v-if",!0)],2),e.shouldShowPlaceholder?(g(),I("div",{key:1,class:v([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?k(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[V("span",null,W(e.currentPlaceholder),1)]):(g(),I("span",{key:1},W(e.currentPlaceholder),1))],2)):M("v-if",!0)],2),V("div",{ref:"suffixRef",class:v(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(g(),A(c,{key:0,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:L(()=>[(g(),A(Ve(e.iconComponent)))]),_:1},8,["class"])):M("v-if",!0),e.showClose&&e.clearIcon?(g(),A(c,{key:1,class:v([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:L(()=>[(g(),A(Ve(e.clearIcon)))]),_:1},8,["class","onClick"])):M("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(g(),A(c,{key:2,class:v([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:L(()=>[(g(),A(Ve(e.validateIcon)))]),_:1},8,["class"])):M("v-if",!0)],2)],10,["onClick"])]}),content:L(()=>[q(h,{ref:"menuRef"},{default:L(()=>[e.$slots.header?(g(),I("div",{key:0,class:v(e.nsSelect.be("dropdown","header")),onClick:B(()=>{},["stop"])},[k(e.$slots,"header")],10,["onClick"])):M("v-if",!0),ae(q(C,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:v([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:L(()=>[e.showNewOption?(g(),A(S,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):M("v-if",!0),q(t,null,{default:L(()=>[k(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[ke,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(g(),I("div",{key:1,class:v(e.nsSelect.be("dropdown","loading"))},[k(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(g(),I("div",{key:2,class:v(e.nsSelect.be("dropdown","empty"))},[k(e.$slots,"empty",{},()=>[V("span",null,W(e.emptyText),1)])],2)):M("v-if",!0),e.$slots.footer?(g(),I("div",{key:3,class:v(e.nsSelect.be("dropdown","footer")),onClick:B(()=>{},["stop"])},[k(e.$slots,"footer")],10,["onClick"])):M("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[b,e.handleClickOutside,e.popperRef]])}var nn=Se(ln,[["render",tn],["__file","select.vue"]]);const an=re({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const o=se("select"),a=E(),m=ye(),c=E([]);rl(dl,ie({...De(e)}));const S=u(()=>c.value.some(b=>b.visible===!0)),t=b=>{var f;return b.type.name==="ElOption"&&!!((f=b.component)!=null&&f.proxy)},C=b=>{const f=U(b),d=[];return f.forEach(i=>{var s;Vt(i)&&(t(i)?d.push(i.component.proxy):P(i.children)&&i.children.length?d.push(...C(i.children)):(s=i.component)!=null&&s.subTree&&d.push(...C(i.component.subTree)))}),d},h=()=>{c.value=C(m.subTree)};return Re(()=>{h()}),Lt(a,h,{attributes:!0,subtree:!0,childList:!0}),{groupRef:a,visible:S,ns:o}}});function on(e,o,a,m,c,S){return ae((g(),I("ul",{ref:"groupRef",class:v(e.ns.be("group","wrap"))},[V("li",{class:v(e.ns.be("group","title"))},W(e.label),3),V("li",null,[V("ul",{class:v(e.ns.b("group"))},[k(e.$slots,"default")],2)])],2)),[[ke,e.visible]])}var cl=Se(an,[["render",on],["__file","option-group.vue"]]);const Sn=Tt(nn,{Option:Me,OptionGroup:cl}),Cn=ul(Me);ul(cl);export{Cn as E,Sn as a};
@@ -1 +1 @@
1
- import{aj as b,ap as B,_ as w,d as p,a as h,b as u,o as i,i as N,y as S,e as t,dd as E,n as m,as as v,al as I,av as P,aw as $,ak as T,bF as V,aO as j,r as _,F as f,v as g,k as C,ay as y,bf as F,g as O,w as z}from"./index-BDnu8Rx2.js";const L=b({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:B([Number,Object])}}),R=b({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),H=p({name:"ElSkeletonItem"}),M=p({...H,props:R,setup(l){const e=h("skeleton");return(o,s)=>(i(),u("div",{class:m([t(e).e("item"),t(e).e(o.variant)])},[o.variant==="image"?(i(),N(t(E),{key:0})):S("v-if",!0)],2))}});var c=w(M,[["__file","skeleton-item.vue"]]);const U=(l,e=0)=>{if(e===0)return l;const o=v(e)&&!!e.initVal,s=I(o);let r=null;const a=n=>{if(V(n)){s.value=l.value;return}r&&clearTimeout(r),r=setTimeout(()=>{s.value=l.value},n)},d=n=>{n==="leading"?T(e)?a(e):a(e.leading):v(e)?a(e.trailing):s.value=!1};return P(()=>d("leading")),$(()=>l.value,n=>{d(n?"leading":"trailing")}),s},q=p({name:"ElSkeleton"}),A=p({...q,props:L,setup(l,{expose:e}){const o=l,s=h("skeleton"),r=U(j(o,"loading"),o.throttle);return e({uiLoading:r}),(a,d)=>t(r)?(i(),u("div",y({key:0,class:[t(s).b(),t(s).is("animated",a.animated)]},a.$attrs),[(i(!0),u(f,null,g(a.count,n=>(i(),u(f,{key:n},[t(r)?_(a.$slots,"template",{key:n},()=>[C(c,{class:m(t(s).is("first")),variant:"p"},null,8,["class"]),(i(!0),u(f,null,g(a.rows,k=>(i(),N(c,{key:k,class:m([t(s).e("paragraph"),t(s).is("last",k===a.rows&&a.rows>1)]),variant:"p"},null,8,["class"]))),128))]):S("v-if",!0)],64))),128))],16)):_(a.$slots,"default",F(y({key:1},a.$attrs)))}});var D=w(A,[["__file","skeleton.vue"]]);const J=O(D,{SkeletonItem:c}),K=z(c);export{J as E,K as a};
1
+ import{aj as b,ap as B,_ as w,d as p,a as h,b as u,o as i,i as N,y as S,e as t,dd as E,n as m,as as v,al as I,av as P,aw as $,ak as T,bF as V,aO as j,r as _,F as f,v as g,k as C,ay as y,bf as F,g as O,w as z}from"./index-DI_C3Ao9.js";const L=b({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:B([Number,Object])}}),R=b({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),H=p({name:"ElSkeletonItem"}),M=p({...H,props:R,setup(l){const e=h("skeleton");return(o,s)=>(i(),u("div",{class:m([t(e).e("item"),t(e).e(o.variant)])},[o.variant==="image"?(i(),N(t(E),{key:0})):S("v-if",!0)],2))}});var c=w(M,[["__file","skeleton-item.vue"]]);const U=(l,e=0)=>{if(e===0)return l;const o=v(e)&&!!e.initVal,s=I(o);let r=null;const a=n=>{if(V(n)){s.value=l.value;return}r&&clearTimeout(r),r=setTimeout(()=>{s.value=l.value},n)},d=n=>{n==="leading"?T(e)?a(e):a(e.leading):v(e)?a(e.trailing):s.value=!1};return P(()=>d("leading")),$(()=>l.value,n=>{d(n?"leading":"trailing")}),s},q=p({name:"ElSkeleton"}),A=p({...q,props:L,setup(l,{expose:e}){const o=l,s=h("skeleton"),r=U(j(o,"loading"),o.throttle);return e({uiLoading:r}),(a,d)=>t(r)?(i(),u("div",y({key:0,class:[t(s).b(),t(s).is("animated",a.animated)]},a.$attrs),[(i(!0),u(f,null,g(a.count,n=>(i(),u(f,{key:n},[t(r)?_(a.$slots,"template",{key:n},()=>[C(c,{class:m(t(s).is("first")),variant:"p"},null,8,["class"]),(i(!0),u(f,null,g(a.rows,k=>(i(),N(c,{key:k,class:m([t(s).e("paragraph"),t(s).is("last",k===a.rows&&a.rows>1)]),variant:"p"},null,8,["class"]))),128))]):S("v-if",!0)],64))),128))],16)):_(a.$slots,"default",F(y({key:1},a.$attrs)))}});var D=w(A,[["__file","skeleton.vue"]]);const J=O(D,{SkeletonItem:c}),K=z(c);export{J as E,K as a};
@@ -1 +1 @@
1
- import{c9 as Y,aM as V,bh as w,ak as E,aj as Z,cf as C,cg as P,ch as B,ap as _,bI as g,_ as x,d as L,bo as ee,a as ae,bQ as ie,c as d,al as S,bn as te,aw as M,av as ne,b as v,o as i,t as T,y as c,c8 as se,e as a,n as u,i as r,j as p,b8 as b,E as h,x as N,r as F,k as oe,bR as le,f as ce,ah as re,bc as ue,ci as O,bE as de,bN as ve,g as fe}from"./index-BDnu8Rx2.js";import{u as pe}from"./index-DZxnN0Hy.js";import{u as he,a as me}from"./use-form-item-B7j42EP5.js";const be=o=>["",...Y].includes(o),ye=Z({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:be},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:g},activeActionIcon:{type:g},activeIcon:{type:g},inactiveIcon:{type:g},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:_(Function)},id:String,tabindex:{type:[String,Number]},...pe(["ariaLabel"])}),ke={[B]:o=>V(o)||w(o)||E(o),[P]:o=>V(o)||w(o)||E(o),[C]:o=>V(o)||w(o)||E(o)},U="ElSwitch",Ie=L({name:U}),ge=L({...Ie,props:ye,emits:ke,setup(o,{expose:j,emit:f}){const n=o,{formItem:y}=he(),R=ee(),t=ae("switch"),{inputId:$}=me(n,{formItemContext:y}),k=ie(d(()=>n.loading)),A=S(n.modelValue!==!1),m=S(),G=S(),H=d(()=>[t.b(),t.m(R.value),t.is("disabled",k.value),t.is("checked",s.value)]),Q=d(()=>[t.e("label"),t.em("label","left"),t.is("active",!s.value)]),W=d(()=>[t.e("label"),t.em("label","right"),t.is("active",s.value)]),q=d(()=>({width:te(n.width)}));M(()=>n.modelValue,()=>{A.value=!0});const z=d(()=>A.value?n.modelValue:!1),s=d(()=>z.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(z.value)||(f(B,n.inactiveValue),f(P,n.inactiveValue),f(C,n.inactiveValue)),M(s,e=>{var l;m.value.checked=e,n.validateEvent&&((l=y?.validate)==null||l.call(y,"change").catch(X=>ve()))});const I=()=>{const e=s.value?n.inactiveValue:n.activeValue;f(B,e),f(P,e),f(C,e),ue(()=>{m.value.checked=s.value})},D=()=>{if(k.value)return;const{beforeChange:e}=n;if(!e){I();return}const l=e();[O(l),V(l)].includes(!0)||de(U,"beforeChange must return type `Promise<boolean>` or `boolean`"),O(l)?l.then(K=>{K&&I()}).catch(K=>{}):l&&I()},J=()=>{var e,l;(l=(e=m.value)==null?void 0:e.focus)==null||l.call(e)};return ne(()=>{m.value.checked=s.value}),j({focus:J,checked:s}),(e,l)=>(i(),v("div",{class:u(a(H)),onClick:re(D,["prevent"])},[T("input",{id:a($),ref_key:"input",ref:m,class:u(a(t).e("input")),type:"checkbox",role:"switch","aria-checked":a(s),"aria-disabled":a(k),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:a(k),tabindex:e.tabindex,onChange:I,onKeydown:se(D,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText)?(i(),v("span",{key:0,class:u(a(Q))},[e.inactiveIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.inactiveIcon)))]),_:1})):c("v-if",!0),!e.inactiveIcon&&e.inactiveText?(i(),v("span",{key:1,"aria-hidden":a(s)},N(e.inactiveText),9,["aria-hidden"])):c("v-if",!0)],2)):c("v-if",!0),T("span",{ref_key:"core",ref:G,class:u(a(t).e("core")),style:ce(a(q))},[e.inlinePrompt?(i(),v("div",{key:0,class:u(a(t).e("inner"))},[e.activeIcon||e.inactiveIcon?(i(),r(a(h),{key:0,class:u(a(t).is("icon"))},{default:p(()=>[(i(),r(b(a(s)?e.activeIcon:e.inactiveIcon)))]),_:1},8,["class"])):e.activeText||e.inactiveText?(i(),v("span",{key:1,class:u(a(t).is("text")),"aria-hidden":!a(s)},N(a(s)?e.activeText:e.inactiveText),11,["aria-hidden"])):c("v-if",!0)],2)):c("v-if",!0),T("div",{class:u(a(t).e("action"))},[e.loading?(i(),r(a(h),{key:0,class:u(a(t).is("loading"))},{default:p(()=>[oe(a(le))]),_:1},8,["class"])):a(s)?F(e.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.activeActionIcon)))]),_:1})):c("v-if",!0)]):a(s)?c("v-if",!0):F(e.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.inactiveActionIcon)))]),_:1})):c("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText)?(i(),v("span",{key:1,class:u(a(W))},[e.activeIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.activeIcon)))]),_:1})):c("v-if",!0),!e.activeIcon&&e.activeText?(i(),v("span",{key:1,"aria-hidden":!a(s)},N(e.activeText),9,["aria-hidden"])):c("v-if",!0)],2)):c("v-if",!0)],10,["onClick"]))}});var Ve=x(ge,[["__file","switch.vue"]]);const Te=fe(Ve);export{Te as E};
1
+ import{c9 as Y,aM as V,bh as w,ak as E,aj as Z,cf as C,cg as P,ch as B,ap as _,bI as g,_ as x,d as L,bo as ee,a as ae,bQ as ie,c as d,al as S,bn as te,aw as M,av as ne,b as v,o as i,t as T,y as c,c8 as se,e as a,n as u,i as r,j as p,b8 as b,E as h,x as N,r as F,k as oe,bR as le,f as ce,ah as re,bc as ue,ci as O,bE as de,bN as ve,g as fe}from"./index-DI_C3Ao9.js";import{u as pe}from"./index-sVUmFHgv.js";import{u as he,a as me}from"./use-form-item-D6NQ9sNV.js";const be=o=>["",...Y].includes(o),ye=Z({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:be},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:g},activeActionIcon:{type:g},activeIcon:{type:g},inactiveIcon:{type:g},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:_(Function)},id:String,tabindex:{type:[String,Number]},...pe(["ariaLabel"])}),ke={[B]:o=>V(o)||w(o)||E(o),[P]:o=>V(o)||w(o)||E(o),[C]:o=>V(o)||w(o)||E(o)},U="ElSwitch",Ie=L({name:U}),ge=L({...Ie,props:ye,emits:ke,setup(o,{expose:j,emit:f}){const n=o,{formItem:y}=he(),R=ee(),t=ae("switch"),{inputId:$}=me(n,{formItemContext:y}),k=ie(d(()=>n.loading)),A=S(n.modelValue!==!1),m=S(),G=S(),H=d(()=>[t.b(),t.m(R.value),t.is("disabled",k.value),t.is("checked",s.value)]),Q=d(()=>[t.e("label"),t.em("label","left"),t.is("active",!s.value)]),W=d(()=>[t.e("label"),t.em("label","right"),t.is("active",s.value)]),q=d(()=>({width:te(n.width)}));M(()=>n.modelValue,()=>{A.value=!0});const z=d(()=>A.value?n.modelValue:!1),s=d(()=>z.value===n.activeValue);[n.activeValue,n.inactiveValue].includes(z.value)||(f(B,n.inactiveValue),f(P,n.inactiveValue),f(C,n.inactiveValue)),M(s,e=>{var l;m.value.checked=e,n.validateEvent&&((l=y?.validate)==null||l.call(y,"change").catch(X=>ve()))});const I=()=>{const e=s.value?n.inactiveValue:n.activeValue;f(B,e),f(P,e),f(C,e),ue(()=>{m.value.checked=s.value})},D=()=>{if(k.value)return;const{beforeChange:e}=n;if(!e){I();return}const l=e();[O(l),V(l)].includes(!0)||de(U,"beforeChange must return type `Promise<boolean>` or `boolean`"),O(l)?l.then(K=>{K&&I()}).catch(K=>{}):l&&I()},J=()=>{var e,l;(l=(e=m.value)==null?void 0:e.focus)==null||l.call(e)};return ne(()=>{m.value.checked=s.value}),j({focus:J,checked:s}),(e,l)=>(i(),v("div",{class:u(a(H)),onClick:re(D,["prevent"])},[T("input",{id:a($),ref_key:"input",ref:m,class:u(a(t).e("input")),type:"checkbox",role:"switch","aria-checked":a(s),"aria-disabled":a(k),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:a(k),tabindex:e.tabindex,onChange:I,onKeydown:se(D,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText)?(i(),v("span",{key:0,class:u(a(Q))},[e.inactiveIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.inactiveIcon)))]),_:1})):c("v-if",!0),!e.inactiveIcon&&e.inactiveText?(i(),v("span",{key:1,"aria-hidden":a(s)},N(e.inactiveText),9,["aria-hidden"])):c("v-if",!0)],2)):c("v-if",!0),T("span",{ref_key:"core",ref:G,class:u(a(t).e("core")),style:ce(a(q))},[e.inlinePrompt?(i(),v("div",{key:0,class:u(a(t).e("inner"))},[e.activeIcon||e.inactiveIcon?(i(),r(a(h),{key:0,class:u(a(t).is("icon"))},{default:p(()=>[(i(),r(b(a(s)?e.activeIcon:e.inactiveIcon)))]),_:1},8,["class"])):e.activeText||e.inactiveText?(i(),v("span",{key:1,class:u(a(t).is("text")),"aria-hidden":!a(s)},N(a(s)?e.activeText:e.inactiveText),11,["aria-hidden"])):c("v-if",!0)],2)):c("v-if",!0),T("div",{class:u(a(t).e("action"))},[e.loading?(i(),r(a(h),{key:0,class:u(a(t).is("loading"))},{default:p(()=>[oe(a(le))]),_:1},8,["class"])):a(s)?F(e.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.activeActionIcon)))]),_:1})):c("v-if",!0)]):a(s)?c("v-if",!0):F(e.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.inactiveActionIcon)))]),_:1})):c("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText)?(i(),v("span",{key:1,class:u(a(W))},[e.activeIcon?(i(),r(a(h),{key:0},{default:p(()=>[(i(),r(b(e.activeIcon)))]),_:1})):c("v-if",!0),!e.activeIcon&&e.activeText?(i(),v("span",{key:1,"aria-hidden":!a(s)},N(e.activeText),9,["aria-hidden"])):c("v-if",!0)],2)):c("v-if",!0)],10,["onClick"]))}});var Ve=x(ge,[["__file","switch.vue"]]);const Te=fe(Ve);export{Te as E};
@@ -1 +1 @@
1
- import{bF as $,aj as I,bb as V,cw as T,_ as F,d as E,u as O,a as P,al as j,c as h,aO as d,aB as z,i,o,j as u,J,t as k,n as a,e,y as r,E as b,r as m,b8 as K,b as c,D as w,x as y,F as M,k as R,cx as U,K as _,aT as q,g as G}from"./index-BDnu8Rx2.js";import{d as H,e as L}from"./index-BjeXTDuD.js";const Q=["light","dark"],W=I({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:V(T),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Q,default:"light"},...H}),X={open:()=>!0,close:n=>$(n)||n instanceof Event},Y=E({name:"ElAlert"}),Z=E({...Y,props:W,emits:X,setup(n,{emit:v}){const l=n,{Close:S}=U,B=O(),t=P("alert"),p=j(!1),C=h(()=>T[l.type]),f=h(()=>!!(l.description||B.default)),A=()=>{p.value=!0,v("open")},g=s=>{p.value=!1,v("close",s)},{onOpen:D,onClose:N}=L({showAfter:d(l,"showAfter"),hideAfter:d(l,"hideAfter"),autoClose:d(l,"autoClose"),open:A,close:g});return z&&D(),(s,ee)=>(o(),i(q,{name:e(t).b("fade"),persisted:""},{default:u(()=>[J(k("div",{class:a([e(t).b(),e(t).m(s.type),e(t).is("center",s.center),e(t).is(s.effect)]),role:"alert"},[s.showIcon&&(s.$slots.icon||e(C))?(o(),i(e(b),{key:0,class:a([e(t).e("icon"),{[e(t).is("big")]:e(f)}])},{default:u(()=>[m(s.$slots,"icon",{},()=>[(o(),i(K(e(C))))])]),_:3},8,["class"])):r("v-if",!0),k("div",{class:a(e(t).e("content"))},[s.title||s.$slots.title?(o(),c("span",{key:0,class:a([e(t).e("title"),{"with-description":e(f)}])},[m(s.$slots,"title",{},()=>[w(y(s.title),1)])],2)):r("v-if",!0),e(f)?(o(),c("p",{key:1,class:a(e(t).e("description"))},[m(s.$slots,"default",{},()=>[w(y(s.description),1)])],2)):r("v-if",!0),s.closable?(o(),c(M,{key:2},[s.closeText?(o(),c("div",{key:0,class:a([e(t).e("close-btn"),e(t).is("customed")]),onClick:g},y(s.closeText),3)):(o(),i(e(b),{key:1,class:a(e(t).e("close-btn")),onClick:e(N)},{default:u(()=>[R(e(S))]),_:1},8,["class","onClick"]))],64)):r("v-if",!0)],2)],2),[[_,p.value]])]),_:3},8,["name"]))}});var x=F(Z,[["__file","alert.vue"]]);const oe=G(x);export{oe as E};
1
+ import{bF as $,aj as I,bb as V,cw as T,_ as F,d as E,u as O,a as P,al as j,c as h,aO as d,aB as z,i,o,j as u,J,t as k,n as a,e,y as r,E as b,r as m,b8 as K,b as c,D as w,x as y,F as M,k as R,cx as U,K as _,aT as q,g as G}from"./index-DI_C3Ao9.js";import{d as H,e as L}from"./index-PU4oJo9l.js";const Q=["light","dark"],W=I({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:V(T),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Q,default:"light"},...H}),X={open:()=>!0,close:n=>$(n)||n instanceof Event},Y=E({name:"ElAlert"}),Z=E({...Y,props:W,emits:X,setup(n,{emit:v}){const l=n,{Close:S}=U,B=O(),t=P("alert"),p=j(!1),C=h(()=>T[l.type]),f=h(()=>!!(l.description||B.default)),A=()=>{p.value=!0,v("open")},g=s=>{p.value=!1,v("close",s)},{onOpen:D,onClose:N}=L({showAfter:d(l,"showAfter"),hideAfter:d(l,"hideAfter"),autoClose:d(l,"autoClose"),open:A,close:g});return z&&D(),(s,ee)=>(o(),i(q,{name:e(t).b("fade"),persisted:""},{default:u(()=>[J(k("div",{class:a([e(t).b(),e(t).m(s.type),e(t).is("center",s.center),e(t).is(s.effect)]),role:"alert"},[s.showIcon&&(s.$slots.icon||e(C))?(o(),i(e(b),{key:0,class:a([e(t).e("icon"),{[e(t).is("big")]:e(f)}])},{default:u(()=>[m(s.$slots,"icon",{},()=>[(o(),i(K(e(C))))])]),_:3},8,["class"])):r("v-if",!0),k("div",{class:a(e(t).e("content"))},[s.title||s.$slots.title?(o(),c("span",{key:0,class:a([e(t).e("title"),{"with-description":e(f)}])},[m(s.$slots,"title",{},()=>[w(y(s.title),1)])],2)):r("v-if",!0),e(f)?(o(),c("p",{key:1,class:a(e(t).e("description"))},[m(s.$slots,"default",{},()=>[w(y(s.description),1)])],2)):r("v-if",!0),s.closable?(o(),c(M,{key:2},[s.closeText?(o(),c("div",{key:0,class:a([e(t).e("close-btn"),e(t).is("customed")]),onClick:g},y(s.closeText),3)):(o(),i(e(b),{key:1,class:a(e(t).e("close-btn")),onClick:e(N)},{default:u(()=>[R(e(S))]),_:1},8,["class","onClick"]))],64)):r("v-if",!0)],2)],2),[[_,p.value]])]),_:3},8,["name"]))}});var x=F(Z,[["__file","alert.vue"]]);const oe=G(x);export{oe as E};
@@ -1 +1 @@
1
- import{bh as w,ak as $,aM as z,aj as B,cg as V,ch as R,bS as P,al as E,an as J,c as b,bM as F,bo as Q,bQ as X,bO as Y,_ as k,d as y,a as I,b as G,o as C,t as _,J as D,di as x,e,ah as h,n as f,c_ as A,r as N,D as K,x as M,bc as U,f as Z,aW as ee,av as ae,am as oe,bG as le,ca as se,aw as te,bN as ne,w as L,g as re}from"./index-BDnu8Rx2.js";import{u as ie}from"./index-DZxnN0Hy.js";import{u as de,a as ue}from"./use-form-item-B7j42EP5.js";const T=B({modelValue:{type:[String,Number,Boolean],default:void 0},size:P,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),ce=B({...T,border:Boolean}),j={[R]:o=>w(o)||$(o)||z(o),[V]:o=>w(o)||$(o)||z(o)},O=Symbol("radioGroupKey"),W=(o,u)=>{const s=E(),a=J(O,void 0),i=b(()=>!!a),c=b(()=>F(o.value)?o.label:o.value),r=b({get(){return i.value?a.modelValue:o.modelValue},set(t){i.value?a.changeEvent(t):u&&u(R,t),s.value.checked=o.modelValue===c.value}}),d=Q(b(()=>a?.size)),l=X(b(()=>a?.disabled)),n=E(!1),p=b(()=>l.value||i.value&&r.value!==c.value?-1:0);return Y({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},b(()=>i.value&&F(o.value))),{radioRef:s,isGroup:i,radioGroup:a,focus:n,size:d,disabled:l,tabIndex:p,modelValue:r,actualValue:c}},pe=y({name:"ElRadio"}),me=y({...pe,props:ce,emits:j,setup(o,{emit:u}){const s=o,a=I("radio"),{radioRef:i,radioGroup:c,focus:r,size:d,disabled:l,modelValue:n,actualValue:p}=W(s,u);function t(){U(()=>u(V,n.value))}return(m,g)=>{var v;return C(),G("label",{class:f([e(a).b(),e(a).is("disabled",e(l)),e(a).is("focus",e(r)),e(a).is("bordered",m.border),e(a).is("checked",e(n)===e(p)),e(a).m(e(d))])},[_("span",{class:f([e(a).e("input"),e(a).is("disabled",e(l)),e(a).is("checked",e(n)===e(p))])},[D(_("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":S=>A(n)?n.value=S:null,class:f(e(a).e("original")),value:e(p),name:m.name||((v=e(c))==null?void 0:v.name),disabled:e(l),checked:e(n)===e(p),type:"radio",onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onChange:t,onClick:h(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[x,e(n)]]),_("span",{class:f(e(a).e("inner"))},null,2)],2),_("span",{class:f(e(a).e("label")),onKeydown:h(()=>{},["stop"])},[N(m.$slots,"default",{},()=>[K(M(m.label),1)])],42,["onKeydown"])],2)}}});var be=k(me,[["__file","radio.vue"]]);const fe=B({...T}),ve=y({name:"ElRadioButton"}),_e=y({...ve,props:fe,setup(o){const u=o,s=I("radio"),{radioRef:a,focus:i,size:c,disabled:r,modelValue:d,radioGroup:l,actualValue:n}=W(u),p=b(()=>({backgroundColor:l?.fill||"",borderColor:l?.fill||"",boxShadow:l?.fill?`-1px 0 0 0 ${l.fill}`:"",color:l?.textColor||""}));return(t,m)=>{var g;return C(),G("label",{class:f([e(s).b("button"),e(s).is("active",e(d)===e(n)),e(s).is("disabled",e(r)),e(s).is("focus",e(i)),e(s).bm("button",e(c))])},[D(_("input",{ref_key:"radioRef",ref:a,"onUpdate:modelValue":v=>A(d)?d.value=v:null,class:f(e(s).be("button","original-radio")),value:e(n),type:"radio",name:t.name||((g=e(l))==null?void 0:g.name),disabled:e(r),onFocus:v=>i.value=!0,onBlur:v=>i.value=!1,onClick:h(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[x,e(d)]]),_("span",{class:f(e(s).be("button","inner")),style:Z(e(d)===e(n)?e(p):{}),onKeydown:h(()=>{},["stop"])},[N(t.$slots,"default",{},()=>[K(M(t.label),1)])],46,["onKeydown"])],2)}}});var q=k(_e,[["__file","radio-button.vue"]]);const ye=B({id:{type:String,default:void 0},size:P,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...ie(["ariaLabel"])}),ge=j,he=y({name:"ElRadioGroup"}),Be=y({...he,props:ye,emits:ge,setup(o,{emit:u}){const s=o,a=I("radio"),i=ee(),c=E(),{formItem:r}=de(),{inputId:d,isLabeledByFormItem:l}=ue(s,{formItemContext:r}),n=t=>{u(R,t),U(()=>u(V,t))};ae(()=>{const t=c.value.querySelectorAll("[type=radio]"),m=t[0];!Array.from(t).some(g=>g.checked)&&m&&(m.tabIndex=0)});const p=b(()=>s.name||i.value);return oe(O,le({...se(s),changeEvent:n,name:p})),te(()=>s.modelValue,()=>{s.validateEvent&&r?.validate("change").catch(t=>ne())}),(t,m)=>(C(),G("div",{id:e(d),ref_key:"radioGroupRef",ref:c,class:f(e(a).b("group")),role:"radiogroup","aria-label":e(l)?void 0:t.ariaLabel||"radio-group","aria-labelledby":e(l)?e(r).labelId:void 0},[N(t.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var H=k(Be,[["__file","radio-group.vue"]]);re(be,{RadioButton:q,RadioGroup:H});const Re=L(H),ke=L(q);export{ke as E,Re as a};
1
+ import{bh as w,ak as $,aM as z,aj as B,cg as V,ch as R,bS as P,al as E,an as J,c as b,bM as F,bo as Q,bQ as X,bO as Y,_ as k,d as y,a as I,b as G,o as C,t as _,J as D,di as x,e,ah as h,n as f,c_ as A,r as N,D as K,x as M,bc as U,f as Z,aW as ee,av as ae,am as oe,bG as le,ca as se,aw as te,bN as ne,w as L,g as re}from"./index-DI_C3Ao9.js";import{u as ie}from"./index-sVUmFHgv.js";import{u as de,a as ue}from"./use-form-item-D6NQ9sNV.js";const T=B({modelValue:{type:[String,Number,Boolean],default:void 0},size:P,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),ce=B({...T,border:Boolean}),j={[R]:o=>w(o)||$(o)||z(o),[V]:o=>w(o)||$(o)||z(o)},O=Symbol("radioGroupKey"),W=(o,u)=>{const s=E(),a=J(O,void 0),i=b(()=>!!a),c=b(()=>F(o.value)?o.label:o.value),r=b({get(){return i.value?a.modelValue:o.modelValue},set(t){i.value?a.changeEvent(t):u&&u(R,t),s.value.checked=o.modelValue===c.value}}),d=Q(b(()=>a?.size)),l=X(b(()=>a?.disabled)),n=E(!1),p=b(()=>l.value||i.value&&r.value!==c.value?-1:0);return Y({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},b(()=>i.value&&F(o.value))),{radioRef:s,isGroup:i,radioGroup:a,focus:n,size:d,disabled:l,tabIndex:p,modelValue:r,actualValue:c}},pe=y({name:"ElRadio"}),me=y({...pe,props:ce,emits:j,setup(o,{emit:u}){const s=o,a=I("radio"),{radioRef:i,radioGroup:c,focus:r,size:d,disabled:l,modelValue:n,actualValue:p}=W(s,u);function t(){U(()=>u(V,n.value))}return(m,g)=>{var v;return C(),G("label",{class:f([e(a).b(),e(a).is("disabled",e(l)),e(a).is("focus",e(r)),e(a).is("bordered",m.border),e(a).is("checked",e(n)===e(p)),e(a).m(e(d))])},[_("span",{class:f([e(a).e("input"),e(a).is("disabled",e(l)),e(a).is("checked",e(n)===e(p))])},[D(_("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":S=>A(n)?n.value=S:null,class:f(e(a).e("original")),value:e(p),name:m.name||((v=e(c))==null?void 0:v.name),disabled:e(l),checked:e(n)===e(p),type:"radio",onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onChange:t,onClick:h(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[x,e(n)]]),_("span",{class:f(e(a).e("inner"))},null,2)],2),_("span",{class:f(e(a).e("label")),onKeydown:h(()=>{},["stop"])},[N(m.$slots,"default",{},()=>[K(M(m.label),1)])],42,["onKeydown"])],2)}}});var be=k(me,[["__file","radio.vue"]]);const fe=B({...T}),ve=y({name:"ElRadioButton"}),_e=y({...ve,props:fe,setup(o){const u=o,s=I("radio"),{radioRef:a,focus:i,size:c,disabled:r,modelValue:d,radioGroup:l,actualValue:n}=W(u),p=b(()=>({backgroundColor:l?.fill||"",borderColor:l?.fill||"",boxShadow:l?.fill?`-1px 0 0 0 ${l.fill}`:"",color:l?.textColor||""}));return(t,m)=>{var g;return C(),G("label",{class:f([e(s).b("button"),e(s).is("active",e(d)===e(n)),e(s).is("disabled",e(r)),e(s).is("focus",e(i)),e(s).bm("button",e(c))])},[D(_("input",{ref_key:"radioRef",ref:a,"onUpdate:modelValue":v=>A(d)?d.value=v:null,class:f(e(s).be("button","original-radio")),value:e(n),type:"radio",name:t.name||((g=e(l))==null?void 0:g.name),disabled:e(r),onFocus:v=>i.value=!0,onBlur:v=>i.value=!1,onClick:h(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[x,e(d)]]),_("span",{class:f(e(s).be("button","inner")),style:Z(e(d)===e(n)?e(p):{}),onKeydown:h(()=>{},["stop"])},[N(t.$slots,"default",{},()=>[K(M(t.label),1)])],46,["onKeydown"])],2)}}});var q=k(_e,[["__file","radio-button.vue"]]);const ye=B({id:{type:String,default:void 0},size:P,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...ie(["ariaLabel"])}),ge=j,he=y({name:"ElRadioGroup"}),Be=y({...he,props:ye,emits:ge,setup(o,{emit:u}){const s=o,a=I("radio"),i=ee(),c=E(),{formItem:r}=de(),{inputId:d,isLabeledByFormItem:l}=ue(s,{formItemContext:r}),n=t=>{u(R,t),U(()=>u(V,t))};ae(()=>{const t=c.value.querySelectorAll("[type=radio]"),m=t[0];!Array.from(t).some(g=>g.checked)&&m&&(m.tabIndex=0)});const p=b(()=>s.name||i.value);return oe(O,le({...se(s),changeEvent:n,name:p})),te(()=>s.modelValue,()=>{s.validateEvent&&r?.validate("change").catch(t=>ne())}),(t,m)=>(C(),G("div",{id:e(d),ref_key:"radioGroupRef",ref:c,class:f(e(a).b("group")),role:"radiogroup","aria-label":e(l)?void 0:t.ariaLabel||"radio-group","aria-labelledby":e(l)?e(r).labelId:void 0},[N(t.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var H=k(Be,[["__file","radio-group.vue"]]);re(be,{RadioButton:q,RadioGroup:H});const Re=L(H),ke=L(q);export{ke as E,Re as a};
@@ -1 +1 @@
1
- import{c1 as Se,b_ as de,b$ as Re,cX as Oe,aC as ae,d as V,bm as $e,dZ as W,av as fe,bK as xe,cz as Be,aj as q,ap as H,_ as be,an as re,bE as ie,a as J,al as T,aw as K,ao as ve,b as me,o as pe,f as ke,n as he,e as B,bF as ne,bc as X,c as D,bU as Ae,k as m,E as Y,b4 as Fe,b5 as Le,aI as F,b3 as ze,bh as Me,ak as Ve,r as se,dY as Ie,ch as ge,aK as _e,am as Ke,u as De,aS as ce,bG as Ue,d_ as Ge,J as We,y as Ye,K as He,w as Xe,g as qe}from"./index-BDnu8Rx2.js";import{m as le,b as oe,e as Je,f as Ze}from"./typescript-DhyxNYRx.js";import{c as L}from"./strings-DEKOZWkP.js";import{g as Qe,b as je}from"./_baseClone-DyBfXBsi.js";import{c as et}from"./_initCloneObject-Rg_w1aJn.js";import{i as tt}from"./isPlainObject-D0l8uyMi.js";import{f as at}from"./index-DZxnN0Hy.js";function nt(e,t,s){var u=-1,a=e.length;t<0&&(t=-t>a?0:a+t),s=s>a?a:s,s<0&&(s+=a),a=t>s?0:s-t>>>0,t>>>=0;for(var l=Array(a);++u<a;)l[u]=e[u+t];return l}function st(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function lt(e,t){return t.length<2?e:Se(e,nt(t,0,-1))}function ot(e,t){return t=de(t,e),e=lt(e,t),e==null||delete e[Re(st(t))]}function rt(e){return tt(e)?void 0:e}var it=1,ct=2,ut=4,dt=at(function(e,t){var s={};if(e==null)return s;var u=!1;t=Oe(t,function(l){return l=de(l,e),u||(u=l.length>1),l}),et(e,Qe(e),s),u&&(s=je(s,it|ct|ut,rt));for(var a=t.length;a--;)ot(s,t[a]);return s});const ft=(e,t,s)=>xe(e.subTree).filter(l=>{var P;return Be(l)&&((P=l.type)==null?void 0:P.name)===t&&!!l.component}).map(l=>l.component.uid).map(l=>s[l]).filter(l=>!!l),bt=(e,t)=>{const s=ae({}),u=ae([]),a=new WeakMap,l=v=>{s.value[v.uid]=v,W(s),fe(()=>{const d=v.getVnode().el,n=d.parentNode;if(!a.has(n)){a.set(n,[]);const f=n.insertBefore.bind(n);n.insertBefore=(_,c)=>(a.get(n).some(N=>_===N||c===N)&&W(s),f(_,c))}a.get(n).push(d)})},P=v=>{delete s.value[v.uid],W(s);const d=v.getVnode().el,n=d.parentNode,f=a.get(n),_=f.indexOf(d);f.splice(_,1)},p=()=>{u.value=ft(e,t,s.value)},g=v=>v.render(),h=V({setup(v,{slots:d}){return()=>(p(),d.default?$e(g,{render:d.default}):null)}});return{children:u,addChild:l,removeChild:P,ChildrenSorter:h}},Z=Symbol("tabsRootContextKey"),vt=q({tabs:{type:H(Array),default:()=>le([])},tabRefs:{type:H(Object),default:()=>le({})}}),ye="ElTabBar",mt=V({name:ye}),pt=V({...mt,props:vt,setup(e,{expose:t}){const s=e,u=re(Z);u||ie(ye,"<el-tabs><el-tab-bar /></el-tabs>");const a=J("tabs"),l=T(),P=T(),p=()=>{let n=0,f=0;const _=["top","bottom"].includes(u.props.tabPosition)?"width":"height",c=_==="width"?"x":"y",R=c==="x"?"left":"top";return s.tabs.every(N=>{if(ne(N.paneName))return!1;const r=s.tabRefs[N.paneName];if(!r)return!1;if(!N.active)return!0;n=r[`offset${L(R)}`],f=r[`client${L(_)}`];const C=window.getComputedStyle(r);return _==="width"&&(f-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),n+=Number.parseFloat(C.paddingLeft)),!1}),{[_]:`${f}px`,transform:`translate${L(c)}(${n}px)`}},g=()=>P.value=p(),h=[],v=()=>{h.forEach(n=>n.stop()),h.length=0,Object.values(s.tabRefs).forEach(n=>{h.push(oe(n,g))})};K(()=>s.tabs,async()=>{await X(),g(),v()},{immediate:!0});const d=oe(l,()=>g());return ve(()=>{h.forEach(n=>n.stop()),h.length=0,d.stop()}),t({ref:l,update:g}),(n,f)=>(pe(),me("div",{ref_key:"barRef",ref:l,class:he([B(a).e("active-bar"),B(a).is(B(u).props.tabPosition)]),style:ke(P.value)},null,6))}});var ht=be(pt,[["__file","tab-bar.vue"]]);const gt=q({panes:{type:H(Array),default:()=>le([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),_t={tabClick:(e,t,s)=>s instanceof Event,tabRemove:(e,t)=>t instanceof Event},ue="ElTabNav",yt=V({name:ue,props:gt,emits:_t,setup(e,{expose:t,emit:s}){const u=re(Z);u||ie(ue,"<el-tabs><tab-nav /></el-tabs>");const a=J("tabs"),l=Je(),P=Ze(),p=T(),g=T(),h=T(),v=T({}),d=T(),n=T(!1),f=T(0),_=T(!1),c=T(!0),R=ae(),N=D(()=>["top","bottom"].includes(u.props.tabPosition)?"width":"height"),r=D(()=>({transform:`translate${N.value==="width"?"X":"Y"}(-${f.value}px)`})),C=()=>{if(!p.value)return;const i=p.value[`offset${L(N.value)}`],b=f.value;if(!b)return;const o=b>i?b-i:0;f.value=o},S=()=>{if(!p.value||!g.value)return;const i=g.value[`offset${L(N.value)}`],b=p.value[`offset${L(N.value)}`],o=f.value;if(i-o<=b)return;const E=i-o>b*2?o+b:i-b;f.value=E},k=async()=>{const i=g.value;if(!n.value||!h.value||!p.value||!i)return;await X();const b=v.value[e.currentName];if(!b)return;const o=p.value,E=["top","bottom"].includes(u.props.tabPosition),y=b.getBoundingClientRect(),w=o.getBoundingClientRect(),U=E?i.offsetWidth-w.width:i.offsetHeight-w.height,A=f.value;let $=A;E?(y.left<w.left&&($=A-(w.left-y.left)),y.right>w.right&&($=A+y.right-w.right)):(y.top<w.top&&($=A-(w.top-y.top)),y.bottom>w.bottom&&($=A+(y.bottom-w.bottom))),$=Math.max($,0),f.value=Math.min($,U)},z=()=>{var i;if(!g.value||!p.value)return;e.stretch&&((i=d.value)==null||i.update());const b=g.value[`offset${L(N.value)}`],o=p.value[`offset${L(N.value)}`],E=f.value;o<b?(n.value=n.value||{},n.value.prev=E,n.value.next=E+o<b,b-E<o&&(f.value=b-o)):(n.value=!1,E>0&&(f.value=0))},I=i=>{let b=0;switch(i.code){case F.left:case F.up:b=-1;break;case F.right:case F.down:b=1;break;default:return}const o=Array.from(i.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let y=o.indexOf(i.target)+b;y<0?y=o.length-1:y>=o.length&&(y=0),o[y].focus({preventScroll:!0}),o[y].click(),M()},M=()=>{c.value&&(_.value=!0)},O=()=>_.value=!1,Q=(i,b)=>{v.value[b]=i},Te=async()=>{await X();const i=v.value[e.currentName];i?.focus({preventScroll:!0})};return K(l,i=>{i==="hidden"?c.value=!1:i==="visible"&&setTimeout(()=>c.value=!0,50)}),K(P,i=>{i?setTimeout(()=>c.value=!0,50):c.value=!1}),oe(h,z),fe(()=>setTimeout(()=>k(),0)),Ae(()=>z()),t({scrollToActiveTab:k,removeFocus:O,focusActiveTab:Te,tabListRef:g,tabBarRef:d,scheduleRender:()=>W(R)}),()=>{const i=n.value?[m("span",{class:[a.e("nav-prev"),a.is("disabled",!n.value.prev)],onClick:C},[m(Y,null,{default:()=>[m(Fe,null,null)]})]),m("span",{class:[a.e("nav-next"),a.is("disabled",!n.value.next)],onClick:S},[m(Y,null,{default:()=>[m(Le,null,null)]})])]:null,b=e.panes.map((o,E)=>{var y,w,U,A;const $=o.uid,j=o.props.disabled,G=(w=(y=o.props.name)!=null?y:o.index)!=null?w:`${E}`,ee=!j&&(o.isClosable||e.editable);o.index=`${E}`;const Pe=ee?m(Y,{class:"is-icon-close",onClick:x=>s("tabRemove",o,x)},{default:()=>[m(ze,null,null)]}):null,Ee=((A=(U=o.slots).label)==null?void 0:A.call(U))||o.props.label,we=!j&&o.active?0:-1;return m("div",{ref:x=>Q(x,G),class:[a.e("item"),a.is(u.props.tabPosition),a.is("active",o.active),a.is("disabled",j),a.is("closable",ee),a.is("focus",_.value)],id:`tab-${G}`,key:`tab-${$}`,"aria-controls":`pane-${G}`,role:"tab","aria-selected":o.active,tabindex:we,onFocus:()=>M(),onBlur:()=>O(),onClick:x=>{O(),s("tabClick",o,G,x)},onKeydown:x=>{ee&&(x.code===F.delete||x.code===F.backspace)&&s("tabRemove",o,x)}},[Ee,Pe])});return R.value,m("div",{ref:h,class:[a.e("nav-wrap"),a.is("scrollable",!!n.value),a.is(u.props.tabPosition)]},[i,m("div",{class:a.e("nav-scroll"),ref:p},[e.panes.length>0?m("div",{class:[a.e("nav"),a.is(u.props.tabPosition),a.is("stretch",e.stretch&&["top","bottom"].includes(u.props.tabPosition))],ref:g,style:r.value,role:"tablist",onKeydown:I},[e.type?null:m(ht,{ref:d,tabs:[...e.panes],tabRefs:v.value},null),b]):null])])}}}),Nt=q({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:H(Function),default:()=>!0},stretch:Boolean}),te=e=>Me(e)||Ve(e),Ct={[ge]:e=>te(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>te(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>te(e),tabAdd:()=>!0},Tt=V({name:"ElTabs",props:Nt,emits:Ct,setup(e,{emit:t,slots:s,expose:u}){var a;const l=J("tabs"),P=D(()=>["left","right"].includes(e.tabPosition)),{children:p,addChild:g,removeChild:h,ChildrenSorter:v}=bt(_e(),"ElTabPane"),d=T(),n=T((a=e.modelValue)!=null?a:"0"),f=async(r,C=!1)=>{var S,k,z,I;if(!(n.value===r||ne(r)))try{let M;if(e.beforeLeave){const O=e.beforeLeave(r,n.value);M=O instanceof Promise?await O:O}else M=!0;if(M!==!1){const O=(S=p.value.find(Q=>Q.paneName===n.value))==null?void 0:S.isFocusInsidePane();n.value=r,C&&(t(ge,r),t("tabChange",r)),(z=(k=d.value)==null?void 0:k.removeFocus)==null||z.call(k),O&&((I=d.value)==null||I.focusActiveTab())}}catch{}},_=(r,C,S)=>{r.props.disabled||(t("tabClick",r,S),f(C,!0))},c=(r,C)=>{r.props.disabled||ne(r.props.name)||(C.stopPropagation(),t("edit",r.props.name,"remove"),t("tabRemove",r.props.name))},R=()=>{t("edit",void 0,"add"),t("tabAdd")},N=r=>{const C=r.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?r.children[0].el:r.children[1].el;C!==S&&C.before(S)};return K(()=>e.modelValue,r=>f(r)),K(n,async()=>{var r;await X(),(r=d.value)==null||r.scrollToActiveTab()}),Ke(Z,{props:e,currentName:n,registerPane:g,unregisterPane:h,nav$:d}),u({currentName:n,get tabNavRef(){return dt(d.value,["scheduleRender"])}}),()=>{const r=s["add-icon"],C=e.editable||e.addable?m("div",{class:[l.e("new-tab"),P.value&&l.e("new-tab-vertical")],tabindex:"0",onClick:R,onKeydown:I=>{[F.enter,F.numpadEnter].includes(I.code)&&R()}},[r?se(s,"add-icon"):m(Y,{class:l.is("icon-plus")},{default:()=>[m(Ie,null,null)]})]):null,S=()=>m(yt,{ref:d,currentName:n.value,editable:e.editable,type:e.type,panes:p.value,stretch:e.stretch,onTabClick:_,onTabRemove:c},null),k=m("div",{class:[l.e("header"),P.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[m(v,null,{default:S,$stable:!0}),C]),z=m("div",{class:l.e("content")},[se(s,"default")]);return m("div",{class:[l.b(),l.m(e.tabPosition),{[l.m("card")]:e.type==="card",[l.m("border-card")]:e.type==="border-card"}],onVnodeMounted:N,onVnodeUpdated:N},[z,k])}}});var Pt=Tt;const Et=q({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Ne="ElTabPane",wt=V({name:Ne}),St=V({...wt,props:Et,setup(e){const t=e,s=_e(),u=De(),a=re(Z);a||ie(Ne,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const l=J("tab-pane"),P=T(),p=T(),g=D(()=>t.closable||a.props.closable),h=ce(()=>{var c;return a.currentName.value===((c=t.name)!=null?c:p.value)}),v=T(h.value),d=D(()=>{var c;return(c=t.name)!=null?c:p.value}),n=ce(()=>!t.lazy||v.value||h.value),f=()=>{var c;return(c=P.value)==null?void 0:c.contains(document.activeElement)};K(h,c=>{c&&(v.value=!0)});const _=Ue({uid:s.uid,getVnode:()=>s.vnode,slots:u,props:t,paneName:d,active:h,index:p,isClosable:g,isFocusInsidePane:f});return a.registerPane(_),ve(()=>{a.unregisterPane(_)}),Ge(()=>{var c;u.label&&((c=a.nav$.value)==null||c.scheduleRender())}),(c,R)=>B(n)?We((pe(),me("div",{key:0,id:`pane-${B(d)}`,ref_key:"paneRef",ref:P,class:he(B(l).b()),role:"tabpanel","aria-hidden":!B(h),"aria-labelledby":`tab-${B(d)}`},[se(c.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[He,B(h)]]):Ye("v-if",!0)}});var Ce=be(St,[["__file","tab-pane.vue"]]);const Ft=qe(Pt,{TabPane:Ce}),Lt=Xe(Ce);export{Lt as E,Ft as a};
1
+ import{c1 as Se,b_ as de,b$ as Re,cX as Oe,aC as ae,d as V,bm as $e,dX as W,av as fe,bK as xe,cz as Be,aj as q,ap as Y,_ as be,an as re,bE as ie,a as J,al as T,aw as K,ao as ve,b as me,o as pe,f as ke,n as he,e as B,bF as ne,bc as H,c as D,bU as Ae,k as m,E as X,b4 as Fe,b5 as Le,aI as F,b3 as ze,bh as Me,ak as Ve,r as se,dY as Ie,ch as ge,aK as _e,am as Ke,u as De,aS as ce,bG as Ue,dZ as Ge,J as We,y as Xe,K as Ye,w as He,g as qe}from"./index-DI_C3Ao9.js";import{m as le,b as oe,e as Je,f as Ze}from"./typescript-8pw9sVHl.js";import{c as L}from"./strings-CKxhwaoH.js";import{g as Qe,b as je}from"./_baseClone-2NfMeWJP.js";import{c as et}from"./_initCloneObject-CfGFlXWr.js";import{i as tt}from"./isPlainObject-BiS_yJCA.js";import{f as at}from"./index-sVUmFHgv.js";function nt(e,t,s){var u=-1,a=e.length;t<0&&(t=-t>a?0:a+t),s=s>a?a:s,s<0&&(s+=a),a=t>s?0:s-t>>>0,t>>>=0;for(var l=Array(a);++u<a;)l[u]=e[u+t];return l}function st(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function lt(e,t){return t.length<2?e:Se(e,nt(t,0,-1))}function ot(e,t){return t=de(t,e),e=lt(e,t),e==null||delete e[Re(st(t))]}function rt(e){return tt(e)?void 0:e}var it=1,ct=2,ut=4,dt=at(function(e,t){var s={};if(e==null)return s;var u=!1;t=Oe(t,function(l){return l=de(l,e),u||(u=l.length>1),l}),et(e,Qe(e),s),u&&(s=je(s,it|ct|ut,rt));for(var a=t.length;a--;)ot(s,t[a]);return s});const ft=(e,t,s)=>xe(e.subTree).filter(l=>{var P;return Be(l)&&((P=l.type)==null?void 0:P.name)===t&&!!l.component}).map(l=>l.component.uid).map(l=>s[l]).filter(l=>!!l),bt=(e,t)=>{const s=ae({}),u=ae([]),a=new WeakMap,l=v=>{s.value[v.uid]=v,W(s),fe(()=>{const d=v.getVnode().el,n=d.parentNode;if(!a.has(n)){a.set(n,[]);const f=n.insertBefore.bind(n);n.insertBefore=(_,c)=>(a.get(n).some(N=>_===N||c===N)&&W(s),f(_,c))}a.get(n).push(d)})},P=v=>{delete s.value[v.uid],W(s);const d=v.getVnode().el,n=d.parentNode,f=a.get(n),_=f.indexOf(d);f.splice(_,1)},p=()=>{u.value=ft(e,t,s.value)},g=v=>v.render(),h=V({setup(v,{slots:d}){return()=>(p(),d.default?$e(g,{render:d.default}):null)}});return{children:u,addChild:l,removeChild:P,ChildrenSorter:h}},Z=Symbol("tabsRootContextKey"),vt=q({tabs:{type:Y(Array),default:()=>le([])},tabRefs:{type:Y(Object),default:()=>le({})}}),ye="ElTabBar",mt=V({name:ye}),pt=V({...mt,props:vt,setup(e,{expose:t}){const s=e,u=re(Z);u||ie(ye,"<el-tabs><el-tab-bar /></el-tabs>");const a=J("tabs"),l=T(),P=T(),p=()=>{let n=0,f=0;const _=["top","bottom"].includes(u.props.tabPosition)?"width":"height",c=_==="width"?"x":"y",R=c==="x"?"left":"top";return s.tabs.every(N=>{if(ne(N.paneName))return!1;const r=s.tabRefs[N.paneName];if(!r)return!1;if(!N.active)return!0;n=r[`offset${L(R)}`],f=r[`client${L(_)}`];const C=window.getComputedStyle(r);return _==="width"&&(f-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),n+=Number.parseFloat(C.paddingLeft)),!1}),{[_]:`${f}px`,transform:`translate${L(c)}(${n}px)`}},g=()=>P.value=p(),h=[],v=()=>{h.forEach(n=>n.stop()),h.length=0,Object.values(s.tabRefs).forEach(n=>{h.push(oe(n,g))})};K(()=>s.tabs,async()=>{await H(),g(),v()},{immediate:!0});const d=oe(l,()=>g());return ve(()=>{h.forEach(n=>n.stop()),h.length=0,d.stop()}),t({ref:l,update:g}),(n,f)=>(pe(),me("div",{ref_key:"barRef",ref:l,class:he([B(a).e("active-bar"),B(a).is(B(u).props.tabPosition)]),style:ke(P.value)},null,6))}});var ht=be(pt,[["__file","tab-bar.vue"]]);const gt=q({panes:{type:Y(Array),default:()=>le([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),_t={tabClick:(e,t,s)=>s instanceof Event,tabRemove:(e,t)=>t instanceof Event},ue="ElTabNav",yt=V({name:ue,props:gt,emits:_t,setup(e,{expose:t,emit:s}){const u=re(Z);u||ie(ue,"<el-tabs><tab-nav /></el-tabs>");const a=J("tabs"),l=Je(),P=Ze(),p=T(),g=T(),h=T(),v=T({}),d=T(),n=T(!1),f=T(0),_=T(!1),c=T(!0),R=ae(),N=D(()=>["top","bottom"].includes(u.props.tabPosition)?"width":"height"),r=D(()=>({transform:`translate${N.value==="width"?"X":"Y"}(-${f.value}px)`})),C=()=>{if(!p.value)return;const i=p.value[`offset${L(N.value)}`],b=f.value;if(!b)return;const o=b>i?b-i:0;f.value=o},S=()=>{if(!p.value||!g.value)return;const i=g.value[`offset${L(N.value)}`],b=p.value[`offset${L(N.value)}`],o=f.value;if(i-o<=b)return;const E=i-o>b*2?o+b:i-b;f.value=E},k=async()=>{const i=g.value;if(!n.value||!h.value||!p.value||!i)return;await H();const b=v.value[e.currentName];if(!b)return;const o=p.value,E=["top","bottom"].includes(u.props.tabPosition),y=b.getBoundingClientRect(),w=o.getBoundingClientRect(),U=E?i.offsetWidth-w.width:i.offsetHeight-w.height,A=f.value;let $=A;E?(y.left<w.left&&($=A-(w.left-y.left)),y.right>w.right&&($=A+y.right-w.right)):(y.top<w.top&&($=A-(w.top-y.top)),y.bottom>w.bottom&&($=A+(y.bottom-w.bottom))),$=Math.max($,0),f.value=Math.min($,U)},z=()=>{var i;if(!g.value||!p.value)return;e.stretch&&((i=d.value)==null||i.update());const b=g.value[`offset${L(N.value)}`],o=p.value[`offset${L(N.value)}`],E=f.value;o<b?(n.value=n.value||{},n.value.prev=E,n.value.next=E+o<b,b-E<o&&(f.value=b-o)):(n.value=!1,E>0&&(f.value=0))},I=i=>{let b=0;switch(i.code){case F.left:case F.up:b=-1;break;case F.right:case F.down:b=1;break;default:return}const o=Array.from(i.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let y=o.indexOf(i.target)+b;y<0?y=o.length-1:y>=o.length&&(y=0),o[y].focus({preventScroll:!0}),o[y].click(),M()},M=()=>{c.value&&(_.value=!0)},O=()=>_.value=!1,Q=(i,b)=>{v.value[b]=i},Te=async()=>{await H();const i=v.value[e.currentName];i?.focus({preventScroll:!0})};return K(l,i=>{i==="hidden"?c.value=!1:i==="visible"&&setTimeout(()=>c.value=!0,50)}),K(P,i=>{i?setTimeout(()=>c.value=!0,50):c.value=!1}),oe(h,z),fe(()=>setTimeout(()=>k(),0)),Ae(()=>z()),t({scrollToActiveTab:k,removeFocus:O,focusActiveTab:Te,tabListRef:g,tabBarRef:d,scheduleRender:()=>W(R)}),()=>{const i=n.value?[m("span",{class:[a.e("nav-prev"),a.is("disabled",!n.value.prev)],onClick:C},[m(X,null,{default:()=>[m(Fe,null,null)]})]),m("span",{class:[a.e("nav-next"),a.is("disabled",!n.value.next)],onClick:S},[m(X,null,{default:()=>[m(Le,null,null)]})])]:null,b=e.panes.map((o,E)=>{var y,w,U,A;const $=o.uid,j=o.props.disabled,G=(w=(y=o.props.name)!=null?y:o.index)!=null?w:`${E}`,ee=!j&&(o.isClosable||e.editable);o.index=`${E}`;const Pe=ee?m(X,{class:"is-icon-close",onClick:x=>s("tabRemove",o,x)},{default:()=>[m(ze,null,null)]}):null,Ee=((A=(U=o.slots).label)==null?void 0:A.call(U))||o.props.label,we=!j&&o.active?0:-1;return m("div",{ref:x=>Q(x,G),class:[a.e("item"),a.is(u.props.tabPosition),a.is("active",o.active),a.is("disabled",j),a.is("closable",ee),a.is("focus",_.value)],id:`tab-${G}`,key:`tab-${$}`,"aria-controls":`pane-${G}`,role:"tab","aria-selected":o.active,tabindex:we,onFocus:()=>M(),onBlur:()=>O(),onClick:x=>{O(),s("tabClick",o,G,x)},onKeydown:x=>{ee&&(x.code===F.delete||x.code===F.backspace)&&s("tabRemove",o,x)}},[Ee,Pe])});return R.value,m("div",{ref:h,class:[a.e("nav-wrap"),a.is("scrollable",!!n.value),a.is(u.props.tabPosition)]},[i,m("div",{class:a.e("nav-scroll"),ref:p},[e.panes.length>0?m("div",{class:[a.e("nav"),a.is(u.props.tabPosition),a.is("stretch",e.stretch&&["top","bottom"].includes(u.props.tabPosition))],ref:g,style:r.value,role:"tablist",onKeydown:I},[e.type?null:m(ht,{ref:d,tabs:[...e.panes],tabRefs:v.value},null),b]):null])])}}}),Nt=q({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Y(Function),default:()=>!0},stretch:Boolean}),te=e=>Me(e)||Ve(e),Ct={[ge]:e=>te(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>te(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>te(e),tabAdd:()=>!0},Tt=V({name:"ElTabs",props:Nt,emits:Ct,setup(e,{emit:t,slots:s,expose:u}){var a;const l=J("tabs"),P=D(()=>["left","right"].includes(e.tabPosition)),{children:p,addChild:g,removeChild:h,ChildrenSorter:v}=bt(_e(),"ElTabPane"),d=T(),n=T((a=e.modelValue)!=null?a:"0"),f=async(r,C=!1)=>{var S,k,z,I;if(!(n.value===r||ne(r)))try{let M;if(e.beforeLeave){const O=e.beforeLeave(r,n.value);M=O instanceof Promise?await O:O}else M=!0;if(M!==!1){const O=(S=p.value.find(Q=>Q.paneName===n.value))==null?void 0:S.isFocusInsidePane();n.value=r,C&&(t(ge,r),t("tabChange",r)),(z=(k=d.value)==null?void 0:k.removeFocus)==null||z.call(k),O&&((I=d.value)==null||I.focusActiveTab())}}catch{}},_=(r,C,S)=>{r.props.disabled||(t("tabClick",r,S),f(C,!0))},c=(r,C)=>{r.props.disabled||ne(r.props.name)||(C.stopPropagation(),t("edit",r.props.name,"remove"),t("tabRemove",r.props.name))},R=()=>{t("edit",void 0,"add"),t("tabAdd")},N=r=>{const C=r.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?r.children[0].el:r.children[1].el;C!==S&&C.before(S)};return K(()=>e.modelValue,r=>f(r)),K(n,async()=>{var r;await H(),(r=d.value)==null||r.scrollToActiveTab()}),Ke(Z,{props:e,currentName:n,registerPane:g,unregisterPane:h,nav$:d}),u({currentName:n,get tabNavRef(){return dt(d.value,["scheduleRender"])}}),()=>{const r=s["add-icon"],C=e.editable||e.addable?m("div",{class:[l.e("new-tab"),P.value&&l.e("new-tab-vertical")],tabindex:"0",onClick:R,onKeydown:I=>{[F.enter,F.numpadEnter].includes(I.code)&&R()}},[r?se(s,"add-icon"):m(X,{class:l.is("icon-plus")},{default:()=>[m(Ie,null,null)]})]):null,S=()=>m(yt,{ref:d,currentName:n.value,editable:e.editable,type:e.type,panes:p.value,stretch:e.stretch,onTabClick:_,onTabRemove:c},null),k=m("div",{class:[l.e("header"),P.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[m(v,null,{default:S,$stable:!0}),C]),z=m("div",{class:l.e("content")},[se(s,"default")]);return m("div",{class:[l.b(),l.m(e.tabPosition),{[l.m("card")]:e.type==="card",[l.m("border-card")]:e.type==="border-card"}],onVnodeMounted:N,onVnodeUpdated:N},[z,k])}}});var Pt=Tt;const Et=q({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),Ne="ElTabPane",wt=V({name:Ne}),St=V({...wt,props:Et,setup(e){const t=e,s=_e(),u=De(),a=re(Z);a||ie(Ne,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const l=J("tab-pane"),P=T(),p=T(),g=D(()=>t.closable||a.props.closable),h=ce(()=>{var c;return a.currentName.value===((c=t.name)!=null?c:p.value)}),v=T(h.value),d=D(()=>{var c;return(c=t.name)!=null?c:p.value}),n=ce(()=>!t.lazy||v.value||h.value),f=()=>{var c;return(c=P.value)==null?void 0:c.contains(document.activeElement)};K(h,c=>{c&&(v.value=!0)});const _=Ue({uid:s.uid,getVnode:()=>s.vnode,slots:u,props:t,paneName:d,active:h,index:p,isClosable:g,isFocusInsidePane:f});return a.registerPane(_),ve(()=>{a.unregisterPane(_)}),Ge(()=>{var c;u.label&&((c=a.nav$.value)==null||c.scheduleRender())}),(c,R)=>B(n)?We((pe(),me("div",{key:0,id:`pane-${B(d)}`,ref_key:"paneRef",ref:P,class:he(B(l).b()),role:"tabpanel","aria-hidden":!B(h),"aria-labelledby":`tab-${B(d)}`},[se(c.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[Ye,B(h)]]):Xe("v-if",!0)}});var Ce=be(St,[["__file","tab-pane.vue"]]);const Ft=qe(Pt,{TabPane:Ce}),Lt=He(Ce);export{Lt as E,Ft as a};
@@ -1 +1 @@
1
- import{E as ce}from"./index-DmRA92w7.js";import{c as k,O as Te,E as $e,w as ie}from"./index-BjeXTDuD.js";import{E as Fe}from"./index-KXI5e-q0.js";import{aj as Re,ap as Q,_ as M,d as A,r as P,al as T,an as C,c as y,e as O,am as J,aO as Y,aX as Se,aw as pe,l as w,i as z,o as N,j as m,k as R,bf as Oe,bg as ke,b as W,y as Z,be as Ne,ay as j,n as q,A as Pe,E as fe,a as ee,b1 as De,bn as Ke,bo as Be,aW as ve,ao as Le,aK as me,aI as H,bc as Me,t as Ae,b8 as Ge,ah as x,F as ze,bp as be,f as Ue,bq as Ye,g as He,w as ge}from"./index-BDnu8Rx2.js";import{a as Ve}from"./typescript-DhyxNYRx.js";import{c as Je,d as We,E as je,a as we,C as qe,b as Xe,e as Qe,f as Ze,g as xe,F as eo,L as oo}from"./dropdown-1Tl9Db1N.js";import{c as no}from"./castArray-B7L7jPOI.js";const to=Re({style:{type:Q([String,Array,Object])},currentTabId:{type:Q(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Q(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:ro,ElCollectionItem:lo,COLLECTION_INJECTION_KEY:oe,COLLECTION_ITEM_INJECTION_KEY:so}=Je("RovingFocusGroup"),ne=Symbol("elRovingFocusGroup"),_e=Symbol("elRovingFocusGroupItem"),ao={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},io=(e,n)=>e,uo=(e,n,d)=>{const r=io(e.code);return ao[r]},co=(e,n)=>e.map((d,r)=>e[(r+n)%e.length]),te=e=>{const{activeElement:n}=document;for(const d of e)if(d===n||(d.focus(),n!==document.activeElement))return},de="currentTabIdChange",ue="rovingFocusGroup.entryFocus",po={bubbles:!1,cancelable:!0},fo=A({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:to,emits:[de,"entryFocus"],setup(e,{emit:n}){var d;const r=T((d=e.currentTabId||e.defaultCurrentTabId)!=null?d:null),c=T(!1),u=T(!1),a=T(),{getItems:l}=C(oe,void 0),p=y(()=>[{outline:"none"},e.style]),b=i=>{n(de,i)},g=()=>{c.value=!0},_=k(i=>{var f;(f=e.onMousedown)==null||f.call(e,i)},()=>{u.value=!0}),E=k(i=>{var f;(f=e.onFocus)==null||f.call(e,i)},i=>{const f=!O(u),{target:D,currentTarget:$}=i;if(D===$&&f&&!O(c)){const K=new Event(ue,po);if($?.dispatchEvent(K),!K.defaultPrevented){const v=l().filter(F=>F.focusable),S=v.find(F=>F.active),I=v.find(F=>F.id===O(r)),L=[S,I,...v].filter(Boolean).map(F=>F.ref);te(L)}}u.value=!1}),o=k(i=>{var f;(f=e.onBlur)==null||f.call(e,i)},()=>{c.value=!1}),s=(...i)=>{n("entryFocus",...i)};J(ne,{currentTabbedId:Se(r),loop:Y(e,"loop"),tabIndex:y(()=>O(c)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:p,orientation:Y(e,"orientation"),dir:Y(e,"dir"),onItemFocus:b,onItemShiftTab:g,onBlur:o,onFocus:E,onMousedown:_}),pe(()=>e.currentTabId,i=>{r.value=i??null}),Ve(a,ue,s)}});function vo(e,n,d,r,c,u){return P(e.$slots,"default")}var mo=M(fo,[["render",vo],["__file","roving-focus-group-impl.vue"]]);const bo=A({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:ro,ElRovingFocusGroupImpl:mo}});function go(e,n,d,r,c,u){const a=w("el-roving-focus-group-impl"),l=w("el-focus-group-collection");return N(),z(l,null,{default:m(()=>[R(a,Oe(ke(e.$attrs)),{default:m(()=>[P(e.$slots,"default")]),_:3},16)]),_:3})}var wo=M(bo,[["render",go],["__file","roving-focus-group.vue"]]);const X=Symbol("elDropdown"),Ie="elDropdown",{ButtonGroup:_o}=ce,Io=A({name:"ElDropdown",components:{ElButton:ce,ElButtonGroup:_o,ElScrollbar:Fe,ElDropdownCollection:je,ElTooltip:$e,ElRovingFocusGroup:wo,ElOnlyChild:Te,ElIcon:fe,ArrowDown:Pe},props:We,emits:["visible-change","click","command"],setup(e,{emit:n}){const d=me(),r=ee("dropdown"),{t:c}=De(),u=T(),a=T(),l=T(),p=T(),b=T(null),g=T(null),_=T(!1),E=y(()=>({maxHeight:Ke(e.maxHeight)})),o=y(()=>[r.m(v.value)]),s=y(()=>no(e.trigger)),i=ve().value,f=y(()=>e.id||i);pe([u,s],([t,h],[G])=>{var le,se,ae;(le=G?.$el)!=null&&le.removeEventListener&&G.$el.removeEventListener("pointerenter",I),(se=t?.$el)!=null&&se.removeEventListener&&t.$el.removeEventListener("pointerenter",I),(ae=t?.$el)!=null&&ae.addEventListener&&h.includes("hover")&&t.$el.addEventListener("pointerenter",I)},{immediate:!0}),Le(()=>{var t,h;(h=(t=u.value)==null?void 0:t.$el)!=null&&h.removeEventListener&&u.value.$el.removeEventListener("pointerenter",I)});function D(){$()}function $(){var t;(t=l.value)==null||t.onClose()}function K(){var t;(t=l.value)==null||t.onOpen()}const v=Be();function S(...t){n("command",...t)}function I(){var t,h;(h=(t=u.value)==null?void 0:t.$el)==null||h.focus()}function B(){}function L(){const t=O(p);s.value.includes("hover")&&t?.focus(),g.value=null}function F(t){g.value=t}function re(t){_.value||(t.preventDefault(),t.stopImmediatePropagation())}function V(){n("visible-change",!0)}function U(t){var h;t?.type==="keydown"&&((h=p.value)==null||h.focus())}function ye(){n("visible-change",!1)}return J(X,{contentRef:p,role:y(()=>e.role),triggerId:f,isUsingKeyboard:_,onItemEnter:B,onItemLeave:L}),J(Ie,{instance:d,dropdownSize:v,handleClick:D,commandHandler:S,trigger:Y(e,"trigger"),hideOnClick:Y(e,"hideOnClick")}),{t:c,ns:r,scrollbar:b,wrapStyle:E,dropdownTriggerKls:o,dropdownSize:v,triggerId:f,currentTabId:g,handleCurrentTabIdChange:F,handlerMainButtonClick:t=>{n("click",t)},handleEntryFocus:re,handleClose:$,handleOpen:K,handleBeforeShowTooltip:V,handleShowTooltip:U,handleBeforeHideTooltip:ye,onFocusAfterTrapped:t=>{var h,G;t.preventDefault(),(G=(h=p.value)==null?void 0:h.focus)==null||G.call(h,{preventScroll:!0})},popperRef:l,contentRef:p,triggeringElementRef:u,referenceElementRef:a}}});function Eo(e,n,d,r,c,u){var a;const l=w("el-dropdown-collection"),p=w("el-roving-focus-group"),b=w("el-scrollbar"),g=w("el-only-child"),_=w("el-tooltip"),E=w("el-button"),o=w("arrow-down"),s=w("el-icon"),i=w("el-button-group");return N(),W("div",{class:q([e.ns.b(),e.ns.is("disabled",e.disabled)])},[R(_,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(a=e.referenceElementRef)==null?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:e.persistent,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},Ne({content:m(()=>[R(b,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:m(()=>[R(p,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:m(()=>[R(l,null,{default:m(()=>[P(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:m(()=>[R(g,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","persistent","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(N(),z(i,{key:0},{default:m(()=>[R(E,j({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),R(E,j({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:m(()=>[R(s,{class:q(e.ns.e("icon"))},{default:m(()=>[R(o)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):Z("v-if",!0)],2)}var ho=M(Io,[["render",Eo],["__file","dropdown.vue"]]);const Co=A({components:{ElRovingFocusCollectionItem:lo},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(e,{emit:n}){const{currentTabbedId:d,loop:r,onItemFocus:c,onItemShiftTab:u}=C(ne,void 0),{getItems:a}=C(oe,void 0),l=ve(),p=T(),b=k(o=>{n("mousedown",o)},o=>{e.focusable?c(O(l)):o.preventDefault()}),g=k(o=>{n("focus",o)},()=>{c(O(l))}),_=k(o=>{n("keydown",o)},o=>{const{code:s,shiftKey:i,target:f,currentTarget:D}=o;if(s===H.tab&&i){u();return}if(f!==D)return;const $=uo(o);if($){o.preventDefault();let v=a().filter(S=>S.focusable).map(S=>S.ref);switch($){case"last":{v.reverse();break}case"prev":case"next":{$==="prev"&&v.reverse();const S=v.indexOf(D);v=r.value?co(v,S+1):v.slice(S+1);break}}Me(()=>{te(v)})}}),E=y(()=>d.value===O(l));return J(_e,{rovingFocusGroupItemRef:p,tabIndex:y(()=>O(E)?0:-1),handleMousedown:b,handleFocus:g,handleKeydown:_}),{id:l,handleKeydown:_,handleFocus:g,handleMousedown:b}}});function yo(e,n,d,r,c,u){const a=w("el-roving-focus-collection-item");return N(),z(a,{id:e.id,focusable:e.focusable,active:e.active},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var To=M(Co,[["render",yo],["__file","roving-focus-item.vue"]]);const $o=A({name:"DropdownItemImpl",components:{ElIcon:fe},props:we,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:n}){const d=ee("dropdown"),{role:r}=C(X,void 0),{collectionItemRef:c}=C(Xe,void 0),{collectionItemRef:u}=C(so,void 0),{rovingFocusGroupItemRef:a,tabIndex:l,handleFocus:p,handleKeydown:b,handleMousedown:g}=C(_e,void 0),_=be(c,u,a),E=y(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),o=k(s=>{if([H.enter,H.numpadEnter,H.space].includes(s.code))return s.preventDefault(),s.stopImmediatePropagation(),n("clickimpl",s),!0},b);return{ns:d,itemRef:_,dataset:{[qe]:""},role:E,tabIndex:l,handleFocus:p,handleKeydown:o,handleMousedown:g}}});function Fo(e,n,d,r,c,u){const a=w("el-icon");return N(),W(ze,null,[e.divided?(N(),W("li",{key:0,role:"separator",class:q(e.ns.bem("menu","item","divided"))},null,2)):Z("v-if",!0),Ae("li",j({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:l=>e.$emit("clickimpl",l),onFocus:e.handleFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:l=>e.$emit("pointermove",l),onPointerleave:l=>e.$emit("pointerleave",l)}),[e.icon?(N(),z(a,{key:0},{default:m(()=>[(N(),z(Ge(e.icon)))]),_:1})):Z("v-if",!0),P(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var Ro=M($o,[["render",Fo],["__file","dropdown-item-impl.vue"]]);const Ee=()=>{const e=C(Ie,{}),n=y(()=>e?.dropdownSize);return{elDropdown:e,_elDropdownSize:n}},So=A({name:"ElDropdownItem",components:{ElDropdownCollectionItem:Qe,ElRovingFocusItem:To,ElDropdownItemImpl:Ro},inheritAttrs:!1,props:we,emits:["pointermove","pointerleave","click"],setup(e,{emit:n,attrs:d}){const{elDropdown:r}=Ee(),c=me(),u=T(null),a=y(()=>{var o,s;return(s=(o=O(u))==null?void 0:o.textContent)!=null?s:""}),{onItemEnter:l,onItemLeave:p}=C(X,void 0),b=k(o=>(n("pointermove",o),o.defaultPrevented),ie(o=>{if(e.disabled){p(o);return}const s=o.currentTarget;s===document.activeElement||s.contains(document.activeElement)||(l(o),o.defaultPrevented||s?.focus())})),g=k(o=>(n("pointerleave",o),o.defaultPrevented),ie(p)),_=k(o=>{if(!e.disabled)return n("click",o),o.type!=="keydown"&&o.defaultPrevented},o=>{var s,i,f;if(e.disabled){o.stopImmediatePropagation();return}(s=r?.hideOnClick)!=null&&s.value&&((i=r.handleClick)==null||i.call(r)),(f=r.commandHandler)==null||f.call(r,e.command,c,o)}),E=y(()=>({...e,...d}));return{handleClick:_,handlePointerMove:b,handlePointerLeave:g,textContent:a,propsAndAttrs:E}}});function Oo(e,n,d,r,c,u){var a;const l=w("el-dropdown-item-impl"),p=w("el-roving-focus-item"),b=w("el-dropdown-collection-item");return N(),z(b,{disabled:e.disabled,"text-value":(a=e.textValue)!=null?a:e.textContent},{default:m(()=>[R(p,{focusable:!e.disabled},{default:m(()=>[R(l,j(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var he=M(So,[["render",Oo],["__file","dropdown-item.vue"]]);const ko=A({name:"ElDropdownMenu",props:Ze,setup(e){const n=ee("dropdown"),{_elDropdownSize:d}=Ee(),r=d.value,{focusTrapRef:c,onKeydown:u}=C(Ye,void 0),{contentRef:a,role:l,triggerId:p}=C(X,void 0),{collectionRef:b,getItems:g}=C(xe,void 0),{rovingFocusGroupRef:_,rovingFocusGroupRootStyle:E,tabIndex:o,onBlur:s,onFocus:i,onMousedown:f}=C(ne,void 0),{collectionRef:D}=C(oe,void 0),$=y(()=>[n.b("menu"),n.bm("menu",r?.value)]),K=be(a,b,c,_,D),v=k(I=>{var B;(B=e.onKeydown)==null||B.call(e,I)},I=>{const{currentTarget:B,code:L,target:F}=I;if(B.contains(F),H.tab===L&&I.stopImmediatePropagation(),I.preventDefault(),F!==O(a)||!eo.includes(L))return;const V=g().filter(U=>!U.disabled).map(U=>U.ref);oo.includes(L)&&V.reverse(),te(V)});return{size:r,rovingFocusGroupRootStyle:E,tabIndex:o,dropdownKls:$,role:l,triggerId:p,dropdownListWrapperRef:K,handleKeydown:I=>{v(I),u(I)},onBlur:s,onFocus:i,onMousedown:f}}});function No(e,n,d,r,c,u){return N(),W("ul",{ref:e.dropdownListWrapperRef,class:q(e.dropdownKls),style:Ue(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:e.onBlur,onFocus:e.onFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:x(e.onMousedown,["self"])},[P(e.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var Ce=M(ko,[["render",No],["__file","dropdown-menu.vue"]]);const Uo=He(ho,{DropdownItem:he,DropdownMenu:Ce}),Yo=ge(he),Ho=ge(Ce);export{Yo as E,Ho as a,Uo as b};
1
+ import{E as ce}from"./index-Uz6VpvEs.js";import{c as k,O as Te,E as $e,w as ie}from"./index-PU4oJo9l.js";import{E as Fe}from"./index-D-xE_DuU.js";import{aj as Re,ap as Q,_ as M,d as A,r as P,al as T,an as C,c as y,e as O,am as J,aO as Y,aX as Se,aw as pe,l as w,i as z,o as N,j as m,k as R,bf as Oe,bg as ke,b as W,y as Z,be as Ne,ay as j,n as q,A as Pe,E as fe,a as ee,b1 as De,bn as Ke,bo as Be,aW as ve,ao as Le,aK as me,aI as H,bc as Me,t as Ae,b8 as Ge,ah as x,F as ze,bp as be,f as Ue,bq as Ye,g as He,w as ge}from"./index-DI_C3Ao9.js";import{a as Ve}from"./typescript-8pw9sVHl.js";import{c as Je,d as We,E as je,a as we,C as qe,b as Xe,e as Qe,f as Ze,g as xe,F as eo,L as oo}from"./dropdown-CxuXHpft.js";import{c as no}from"./castArray-DVyev9bJ.js";const to=Re({style:{type:Q([String,Array,Object])},currentTabId:{type:Q(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Q(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:ro,ElCollectionItem:lo,COLLECTION_INJECTION_KEY:oe,COLLECTION_ITEM_INJECTION_KEY:so}=Je("RovingFocusGroup"),ne=Symbol("elRovingFocusGroup"),_e=Symbol("elRovingFocusGroupItem"),ao={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},io=(e,n)=>e,uo=(e,n,d)=>{const r=io(e.code);return ao[r]},co=(e,n)=>e.map((d,r)=>e[(r+n)%e.length]),te=e=>{const{activeElement:n}=document;for(const d of e)if(d===n||(d.focus(),n!==document.activeElement))return},de="currentTabIdChange",ue="rovingFocusGroup.entryFocus",po={bubbles:!1,cancelable:!0},fo=A({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:to,emits:[de,"entryFocus"],setup(e,{emit:n}){var d;const r=T((d=e.currentTabId||e.defaultCurrentTabId)!=null?d:null),c=T(!1),u=T(!1),a=T(),{getItems:l}=C(oe,void 0),p=y(()=>[{outline:"none"},e.style]),b=i=>{n(de,i)},g=()=>{c.value=!0},_=k(i=>{var f;(f=e.onMousedown)==null||f.call(e,i)},()=>{u.value=!0}),E=k(i=>{var f;(f=e.onFocus)==null||f.call(e,i)},i=>{const f=!O(u),{target:D,currentTarget:$}=i;if(D===$&&f&&!O(c)){const K=new Event(ue,po);if($?.dispatchEvent(K),!K.defaultPrevented){const v=l().filter(F=>F.focusable),S=v.find(F=>F.active),I=v.find(F=>F.id===O(r)),L=[S,I,...v].filter(Boolean).map(F=>F.ref);te(L)}}u.value=!1}),o=k(i=>{var f;(f=e.onBlur)==null||f.call(e,i)},()=>{c.value=!1}),s=(...i)=>{n("entryFocus",...i)};J(ne,{currentTabbedId:Se(r),loop:Y(e,"loop"),tabIndex:y(()=>O(c)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:p,orientation:Y(e,"orientation"),dir:Y(e,"dir"),onItemFocus:b,onItemShiftTab:g,onBlur:o,onFocus:E,onMousedown:_}),pe(()=>e.currentTabId,i=>{r.value=i??null}),Ve(a,ue,s)}});function vo(e,n,d,r,c,u){return P(e.$slots,"default")}var mo=M(fo,[["render",vo],["__file","roving-focus-group-impl.vue"]]);const bo=A({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:ro,ElRovingFocusGroupImpl:mo}});function go(e,n,d,r,c,u){const a=w("el-roving-focus-group-impl"),l=w("el-focus-group-collection");return N(),z(l,null,{default:m(()=>[R(a,Oe(ke(e.$attrs)),{default:m(()=>[P(e.$slots,"default")]),_:3},16)]),_:3})}var wo=M(bo,[["render",go],["__file","roving-focus-group.vue"]]);const X=Symbol("elDropdown"),Ie="elDropdown",{ButtonGroup:_o}=ce,Io=A({name:"ElDropdown",components:{ElButton:ce,ElButtonGroup:_o,ElScrollbar:Fe,ElDropdownCollection:je,ElTooltip:$e,ElRovingFocusGroup:wo,ElOnlyChild:Te,ElIcon:fe,ArrowDown:Pe},props:We,emits:["visible-change","click","command"],setup(e,{emit:n}){const d=me(),r=ee("dropdown"),{t:c}=De(),u=T(),a=T(),l=T(),p=T(),b=T(null),g=T(null),_=T(!1),E=y(()=>({maxHeight:Ke(e.maxHeight)})),o=y(()=>[r.m(v.value)]),s=y(()=>no(e.trigger)),i=ve().value,f=y(()=>e.id||i);pe([u,s],([t,h],[G])=>{var le,se,ae;(le=G?.$el)!=null&&le.removeEventListener&&G.$el.removeEventListener("pointerenter",I),(se=t?.$el)!=null&&se.removeEventListener&&t.$el.removeEventListener("pointerenter",I),(ae=t?.$el)!=null&&ae.addEventListener&&h.includes("hover")&&t.$el.addEventListener("pointerenter",I)},{immediate:!0}),Le(()=>{var t,h;(h=(t=u.value)==null?void 0:t.$el)!=null&&h.removeEventListener&&u.value.$el.removeEventListener("pointerenter",I)});function D(){$()}function $(){var t;(t=l.value)==null||t.onClose()}function K(){var t;(t=l.value)==null||t.onOpen()}const v=Be();function S(...t){n("command",...t)}function I(){var t,h;(h=(t=u.value)==null?void 0:t.$el)==null||h.focus()}function B(){}function L(){const t=O(p);s.value.includes("hover")&&t?.focus(),g.value=null}function F(t){g.value=t}function re(t){_.value||(t.preventDefault(),t.stopImmediatePropagation())}function V(){n("visible-change",!0)}function U(t){var h;t?.type==="keydown"&&((h=p.value)==null||h.focus())}function ye(){n("visible-change",!1)}return J(X,{contentRef:p,role:y(()=>e.role),triggerId:f,isUsingKeyboard:_,onItemEnter:B,onItemLeave:L}),J(Ie,{instance:d,dropdownSize:v,handleClick:D,commandHandler:S,trigger:Y(e,"trigger"),hideOnClick:Y(e,"hideOnClick")}),{t:c,ns:r,scrollbar:b,wrapStyle:E,dropdownTriggerKls:o,dropdownSize:v,triggerId:f,currentTabId:g,handleCurrentTabIdChange:F,handlerMainButtonClick:t=>{n("click",t)},handleEntryFocus:re,handleClose:$,handleOpen:K,handleBeforeShowTooltip:V,handleShowTooltip:U,handleBeforeHideTooltip:ye,onFocusAfterTrapped:t=>{var h,G;t.preventDefault(),(G=(h=p.value)==null?void 0:h.focus)==null||G.call(h,{preventScroll:!0})},popperRef:l,contentRef:p,triggeringElementRef:u,referenceElementRef:a}}});function Eo(e,n,d,r,c,u){var a;const l=w("el-dropdown-collection"),p=w("el-roving-focus-group"),b=w("el-scrollbar"),g=w("el-only-child"),_=w("el-tooltip"),E=w("el-button"),o=w("arrow-down"),s=w("el-icon"),i=w("el-button-group");return N(),W("div",{class:q([e.ns.b(),e.ns.is("disabled",e.disabled)])},[R(_,{ref:"popperRef",role:e.role,effect:e.effect,"fallback-placements":["bottom","top"],"popper-options":e.popperOptions,"gpu-acceleration":!1,"hide-after":e.trigger==="hover"?e.hideTimeout:0,"manual-mode":!0,placement:e.placement,"popper-class":[e.ns.e("popper"),e.popperClass],"reference-element":(a=e.referenceElementRef)==null?void 0:a.$el,trigger:e.trigger,"trigger-keys":e.triggerKeys,"trigger-target-el":e.contentRef,"show-after":e.trigger==="hover"?e.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":e.triggeringElementRef,"virtual-triggering":e.splitButton,disabled:e.disabled,transition:`${e.ns.namespace.value}-zoom-in-top`,teleported:e.teleported,pure:"",persistent:e.persistent,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onBeforeHide:e.handleBeforeHideTooltip},Ne({content:m(()=>[R(b,{ref:"scrollbar","wrap-style":e.wrapStyle,tag:"div","view-class":e.ns.e("list")},{default:m(()=>[R(p,{loop:e.loop,"current-tab-id":e.currentTabId,orientation:"horizontal",onCurrentTabIdChange:e.handleCurrentTabIdChange,onEntryFocus:e.handleEntryFocus},{default:m(()=>[R(l,null,{default:m(()=>[P(e.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[e.splitButton?void 0:{name:"default",fn:m(()=>[R(g,{id:e.triggerId,ref:"triggeringElementRef",role:"button",tabindex:e.tabindex},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","persistent","onBeforeShow","onShow","onBeforeHide"]),e.splitButton?(N(),z(i,{key:0},{default:m(()=>[R(E,j({ref:"referenceElementRef"},e.buttonProps,{size:e.dropdownSize,type:e.type,disabled:e.disabled,tabindex:e.tabindex,onClick:e.handlerMainButtonClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),R(E,j({id:e.triggerId,ref:"triggeringElementRef"},e.buttonProps,{role:"button",size:e.dropdownSize,type:e.type,class:e.ns.e("caret-button"),disabled:e.disabled,tabindex:e.tabindex,"aria-label":e.t("el.dropdown.toggleDropdown")}),{default:m(()=>[R(s,{class:q(e.ns.e("icon"))},{default:m(()=>[R(o)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):Z("v-if",!0)],2)}var ho=M(Io,[["render",Eo],["__file","dropdown.vue"]]);const Co=A({components:{ElRovingFocusCollectionItem:lo},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(e,{emit:n}){const{currentTabbedId:d,loop:r,onItemFocus:c,onItemShiftTab:u}=C(ne,void 0),{getItems:a}=C(oe,void 0),l=ve(),p=T(),b=k(o=>{n("mousedown",o)},o=>{e.focusable?c(O(l)):o.preventDefault()}),g=k(o=>{n("focus",o)},()=>{c(O(l))}),_=k(o=>{n("keydown",o)},o=>{const{code:s,shiftKey:i,target:f,currentTarget:D}=o;if(s===H.tab&&i){u();return}if(f!==D)return;const $=uo(o);if($){o.preventDefault();let v=a().filter(S=>S.focusable).map(S=>S.ref);switch($){case"last":{v.reverse();break}case"prev":case"next":{$==="prev"&&v.reverse();const S=v.indexOf(D);v=r.value?co(v,S+1):v.slice(S+1);break}}Me(()=>{te(v)})}}),E=y(()=>d.value===O(l));return J(_e,{rovingFocusGroupItemRef:p,tabIndex:y(()=>O(E)?0:-1),handleMousedown:b,handleFocus:g,handleKeydown:_}),{id:l,handleKeydown:_,handleFocus:g,handleMousedown:b}}});function yo(e,n,d,r,c,u){const a=w("el-roving-focus-collection-item");return N(),z(a,{id:e.id,focusable:e.focusable,active:e.active},{default:m(()=>[P(e.$slots,"default")]),_:3},8,["id","focusable","active"])}var To=M(Co,[["render",yo],["__file","roving-focus-item.vue"]]);const $o=A({name:"DropdownItemImpl",components:{ElIcon:fe},props:we,emits:["pointermove","pointerleave","click","clickimpl"],setup(e,{emit:n}){const d=ee("dropdown"),{role:r}=C(X,void 0),{collectionItemRef:c}=C(Xe,void 0),{collectionItemRef:u}=C(so,void 0),{rovingFocusGroupItemRef:a,tabIndex:l,handleFocus:p,handleKeydown:b,handleMousedown:g}=C(_e,void 0),_=be(c,u,a),E=y(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),o=k(s=>{if([H.enter,H.numpadEnter,H.space].includes(s.code))return s.preventDefault(),s.stopImmediatePropagation(),n("clickimpl",s),!0},b);return{ns:d,itemRef:_,dataset:{[qe]:""},role:E,tabIndex:l,handleFocus:p,handleKeydown:o,handleMousedown:g}}});function Fo(e,n,d,r,c,u){const a=w("el-icon");return N(),W(ze,null,[e.divided?(N(),W("li",{key:0,role:"separator",class:q(e.ns.bem("menu","item","divided"))},null,2)):Z("v-if",!0),Ae("li",j({ref:e.itemRef},{...e.dataset,...e.$attrs},{"aria-disabled":e.disabled,class:[e.ns.be("menu","item"),e.ns.is("disabled",e.disabled)],tabindex:e.tabIndex,role:e.role,onClick:l=>e.$emit("clickimpl",l),onFocus:e.handleFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:e.handleMousedown,onPointermove:l=>e.$emit("pointermove",l),onPointerleave:l=>e.$emit("pointerleave",l)}),[e.icon?(N(),z(a,{key:0},{default:m(()=>[(N(),z(Ge(e.icon)))]),_:1})):Z("v-if",!0),P(e.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var Ro=M($o,[["render",Fo],["__file","dropdown-item-impl.vue"]]);const Ee=()=>{const e=C(Ie,{}),n=y(()=>e?.dropdownSize);return{elDropdown:e,_elDropdownSize:n}},So=A({name:"ElDropdownItem",components:{ElDropdownCollectionItem:Qe,ElRovingFocusItem:To,ElDropdownItemImpl:Ro},inheritAttrs:!1,props:we,emits:["pointermove","pointerleave","click"],setup(e,{emit:n,attrs:d}){const{elDropdown:r}=Ee(),c=me(),u=T(null),a=y(()=>{var o,s;return(s=(o=O(u))==null?void 0:o.textContent)!=null?s:""}),{onItemEnter:l,onItemLeave:p}=C(X,void 0),b=k(o=>(n("pointermove",o),o.defaultPrevented),ie(o=>{if(e.disabled){p(o);return}const s=o.currentTarget;s===document.activeElement||s.contains(document.activeElement)||(l(o),o.defaultPrevented||s?.focus())})),g=k(o=>(n("pointerleave",o),o.defaultPrevented),ie(p)),_=k(o=>{if(!e.disabled)return n("click",o),o.type!=="keydown"&&o.defaultPrevented},o=>{var s,i,f;if(e.disabled){o.stopImmediatePropagation();return}(s=r?.hideOnClick)!=null&&s.value&&((i=r.handleClick)==null||i.call(r)),(f=r.commandHandler)==null||f.call(r,e.command,c,o)}),E=y(()=>({...e,...d}));return{handleClick:_,handlePointerMove:b,handlePointerLeave:g,textContent:a,propsAndAttrs:E}}});function Oo(e,n,d,r,c,u){var a;const l=w("el-dropdown-item-impl"),p=w("el-roving-focus-item"),b=w("el-dropdown-collection-item");return N(),z(b,{disabled:e.disabled,"text-value":(a=e.textValue)!=null?a:e.textContent},{default:m(()=>[R(p,{focusable:!e.disabled},{default:m(()=>[R(l,j(e.propsAndAttrs,{onPointerleave:e.handlePointerLeave,onPointermove:e.handlePointerMove,onClickimpl:e.handleClick}),{default:m(()=>[P(e.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var he=M(So,[["render",Oo],["__file","dropdown-item.vue"]]);const ko=A({name:"ElDropdownMenu",props:Ze,setup(e){const n=ee("dropdown"),{_elDropdownSize:d}=Ee(),r=d.value,{focusTrapRef:c,onKeydown:u}=C(Ye,void 0),{contentRef:a,role:l,triggerId:p}=C(X,void 0),{collectionRef:b,getItems:g}=C(xe,void 0),{rovingFocusGroupRef:_,rovingFocusGroupRootStyle:E,tabIndex:o,onBlur:s,onFocus:i,onMousedown:f}=C(ne,void 0),{collectionRef:D}=C(oe,void 0),$=y(()=>[n.b("menu"),n.bm("menu",r?.value)]),K=be(a,b,c,_,D),v=k(I=>{var B;(B=e.onKeydown)==null||B.call(e,I)},I=>{const{currentTarget:B,code:L,target:F}=I;if(B.contains(F),H.tab===L&&I.stopImmediatePropagation(),I.preventDefault(),F!==O(a)||!eo.includes(L))return;const V=g().filter(U=>!U.disabled).map(U=>U.ref);oo.includes(L)&&V.reverse(),te(V)});return{size:r,rovingFocusGroupRootStyle:E,tabIndex:o,dropdownKls:$,role:l,triggerId:p,dropdownListWrapperRef:K,handleKeydown:I=>{v(I),u(I)},onBlur:s,onFocus:i,onMousedown:f}}});function No(e,n,d,r,c,u){return N(),W("ul",{ref:e.dropdownListWrapperRef,class:q(e.dropdownKls),style:Ue(e.rovingFocusGroupRootStyle),tabindex:-1,role:e.role,"aria-labelledby":e.triggerId,onBlur:e.onBlur,onFocus:e.onFocus,onKeydown:x(e.handleKeydown,["self"]),onMousedown:x(e.onMousedown,["self"])},[P(e.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var Ce=M(ko,[["render",No],["__file","dropdown-menu.vue"]]);const Uo=He(ho,{DropdownItem:he,DropdownMenu:Ce}),Yo=ge(he),Ho=ge(Ce);export{Yo as E,Ho as a,Uo as b};
@@ -1 +1 @@
1
- import{a as O,b as ee}from"./typescript-DhyxNYRx.js";import{aj as j,_ as D,d as x,an as I,a as J,bE as te,al as u,c as L,ao as le,aO as X,i as W,o as P,j as Q,J as ae,t as A,ah as oe,n as R,e as g,f as $,K as se,aT as re,aB as ne,b as Z,k as Y,F as ie,ak as N,ap as ce,bn as V,aw as q,am as ue,bG as ve,bT as fe,av as me,bc as F,bU as de,y as pe,r as he,b8 as be,as as ye,g as ge}from"./index-BDnu8Rx2.js";import{u as Se}from"./index-DZxnN0Hy.js";const k=4,we={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"}},ze=({move:d,size:v,bar:s})=>({[s.size]:v,transform:`translate${s.axis}(${d}%)`}),K=Symbol("scrollbarContextKey"),Ee=j({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),_e="Thumb",He=x({__name:"thumb",props:Ee,setup(d){const v=d,s=I(K),a=J("scrollbar");s||te(_e,"can not inject scrollbar context");const c=u(),f=u(),p=u({}),i=u(!1);let n=!1,m=!1,T=0,l=0,o=ne?document.onselectstart:null;const t=L(()=>we[v.vertical?"vertical":"horizontal"]),h=L(()=>ze({size:v.size,move:v.move,bar:t.value})),w=L(()=>c.value[t.value.offset]**2/s.wrapElement[t.value.scrollSize]/v.ratio/f.value[t.value.offset]),_=r=>{var y;if(r.stopPropagation(),r.ctrlKey||[1,2].includes(r.button))return;(y=window.getSelection())==null||y.removeAllRanges(),z(r);const H=r.currentTarget;H&&(p.value[t.value.axis]=H[t.value.offset]-(r[t.value.client]-H.getBoundingClientRect()[t.value.direction]))},S=r=>{if(!f.value||!c.value||!s.wrapElement)return;const y=Math.abs(r.target.getBoundingClientRect()[t.value.direction]-r[t.value.client]),H=f.value[t.value.offset]/2,M=(y-H)*100*w.value/c.value[t.value.offset];s.wrapElement[t.value.scroll]=M*s.wrapElement[t.value.scrollSize]/100},z=r=>{r.stopImmediatePropagation(),n=!0,T=s.wrapElement.scrollHeight,l=s.wrapElement.scrollWidth,document.addEventListener("mousemove",B),document.addEventListener("mouseup",C),o=document.onselectstart,document.onselectstart=()=>!1},B=r=>{if(!c.value||!f.value||n===!1)return;const y=p.value[t.value.axis];if(!y)return;const H=(c.value.getBoundingClientRect()[t.value.direction]-r[t.value.client])*-1,M=f.value[t.value.offset]-y,U=(H-M)*100*w.value/c.value[t.value.offset];t.value.scroll==="scrollLeft"?s.wrapElement[t.value.scroll]=U*l/100:s.wrapElement[t.value.scroll]=U*T/100},C=()=>{n=!1,p.value[t.value.axis]=0,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",C),b(),m&&(i.value=!1)},E=()=>{m=!1,i.value=!!v.size},e=()=>{m=!0,i.value=n};le(()=>{b(),document.removeEventListener("mouseup",C)});const b=()=>{document.onselectstart!==o&&(document.onselectstart=o)};return O(X(s,"scrollbarElement"),"mousemove",E),O(X(s,"scrollbarElement"),"mouseleave",e),(r,y)=>(P(),W(re,{name:g(a).b("fade"),persisted:""},{default:Q(()=>[ae(A("div",{ref_key:"instance",ref:c,class:R([g(a).e("bar"),g(a).is(g(t).key)]),onMousedown:S,onClick:oe(()=>{},["stop"])},[A("div",{ref_key:"thumb",ref:f,class:R(g(a).e("thumb")),style:$(g(h)),onMousedown:_},null,38)],42,["onClick"]),[[se,r.always||i.value]])]),_:1},8,["name"]))}});var G=D(He,[["__file","thumb.vue"]]);const Te=j({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),ke=x({__name:"bar",props:Te,setup(d,{expose:v}){const s=d,a=I(K),c=u(0),f=u(0),p=u(""),i=u(""),n=u(1),m=u(1);return v({handleScroll:o=>{if(o){const t=o.offsetHeight-k,h=o.offsetWidth-k;f.value=o.scrollTop*100/t*n.value,c.value=o.scrollLeft*100/h*m.value}},update:()=>{const o=a?.wrapElement;if(!o)return;const t=o.offsetHeight-k,h=o.offsetWidth-k,w=t**2/o.scrollHeight,_=h**2/o.scrollWidth,S=Math.max(w,s.minSize),z=Math.max(_,s.minSize);n.value=w/(t-w)/(S/(t-S)),m.value=_/(h-_)/(z/(h-z)),i.value=S+k<t?`${S}px`:"",p.value=z+k<h?`${z}px`:""}}),(o,t)=>(P(),Z(ie,null,[Y(G,{move:c.value,ratio:m.value,size:p.value,always:o.always},null,8,["move","ratio","size","always"]),Y(G,{move:f.value,ratio:n.value,size:i.value,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}});var Le=D(ke,[["__file","bar.vue"]]);const Ce=j({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:ce([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},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Se(["ariaLabel","ariaOrientation"])}),Ne={"end-reached":d=>["left","right","top","bottom"].includes(d),scroll:({scrollTop:d,scrollLeft:v})=>[d,v].every(N)},Pe="ElScrollbar",Re=x({name:Pe}),Be=x({...Re,props:Ce,emits:Ne,setup(d,{expose:v,emit:s}){const a=d,c=J("scrollbar");let f,p,i=0,n=0,m="";const T=u(),l=u(),o=u(),t=u(),h=L(()=>{const e={};return a.height&&(e.height=V(a.height)),a.maxHeight&&(e.maxHeight=V(a.maxHeight)),[a.wrapStyle,e]}),w=L(()=>[a.wrapClass,c.e("wrap"),{[c.em("wrap","hidden-default")]:!a.native}]),_=L(()=>[c.e("view"),a.viewClass]),S=()=>{var e;if(l.value){(e=t.value)==null||e.handleScroll(l.value);const b=i,r=n;i=l.value.scrollTop,n=l.value.scrollLeft;const y={bottom:i+l.value.clientHeight>=l.value.scrollHeight,top:i<=0&&b!==0,right:n+l.value.clientWidth>=l.value.scrollWidth&&r!==n,left:n<=0&&r!==0};b!==i&&(m=i>b?"bottom":"top"),r!==n&&(m=n>r?"right":"left"),s("scroll",{scrollTop:i,scrollLeft:n}),y[m]&&s("end-reached",m)}};function z(e,b){ye(e)?l.value.scrollTo(e):N(e)&&N(b)&&l.value.scrollTo(e,b)}const B=e=>{N(e)&&(l.value.scrollTop=e)},C=e=>{N(e)&&(l.value.scrollLeft=e)},E=()=>{var e;(e=t.value)==null||e.update()};return q(()=>a.noresize,e=>{e?(f?.(),p?.()):({stop:f}=ee(o,E),p=O("resize",E))},{immediate:!0}),q(()=>[a.maxHeight,a.height],()=>{a.native||F(()=>{var e;E(),l.value&&((e=t.value)==null||e.handleScroll(l.value))})}),ue(K,ve({scrollbarElement:T,wrapElement:l})),fe(()=>{l.value&&(l.value.scrollTop=i,l.value.scrollLeft=n)}),me(()=>{a.native||F(()=>{E()})}),de(()=>E()),v({wrapRef:l,update:E,scrollTo:z,setScrollTop:B,setScrollLeft:C,handleScroll:S}),(e,b)=>(P(),Z("div",{ref_key:"scrollbarRef",ref:T,class:R(g(c).b())},[A("div",{ref_key:"wrapRef",ref:l,class:R(g(w)),style:$(g(h)),tabindex:e.tabindex,onScroll:S},[(P(),W(be(e.tag),{id:e.id,ref_key:"resizeRef",ref:o,class:R(g(_)),style:$(e.viewStyle),role:e.role,"aria-label":e.ariaLabel,"aria-orientation":e.ariaOrientation},{default:Q(()=>[he(e.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),e.native?pe("v-if",!0):(P(),W(Le,{key:0,ref_key:"barRef",ref:t,always:e.always,"min-size":e.minSize},null,8,["always","min-size"]))],2))}});var xe=D(Be,[["__file","scrollbar.vue"]]);const Ae=ge(xe);export{Ae as E,Ne as s};
1
+ import{a as O,b as ee}from"./typescript-8pw9sVHl.js";import{aj as j,_ as D,d as x,an as I,a as J,bE as te,al as u,c as L,ao as le,aO as X,i as W,o as P,j as Q,J as ae,t as A,ah as oe,n as R,e as g,f as $,K as se,aT as re,aB as ne,b as Z,k as Y,F as ie,ak as N,ap as ce,bn as V,aw as q,am as ue,bG as ve,bT as fe,av as me,bc as F,bU as de,y as pe,r as he,b8 as be,as as ye,g as ge}from"./index-DI_C3Ao9.js";import{u as Se}from"./index-sVUmFHgv.js";const k=4,we={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"}},ze=({move:d,size:v,bar:s})=>({[s.size]:v,transform:`translate${s.axis}(${d}%)`}),K=Symbol("scrollbarContextKey"),Ee=j({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),_e="Thumb",He=x({__name:"thumb",props:Ee,setup(d){const v=d,s=I(K),a=J("scrollbar");s||te(_e,"can not inject scrollbar context");const c=u(),f=u(),p=u({}),i=u(!1);let n=!1,m=!1,T=0,l=0,o=ne?document.onselectstart:null;const t=L(()=>we[v.vertical?"vertical":"horizontal"]),h=L(()=>ze({size:v.size,move:v.move,bar:t.value})),w=L(()=>c.value[t.value.offset]**2/s.wrapElement[t.value.scrollSize]/v.ratio/f.value[t.value.offset]),_=r=>{var y;if(r.stopPropagation(),r.ctrlKey||[1,2].includes(r.button))return;(y=window.getSelection())==null||y.removeAllRanges(),z(r);const H=r.currentTarget;H&&(p.value[t.value.axis]=H[t.value.offset]-(r[t.value.client]-H.getBoundingClientRect()[t.value.direction]))},S=r=>{if(!f.value||!c.value||!s.wrapElement)return;const y=Math.abs(r.target.getBoundingClientRect()[t.value.direction]-r[t.value.client]),H=f.value[t.value.offset]/2,M=(y-H)*100*w.value/c.value[t.value.offset];s.wrapElement[t.value.scroll]=M*s.wrapElement[t.value.scrollSize]/100},z=r=>{r.stopImmediatePropagation(),n=!0,T=s.wrapElement.scrollHeight,l=s.wrapElement.scrollWidth,document.addEventListener("mousemove",B),document.addEventListener("mouseup",C),o=document.onselectstart,document.onselectstart=()=>!1},B=r=>{if(!c.value||!f.value||n===!1)return;const y=p.value[t.value.axis];if(!y)return;const H=(c.value.getBoundingClientRect()[t.value.direction]-r[t.value.client])*-1,M=f.value[t.value.offset]-y,U=(H-M)*100*w.value/c.value[t.value.offset];t.value.scroll==="scrollLeft"?s.wrapElement[t.value.scroll]=U*l/100:s.wrapElement[t.value.scroll]=U*T/100},C=()=>{n=!1,p.value[t.value.axis]=0,document.removeEventListener("mousemove",B),document.removeEventListener("mouseup",C),b(),m&&(i.value=!1)},E=()=>{m=!1,i.value=!!v.size},e=()=>{m=!0,i.value=n};le(()=>{b(),document.removeEventListener("mouseup",C)});const b=()=>{document.onselectstart!==o&&(document.onselectstart=o)};return O(X(s,"scrollbarElement"),"mousemove",E),O(X(s,"scrollbarElement"),"mouseleave",e),(r,y)=>(P(),W(re,{name:g(a).b("fade"),persisted:""},{default:Q(()=>[ae(A("div",{ref_key:"instance",ref:c,class:R([g(a).e("bar"),g(a).is(g(t).key)]),onMousedown:S,onClick:oe(()=>{},["stop"])},[A("div",{ref_key:"thumb",ref:f,class:R(g(a).e("thumb")),style:$(g(h)),onMousedown:_},null,38)],42,["onClick"]),[[se,r.always||i.value]])]),_:1},8,["name"]))}});var G=D(He,[["__file","thumb.vue"]]);const Te=j({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),ke=x({__name:"bar",props:Te,setup(d,{expose:v}){const s=d,a=I(K),c=u(0),f=u(0),p=u(""),i=u(""),n=u(1),m=u(1);return v({handleScroll:o=>{if(o){const t=o.offsetHeight-k,h=o.offsetWidth-k;f.value=o.scrollTop*100/t*n.value,c.value=o.scrollLeft*100/h*m.value}},update:()=>{const o=a?.wrapElement;if(!o)return;const t=o.offsetHeight-k,h=o.offsetWidth-k,w=t**2/o.scrollHeight,_=h**2/o.scrollWidth,S=Math.max(w,s.minSize),z=Math.max(_,s.minSize);n.value=w/(t-w)/(S/(t-S)),m.value=_/(h-_)/(z/(h-z)),i.value=S+k<t?`${S}px`:"",p.value=z+k<h?`${z}px`:""}}),(o,t)=>(P(),Z(ie,null,[Y(G,{move:c.value,ratio:m.value,size:p.value,always:o.always},null,8,["move","ratio","size","always"]),Y(G,{move:f.value,ratio:n.value,size:i.value,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}});var Le=D(ke,[["__file","bar.vue"]]);const Ce=j({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:ce([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},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Se(["ariaLabel","ariaOrientation"])}),Ne={"end-reached":d=>["left","right","top","bottom"].includes(d),scroll:({scrollTop:d,scrollLeft:v})=>[d,v].every(N)},Pe="ElScrollbar",Re=x({name:Pe}),Be=x({...Re,props:Ce,emits:Ne,setup(d,{expose:v,emit:s}){const a=d,c=J("scrollbar");let f,p,i=0,n=0,m="";const T=u(),l=u(),o=u(),t=u(),h=L(()=>{const e={};return a.height&&(e.height=V(a.height)),a.maxHeight&&(e.maxHeight=V(a.maxHeight)),[a.wrapStyle,e]}),w=L(()=>[a.wrapClass,c.e("wrap"),{[c.em("wrap","hidden-default")]:!a.native}]),_=L(()=>[c.e("view"),a.viewClass]),S=()=>{var e;if(l.value){(e=t.value)==null||e.handleScroll(l.value);const b=i,r=n;i=l.value.scrollTop,n=l.value.scrollLeft;const y={bottom:i+l.value.clientHeight>=l.value.scrollHeight,top:i<=0&&b!==0,right:n+l.value.clientWidth>=l.value.scrollWidth&&r!==n,left:n<=0&&r!==0};b!==i&&(m=i>b?"bottom":"top"),r!==n&&(m=n>r?"right":"left"),s("scroll",{scrollTop:i,scrollLeft:n}),y[m]&&s("end-reached",m)}};function z(e,b){ye(e)?l.value.scrollTo(e):N(e)&&N(b)&&l.value.scrollTo(e,b)}const B=e=>{N(e)&&(l.value.scrollTop=e)},C=e=>{N(e)&&(l.value.scrollLeft=e)},E=()=>{var e;(e=t.value)==null||e.update()};return q(()=>a.noresize,e=>{e?(f?.(),p?.()):({stop:f}=ee(o,E),p=O("resize",E))},{immediate:!0}),q(()=>[a.maxHeight,a.height],()=>{a.native||F(()=>{var e;E(),l.value&&((e=t.value)==null||e.handleScroll(l.value))})}),ue(K,ve({scrollbarElement:T,wrapElement:l})),fe(()=>{l.value&&(l.value.scrollTop=i,l.value.scrollLeft=n)}),me(()=>{a.native||F(()=>{E()})}),de(()=>E()),v({wrapRef:l,update:E,scrollTo:z,setScrollTop:B,setScrollLeft:C,handleScroll:S}),(e,b)=>(P(),Z("div",{ref_key:"scrollbarRef",ref:T,class:R(g(c).b())},[A("div",{ref_key:"wrapRef",ref:l,class:R(g(w)),style:$(g(h)),tabindex:e.tabindex,onScroll:S},[(P(),W(be(e.tag),{id:e.id,ref_key:"resizeRef",ref:o,class:R(g(_)),style:$(e.viewStyle),role:e.role,"aria-label":e.ariaLabel,"aria-orientation":e.ariaOrientation},{default:Q(()=>[he(e.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),e.native?pe("v-if",!0):(P(),W(Le,{key:0,ref_key:"barRef",ref:t,always:e.always,"min-size":e.minSize},null,8,["always","min-size"]))],2))}});var xe=D(Be,[["__file","scrollbar.vue"]]);const Ae=ge(xe);export{Ae as E,Ne as s};
@@ -1 +1 @@
1
- import{bh as Q,ak as W,aM as U,bS as ee,ch as D,an as I,c as f,bF as P,bQ as ge,aK as ae,aw as le,bc as ne,cg as T,bN as te,al as M,aN as F,bM as O,as as Ce,d0 as X,bo as Y,bO as G,_ as j,d as E,u as oe,a as K,i as ue,o as x,j as se,t as Z,b as S,y as A,n as C,e as n,J as N,ah as $,c_ as w,d1 as z,r as R,F as xe,D as ie,x as re,b8 as ce,f as Ve,aj as ye,ap as Se,am as Le,ca as Be,g as Ee,w as de}from"./index-BDnu8Rx2.js";import{u as be,p as _e}from"./index-DZxnN0Hy.js";import{u as q,a as ve}from"./use-form-item-B7j42EP5.js";import{i as Fe}from"./isEqual-oRaCHLap.js";const me={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:ee,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...be(["ariaControls"])},fe={[D]:e=>Q(e)||W(e)||U(e),change:e=>Q(e)||W(e)||U(e)},_=Symbol("checkboxGroupContextKey"),Ie=({model:e,isChecked:c})=>{const i=I(_,void 0),l=f(()=>{var r,d;const t=(r=i?.max)==null?void 0:r.value,v=(d=i?.min)==null?void 0:d.value;return!P(t)&&e.value.length>=t&&!c.value||!P(v)&&e.value.length<=v&&c.value});return{isDisabled:ge(f(()=>i?.disabled.value||l.value)),isLimitDisabled:l}},Ne=(e,{model:c,isLimitExceeded:i,hasOwnLabel:l,isDisabled:b,isLabeledByFormItem:r})=>{const d=I(_,void 0),{formItem:t}=q(),{emit:v}=ae();function s(a){var h,k,u,p;return[!0,e.trueValue,e.trueLabel].includes(a)?(k=(h=e.trueValue)!=null?h:e.trueLabel)!=null?k:!0:(p=(u=e.falseValue)!=null?u:e.falseLabel)!=null?p:!1}function o(a,h){v(T,s(a),h)}function m(a){if(i.value)return;const h=a.target;v(T,s(h.checked),a)}async function V(a){i.value||!l.value&&!b.value&&r.value&&(a.composedPath().some(u=>u.tagName==="LABEL")||(c.value=s([!1,e.falseValue,e.falseLabel].includes(c.value)),await ne(),o(c.value,a)))}const L=f(()=>d?.validateEvent||e.validateEvent);return le(()=>e.modelValue,()=>{L.value&&t?.validate("change").catch(a=>te())}),{handleChange:m,onClickRoot:V}},$e=e=>{const c=M(!1),{emit:i}=ae(),l=I(_,void 0),b=f(()=>P(l)===!1),r=M(!1),d=f({get(){var t,v;return b.value?(t=l?.modelValue)==null?void 0:t.value:(v=e.modelValue)!=null?v:c.value},set(t){var v,s;b.value&&F(t)?(r.value=((v=l?.max)==null?void 0:v.value)!==void 0&&t.length>l?.max.value&&t.length>d.value.length,r.value===!1&&((s=l?.changeEvent)==null||s.call(l,t))):(i(D,t),c.value=t)}});return{model:d,isGroup:b,isLimitExceeded:r}},we=(e,c,{model:i})=>{const l=I(_,void 0),b=M(!1),r=f(()=>O(e.value)?e.label:e.value),d=f(()=>{const o=i.value;return U(o)?o:F(o)?Ce(r.value)?o.map(X).some(m=>Fe(m,r.value)):o.map(X).includes(r.value):o!=null?o===e.trueValue||o===e.trueLabel:!!o}),t=Y(f(()=>{var o;return(o=l?.size)==null?void 0:o.value}),{prop:!0}),v=Y(f(()=>{var o;return(o=l?.size)==null?void 0:o.value})),s=f(()=>!!c.default||!O(r.value));return{checkboxButtonSize:t,isChecked:d,isFocused:b,checkboxSize:v,hasOwnLabel:s,actualValue:r}},he=(e,c)=>{const{formItem:i}=q(),{model:l,isGroup:b,isLimitExceeded:r}=$e(e),{isFocused:d,isChecked:t,checkboxButtonSize:v,checkboxSize:s,hasOwnLabel:o,actualValue:m}=we(e,c,{model:l}),{isDisabled:V}=Ie({model:l,isChecked:t}),{inputId:L,isLabeledByFormItem:a}=ve(e,{formItemContext:i,disableIdGeneration:o,disableIdManagement:b}),{handleChange:h,onClickRoot:k}=Ne(e,{model:l,isLimitExceeded:r,hasOwnLabel:o,isDisabled:V,isLabeledByFormItem:a});return(()=>{function p(){var y,g;F(l.value)&&!l.value.includes(m.value)?l.value.push(m.value):l.value=(g=(y=e.trueValue)!=null?y:e.trueLabel)!=null?g:!0}e.checked&&p()})(),G({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},f(()=>b.value&&O(e.value))),G({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},f(()=>!!e.trueLabel)),G({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},f(()=>!!e.falseLabel)),{inputId:L,isLabeledByFormItem:a,isChecked:t,isDisabled:V,isFocused:d,checkboxButtonSize:v,checkboxSize:s,hasOwnLabel:o,model:l,actualValue:m,handleChange:h,onClickRoot:k}},ze=E({name:"ElCheckbox"}),De=E({...ze,props:me,emits:fe,setup(e){const c=e,i=oe(),{inputId:l,isLabeledByFormItem:b,isChecked:r,isDisabled:d,isFocused:t,checkboxSize:v,hasOwnLabel:s,model:o,actualValue:m,handleChange:V,onClickRoot:L}=he(c,i),a=K("checkbox"),h=f(()=>[a.b(),a.m(v.value),a.is("disabled",d.value),a.is("bordered",c.border),a.is("checked",r.value)]),k=f(()=>[a.e("input"),a.is("disabled",d.value),a.is("checked",r.value),a.is("indeterminate",c.indeterminate),a.is("focus",t.value)]);return(u,p)=>(x(),ue(ce(!n(s)&&n(b)?"span":"label"),{class:C(n(h)),"aria-controls":u.indeterminate?u.ariaControls:null,onClick:n(L)},{default:se(()=>{var y,g,H,J;return[Z("span",{class:C(n(k))},[u.trueValue||u.falseValue||u.trueLabel||u.falseLabel?N((x(),S("input",{key:0,id:n(l),"onUpdate:modelValue":B=>w(o)?o.value=B:null,class:C(n(a).e("original")),type:"checkbox",indeterminate:u.indeterminate,name:u.name,tabindex:u.tabindex,disabled:n(d),"true-value":(g=(y=u.trueValue)!=null?y:u.trueLabel)!=null?g:!0,"false-value":(J=(H=u.falseValue)!=null?H:u.falseLabel)!=null?J:!1,onChange:n(V),onFocus:B=>t.value=!0,onBlur:B=>t.value=!1,onClick:$(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[z,n(o)]]):N((x(),S("input",{key:1,id:n(l),"onUpdate:modelValue":B=>w(o)?o.value=B:null,class:C(n(a).e("original")),type:"checkbox",indeterminate:u.indeterminate,disabled:n(d),value:n(m),name:u.name,tabindex:u.tabindex,onChange:n(V),onFocus:B=>t.value=!0,onBlur:B=>t.value=!1,onClick:$(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[z,n(o)]]),Z("span",{class:C(n(a).e("inner"))},null,2)],2),n(s)?(x(),S("span",{key:0,class:C(n(a).e("label"))},[R(u.$slots,"default"),u.$slots.default?A("v-if",!0):(x(),S(xe,{key:0},[ie(re(u.label),1)],64))],2)):A("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var Ge=j(De,[["__file","checkbox.vue"]]);const Ue=E({name:"ElCheckboxButton"}),Pe=E({...Ue,props:me,emits:fe,setup(e){const c=e,i=oe(),{isFocused:l,isChecked:b,isDisabled:r,checkboxButtonSize:d,model:t,actualValue:v,handleChange:s}=he(c,i),o=I(_,void 0),m=K("checkbox"),V=f(()=>{var a,h,k,u;const p=(h=(a=o?.fill)==null?void 0:a.value)!=null?h:"";return{backgroundColor:p,borderColor:p,color:(u=(k=o?.textColor)==null?void 0:k.value)!=null?u:"",boxShadow:p?`-1px 0 0 0 ${p}`:void 0}}),L=f(()=>[m.b("button"),m.bm("button",d.value),m.is("disabled",r.value),m.is("checked",b.value),m.is("focus",l.value)]);return(a,h)=>{var k,u,p,y;return x(),S("label",{class:C(n(L))},[a.trueValue||a.falseValue||a.trueLabel||a.falseLabel?N((x(),S("input",{key:0,"onUpdate:modelValue":g=>w(t)?t.value=g:null,class:C(n(m).be("button","original")),type:"checkbox",name:a.name,tabindex:a.tabindex,disabled:n(r),"true-value":(u=(k=a.trueValue)!=null?k:a.trueLabel)!=null?u:!0,"false-value":(y=(p=a.falseValue)!=null?p:a.falseLabel)!=null?y:!1,onChange:n(s),onFocus:g=>l.value=!0,onBlur:g=>l.value=!1,onClick:$(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[z,n(t)]]):N((x(),S("input",{key:1,"onUpdate:modelValue":g=>w(t)?t.value=g:null,class:C(n(m).be("button","original")),type:"checkbox",name:a.name,tabindex:a.tabindex,disabled:n(r),value:n(v),onChange:n(s),onFocus:g=>l.value=!0,onBlur:g=>l.value=!1,onClick:$(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[z,n(t)]]),a.$slots.default||a.label?(x(),S("span",{key:2,class:C(n(m).be("button","inner")),style:Ve(n(b)?n(V):void 0)},[R(a.$slots,"default",{},()=>[ie(re(a.label),1)])],6)):A("v-if",!0)],2)}}});var ke=j(Pe,[["__file","checkbox-button.vue"]]);const Te=ye({modelValue:{type:Se(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:ee,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...be(["ariaLabel"])}),Me={[D]:e=>F(e),change:e=>F(e)},Oe=E({name:"ElCheckboxGroup"}),Ae=E({...Oe,props:Te,emits:Me,setup(e,{emit:c}){const i=e,l=K("checkbox"),{formItem:b}=q(),{inputId:r,isLabeledByFormItem:d}=ve(i,{formItemContext:b}),t=async s=>{c(D,s),await ne(),c(T,s)},v=f({get(){return i.modelValue},set(s){t(s)}});return Le(_,{..._e(Be(i),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:v,changeEvent:t}),le(()=>i.modelValue,()=>{i.validateEvent&&b?.validate("change").catch(s=>te())}),(s,o)=>{var m;return x(),ue(ce(s.tag),{id:n(r),class:C(n(l).b("group")),role:"group","aria-label":n(d)?void 0:s.ariaLabel||"checkbox-group","aria-labelledby":n(d)?(m=n(b))==null?void 0:m.labelId:void 0},{default:se(()=>[R(s.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var pe=j(Ae,[["__file","checkbox-group.vue"]]);const He=Ee(Ge,{CheckboxButton:ke,CheckboxGroup:pe});de(ke);de(pe);export{He as E};
1
+ import{bh as Q,ak as W,aM as U,bS as ee,ch as D,an as I,c as f,bF as P,bQ as ge,aK as ae,aw as le,bc as ne,cg as T,bN as te,al as M,aN as F,bM as O,as as Ce,d0 as X,bo as Y,bO as G,_ as j,d as E,u as oe,a as K,i as ue,o as x,j as se,t as Z,b as S,y as A,n as C,e as n,J as N,ah as $,c_ as w,d1 as z,r as R,F as xe,D as ie,x as re,b8 as ce,f as Ve,aj as ye,ap as Se,am as Le,ca as Be,g as Ee,w as de}from"./index-DI_C3Ao9.js";import{u as be,p as _e}from"./index-sVUmFHgv.js";import{u as q,a as ve}from"./use-form-item-D6NQ9sNV.js";import{i as Fe}from"./isEqual-rNurVTiM.js";const me={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:ee,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...be(["ariaControls"])},fe={[D]:e=>Q(e)||W(e)||U(e),change:e=>Q(e)||W(e)||U(e)},_=Symbol("checkboxGroupContextKey"),Ie=({model:e,isChecked:c})=>{const i=I(_,void 0),l=f(()=>{var r,d;const t=(r=i?.max)==null?void 0:r.value,v=(d=i?.min)==null?void 0:d.value;return!P(t)&&e.value.length>=t&&!c.value||!P(v)&&e.value.length<=v&&c.value});return{isDisabled:ge(f(()=>i?.disabled.value||l.value)),isLimitDisabled:l}},Ne=(e,{model:c,isLimitExceeded:i,hasOwnLabel:l,isDisabled:b,isLabeledByFormItem:r})=>{const d=I(_,void 0),{formItem:t}=q(),{emit:v}=ae();function s(a){var h,k,u,p;return[!0,e.trueValue,e.trueLabel].includes(a)?(k=(h=e.trueValue)!=null?h:e.trueLabel)!=null?k:!0:(p=(u=e.falseValue)!=null?u:e.falseLabel)!=null?p:!1}function o(a,h){v(T,s(a),h)}function m(a){if(i.value)return;const h=a.target;v(T,s(h.checked),a)}async function V(a){i.value||!l.value&&!b.value&&r.value&&(a.composedPath().some(u=>u.tagName==="LABEL")||(c.value=s([!1,e.falseValue,e.falseLabel].includes(c.value)),await ne(),o(c.value,a)))}const L=f(()=>d?.validateEvent||e.validateEvent);return le(()=>e.modelValue,()=>{L.value&&t?.validate("change").catch(a=>te())}),{handleChange:m,onClickRoot:V}},$e=e=>{const c=M(!1),{emit:i}=ae(),l=I(_,void 0),b=f(()=>P(l)===!1),r=M(!1),d=f({get(){var t,v;return b.value?(t=l?.modelValue)==null?void 0:t.value:(v=e.modelValue)!=null?v:c.value},set(t){var v,s;b.value&&F(t)?(r.value=((v=l?.max)==null?void 0:v.value)!==void 0&&t.length>l?.max.value&&t.length>d.value.length,r.value===!1&&((s=l?.changeEvent)==null||s.call(l,t))):(i(D,t),c.value=t)}});return{model:d,isGroup:b,isLimitExceeded:r}},we=(e,c,{model:i})=>{const l=I(_,void 0),b=M(!1),r=f(()=>O(e.value)?e.label:e.value),d=f(()=>{const o=i.value;return U(o)?o:F(o)?Ce(r.value)?o.map(X).some(m=>Fe(m,r.value)):o.map(X).includes(r.value):o!=null?o===e.trueValue||o===e.trueLabel:!!o}),t=Y(f(()=>{var o;return(o=l?.size)==null?void 0:o.value}),{prop:!0}),v=Y(f(()=>{var o;return(o=l?.size)==null?void 0:o.value})),s=f(()=>!!c.default||!O(r.value));return{checkboxButtonSize:t,isChecked:d,isFocused:b,checkboxSize:v,hasOwnLabel:s,actualValue:r}},he=(e,c)=>{const{formItem:i}=q(),{model:l,isGroup:b,isLimitExceeded:r}=$e(e),{isFocused:d,isChecked:t,checkboxButtonSize:v,checkboxSize:s,hasOwnLabel:o,actualValue:m}=we(e,c,{model:l}),{isDisabled:V}=Ie({model:l,isChecked:t}),{inputId:L,isLabeledByFormItem:a}=ve(e,{formItemContext:i,disableIdGeneration:o,disableIdManagement:b}),{handleChange:h,onClickRoot:k}=Ne(e,{model:l,isLimitExceeded:r,hasOwnLabel:o,isDisabled:V,isLabeledByFormItem:a});return(()=>{function p(){var y,g;F(l.value)&&!l.value.includes(m.value)?l.value.push(m.value):l.value=(g=(y=e.trueValue)!=null?y:e.trueLabel)!=null?g:!0}e.checked&&p()})(),G({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},f(()=>b.value&&O(e.value))),G({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},f(()=>!!e.trueLabel)),G({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},f(()=>!!e.falseLabel)),{inputId:L,isLabeledByFormItem:a,isChecked:t,isDisabled:V,isFocused:d,checkboxButtonSize:v,checkboxSize:s,hasOwnLabel:o,model:l,actualValue:m,handleChange:h,onClickRoot:k}},ze=E({name:"ElCheckbox"}),De=E({...ze,props:me,emits:fe,setup(e){const c=e,i=oe(),{inputId:l,isLabeledByFormItem:b,isChecked:r,isDisabled:d,isFocused:t,checkboxSize:v,hasOwnLabel:s,model:o,actualValue:m,handleChange:V,onClickRoot:L}=he(c,i),a=K("checkbox"),h=f(()=>[a.b(),a.m(v.value),a.is("disabled",d.value),a.is("bordered",c.border),a.is("checked",r.value)]),k=f(()=>[a.e("input"),a.is("disabled",d.value),a.is("checked",r.value),a.is("indeterminate",c.indeterminate),a.is("focus",t.value)]);return(u,p)=>(x(),ue(ce(!n(s)&&n(b)?"span":"label"),{class:C(n(h)),"aria-controls":u.indeterminate?u.ariaControls:null,onClick:n(L)},{default:se(()=>{var y,g,H,J;return[Z("span",{class:C(n(k))},[u.trueValue||u.falseValue||u.trueLabel||u.falseLabel?N((x(),S("input",{key:0,id:n(l),"onUpdate:modelValue":B=>w(o)?o.value=B:null,class:C(n(a).e("original")),type:"checkbox",indeterminate:u.indeterminate,name:u.name,tabindex:u.tabindex,disabled:n(d),"true-value":(g=(y=u.trueValue)!=null?y:u.trueLabel)!=null?g:!0,"false-value":(J=(H=u.falseValue)!=null?H:u.falseLabel)!=null?J:!1,onChange:n(V),onFocus:B=>t.value=!0,onBlur:B=>t.value=!1,onClick:$(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[z,n(o)]]):N((x(),S("input",{key:1,id:n(l),"onUpdate:modelValue":B=>w(o)?o.value=B:null,class:C(n(a).e("original")),type:"checkbox",indeterminate:u.indeterminate,disabled:n(d),value:n(m),name:u.name,tabindex:u.tabindex,onChange:n(V),onFocus:B=>t.value=!0,onBlur:B=>t.value=!1,onClick:$(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[z,n(o)]]),Z("span",{class:C(n(a).e("inner"))},null,2)],2),n(s)?(x(),S("span",{key:0,class:C(n(a).e("label"))},[R(u.$slots,"default"),u.$slots.default?A("v-if",!0):(x(),S(xe,{key:0},[ie(re(u.label),1)],64))],2)):A("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var Ge=j(De,[["__file","checkbox.vue"]]);const Ue=E({name:"ElCheckboxButton"}),Pe=E({...Ue,props:me,emits:fe,setup(e){const c=e,i=oe(),{isFocused:l,isChecked:b,isDisabled:r,checkboxButtonSize:d,model:t,actualValue:v,handleChange:s}=he(c,i),o=I(_,void 0),m=K("checkbox"),V=f(()=>{var a,h,k,u;const p=(h=(a=o?.fill)==null?void 0:a.value)!=null?h:"";return{backgroundColor:p,borderColor:p,color:(u=(k=o?.textColor)==null?void 0:k.value)!=null?u:"",boxShadow:p?`-1px 0 0 0 ${p}`:void 0}}),L=f(()=>[m.b("button"),m.bm("button",d.value),m.is("disabled",r.value),m.is("checked",b.value),m.is("focus",l.value)]);return(a,h)=>{var k,u,p,y;return x(),S("label",{class:C(n(L))},[a.trueValue||a.falseValue||a.trueLabel||a.falseLabel?N((x(),S("input",{key:0,"onUpdate:modelValue":g=>w(t)?t.value=g:null,class:C(n(m).be("button","original")),type:"checkbox",name:a.name,tabindex:a.tabindex,disabled:n(r),"true-value":(u=(k=a.trueValue)!=null?k:a.trueLabel)!=null?u:!0,"false-value":(y=(p=a.falseValue)!=null?p:a.falseLabel)!=null?y:!1,onChange:n(s),onFocus:g=>l.value=!0,onBlur:g=>l.value=!1,onClick:$(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[z,n(t)]]):N((x(),S("input",{key:1,"onUpdate:modelValue":g=>w(t)?t.value=g:null,class:C(n(m).be("button","original")),type:"checkbox",name:a.name,tabindex:a.tabindex,disabled:n(r),value:n(v),onChange:n(s),onFocus:g=>l.value=!0,onBlur:g=>l.value=!1,onClick:$(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[z,n(t)]]),a.$slots.default||a.label?(x(),S("span",{key:2,class:C(n(m).be("button","inner")),style:Ve(n(b)?n(V):void 0)},[R(a.$slots,"default",{},()=>[ie(re(a.label),1)])],6)):A("v-if",!0)],2)}}});var ke=j(Pe,[["__file","checkbox-button.vue"]]);const Te=ye({modelValue:{type:Se(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:ee,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...be(["ariaLabel"])}),Me={[D]:e=>F(e),change:e=>F(e)},Oe=E({name:"ElCheckboxGroup"}),Ae=E({...Oe,props:Te,emits:Me,setup(e,{emit:c}){const i=e,l=K("checkbox"),{formItem:b}=q(),{inputId:r,isLabeledByFormItem:d}=ve(i,{formItemContext:b}),t=async s=>{c(D,s),await ne(),c(T,s)},v=f({get(){return i.modelValue},set(s){t(s)}});return Le(_,{..._e(Be(i),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:v,changeEvent:t}),le(()=>i.modelValue,()=>{i.validateEvent&&b?.validate("change").catch(s=>te())}),(s,o)=>{var m;return x(),ue(ce(s.tag),{id:n(r),class:C(n(l).b("group")),role:"group","aria-label":n(d)?void 0:s.ariaLabel||"checkbox-group","aria-labelledby":n(d)?(m=n(b))==null?void 0:m.labelId:void 0},{default:se(()=>[R(s.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var pe=j(Ae,[["__file","checkbox-group.vue"]]);const He=Ee(Ge,{CheckboxButton:ke,CheckboxGroup:pe});de(ke);de(pe);export{He as E};