chainlesschain 0.162.73 → 0.162.74

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 (149) hide show
  1. package/package.json +1 -1
  2. package/src/assets/web-panel/assets/{AIOps-DTI_-iZ_.js → AIOps-C-0Db2rX.js} +1 -1
  3. package/src/assets/web-panel/assets/{ActionButton-CtpbGicW.js → ActionButton-CMzrHsYE.js} +1 -1
  4. package/src/assets/web-panel/assets/{Analytics-C1HwMd7E.js → Analytics-7De_11Y4.js} +3 -3
  5. package/src/assets/web-panel/assets/{AppLayout-Db953rqB.js → AppLayout-BbTNvwDg.js} +4 -4
  6. package/src/assets/web-panel/assets/{Audit-CuIi9Vup.js → Audit-NgkyFEr9.js} +1 -1
  7. package/src/assets/web-panel/assets/{Backup-DwR7Wlve.js → Backup-CZydm333.js} +1 -1
  8. package/src/assets/web-panel/assets/{BaseInput-B5wNMp7S.js → BaseInput-BJwgC2UN.js} +1 -1
  9. package/src/assets/web-panel/assets/{Chat-DivalHgk.js → Chat-DAR90oE4.js} +5 -5
  10. package/src/assets/web-panel/assets/ChatBubbleRenderer-DfqwfACj.js +1 -0
  11. package/src/assets/web-panel/assets/{Checkbox-CJrXPCJH.js → Checkbox-CJxO-pD5.js} +1 -1
  12. package/src/assets/web-panel/assets/{Codegen-BieZvOkC.js → Codegen-ClsSgl-P.js} +1 -1
  13. package/src/assets/web-panel/assets/{Col-BzvPsQgb.js → Col-DfffBuFa.js} +1 -1
  14. package/src/assets/web-panel/assets/{Community-CWcAMlpQ.js → Community-fPnkVJpl.js} +1 -1
  15. package/src/assets/web-panel/assets/{Compact-Bj_BLBpw.js → Compact-CP9f3DZt.js} +1 -1
  16. package/src/assets/web-panel/assets/{Compliance-DKvo0WAi.js → Compliance-fCITFB2R.js} +1 -1
  17. package/src/assets/web-panel/assets/{Cowork-DRajk8JO.js → Cowork-GyZhY5mY.js} +3 -3
  18. package/src/assets/web-panel/assets/{Cron-DPz9MoUo.js → Cron-toRv3QGW.js} +2 -2
  19. package/src/assets/web-panel/assets/{Crosschain-BpSuvmns.js → Crosschain-C0ShIRvX.js} +1 -1
  20. package/src/assets/web-panel/assets/{DID-Co98G00H.js → DID-CB-4ILVF.js} +2 -2
  21. package/src/assets/web-panel/assets/{Dashboard-8TSG0W7f.js → Dashboard-DsbaECcP.js} +2 -2
  22. package/src/assets/web-panel/assets/{Dropdown-CKViu7w3.js → Dropdown-klGzPkCq.js} +1 -1
  23. package/src/assets/web-panel/assets/{EmailListRenderer-BqfdADvJ.js → EmailListRenderer-DF7bHNgQ.js} +1 -1
  24. package/src/assets/web-panel/assets/{FamilyGuardDashboard-aWu1imGZ.js → FamilyGuardDashboard-CoXn37ZA.js} +1 -1
  25. package/src/assets/web-panel/assets/{Federation-w4YpT8EN.js → Federation-CGjH3107.js} +1 -1
  26. package/src/assets/web-panel/assets/{FormItemContext-CAk4CXid.js → FormItemContext-BbW5tEzw.js} +1 -1
  27. package/src/assets/web-panel/assets/{GenericCardRenderer-MoJw4J2L.js → GenericCardRenderer-Ed6pit6I.js} +1 -1
  28. package/src/assets/web-panel/assets/{Git-HNU_a9Jz.js → Git-wSniJ4nQ.js} +2 -2
  29. package/src/assets/web-panel/assets/{Governance-BkIXWYUS.js → Governance-BEXL8yvz.js} +1 -1
  30. package/src/assets/web-panel/assets/{Inference-CnquB88h.js → Inference-RQRU05O3.js} +1 -1
  31. package/src/assets/web-panel/assets/{KnowledgeGraph-PGSMF-uq.js → KnowledgeGraph-DcB0jIhB.js} +1 -1
  32. package/src/assets/web-panel/assets/{Logs-DCc-nYzu.js → Logs-Dq3ULqtY.js} +2 -2
  33. package/src/assets/web-panel/assets/{Marketplace-CyGX8XEt.js → Marketplace-CMM0PWC-.js} +1 -1
  34. package/src/assets/web-panel/assets/{McpTools-DBkZ5yUL.js → McpTools-DHtW5q72.js} +4 -4
  35. package/src/assets/web-panel/assets/{Memory-DmYLRCwo.js → Memory-BPNffBX4.js} +2 -2
  36. package/src/assets/web-panel/assets/{MobileBridge-CszJjeNc.js → MobileBridge-DBduGG-4.js} +2 -2
  37. package/src/assets/web-panel/assets/{MobileProjects-DWgtDsta.js → MobileProjects-C7WN944V.js} +1 -1
  38. package/src/assets/web-panel/assets/{Mtc-Bmt_Pmg4.js → Mtc-BgNC4GSE.js} +4 -4
  39. package/src/assets/web-panel/assets/{MtcAudit-BmG0ys0l.js → MtcAudit-BH8w3RJG.js} +2 -2
  40. package/src/assets/web-panel/assets/{Multisig-DNd5iMmD.js → Multisig-rqVGkM71.js} +3 -3
  41. package/src/assets/web-panel/assets/{NLProgramming-yxbNl09B.js → NLProgramming-BsQUtVNj.js} +1 -1
  42. package/src/assets/web-panel/assets/{Notes-CQ0qAzI4.js → Notes-C8kfVgBk.js} +3 -3
  43. package/src/assets/web-panel/assets/{NotificationSettings-CIzkE4ao.js → NotificationSettings-CnkwLmEc.js} +1 -1
  44. package/src/assets/web-panel/assets/{OrderTableRenderer-e1VMUxTi.js → OrderTableRenderer-DX7--1Qh.js} +1 -1
  45. package/src/assets/web-panel/assets/{Organization-BNBIlf_R.js → Organization-Cwo4kTgX.js} +4 -4
  46. package/src/assets/web-panel/assets/{Overflow-C5GzzJTq.js → Overflow-B45Usajd.js} +1 -1
  47. package/src/assets/web-panel/assets/{P2P-DjL2jIED.js → P2P-C3jEcPvs.js} +2 -2
  48. package/src/assets/web-panel/assets/{PdhVaultBrowser-C2EYDmpW.js → PdhVaultBrowser-CGDVPsiI.js} +3 -3
  49. package/src/assets/web-panel/assets/{Permissions-BVGCXxDp.js → Permissions-B08m9YV_.js} +2 -2
  50. package/src/assets/web-panel/assets/{PersonalDataHub-B1xBro16.js → PersonalDataHub-C921TFhZ.js} +3 -3
  51. package/src/assets/web-panel/assets/{Pipeline-DIYWiDnt.js → Pipeline-AvBEIM1o.js} +1 -1
  52. package/src/assets/web-panel/assets/{Privacy--Qx3QdO1.js → Privacy-g6QVOyQC.js} +1 -1
  53. package/src/assets/web-panel/assets/{ProjectInit-DYOEcV04.js → ProjectInit-C1L7umfx.js} +2 -2
  54. package/src/assets/web-panel/assets/{ProjectSettings-BcOx5-KS.js → ProjectSettings-1NsCP5Rt.js} +2 -2
  55. package/src/assets/web-panel/assets/{Projects-CO69txk4.js → Projects-BDxJtwFv.js} +1 -1
  56. package/src/assets/web-panel/assets/{Providers-Bj8pCgzo.js → Providers-DltXHH7X.js} +1 -1
  57. package/src/assets/web-panel/assets/{QuickAsk-Cukpq-4s.js → QuickAsk-1Pw54Hz2.js} +1 -1
  58. package/src/assets/web-panel/assets/{Recommend-DJB5wUfM.js → Recommend-hB-Jmtl7.js} +1 -1
  59. package/src/assets/web-panel/assets/{Reputation-B9t0-nT0.js → Reputation-DkWxzI44.js} +1 -1
  60. package/src/assets/web-panel/assets/{Row-4cniRgxC.js → Row-CZhFZDZ6.js} +1 -1
  61. package/src/assets/web-panel/assets/{RssFeed-Y4db_T9t.js → RssFeed-BK-SqcmK.js} +2 -2
  62. package/src/assets/web-panel/assets/{Search-DggZDzlc.js → Search-Bf_2YuHL.js} +1 -1
  63. package/src/assets/web-panel/assets/{Security-C67A6kED.js → Security-CkirTQxl.js} +3 -3
  64. package/src/assets/web-panel/assets/{Services-BocBjvaa.js → Services-B9q0W9nR.js} +2 -2
  65. package/src/assets/web-panel/assets/{Skeleton-C9jI-iOy.js → Skeleton-BPDuoXu5.js} +1 -1
  66. package/src/assets/web-panel/assets/{Skills-2baFHKOW.js → Skills-B-LPU5PB.js} +1 -1
  67. package/src/assets/web-panel/assets/{Sla-CnowXeRb.js → Sla-Clv-rKdc.js} +1 -1
  68. package/src/assets/web-panel/assets/{SpeechSettings-DWGBkmUt.js → SpeechSettings-0IZfUTng.js} +1 -1
  69. package/src/assets/web-panel/assets/{SyncSettings-B89qwCgX.js → SyncSettings-nEJzARVZ.js} +2 -2
  70. package/src/assets/web-panel/assets/{Tasks-C1_WvNc0.js → Tasks-CwXHXIkl.js} +1 -1
  71. package/src/assets/web-panel/assets/{Templates-P8dBhbxa.js → Templates-DqjCbx0G.js} +1 -1
  72. package/src/assets/web-panel/assets/{Tenant-DHo0pxrm.js → Tenant-D9gOurTB.js} +1 -1
  73. package/src/assets/web-panel/assets/{Terminal-Dr-HvjH-.js → Terminal-CnsQIiHq.js} +2 -2
  74. package/src/assets/web-panel/assets/TimelineRenderer-Di3hxrOR.js +1 -0
  75. package/src/assets/web-panel/assets/{Tokens-DnJxqOPM.js → Tokens-V_QvhzEW.js} +1 -1
  76. package/src/assets/web-panel/assets/{Trigger-C-FLgMzr.js → Trigger-CzBN5yUT.js} +1 -1
  77. package/src/assets/web-panel/assets/{Trust-CIT_RVqA.js → Trust-C_NrVDAW.js} +1 -1
  78. package/src/assets/web-panel/assets/{UkeySign-Cg9VS6y6.js → UkeySign-leU9ylJd.js} +1 -1
  79. package/src/assets/web-panel/assets/{VideoEditing-BzoxE8mA.js → VideoEditing-DwzlNpBk.js} +1 -1
  80. package/src/assets/web-panel/assets/{Wallet-ZkmCII8R.js → Wallet-dSIjpeqj.js} +2 -2
  81. package/src/assets/web-panel/assets/{WebAuthn-CptQdp3u.js → WebAuthn-DAKdy3CS.js} +5 -5
  82. package/src/assets/web-panel/assets/{WorkflowEditor-Vkz28khO.js → WorkflowEditor-DOif-wp_.js} +1 -1
  83. package/src/assets/web-panel/assets/{chat-DXdmvvEA.js → chat-B9CiS_S6.js} +1 -1
  84. package/src/assets/web-panel/assets/{colors-De7FCj5l.js → colors-BlIfHTi3.js} +1 -1
  85. package/src/assets/web-panel/assets/{compact-item-DnT3XzME.js → compact-item-BhlUVQn4.js} +1 -1
  86. package/src/assets/web-panel/assets/{createContext-ECZfCCqd.js → createContext-BAKscpCQ.js} +1 -1
  87. package/src/assets/web-panel/assets/devWarning-DwewKXVi.js +1 -0
  88. package/src/assets/web-panel/assets/{hasIn-Uodg6pAt.js → hasIn-Da29JBzS.js} +1 -1
  89. package/src/assets/web-panel/assets/{index-C4KhsGXo.js → index-B8Jktv0L.js} +1 -1
  90. package/src/assets/web-panel/assets/index-B9-zs80P.js +1 -0
  91. package/src/assets/web-panel/assets/{index-FU8Zo5cp.js → index-BI-BXKcX.js} +1 -1
  92. package/src/assets/web-panel/assets/{index-CbbfcGeJ.js → index-BJVCQ4u4.js} +1 -1
  93. package/src/assets/web-panel/assets/{index-Dy0AT-uc.js → index-BRC7HesQ.js} +1 -1
  94. package/src/assets/web-panel/assets/{index-C6JgjkY7.js → index-BUjl0ati.js} +1 -1
  95. package/src/assets/web-panel/assets/{index-JVwNC4yP.js → index-BV5N_JGL.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-Dbfj4QL5.js → index-B_uUznWT.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-CMuqxCVw.js → index-BcVXBouF.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-BC8SOuGi.js → index-BhX9Ferp.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-DBsl2SuZ.js → index-Boucptjt.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-CLzPxAp4.js → index-Brth8YUr.js} +1 -1
  101. package/src/assets/web-panel/assets/{index-Db33l8Ix.js → index-Btl77NCX.js} +1 -1
  102. package/src/assets/web-panel/assets/{index-BtJ8BHU0.js → index-BwrQlS19.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-KV6dXwKC.js → index-C5b8LYJi.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-D2YOclGO.js → index-C6-66JOV.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-JqSxr1A7.js → index-CFwvL9Lx.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-DCvmjxu9.js → index-CJobtOqU.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-DGwgEqwl.js → index-CKlBeA-P.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-Bg1RsfAJ.js → index-CM1idCUO.js} +3 -3
  109. package/src/assets/web-panel/assets/index-CU0CJgzs.js +1 -0
  110. package/src/assets/web-panel/assets/{index-CffZBdA1.js → index-CUiZfnAi.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-cHnmjGqB.js → index-CcLdhhVn.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-Blo85ZKd.js → index-Cgp_jQ8s.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-CaDZ-LMg.js → index-CxMk5saD.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-CCguvASR.js → index-D8H2a4NL.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-CcLDjTgI.js → index-DBq6xzDm.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-1dWvOqru.js → index-DCMOBmSn.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-LwNszM-5.js → index-DGRftOr1.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-C01WM7Pk.js → index-DJybkYpX.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-BUMNJRCl.js → index-DK3w8-wH.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-Dkvf5upf.js → index-DKggkQGO.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-C9_Cnvha.js → index-DcZ_Fb-p.js} +1 -1
  122. package/src/assets/web-panel/assets/{index-DOIeo8Qs.js → index-DuiRwSJ_.js} +1 -1
  123. package/src/assets/web-panel/assets/{index-COTabJQd.js → index-FLBlK1Zl.js} +1 -1
  124. package/src/assets/web-panel/assets/{index-CwXP0KcT.js → index-TAakqe_Q.js} +1 -1
  125. package/src/assets/web-panel/assets/{index-Dd9Bx3tJ.js → index-VcI9Ml8H.js} +1 -1
  126. package/src/assets/web-panel/assets/{index-CPjI3AGE.js → index-dmxCnT7f.js} +1 -1
  127. package/src/assets/web-panel/assets/{index-DPcpxSQt.js → index-z3klVdjk.js} +1 -1
  128. package/src/assets/web-panel/assets/{initDefaultProps-B3H1sf95.js → initDefaultProps-DozNsdEE.js} +1 -1
  129. package/src/assets/web-panel/assets/{motion-DreYO5eb.js → motion-DHBmFfzK.js} +1 -1
  130. package/src/assets/web-panel/assets/{move-B0OVU04M.js → move-BBloskCm.js} +1 -1
  131. package/src/assets/web-panel/assets/{omit-PcEEXHLZ.js → omit-BMB6RBkL.js} +1 -1
  132. package/src/assets/web-panel/assets/{pickAttrs-DH6-hDkF.js → pickAttrs-9cBYsZy-.js} +1 -1
  133. package/src/assets/web-panel/assets/{placementArrow-DFamUSEw.js → placementArrow-DphoF2as.js} +1 -1
  134. package/src/assets/web-panel/assets/{responsiveObserve-DT1grAyh.js → responsiveObserve-7eccwdTq.js} +1 -1
  135. package/src/assets/web-panel/assets/{slide-41lCsY6d.js → slide-BAF1i2qq.js} +1 -1
  136. package/src/assets/web-panel/assets/{statusUtils-FzJ7j2T7.js → statusUtils-Bw7QssM3.js} +1 -1
  137. package/src/assets/web-panel/assets/{styleChecker-D0Zvn50h.js → styleChecker-C9oBEpYS.js} +1 -1
  138. package/src/assets/web-panel/assets/{useFlexGapSupport-BTxsJE5n.js → useFlexGapSupport-iiGRCohz.js} +1 -1
  139. package/src/assets/web-panel/assets/{useFs-DRVttEr3.js → useFs-1aj0rWmC.js} +1 -1
  140. package/src/assets/web-panel/assets/{usePersonalDataHub-BSe7NVv0.js → usePersonalDataHub-nF5DnTyb.js} +1 -1
  141. package/src/assets/web-panel/assets/{vnode-D8O7tUXh.js → vnode-DFx6RVaA.js} +1 -1
  142. package/src/assets/web-panel/assets/{zoom-CMQc1RZ4.js → zoom-DwIxKwes.js} +1 -1
  143. package/src/assets/web-panel/index.html +1 -1
  144. package/src/lib/sync-engine-cli.js +6 -4
  145. package/src/assets/web-panel/assets/ChatBubbleRenderer-BwPSr02C.js +0 -1
  146. package/src/assets/web-panel/assets/TimelineRenderer-DM7dOaUR.js +0 -1
  147. package/src/assets/web-panel/assets/devWarning-gaA8VqZf.js +0 -1
  148. package/src/assets/web-panel/assets/index-DTpmiTGK.js +0 -1
  149. package/src/assets/web-panel/assets/index-DwpvMYUU.js +0 -1
@@ -1,4 +1,4 @@
1
- import{h as j,aa as De,a7 as Ar,p as Sr,i as be,z as Er,f as Y,l as Cr,m as Pr,r as Lt,ac as qr,g as Tr,M as Rt,q as Vt,P as me,Q as Qe,ad as Ir,ae as jr,af as Mr,Z as fe,G as he,a8 as ut,$ as ft,a9 as _r,t as Fe,w as _e}from"./index-Bg1RsfAJ.js";import{a7 as Lr,i as Nt,b as C,p as Dt,c as V,F as Ce,d as qe,r as Je,w as ue,a6 as Rr,a3 as Vr,a4 as Nr,y as Dr,s as ne,e as We,f as Wr,o as Br,z as Be,n as Wt,a as Bt,u as oe}from"./vendor-BvqAck49.js";import{b9 as Hr,L as Gr,C as zr,E as Ur,a as Kr}from"./icons-DP3uiYxy.js";import{a as Xr,k as Te,g as Ht,s as Yr,b as Zr,c as Qr,U as ct,S as Gt,d as Jr,e as zt,f as kr,h as dt,i as Ut}from"./Trigger-C-FLgMzr.js";import{b as en,a as Kt,s as tn,o as rn,i as Xt,c as ke,d as Yt,t as et,h as nn,e as Zt,f as Qt,g as an}from"./hasIn-Uodg6pAt.js";import{h as Ie,e as Jt,i as tt,r as on,S as mt,j as rt,g as nt,k as kt,n as Pe,b as ln,a as er}from"./_getTag-DnrRH4E6.js";import{g as tr,i as sn}from"./isPlainObject-BWRMT62c.js";import{A as un}from"./Row-4cniRgxC.js";import{b as fn,a as cn}from"./_arrayIncludes-B8uzE354.js";import{t as dn,d as mn}from"./debounce-CFGTTtN3.js";import{C as rr}from"./Col-BzvPsQgb.js";import{T as gn}from"./index-CCguvASR.js";import{g as hn,c as vn}from"./collapseMotion-mxzzcDsg.js";import{z as nr}from"./zoom-CMQc1RZ4.js";import{a as pn,F as yn,u as bn,b as He}from"./FormItemContext-CAk4CXid.js";import{i as wn}from"./initDefaultProps-B3H1sf95.js";import"./raf-Deuc0E8-.js";import"./motion-DreYO5eb.js";import"./vnode-D8O7tUXh.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./isSymbol-S5WZT7lS.js";import"./responsiveObserve-DT1grAyh.js";import"./useFlexGapSupport-BTxsJE5n.js";import"./styleChecker-D0Zvn50h.js";import"./index-CffZBdA1.js";import"./placementArrow-DFamUSEw.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-De7FCj5l.js";import"./devWarning-gaA8VqZf.js";import"./createContext-ECZfCCqd.js";function gt(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function ht(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Le(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return ht(r.overflowY,t)||ht(r.overflowX,t)||(function(n){var i=(function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1}function Oe(e,t,r,n,i,o,a,l){return o<e&&a>t||o>e&&a<t?0:o<=e&&l<=r||a>=t&&l>=r?o-e-n:a>t&&l<r||o<e&&l>r?a-t+i:0}var vt=function(e,t){var r=window,n=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(Or){return Or!==a};if(!gt(e))throw new TypeError("Invalid target");for(var v,f,g=document.scrollingElement||document.documentElement,h=[],y=e;gt(y)&&s(y);){if((y=(f=(v=y).parentElement)==null?v.getRootNode().host||null:f)===g){h.push(y);break}y!=null&&y===document.body&&Le(y)&&!Le(document.documentElement)||y!=null&&Le(y,l)&&h.push(y)}for(var $=r.visualViewport?r.visualViewport.width:innerWidth,d=r.visualViewport?r.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,P=e.getBoundingClientRect(),u=P.height,c=P.width,w=P.top,E=P.right,F=P.bottom,O=P.left,_=i==="start"||i==="nearest"?w:i==="end"?F:w+u/2,T=o==="center"?O+c/2:o==="end"?E:O,L=[],M=0;M<h.length;M++){var A=h[M],H=A.getBoundingClientRect(),Z=H.height,U=H.width,x=H.top,S=H.right,R=H.bottom,G=H.left;if(n==="if-needed"&&w>=0&&O>=0&&F<=d&&E<=$&&w>=x&&F<=R&&O>=G&&E<=S)return L;var K=getComputedStyle(A),J=parseInt(K.borderLeftWidth,10),ie=parseInt(K.borderTopWidth,10),Q=parseInt(K.borderRightWidth,10),p=parseInt(K.borderBottomWidth,10),q=0,N=0,W="offsetWidth"in A?A.offsetWidth-A.clientWidth-J-Q:0,B="offsetHeight"in A?A.offsetHeight-A.clientHeight-ie-p:0,X="offsetWidth"in A?A.offsetWidth===0?0:U/A.offsetWidth:0,te="offsetHeight"in A?A.offsetHeight===0?0:Z/A.offsetHeight:0;if(g===A)q=i==="start"?_:i==="end"?_-d:i==="nearest"?Oe(m,m+d,d,ie,p,m+_,m+_+u,u):_-d/2,N=o==="start"?T:o==="center"?T-$/2:o==="end"?T-$:Oe(b,b+$,$,J,Q,b+T,b+T+c,c),q=Math.max(0,q+m),N=Math.max(0,N+b);else{q=i==="start"?_-x-ie:i==="end"?_-R+p+B:i==="nearest"?Oe(x,R,Z,ie,p+B,_,_+u,u):_-(x+Z/2)+B/2,N=o==="start"?T-G-J:o==="center"?T-(G+U/2)+W/2:o==="end"?T-S+Q+W:Oe(G,S,U,J,Q+W,T,T+c,c);var re=A.scrollLeft,ge=A.scrollTop;_+=ge-(q=Math.max(0,Math.min(ge+q/te,A.scrollHeight-Z/te+B))),T+=re-(N=Math.max(0,Math.min(re+N/X,A.scrollWidth-U/X+W)))}L.push({el:A,top:q,left:N})}return L};function ir(e){return e===Object(e)&&Object.keys(e).length!==0}function xn(e,t){t===void 0&&(t="auto");var r="scrollBehavior"in document.body.style;e.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scroll&&r?i.scroll({top:o,left:a,behavior:t}):(i.scrollTop=o,i.scrollLeft=a)})}function $n(e){return e===!1?{block:"end",inline:"nearest"}:ir(e)?e:{block:"start",inline:"nearest"}}function Fn(e,t){var r=e.isConnected||e.ownerDocument.documentElement.contains(e);if(ir(t)&&typeof t.behavior=="function")return t.behavior(r?vt(e,t):[]);if(r){var n=$n(t);return xn(vt(e,n),n.behavior)}}var pt=1/0,On=17976931348623157e292;function An(e){if(!e)return e===0?e:0;if(e=dn(e),e===pt||e===-pt){var t=e<0?-1:1;return t*On}return e===e?e:0}function Sn(e){var t=An(e),r=t%1;return t===t?r?t-r:t:0}var yt=Object.create,En=(function(){function e(){}return function(t){if(!Ie(t))return{};if(yt)return yt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Cn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Pn(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function xe(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var l=t[o],s=void 0;s===void 0&&(s=e[l]),i?en(r,l,s):Kt(r,l,s)}return r}function qn(e,t){return tn(rn(e,t,Xt),e+"")}function Tn(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var In=Object.prototype,jn=In.hasOwnProperty;function Mn(e){if(!Ie(e))return Tn(e);var t=Jt(e),r=[];for(var n in e)n=="constructor"&&(t||!jn.call(e,n))||r.push(n);return r}function it(e){return tt(e)?Xr(e,!0):Mn(e)}function _n(e,t,r){var n=e==null?void 0:ke(e,t);return n===void 0?r:n}function Ln(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function Rn(e,t){return e&&xe(t,Te(t),e)}function Vn(e,t){return e&&xe(t,it(t),e)}var ar=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bt=ar&&typeof module=="object"&&module&&!module.nodeType&&module,Nn=bt&&bt.exports===ar,wt=Nn?on.Buffer:void 0,xt=wt?wt.allocUnsafe:void 0;function Dn(e,t){if(t)return e.slice();var r=e.length,n=xt?xt(r):new e.constructor(r);return e.copy(n),n}function Wn(e,t){return xe(e,Ht(e),t)}var Bn=Object.getOwnPropertySymbols,or=Bn?function(e){for(var t=[];e;)Zr(t,Ht(e)),e=tr(e);return t}:Yr;function Hn(e,t){return xe(e,or(e),t)}function lr(e){return Qr(e,it,or)}var Gn=Object.prototype,zn=Gn.hasOwnProperty;function Un(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&zn.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function at(e){var t=new e.constructor(e.byteLength);return new ct(t).set(new ct(e)),t}function Kn(e,t){var r=t?at(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Xn=/\w*$/;function Yn(e){var t=new e.constructor(e.source,Xn.exec(e));return t.lastIndex=e.lastIndex,t}var $t=mt?mt.prototype:void 0,Ft=$t?$t.valueOf:void 0;function Zn(e){return Ft?Object(Ft.call(e)):{}}function Qn(e,t){var r=t?at(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Jn="[object Boolean]",kn="[object Date]",ei="[object Map]",ti="[object Number]",ri="[object RegExp]",ni="[object Set]",ii="[object String]",ai="[object Symbol]",oi="[object ArrayBuffer]",li="[object DataView]",si="[object Float32Array]",ui="[object Float64Array]",fi="[object Int8Array]",ci="[object Int16Array]",di="[object Int32Array]",mi="[object Uint8Array]",gi="[object Uint8ClampedArray]",hi="[object Uint16Array]",vi="[object Uint32Array]";function pi(e,t,r){var n=e.constructor;switch(t){case oi:return at(e);case Jn:case kn:return new n(+e);case li:return Kn(e,r);case si:case ui:case fi:case ci:case di:case mi:case gi:case hi:case vi:return Qn(e,r);case ei:return new n;case ti:case ii:return new n(e);case ri:return Yn(e);case ni:return new n;case ai:return Zn(e)}}function yi(e){return typeof e.constructor=="function"&&!Jt(e)?En(tr(e)):{}}var bi="[object Map]";function wi(e){return rt(e)&&nt(e)==bi}var Ot=Pe&&Pe.isMap,xi=Ot?kt(Ot):wi,$i="[object Set]";function Fi(e){return rt(e)&&nt(e)==$i}var At=Pe&&Pe.isSet,Oi=At?kt(At):Fi,Ai=1,Si=2,Ei=4,sr="[object Arguments]",Ci="[object Array]",Pi="[object Boolean]",qi="[object Date]",Ti="[object Error]",ur="[object Function]",Ii="[object GeneratorFunction]",ji="[object Map]",Mi="[object Number]",fr="[object Object]",_i="[object RegExp]",Li="[object Set]",Ri="[object String]",Vi="[object Symbol]",Ni="[object WeakMap]",Di="[object ArrayBuffer]",Wi="[object DataView]",Bi="[object Float32Array]",Hi="[object Float64Array]",Gi="[object Int8Array]",zi="[object Int16Array]",Ui="[object Int32Array]",Ki="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Yi="[object Uint16Array]",Zi="[object Uint32Array]",D={};D[sr]=D[Ci]=D[Di]=D[Wi]=D[Pi]=D[qi]=D[Bi]=D[Hi]=D[Gi]=D[zi]=D[Ui]=D[ji]=D[Mi]=D[fr]=D[_i]=D[Li]=D[Ri]=D[Vi]=D[Ki]=D[Xi]=D[Yi]=D[Zi]=!0;D[Ti]=D[ur]=D[Ni]=!1;function pe(e,t,r,n,i,o){var a,l=t&Ai,s=t&Si,v=t&Ei;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Ie(e))return e;var f=er(e);if(f){if(a=Un(e),!l)return Cn(e,a)}else{var g=nt(e),h=g==ur||g==Ii;if(ln(e))return Dn(e,l);if(g==fr||g==sr||h&&!i){if(a=s||h?{}:yi(e),!l)return s?Hn(e,Vn(a,e)):Wn(e,Rn(a,e))}else{if(!D[g])return i?e:{};a=pi(e,g,l)}}o||(o=new Gt);var y=o.get(e);if(y)return y;o.set(e,a),Oi(e)?e.forEach(function(b){a.add(pe(b,t,r,b,e,o))}):xi(e)&&e.forEach(function(b,m){a.set(m,pe(b,t,r,m,e,o))});var $=v?s?lr:Jr:s?it:Te,d=f?void 0:$(e);return Pn(d||e,function(b,m){d&&(m=b,b=e[m]),Kt(a,m,pe(b,t,r,m,e,o))}),a}var Qi=1,Ji=4;function Se(e){return pe(e,Qi|Ji)}var ki=1,ea=2;function ta(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var l=a[0],s=e[l],v=a[1];if(a[2]){if(s===void 0&&!(l in e))return!1}else{var f=new Gt,g;if(!(g===void 0?zt(v,s,ki|ea,n,f):g))return!1}}return!0}function cr(e){return e===e&&!Ie(e)}function ra(e){for(var t=Te(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,cr(i)]}return t}function dr(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function na(e){var t=ra(e);return t.length==1&&t[0][2]?dr(t[0][0],t[0][1]):function(r){return r===e||ta(r,e,t)}}var ia=1,aa=2;function oa(e,t){return Yt(e)&&cr(t)?dr(et(e),t):function(r){var n=_n(r,e);return n===void 0&&n===t?nn(r,e):zt(t,n,ia|aa)}}function la(e){return function(t){return t?.[e]}}function sa(e){return function(t){return ke(t,e)}}function ua(e){return Yt(e)?la(et(e)):sa(e)}function mr(e){return typeof e=="function"?e:e==null?Xt:typeof e=="object"?er(e)?oa(e[0],e[1]):na(e):ua(e)}function fa(e){return rt(e)&&tt(e)}function ca(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function da(e){return function(t,r,n){var i=Object(t);if(!tt(t)){var o=mr(r);t=Te(t),r=function(l){return o(i[l],l,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var ma=Math.max;function ga(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Sn(r);return i<0&&(i=ma(n+i,0)),fn(e,mr(t),i)}var ha=da(ga),va=Math.min;function pa(e,t,r){for(var n=cn,i=e[0].length,o=e.length,a=o,l=Array(o),s=1/0,v=[];a--;){var f=e[a];s=va(f.length,s),l[a]=i>=120&&f.length>=120?new kr(a&&f):void 0}f=e[0];var g=-1,h=l[0];e:for(;++g<i&&v.length<s;){var y=f[g],$=y;if(y=y!==0?y:0,!(h?dt(h,$):n(v,$))){for(a=o;--a;){var d=l[a];if(!(d?dt(d,$):n(e[a],$)))continue e}h&&h.push($),v.push(y)}}return v}function ya(e){return fa(e)?e:[]}var ba=qn(function(e){var t=Zt(e,ya);return t.length&&t[0]===e[0]?pa(t):[]});function wa(e,t){return t.length<2?e:ke(e,Ln(t,0,-1))}var xa=Object.prototype,$a=xa.hasOwnProperty;function Fa(e,t){t=Qt(t,e);var r=-1,n=t.length;if(!n)return!0;for(var i=e==null||typeof e!="object"&&typeof e!="function";++r<n;){var o=t[r];if(typeof o=="string"){if(o==="__proto__"&&!$a.call(e,"__proto__"))return!1;if(o==="constructor"&&r+1<n&&typeof t[r+1]=="string"&&t[r+1]==="prototype"){if(i&&r===0)continue;return!1}}}var a=wa(e,t);return a==null||delete a[et(ca(t))]}function Oa(e){return sn(e)?void 0:e}var Aa=1,Sa=2,Ea=4,Ca=an(function(e,t){var r={};if(e==null)return r;var n=!1;t=Zt(t,function(o){return o=Qt(o,e),n||(n=o.length>1),o}),xe(e,lr(e),r),n&&(r=pe(r,Aa|Sa|Ea,Oa));for(var i=t.length;i--;)Fa(r,t[i]);return r}),Pa={};function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},se.apply(this,arguments)}function qa(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,we(e,t)}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ge(e)}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},we(e,t)}function Ta(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ee(e,t,r){return Ta()?Ee=Reflect.construct.bind():Ee=function(i,o,a){var l=[null];l.push.apply(l,o);var s=Function.bind.apply(i,l),v=new s;return a&&we(v,a.prototype),v},Ee.apply(null,arguments)}function Ia(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ze(e){var t=typeof Map=="function"?new Map:void 0;return ze=function(n){if(n===null||!Ia(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Ee(n,arguments,Ge(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),we(i,n)},ze(e)}var ja=/%[sdj%]/g,gr=function(){};typeof process<"u"&&Pa&&typeof window<"u"&&typeof document<"u"&&(gr=function(t,r){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&r.every(function(n){return typeof n=="string"})&&console.warn(t,r)});function Ue(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function ee(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,o=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var a=e.replace(ja,function(l){if(l==="%%")return"%";if(i>=o)return l;switch(l){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return l}});return a}return e}function Ma(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function z(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Ma(t)&&typeof e=="string"&&!e)}function _a(e,t,r){var n=[],i=0,o=e.length;function a(l){n.push.apply(n,l||[]),i++,i===o&&r(n)}e.forEach(function(l){t(l,a)})}function St(e,t,r){var n=0,i=e.length;function o(a){if(a&&a.length){r(a);return}var l=n;n=n+1,l<i?t(e[l],o):r([])}o([])}function La(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r]||[])}),t}var Et=(function(e){qa(t,e);function t(r,n){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=r,i.fields=n,i}return t})(ze(Error));function Ra(e,t,r,n,i){if(t.first){var o=new Promise(function(h,y){var $=function(m){return n(m),m.length?y(new Et(m,Ue(m))):h(i)},d=La(e);St(d,r,$)});return o.catch(function(h){return h}),o}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),s=l.length,v=0,f=[],g=new Promise(function(h,y){var $=function(b){if(f.push.apply(f,b),v++,v===s)return n(f),f.length?y(new Et(f,Ue(f))):h(i)};l.length||(n(f),h(i)),l.forEach(function(d){var b=e[d];a.indexOf(d)!==-1?St(b,r,$):_a(b,r,$)})});return g.catch(function(h){return h}),g}function Va(e){return!!(e&&e.message!==void 0)}function Na(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Ct(e,t){return function(r){var n;return e.fullFields?n=Na(t,e.fullFields):n=t[r.field||e.fullField],Va(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function Pt(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=se({},e[r],n):e[r]=n}}return e}var hr=function(t,r,n,i,o,a){t.required&&(!n.hasOwnProperty(t.field)||z(r,a||t.type))&&i.push(ee(o.messages.required,t.fullField))},Da=function(t,r,n,i,o){(/^\s+$/.test(r)||r==="")&&i.push(ee(o.messages.whitespace,t.fullField))},Ae,Wa=(function(){if(Ae)return Ae;var e="[a-fA-F\\d:]",t=function(c){return c&&c.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=(`
1
+ import{h as j,aa as De,a7 as Ar,p as Sr,i as be,z as Er,f as Y,l as Cr,m as Pr,r as Lt,ac as qr,g as Tr,M as Rt,q as Vt,P as me,Q as Qe,ad as Ir,ae as jr,af as Mr,Z as fe,G as he,a8 as ut,$ as ft,a9 as _r,t as Fe,w as _e}from"./index-CM1idCUO.js";import{a7 as Lr,i as Nt,b as C,p as Dt,c as V,F as Ce,d as qe,r as Je,w as ue,a6 as Rr,a3 as Vr,a4 as Nr,y as Dr,s as ne,e as We,f as Wr,o as Br,z as Be,n as Wt,a as Bt,u as oe}from"./vendor-BvqAck49.js";import{b9 as Hr,L as Gr,C as zr,E as Ur,a as Kr}from"./icons-DP3uiYxy.js";import{a as Xr,k as Te,g as Ht,s as Yr,b as Zr,c as Qr,U as ct,S as Gt,d as Jr,e as zt,f as kr,h as dt,i as Ut}from"./Trigger-CzBN5yUT.js";import{b as en,a as Kt,s as tn,o as rn,i as Xt,c as ke,d as Yt,t as et,h as nn,e as Zt,f as Qt,g as an}from"./hasIn-Da29JBzS.js";import{h as Ie,e as Jt,i as tt,r as on,S as mt,j as rt,g as nt,k as kt,n as Pe,b as ln,a as er}from"./_getTag-DnrRH4E6.js";import{g as tr,i as sn}from"./isPlainObject-BWRMT62c.js";import{A as un}from"./Row-CZhFZDZ6.js";import{b as fn,a as cn}from"./_arrayIncludes-B8uzE354.js";import{t as dn,d as mn}from"./debounce-CFGTTtN3.js";import{C as rr}from"./Col-DfffBuFa.js";import{T as gn}from"./index-D8H2a4NL.js";import{g as hn,c as vn}from"./collapseMotion-mxzzcDsg.js";import{z as nr}from"./zoom-DwIxKwes.js";import{a as pn,F as yn,u as bn,b as He}from"./FormItemContext-BbW5tEzw.js";import{i as wn}from"./initDefaultProps-DozNsdEE.js";import"./raf-Deuc0E8-.js";import"./motion-DHBmFfzK.js";import"./vnode-DFx6RVaA.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./isSymbol-S5WZT7lS.js";import"./responsiveObserve-7eccwdTq.js";import"./useFlexGapSupport-iiGRCohz.js";import"./styleChecker-C9oBEpYS.js";import"./index-CUiZfnAi.js";import"./placementArrow-DphoF2as.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-BlIfHTi3.js";import"./devWarning-DwewKXVi.js";import"./createContext-BAKscpCQ.js";function gt(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function ht(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Le(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var r=getComputedStyle(e,null);return ht(r.overflowY,t)||ht(r.overflowX,t)||(function(n){var i=(function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(e)}return!1}function Oe(e,t,r,n,i,o,a,l){return o<e&&a>t||o>e&&a<t?0:o<=e&&l<=r||a>=t&&l>=r?o-e-n:a>t&&l<r||o<e&&l>r?a-t+i:0}var vt=function(e,t){var r=window,n=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,l=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(Or){return Or!==a};if(!gt(e))throw new TypeError("Invalid target");for(var v,f,g=document.scrollingElement||document.documentElement,h=[],y=e;gt(y)&&s(y);){if((y=(f=(v=y).parentElement)==null?v.getRootNode().host||null:f)===g){h.push(y);break}y!=null&&y===document.body&&Le(y)&&!Le(document.documentElement)||y!=null&&Le(y,l)&&h.push(y)}for(var $=r.visualViewport?r.visualViewport.width:innerWidth,d=r.visualViewport?r.visualViewport.height:innerHeight,b=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,P=e.getBoundingClientRect(),u=P.height,c=P.width,w=P.top,E=P.right,F=P.bottom,O=P.left,_=i==="start"||i==="nearest"?w:i==="end"?F:w+u/2,T=o==="center"?O+c/2:o==="end"?E:O,L=[],M=0;M<h.length;M++){var A=h[M],H=A.getBoundingClientRect(),Z=H.height,U=H.width,x=H.top,S=H.right,R=H.bottom,G=H.left;if(n==="if-needed"&&w>=0&&O>=0&&F<=d&&E<=$&&w>=x&&F<=R&&O>=G&&E<=S)return L;var K=getComputedStyle(A),J=parseInt(K.borderLeftWidth,10),ie=parseInt(K.borderTopWidth,10),Q=parseInt(K.borderRightWidth,10),p=parseInt(K.borderBottomWidth,10),q=0,N=0,W="offsetWidth"in A?A.offsetWidth-A.clientWidth-J-Q:0,B="offsetHeight"in A?A.offsetHeight-A.clientHeight-ie-p:0,X="offsetWidth"in A?A.offsetWidth===0?0:U/A.offsetWidth:0,te="offsetHeight"in A?A.offsetHeight===0?0:Z/A.offsetHeight:0;if(g===A)q=i==="start"?_:i==="end"?_-d:i==="nearest"?Oe(m,m+d,d,ie,p,m+_,m+_+u,u):_-d/2,N=o==="start"?T:o==="center"?T-$/2:o==="end"?T-$:Oe(b,b+$,$,J,Q,b+T,b+T+c,c),q=Math.max(0,q+m),N=Math.max(0,N+b);else{q=i==="start"?_-x-ie:i==="end"?_-R+p+B:i==="nearest"?Oe(x,R,Z,ie,p+B,_,_+u,u):_-(x+Z/2)+B/2,N=o==="start"?T-G-J:o==="center"?T-(G+U/2)+W/2:o==="end"?T-S+Q+W:Oe(G,S,U,J,Q+W,T,T+c,c);var re=A.scrollLeft,ge=A.scrollTop;_+=ge-(q=Math.max(0,Math.min(ge+q/te,A.scrollHeight-Z/te+B))),T+=re-(N=Math.max(0,Math.min(re+N/X,A.scrollWidth-U/X+W)))}L.push({el:A,top:q,left:N})}return L};function ir(e){return e===Object(e)&&Object.keys(e).length!==0}function xn(e,t){t===void 0&&(t="auto");var r="scrollBehavior"in document.body.style;e.forEach(function(n){var i=n.el,o=n.top,a=n.left;i.scroll&&r?i.scroll({top:o,left:a,behavior:t}):(i.scrollTop=o,i.scrollLeft=a)})}function $n(e){return e===!1?{block:"end",inline:"nearest"}:ir(e)?e:{block:"start",inline:"nearest"}}function Fn(e,t){var r=e.isConnected||e.ownerDocument.documentElement.contains(e);if(ir(t)&&typeof t.behavior=="function")return t.behavior(r?vt(e,t):[]);if(r){var n=$n(t);return xn(vt(e,n),n.behavior)}}var pt=1/0,On=17976931348623157e292;function An(e){if(!e)return e===0?e:0;if(e=dn(e),e===pt||e===-pt){var t=e<0?-1:1;return t*On}return e===e?e:0}function Sn(e){var t=An(e),r=t%1;return t===t?r?t-r:t:0}var yt=Object.create,En=(function(){function e(){}return function(t){if(!Ie(t))return{};if(yt)return yt(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Cn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Pn(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function xe(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var l=t[o],s=void 0;s===void 0&&(s=e[l]),i?en(r,l,s):Kt(r,l,s)}return r}function qn(e,t){return tn(rn(e,t,Xt),e+"")}function Tn(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var In=Object.prototype,jn=In.hasOwnProperty;function Mn(e){if(!Ie(e))return Tn(e);var t=Jt(e),r=[];for(var n in e)n=="constructor"&&(t||!jn.call(e,n))||r.push(n);return r}function it(e){return tt(e)?Xr(e,!0):Mn(e)}function _n(e,t,r){var n=e==null?void 0:ke(e,t);return n===void 0?r:n}function Ln(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}function Rn(e,t){return e&&xe(t,Te(t),e)}function Vn(e,t){return e&&xe(t,it(t),e)}var ar=typeof exports=="object"&&exports&&!exports.nodeType&&exports,bt=ar&&typeof module=="object"&&module&&!module.nodeType&&module,Nn=bt&&bt.exports===ar,wt=Nn?on.Buffer:void 0,xt=wt?wt.allocUnsafe:void 0;function Dn(e,t){if(t)return e.slice();var r=e.length,n=xt?xt(r):new e.constructor(r);return e.copy(n),n}function Wn(e,t){return xe(e,Ht(e),t)}var Bn=Object.getOwnPropertySymbols,or=Bn?function(e){for(var t=[];e;)Zr(t,Ht(e)),e=tr(e);return t}:Yr;function Hn(e,t){return xe(e,or(e),t)}function lr(e){return Qr(e,it,or)}var Gn=Object.prototype,zn=Gn.hasOwnProperty;function Un(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&zn.call(e,"index")&&(r.index=e.index,r.input=e.input),r}function at(e){var t=new e.constructor(e.byteLength);return new ct(t).set(new ct(e)),t}function Kn(e,t){var r=t?at(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Xn=/\w*$/;function Yn(e){var t=new e.constructor(e.source,Xn.exec(e));return t.lastIndex=e.lastIndex,t}var $t=mt?mt.prototype:void 0,Ft=$t?$t.valueOf:void 0;function Zn(e){return Ft?Object(Ft.call(e)):{}}function Qn(e,t){var r=t?at(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Jn="[object Boolean]",kn="[object Date]",ei="[object Map]",ti="[object Number]",ri="[object RegExp]",ni="[object Set]",ii="[object String]",ai="[object Symbol]",oi="[object ArrayBuffer]",li="[object DataView]",si="[object Float32Array]",ui="[object Float64Array]",fi="[object Int8Array]",ci="[object Int16Array]",di="[object Int32Array]",mi="[object Uint8Array]",gi="[object Uint8ClampedArray]",hi="[object Uint16Array]",vi="[object Uint32Array]";function pi(e,t,r){var n=e.constructor;switch(t){case oi:return at(e);case Jn:case kn:return new n(+e);case li:return Kn(e,r);case si:case ui:case fi:case ci:case di:case mi:case gi:case hi:case vi:return Qn(e,r);case ei:return new n;case ti:case ii:return new n(e);case ri:return Yn(e);case ni:return new n;case ai:return Zn(e)}}function yi(e){return typeof e.constructor=="function"&&!Jt(e)?En(tr(e)):{}}var bi="[object Map]";function wi(e){return rt(e)&&nt(e)==bi}var Ot=Pe&&Pe.isMap,xi=Ot?kt(Ot):wi,$i="[object Set]";function Fi(e){return rt(e)&&nt(e)==$i}var At=Pe&&Pe.isSet,Oi=At?kt(At):Fi,Ai=1,Si=2,Ei=4,sr="[object Arguments]",Ci="[object Array]",Pi="[object Boolean]",qi="[object Date]",Ti="[object Error]",ur="[object Function]",Ii="[object GeneratorFunction]",ji="[object Map]",Mi="[object Number]",fr="[object Object]",_i="[object RegExp]",Li="[object Set]",Ri="[object String]",Vi="[object Symbol]",Ni="[object WeakMap]",Di="[object ArrayBuffer]",Wi="[object DataView]",Bi="[object Float32Array]",Hi="[object Float64Array]",Gi="[object Int8Array]",zi="[object Int16Array]",Ui="[object Int32Array]",Ki="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Yi="[object Uint16Array]",Zi="[object Uint32Array]",D={};D[sr]=D[Ci]=D[Di]=D[Wi]=D[Pi]=D[qi]=D[Bi]=D[Hi]=D[Gi]=D[zi]=D[Ui]=D[ji]=D[Mi]=D[fr]=D[_i]=D[Li]=D[Ri]=D[Vi]=D[Ki]=D[Xi]=D[Yi]=D[Zi]=!0;D[Ti]=D[ur]=D[Ni]=!1;function pe(e,t,r,n,i,o){var a,l=t&Ai,s=t&Si,v=t&Ei;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!Ie(e))return e;var f=er(e);if(f){if(a=Un(e),!l)return Cn(e,a)}else{var g=nt(e),h=g==ur||g==Ii;if(ln(e))return Dn(e,l);if(g==fr||g==sr||h&&!i){if(a=s||h?{}:yi(e),!l)return s?Hn(e,Vn(a,e)):Wn(e,Rn(a,e))}else{if(!D[g])return i?e:{};a=pi(e,g,l)}}o||(o=new Gt);var y=o.get(e);if(y)return y;o.set(e,a),Oi(e)?e.forEach(function(b){a.add(pe(b,t,r,b,e,o))}):xi(e)&&e.forEach(function(b,m){a.set(m,pe(b,t,r,m,e,o))});var $=v?s?lr:Jr:s?it:Te,d=f?void 0:$(e);return Pn(d||e,function(b,m){d&&(m=b,b=e[m]),Kt(a,m,pe(b,t,r,m,e,o))}),a}var Qi=1,Ji=4;function Se(e){return pe(e,Qi|Ji)}var ki=1,ea=2;function ta(e,t,r,n){var i=r.length,o=i;if(e==null)return!o;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=r[i];var l=a[0],s=e[l],v=a[1];if(a[2]){if(s===void 0&&!(l in e))return!1}else{var f=new Gt,g;if(!(g===void 0?zt(v,s,ki|ea,n,f):g))return!1}}return!0}function cr(e){return e===e&&!Ie(e)}function ra(e){for(var t=Te(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,cr(i)]}return t}function dr(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function na(e){var t=ra(e);return t.length==1&&t[0][2]?dr(t[0][0],t[0][1]):function(r){return r===e||ta(r,e,t)}}var ia=1,aa=2;function oa(e,t){return Yt(e)&&cr(t)?dr(et(e),t):function(r){var n=_n(r,e);return n===void 0&&n===t?nn(r,e):zt(t,n,ia|aa)}}function la(e){return function(t){return t?.[e]}}function sa(e){return function(t){return ke(t,e)}}function ua(e){return Yt(e)?la(et(e)):sa(e)}function mr(e){return typeof e=="function"?e:e==null?Xt:typeof e=="object"?er(e)?oa(e[0],e[1]):na(e):ua(e)}function fa(e){return rt(e)&&tt(e)}function ca(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function da(e){return function(t,r,n){var i=Object(t);if(!tt(t)){var o=mr(r);t=Te(t),r=function(l){return o(i[l],l,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}var ma=Math.max;function ga(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:Sn(r);return i<0&&(i=ma(n+i,0)),fn(e,mr(t),i)}var ha=da(ga),va=Math.min;function pa(e,t,r){for(var n=cn,i=e[0].length,o=e.length,a=o,l=Array(o),s=1/0,v=[];a--;){var f=e[a];s=va(f.length,s),l[a]=i>=120&&f.length>=120?new kr(a&&f):void 0}f=e[0];var g=-1,h=l[0];e:for(;++g<i&&v.length<s;){var y=f[g],$=y;if(y=y!==0?y:0,!(h?dt(h,$):n(v,$))){for(a=o;--a;){var d=l[a];if(!(d?dt(d,$):n(e[a],$)))continue e}h&&h.push($),v.push(y)}}return v}function ya(e){return fa(e)?e:[]}var ba=qn(function(e){var t=Zt(e,ya);return t.length&&t[0]===e[0]?pa(t):[]});function wa(e,t){return t.length<2?e:ke(e,Ln(t,0,-1))}var xa=Object.prototype,$a=xa.hasOwnProperty;function Fa(e,t){t=Qt(t,e);var r=-1,n=t.length;if(!n)return!0;for(var i=e==null||typeof e!="object"&&typeof e!="function";++r<n;){var o=t[r];if(typeof o=="string"){if(o==="__proto__"&&!$a.call(e,"__proto__"))return!1;if(o==="constructor"&&r+1<n&&typeof t[r+1]=="string"&&t[r+1]==="prototype"){if(i&&r===0)continue;return!1}}}var a=wa(e,t);return a==null||delete a[et(ca(t))]}function Oa(e){return sn(e)?void 0:e}var Aa=1,Sa=2,Ea=4,Ca=an(function(e,t){var r={};if(e==null)return r;var n=!1;t=Zt(t,function(o){return o=Qt(o,e),n||(n=o.length>1),o}),xe(e,lr(e),r),n&&(r=pe(r,Aa|Sa|Ea,Oa));for(var i=t.length;i--;)Fa(r,t[i]);return r}),Pa={};function se(){return se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},se.apply(this,arguments)}function qa(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,we(e,t)}function Ge(e){return Ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ge(e)}function we(e,t){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},we(e,t)}function Ta(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ee(e,t,r){return Ta()?Ee=Reflect.construct.bind():Ee=function(i,o,a){var l=[null];l.push.apply(l,o);var s=Function.bind.apply(i,l),v=new s;return a&&we(v,a.prototype),v},Ee.apply(null,arguments)}function Ia(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function ze(e){var t=typeof Map=="function"?new Map:void 0;return ze=function(n){if(n===null||!Ia(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return Ee(n,arguments,Ge(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),we(i,n)},ze(e)}var ja=/%[sdj%]/g,gr=function(){};typeof process<"u"&&Pa&&typeof window<"u"&&typeof document<"u"&&(gr=function(t,r){typeof console<"u"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING>"u"&&r.every(function(n){return typeof n=="string"})&&console.warn(t,r)});function Ue(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function ee(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,o=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var a=e.replace(ja,function(l){if(l==="%%")return"%";if(i>=o)return l;switch(l){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return l}});return a}return e}function Ma(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function z(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Ma(t)&&typeof e=="string"&&!e)}function _a(e,t,r){var n=[],i=0,o=e.length;function a(l){n.push.apply(n,l||[]),i++,i===o&&r(n)}e.forEach(function(l){t(l,a)})}function St(e,t,r){var n=0,i=e.length;function o(a){if(a&&a.length){r(a);return}var l=n;n=n+1,l<i?t(e[l],o):r([])}o([])}function La(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,e[r]||[])}),t}var Et=(function(e){qa(t,e);function t(r,n){var i;return i=e.call(this,"Async Validation Error")||this,i.errors=r,i.fields=n,i}return t})(ze(Error));function Ra(e,t,r,n,i){if(t.first){var o=new Promise(function(h,y){var $=function(m){return n(m),m.length?y(new Et(m,Ue(m))):h(i)},d=La(e);St(d,r,$)});return o.catch(function(h){return h}),o}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),s=l.length,v=0,f=[],g=new Promise(function(h,y){var $=function(b){if(f.push.apply(f,b),v++,v===s)return n(f),f.length?y(new Et(f,Ue(f))):h(i)};l.length||(n(f),h(i)),l.forEach(function(d){var b=e[d];a.indexOf(d)!==-1?St(b,r,$):_a(b,r,$)})});return g.catch(function(h){return h}),g}function Va(e){return!!(e&&e.message!==void 0)}function Na(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Ct(e,t){return function(r){var n;return e.fullFields?n=Na(t,e.fullFields):n=t[r.field||e.fullField],Va(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function Pt(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];typeof n=="object"&&typeof e[r]=="object"?e[r]=se({},e[r],n):e[r]=n}}return e}var hr=function(t,r,n,i,o,a){t.required&&(!n.hasOwnProperty(t.field)||z(r,a||t.type))&&i.push(ee(o.messages.required,t.fullField))},Da=function(t,r,n,i,o){(/^\s+$/.test(r)||r==="")&&i.push(ee(o.messages.whitespace,t.fullField))},Ae,Wa=(function(){if(Ae)return Ae;var e="[a-fA-F\\d:]",t=function(c){return c&&c.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=(`
2
2
  (?:
3
3
  (?:`+n+":){7}(?:"+n+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
4
4
  (?:`+n+":){6}(?:"+r+"|:"+n+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
@@ -1 +1 @@
1
- import{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-Bg1RsfAJ.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-CcLDjTgI.js";import{B as ut}from"./index-DOIeo8Qs.js";import{R as ct}from"./icons-DP3uiYxy.js";import"./initDefaultProps-B3H1sf95.js";import"./index-JVwNC4yP.js";import"./isVisible-C7tPsqfj.js";import"./useState-BK4hy8Ma.js";import"./raf-Deuc0E8-.js";import"./devWarning-gaA8VqZf.js";import"./compact-item-DnT3XzME.js";import"./createContext-ECZfCCqd.js";import"./Compact-Bj_BLBpw.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-CM1idCUO.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-DBq6xzDm.js";import{B as ut}from"./index-DuiRwSJ_.js";import{R as ct}from"./icons-DP3uiYxy.js";import"./initDefaultProps-DozNsdEE.js";import"./index-BV5N_JGL.js";import"./isVisible-C7tPsqfj.js";import"./useState-BK4hy8Ma.js";import"./raf-Deuc0E8-.js";import"./devWarning-DwewKXVi.js";import"./compact-item-BhlUVQn4.js";import"./createContext-BAKscpCQ.js";import"./Compact-CP9f3DZt.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,4 +1,4 @@
1
- import{l as te,m as le,K as ie,h as s,r as E,am as se,G as m,Z as I,a0 as A,P as ce,a8 as de,q as K,L as ue,w as be,J as ve,i as N,f as D}from"./index-Bg1RsfAJ.js";import{d as X,i as fe,b as S,e as he,f as me,o as pe,c as k,r as w,w as U,p as ge}from"./vendor-BvqAck49.js";import{V as xe}from"./Checkbox-CJrXPCJH.js";import{u as L,F as Ce}from"./FormItemContext-CAk4CXid.js";const $e=new ie("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ye=e=>{const{checkboxCls:a}=e,n=`${a}-wrapper`;return[{[`${a}-group`]:s(s({},E(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:s(s({},E(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[a]:s(s({},E(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${a}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${a}-inner`]:s({},se(e))},[`${a}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[a]:{"&-indeterminate":{[`${a}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${a}:after`]:{visibility:"visible"},[`
1
+ import{l as te,m as le,K as ie,h as s,r as E,am as se,G as m,Z as I,a0 as A,P as ce,a8 as de,q as K,L as ue,w as be,J as ve,i as N,f as D}from"./index-CM1idCUO.js";import{d as X,i as fe,b as S,e as he,f as me,o as pe,c as k,r as w,w as U,p as ge}from"./vendor-BvqAck49.js";import{V as xe}from"./Checkbox-CJxO-pD5.js";import{u as L,F as Ce}from"./FormItemContext-BbW5tEzw.js";const $e=new ie("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ye=e=>{const{checkboxCls:a}=e,n=`${a}-wrapper`;return[{[`${a}-group`]:s(s({},E(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:s(s({},E(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[a]:s(s({},E(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${a}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${a}-inner`]:s({},se(e))},[`${a}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[a]:{"&-indeterminate":{[`${a}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${a}:after`]:{visibility:"visible"},[`
2
2
  ${n}:not(${n}-disabled),
3
3
  ${a}:not(${a}-disabled)
4
4
  `]:{[`&:hover ${a}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${a}-checked:not(${a}-disabled) ${a}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${a}-checked:not(${a}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${a}-checked`]:{[`${a}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:$e,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[`
@@ -1 +1 @@
1
- import{P as So,H as Z,h as e,l as Co,m as U,n as xo,q as io,I as Bo,J as ao,L as Eo,f as H}from"./index-Bg1RsfAJ.js";import{d as X,c as g,a6 as To,n as Io,a as Ho,b as h,w as wo,e as zo,o as Po,q as Do,f as Ao,s as w,T as Oo}from"./vendor-BvqAck49.js";import{W as Ro}from"./index-JVwNC4yP.js";import{d as co}from"./devWarning-gaA8VqZf.js";import{L as k}from"./icons-DP3uiYxy.js";import{g as Wo}from"./compact-item-DnT3XzME.js";import{c as Lo}from"./createContext-ECZfCCqd.js";import{u as _o}from"./Compact-Bj_BLBpw.js";import{i as Mo}from"./initDefaultProps-B3H1sf95.js";function yr(o){return o==="danger"?{danger:!0}:{type:o}}const No=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:So.any,href:String,target:String,title:String,onClick:Z(),onMousedown:Z()}),oo=o=>{o&&(o.style.width="0px",o.style.opacity="0",o.style.transform="scale(0)")},ro=o=>{Io(()=>{o&&(o.style.width=`${o.scrollWidth}px`,o.style.opacity="1",o.style.transform="scale(1)")})},eo=o=>{o&&o.style&&(o.style.width=null,o.style.opacity=null,o.style.transform=null)},jo=X({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(o){return()=>{const{existIcon:r,prefixCls:l,loading:n}=o;if(r)return g("span",{class:`${l}-loading-icon`},[g(k,null,null)]);const i=!!n;return g(To,{name:`${l}-loading-icon-motion`,onBeforeEnter:oo,onEnter:ro,onAfterEnter:eo,onBeforeLeave:ro,onLeave:a=>{setTimeout(()=>{oo(a)})},onAfterLeave:eo},{default:()=>[i?g("span",{class:`${l}-loading-icon`},[g(k,null,null)]):null]})}}}),to=(o,r)=>({[`> span, > ${o}`]:{"&:not(:last-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineEndColor:r}}},"&:not(:first-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineStartColor:r}}}}}),Go=o=>{const{componentCls:r,fontSize:l,lineWidth:n,colorPrimaryHover:i,colorErrorHover:a}=o;return{[`${r}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${r}`]:{"&:not(:last-child)":{[`&, & > ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-n,[`&, & > ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[r]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${r}-icon-only`]:{fontSize:l}},to(`${r}-primary`,i),to(`${r}-danger`,a)]}};function Vo(o,r){return{[`&-item:not(${r}-last-item)`]:{marginBottom:-o.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Uo(o,r){return{[`&-item:not(${r}-first-item):not(${r}-last-item)`]:{borderRadius:0},[`&-item${r}-first-item:not(${r}-last-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${r}-last-item:not(${r}-first-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Xo(o){const r=`${o.componentCls}-compact-vertical`;return{[r]:e(e({},Vo(o,r)),Uo(o.componentCls,r))}}const qo=o=>{const{componentCls:r,iconCls:l}=o;return{[r]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${o.lineWidth}px ${o.lineType} transparent`,cursor:"pointer",transition:`all ${o.motionDurationMid} ${o.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:o.lineHeight,color:o.colorText,"> span":{display:"inline-block"},[`> ${l} + span, > span + ${l}`]:{marginInlineStart:o.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":e({},xo(o)),[`&-icon-only${r}-compact-item`]:{flex:"none"},[`&-compact-item${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:o.lineWidth,height:`calc(100% + ${o.lineWidth*2}px)`,backgroundColor:o.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-vertical-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:`calc(100% + ${o.lineWidth*2}px)`,height:o.lineWidth,backgroundColor:o.colorPrimaryHover,content:'""'}}}}}}},f=(o,r)=>({"&:not(:disabled)":{"&:hover":o,"&:active":r}}),Fo=o=>({minWidth:o.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Jo=o=>({borderRadius:o.controlHeight,paddingInlineStart:o.controlHeight/2,paddingInlineEnd:o.controlHeight/2}),V=o=>({cursor:"not-allowed",borderColor:o.colorBorder,color:o.colorTextDisabled,backgroundColor:o.colorBgContainerDisabled,boxShadow:"none"}),P=(o,r,l,n,i,a,d)=>({[`&${o}-background-ghost`]:e(e({color:r||void 0,backgroundColor:"transparent",borderColor:l||void 0,boxShadow:"none"},f(e({backgroundColor:"transparent"},a),e({backgroundColor:"transparent"},d))),{"&:disabled":{cursor:"not-allowed",color:n||void 0,borderColor:i||void 0}})}),q=o=>({"&:disabled":e({},V(o))}),so=o=>e({},q(o)),D=o=>({"&:disabled":{cursor:"not-allowed",color:o.colorTextDisabled}}),uo=o=>e(e(e(e(e({},so(o)),{backgroundColor:o.colorBgContainer,borderColor:o.colorBorder,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlTmpOutline}`}),f({color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),P(o.componentCls,o.colorBgContainer,o.colorBgContainer,o.colorTextDisabled,o.colorBorder)),{[`&${o.componentCls}-dangerous`]:e(e(e({color:o.colorError,borderColor:o.colorError},f({color:o.colorErrorHover,borderColor:o.colorErrorBorderHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder)),q(o))}),Ko=o=>e(e(e(e(e({},so(o)),{color:o.colorTextLightSolid,backgroundColor:o.colorPrimary,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlOutline}`}),f({color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryHover},{color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryActive})),P(o.componentCls,o.colorPrimary,o.colorPrimary,o.colorTextDisabled,o.colorBorder,{color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),{[`&${o.componentCls}-dangerous`]:e(e(e({backgroundColor:o.colorError,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.colorErrorOutline}`},f({backgroundColor:o.colorErrorHover},{backgroundColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder,{color:o.colorErrorHover,borderColor:o.colorErrorHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),q(o))}),Qo=o=>e(e({},uo(o)),{borderStyle:"dashed"}),Yo=o=>e(e(e({color:o.colorLink},f({color:o.colorLinkHover},{color:o.colorLinkActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},f({color:o.colorErrorHover},{color:o.colorErrorActive})),D(o))}),Zo=o=>e(e(e({},f({color:o.colorText,backgroundColor:o.colorBgTextHover},{color:o.colorText,backgroundColor:o.colorBgTextActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},D(o)),f({color:o.colorErrorHover,backgroundColor:o.colorErrorBg},{color:o.colorErrorHover,backgroundColor:o.colorErrorBg}))}),ko=o=>e(e({},V(o)),{[`&${o.componentCls}:hover`]:e({},V(o))}),or=o=>{const{componentCls:r}=o;return{[`${r}-default`]:uo(o),[`${r}-primary`]:Ko(o),[`${r}-dashed`]:Qo(o),[`${r}-link`]:Yo(o),[`${r}-text`]:Zo(o),[`${r}-disabled`]:ko(o)}},F=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:l,iconCls:n,controlHeight:i,fontSize:a,lineHeight:d,lineWidth:c,borderRadius:p,buttonPaddingHorizontal:O}=o,x=Math.max(0,(i-a*d)/2-c),R=O-c,y=`${l}-icon-only`;return[{[`${l}${r}`]:{fontSize:a,height:i,padding:`${x}px ${R}px`,borderRadius:p,[`&${y}`]:{width:i,paddingInlineStart:0,paddingInlineEnd:0,[`&${l}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${l}-loading`]:{opacity:o.opacityLoading,cursor:"default"},[`${l}-loading-icon`]:{transition:`width ${o.motionDurationSlow} ${o.motionEaseInOut}, opacity ${o.motionDurationSlow} ${o.motionEaseInOut}`},[`&:not(${y}) ${l}-loading-icon > ${n}`]:{marginInlineEnd:o.marginXS}}},{[`${l}${l}-circle${r}`]:Fo(o)},{[`${l}${l}-round${r}`]:Jo(o)}]},rr=o=>F(o),er=o=>{const r=U(o,{controlHeight:o.controlHeightSM,padding:o.paddingXS,buttonPaddingHorizontal:8,borderRadius:o.borderRadiusSM});return F(r,`${o.componentCls}-sm`)},tr=o=>{const r=U(o,{controlHeight:o.controlHeightLG,fontSize:o.fontSizeLG,borderRadius:o.borderRadiusLG});return F(r,`${o.componentCls}-lg`)},lr=o=>{const{componentCls:r}=o;return{[r]:{[`&${r}-block`]:{width:"100%"}}}},nr=Co("Button",o=>{const{controlTmpOutline:r,paddingContentHorizontal:l}=o,n=U(o,{colorOutlineDefault:r,buttonPaddingHorizontal:l});return[qo(n),er(n),rr(n),tr(n),lr(n),or(n),Go(n),Wo(o,{focus:!1}),Xo(o)]}),ir=()=>({prefixCls:String,size:{type:String}}),go=Lo(),A=X({compatConfig:{MODE:3},name:"AButtonGroup",props:ir(),setup(o,r){let{slots:l}=r;const{prefixCls:n,direction:i}=io("btn-group",o),[,,a]=Bo();go.useProvide(Ho({size:h(()=>o.size)}));const d=h(()=>{const{size:c}=o;let p="";switch(c){case"large":p="lg";break;case"small":p="sm";break;case"middle":case void 0:break;default:co(!c,"Button.Group","Invalid prop `size`.")}return{[`${n.value}`]:!0,[`${n.value}-${p}`]:p,[`${n.value}-rtl`]:i.value==="rtl",[a.value]:!0}});return()=>{var c;return g("div",{class:d.value},[ao((c=l.default)===null||c===void 0?void 0:c.call(l))])}}}),lo=/^[\u4e00-\u9fa5]{2}$/,no=lo.test.bind(lo);function z(o){return o==="text"||o==="link"}const C=X({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Mo(No(),{type:"default"}),slots:Object,setup(o,r){let{slots:l,attrs:n,emit:i,expose:a}=r;const{prefixCls:d,autoInsertSpaceInButton:c,direction:p,size:O}=io("btn",o),[x,R]=nr(d),y=go.useInject(),mo=Eo(),W=h(()=>{var t;return(t=o.disabled)!==null&&t!==void 0?t:mo.value}),$=w(null),B=w(void 0);let L=!1;const v=w(!1),S=w(!1),J=h(()=>c.value!==!1),{compactSize:po,compactItemClassnames:bo}=_o(d,p),_=h(()=>typeof o.loading=="object"&&o.loading.delay?o.loading.delay||!0:!!o.loading);wo(_,t=>{clearTimeout(B.value),typeof _.value=="number"?B.value=setTimeout(()=>{v.value=t},_.value):v.value=t},{immediate:!0});const fo=h(()=>{const{type:t,shape:u="default",ghost:b,block:m,danger:M}=o,s=d.value,E={large:"lg",small:"sm",middle:void 0},T=po.value||y?.size||O.value,I=T&&E[T]||"";return[bo.value,{[R.value]:!0,[`${s}`]:!0,[`${s}-${u}`]:u!=="default"&&u,[`${s}-${t}`]:t,[`${s}-${I}`]:I,[`${s}-loading`]:v.value,[`${s}-background-ghost`]:b&&!z(t),[`${s}-two-chinese-chars`]:S.value&&J.value,[`${s}-block`]:m,[`${s}-dangerous`]:!!M,[`${s}-rtl`]:p.value==="rtl"}]}),K=()=>{const t=$.value;if(!t||c.value===!1)return;const u=t.textContent;L&&no(u)?S.value||(S.value=!0):S.value&&(S.value=!1)},vo=t=>{if(v.value||W.value){t.preventDefault();return}i("click",t)},yo=t=>{i("mousedown",t)},ho=(t,u)=>{const b=u?" ":"";if(t.type===Oo){let m=t.children.trim();return no(m)&&(m=m.split("").join(b)),g("span",null,[m])}return t};return zo(()=>{co(!(o.ghost&&z(o.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Po(K),Do(K),Ao(()=>{B.value&&clearTimeout(B.value)}),a({focus:()=>{var t;(t=$.value)===null||t===void 0||t.focus()},blur:()=>{var t;(t=$.value)===null||t===void 0||t.blur()}}),()=>{var t,u;const{icon:b=(t=l.icon)===null||t===void 0?void 0:t.call(l)}=o,m=ao((u=l.default)===null||u===void 0?void 0:u.call(l));L=m.length===1&&!b&&!z(o.type);const{type:M,htmlType:s,href:E,title:T,target:I}=o,$o=v.value?"loading":b,N=e(e({},n),{title:T,disabled:W.value,class:[fo.value,n.class,{[`${d.value}-icon-only`]:m.length===0&&!!$o}],onClick:vo,onMousedown:yo});W.value||delete N.disabled;const Q=b&&!v.value?b:g(jo,{existIcon:!!b,prefixCls:d.value,loading:!!v.value},null),Y=m.map(G=>ho(G,L&&J.value));if(E!==void 0)return x(g("a",H(H({},N),{},{href:E,target:I,ref:$}),[Q,Y]));let j=g("button",H(H({},N),{},{ref:$,type:s}),[Q,Y]);if(!z(M)){const G=(function(){return j})();j=g(Ro,{ref:"wave",disabled:!!v.value},{default:()=>[G]})}return x(j)}}});C.Group=A;C.install=function(o){return o.component(C.name,C),o.component(A.name,A),o};const hr=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:A,default:C},Symbol.toStringTag,{value:"Module"}));export{C as B,No as b,yr as c,hr as i};
1
+ import{P as So,H as Z,h as e,l as Co,m as U,n as xo,q as io,I as Bo,J as ao,L as Eo,f as H}from"./index-CM1idCUO.js";import{d as X,c as g,a6 as To,n as Io,a as Ho,b as h,w as wo,e as zo,o as Po,q as Do,f as Ao,s as w,T as Oo}from"./vendor-BvqAck49.js";import{W as Ro}from"./index-BV5N_JGL.js";import{d as co}from"./devWarning-DwewKXVi.js";import{L as k}from"./icons-DP3uiYxy.js";import{g as Wo}from"./compact-item-BhlUVQn4.js";import{c as Lo}from"./createContext-BAKscpCQ.js";import{u as _o}from"./Compact-CP9f3DZt.js";import{i as Mo}from"./initDefaultProps-DozNsdEE.js";function yr(o){return o==="danger"?{danger:!0}:{type:o}}const No=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:So.any,href:String,target:String,title:String,onClick:Z(),onMousedown:Z()}),oo=o=>{o&&(o.style.width="0px",o.style.opacity="0",o.style.transform="scale(0)")},ro=o=>{Io(()=>{o&&(o.style.width=`${o.scrollWidth}px`,o.style.opacity="1",o.style.transform="scale(1)")})},eo=o=>{o&&o.style&&(o.style.width=null,o.style.opacity=null,o.style.transform=null)},jo=X({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(o){return()=>{const{existIcon:r,prefixCls:l,loading:n}=o;if(r)return g("span",{class:`${l}-loading-icon`},[g(k,null,null)]);const i=!!n;return g(To,{name:`${l}-loading-icon-motion`,onBeforeEnter:oo,onEnter:ro,onAfterEnter:eo,onBeforeLeave:ro,onLeave:a=>{setTimeout(()=>{oo(a)})},onAfterLeave:eo},{default:()=>[i?g("span",{class:`${l}-loading-icon`},[g(k,null,null)]):null]})}}}),to=(o,r)=>({[`> span, > ${o}`]:{"&:not(:last-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineEndColor:r}}},"&:not(:first-child)":{[`&, & > ${o}`]:{"&:not(:disabled)":{borderInlineStartColor:r}}}}}),Go=o=>{const{componentCls:r,fontSize:l,lineWidth:n,colorPrimaryHover:i,colorErrorHover:a}=o;return{[`${r}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${r}`]:{"&:not(:last-child)":{[`&, & > ${r}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-n,[`&, & > ${r}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[r]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${r}-icon-only`]:{fontSize:l}},to(`${r}-primary`,i),to(`${r}-danger`,a)]}};function Vo(o,r){return{[`&-item:not(${r}-last-item)`]:{marginBottom:-o.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function Uo(o,r){return{[`&-item:not(${r}-first-item):not(${r}-last-item)`]:{borderRadius:0},[`&-item${r}-first-item:not(${r}-last-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${r}-last-item:not(${r}-first-item)`]:{[`&, &${o}-sm, &${o}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function Xo(o){const r=`${o.componentCls}-compact-vertical`;return{[r]:e(e({},Vo(o,r)),Uo(o.componentCls,r))}}const qo=o=>{const{componentCls:r,iconCls:l}=o;return{[r]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${o.lineWidth}px ${o.lineType} transparent`,cursor:"pointer",transition:`all ${o.motionDurationMid} ${o.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:o.lineHeight,color:o.colorText,"> span":{display:"inline-block"},[`> ${l} + span, > span + ${l}`]:{marginInlineStart:o.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":e({},xo(o)),[`&-icon-only${r}-compact-item`]:{flex:"none"},[`&-compact-item${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:o.lineWidth,height:`calc(100% + ${o.lineWidth*2}px)`,backgroundColor:o.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${r}-primary`]:{[`&:not([disabled]) + ${r}-compact-vertical-item${r}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-o.lineWidth,insetInlineStart:-o.lineWidth,display:"inline-block",width:`calc(100% + ${o.lineWidth*2}px)`,height:o.lineWidth,backgroundColor:o.colorPrimaryHover,content:'""'}}}}}}},f=(o,r)=>({"&:not(:disabled)":{"&:hover":o,"&:active":r}}),Fo=o=>({minWidth:o.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),Jo=o=>({borderRadius:o.controlHeight,paddingInlineStart:o.controlHeight/2,paddingInlineEnd:o.controlHeight/2}),V=o=>({cursor:"not-allowed",borderColor:o.colorBorder,color:o.colorTextDisabled,backgroundColor:o.colorBgContainerDisabled,boxShadow:"none"}),P=(o,r,l,n,i,a,d)=>({[`&${o}-background-ghost`]:e(e({color:r||void 0,backgroundColor:"transparent",borderColor:l||void 0,boxShadow:"none"},f(e({backgroundColor:"transparent"},a),e({backgroundColor:"transparent"},d))),{"&:disabled":{cursor:"not-allowed",color:n||void 0,borderColor:i||void 0}})}),q=o=>({"&:disabled":e({},V(o))}),so=o=>e({},q(o)),D=o=>({"&:disabled":{cursor:"not-allowed",color:o.colorTextDisabled}}),uo=o=>e(e(e(e(e({},so(o)),{backgroundColor:o.colorBgContainer,borderColor:o.colorBorder,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlTmpOutline}`}),f({color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),P(o.componentCls,o.colorBgContainer,o.colorBgContainer,o.colorTextDisabled,o.colorBorder)),{[`&${o.componentCls}-dangerous`]:e(e(e({color:o.colorError,borderColor:o.colorError},f({color:o.colorErrorHover,borderColor:o.colorErrorBorderHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder)),q(o))}),Ko=o=>e(e(e(e(e({},so(o)),{color:o.colorTextLightSolid,backgroundColor:o.colorPrimary,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.controlOutline}`}),f({color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryHover},{color:o.colorTextLightSolid,backgroundColor:o.colorPrimaryActive})),P(o.componentCls,o.colorPrimary,o.colorPrimary,o.colorTextDisabled,o.colorBorder,{color:o.colorPrimaryHover,borderColor:o.colorPrimaryHover},{color:o.colorPrimaryActive,borderColor:o.colorPrimaryActive})),{[`&${o.componentCls}-dangerous`]:e(e(e({backgroundColor:o.colorError,boxShadow:`0 ${o.controlOutlineWidth}px 0 ${o.colorErrorOutline}`},f({backgroundColor:o.colorErrorHover},{backgroundColor:o.colorErrorActive})),P(o.componentCls,o.colorError,o.colorError,o.colorTextDisabled,o.colorBorder,{color:o.colorErrorHover,borderColor:o.colorErrorHover},{color:o.colorErrorActive,borderColor:o.colorErrorActive})),q(o))}),Qo=o=>e(e({},uo(o)),{borderStyle:"dashed"}),Yo=o=>e(e(e({color:o.colorLink},f({color:o.colorLinkHover},{color:o.colorLinkActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},f({color:o.colorErrorHover},{color:o.colorErrorActive})),D(o))}),Zo=o=>e(e(e({},f({color:o.colorText,backgroundColor:o.colorBgTextHover},{color:o.colorText,backgroundColor:o.colorBgTextActive})),D(o)),{[`&${o.componentCls}-dangerous`]:e(e({color:o.colorError},D(o)),f({color:o.colorErrorHover,backgroundColor:o.colorErrorBg},{color:o.colorErrorHover,backgroundColor:o.colorErrorBg}))}),ko=o=>e(e({},V(o)),{[`&${o.componentCls}:hover`]:e({},V(o))}),or=o=>{const{componentCls:r}=o;return{[`${r}-default`]:uo(o),[`${r}-primary`]:Ko(o),[`${r}-dashed`]:Qo(o),[`${r}-link`]:Yo(o),[`${r}-text`]:Zo(o),[`${r}-disabled`]:ko(o)}},F=function(o){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:l,iconCls:n,controlHeight:i,fontSize:a,lineHeight:d,lineWidth:c,borderRadius:p,buttonPaddingHorizontal:O}=o,x=Math.max(0,(i-a*d)/2-c),R=O-c,y=`${l}-icon-only`;return[{[`${l}${r}`]:{fontSize:a,height:i,padding:`${x}px ${R}px`,borderRadius:p,[`&${y}`]:{width:i,paddingInlineStart:0,paddingInlineEnd:0,[`&${l}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${l}-loading`]:{opacity:o.opacityLoading,cursor:"default"},[`${l}-loading-icon`]:{transition:`width ${o.motionDurationSlow} ${o.motionEaseInOut}, opacity ${o.motionDurationSlow} ${o.motionEaseInOut}`},[`&:not(${y}) ${l}-loading-icon > ${n}`]:{marginInlineEnd:o.marginXS}}},{[`${l}${l}-circle${r}`]:Fo(o)},{[`${l}${l}-round${r}`]:Jo(o)}]},rr=o=>F(o),er=o=>{const r=U(o,{controlHeight:o.controlHeightSM,padding:o.paddingXS,buttonPaddingHorizontal:8,borderRadius:o.borderRadiusSM});return F(r,`${o.componentCls}-sm`)},tr=o=>{const r=U(o,{controlHeight:o.controlHeightLG,fontSize:o.fontSizeLG,borderRadius:o.borderRadiusLG});return F(r,`${o.componentCls}-lg`)},lr=o=>{const{componentCls:r}=o;return{[r]:{[`&${r}-block`]:{width:"100%"}}}},nr=Co("Button",o=>{const{controlTmpOutline:r,paddingContentHorizontal:l}=o,n=U(o,{colorOutlineDefault:r,buttonPaddingHorizontal:l});return[qo(n),er(n),rr(n),tr(n),lr(n),or(n),Go(n),Wo(o,{focus:!1}),Xo(o)]}),ir=()=>({prefixCls:String,size:{type:String}}),go=Lo(),A=X({compatConfig:{MODE:3},name:"AButtonGroup",props:ir(),setup(o,r){let{slots:l}=r;const{prefixCls:n,direction:i}=io("btn-group",o),[,,a]=Bo();go.useProvide(Ho({size:h(()=>o.size)}));const d=h(()=>{const{size:c}=o;let p="";switch(c){case"large":p="lg";break;case"small":p="sm";break;case"middle":case void 0:break;default:co(!c,"Button.Group","Invalid prop `size`.")}return{[`${n.value}`]:!0,[`${n.value}-${p}`]:p,[`${n.value}-rtl`]:i.value==="rtl",[a.value]:!0}});return()=>{var c;return g("div",{class:d.value},[ao((c=l.default)===null||c===void 0?void 0:c.call(l))])}}}),lo=/^[\u4e00-\u9fa5]{2}$/,no=lo.test.bind(lo);function z(o){return o==="text"||o==="link"}const C=X({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:Mo(No(),{type:"default"}),slots:Object,setup(o,r){let{slots:l,attrs:n,emit:i,expose:a}=r;const{prefixCls:d,autoInsertSpaceInButton:c,direction:p,size:O}=io("btn",o),[x,R]=nr(d),y=go.useInject(),mo=Eo(),W=h(()=>{var t;return(t=o.disabled)!==null&&t!==void 0?t:mo.value}),$=w(null),B=w(void 0);let L=!1;const v=w(!1),S=w(!1),J=h(()=>c.value!==!1),{compactSize:po,compactItemClassnames:bo}=_o(d,p),_=h(()=>typeof o.loading=="object"&&o.loading.delay?o.loading.delay||!0:!!o.loading);wo(_,t=>{clearTimeout(B.value),typeof _.value=="number"?B.value=setTimeout(()=>{v.value=t},_.value):v.value=t},{immediate:!0});const fo=h(()=>{const{type:t,shape:u="default",ghost:b,block:m,danger:M}=o,s=d.value,E={large:"lg",small:"sm",middle:void 0},T=po.value||y?.size||O.value,I=T&&E[T]||"";return[bo.value,{[R.value]:!0,[`${s}`]:!0,[`${s}-${u}`]:u!=="default"&&u,[`${s}-${t}`]:t,[`${s}-${I}`]:I,[`${s}-loading`]:v.value,[`${s}-background-ghost`]:b&&!z(t),[`${s}-two-chinese-chars`]:S.value&&J.value,[`${s}-block`]:m,[`${s}-dangerous`]:!!M,[`${s}-rtl`]:p.value==="rtl"}]}),K=()=>{const t=$.value;if(!t||c.value===!1)return;const u=t.textContent;L&&no(u)?S.value||(S.value=!0):S.value&&(S.value=!1)},vo=t=>{if(v.value||W.value){t.preventDefault();return}i("click",t)},yo=t=>{i("mousedown",t)},ho=(t,u)=>{const b=u?" ":"";if(t.type===Oo){let m=t.children.trim();return no(m)&&(m=m.split("").join(b)),g("span",null,[m])}return t};return zo(()=>{co(!(o.ghost&&z(o.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Po(K),Do(K),Ao(()=>{B.value&&clearTimeout(B.value)}),a({focus:()=>{var t;(t=$.value)===null||t===void 0||t.focus()},blur:()=>{var t;(t=$.value)===null||t===void 0||t.blur()}}),()=>{var t,u;const{icon:b=(t=l.icon)===null||t===void 0?void 0:t.call(l)}=o,m=ao((u=l.default)===null||u===void 0?void 0:u.call(l));L=m.length===1&&!b&&!z(o.type);const{type:M,htmlType:s,href:E,title:T,target:I}=o,$o=v.value?"loading":b,N=e(e({},n),{title:T,disabled:W.value,class:[fo.value,n.class,{[`${d.value}-icon-only`]:m.length===0&&!!$o}],onClick:vo,onMousedown:yo});W.value||delete N.disabled;const Q=b&&!v.value?b:g(jo,{existIcon:!!b,prefixCls:d.value,loading:!!v.value},null),Y=m.map(G=>ho(G,L&&J.value));if(E!==void 0)return x(g("a",H(H({},N),{},{href:E,target:I,ref:$}),[Q,Y]));let j=g("button",H(H({},N),{},{ref:$,type:s}),[Q,Y]);if(!z(M)){const G=(function(){return j})();j=g(Ro,{ref:"wave",disabled:!!v.value},{default:()=>[G]})}return x(j)}}});C.Group=A;C.install=function(o){return o.component(C.name,C),o.component(A.name,A),o};const hr=Object.freeze(Object.defineProperty({__proto__:null,ButtonGroup:A,default:C},Symbol.toStringTag,{value:"Module"}));export{C as B,No as b,yr as c,hr as i};
@@ -1 +1 @@
1
- import{q,P as B,J as lt,f as E,i as ot,W as pt,X as vt,l as $t,m as ft,h as M,r as ht,t as et,Y as W,G as it,Z as St,$ as Y,a0 as yt}from"./index-Bg1RsfAJ.js";import{d as J,c as r,i as xt,r as G,p as bt,b as I,w as Ct,a8 as nt}from"./vendor-BvqAck49.js";import It from"./index-CcLDjTgI.js";import{u as _t,e as Lt,P as zt}from"./index-JqSxr1A7.js";import{A as Mt}from"./Row-4cniRgxC.js";import{C as Pt}from"./Col-BzvPsQgb.js";import{c as wt}from"./vnode-D8O7tUXh.js";import{i as Et}from"./initDefaultProps-B3H1sf95.js";import{r as at}from"./responsiveObserve-DT1grAyh.js";import"./icons-DP3uiYxy.js";import"./index-cHnmjGqB.js";import"./Trigger-C-FLgMzr.js";import"./raf-Deuc0E8-.js";import"./motion-DreYO5eb.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-DnrRH4E6.js";import"./KeyCode-D63Tfrq7.js";import"./BaseInput-B5wNMp7S.js";import"./pickAttrs-DH6-hDkF.js";import"./Overflow-C5GzzJTq.js";import"./index-C4KhsGXo.js";import"./isMobile--2fOlCHx.js";import"./omit-PcEEXHLZ.js";import"./useMergedState-Cl2q1fes.js";import"./useState-BK4hy8Ma.js";import"./FormItemContext-CAk4CXid.js";import"./devWarning-gaA8VqZf.js";import"./createContext-ECZfCCqd.js";import"./statusUtils-FzJ7j2T7.js";import"./Compact-Bj_BLBpw.js";import"./move-B0OVU04M.js";import"./slide-41lCsY6d.js";import"./compact-item-DnT3XzME.js";import"./index-BC8SOuGi.js";import"./firstNotUndefined-CLFzEa0p.js";import"./useFlexGapSupport-BTxsJE5n.js";import"./styleChecker-D0Zvn50h.js";import"./index-CffZBdA1.js";const Tt=()=>({avatar:B.any,description:B.any,prefixCls:String,title:B.any}),Bt=J({compatConfig:{MODE:3},name:"AListItemMeta",props:Tt(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(t,e){let{slots:i}=e;const{prefixCls:l}=q("list",t);return()=>{var o,c,p,a,S,d;const m=`${l.value}-item-meta`,u=(o=t.title)!==null&&o!==void 0?o:(c=i.title)===null||c===void 0?void 0:c.call(i),s=(p=t.description)!==null&&p!==void 0?p:(a=i.description)===null||a===void 0?void 0:a.call(i),f=(S=t.avatar)!==null&&S!==void 0?S:(d=i.avatar)===null||d===void 0?void 0:d.call(i),v=r("div",{class:`${l.value}-item-meta-content`},[u&&r("h4",{class:`${l.value}-item-meta-title`},[u]),s&&r("div",{class:`${l.value}-item-meta-description`},[s])]);return r("div",{class:m},[f&&r("div",{class:`${l.value}-item-meta-avatar`},[f]),(u||s)&&v])}}}),rt=Symbol("ListContextKey");var At=function(t,e){var i={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&e.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(t);o<l.length;o++)e.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(t,l[o])&&(i[l[o]]=t[l[o]]);return i};const Ot=()=>({prefixCls:String,extra:B.any,actions:B.array,grid:Object,colStyle:{type:Object,default:void 0}}),jt=J({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:Bt,props:Ot(),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;const{itemLayout:o,grid:c}=xt(rt,{grid:G(),itemLayout:G()}),{prefixCls:p}=q("list",t),a=()=>{var d;const m=((d=i.default)===null||d===void 0?void 0:d.call(i))||[];let u;return m.forEach(s=>{pt(s)&&!vt(s)&&(u=!0)}),u&&m.length>1},S=()=>{var d,m;const u=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i);return o.value==="vertical"?!!u:!a()};return()=>{var d,m,u,s,f;const{class:v}=l,b=At(l,["class"]),h=p.value,_=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i),A=(u=i.default)===null||u===void 0?void 0:u.call(i);let $=(s=t.actions)!==null&&s!==void 0?s:lt((f=i.actions)===null||f===void 0?void 0:f.call(i));$=$&&!Array.isArray($)?[$]:$;const P=$&&$.length>0&&r("ul",{class:`${h}-item-action`,key:"actions"},[$.map((C,T)=>r("li",{key:`${h}-item-action-${T}`},[C,T!==$.length-1&&r("em",{class:`${h}-item-action-split`},null)]))]),O=c.value?"div":"li",j=r(O,E(E({},b),{},{class:ot(`${h}-item`,{[`${h}-item-no-flex`]:!S()},v)}),{default:()=>[o.value==="vertical"&&_?[r("div",{class:`${h}-item-main`,key:"content"},[A,P]),r("div",{class:`${h}-item-extra`,key:"extra"},[_])]:[A,P,wt(_,{key:"extra"})]]});return c.value?r(Pt,{flex:1,style:t.colStyle},{default:()=>[j]}):j}}}),Ht=t=>{const{listBorderedCls:e,componentCls:i,paddingLG:l,margin:o,padding:c,listItemPaddingSM:p,marginLG:a,borderRadiusLG:S}=t;return{[`${e}`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:S,[`${i}-header,${i}-footer,${i}-item`]:{paddingInline:l},[`${i}-pagination`]:{margin:`${o}px ${a}px`}},[`${e}${i}-sm`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:p}},[`${e}${i}-lg`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:`${c}px ${l}px`}}}},Wt=t=>{const{componentCls:e,screenSM:i,screenMD:l,marginLG:o,marginSM:c,margin:p}=t;return{[`@media screen and (max-width:${l})`]:{[`${e}`]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:o}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${i})`]:{[`${e}`]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:c}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${p}px`}}}}}},Gt=t=>{const{componentCls:e,antCls:i,controlHeight:l,minHeight:o,paddingSM:c,marginLG:p,padding:a,listItemPadding:S,colorPrimary:d,listItemPaddingSM:m,listItemPaddingLG:u,paddingXS:s,margin:f,colorText:v,colorTextDescription:b,motionDurationSlow:h,lineWidth:_}=t;return{[`${e}`]:M(M({},ht(t)),{position:"relative","*":{outline:"none"},[`${e}-header, ${e}-footer`]:{background:"transparent",paddingBlock:c},[`${e}-pagination`]:{marginBlockStart:p,textAlign:"end",[`${i}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:o,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:S,color:v,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:a},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${e}-item-meta-title`]:{marginBottom:t.marginXXS,color:v,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:v,transition:`all ${h}`,"&:hover":{color:d}}},[`${e}-item-meta-description`]:{color:b,fontSize:t.fontSize,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${s}px`,color:b,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:_,height:Math.ceil(t.fontSize*t.lineHeight)-t.marginXXS*2,transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${a}px 0`,color:b,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:a,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${i}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:f,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:p},[`${e}-item-meta`]:{marginBlockEnd:a,[`${e}-item-meta-title`]:{marginBlockEnd:c,color:v,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:a,marginInlineStart:"auto","> li":{padding:`0 ${a}px`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:l},[`${e}-split${e}-something-after-last-item ${i}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:u},[`${e}-sm ${e}-item`]:{padding:m},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},Dt=$t("List",t=>{const e=ft(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG,listItemPadding:`${t.paddingContentVertical}px ${t.paddingContentHorizontalLG}px`,listItemPaddingSM:`${t.paddingContentVerticalSM}px ${t.paddingContentHorizontal}px`,listItemPaddingLG:`${t.paddingContentVerticalLG}px ${t.paddingContentHorizontalLG}px`});return[Gt(e),Ht(e),Wt(e)]},{contentWidth:220}),Kt=()=>({bordered:it(),dataSource:yt(),extra:W(),grid:et(),itemLayout:String,loading:Y([Boolean,Object]),loadMore:W(),pagination:Y([Boolean,Object]),prefixCls:String,rowKey:Y([String,Number,Function]),renderItem:St(),size:String,split:it(),header:W(),footer:W(),locale:et()}),z=J({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:jt,props:Et(Kt(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;var o,c;bt(rt,{grid:nt(t,"grid"),itemLayout:nt(t,"itemLayout")});const p={current:1,total:0},{prefixCls:a,direction:S,renderEmpty:d}=q("list",t),[m,u]=Dt(a),s=I(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),f=G((o=s.value.defaultCurrent)!==null&&o!==void 0?o:1),v=G((c=s.value.defaultPageSize)!==null&&c!==void 0?c:10);Ct(s,()=>{"current"in s.value&&(f.value=s.value.current),"pageSize"in s.value&&(v.value=s.value.pageSize)});const b=[],h=n=>(g,y)=>{f.value=g,v.value=y,s.value[n]&&s.value[n](g,y)},_=h("onChange"),A=h("onShowSizeChange"),$=I(()=>typeof t.loading=="boolean"?{spinning:t.loading}:t.loading),P=I(()=>$.value&&$.value.spinning),O=I(()=>{let n="";switch(t.size){case"large":n="lg";break;case"small":n="sm";break}return n}),j=I(()=>({[`${a.value}`]:!0,[`${a.value}-vertical`]:t.itemLayout==="vertical",[`${a.value}-${O.value}`]:O.value,[`${a.value}-split`]:t.split,[`${a.value}-bordered`]:t.bordered,[`${a.value}-loading`]:P.value,[`${a.value}-grid`]:!!t.grid,[`${a.value}-rtl`]:S.value==="rtl"})),C=I(()=>{const n=M(M(M({},p),{total:t.dataSource.length,current:f.value,pageSize:v.value}),t.pagination||{}),g=Math.ceil(n.total/n.pageSize);return n.current>g&&(n.current=g),n}),T=I(()=>{let n=[...t.dataSource];return t.pagination&&t.dataSource.length>(C.value.current-1)*C.value.pageSize&&(n=[...t.dataSource].splice((C.value.current-1)*C.value.pageSize,C.value.pageSize)),n}),st=_t(),D=Lt(()=>{for(let n=0;n<at.length;n+=1){const g=at[n];if(st.value[g])return g}}),dt=I(()=>{if(!t.grid)return;const n=D.value&&t.grid[D.value]?t.grid[D.value]:t.grid.column;if(n)return{width:`${100/n}%`,maxWidth:`${100/n}%`}}),ct=(n,g)=>{var y;const w=(y=t.renderItem)!==null&&y!==void 0?y:i.renderItem;if(!w)return null;let x;const L=typeof t.rowKey;return L==="function"?x=t.rowKey(n):L==="string"||L==="number"?x=n[t.rowKey]:x=n.key,x||(x=`list-item-${g}`),b[g]=x,w({item:n,index:g})};return()=>{var n,g,y,w,x,L,K,N;const Z=(n=t.loadMore)!==null&&n!==void 0?n:(g=i.loadMore)===null||g===void 0?void 0:g.call(i),X=(y=t.footer)!==null&&y!==void 0?y:(w=i.footer)===null||w===void 0?void 0:w.call(i),Q=(x=t.header)!==null&&x!==void 0?x:(L=i.header)===null||L===void 0?void 0:L.call(i),U=lt((K=i.default)===null||K===void 0?void 0:K.call(i)),mt=!!(Z||t.pagination||X),ut=ot(M(M({},j.value),{[`${a.value}-something-after-last-item`]:mt}),l.class,u.value),k=t.pagination?r("div",{class:`${a.value}-pagination`},[r(zt,E(E({},C.value),{},{onChange:_,onShowSizeChange:A}),null)]):null;let R=P.value&&r("div",{style:{minHeight:"53px"}},null);if(T.value.length>0){b.length=0;const tt=T.value.map((V,F)=>ct(V,F)),gt=tt.map((V,F)=>r("div",{key:b[F],style:dt.value},[V]));R=t.grid?r(Mt,{gutter:t.grid.gutter},{default:()=>[gt]}):r("ul",{class:`${a.value}-items`},[tt])}else!U.length&&!P.value&&(R=r("div",{class:`${a.value}-empty-text`},[((N=t.locale)===null||N===void 0?void 0:N.emptyText)||d("List")]));const H=C.value.position||"bottom";return m(r("div",E(E({},l),{},{class:ut}),[(H==="top"||H==="both")&&k,Q&&r("div",{class:`${a.value}-header`},[Q]),r(It,$.value,{default:()=>[R,U]}),X&&r("div",{class:`${a.value}-footer`},[X]),Z||(H==="bottom"||H==="both")&&k]))}}});z.install=function(t){return t.component(z.name,z),t.component(z.Item.name,z.Item),t.component(z.Item.Meta.name,z.Item.Meta),t};export{jt as ListItem,Bt as ListItemMeta,z as default,Kt as listProps};
1
+ import{q,P as B,J as lt,f as E,i as ot,W as pt,X as vt,l as $t,m as ft,h as M,r as ht,t as et,Y as W,G as it,Z as St,$ as Y,a0 as yt}from"./index-CM1idCUO.js";import{d as J,c as r,i as xt,r as G,p as bt,b as I,w as Ct,a8 as nt}from"./vendor-BvqAck49.js";import It from"./index-DBq6xzDm.js";import{u as _t,e as Lt,P as zt}from"./index-CFwvL9Lx.js";import{A as Mt}from"./Row-CZhFZDZ6.js";import{C as Pt}from"./Col-DfffBuFa.js";import{c as wt}from"./vnode-DFx6RVaA.js";import{i as Et}from"./initDefaultProps-DozNsdEE.js";import{r as at}from"./responsiveObserve-7eccwdTq.js";import"./icons-DP3uiYxy.js";import"./index-CcLdhhVn.js";import"./Trigger-CzBN5yUT.js";import"./raf-Deuc0E8-.js";import"./motion-DHBmFfzK.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-DnrRH4E6.js";import"./KeyCode-D63Tfrq7.js";import"./BaseInput-BJwgC2UN.js";import"./pickAttrs-9cBYsZy-.js";import"./Overflow-B45Usajd.js";import"./index-B8Jktv0L.js";import"./isMobile--2fOlCHx.js";import"./omit-BMB6RBkL.js";import"./useMergedState-Cl2q1fes.js";import"./useState-BK4hy8Ma.js";import"./FormItemContext-BbW5tEzw.js";import"./devWarning-DwewKXVi.js";import"./createContext-BAKscpCQ.js";import"./statusUtils-Bw7QssM3.js";import"./Compact-CP9f3DZt.js";import"./move-BBloskCm.js";import"./slide-BAF1i2qq.js";import"./compact-item-BhlUVQn4.js";import"./index-BhX9Ferp.js";import"./firstNotUndefined-CLFzEa0p.js";import"./useFlexGapSupport-iiGRCohz.js";import"./styleChecker-C9oBEpYS.js";import"./index-CUiZfnAi.js";const Tt=()=>({avatar:B.any,description:B.any,prefixCls:String,title:B.any}),Bt=J({compatConfig:{MODE:3},name:"AListItemMeta",props:Tt(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(t,e){let{slots:i}=e;const{prefixCls:l}=q("list",t);return()=>{var o,c,p,a,S,d;const m=`${l.value}-item-meta`,u=(o=t.title)!==null&&o!==void 0?o:(c=i.title)===null||c===void 0?void 0:c.call(i),s=(p=t.description)!==null&&p!==void 0?p:(a=i.description)===null||a===void 0?void 0:a.call(i),f=(S=t.avatar)!==null&&S!==void 0?S:(d=i.avatar)===null||d===void 0?void 0:d.call(i),v=r("div",{class:`${l.value}-item-meta-content`},[u&&r("h4",{class:`${l.value}-item-meta-title`},[u]),s&&r("div",{class:`${l.value}-item-meta-description`},[s])]);return r("div",{class:m},[f&&r("div",{class:`${l.value}-item-meta-avatar`},[f]),(u||s)&&v])}}}),rt=Symbol("ListContextKey");var At=function(t,e){var i={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&e.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(t);o<l.length;o++)e.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(t,l[o])&&(i[l[o]]=t[l[o]]);return i};const Ot=()=>({prefixCls:String,extra:B.any,actions:B.array,grid:Object,colStyle:{type:Object,default:void 0}}),jt=J({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:Bt,props:Ot(),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;const{itemLayout:o,grid:c}=xt(rt,{grid:G(),itemLayout:G()}),{prefixCls:p}=q("list",t),a=()=>{var d;const m=((d=i.default)===null||d===void 0?void 0:d.call(i))||[];let u;return m.forEach(s=>{pt(s)&&!vt(s)&&(u=!0)}),u&&m.length>1},S=()=>{var d,m;const u=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i);return o.value==="vertical"?!!u:!a()};return()=>{var d,m,u,s,f;const{class:v}=l,b=At(l,["class"]),h=p.value,_=(d=t.extra)!==null&&d!==void 0?d:(m=i.extra)===null||m===void 0?void 0:m.call(i),A=(u=i.default)===null||u===void 0?void 0:u.call(i);let $=(s=t.actions)!==null&&s!==void 0?s:lt((f=i.actions)===null||f===void 0?void 0:f.call(i));$=$&&!Array.isArray($)?[$]:$;const P=$&&$.length>0&&r("ul",{class:`${h}-item-action`,key:"actions"},[$.map((C,T)=>r("li",{key:`${h}-item-action-${T}`},[C,T!==$.length-1&&r("em",{class:`${h}-item-action-split`},null)]))]),O=c.value?"div":"li",j=r(O,E(E({},b),{},{class:ot(`${h}-item`,{[`${h}-item-no-flex`]:!S()},v)}),{default:()=>[o.value==="vertical"&&_?[r("div",{class:`${h}-item-main`,key:"content"},[A,P]),r("div",{class:`${h}-item-extra`,key:"extra"},[_])]:[A,P,wt(_,{key:"extra"})]]});return c.value?r(Pt,{flex:1,style:t.colStyle},{default:()=>[j]}):j}}}),Ht=t=>{const{listBorderedCls:e,componentCls:i,paddingLG:l,margin:o,padding:c,listItemPaddingSM:p,marginLG:a,borderRadiusLG:S}=t;return{[`${e}`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:S,[`${i}-header,${i}-footer,${i}-item`]:{paddingInline:l},[`${i}-pagination`]:{margin:`${o}px ${a}px`}},[`${e}${i}-sm`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:p}},[`${e}${i}-lg`]:{[`${i}-item,${i}-header,${i}-footer`]:{padding:`${c}px ${l}px`}}}},Wt=t=>{const{componentCls:e,screenSM:i,screenMD:l,marginLG:o,marginSM:c,margin:p}=t;return{[`@media screen and (max-width:${l})`]:{[`${e}`]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:o}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${i})`]:{[`${e}`]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:c}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${p}px`}}}}}},Gt=t=>{const{componentCls:e,antCls:i,controlHeight:l,minHeight:o,paddingSM:c,marginLG:p,padding:a,listItemPadding:S,colorPrimary:d,listItemPaddingSM:m,listItemPaddingLG:u,paddingXS:s,margin:f,colorText:v,colorTextDescription:b,motionDurationSlow:h,lineWidth:_}=t;return{[`${e}`]:M(M({},ht(t)),{position:"relative","*":{outline:"none"},[`${e}-header, ${e}-footer`]:{background:"transparent",paddingBlock:c},[`${e}-pagination`]:{marginBlockStart:p,textAlign:"end",[`${i}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:o,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:S,color:v,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:a},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:v},[`${e}-item-meta-title`]:{marginBottom:t.marginXXS,color:v,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:v,transition:`all ${h}`,"&:hover":{color:d}}},[`${e}-item-meta-description`]:{color:b,fontSize:t.fontSize,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${s}px`,color:b,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:_,height:Math.ceil(t.fontSize*t.lineHeight)-t.marginXXS*2,transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${a}px 0`,color:b,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:a,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${i}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:f,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:p},[`${e}-item-meta`]:{marginBlockEnd:a,[`${e}-item-meta-title`]:{marginBlockEnd:c,color:v,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:a,marginInlineStart:"auto","> li":{padding:`0 ${a}px`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:l},[`${e}-split${e}-something-after-last-item ${i}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:u},[`${e}-sm ${e}-item`]:{padding:m},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},Dt=$t("List",t=>{const e=ft(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG,listItemPadding:`${t.paddingContentVertical}px ${t.paddingContentHorizontalLG}px`,listItemPaddingSM:`${t.paddingContentVerticalSM}px ${t.paddingContentHorizontal}px`,listItemPaddingLG:`${t.paddingContentVerticalLG}px ${t.paddingContentHorizontalLG}px`});return[Gt(e),Ht(e),Wt(e)]},{contentWidth:220}),Kt=()=>({bordered:it(),dataSource:yt(),extra:W(),grid:et(),itemLayout:String,loading:Y([Boolean,Object]),loadMore:W(),pagination:Y([Boolean,Object]),prefixCls:String,rowKey:Y([String,Number,Function]),renderItem:St(),size:String,split:it(),header:W(),footer:W(),locale:et()}),z=J({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:jt,props:Et(Kt(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(t,e){let{slots:i,attrs:l}=e;var o,c;bt(rt,{grid:nt(t,"grid"),itemLayout:nt(t,"itemLayout")});const p={current:1,total:0},{prefixCls:a,direction:S,renderEmpty:d}=q("list",t),[m,u]=Dt(a),s=I(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),f=G((o=s.value.defaultCurrent)!==null&&o!==void 0?o:1),v=G((c=s.value.defaultPageSize)!==null&&c!==void 0?c:10);Ct(s,()=>{"current"in s.value&&(f.value=s.value.current),"pageSize"in s.value&&(v.value=s.value.pageSize)});const b=[],h=n=>(g,y)=>{f.value=g,v.value=y,s.value[n]&&s.value[n](g,y)},_=h("onChange"),A=h("onShowSizeChange"),$=I(()=>typeof t.loading=="boolean"?{spinning:t.loading}:t.loading),P=I(()=>$.value&&$.value.spinning),O=I(()=>{let n="";switch(t.size){case"large":n="lg";break;case"small":n="sm";break}return n}),j=I(()=>({[`${a.value}`]:!0,[`${a.value}-vertical`]:t.itemLayout==="vertical",[`${a.value}-${O.value}`]:O.value,[`${a.value}-split`]:t.split,[`${a.value}-bordered`]:t.bordered,[`${a.value}-loading`]:P.value,[`${a.value}-grid`]:!!t.grid,[`${a.value}-rtl`]:S.value==="rtl"})),C=I(()=>{const n=M(M(M({},p),{total:t.dataSource.length,current:f.value,pageSize:v.value}),t.pagination||{}),g=Math.ceil(n.total/n.pageSize);return n.current>g&&(n.current=g),n}),T=I(()=>{let n=[...t.dataSource];return t.pagination&&t.dataSource.length>(C.value.current-1)*C.value.pageSize&&(n=[...t.dataSource].splice((C.value.current-1)*C.value.pageSize,C.value.pageSize)),n}),st=_t(),D=Lt(()=>{for(let n=0;n<at.length;n+=1){const g=at[n];if(st.value[g])return g}}),dt=I(()=>{if(!t.grid)return;const n=D.value&&t.grid[D.value]?t.grid[D.value]:t.grid.column;if(n)return{width:`${100/n}%`,maxWidth:`${100/n}%`}}),ct=(n,g)=>{var y;const w=(y=t.renderItem)!==null&&y!==void 0?y:i.renderItem;if(!w)return null;let x;const L=typeof t.rowKey;return L==="function"?x=t.rowKey(n):L==="string"||L==="number"?x=n[t.rowKey]:x=n.key,x||(x=`list-item-${g}`),b[g]=x,w({item:n,index:g})};return()=>{var n,g,y,w,x,L,K,N;const Z=(n=t.loadMore)!==null&&n!==void 0?n:(g=i.loadMore)===null||g===void 0?void 0:g.call(i),X=(y=t.footer)!==null&&y!==void 0?y:(w=i.footer)===null||w===void 0?void 0:w.call(i),Q=(x=t.header)!==null&&x!==void 0?x:(L=i.header)===null||L===void 0?void 0:L.call(i),U=lt((K=i.default)===null||K===void 0?void 0:K.call(i)),mt=!!(Z||t.pagination||X),ut=ot(M(M({},j.value),{[`${a.value}-something-after-last-item`]:mt}),l.class,u.value),k=t.pagination?r("div",{class:`${a.value}-pagination`},[r(zt,E(E({},C.value),{},{onChange:_,onShowSizeChange:A}),null)]):null;let R=P.value&&r("div",{style:{minHeight:"53px"}},null);if(T.value.length>0){b.length=0;const tt=T.value.map((V,F)=>ct(V,F)),gt=tt.map((V,F)=>r("div",{key:b[F],style:dt.value},[V]));R=t.grid?r(Mt,{gutter:t.grid.gutter},{default:()=>[gt]}):r("ul",{class:`${a.value}-items`},[tt])}else!U.length&&!P.value&&(R=r("div",{class:`${a.value}-empty-text`},[((N=t.locale)===null||N===void 0?void 0:N.emptyText)||d("List")]));const H=C.value.position||"bottom";return m(r("div",E(E({},l),{},{class:ut}),[(H==="top"||H==="both")&&k,Q&&r("div",{class:`${a.value}-header`},[Q]),r(It,$.value,{default:()=>[R,U]}),X&&r("div",{class:`${a.value}-footer`},[X]),Z||(H==="bottom"||H==="both")&&k]))}}});z.install=function(t){return t.component(z.name,z),t.component(z.Item.name,z.Item),t.component(z.Item.Meta.name,z.Item.Meta),t};export{jt as ListItem,Bt as ListItemMeta,z as default,Kt as listProps};