chainlesschain 0.162.83 → 0.162.84

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 (150) hide show
  1. package/package.json +1 -1
  2. package/src/assets/web-panel/assets/{AIOps-D5clZ6G2.js → AIOps-CUPGM_Kx.js} +1 -1
  3. package/src/assets/web-panel/assets/{ActionButton-3eQeksbm.js → ActionButton-Gpo_8hNk.js} +1 -1
  4. package/src/assets/web-panel/assets/{Analytics-BK_rVOdn.js → Analytics-gUz2I_9P.js} +3 -3
  5. package/src/assets/web-panel/assets/{AppLayout-CRdXxdYx.js → AppLayout-8S6XH1S0.js} +4 -4
  6. package/src/assets/web-panel/assets/{Audit-nm2JDlFV.js → Audit-DspRXpoj.js} +1 -1
  7. package/src/assets/web-panel/assets/{Backup-CNBCIHz2.js → Backup-CrO4UCdI.js} +1 -1
  8. package/src/assets/web-panel/assets/{BaseInput-ydDdLJ4G.js → BaseInput-BkEVF4o4.js} +1 -1
  9. package/src/assets/web-panel/assets/{Chat-DSXE_wj8.js → Chat-B9EvII6G.js} +4 -4
  10. package/src/assets/web-panel/assets/{ChatBubbleRenderer-BXq5_Wmg.js → ChatBubbleRenderer-BfXGm9lb.js} +1 -1
  11. package/src/assets/web-panel/assets/{Checkbox-Q88NMnUT.js → Checkbox-BrDQRcU4.js} +1 -1
  12. package/src/assets/web-panel/assets/{Codegen-BnAsBKi-.js → Codegen-CqBoplXd.js} +1 -1
  13. package/src/assets/web-panel/assets/{Col-Z0uKQ8wp.js → Col-CbQa3Dci.js} +1 -1
  14. package/src/assets/web-panel/assets/{Community-D_mwBjBi.js → Community-C03LI8ue.js} +1 -1
  15. package/src/assets/web-panel/assets/{Compact-GDJKV58z.js → Compact-D_XPXg9d.js} +1 -1
  16. package/src/assets/web-panel/assets/{Compliance-DkILaUon.js → Compliance-B5sBpZMO.js} +1 -1
  17. package/src/assets/web-panel/assets/{Cowork-BmvorDct.js → Cowork-WnDWZ2l6.js} +2 -2
  18. package/src/assets/web-panel/assets/{Cron-xl9kIF-K.js → Cron-CMIJXLkp.js} +2 -2
  19. package/src/assets/web-panel/assets/{Crosschain-kd20yZ8k.js → Crosschain-DLptM6-5.js} +1 -1
  20. package/src/assets/web-panel/assets/{DID-uWUHDhZC.js → DID-svP2FmRz.js} +2 -2
  21. package/src/assets/web-panel/assets/{Dashboard-Bzowenln.js → Dashboard-CO5hKuwh.js} +2 -2
  22. package/src/assets/web-panel/assets/{Dropdown-D61Ipq9d.js → Dropdown-CQIK5Gf6.js} +1 -1
  23. package/src/assets/web-panel/assets/{EmailListRenderer-B7B3l-XQ.js → EmailListRenderer-CBBq-Mwz.js} +1 -1
  24. package/src/assets/web-panel/assets/{FamilyGuardDashboard-DYNCXD5N.js → FamilyGuardDashboard-DgcxYtqz.js} +1 -1
  25. package/src/assets/web-panel/assets/{Federation-BInggTIg.js → Federation-Di9NPJ6Y.js} +1 -1
  26. package/src/assets/web-panel/assets/{FormItemContext-C5QahcLV.js → FormItemContext-CwjF4P1N.js} +1 -1
  27. package/src/assets/web-panel/assets/{GenericCardRenderer-CihURe0o.js → GenericCardRenderer-BZRv0AD7.js} +1 -1
  28. package/src/assets/web-panel/assets/{Git-M3A1Io0L.js → Git-BUpxPamc.js} +2 -2
  29. package/src/assets/web-panel/assets/{Governance-BwiburwE.js → Governance-D-RKals0.js} +1 -1
  30. package/src/assets/web-panel/assets/{Inference-DYqYqRdQ.js → Inference-CEoHP1e3.js} +1 -1
  31. package/src/assets/web-panel/assets/{KnowledgeGraph-DSQtMRuu.js → KnowledgeGraph-Bzb02Le2.js} +1 -1
  32. package/src/assets/web-panel/assets/{Logs-CSv_AEOE.js → Logs-C80J5aHm.js} +2 -2
  33. package/src/assets/web-panel/assets/{Marketplace-DHwmVF8C.js → Marketplace-CLeqc86x.js} +1 -1
  34. package/src/assets/web-panel/assets/{McpTools-BiX_gw_7.js → McpTools-C6_3jvji.js} +5 -5
  35. package/src/assets/web-panel/assets/{Memory-CI5rNn-7.js → Memory-CB1VmvbL.js} +2 -2
  36. package/src/assets/web-panel/assets/{MobileBridge-CfzmrNmB.js → MobileBridge-PPO8M2EY.js} +2 -2
  37. package/src/assets/web-panel/assets/{MobileProjects-Be6BolGS.js → MobileProjects-Bu-ul-bk.js} +1 -1
  38. package/src/assets/web-panel/assets/{Mtc-f5cjTT3Z.js → Mtc-CY0506vU.js} +5 -5
  39. package/src/assets/web-panel/assets/{MtcAudit-BFGPj2S3.js → MtcAudit-BV-IqDNO.js} +2 -2
  40. package/src/assets/web-panel/assets/{Multisig-BxnPK9G3.js → Multisig-8YiHk7pd.js} +3 -3
  41. package/src/assets/web-panel/assets/{NLProgramming-CG00J0f3.js → NLProgramming-DCFi8iuv.js} +1 -1
  42. package/src/assets/web-panel/assets/{Notes-CRzkqjOv.js → Notes-pcK3qdfo.js} +3 -3
  43. package/src/assets/web-panel/assets/{NotificationSettings-gE3UfYJN.js → NotificationSettings-DrU6Ac_p.js} +1 -1
  44. package/src/assets/web-panel/assets/{OrderTableRenderer-BdiQtesh.js → OrderTableRenderer-tCu7jh7L.js} +1 -1
  45. package/src/assets/web-panel/assets/{Organization-DF-RWCDw.js → Organization-r7rkShQ7.js} +4 -4
  46. package/src/assets/web-panel/assets/{Overflow-DBDRjR3X.js → Overflow-DGOBthyf.js} +1 -1
  47. package/src/assets/web-panel/assets/{P2P-DWa-ob-g.js → P2P-DalC-NnK.js} +2 -2
  48. package/src/assets/web-panel/assets/{PdhVaultBrowser-xUkEUgL2.js → PdhVaultBrowser-4xxODAFn.js} +3 -3
  49. package/src/assets/web-panel/assets/{Permissions-DlsHAFXy.js → Permissions-C15WSlI2.js} +4 -4
  50. package/src/assets/web-panel/assets/{PersonalDataHub-B9OE6l49.js → PersonalDataHub-DAGK05sL.js} +2 -2
  51. package/src/assets/web-panel/assets/{Pipeline-NeqShyjv.js → Pipeline-NAji3Ktw.js} +1 -1
  52. package/src/assets/web-panel/assets/{Privacy-PnD-FHqV.js → Privacy-CCRUEGFK.js} +1 -1
  53. package/src/assets/web-panel/assets/{ProjectInit-BVKsBEh3.js → ProjectInit-DVmQTOeF.js} +2 -2
  54. package/src/assets/web-panel/assets/{ProjectSettings-CseYRiEX.js → ProjectSettings-1NVdULNr.js} +2 -2
  55. package/src/assets/web-panel/assets/Projects-ws0_zzCP.js +1 -0
  56. package/src/assets/web-panel/assets/{Providers-CWedQXMM.js → Providers-Bsi5PeyG.js} +1 -1
  57. package/src/assets/web-panel/assets/{QuickAsk-63zSY3zp.js → QuickAsk-Teh85bAz.js} +1 -1
  58. package/src/assets/web-panel/assets/{Recommend-CKNMvGx7.js → Recommend-CnBrDiNE.js} +1 -1
  59. package/src/assets/web-panel/assets/{Reputation-C7ShHl_z.js → Reputation-BRuy4vvz.js} +1 -1
  60. package/src/assets/web-panel/assets/{Row-BmcTGqZ2.js → Row-AknoXYnV.js} +1 -1
  61. package/src/assets/web-panel/assets/{RssFeed-DwiCGY8Z.js → RssFeed-BYhR3Mr1.js} +2 -2
  62. package/src/assets/web-panel/assets/{Search-QMl4RNua.js → Search-CCVNTHhz.js} +1 -1
  63. package/src/assets/web-panel/assets/{Security-DYs16pCC.js → Security-DtxuRS8f.js} +4 -4
  64. package/src/assets/web-panel/assets/{Services-DJiNK0IN.js → Services-CH9pcUuR.js} +2 -2
  65. package/src/assets/web-panel/assets/{Skeleton-66U5zsq4.js → Skeleton-BVCIpTSu.js} +1 -1
  66. package/src/assets/web-panel/assets/{Skills-CNx1kG1S.js → Skills-Bh0_27fL.js} +1 -1
  67. package/src/assets/web-panel/assets/{Sla-DjuZmKCY.js → Sla-Dt2ZjTIC.js} +1 -1
  68. package/src/assets/web-panel/assets/{SpeechSettings-PQuRbruR.js → SpeechSettings-3oB4vztB.js} +1 -1
  69. package/src/assets/web-panel/assets/{SyncSettings-CGjh_EGx.js → SyncSettings-3EakfvY5.js} +2 -2
  70. package/src/assets/web-panel/assets/Tasks-DrkWRRuK.js +1 -0
  71. package/src/assets/web-panel/assets/{Templates-BPXiXpmV.js → Templates-bJMb7OuJ.js} +1 -1
  72. package/src/assets/web-panel/assets/{Tenant-BIp5A7TQ.js → Tenant-9T-oGFha.js} +1 -1
  73. package/src/assets/web-panel/assets/{Terminal-DyFq-Mz2.js → Terminal-CPZGmFF2.js} +2 -2
  74. package/src/assets/web-panel/assets/{TimelineRenderer-EfsIzHSs.js → TimelineRenderer-C6IcefQF.js} +1 -1
  75. package/src/assets/web-panel/assets/{Tokens-B5EAkibw.js → Tokens-DRBbMZ6n.js} +1 -1
  76. package/src/assets/web-panel/assets/{Trigger-2kmiTx39.js → Trigger-CfBK_gR2.js} +1 -1
  77. package/src/assets/web-panel/assets/{Trust-IoQm_Uz3.js → Trust-Csi86O_m.js} +1 -1
  78. package/src/assets/web-panel/assets/{UkeySign-Cv2EqjAq.js → UkeySign-Dh0RMWm3.js} +1 -1
  79. package/src/assets/web-panel/assets/{VideoEditing-CdBJCJRx.js → VideoEditing-CGVRp-xp.js} +1 -1
  80. package/src/assets/web-panel/assets/{Wallet-CYfAoXU3.js → Wallet-ul6ZpClL.js} +4 -4
  81. package/src/assets/web-panel/assets/{WebAuthn-cKyQY5Pf.js → WebAuthn-B96-wm1H.js} +3 -3
  82. package/src/assets/web-panel/assets/{WorkflowEditor-Cuv4VAn1.js → WorkflowEditor-CHvvdMYl.js} +1 -1
  83. package/src/assets/web-panel/assets/{chat-Dou41SaJ.js → chat-CrmxJLgQ.js} +1 -1
  84. package/src/assets/web-panel/assets/{colors-BnP8JvZJ.js → colors-iw0H0UBl.js} +1 -1
  85. package/src/assets/web-panel/assets/{compact-item-CWCSOuGZ.js → compact-item-BoP3ciR6.js} +1 -1
  86. package/src/assets/web-panel/assets/{createContext-8Jzpris1.js → createContext-CerRGWSU.js} +1 -1
  87. package/src/assets/web-panel/assets/devWarning-Cjez93XF.js +1 -0
  88. package/src/assets/web-panel/assets/{hasIn-081bLjmn.js → hasIn-DsatQYJx.js} +1 -1
  89. package/src/assets/web-panel/assets/{index-COiKkJDU.js → index-0GW7IL2K.js} +1 -1
  90. package/src/assets/web-panel/assets/{index-B8CfZwpW.js → index-4IhKBZK7.js} +1 -1
  91. package/src/assets/web-panel/assets/{index-CeRe7yOt.js → index-7l1rmyaN.js} +1 -1
  92. package/src/assets/web-panel/assets/{index-Wq-xGp-R.js → index-8jD5bKYd.js} +1 -1
  93. package/src/assets/web-panel/assets/{index-CQYAo_rM.js → index-B19YcZYT.js} +1 -1
  94. package/src/assets/web-panel/assets/{index--PstlP1N.js → index-BMbuAe5D.js} +1 -1
  95. package/src/assets/web-panel/assets/{index-ML6C2R9q.js → index-BP_JGTE7.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-BXH5Kc7c.js → index-BWZD_xU3.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-B2IuKroe.js → index-BXvqWNro.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-DQai_JzS.js → index-BbSrbGp1.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-CbUfz8iM.js → index-BcyvEERG.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-dSRPEXjB.js → index-BgHjBX0-.js} +1 -1
  101. package/src/assets/web-panel/assets/{index-CTpF4Xdi.js → index-Boik4lkC.js} +1 -1
  102. package/src/assets/web-panel/assets/{index-CDDQ5GJM.js → index-BuhW7RGq.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-CpJ1NyHk.js → index-C1GAAh9I.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-DVV9Yoj5.js → index-C1Ve7k2T.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-DxlV4ilq.js → index-C5r1VXhR.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-TtkPSmfs.js → index-CDkkLejB.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-CBIiTJw0.js → index-CIKm0ljX.js} +1 -1
  108. package/src/assets/web-panel/assets/index-CN5J59xo.js +1 -0
  109. package/src/assets/web-panel/assets/{index-B1s-bdg9.js → index-CSNbpxSb.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-DlBSB7M0.js → index-CSbZKYQE.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-8VBebvyu.js → index-CWjQpi8r.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-BV5jJ5XZ.js → index-Cxc0hflR.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-BVRxwEtj.js → index-D0IzrHb1.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-B0KSkd8K.js → index-D97QUify.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-6ovmKZFr.js → index-D9Sygqi9.js} +3 -3
  116. package/src/assets/web-panel/assets/{index-DojNxG6D.js → index-DAGrtlTV.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-B3BxHtv0.js → index-DDrhbD6H.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-DmQOSWns.js → index-DKuaBG68.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-CEBwfv6k.js → index-Dbpu7Y9S.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-pi5Cg49v.js → index-DnQ7-JQY.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-3fSZzWbP.js → index-DvQd5rvA.js} +1 -1
  122. package/src/assets/web-panel/assets/{index-DplJZBUJ.js → index-Dx4n5tpI.js} +1 -1
  123. package/src/assets/web-panel/assets/{index-DfwwFKea.js → index-KTJ86cMc.js} +1 -1
  124. package/src/assets/web-panel/assets/{index-BHRfZITq.js → index-QwRb8Iww.js} +1 -1
  125. package/src/assets/web-panel/assets/index-RnzfY85C.js +1 -0
  126. package/src/assets/web-panel/assets/{index-CK8UwWmi.js → index-b43zAH3v.js} +1 -1
  127. package/src/assets/web-panel/assets/{index-DJj_l-A4.js → index-ykZB3IUq.js} +1 -1
  128. package/src/assets/web-panel/assets/{initDefaultProps-C8-M6qD9.js → initDefaultProps-C_C9YePV.js} +1 -1
  129. package/src/assets/web-panel/assets/{motion-DpIOwjTZ.js → motion-DsRTNcag.js} +1 -1
  130. package/src/assets/web-panel/assets/{move-BoqPw0Zr.js → move-CNQpgGaU.js} +1 -1
  131. package/src/assets/web-panel/assets/{omit-gBR7QllC.js → omit-B_C8ne12.js} +1 -1
  132. package/src/assets/web-panel/assets/{pickAttrs-sB3eltnD.js → pickAttrs-D95no1kz.js} +1 -1
  133. package/src/assets/web-panel/assets/{placementArrow-CaAWJJAv.js → placementArrow-CqoJQLBC.js} +1 -1
  134. package/src/assets/web-panel/assets/{responsiveObserve-DSTXN510.js → responsiveObserve-BvxPjVzY.js} +1 -1
  135. package/src/assets/web-panel/assets/{slide-xHJEfzhP.js → slide-C1PZ8gjQ.js} +1 -1
  136. package/src/assets/web-panel/assets/{statusUtils-DrMd97n-.js → statusUtils-CXlmu_Qa.js} +1 -1
  137. package/src/assets/web-panel/assets/{styleChecker-Cr09j4iw.js → styleChecker-Yeh5dWMi.js} +1 -1
  138. package/src/assets/web-panel/assets/{useFlexGapSupport-GiRw3HoR.js → useFlexGapSupport-BA1uUeeV.js} +1 -1
  139. package/src/assets/web-panel/assets/{useFs-NoE2Uu_m.js → useFs-TCL7sk7I.js} +1 -1
  140. package/src/assets/web-panel/assets/{usePersonalDataHub-D31yY2U7.js → usePersonalDataHub-DD0yPkw9.js} +1 -1
  141. package/src/assets/web-panel/assets/{vnode-Q2JxGiJd.js → vnode-Cxw9uvFj.js} +1 -1
  142. package/src/assets/web-panel/assets/{zoom-CCefpdWQ.js → zoom-DPRJdorO.js} +1 -1
  143. package/src/assets/web-panel/index.html +1 -1
  144. package/src/lib/image-input.js +30 -0
  145. package/src/repl/agent-repl.js +50 -5
  146. package/src/assets/web-panel/assets/Projects-05QyZ1aS.js +0 -1
  147. package/src/assets/web-panel/assets/Tasks-QZbex-Rg.js +0 -1
  148. package/src/assets/web-panel/assets/devWarning-BHqHPKav.js +0 -1
  149. package/src/assets/web-panel/assets/index-BXk6zL6J.js +0 -1
  150. package/src/assets/web-panel/assets/index-DwBj50kh.js +0 -1
@@ -1,4 +1,4 @@
1
- import{h as S,aa as gn,P as V,f as k,i as ue,a7 as Pe,J as Rt,A as bn,O as ve,au as St,r as Je,a4 as Qe,m as Se,ab as Dt,l as Sn,q as yn,L as wn,av as In,Z as Cn,a8 as Me,G as xn,$ as yt,s as $n,aw as On}from"./index-6ovmKZFr.js";import{d as fe,b as H,c as M,r as me,k as Tn,a7 as Vt,i as Be,e as Ie,o as ye,w as ne,Q as qe,F as Fe,s as X,f as De,p as ke,j as Mn,a as $e,t as En,x as Pn,z as et,n as Ee,q as Fn,a8 as ge}from"./vendor-BvqAck49.js";import{T as Rn}from"./Trigger-2kmiTx39.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ht}from"./vnode-Q2JxGiJd.js";import{B as Dn}from"./BaseInput-ydDdLJ4G.js";import{p as tt}from"./pickAttrs-sB3eltnD.js";import{O as Vn}from"./Overflow-DBDRjR3X.js";import{i as Hn}from"./isMobile--2fOlCHx.js";import{i as nt}from"./initDefaultProps-C8-M6qD9.js";import{R as Nn}from"./index-DVV9Yoj5.js";import{w as he}from"./raf-Deuc0E8-.js";import{s as be}from"./motion-DpIOwjTZ.js";import{o as _e}from"./omit-gBR7QllC.js";import{u as wt}from"./useMergedState-Cl2q1fes.js";import{u as It}from"./useState-BK4hy8Ma.js";import{C as Ln,L as Bn,aj as _n,b as An,k as zn,ah as Wn}from"./icons-DP3uiYxy.js";import{u as Kn,F as jn}from"./FormItemContext-C5QahcLV.js";import{a as Un,g as Gn}from"./statusUtils-DrMd97n-.js";import{u as Yn}from"./Compact-GDJKV58z.js";import{i as Ct}from"./move-BoqPw0Zr.js";import{s as Xn,a as Qn,b as qn,c as Zn,i as xt}from"./slide-xHJEfzhP.js";import{g as Jn}from"./compact-item-CWCSOuGZ.js";import{d as kn}from"./devWarning-BHqHPKav.js";function $t(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Nt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function eo(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:c}=Nt(t,!1);function a(f,s){f.forEach(r=>{const m=r[l];if(s||!(c in r)){const b=r[i];n.push({key:$t(r,n.length),groupOption:s,data:r,label:m,value:b})}else{let b=m;b===void 0&&o&&(b=r.label),n.push({key:$t(r,n.length),group:!0,data:r,label:b}),a(r[c],!0)}})}return a(e,!1),n}function Ze(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return gn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function to(e,t){if(!t||!t.length)return null;let o=!1;function n(i,c){let[a,...f]=c;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,m)=>[...r,...n(m,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var no=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const oo=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},lo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:V.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:V.oneOfType([Number,Boolean]).def(!0),popupElement:V.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=H(()=>{const{dropdownMatchSelectWidth:a}=e;return oo(a)}),c=me();return l({getPopupElement:()=>c.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=no(a,["empty"]),{visible:r,dropdownAlign:m,prefixCls:b,popupElement:C,dropdownClassName:g,dropdownStyle:y,direction:w="ltr",placement:x,dropdownMatchSelectWidth:D,containerWidth:E,dropdownRender:I,animation:v,transitionName:P,getPopupContainer:O,getTriggerDOMNode:R,onPopupVisibleChange:N,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=C;I&&(W=I({menuNode:C,props:e}));const G=v?`${Y}-${v}`:P,z=S({minWidth:`${E}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${E}px`),M(Rn,k(k({},e),{},{showAction:N?["click"]:[],hideAction:N?["click"]:[],popupPlacement:x||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:m,popupVisible:r,getPopupContainer:O,popupClassName:ue(g,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:R,onPopupVisibleChange:N}),{default:o.default,popup:()=>M("div",{ref:c,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),Ce=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:c,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(c):s=Tn(i)?Vt(i):i,M("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:M("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};Ce.inheritAttrs=!1;Ce.displayName="TransBtn";Ce.props={class:String,customizeIcon:V.any,customizeIconProps:V.any,onMousedown:Function,onClick:Function};const io={inputRef:V.any,prefixCls:String,id:String,inputElement:V.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:V.oneOfType([V.number,V.string]),attrs:V.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Lt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:io,setup(e){let t=null;const o=Be("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:c,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:m,activeDescendantId:b,value:C,onKeydown:g,onMousedown:y,onChange:w,onPaste:x,onCompositionstart:D,onCompositionend:E,onFocus:I,onBlur:v,open:P,inputRef:O,attrs:R}=e;let N=c||M(Dn,null,null);const A=N.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return N=Ht(N,S(S(S(S(S({type:"search"},A),{id:i,ref:O,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=N?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),R),{value:m?C:"",readonly:!m,unselectable:m?null:"on",style:S(S({},ie),{opacity:m?null:0}),onKeydown:p=>{g(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){E(p),oe&&oe(p)},onPaste:x,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),I&&I(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,L=new Array(p),T=0;T<p;T++)L[T]=arguments[T];t=setTimeout(()=>{W&&W(L[0]),v&&v(L[0]),o?.blur(L[0])},100)}}),N.type==="textarea"?{}:{type:"search"}),!0,!0),N}}}),ao=Symbol("TreeSelectLegacyContextPropsKey");function ot(){return Be(ao,{})}const ro={id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),compositionStatus:Boolean,removeIcon:V.any,choiceTransitionName:String,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},Ot=e=>{e.preventDefault(),e.stopPropagation()},so=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:ro,setup(e){const t=X(),o=X(0),n=X(!1),l=ot(),i=H(()=>`${e.prefixCls}-selection`),c=H(()=>e.open||e.mode==="tags"?e.searchValue:""),a=H(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ie(()=>{f.value=c.value}),ye(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(g,y,w,x,D){return M("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof g=="string"||typeof g=="number"?g.toString():void 0},[M("span",{class:`${i.value}-item-content`},[y]),x&&M(Ce,{class:`${i.value}-item-remove`,onMousedown:Ot,onClick:D,customizeIcon:e.removeIcon},{default:()=>[qe("×")]})])}function r(g,y,w,x,D,E){var I;const v=O=>{Ot(O),e.onToggleOpen(!open)};let P=E;return l.keyEntities&&(P=((I=l.keyEntities[g])===null||I===void 0?void 0:I.node)||{}),M("span",{key:g,onMousedown:v},[e.tagRender({label:y,value:g,disabled:w,closable:x,onClose:D,option:P})])}function m(g){const{disabled:y,label:w,value:x,option:D}=g,E=!e.disabled&&!y;let I=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(I);P.length>e.maxTagTextLength&&(I=`${P.slice(0,e.maxTagTextLength)}...`)}const v=P=>{var O;P&&P.stopPropagation(),(O=e.onRemove)===null||O===void 0||O.call(e,g)};return typeof e.tagRender=="function"?r(x,I,y,E,v,D):s(w,I,y,E,v)}function b(g){const{maxTagPlaceholder:y=x=>`+ ${x.length} ...`}=e,w=typeof y=="function"?y(g):y;return s(w,w,!1)}const C=g=>{const y=g.target.composing;f.value=g.target.value,y||e.onInputChange(g)};return()=>{const{id:g,prefixCls:y,values:w,open:x,inputRef:D,placeholder:E,disabled:I,autofocus:v,autocomplete:P,activeDescendantId:O,tabindex:R,compositionStatus:N,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=M("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[M(Lt,{inputRef:D,open:x,prefixCls:y,id:g,inputElement:null,disabled:I,autofocus:v,autocomplete:P,editable:a.value,activeDescendantId:O,value:f.value,onKeydown:B,onMousedown:U,onChange:C,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),M("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,qe(" ")])]),z=M(Vn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:m,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return M(Fe,null,[z,!w.length&&!c.value&&!N&&M("span",{class:`${i.value}-placeholder`},[E])])}}}),uo={inputElement:V.any,id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},lt=fe({name:"SingleSelector",setup(e){const t=X(!1),o=H(()=>e.mode==="combobox"),n=H(()=>o.value||e.showSearch),l=H(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=ot();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const c=H(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=H(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=c.value?{visibility:"hidden"}:void 0;return M("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,m,b,C;const{inputElement:g,prefixCls:y,id:w,values:x,inputRef:D,disabled:E,autofocus:I,autocomplete:v,activeDescendantId:P,open:O,tabindex:R,optionLabelRender:N,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=x[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((m=i.keyEntities[oe])===null||m===void 0?void 0:m.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=N&&G?N(G.option):G?.label;return M(Fe,null,[M("span",{class:`${y}-selection-search`},[M(Lt,{inputRef:D,prefixCls:y,id:w,open:O,inputElement:g,disabled:E,autofocus:I,autocomplete:v,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0)},null)]),!o.value&&G&&!c.value&&M("span",{class:`${y}-selection-item`,title:a.value},[M(Fe,{key:(C=G.key)!==null&&C!==void 0?C:G.value},[z])]),f()])}}});lt.props=uo;lt.inheritAttrs=!1;function co(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Bt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;De(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Re(){const e=t=>{e.current=t};return e}const fo=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:V.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:V.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),disabled:{type:Boolean,default:void 0},placeholder:V.any,removeIcon:V.any,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Re(),l=me(!1),[i,c]=Bt(0),a=x=>{const{which:D}=x;(D===_.UP||D===_.DOWN)&&x.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(x),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(x.target.value),co(D)&&e.onToggleOpen(!0)},f=()=>{c(!0)};let s=null;const r=x=>{e.onSearch(x,!0,l.value)!==!1&&e.onToggleOpen(!0)},m=()=>{l.value=!0},b=x=>{l.value=!1,e.mode!=="combobox"&&r(x.target.value)},C=x=>{let{target:{value:D}}=x;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const E=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(E,s)}s=null,r(D)},g=x=>{const{clipboardData:D}=x;s=D.getData("text")},y=x=>{let{target:D}=x;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=x=>{const D=i();x.target!==n.current&&!D&&x.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:x,domRef:D,mode:E}=e,I={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:C,onInputPaste:g,compositionStatus:l.value,onInputCompositionStart:m,onInputCompositionEnd:b},v=E==="multiple"||E==="tags"?M(so,k(k({},e),I),null):M(lt,k(k({},e),I),null);return M("div",{ref:D,class:`${x}-selector`,onClick:y,onMousedown:w},[v])}}});function po(e,t,o){function n(l){var i,c,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(c=e[1])===null||c===void 0?void 0:c.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}ye(()=>{window.addEventListener("mousedown",n)}),De(()=>{window.removeEventListener("mousedown",n)})}function mo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return ye(()=>{n()}),[t,(i,c)=>{n(),o=setTimeout(()=>{t.value=i,c&&c()},e)},n]}const _t=Symbol("BaseSelectContextKey");function vo(e){return ke(_t,e)}function ho(){return Be(_t,{})}function At(e){if(!Mn(e))return $e(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return $e(t)}var go=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const bo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],So=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:V.any,emptyOptions:Boolean}),zt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:V.any,placeholder:V.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:V.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:V.any,clearIcon:V.any,removeIcon:V.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),yo=()=>S(S({},So()),zt());function it(e){return e==="tags"||e==="multiple"}const wo=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:nt(yo(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=H(()=>it(e.mode)),c=H(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);ye(()=>{a.value=Hn()});const f=ot(),s=X(null),r=Re(),m=X(null),b=X(null),C=X(null),g=me(!1),[y,w,x]=mo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var d;return(d=C.value)===null||d===void 0?void 0:d.scrollTo(u)}});const I=H(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const d=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof d=="string"||typeof d=="number"?String(d):""}),v=e.open!==void 0?e.open:e.defaultOpen,P=X(v),O=X(v),R=u=>{P.value=e.open!==void 0?e.open:u,O.value=P.value};ne(()=>e.open,()=>{R(e.open)});const N=H(()=>!e.notFoundContent&&e.emptyOptions);Ie(()=>{O.value=P.value,(e.disabled||N.value&&O.value&&e.mode==="combobox")&&(O.value=!1)});const A=H(()=>N.value?!1:O.value),B=u=>{const d=u!==void 0?u:!O.value;O.value!==d&&!e.disabled&&(R(d),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(d),!d&&K.value&&(K.value=!1,w(!1,()=>{L.value=!1,g.value=!1})))},U=H(()=>(e.tokenSeparators||[]).some(u=>[`
1
+ import{h as S,aa as gn,P as V,f as k,i as ue,a7 as Pe,J as Rt,A as bn,O as ve,au as St,r as Je,a4 as Qe,m as Se,ab as Dt,l as Sn,q as yn,L as wn,av as In,Z as Cn,a8 as Me,G as xn,$ as yt,s as $n,aw as On}from"./index-D9Sygqi9.js";import{d as fe,b as H,c as M,r as me,k as Tn,a7 as Vt,i as Be,e as Ie,o as ye,w as ne,Q as qe,F as Fe,s as X,f as De,p as ke,j as Mn,a as $e,t as En,x as Pn,z as et,n as Ee,q as Fn,a8 as ge}from"./vendor-BvqAck49.js";import{T as Rn}from"./Trigger-CfBK_gR2.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ht}from"./vnode-Cxw9uvFj.js";import{B as Dn}from"./BaseInput-BkEVF4o4.js";import{p as tt}from"./pickAttrs-D95no1kz.js";import{O as Vn}from"./Overflow-DGOBthyf.js";import{i as Hn}from"./isMobile--2fOlCHx.js";import{i as nt}from"./initDefaultProps-C_C9YePV.js";import{R as Nn}from"./index-C1Ve7k2T.js";import{w as he}from"./raf-Deuc0E8-.js";import{s as be}from"./motion-DsRTNcag.js";import{o as _e}from"./omit-B_C8ne12.js";import{u as wt}from"./useMergedState-Cl2q1fes.js";import{u as It}from"./useState-BK4hy8Ma.js";import{C as Ln,L as Bn,aj as _n,b as An,k as zn,ah as Wn}from"./icons-DP3uiYxy.js";import{u as Kn,F as jn}from"./FormItemContext-CwjF4P1N.js";import{a as Un,g as Gn}from"./statusUtils-CXlmu_Qa.js";import{u as Yn}from"./Compact-D_XPXg9d.js";import{i as Ct}from"./move-CNQpgGaU.js";import{s as Xn,a as Qn,b as qn,c as Zn,i as xt}from"./slide-C1PZ8gjQ.js";import{g as Jn}from"./compact-item-BoP3ciR6.js";import{d as kn}from"./devWarning-Cjez93XF.js";function $t(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Nt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function eo(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:c}=Nt(t,!1);function a(f,s){f.forEach(r=>{const m=r[l];if(s||!(c in r)){const b=r[i];n.push({key:$t(r,n.length),groupOption:s,data:r,label:m,value:b})}else{let b=m;b===void 0&&o&&(b=r.label),n.push({key:$t(r,n.length),group:!0,data:r,label:b}),a(r[c],!0)}})}return a(e,!1),n}function Ze(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return gn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function to(e,t){if(!t||!t.length)return null;let o=!1;function n(i,c){let[a,...f]=c;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,m)=>[...r,...n(m,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var no=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const oo=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},lo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:V.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:V.oneOfType([Number,Boolean]).def(!0),popupElement:V.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=H(()=>{const{dropdownMatchSelectWidth:a}=e;return oo(a)}),c=me();return l({getPopupElement:()=>c.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=no(a,["empty"]),{visible:r,dropdownAlign:m,prefixCls:b,popupElement:C,dropdownClassName:g,dropdownStyle:y,direction:w="ltr",placement:x,dropdownMatchSelectWidth:D,containerWidth:E,dropdownRender:I,animation:v,transitionName:P,getPopupContainer:O,getTriggerDOMNode:R,onPopupVisibleChange:N,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=C;I&&(W=I({menuNode:C,props:e}));const G=v?`${Y}-${v}`:P,z=S({minWidth:`${E}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${E}px`),M(Rn,k(k({},e),{},{showAction:N?["click"]:[],hideAction:N?["click"]:[],popupPlacement:x||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:m,popupVisible:r,getPopupContainer:O,popupClassName:ue(g,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:R,onPopupVisibleChange:N}),{default:o.default,popup:()=>M("div",{ref:c,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),Ce=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:c,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(c):s=Tn(i)?Vt(i):i,M("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:M("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};Ce.inheritAttrs=!1;Ce.displayName="TransBtn";Ce.props={class:String,customizeIcon:V.any,customizeIconProps:V.any,onMousedown:Function,onClick:Function};const io={inputRef:V.any,prefixCls:String,id:String,inputElement:V.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:V.oneOfType([V.number,V.string]),attrs:V.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Lt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:io,setup(e){let t=null;const o=Be("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:c,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:m,activeDescendantId:b,value:C,onKeydown:g,onMousedown:y,onChange:w,onPaste:x,onCompositionstart:D,onCompositionend:E,onFocus:I,onBlur:v,open:P,inputRef:O,attrs:R}=e;let N=c||M(Dn,null,null);const A=N.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return N=Ht(N,S(S(S(S(S({type:"search"},A),{id:i,ref:O,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=N?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),R),{value:m?C:"",readonly:!m,unselectable:m?null:"on",style:S(S({},ie),{opacity:m?null:0}),onKeydown:p=>{g(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){E(p),oe&&oe(p)},onPaste:x,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),I&&I(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,L=new Array(p),T=0;T<p;T++)L[T]=arguments[T];t=setTimeout(()=>{W&&W(L[0]),v&&v(L[0]),o?.blur(L[0])},100)}}),N.type==="textarea"?{}:{type:"search"}),!0,!0),N}}}),ao=Symbol("TreeSelectLegacyContextPropsKey");function ot(){return Be(ao,{})}const ro={id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),compositionStatus:Boolean,removeIcon:V.any,choiceTransitionName:String,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},Ot=e=>{e.preventDefault(),e.stopPropagation()},so=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:ro,setup(e){const t=X(),o=X(0),n=X(!1),l=ot(),i=H(()=>`${e.prefixCls}-selection`),c=H(()=>e.open||e.mode==="tags"?e.searchValue:""),a=H(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ie(()=>{f.value=c.value}),ye(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(g,y,w,x,D){return M("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof g=="string"||typeof g=="number"?g.toString():void 0},[M("span",{class:`${i.value}-item-content`},[y]),x&&M(Ce,{class:`${i.value}-item-remove`,onMousedown:Ot,onClick:D,customizeIcon:e.removeIcon},{default:()=>[qe("×")]})])}function r(g,y,w,x,D,E){var I;const v=O=>{Ot(O),e.onToggleOpen(!open)};let P=E;return l.keyEntities&&(P=((I=l.keyEntities[g])===null||I===void 0?void 0:I.node)||{}),M("span",{key:g,onMousedown:v},[e.tagRender({label:y,value:g,disabled:w,closable:x,onClose:D,option:P})])}function m(g){const{disabled:y,label:w,value:x,option:D}=g,E=!e.disabled&&!y;let I=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(I);P.length>e.maxTagTextLength&&(I=`${P.slice(0,e.maxTagTextLength)}...`)}const v=P=>{var O;P&&P.stopPropagation(),(O=e.onRemove)===null||O===void 0||O.call(e,g)};return typeof e.tagRender=="function"?r(x,I,y,E,v,D):s(w,I,y,E,v)}function b(g){const{maxTagPlaceholder:y=x=>`+ ${x.length} ...`}=e,w=typeof y=="function"?y(g):y;return s(w,w,!1)}const C=g=>{const y=g.target.composing;f.value=g.target.value,y||e.onInputChange(g)};return()=>{const{id:g,prefixCls:y,values:w,open:x,inputRef:D,placeholder:E,disabled:I,autofocus:v,autocomplete:P,activeDescendantId:O,tabindex:R,compositionStatus:N,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=M("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[M(Lt,{inputRef:D,open:x,prefixCls:y,id:g,inputElement:null,disabled:I,autofocus:v,autocomplete:P,editable:a.value,activeDescendantId:O,value:f.value,onKeydown:B,onMousedown:U,onChange:C,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),M("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,qe(" ")])]),z=M(Vn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:m,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return M(Fe,null,[z,!w.length&&!c.value&&!N&&M("span",{class:`${i.value}-placeholder`},[E])])}}}),uo={inputElement:V.any,id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},lt=fe({name:"SingleSelector",setup(e){const t=X(!1),o=H(()=>e.mode==="combobox"),n=H(()=>o.value||e.showSearch),l=H(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=ot();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const c=H(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=H(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=c.value?{visibility:"hidden"}:void 0;return M("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,m,b,C;const{inputElement:g,prefixCls:y,id:w,values:x,inputRef:D,disabled:E,autofocus:I,autocomplete:v,activeDescendantId:P,open:O,tabindex:R,optionLabelRender:N,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=x[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((m=i.keyEntities[oe])===null||m===void 0?void 0:m.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=N&&G?N(G.option):G?.label;return M(Fe,null,[M("span",{class:`${y}-selection-search`},[M(Lt,{inputRef:D,prefixCls:y,id:w,open:O,inputElement:g,disabled:E,autofocus:I,autocomplete:v,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0)},null)]),!o.value&&G&&!c.value&&M("span",{class:`${y}-selection-item`,title:a.value},[M(Fe,{key:(C=G.key)!==null&&C!==void 0?C:G.value},[z])]),f()])}}});lt.props=uo;lt.inheritAttrs=!1;function co(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Bt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;De(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Re(){const e=t=>{e.current=t};return e}const fo=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:V.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:V.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),disabled:{type:Boolean,default:void 0},placeholder:V.any,removeIcon:V.any,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Re(),l=me(!1),[i,c]=Bt(0),a=x=>{const{which:D}=x;(D===_.UP||D===_.DOWN)&&x.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(x),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(x.target.value),co(D)&&e.onToggleOpen(!0)},f=()=>{c(!0)};let s=null;const r=x=>{e.onSearch(x,!0,l.value)!==!1&&e.onToggleOpen(!0)},m=()=>{l.value=!0},b=x=>{l.value=!1,e.mode!=="combobox"&&r(x.target.value)},C=x=>{let{target:{value:D}}=x;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const E=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(E,s)}s=null,r(D)},g=x=>{const{clipboardData:D}=x;s=D.getData("text")},y=x=>{let{target:D}=x;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=x=>{const D=i();x.target!==n.current&&!D&&x.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:x,domRef:D,mode:E}=e,I={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:C,onInputPaste:g,compositionStatus:l.value,onInputCompositionStart:m,onInputCompositionEnd:b},v=E==="multiple"||E==="tags"?M(so,k(k({},e),I),null):M(lt,k(k({},e),I),null);return M("div",{ref:D,class:`${x}-selector`,onClick:y,onMousedown:w},[v])}}});function po(e,t,o){function n(l){var i,c,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(c=e[1])===null||c===void 0?void 0:c.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}ye(()=>{window.addEventListener("mousedown",n)}),De(()=>{window.removeEventListener("mousedown",n)})}function mo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return ye(()=>{n()}),[t,(i,c)=>{n(),o=setTimeout(()=>{t.value=i,c&&c()},e)},n]}const _t=Symbol("BaseSelectContextKey");function vo(e){return ke(_t,e)}function ho(){return Be(_t,{})}function At(e){if(!Mn(e))return $e(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return $e(t)}var go=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const bo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],So=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:V.any,emptyOptions:Boolean}),zt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:V.any,placeholder:V.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:V.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:V.any,clearIcon:V.any,removeIcon:V.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),yo=()=>S(S({},So()),zt());function it(e){return e==="tags"||e==="multiple"}const wo=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:nt(yo(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=H(()=>it(e.mode)),c=H(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);ye(()=>{a.value=Hn()});const f=ot(),s=X(null),r=Re(),m=X(null),b=X(null),C=X(null),g=me(!1),[y,w,x]=mo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var d;return(d=C.value)===null||d===void 0?void 0:d.scrollTo(u)}});const I=H(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const d=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof d=="string"||typeof d=="number"?String(d):""}),v=e.open!==void 0?e.open:e.defaultOpen,P=X(v),O=X(v),R=u=>{P.value=e.open!==void 0?e.open:u,O.value=P.value};ne(()=>e.open,()=>{R(e.open)});const N=H(()=>!e.notFoundContent&&e.emptyOptions);Ie(()=>{O.value=P.value,(e.disabled||N.value&&O.value&&e.mode==="combobox")&&(O.value=!1)});const A=H(()=>N.value?!1:O.value),B=u=>{const d=u!==void 0?u:!O.value;O.value!==d&&!e.disabled&&(R(d),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(d),!d&&K.value&&(K.value=!1,w(!1,()=>{L.value=!1,g.value=!1})))},U=H(()=>(e.tokenSeparators||[]).some(u=>[`
2
2
  `,`\r
3
3
  `].includes(u))),Y=(u,d,F)=>{var $,j;let q=!0,Z=u;($=e.onActiveValueChange)===null||$===void 0||$.call(e,null);const J=F?null:to(u,e.tokenSeparators);return e.mode!=="combobox"&&J&&(Z="",(j=e.onSearchSplit)===null||j===void 0||j.call(e,J),B(!1),q=!1),e.onSearch&&I.value!==Z&&e.onSearch(Z,{source:d?"typing":"effect"}),q},W=u=>{var d;!u||!u.trim()||(d=e.onSearch)===null||d===void 0||d.call(e,u,{source:"submit"})};ne(O,()=>{!O.value&&!i.value&&e.mode!=="combobox"&&Y("",!1,!1)},{immediate:!0,flush:"post"}),ne(()=>e.disabled,()=>{P.value&&e.disabled&&R(!1),e.disabled&&!g.value&&w(!1)},{immediate:!0});const[G,z]=Bt(),oe=function(u){var d;const F=G(),{which:$}=u;if($===_.ENTER&&(e.mode!=="combobox"&&u.preventDefault(),O.value||B(!0)),z(!!I.value),$===_.BACKSPACE&&!F&&i.value&&!I.value&&e.displayValues.length){const J=[...e.displayValues];let Q=null;for(let le=J.length-1;le>=0;le-=1){const ae=J[le];if(!ae.disabled){J.splice(le,1),Q=ae;break}}Q&&e.onDisplayValuesChange(J,{type:"remove",values:[Q]})}for(var j=arguments.length,q=new Array(j>1?j-1:0),Z=1;Z<j;Z++)q[Z-1]=arguments[Z];O.value&&C.value&&C.value.onKeydown(u,...q),(d=e.onKeydown)===null||d===void 0||d.call(e,u,...q)},ie=function(u){for(var d=arguments.length,F=new Array(d>1?d-1:0),$=1;$<d;$++)F[$-1]=arguments[$];O.value&&C.value&&C.value.onKeyup(u,...F),e.onKeyup&&e.onKeyup(u,...F)},p=u=>{const d=e.displayValues.filter(F=>F!==u);e.onDisplayValuesChange(d,{type:"remove",values:[u]})},L=X(!1),T=function(){w(!0),e.disabled||(e.onFocus&&!L.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&B(!0)),L.value=!0},K=me(!1),te=function(){if(K.value||(g.value=!0,w(!1,()=>{L.value=!1,g.value=!1,B(!1)}),e.disabled))return;const u=I.value;u&&(e.mode==="tags"?e.onSearch(u,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},re=()=>{K.value=!0},se=()=>{K.value=!1};ke("VCSelectContainerEvent",{focus:T,blur:te});const ee=[];ye(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)}),De(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)});const ce=function(u){var d,F;const{target:$}=u,j=(d=m.value)===null||d===void 0?void 0:d.getPopupElement();if(j&&j.contains($)){const Q=setTimeout(()=>{var le;const ae=ee.indexOf(Q);ae!==-1&&ee.splice(ae,1),x(),!a.value&&!j.contains(document.activeElement)&&((le=b.value)===null||le===void 0||le.focus())});ee.push(Q)}for(var q=arguments.length,Z=new Array(q>1?q-1:0),J=1;J<q;J++)Z[J-1]=arguments[J];(F=e.onMousedown)===null||F===void 0||F.call(e,u,...Z)},de=X(null),h=()=>{};return ye(()=>{ne(A,()=>{var u;if(A.value){const d=Math.ceil((u=s.value)===null||u===void 0?void 0:u.offsetWidth);de.value!==d&&!Number.isNaN(d)&&(de.value=d)}},{immediate:!0,flush:"post"})}),po([s,m],A,B),vo(At(S(S({},En(e)),{open:O,triggerOpen:A,showSearch:c,multiple:i,toggleOpen:B}))),()=>{const u=S(S({},e),o),{prefixCls:d,id:F,open:$,defaultOpen:j,mode:q,showSearch:Z,searchValue:J,onSearch:Q,allowClear:le,clearIcon:ae,showArrow:Ve,inputIcon:He,disabled:Oe,loading:Ne,getInputElement:ct,getPopupContainer:Xt,placement:Qt,animation:qt,transitionName:Zt,dropdownStyle:Jt,dropdownClassName:kt,dropdownMatchSelectWidth:en,dropdownRender:tn,dropdownAlign:nn,showAction:cl,direction:on,tokenSeparators:dl,tagRender:ln,optionLabelRender:an,onPopupScroll:fl,onDropdownVisibleChange:pl,onFocus:ml,onBlur:vl,onKeyup:hl,onKeydown:gl,onMousedown:bl,onClear:ze,omitDomProps:We,getRawInputElement:dt,displayValues:Le,onDisplayValuesChange:rn,emptyOptions:sn,activeDescendantId:un,activeValue:cn,OptionList:dn}=u,fn=go(u,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),ft=q==="combobox"&&ct&&ct()||null,Te=typeof dt=="function"&&dt(),Ke=S({},fn);let pt;Te&&(pt=we=>{B(we)}),bo.forEach(we=>{delete Ke[we]}),We?.forEach(we=>{delete Ke[we]});const mt=Ve!==void 0?Ve:Ne||!i.value&&q!=="combobox";let vt;mt&&(vt=M(Ce,{class:ue(`${d}-arrow`,{[`${d}-arrow-loading`]:Ne}),customizeIcon:He,customizeIconProps:{loading:Ne,searchValue:I.value,open:O.value,focused:y.value,showSearch:c.value}},null));let ht;const pn=()=>{ze?.(),rn([],{type:"clear",values:Le}),Y("",!1,!1)};!Oe&&le&&(Le.length||I.value)&&(ht=M(Ce,{class:`${d}-clear`,onMousedown:pn,customizeIcon:ae},{default:()=>[qe("×")]}));const mn=M(dn,{ref:C},S(S({},f.customSlots),{option:l.option})),vn=ue(d,o.class,{[`${d}-focused`]:y.value,[`${d}-multiple`]:i.value,[`${d}-single`]:!i.value,[`${d}-allow-clear`]:le,[`${d}-show-arrow`]:mt,[`${d}-disabled`]:Oe,[`${d}-loading`]:Ne,[`${d}-open`]:O.value,[`${d}-customize-input`]:ft,[`${d}-show-search`]:c.value}),gt=M(lo,{ref:m,disabled:Oe,prefixCls:d,visible:A.value,popupElement:mn,containerWidth:de.value,animation:qt,transitionName:Zt,dropdownStyle:Jt,dropdownClassName:kt,direction:on,dropdownMatchSelectWidth:en,dropdownRender:tn,dropdownAlign:nn,placement:Qt,getPopupContainer:Xt,empty:sn,getTriggerDOMNode:()=>r.current,onPopupVisibleChange:pt,onPopupMouseEnter:h,onPopupFocusin:re,onPopupFocusout:se},{default:()=>Te?Pe(Te)&&Ht(Te,{ref:r},!1,!0):M(fo,k(k({},e),{},{domRef:r,prefixCls:d,inputElement:ft,ref:b,id:F,showSearch:c.value,mode:q,activeDescendantId:un,tagRender:ln,optionLabelRender:an,values:Le,open:O.value,onToggleOpen:B,activeValue:cn,searchValue:I.value,onSearch:Y,onSearchSubmit:W,onRemove:p,tokenWithEnter:U.value}),null)});let je;return Te?je=gt:je=M("div",k(k({},Ke),{},{class:vn,ref:s,onMousedown:ce,onKeydown:oe,onKeyup:ie}),[y.value&&!O.value&&M("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${Le.map(we=>{let{label:bt,value:hn}=we;return["number","string"].includes(typeof bt)?bt:hn}).join(", ")}`]),gt,vt,ht]),je}}}),Ae=(e,t)=>{let{height:o,offset:n,prefixCls:l,onInnerResize:i}=e,{slots:c}=t;var a;let f={},s={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:`${o}px`,position:"relative",overflow:"hidden"},s=S(S({},s),{transform:`translateY(${n}px)`,position:"absolute",left:0,right:0,top:0})),M("div",{style:f},[M(Nn,{onResize:r=>{let{offsetHeight:m}=r;m&&i&&i()}},{default:()=>[M("div",{style:s,class:ue({[`${l}-holder-inner`]:l})},[(a=c.default)===null||a===void 0?void 0:a.call(c)])]})])};Ae.displayName="Filter";Ae.inheritAttrs=!1;Ae.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const Wt=(e,t)=>{let{setRef:o}=e,{slots:n}=t;var l;const i=Rt((l=n.default)===null||l===void 0?void 0:l.call(n));return i&&i.length?Vt(i[0],{ref:o}):i};Wt.props={setRef:{type:Function,default:()=>{}}};const Io=20;function Tt(e){return"touches"in e?e.touches[0].pageY:e.pageY}const Co=fe({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Re(),thumbRef:Re(),visibleTimeout:null,state:$e({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,be?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,be?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,be?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,be?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,be?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,be?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),he.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;S(this.state,{dragging:!0,pageY:Tt(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:o,startTop:n}=this.state,{onScroll:l}=this.$props;if(he.cancel(this.moveRaf),t){const i=Tt(e)-o,c=n+i,a=this.getEnableScrollRange(),f=this.getEnableHeightRange(),s=f?c/f:0,r=Math.ceil(s*a);this.moveRaf=he(()=>{l(r)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let o=e/t*100;return o=Math.max(o,Io),o=Math.min(o,e/2),Math.floor(o)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),o=this.getEnableHeightRange();return e===0||t===0?0:e/t*o},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:o}=this.$props,n=this.getSpinHeight()+"px",l=this.getTop()+"px",i=this.showScroll(),c=i&&t;return M("div",{ref:this.scrollbarRef,class:ue(`${o}-scrollbar`,{[`${o}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:c?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[M("div",{ref:this.thumbRef,class:ue(`${o}-scrollbar-thumb`,{[`${o}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:n,top:l,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function xo(e,t,o,n){const l=new Map,i=new Map,c=me(Symbol("update"));ne(e,()=>{c.value=Symbol("update")});let a;function f(){he.cancel(a)}function s(){f(),a=he(()=>{l.forEach((m,b)=>{if(m&&m.offsetParent){const{offsetHeight:C}=m;i.get(b)!==C&&(c.value=Symbol("update"),i.set(b,m.offsetHeight))}})})}function r(m,b){const C=t(m);l.get(C),b?(l.set(C,b.$el||b),s()):l.delete(C)}return Pn(()=>{f()}),[r,s,i,c]}function $o(e,t,o,n,l,i,c,a){let f;return s=>{if(s==null){a();return}he.cancel(f);const r=t.value,m=n.itemHeight;if(typeof s=="number")c(s);else if(s&&typeof s=="object"){let b;const{align:C}=s;"index"in s?{index:b}=s:b=r.findIndex(w=>l(w)===s.key);const{offset:g=0}=s,y=(w,x)=>{if(w<0||!e.value)return;const D=e.value.clientHeight;let E=!1,I=x;if(D){const v=x||C;let P=0,O=0,R=0;const N=Math.min(r.length,b);for(let U=0;U<=N;U+=1){const Y=l(r[U]);O=P;const W=o.get(Y);R=O+(W===void 0?m:W),P=R,U===b&&W===void 0&&(E=!0)}const A=e.value.scrollTop;let B=null;switch(v){case"top":B=O-g;break;case"bottom":B=R-D+g;break;default:{const U=A+D;O<A?I="top":R>U&&(I="bottom")}}B!==null&&B!==A&&c(B)}f=he(()=>{E&&i(),y(w-1,I)},2)};y(5)}}}const Oo=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),Kt=((e,t)=>{let o=!1,n=null;function l(){clearTimeout(n),o=!0,n=setTimeout(()=>{o=!1},50)}return function(i){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const a=i<0&&e.value||i>0&&t.value;return c&&a?(clearTimeout(n),o=!1):(!a||o)&&l(),!o&&a}});function To(e,t,o,n){let l=0,i=null,c=null,a=!1;const f=Kt(t,o);function s(m){if(!e.value)return;he.cancel(i);const{deltaY:b}=m;l+=b,c=b,!f(b)&&(Oo||m.preventDefault(),i=he(()=>{n(l*(a?10:1)),l=0}))}function r(m){e.value&&(a=m.detail===c)}return[s,r]}const Mo=14/15;function Eo(e,t,o){let n=!1,l=0,i=null,c=null;const a=()=>{i&&(i.removeEventListener("touchmove",f),i.removeEventListener("touchend",s))},f=b=>{if(n){const C=Math.ceil(b.touches[0].pageY);let g=l-C;l=C,o(g)&&b.preventDefault(),clearInterval(c),c=setInterval(()=>{g*=Mo,(!o(g,!0)||Math.abs(g)<=.1)&&clearInterval(c)},16)}},s=()=>{n=!1,a()},r=b=>{a(),b.touches.length===1&&!n&&(n=!0,l=Math.ceil(b.touches[0].pageY),i=b.target,i.addEventListener("touchmove",f,{passive:!1}),i.addEventListener("touchend",s))},m=()=>{};ye(()=>{document.addEventListener("touchmove",m,{passive:!1}),ne(e,b=>{t.value.removeEventListener("touchstart",r),a(),clearInterval(c),b&&t.value.addEventListener("touchstart",r,{passive:!1})},{immediate:!0})}),De(()=>{document.removeEventListener("touchmove",m)})}var Po=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const Fo=[],Ro={overflowY:"auto",overflowAnchor:"none"};function Do(e,t,o,n,l,i){let{getKey:c}=i;return e.slice(t,o+1).map((a,f)=>{const s=t+f,r=l(a,s,{}),m=c(a);return M(Wt,{key:m,setRef:b=>n(a,b)},{default:()=>[r]})})}const Vo=fe({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:V.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:o}=t;const n=H(()=>{const{height:p,itemHeight:L,virtual:T}=e;return!!(T!==!1&&p&&L)}),l=H(()=>{const{height:p,itemHeight:L,data:T}=e;return n.value&&T&&L*T.length>p}),i=$e({scrollTop:0,scrollMoving:!1}),c=H(()=>e.data||Fo),a=X([]);ne(c,()=>{a.value=et(c.value).slice()},{immediate:!0});const f=X(p=>{});ne(()=>e.itemKey,p=>{typeof p=="function"?f.value=p:f.value=L=>L?.[p]},{immediate:!0});const s=X(),r=X(),m=X(),b=p=>f.value(p),C={getKey:b};function g(p){let L;typeof p=="function"?L=p(i.scrollTop):L=p;const T=P(L);s.value&&(s.value.scrollTop=T),i.scrollTop=T}const[y,w,x,D]=xo(a,b),E=$e({scrollHeight:void 0,start:0,end:0,offset:void 0}),I=X(0);ye(()=>{Ee(()=>{var p;I.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),Fn(()=>{Ee(()=>{var p;I.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),ne([n,a],()=>{n.value||S(E,{scrollHeight:void 0,start:0,end:a.value.length-1,offset:void 0})},{immediate:!0}),ne([n,a,I,l],()=>{n.value&&!l.value&&S(E,{scrollHeight:I.value,start:0,end:a.value.length-1,offset:void 0}),s.value&&(i.scrollTop=s.value.scrollTop)},{immediate:!0}),ne([l,n,()=>i.scrollTop,a,D,()=>e.height,I],()=>{if(!n.value||!l.value)return;let p=0,L,T,K;const te=a.value.length,re=a.value,se=i.scrollTop,{itemHeight:ee,height:ce}=e,de=se+ce;for(let h=0;h<te;h+=1){const u=re[h],d=b(u);let F=x.get(d);F===void 0&&(F=ee);const $=p+F;L===void 0&&$>=se&&(L=h,T=p),K===void 0&&$>de&&(K=h),p=$}L===void 0&&(L=0,T=0,K=Math.ceil(ce/ee)),K===void 0&&(K=te-1),K=Math.min(K+1,te),S(E,{scrollHeight:p,start:L,end:K,offset:T})},{immediate:!0});const v=H(()=>E.scrollHeight-e.height);function P(p){let L=p;return Number.isNaN(v.value)||(L=Math.min(L,v.value)),L=Math.max(L,0),L}const O=H(()=>i.scrollTop<=0),R=H(()=>i.scrollTop>=v.value),N=Kt(O,R);function A(p){g(p)}function B(p){var L;const{scrollTop:T}=p.currentTarget;T!==i.scrollTop&&g(T),(L=e.onScroll)===null||L===void 0||L.call(e,p)}const[U,Y]=To(n,O,R,p=>{g(L=>L+p)});Eo(n,s,(p,L)=>N(p,L)?!1:(U({preventDefault(){},deltaY:p}),!0));function W(p){n.value&&p.preventDefault()}const G=()=>{s.value&&(s.value.removeEventListener("wheel",U,be?{passive:!1}:!1),s.value.removeEventListener("DOMMouseScroll",Y),s.value.removeEventListener("MozMousePixelScroll",W))};Ie(()=>{Ee(()=>{s.value&&(G(),s.value.addEventListener("wheel",U,be?{passive:!1}:!1),s.value.addEventListener("DOMMouseScroll",Y),s.value.addEventListener("MozMousePixelScroll",W))})}),De(()=>{G()});const z=$o(s,a,x,e,b,w,g,()=>{var p;(p=m.value)===null||p===void 0||p.delayHidden()});o({scrollTo:z});const oe=H(()=>{let p=null;return e.height&&(p=S({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},Ro),n.value&&(p.overflowY="hidden",i.scrollMoving&&(p.pointerEvents="none"))),p});return ne([()=>E.start,()=>E.end,a],()=>{if(e.onVisibleChange){const p=a.value.slice(E.start,E.end+1);e.onVisibleChange(p,a.value)}},{flush:"post"}),{state:i,mergedData:a,componentStyle:oe,onFallbackScroll:B,onScrollBar:A,componentRef:s,useVirtual:n,calRes:E,collectHeight:w,setInstance:y,sharedConfig:C,scrollBarRef:m,fillerInnerRef:r,delayHideScrollBar:()=>{var p;(p=m.value)===null||p===void 0||p.delayHidden()}}},render(){const e=S(S({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:o,itemHeight:n,fullHeight:l,data:i,itemKey:c,virtual:a,component:f="div",onScroll:s,children:r=this.$slots.default,style:m,class:b}=e,C=Po(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),g=ue(t,b),{scrollTop:y}=this.state,{scrollHeight:w,offset:x,start:D,end:E}=this.calRes,{componentStyle:I,onFallbackScroll:v,onScrollBar:P,useVirtual:O,collectHeight:R,sharedConfig:N,setInstance:A,mergedData:B,delayHideScrollBar:U}=this;return M("div",k({style:S(S({},m),{position:"relative"}),class:g},C),[M(f,{class:`${t}-holder`,style:I,ref:"componentRef",onScroll:v,onMouseenter:U},{default:()=>[M(Ae,{prefixCls:t,height:w,offset:x,onInnerResize:R,ref:"fillerInnerRef"},{default:()=>Do(B,D,E,A,r,N)})]}),O&&M(Co,{ref:"scrollBarRef",prefixCls:t,scrollTop:y,height:o,scrollHeight:w,count:B.length,onScroll:P,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function Ho(e,t,o){const n=me(e());return ne(t,(l,i)=>{o?o(l,i)&&(n.value=e()):n.value=e()}),n}function No(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const jt=Symbol("SelectContextKey");function Lo(e){return ke(jt,e)}function Bo(){return Be(jt,{})}var _o=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Mt(e){return typeof e=="string"||typeof e=="number"}const Ao=fe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{expose:o,slots:n}=t;const l=ho(),i=Bo(),c=H(()=>`${l.prefixCls}-item`),a=Ho(()=>i.flattenOptions,[()=>l.open,()=>i.flattenOptions],v=>v[0]),f=Re(),s=v=>{v.preventDefault()},r=v=>{f.current&&f.current.scrollTo(typeof v=="number"?{index:v}:v)},m=function(v){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const O=a.value.length;for(let R=0;R<O;R+=1){const N=(v+R*P+O)%O,{group:A,data:B}=a.value[N];if(!A&&!B.disabled)return N}return-1},b=$e({activeIndex:m(0)}),C=function(v){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;b.activeIndex=v;const O={source:P?"keyboard":"mouse"},R=a.value[v];if(!R){i.onActiveValue(null,-1,O);return}i.onActiveValue(R.value,v,O)};ne([()=>a.value.length,()=>l.searchValue],()=>{C(i.defaultActiveFirstOption!==!1?m(0):-1)},{immediate:!0});const g=v=>i.rawValues.has(v)&&l.mode!=="combobox";ne([()=>l.open,()=>l.searchValue],()=>{if(!l.multiple&&l.open&&i.rawValues.size===1){const v=Array.from(i.rawValues)[0],P=et(a.value).findIndex(O=>{let{data:R}=O;return R[i.fieldNames.value]===v});P!==-1&&(C(P),Ee(()=>{r(P)}))}l.open&&Ee(()=>{var v;(v=f.current)===null||v===void 0||v.scrollTo(void 0)})},{immediate:!0,flush:"post"});const y=v=>{v!==void 0&&i.onSelect(v,{selected:!i.rawValues.has(v)}),l.multiple||l.toggleOpen(!1)},w=v=>typeof v.label=="function"?v.label():v.label;function x(v){const P=a.value[v];if(!P)return null;const O=P.data||{},{value:R}=O,{group:N}=P,A=tt(O,!0),B=w(P);return P?M("div",k(k({"aria-label":typeof B=="string"&&!N?B:null},A),{},{key:v,role:N?"presentation":"option",id:`${l.id}_list_${v}`,"aria-selected":g(R)}),[R]):null}return o({onKeydown:v=>{const{which:P,ctrlKey:O}=v;switch(P){case _.N:case _.P:case _.UP:case _.DOWN:{let R=0;if(P===_.UP?R=-1:P===_.DOWN?R=1:No()&&O&&(P===_.N?R=1:P===_.P&&(R=-1)),R!==0){const N=m(b.activeIndex+R,R);r(N),C(N,!0)}break}case _.ENTER:{const R=a.value[b.activeIndex];R&&!R.data.disabled?y(R.value):y(void 0),l.open&&v.preventDefault();break}case _.ESC:l.toggleOpen(!1),l.open&&v.stopPropagation()}},onKeyup:()=>{},scrollTo:v=>{r(v)}}),()=>{const{id:v,notFoundContent:P,onPopupScroll:O}=l,{menuItemSelectedIcon:R,fieldNames:N,virtual:A,listHeight:B,listItemHeight:U}=i,Y=n.option,{activeIndex:W}=b,G=Object.keys(N).map(z=>N[z]);return a.value.length===0?M("div",{role:"listbox",id:`${v}_list`,class:`${c.value}-empty`,onMousedown:s},[P]):M(Fe,null,[M("div",{role:"listbox",id:`${v}_list`,style:{height:0,width:0,overflow:"hidden"}},[x(W-1),x(W),x(W+1)]),M(Vo,{itemKey:"key",ref:f,data:a.value,height:B,itemHeight:U,fullHeight:!1,onMousedown:s,onScroll:O,virtual:A},{default:(z,oe)=>{var ie;const{group:p,groupOption:L,data:T,value:K}=z,{key:te}=T,re=typeof z.label=="function"?z.label():z.label;if(p){const ae=(ie=T.title)!==null&&ie!==void 0?ie:Mt(re)&&re;return M("div",{class:ue(c.value,`${c.value}-group`),title:ae},[Y?Y(T):re!==void 0?re:te])}const{disabled:se,title:ee,children:ce,style:de,class:h,className:u}=T,d=_o(T,["disabled","title","children","style","class","className"]),F=_e(d,G),$=g(K),j=`${c.value}-option`,q=ue(c.value,j,h,u,{[`${j}-grouped`]:L,[`${j}-active`]:W===oe&&!se,[`${j}-disabled`]:se,[`${j}-selected`]:$}),Z=w(z),J=!R||typeof R=="function"||$,Q=typeof Z=="number"?Z:Z||K;let le=Mt(Q)?Q.toString():void 0;return ee!==void 0&&(le=ee),M("div",k(k({},F),{},{"aria-selected":$,class:q,title:le,onMousemove:ae=>{d.onMousemove&&d.onMousemove(ae),!(W===oe||se)&&C(oe)},onClick:ae=>{se||y(K),d.onClick&&d.onClick(ae)},style:de}),[M("div",{class:`${j}-content`},[Y?Y(T):Q]),Pe(R)||$,J&&M(Ce,{class:`${c.value}-option-state`,customizeIcon:R,customizeIconProps:{isSelected:$}},{default:()=>[$?"✓":null]})])}})])}}});var zo=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Wo(e){const t=e,{key:o,children:n}=t,l=t.props,{value:i,disabled:c}=l,a=zo(l,["value","disabled"]),f=n?.default;return S({key:o,value:i!==void 0?i:o,children:f,disabled:c||c===""},a)}function at(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Rt(e).map((n,l)=>{var i;if(!Pe(n)||!n.type)return null;const{type:{isSelectOptGroup:c},key:a,children:f,props:s}=n;if(t||!c)return Wo(n);const r=f&&f.default?f.default():void 0,m=s?.label||((i=f.label)===null||i===void 0?void 0:i.call(f))||a;return S(S({key:`__RC_SELECT_GRP__${a===null?l:String(a)}__`},s),{label:m,options:at(r||[])})}).filter(n=>n)}function Ko(e,t,o){const n=X(),l=X(),i=X(),c=X([]);return ne([e,t],()=>{e.value?c.value=et(e.value).slice():c.value=at(t.value)},{immediate:!0,deep:!0}),Ie(()=>{const a=c.value,f=new Map,s=new Map,r=o.value;function m(b){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let g=0;g<b.length;g+=1){const y=b[g];!y[r.options]||C?(f.set(y[r.value],y),s.set(y[r.label],y)):m(y[r.options],!0)}}m(a),n.value=a,l.value=f,i.value=s}),{options:n,valueOptions:l,labelOptions:i}}let Et=0;const jo=bn();function Uo(){let e;return jo?(e=Et,Et+=1):e="TEST_OR_SSR",e}function Go(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:me("");const t=`rc_select_${Uo()}`;return e.value||t}function rt(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Yo(e){const{mode:t,options:o,children:n,backfill:l,allowClear:i,placeholder:c,getInputElement:a,showSearch:f,onSearch:s,defaultOpen:r,autofocus:m,labelInValue:b,value:C,inputValue:g,optionLabelProp:y}=e,w=it(t),x=f!==void 0?f:w||t==="combobox",D=o||at(n);if(ve(t!=="tags"||D.every(E=>!E.disabled),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ve(t!=="combobox"||!y,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),ve(t==="combobox"||!l,"`backfill` only works with `combobox` mode."),ve(t==="combobox"||!a,"`getInputElement` only work with `combobox` mode."),St(t!=="combobox"||!a||!i||!c,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),s&&!x&&t!=="combobox"&&t!=="tags"&&ve(!1,"`onSearch` should work with `showSearch` instead of use alone."),St(!r||m,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."),C!=null){const E=rt(C);ve(!b||E.every(I=>typeof I=="object"&&("key"in I||"value"in I)),"`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"),ve(!w||Array.isArray(C),"`value` should be array when `mode` is `multiple` or `tags`")}if(n){let E=null;n.some(I=>{var v;if(!Pe(I)||!I.type)return!1;const{type:P}=I;return P.isSelectOption?!1:P.isSelectOptGroup?!(((v=I.children)===null||v===void 0?void 0:v.default())||[]).every(N=>!Pe(N)||!I.type||N.type.isSelectOption?!0:(E=N.type,!1)):(E=P,!0)}),E&&ve(!1,`\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${E.displayName||E.name||E}\`.`),ve(g===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ue(e,t){return rt(e).join("").toUpperCase().includes(t)}const Xo=((e,t,o,n,l)=>H(()=>{const i=o.value,c=l?.value,a=n?.value;if(!i||a===!1)return e.value;const{options:f,label:s,value:r}=t.value,m=[],b=typeof a=="function",C=i.toUpperCase(),g=b?a:(w,x)=>c?Ue(x[c],C):x[f]?Ue(x[s!=="children"?s:"label"],C):Ue(x[r],C),y=b?w=>Ze(w):w=>w;return e.value.forEach(w=>{if(w[f]){if(g(i,y(w)))m.push(w);else{const D=w[f].filter(E=>g(i,y(E)));D.length&&m.push(S(S({},w),{[f]:D}))}return}g(i,y(w))&&m.push(w)}),m})),Qo=((e,t)=>{const o=X({values:new Map,options:new Map});return[H(()=>{const{values:i,options:c}=o.value,a=e.value.map(r=>{var m;return r.label===void 0?S(S({},r),{label:(m=i.get(r.value))===null||m===void 0?void 0:m.label}):r}),f=new Map,s=new Map;return a.forEach(r=>{f.set(r.value,r),s.set(r.value,t.value.get(r.value)||c.get(r.value))}),o.value.values=f,o.value.options=s,a}),i=>t.value.get(i)||o.value.options.get(i)]}),qo=["inputValue"];function Ut(){return S(S({},zt()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:V.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:V.any,defaultValue:V.any,onChange:Function,children:Array})}function Zo(e){return!e||typeof e!="object"}const Jo=fe({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:nt(Ut(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:o,attrs:n,slots:l}=t;const i=Go(ge(e,"id")),c=H(()=>it(e.mode)),a=H(()=>!!(!e.options&&e.children)),f=H(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),s=H(()=>Nt(e.fieldNames,a.value)),[r,m]=wt("",{value:H(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:h=>h||""}),b=Ko(ge(e,"options"),ge(e,"children"),s),{valueOptions:C,labelOptions:g,options:y}=b,w=h=>rt(h).map(d=>{var F,$;let j,q,Z,J;Zo(d)?j=d:(Z=d.key,q=d.label,j=(F=d.value)!==null&&F!==void 0?F:Z);const Q=C.value.get(j);return Q&&(q===void 0&&(q=Q?.[e.optionLabelProp||s.value.label]),Z===void 0&&(Z=($=Q?.key)!==null&&$!==void 0?$:j),J=Q?.disabled),{label:q,value:j,key:Z,disabled:J,option:Q}}),[x,D]=wt(e.defaultValue,{value:ge(e,"value")}),E=H(()=>{var h;const u=w(x.value);return e.mode==="combobox"&&!(!((h=u[0])===null||h===void 0)&&h.value)?[]:u}),[I,v]=Qo(E,C),P=H(()=>{if(!e.mode&&I.value.length===1){const h=I.value[0];if(h.value===null&&(h.label===null||h.label===void 0))return[]}return I.value.map(h=>{var u;return S(S({},h),{label:(u=typeof h.label=="function"?h.label():h.label)!==null&&u!==void 0?u:h.value})})}),O=H(()=>new Set(I.value.map(h=>h.value)));Ie(()=>{var h;if(e.mode==="combobox"){const u=(h=I.value[0])===null||h===void 0?void 0:h.value;u!=null&&m(String(u))}},{flush:"post"});const R=(h,u)=>{const d=u??h;return{[s.value.value]:h,[s.value.label]:d}},N=X();Ie(()=>{if(e.mode!=="tags"){N.value=y.value;return}const h=y.value.slice(),u=d=>C.value.has(d);[...I.value].sort((d,F)=>d.value<F.value?-1:1).forEach(d=>{const F=d.value;u(F)||h.push(R(F,d.label))}),N.value=h});const A=Xo(N,s,r,f,ge(e,"optionFilterProp")),B=H(()=>e.mode!=="tags"||!r.value||A.value.some(h=>h[e.optionFilterProp||"value"]===r.value)?A.value:[R(r.value),...A.value]),U=H(()=>e.filterSort?[...B.value].sort((h,u)=>e.filterSort(h,u)):B.value),Y=H(()=>eo(U.value,{fieldNames:s.value,childrenAsData:a.value})),W=h=>{const u=w(h);if(D(u),e.onChange&&(u.length!==I.value.length||u.some((d,F)=>{var $;return(($=I.value[F])===null||$===void 0?void 0:$.value)!==d?.value}))){const d=e.labelInValue?u.map($=>S(S({},$),{originLabel:$.label,label:typeof $.label=="function"?$.label():$.label})):u.map($=>$.value),F=u.map($=>Ze(v($.value)));e.onChange(c.value?d:d[0],c.value?F:F[0])}},[G,z]=It(null),[oe,ie]=It(0),p=H(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),L=function(h,u){let{source:d="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ie(u),e.backfill&&e.mode==="combobox"&&h!==null&&d==="keyboard"&&z(String(h))},T=(h,u)=>{const d=()=>{var F;const $=v(h),j=$?.[s.value.label];return[e.labelInValue?{label:typeof j=="function"?j():j,originLabel:j,value:h,key:(F=$?.key)!==null&&F!==void 0?F:h}:h,Ze($)]};if(u&&e.onSelect){const[F,$]=d();e.onSelect(F,$)}else if(!u&&e.onDeselect){const[F,$]=d();e.onDeselect(F,$)}},K=(h,u)=>{let d;const F=c.value?u.selected:!0;F?d=c.value?[...I.value,h]:[h]:d=I.value.filter($=>$.value!==h),W(d),T(h,F),e.mode==="combobox"?z(""):(!c.value||e.autoClearSearchValue)&&(m(""),z(""))},te=(h,u)=>{W(h),(u.type==="remove"||u.type==="clear")&&u.values.forEach(d=>{T(d.value,!1)})},re=(h,u)=>{var d;if(m(h),z(null),u.source==="submit"){const F=(h||"").trim();if(F){const $=Array.from(new Set([...O.value,F]));W($),T(F,!0),m("")}return}u.source!=="blur"&&(e.mode==="combobox"&&W(h),(d=e.onSearch)===null||d===void 0||d.call(e,h))},se=h=>{let u=h;e.mode!=="tags"&&(u=h.map(F=>{const $=g.value.get(F);return $?.value}).filter(F=>F!==void 0));const d=Array.from(new Set([...O.value,...u]));W(d),d.forEach(F=>{T(F,!0)})},ee=H(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);Lo(At(S(S({},b),{flattenOptions:Y,onActiveValue:L,defaultActiveFirstOption:p,onSelect:K,menuItemSelectedIcon:ge(e,"menuItemSelectedIcon"),rawValues:O,fieldNames:s,virtual:ee,listHeight:ge(e,"listHeight"),listItemHeight:ge(e,"listItemHeight"),childrenAsData:a}))),Ie(()=>{Yo(e)},{flush:"post"});const ce=me();o({focus(){var h;(h=ce.value)===null||h===void 0||h.focus()},blur(){var h;(h=ce.value)===null||h===void 0||h.blur()},scrollTo(h){var u;(u=ce.value)===null||u===void 0||u.scrollTo(h)}});const de=H(()=>_e(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>M(wo,k(k(k({},de.value),n),{},{id:i,prefixCls:e.prefixCls,ref:ce,omitDomProps:qo,mode:e.mode,displayValues:P.value,onDisplayValuesChange:te,searchValue:r.value,onSearch:re,onSearchSplit:se,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:Ao,emptyOptions:!Y.value.length,activeValue:G.value,activeDescendantId:`${i}_list_${oe.value}`}),l)}}),st=()=>null;st.isSelectOption=!0;st.displayName="ASelectOption";const ut=()=>null;ut.isSelectOptGroup=!0;ut.displayName="ASelectOptGroup";function ko(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{loading:o,multiple:n,prefixCls:l,hasFeedback:i,feedbackIcon:c,showArrow:a}=e,f=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),s=e.clearIcon||t.clearIcon&&t.clearIcon(),r=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),m=e.removeIcon||t.removeIcon&&t.removeIcon(),b=s??M(Ln,null,null),C=x=>M(Fe,null,[a!==!1&&x,i&&c]);let g=null;if(f!==void 0)g=C(f);else if(o)g=C(M(Bn,{spin:!0},null));else{const x=`${l}-suffix`;g=D=>{let{open:E,showSearch:I}=D;return C(E&&I?M(zn,{class:x},null):M(Wn,{class:x},null))}}let y=null;r!==void 0?y=r:n?y=M(_n,null,null):y=null;let w=null;return m!==void 0?w=m:w=M(An,null,null),{clearIcon:b,suffixIcon:g,itemIcon:y,removeIcon:w}}const Pt=e=>{const{controlPaddingHorizontal:t}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${t}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},el=e=>{const{antCls:t,componentCls:o}=e,n=`${o}-item`;return[{[`${o}-dropdown`]:S(S({},Je(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
4
4
  &${t}-slide-up-enter${t}-slide-up-enter-active${o}-dropdown-placement-bottomLeft,
@@ -1 +1 @@
1
- import{q as V,M as k,h as p,f as O,G as q,P as F,Q as I,i as L}from"./index-6ovmKZFr.js";import{d as Q,b as o,w as W,c as v,F as H,r as j}from"./vendor-BvqAck49.js";import{u as J}from"./useFlexGapSupport-GiRw3HoR.js";import{a as K,C as h}from"./Compact-GDJKV58z.js";import"./icons-DP3uiYxy.js";import"./styleChecker-Cr09j4iw.js";import"./createContext-8Jzpris1.js";import"./_getTag-DnrRH4E6.js";const U={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:F.oneOf(I("horizontal","vertical")).def("horizontal"),align:F.oneOf(I("start","end","center","baseline")),wrap:q()});function Y(e){return typeof e=="string"?U[e]:e||0}const d=Q({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:X(),slots:Object,setup(e,B){let{slots:r,attrs:f}=B;const{prefixCls:l,space:g,direction:x}=V("space",e),[P,D]=K(l),z=J(),n=o(()=>{var t,a,i;return(i=(t=e.size)!==null&&t!==void 0?t:(a=g?.value)===null||a===void 0?void 0:a.size)!==null&&i!==void 0?i:"small"}),y=j(),s=j();W(n,()=>{[y.value,s.value]=(Array.isArray(n.value)?n.value:[n.value,n.value]).map(t=>Y(t))},{immediate:!0});const C=o(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),E=o(()=>L(l.value,D.value,`${l.value}-${e.direction}`,{[`${l.value}-rtl`]:x.value==="rtl",[`${l.value}-align-${C.value}`]:C.value})),M=o(()=>x.value==="rtl"?"marginLeft":"marginRight"),R=o(()=>{const t={};return z.value&&(t.columnGap=`${y.value}px`,t.rowGap=`${s.value}px`),p(p({},t),e.wrap&&{flexWrap:"wrap",marginBottom:`${-s.value}px`})});return()=>{var t,a;const{wrap:i,direction:T="horizontal"}=e,b=(t=r.default)===null||t===void 0?void 0:t.call(r),w=k(b),_=w.length;if(_===0)return null;const c=(a=r.split)===null||a===void 0?void 0:a.call(r),A=`${l.value}-item`,G=y.value,S=_-1;return v("div",O(O({},f),{},{class:[E.value,f.class],style:[R.value,f.style]}),[w.map((N,u)=>{let $=b.indexOf(N);$===-1&&($=`$$space-${u}`);let m={};return z.value||(T==="vertical"?u<S&&(m={marginBottom:`${G/(c?2:1)}px`}):m=p(p({},u<S&&{[M.value]:`${G/(c?2:1)}px`}),i&&{paddingBottom:`${s.value}px`})),P(v(H,{key:$},[v("div",{class:A,style:m},[N]),u<S&&c&&v("span",{class:`${A}-split`,style:m},[c])]))})])}}});d.Compact=h;d.install=function(e){return e.component(d.name,d),e.component(h.name,h),e};export{h as Compact,d as default,X as spaceProps};
1
+ import{q as V,M as k,h as p,f as O,G as q,P as F,Q as I,i as L}from"./index-D9Sygqi9.js";import{d as Q,b as o,w as W,c as v,F as H,r as j}from"./vendor-BvqAck49.js";import{u as J}from"./useFlexGapSupport-BA1uUeeV.js";import{a as K,C as h}from"./Compact-D_XPXg9d.js";import"./icons-DP3uiYxy.js";import"./styleChecker-Yeh5dWMi.js";import"./createContext-CerRGWSU.js";import"./_getTag-DnrRH4E6.js";const U={small:8,middle:16,large:24},X=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:F.oneOf(I("horizontal","vertical")).def("horizontal"),align:F.oneOf(I("start","end","center","baseline")),wrap:q()});function Y(e){return typeof e=="string"?U[e]:e||0}const d=Q({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:X(),slots:Object,setup(e,B){let{slots:r,attrs:f}=B;const{prefixCls:l,space:g,direction:x}=V("space",e),[P,D]=K(l),z=J(),n=o(()=>{var t,a,i;return(i=(t=e.size)!==null&&t!==void 0?t:(a=g?.value)===null||a===void 0?void 0:a.size)!==null&&i!==void 0?i:"small"}),y=j(),s=j();W(n,()=>{[y.value,s.value]=(Array.isArray(n.value)?n.value:[n.value,n.value]).map(t=>Y(t))},{immediate:!0});const C=o(()=>e.align===void 0&&e.direction==="horizontal"?"center":e.align),E=o(()=>L(l.value,D.value,`${l.value}-${e.direction}`,{[`${l.value}-rtl`]:x.value==="rtl",[`${l.value}-align-${C.value}`]:C.value})),M=o(()=>x.value==="rtl"?"marginLeft":"marginRight"),R=o(()=>{const t={};return z.value&&(t.columnGap=`${y.value}px`,t.rowGap=`${s.value}px`),p(p({},t),e.wrap&&{flexWrap:"wrap",marginBottom:`${-s.value}px`})});return()=>{var t,a;const{wrap:i,direction:T="horizontal"}=e,b=(t=r.default)===null||t===void 0?void 0:t.call(r),w=k(b),_=w.length;if(_===0)return null;const c=(a=r.split)===null||a===void 0?void 0:a.call(r),A=`${l.value}-item`,G=y.value,S=_-1;return v("div",O(O({},f),{},{class:[E.value,f.class],style:[R.value,f.style]}),[w.map((N,u)=>{let $=b.indexOf(N);$===-1&&($=`$$space-${u}`);let m={};return z.value||(T==="vertical"?u<S&&(m={marginBottom:`${G/(c?2:1)}px`}):m=p(p({},u<S&&{[M.value]:`${G/(c?2:1)}px`}),i&&{paddingBottom:`${s.value}px`})),P(v(H,{key:$},[v("div",{class:A,style:m},[N]),u<S&&c&&v("span",{class:`${A}-split`,style:m},[c])]))})])}}});d.Compact=h;d.install=function(e){return e.component(d.name,d),e.component(h.name,h),e};export{h as Compact,d as default,X as spaceProps};
@@ -1,4 +1,4 @@
1
- import{l as S,m as l,h as e,r as u,o as x}from"./index-6ovmKZFr.js";import{g as m}from"./compact-item-CWCSOuGZ.js";const H=r=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:r,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),p=r=>({borderColor:r.inputBorderHoverColor,borderInlineEndWidth:r.lineWidth}),c=r=>({borderColor:r.inputBorderHoverColor,boxShadow:`0 0 0 ${r.controlOutlineWidth}px ${r.controlOutline}`,borderInlineEndWidth:r.lineWidth,outline:0}),R=r=>({color:r.colorTextDisabled,backgroundColor:r.colorBgContainerDisabled,borderColor:r.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":e({},p(l(r,{inputBorderHoverColor:r.colorBorder})))}),h=r=>{const{inputPaddingVerticalLG:i,fontSizeLG:o,lineHeightLG:t,borderRadiusLG:d,inputPaddingHorizontalLG:n}=r;return{padding:`${i}px ${n}px`,fontSize:o,lineHeight:t,borderRadius:d}},g=r=>({padding:`${r.inputPaddingVerticalSM}px ${r.controlPaddingHorizontalSM-1}px`,borderRadius:r.borderRadiusSM}),$=(r,i)=>{const{componentCls:o,colorError:t,colorWarning:d,colorErrorOutline:n,colorWarningOutline:a,colorErrorBorderHover:s,colorWarningBorderHover:f}=r;return{[`&-status-error:not(${i}-disabled):not(${i}-borderless)${i}`]:{borderColor:t,"&:hover":{borderColor:s},"&:focus, &-focused":e({},c(l(r,{inputBorderActiveColor:t,inputBorderHoverColor:t,controlOutline:n}))),[`${o}-prefix`]:{color:t}},[`&-status-warning:not(${i}-disabled):not(${i}-borderless)${i}`]:{borderColor:d,"&:hover":{borderColor:f},"&:focus, &-focused":e({},c(l(r,{inputBorderActiveColor:d,inputBorderHoverColor:d,controlOutline:a}))),[`${o}-prefix`]:{color:d}}}},b=r=>e(e({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${r.inputPaddingVertical}px ${r.inputPaddingHorizontal}px`,color:r.colorText,fontSize:r.fontSize,lineHeight:r.lineHeight,backgroundColor:r.colorBgContainer,backgroundImage:"none",borderWidth:r.lineWidth,borderStyle:r.lineType,borderColor:r.colorBorder,borderRadius:r.borderRadius,transition:`all ${r.motionDurationMid}`},H(r.colorTextPlaceholder)),{"&:hover":e({},p(r)),"&:focus, &-focused":e({},c(r)),"&-disabled, &[disabled]":e({},R(r)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:r.controlHeight,lineHeight:r.lineHeight,verticalAlign:"bottom",transition:`all ${r.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":e({},h(r)),"&-sm":e({},g(r)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),I=r=>{const{componentCls:i,antCls:o}=r;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:r.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${i}, &-lg > ${i}-group-addon`]:e({},h(r)),[`&-sm ${i}, &-sm > ${i}-group-addon`]:e({},g(r)),[`> ${i}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${i}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${r.inputPaddingHorizontal}px`,color:r.colorText,fontWeight:"normal",fontSize:r.fontSize,textAlign:"center",backgroundColor:r.colorFillAlter,border:`${r.lineWidth}px ${r.lineType} ${r.colorBorder}`,borderRadius:r.borderRadius,transition:`all ${r.motionDurationSlow}`,lineHeight:1,[`${o}-select`]:{margin:`-${r.inputPaddingVertical+1}px -${r.inputPaddingHorizontal}px`,[`&${o}-select-single:not(${o}-select-customize-input)`]:{[`${o}-select-selector`]:{backgroundColor:"inherit",border:`${r.lineWidth}px ${r.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${o}-select-selector`]:{color:r.colorPrimary}}},[`${o}-cascader-picker`]:{margin:`-9px -${r.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${o}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${i}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${i}-search-with-button &`]:{zIndex:0}}},[`> ${i}:first-child, ${i}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${o}-select ${o}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${i}-affix-wrapper`]:{[`&:not(:first-child) ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${i}:last-child, ${i}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${o}-select ${o}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${i}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${i}-search &`]:{borderStartStartRadius:r.borderRadius,borderEndStartRadius:r.borderRadius}},[`&:not(:first-child), ${i}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${i}-group-compact`]:e(e({display:"block"},x()),{[`${i}-group-addon, ${i}-group-wrap, > ${i}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:r.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${i}-affix-wrapper`]:{display:"inline-flex"},[`& > ${o}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-r.lineWidth,borderInlineEndWidth:r.lineWidth},[`${i}`]:{float:"none"},[`& > ${o}-select > ${o}-select-selector,
1
+ import{l as S,m as l,h as e,r as u,o as x}from"./index-D9Sygqi9.js";import{g as m}from"./compact-item-BoP3ciR6.js";const H=r=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:r,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),p=r=>({borderColor:r.inputBorderHoverColor,borderInlineEndWidth:r.lineWidth}),c=r=>({borderColor:r.inputBorderHoverColor,boxShadow:`0 0 0 ${r.controlOutlineWidth}px ${r.controlOutline}`,borderInlineEndWidth:r.lineWidth,outline:0}),R=r=>({color:r.colorTextDisabled,backgroundColor:r.colorBgContainerDisabled,borderColor:r.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":e({},p(l(r,{inputBorderHoverColor:r.colorBorder})))}),h=r=>{const{inputPaddingVerticalLG:i,fontSizeLG:o,lineHeightLG:t,borderRadiusLG:d,inputPaddingHorizontalLG:n}=r;return{padding:`${i}px ${n}px`,fontSize:o,lineHeight:t,borderRadius:d}},g=r=>({padding:`${r.inputPaddingVerticalSM}px ${r.controlPaddingHorizontalSM-1}px`,borderRadius:r.borderRadiusSM}),$=(r,i)=>{const{componentCls:o,colorError:t,colorWarning:d,colorErrorOutline:n,colorWarningOutline:a,colorErrorBorderHover:s,colorWarningBorderHover:f}=r;return{[`&-status-error:not(${i}-disabled):not(${i}-borderless)${i}`]:{borderColor:t,"&:hover":{borderColor:s},"&:focus, &-focused":e({},c(l(r,{inputBorderActiveColor:t,inputBorderHoverColor:t,controlOutline:n}))),[`${o}-prefix`]:{color:t}},[`&-status-warning:not(${i}-disabled):not(${i}-borderless)${i}`]:{borderColor:d,"&:hover":{borderColor:f},"&:focus, &-focused":e({},c(l(r,{inputBorderActiveColor:d,inputBorderHoverColor:d,controlOutline:a}))),[`${o}-prefix`]:{color:d}}}},b=r=>e(e({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${r.inputPaddingVertical}px ${r.inputPaddingHorizontal}px`,color:r.colorText,fontSize:r.fontSize,lineHeight:r.lineHeight,backgroundColor:r.colorBgContainer,backgroundImage:"none",borderWidth:r.lineWidth,borderStyle:r.lineType,borderColor:r.colorBorder,borderRadius:r.borderRadius,transition:`all ${r.motionDurationMid}`},H(r.colorTextPlaceholder)),{"&:hover":e({},p(r)),"&:focus, &-focused":e({},c(r)),"&-disabled, &[disabled]":e({},R(r)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:r.controlHeight,lineHeight:r.lineHeight,verticalAlign:"bottom",transition:`all ${r.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":e({},h(r)),"&-sm":e({},g(r)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),I=r=>{const{componentCls:i,antCls:o}=r;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:r.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${i}, &-lg > ${i}-group-addon`]:e({},h(r)),[`&-sm ${i}, &-sm > ${i}-group-addon`]:e({},g(r)),[`> ${i}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${i}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${r.inputPaddingHorizontal}px`,color:r.colorText,fontWeight:"normal",fontSize:r.fontSize,textAlign:"center",backgroundColor:r.colorFillAlter,border:`${r.lineWidth}px ${r.lineType} ${r.colorBorder}`,borderRadius:r.borderRadius,transition:`all ${r.motionDurationSlow}`,lineHeight:1,[`${o}-select`]:{margin:`-${r.inputPaddingVertical+1}px -${r.inputPaddingHorizontal}px`,[`&${o}-select-single:not(${o}-select-customize-input)`]:{[`${o}-select-selector`]:{backgroundColor:"inherit",border:`${r.lineWidth}px ${r.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${o}-select-selector`]:{color:r.colorPrimary}}},[`${o}-cascader-picker`]:{margin:`-9px -${r.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${o}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${i}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${i}-search-with-button &`]:{zIndex:0}}},[`> ${i}:first-child, ${i}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${o}-select ${o}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${i}-affix-wrapper`]:{[`&:not(:first-child) ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${i}:last-child, ${i}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${o}-select ${o}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${i}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${i}-search &`]:{borderStartStartRadius:r.borderRadius,borderEndStartRadius:r.borderRadius}},[`&:not(:first-child), ${i}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${i}-group-compact`]:e(e({display:"block"},x()),{[`${i}-group-addon, ${i}-group-wrap, > ${i}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:r.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${i}-affix-wrapper`]:{display:"inline-flex"},[`& > ${o}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-r.lineWidth,borderInlineEndWidth:r.lineWidth},[`${i}`]:{float:"none"},[`& > ${o}-select > ${o}-select-selector,
2
2
  & > ${o}-select-auto-complete ${i},
3
3
  & > ${o}-cascader-picker ${i},
4
4
  & > ${i}-group-wrapper ${i}`]:{borderInlineEndWidth:r.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${o}-select-focused`]:{zIndex:1},[`& > ${o}-select > ${o}-select-arrow`]:{zIndex:1},[`& > *:first-child,
@@ -1 +1 @@
1
- import{l as re,m as ne,h as v,q as O,i as D,f as M,P as p,Q as F}from"./index-6ovmKZFr.js";import{d as L,c as g,p as Z,b as ae,r as ie,i as le,s as A,w as j,o as se,f as de}from"./vendor-BvqAck49.js";import{a as G,S as ue}from"./injectionKey-BXVc-oGP.js";import{i as ce}from"./initDefaultProps-C8-M6qD9.js";import{i as ge}from"./isNumeric-DjvBa-1E.js";import{be as fe,bb as _,ag as X}from"./icons-DP3uiYxy.js";const pe=e=>{const{componentCls:n,colorBgContainer:o,colorBgBody:s,colorText:a}=e;return{[`${n}-sider-light`]:{background:o,[`${n}-sider-trigger`]:{color:a,background:o},[`${n}-sider-zero-width-trigger`]:{color:a,background:o,border:`1px solid ${s}`,borderInlineStart:0}}}},me=e=>{const{antCls:n,componentCls:o,colorText:s,colorTextLightSolid:a,colorBgHeader:f,colorBgBody:d,colorBgTrigger:i,layoutHeaderHeight:u,layoutHeaderPaddingInline:h,layoutHeaderColor:x,layoutFooterPadding:t,layoutTriggerHeight:l,layoutZeroTriggerSize:y,motionDurationMid:S,motionDurationSlow:r,fontSize:m,borderRadius:c}=e;return{[o]:v(v({display:"flex",flex:"auto",flexDirection:"column",color:s,minHeight:0,background:d,"&, *":{boxSizing:"border-box"},[`&${o}-has-sider`]:{flexDirection:"row",[`> ${o}, > ${o}-content`]:{width:0}},[`${o}-header, &${o}-footer`]:{flex:"0 0 auto"},[`${o}-header`]:{height:u,paddingInline:h,color:x,lineHeight:`${u}px`,background:f,[`${n}-menu`]:{lineHeight:"inherit"}},[`${o}-footer`]:{padding:t,color:s,fontSize:m,background:d},[`${o}-content`]:{flex:"auto",minHeight:0},[`${o}-sider`]:{position:"relative",minWidth:0,background:f,transition:`all ${S}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${n}-menu${n}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:l},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:l,color:a,lineHeight:`${l}px`,textAlign:"center",background:i,cursor:"pointer",transition:`all ${S}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:u,insetInlineEnd:-y,zIndex:1,width:y,height:y,color:a,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:f,borderStartStartRadius:0,borderStartEndRadius:c,borderEndEndRadius:c,borderEndStartRadius:0,cursor:"pointer",transition:`background ${r} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${r}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-y,borderStartStartRadius:c,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:c}}}}},pe(e)),{"&-rtl":{direction:"rtl"}})}},he=re("Layout",e=>{const{colorText:n,controlHeightSM:o,controlHeight:s,controlHeightLG:a,marginXXS:f}=e,d=a*1.25,i=ne(e,{layoutHeaderHeight:s*2,layoutHeaderPaddingInline:d,layoutHeaderColor:n,layoutFooterPadding:`${o}px ${d}px`,layoutTriggerHeight:a+f*2,layoutZeroTriggerSize:a});return[me(i)]},e=>{const{colorBgLayout:n}=e;return{colorBgHeader:"#001529",colorBgBody:n,colorBgTrigger:"#002140"}}),P=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function B(e){let{suffixCls:n,tagName:o,name:s}=e;return a=>L({compatConfig:{MODE:3},name:s,props:P(),setup(d,i){let{slots:u}=i;const{prefixCls:h}=O(n,d);return()=>{const x=v(v({},d),{prefixCls:h.value,tagName:o});return g(a,x,u)}}})}const R=L({compatConfig:{MODE:3},props:P(),setup(e,n){let{slots:o}=n;return()=>g(e.tagName,{class:e.prefixCls},o)}}),xe=L({compatConfig:{MODE:3},inheritAttrs:!1,props:P(),setup(e,n){let{slots:o,attrs:s}=n;const{prefixCls:a,direction:f}=O("",e),[d,i]=he(a),u=ie([]);Z(G,{addSider:t=>{u.value=[...u.value,t]},removeSider:t=>{u.value=u.value.filter(l=>l!==t)}});const x=ae(()=>{const{prefixCls:t,hasSider:l}=e;return{[i.value]:!0,[`${t}`]:!0,[`${t}-has-sider`]:typeof l=="boolean"?l:u.value.length>0,[`${t}-rtl`]:f.value==="rtl"}});return()=>{const{tagName:t}=e;return d(g(t,v(v({},s),{class:[x.value,s.class]}),o))}}}),I=B({suffixCls:"layout",tagName:"section",name:"ALayout"})(xe),C=B({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(R),w=B({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(R),H=B({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(R),K={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},ye=()=>({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:p.any,width:p.oneOfType([p.number,p.string]),collapsedWidth:p.oneOfType([p.number,p.string]),breakpoint:p.oneOf(F("xs","sm","md","lg","xl","xxl","xxxl")),theme:p.oneOf(F("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),ve=(()=>{let e=0;return function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${n}${e}`}})(),k=L({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ce(ye(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,n){let{emit:o,attrs:s,slots:a}=n;const{prefixCls:f}=O("layout-sider",e),d=le(G,void 0),i=A(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),u=A(!1);j(()=>e.collapsed,()=>{i.value=!!e.collapsed}),Z(ue,i);const h=(r,m)=>{e.collapsed===void 0&&(i.value=r),o("update:collapsed",r),o("collapse",r,m)},x=A(r=>{u.value=r.matches,o("breakpoint",r.matches),i.value!==r.matches&&h(r.matches,"responsive")});let t;function l(r){return x.value(r)}const y=ve("ant-sider-");d&&d.addSider(y),se(()=>{j(()=>e.breakpoint,()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}if(typeof window<"u"){const{matchMedia:r}=window;if(r&&e.breakpoint&&e.breakpoint in K){t=r(`(max-width: ${K[e.breakpoint]})`);try{t.addEventListener("change",l)}catch{t.addListener(l)}l(t)}}},{immediate:!0})}),de(()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}d&&d.removeSider(y)});const S=()=>{h(!i.value,"clickTrigger")};return()=>{var r,m;const c=f.value,{collapsedWidth:N,width:Q,reverseArrow:T,zeroWidthTriggerStyle:U,trigger:$=(r=a.trigger)===null||r===void 0?void 0:r.call(a),collapsible:W,theme:V}=e,z=i.value?N:Q,b=ge(z)?`${z}px`:String(z),E=parseFloat(String(N||0))===0?g("span",{onClick:S,class:D(`${c}-zero-width-trigger`,`${c}-zero-width-trigger-${T?"right":"left"}`),style:U},[$||g(fe,null,null)]):null,q={expanded:T?g(X,null,null):g(_,null,null),collapsed:T?g(_,null,null):g(X,null,null)},J=i.value?"collapsed":"expanded",Y=q[J],ee=$!==null?E||g("div",{class:`${c}-trigger`,onClick:S,style:{width:b}},[$||Y]):null,te=[s.style,{flex:`0 0 ${b}`,maxWidth:b,minWidth:b,width:b}],oe=D(c,`${c}-${V}`,{[`${c}-collapsed`]:!!i.value,[`${c}-has-trigger`]:W&&$!==null&&!E,[`${c}-below`]:!!u.value,[`${c}-zero-width`]:parseFloat(b)===0},s.class);return g("aside",M(M({},s),{},{class:oe,style:te}),[g("div",{class:`${c}-children`},[(m=a.default)===null||m===void 0?void 0:m.call(a)]),W||u.value&&E?ee:null])}}}),ke=C,Le=w,Be=k,Te=H,ze=v(I,{Header:C,Footer:w,Content:H,Sider:k,install:e=>(e.component(I.name,I),e.component(C.name,C),e.component(w.name,w),e.component(k.name,k),e.component(H.name,H),e)});export{Te as LayoutContent,Le as LayoutFooter,ke as LayoutHeader,Be as LayoutSider,ze as default};
1
+ import{l as re,m as ne,h as v,q as O,i as D,f as M,P as p,Q as F}from"./index-D9Sygqi9.js";import{d as L,c as g,p as Z,b as ae,r as ie,i as le,s as A,w as j,o as se,f as de}from"./vendor-BvqAck49.js";import{a as G,S as ue}from"./injectionKey-BXVc-oGP.js";import{i as ce}from"./initDefaultProps-C_C9YePV.js";import{i as ge}from"./isNumeric-DjvBa-1E.js";import{be as fe,bb as _,ag as X}from"./icons-DP3uiYxy.js";const pe=e=>{const{componentCls:n,colorBgContainer:o,colorBgBody:s,colorText:a}=e;return{[`${n}-sider-light`]:{background:o,[`${n}-sider-trigger`]:{color:a,background:o},[`${n}-sider-zero-width-trigger`]:{color:a,background:o,border:`1px solid ${s}`,borderInlineStart:0}}}},me=e=>{const{antCls:n,componentCls:o,colorText:s,colorTextLightSolid:a,colorBgHeader:f,colorBgBody:d,colorBgTrigger:i,layoutHeaderHeight:u,layoutHeaderPaddingInline:h,layoutHeaderColor:x,layoutFooterPadding:t,layoutTriggerHeight:l,layoutZeroTriggerSize:y,motionDurationMid:S,motionDurationSlow:r,fontSize:m,borderRadius:c}=e;return{[o]:v(v({display:"flex",flex:"auto",flexDirection:"column",color:s,minHeight:0,background:d,"&, *":{boxSizing:"border-box"},[`&${o}-has-sider`]:{flexDirection:"row",[`> ${o}, > ${o}-content`]:{width:0}},[`${o}-header, &${o}-footer`]:{flex:"0 0 auto"},[`${o}-header`]:{height:u,paddingInline:h,color:x,lineHeight:`${u}px`,background:f,[`${n}-menu`]:{lineHeight:"inherit"}},[`${o}-footer`]:{padding:t,color:s,fontSize:m,background:d},[`${o}-content`]:{flex:"auto",minHeight:0},[`${o}-sider`]:{position:"relative",minWidth:0,background:f,transition:`all ${S}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${n}-menu${n}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:l},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:l,color:a,lineHeight:`${l}px`,textAlign:"center",background:i,cursor:"pointer",transition:`all ${S}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:u,insetInlineEnd:-y,zIndex:1,width:y,height:y,color:a,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:f,borderStartStartRadius:0,borderStartEndRadius:c,borderEndEndRadius:c,borderEndStartRadius:0,cursor:"pointer",transition:`background ${r} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${r}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-y,borderStartStartRadius:c,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:c}}}}},pe(e)),{"&-rtl":{direction:"rtl"}})}},he=re("Layout",e=>{const{colorText:n,controlHeightSM:o,controlHeight:s,controlHeightLG:a,marginXXS:f}=e,d=a*1.25,i=ne(e,{layoutHeaderHeight:s*2,layoutHeaderPaddingInline:d,layoutHeaderColor:n,layoutFooterPadding:`${o}px ${d}px`,layoutTriggerHeight:a+f*2,layoutZeroTriggerSize:a});return[me(i)]},e=>{const{colorBgLayout:n}=e;return{colorBgHeader:"#001529",colorBgBody:n,colorBgTrigger:"#002140"}}),P=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function B(e){let{suffixCls:n,tagName:o,name:s}=e;return a=>L({compatConfig:{MODE:3},name:s,props:P(),setup(d,i){let{slots:u}=i;const{prefixCls:h}=O(n,d);return()=>{const x=v(v({},d),{prefixCls:h.value,tagName:o});return g(a,x,u)}}})}const R=L({compatConfig:{MODE:3},props:P(),setup(e,n){let{slots:o}=n;return()=>g(e.tagName,{class:e.prefixCls},o)}}),xe=L({compatConfig:{MODE:3},inheritAttrs:!1,props:P(),setup(e,n){let{slots:o,attrs:s}=n;const{prefixCls:a,direction:f}=O("",e),[d,i]=he(a),u=ie([]);Z(G,{addSider:t=>{u.value=[...u.value,t]},removeSider:t=>{u.value=u.value.filter(l=>l!==t)}});const x=ae(()=>{const{prefixCls:t,hasSider:l}=e;return{[i.value]:!0,[`${t}`]:!0,[`${t}-has-sider`]:typeof l=="boolean"?l:u.value.length>0,[`${t}-rtl`]:f.value==="rtl"}});return()=>{const{tagName:t}=e;return d(g(t,v(v({},s),{class:[x.value,s.class]}),o))}}}),I=B({suffixCls:"layout",tagName:"section",name:"ALayout"})(xe),C=B({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(R),w=B({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(R),H=B({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(R),K={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},ye=()=>({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:p.any,width:p.oneOfType([p.number,p.string]),collapsedWidth:p.oneOfType([p.number,p.string]),breakpoint:p.oneOf(F("xs","sm","md","lg","xl","xxl","xxxl")),theme:p.oneOf(F("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),ve=(()=>{let e=0;return function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${n}${e}`}})(),k=L({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ce(ye(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,n){let{emit:o,attrs:s,slots:a}=n;const{prefixCls:f}=O("layout-sider",e),d=le(G,void 0),i=A(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),u=A(!1);j(()=>e.collapsed,()=>{i.value=!!e.collapsed}),Z(ue,i);const h=(r,m)=>{e.collapsed===void 0&&(i.value=r),o("update:collapsed",r),o("collapse",r,m)},x=A(r=>{u.value=r.matches,o("breakpoint",r.matches),i.value!==r.matches&&h(r.matches,"responsive")});let t;function l(r){return x.value(r)}const y=ve("ant-sider-");d&&d.addSider(y),se(()=>{j(()=>e.breakpoint,()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}if(typeof window<"u"){const{matchMedia:r}=window;if(r&&e.breakpoint&&e.breakpoint in K){t=r(`(max-width: ${K[e.breakpoint]})`);try{t.addEventListener("change",l)}catch{t.addListener(l)}l(t)}}},{immediate:!0})}),de(()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}d&&d.removeSider(y)});const S=()=>{h(!i.value,"clickTrigger")};return()=>{var r,m;const c=f.value,{collapsedWidth:N,width:Q,reverseArrow:T,zeroWidthTriggerStyle:U,trigger:$=(r=a.trigger)===null||r===void 0?void 0:r.call(a),collapsible:W,theme:V}=e,z=i.value?N:Q,b=ge(z)?`${z}px`:String(z),E=parseFloat(String(N||0))===0?g("span",{onClick:S,class:D(`${c}-zero-width-trigger`,`${c}-zero-width-trigger-${T?"right":"left"}`),style:U},[$||g(fe,null,null)]):null,q={expanded:T?g(X,null,null):g(_,null,null),collapsed:T?g(_,null,null):g(X,null,null)},J=i.value?"collapsed":"expanded",Y=q[J],ee=$!==null?E||g("div",{class:`${c}-trigger`,onClick:S,style:{width:b}},[$||Y]):null,te=[s.style,{flex:`0 0 ${b}`,maxWidth:b,minWidth:b,width:b}],oe=D(c,`${c}-${V}`,{[`${c}-collapsed`]:!!i.value,[`${c}-has-trigger`]:W&&$!==null&&!E,[`${c}-below`]:!!u.value,[`${c}-zero-width`]:parseFloat(b)===0},s.class);return g("aside",M(M({},s),{},{class:oe,style:te}),[g("div",{class:`${c}-children`},[(m=a.default)===null||m===void 0?void 0:m.call(a)]),W||u.value&&E?ee:null])}}}),ke=C,Le=w,Be=k,Te=H,ze=v(I,{Header:C,Footer:w,Content:H,Sider:k,install:e=>(e.component(I.name,I),e.component(C.name,C),e.component(w.name,w),e.component(k.name,k),e.component(H.name,H),e)});export{Te as LayoutContent,Le as LayoutFooter,ke as LayoutHeader,Be as LayoutSider,ze as default};
@@ -1 +1 @@
1
- import{l as q,m as J,h as N,r as Q,a8 as P,t as tt,f as I,U as et,w as nt,p as ot,q as st,I as it}from"./index-6ovmKZFr.js";import{d as L,b as F,e as D,w as rt,c as C,F as O,s as y,r as lt}from"./vendor-BvqAck49.js";import at from"./index-B8CfZwpW.js";import{B as ut}from"./index-B1s-bdg9.js";import{R as ct}from"./icons-DP3uiYxy.js";import"./initDefaultProps-C8-M6qD9.js";import"./index-DQai_JzS.js";import"./isVisible-C7tPsqfj.js";import"./useState-BK4hy8Ma.js";import"./raf-Deuc0E8-.js";import"./devWarning-BHqHPKav.js";import"./compact-item-CWCSOuGZ.js";import"./createContext-8Jzpris1.js";import"./Compact-GDJKV58z.js";import"./_getTag-DnrRH4E6.js";const ht=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},dt=q("QRCode",r=>ht(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var R;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,w=l.getTotalBits(t,a);if(w<=m){g=w;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const d=[];for(const m of t){u(m.mode.modeBits,4,d),u(m.numChars,m.mode.numCharCountBits(a),d);for(const w of m.getData())d.push(w)}h(d.length==g);const p=s.getNumDataCodewords(a,n)*8;h(d.length<=p),u(0,Math.min(4,p-d.length),d),u(0,(8-d.length%8)%8,d),h(d.length%8==0);for(let m=236;d.length<p;m^=253)u(m,8,d);const M=[];for(;M.length*8<d.length;)M.push(0);return d.forEach((m,w)=>M[w>>>3]|=m<<7-(w&7)),new s(a,n,M,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const d=this.getPenaltyScore();d<a&&(o=g,a=d),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,f(o,i));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,f(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,f(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,f(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=f(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),d=[],p=s.reedSolomonComputeDivisor(i);for(let m=0,w=0;m<o;m++){const v=t.slice(w,w+g-i+(m<a?0:1));w+=v.length;const A=s.reedSolomonComputeRemainder(v,p);m<a&&v.push(0),d.push(v.concat(A))}const M=[];for(let m=0;m<d[0].length;m++)d.forEach((w,v)=>{(m!=g-i||v>=a)&&M.push(w[m])});return h(M.length==c),M}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=f(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][d],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[d][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function f(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(R||(R={}));const U={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,gt=4,mt=0,Et=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(f,h){let l=null;f.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===f.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,f)=>f<s.y||f>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,f){if(f==null)return null;const h=r.length+u*2,l=Math.floor(s*Et),E=h/s,t=(f.width||l)*E,n=(f.height||l)*E,e=f.x==null?r.length/2-t/2:f.x*E,o=f.y==null?r.length/2-n/2:f.y*E;let i=null;if(f.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),d=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:d}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?gt:mt}const wt=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:f}=s;const h=F(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return f({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),D(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:d}=r;if(l.value!=null){const p=l.value,M=p.getContext("2d");if(!M)return;let m=R.QrCode.encodeText(n,U[o]).getModules();const w=_(a,g),v=m.length+w*2,A=X(m,e,w,d),b=E.value,x=t.value&&A!=null&&b!==null&&b.complete&&b.naturalHeight!==0&&b.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;p.height=p.width=e*B;const T=e/v*B;M.scale(T,T),M.fillStyle=i,M.fillRect(0,0,v,v),M.fillStyle=c,wt?M.fill(new Path2D(Y(m,w))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&M.fillRect(Z+w,j+w,1,1)})}),x&&M.drawImage(b,A.x+w,A.y+w,A.w,A.h)}},{flush:"post"}),rt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(O,null,[C("canvas",I(I({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),Ct=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,f=null,h=null,l=null,E=null;return D(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=R.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),f=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${f} ${f}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${f}v${f}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Rt=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:f,expose:h}=s;nt(!(r.icon&&r.errorLevel==="L"),"QRCode","ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.");const[l]=ot("QRCode"),{prefixCls:E}=st("qrcode",r),[t,n]=dt(E),[,e]=it(),o=lt();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=F(()=>{const{value:c,icon:a="",size:g=160,iconSize:d=40,color:p=e.value.colorText,bgColor:M="transparent",errorLevel:m="M"}=r,w={src:a,x:void 0,y:void 0,height:d,width:d,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:M,fgColor:p,imageSettings:a?w:void 0}});return()=>{const c=E.value;return t(C("div",I(I({},f),{},{style:[f.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(at,null,null),r.status==="expired"&&C(O,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(ut,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ct,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,I({ref:o},i.value),null):C(Ct,i.value,null)]))}}}),Dt=et(Rt);export{Dt as default};
1
+ import{l as q,m as J,h as N,r as Q,a8 as P,t as tt,f as I,U as et,w as nt,p as ot,q as st,I as it}from"./index-D9Sygqi9.js";import{d as L,b as F,e as D,w as rt,c as C,F as O,s as y,r as lt}from"./vendor-BvqAck49.js";import at from"./index-4IhKBZK7.js";import{B as ut}from"./index-CSNbpxSb.js";import{R as ct}from"./icons-DP3uiYxy.js";import"./initDefaultProps-C_C9YePV.js";import"./index-BbSrbGp1.js";import"./isVisible-C7tPsqfj.js";import"./useState-BK4hy8Ma.js";import"./raf-Deuc0E8-.js";import"./devWarning-Cjez93XF.js";import"./compact-item-BoP3ciR6.js";import"./createContext-CerRGWSU.js";import"./Compact-D_XPXg9d.js";import"./_getTag-DnrRH4E6.js";const ht=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},dt=q("QRCode",r=>ht(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var R;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,w=l.getTotalBits(t,a);if(w<=m){g=w;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const d=[];for(const m of t){u(m.mode.modeBits,4,d),u(m.numChars,m.mode.numCharCountBits(a),d);for(const w of m.getData())d.push(w)}h(d.length==g);const p=s.getNumDataCodewords(a,n)*8;h(d.length<=p),u(0,Math.min(4,p-d.length),d),u(0,(8-d.length%8)%8,d),h(d.length%8==0);for(let m=236;d.length<p;m^=253)u(m,8,d);const M=[];for(;M.length*8<d.length;)M.push(0);return d.forEach((m,w)=>M[w>>>3]|=m<<7-(w&7)),new s(a,n,M,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const d=this.getPenaltyScore();d<a&&(o=g,a=d),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,f(o,i));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,f(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,f(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,f(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=f(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),d=[],p=s.reedSolomonComputeDivisor(i);for(let m=0,w=0;m<o;m++){const v=t.slice(w,w+g-i+(m<a?0:1));w+=v.length;const A=s.reedSolomonComputeRemainder(v,p);m<a&&v.push(0),d.push(v.concat(A))}const M=[];for(let m=0;m<d[0].length;m++)d.forEach((w,v)=>{(m!=g-i||v>=a)&&M.push(w[m])});return h(M.length==c),M}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=f(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][d],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[d][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function f(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(R||(R={}));const U={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,gt=4,mt=0,Et=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(f,h){let l=null;f.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===f.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,f)=>f<s.y||f>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,f){if(f==null)return null;const h=r.length+u*2,l=Math.floor(s*Et),E=h/s,t=(f.width||l)*E,n=(f.height||l)*E,e=f.x==null?r.length/2-t/2:f.x*E,o=f.y==null?r.length/2-n/2:f.y*E;let i=null;if(f.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),d=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:d}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?gt:mt}const wt=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:f}=s;const h=F(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return f({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),D(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:d}=r;if(l.value!=null){const p=l.value,M=p.getContext("2d");if(!M)return;let m=R.QrCode.encodeText(n,U[o]).getModules();const w=_(a,g),v=m.length+w*2,A=X(m,e,w,d),b=E.value,x=t.value&&A!=null&&b!==null&&b.complete&&b.naturalHeight!==0&&b.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;p.height=p.width=e*B;const T=e/v*B;M.scale(T,T),M.fillStyle=i,M.fillRect(0,0,v,v),M.fillStyle=c,wt?M.fill(new Path2D(Y(m,w))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&M.fillRect(Z+w,j+w,1,1)})}),x&&M.drawImage(b,A.x+w,A.y+w,A.w,A.h)}},{flush:"post"}),rt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(O,null,[C("canvas",I(I({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),Ct=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,f=null,h=null,l=null,E=null;return D(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=R.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),f=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${f} ${f}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${f}v${f}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Rt=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:f,expose:h}=s;nt(!(r.icon&&r.errorLevel==="L"),"QRCode","ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.");const[l]=ot("QRCode"),{prefixCls:E}=st("qrcode",r),[t,n]=dt(E),[,e]=it(),o=lt();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=F(()=>{const{value:c,icon:a="",size:g=160,iconSize:d=40,color:p=e.value.colorText,bgColor:M="transparent",errorLevel:m="M"}=r,w={src:a,x:void 0,y:void 0,height:d,width:d,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:M,fgColor:p,imageSettings:a?w:void 0}});return()=>{const c=E.value;return t(C("div",I(I({},f),{},{style:[f.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(at,null,null),r.status==="expired"&&C(O,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(ut,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ct,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,I({ref:o},i.value),null):C(Ct,i.value,null)]))}}}),Dt=et(Rt);export{Dt as default};
@@ -1 +1 @@
1
- import{h as i,i as F,P as T,q as L,M as lt,l as it,m as st,r as Y,K as O,f as z,V as ut,J as ct,g as dt}from"./index-6ovmKZFr.js";import{d as W,b as f,a as mt,w as G,x as gt,c as v,r as R,a6 as bt,a3 as ft,a4 as vt}from"./vendor-BvqAck49.js";import{c as Q}from"./vnode-Q2JxGiJd.js";import{g as q,i as k}from"./colors-BnP8JvZJ.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-DP3uiYxy.js";function J(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=mt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=R();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),gt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[J(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return J(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:T.any,component:String,title:T.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?Q(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var zt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const Tt=()=>({prefix:String,color:{type:String},text:T.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:Tt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=zt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",z({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:T.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:T.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=R(t.count),g=R(r.value),S=R(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:Z,color:X}=t,U=e.style,j=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=Z??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!j?null:v("span",{class:`${x}-status-text`},[j]),at=typeof C=="object"||C===void 0&&a.count?Q(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",z(z({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[j])]))}const rt=dt(w?`${x}-zoom`:"",{appear:!1});let H=i(i({},D),t.numberStyle);return X&&!b.value&&(H=H||{},H.background=X),d(v("span",z(z({},e),{},{class:K}),[w,v(bt,rt,{default:()=>[ft(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:H,key:"scrollNumber"},{default:()=>[at]}),[[vt,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
1
+ import{h as i,i as F,P as T,q as L,M as lt,l as it,m as st,r as Y,K as O,f as z,V as ut,J as ct,g as dt}from"./index-D9Sygqi9.js";import{d as W,b as f,a as mt,w as G,x as gt,c as v,r as R,a6 as bt,a3 as ft,a4 as vt}from"./vendor-BvqAck49.js";import{c as Q}from"./vnode-Cxw9uvFj.js";import{g as q,i as k}from"./colors-iw0H0UBl.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-DP3uiYxy.js";function J(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=mt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=R();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),gt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[J(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return J(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:T.any,component:String,title:T.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?Q(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var zt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const Tt=()=>({prefix:String,color:{type:String},text:T.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:Tt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=zt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",z({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:T.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:T.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=R(t.count),g=R(r.value),S=R(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:Z,color:X}=t,U=e.style,j=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=Z??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!j?null:v("span",{class:`${x}-status-text`},[j]),at=typeof C=="object"||C===void 0&&a.count?Q(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",z(z({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[j])]))}const rt=dt(w?`${x}-zoom`:"",{appear:!1});let H=i(i({},D),t.numberStyle);return X&&!b.value&&(H=H||{},H.background=X),d(v("span",z(z({},e),{},{class:K}),[w,v(bt,rt,{default:()=>[ft(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:H,key:"scrollNumber"},{default:()=>[at]}),[[vt,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
@@ -1 +1 @@
1
- import{A as g,c as C,d as L,o as $,f as y,a6 as _,s as U,g as O,w as q,n as G,b as J}from"./vendor-BvqAck49.js";import{l as K,t as Q,N as w,q as X,i as Y}from"./index-6ovmKZFr.js";import{i as Z}from"./isVisible-C7tPsqfj.js";import{u as l}from"./useState-BK4hy8Ma.js";import{w as S}from"./raf-Deuc0E8-.js";const ee=e=>{const{componentCls:t,colorPrimary:o}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${o})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},te=K("Wave",e=>[ee(e)]);function oe(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function b(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&oe(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function ae(e){const{borderTopColor:t,borderColor:o,backgroundColor:r}=getComputedStyle(e);return b(t)?t:b(o)?o:b(r)?r:null}function h(e){return Number.isNaN(e)?0:e}const ne=L({props:{target:Q(),className:String},setup(e){const t=U(null),[o,r]=l(null),[d,i]=l([]),[c,m]=l(0),[u,p]=l(0),[a,v]=l(0),[k,B]=l(0),[I,j]=l(!1);function W(){const{target:n}=e,s=getComputedStyle(n);r(ae(n));const R=s.position==="static",{borderLeftWidth:A,borderTopWidth:F}=s;m(R?n.offsetLeft:h(-parseFloat(A))),p(R?n.offsetTop:h(-parseFloat(F))),v(n.offsetWidth),B(n.offsetHeight);const{borderTopLeftRadius:D,borderTopRightRadius:H,borderBottomLeftRadius:M,borderBottomRightRadius:P}=s;i([D,H,P,M].map(V=>h(parseFloat(V))))}let f,N,T;const x=()=>{clearTimeout(T),S.cancel(N),f?.disconnect()},E=()=>{var n;const s=(n=t.value)===null||n===void 0?void 0:n.parentElement;s&&(g(null,s),s.parentElement&&s.parentElement.removeChild(s))};$(()=>{x(),T=setTimeout(()=>{E()},5e3);const{target:n}=e;n&&(N=S(()=>{W(),j(!0)}),typeof ResizeObserver<"u"&&(f=new ResizeObserver(W),f.observe(n)))}),y(()=>{x()});const z=n=>{n.propertyName==="opacity"&&E()};return()=>{if(!I.value)return null;const n={left:`${c.value}px`,top:`${u.value}px`,width:`${a.value}px`,height:`${k.value}px`,borderRadius:d.value.map(s=>`${s}px`).join(" ")};return o&&(n["--wave-color"]=o.value),C(_,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[C("div",{ref:t,class:e.className,style:n,onTransitionend:z},null)]})}}});function re(e,t){const o=document.createElement("div");return o.style.position="absolute",o.style.left="0px",o.style.top="0px",e?.insertBefore(o,e?.firstChild),g(C(ne,{target:e,className:t},null),o),()=>{g(null,o),o.parentElement&&o.parentElement.removeChild(o)}}function se(e,t){const o=O();let r;function d(){var i;const c=w(o);r?.(),!(!((i=t?.value)===null||i===void 0)&&i.disabled||!c)&&(r=re(c,e.value))}return y(()=>{r?.()}),d}const ve=L({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:o}=t;const r=O(),{prefixCls:d,wave:i}=X("wave",e),[,c]=te(d),m=se(J(()=>Y(d.value,c.value)),i);let u;const p=()=>{w(r).removeEventListener("click",u,!0)};return $(()=>{q(()=>e.disabled,()=>{p(),G(()=>{const a=w(r);a?.removeEventListener("click",u,!0),!(!a||a.nodeType!==1||e.disabled)&&(u=v=>{v.target.tagName==="INPUT"||!Z(v.target)||!a.getAttribute||a.getAttribute("disabled")||a.disabled||a.className.includes("disabled")||a.className.includes("-leave")||m()},a.addEventListener("click",u,!0))})},{immediate:!0,flush:"post"})}),y(()=>{p()}),()=>{var a;return(a=o.default)===null||a===void 0?void 0:a.call(o)[0]}}});export{ve as W};
1
+ import{A as g,c as C,d as L,o as $,f as y,a6 as _,s as U,g as O,w as q,n as G,b as J}from"./vendor-BvqAck49.js";import{l as K,t as Q,N as w,q as X,i as Y}from"./index-D9Sygqi9.js";import{i as Z}from"./isVisible-C7tPsqfj.js";import{u as l}from"./useState-BK4hy8Ma.js";import{w as S}from"./raf-Deuc0E8-.js";const ee=e=>{const{componentCls:t,colorPrimary:o}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${o})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},te=K("Wave",e=>[ee(e)]);function oe(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return t&&t[1]&&t[2]&&t[3]?!(t[1]===t[2]&&t[2]===t[3]):!0}function b(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&oe(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function ae(e){const{borderTopColor:t,borderColor:o,backgroundColor:r}=getComputedStyle(e);return b(t)?t:b(o)?o:b(r)?r:null}function h(e){return Number.isNaN(e)?0:e}const ne=L({props:{target:Q(),className:String},setup(e){const t=U(null),[o,r]=l(null),[d,i]=l([]),[c,m]=l(0),[u,p]=l(0),[a,v]=l(0),[k,B]=l(0),[I,j]=l(!1);function W(){const{target:n}=e,s=getComputedStyle(n);r(ae(n));const R=s.position==="static",{borderLeftWidth:A,borderTopWidth:F}=s;m(R?n.offsetLeft:h(-parseFloat(A))),p(R?n.offsetTop:h(-parseFloat(F))),v(n.offsetWidth),B(n.offsetHeight);const{borderTopLeftRadius:D,borderTopRightRadius:H,borderBottomLeftRadius:M,borderBottomRightRadius:P}=s;i([D,H,P,M].map(V=>h(parseFloat(V))))}let f,N,T;const x=()=>{clearTimeout(T),S.cancel(N),f?.disconnect()},E=()=>{var n;const s=(n=t.value)===null||n===void 0?void 0:n.parentElement;s&&(g(null,s),s.parentElement&&s.parentElement.removeChild(s))};$(()=>{x(),T=setTimeout(()=>{E()},5e3);const{target:n}=e;n&&(N=S(()=>{W(),j(!0)}),typeof ResizeObserver<"u"&&(f=new ResizeObserver(W),f.observe(n)))}),y(()=>{x()});const z=n=>{n.propertyName==="opacity"&&E()};return()=>{if(!I.value)return null;const n={left:`${c.value}px`,top:`${u.value}px`,width:`${a.value}px`,height:`${k.value}px`,borderRadius:d.value.map(s=>`${s}px`).join(" ")};return o&&(n["--wave-color"]=o.value),C(_,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[C("div",{ref:t,class:e.className,style:n,onTransitionend:z},null)]})}}});function re(e,t){const o=document.createElement("div");return o.style.position="absolute",o.style.left="0px",o.style.top="0px",e?.insertBefore(o,e?.firstChild),g(C(ne,{target:e,className:t},null),o),()=>{g(null,o),o.parentElement&&o.parentElement.removeChild(o)}}function se(e,t){const o=O();let r;function d(){var i;const c=w(o);r?.(),!(!((i=t?.value)===null||i===void 0)&&i.disabled||!c)&&(r=re(c,e.value))}return y(()=>{r?.()}),d}const ve=L({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:o}=t;const r=O(),{prefixCls:d,wave:i}=X("wave",e),[,c]=te(d),m=se(J(()=>Y(d.value,c.value)),i);let u;const p=()=>{w(r).removeEventListener("click",u,!0)};return $(()=>{q(()=>e.disabled,()=>{p(),G(()=>{const a=w(r);a?.removeEventListener("click",u,!0),!(!a||a.nodeType!==1||e.disabled)&&(u=v=>{v.target.tagName==="INPUT"||!Z(v.target)||!a.getAttribute||a.getAttribute("disabled")||a.disabled||a.className.includes("disabled")||a.className.includes("-leave")||m()},a.addEventListener("click",u,!0))})},{immediate:!0,flush:"post"})}),y(()=>{p()}),()=>{var a;return(a=o.default)===null||a===void 0?void 0:a.call(o)[0]}}});export{ve as W};