chainlesschain 0.162.13 → 0.162.14

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 (145) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/src/assets/web-panel/assets/{AIOps-Bq_zxhCr.js → AIOps-D34d_Nh1.js} +1 -1
  4. package/src/assets/web-panel/assets/{ActionButton-CaevDm9t.js → ActionButton-Br7HxCnl.js} +1 -1
  5. package/src/assets/web-panel/assets/{Analytics-B0gOmwPw.js → Analytics-bVKq79Xd.js} +1 -1
  6. package/src/assets/web-panel/assets/{AppLayout-DWhZiV0Q.js → AppLayout-CWSLIbAz.js} +2 -2
  7. package/src/assets/web-panel/assets/{Audit-ZuZJBCxo.js → Audit-Cmnu1qqa.js} +1 -1
  8. package/src/assets/web-panel/assets/{Backup-CX7jhH5l.js → Backup-Rok20-TL.js} +1 -1
  9. package/src/assets/web-panel/assets/{BaseInput-CVLx7HVq.js → BaseInput-BJzs_ZtT.js} +1 -1
  10. package/src/assets/web-panel/assets/{Chat-C6yL5tRD.js → Chat-CSYapbcq.js} +1 -1
  11. package/src/assets/web-panel/assets/{Checkbox-BePhbqVq.js → Checkbox-BEa7Sr7e.js} +1 -1
  12. package/src/assets/web-panel/assets/{Codegen-B5E4x1Lm.js → Codegen-C9M4e7ne.js} +1 -1
  13. package/src/assets/web-panel/assets/{Col-CWhNU6A7.js → Col-DU9NoUIi.js} +1 -1
  14. package/src/assets/web-panel/assets/{Community-mSEAuJhp.js → Community-DA9uz_jP.js} +1 -1
  15. package/src/assets/web-panel/assets/{Compact-DSudHzX3.js → Compact-3_bEraVw.js} +1 -1
  16. package/src/assets/web-panel/assets/{Compliance-CxJLYjyn.js → Compliance-BtF8jWUQ.js} +1 -1
  17. package/src/assets/web-panel/assets/{Cowork-C-trppQj.js → Cowork-BqvA7oaM.js} +1 -1
  18. package/src/assets/web-panel/assets/{Cron-_Ij4v5fY.js → Cron-CxZy7Mzg.js} +1 -1
  19. package/src/assets/web-panel/assets/{Crosschain-eLHXzp5T.js → Crosschain-1DB-XRGu.js} +1 -1
  20. package/src/assets/web-panel/assets/{DID-BP04AUUB.js → DID-B6Ezp1pt.js} +1 -1
  21. package/src/assets/web-panel/assets/{Dashboard-CzEeQv62.js → Dashboard-QDJ6VVsn.js} +2 -2
  22. package/src/assets/web-panel/assets/{Dropdown-C_SGOB22.js → Dropdown-CovsWjxG.js} +1 -1
  23. package/src/assets/web-panel/assets/{Federation-BgaP4BOv.js → Federation-DbRxS4Y4.js} +1 -1
  24. package/src/assets/web-panel/assets/{FormItemContext-BxGLLt9r.js → FormItemContext-9E9dNGtx.js} +1 -1
  25. package/src/assets/web-panel/assets/{Git-Bt_uM_Gw.js → Git-CqEpyxRZ.js} +1 -1
  26. package/src/assets/web-panel/assets/{Governance-N2-0RG_o.js → Governance-On47KtGq.js} +1 -1
  27. package/src/assets/web-panel/assets/{Inference-eS3g-CzP.js → Inference-RZcjcyaq.js} +1 -1
  28. package/src/assets/web-panel/assets/{KnowledgeGraph-CUuvNVah.js → KnowledgeGraph-C-1rRAM9.js} +1 -1
  29. package/src/assets/web-panel/assets/{Logs-wPbwEt2r.js → Logs-BuunmG_r.js} +1 -1
  30. package/src/assets/web-panel/assets/{Marketplace-DH91kTwo.js → Marketplace-CromymyA.js} +1 -1
  31. package/src/assets/web-panel/assets/{McpTools-D-GyyBrI.js → McpTools-5XlFExh7.js} +1 -1
  32. package/src/assets/web-panel/assets/{Memory-BOtUy-tw.js → Memory-DjnUT7YM.js} +1 -1
  33. package/src/assets/web-panel/assets/{MobileBridge-DIP__XQd.js → MobileBridge-BrYIgLg6.js} +1 -1
  34. package/src/assets/web-panel/assets/{MobileProjects-1nqr1UsU.js → MobileProjects-CL5V3fTm.js} +1 -1
  35. package/src/assets/web-panel/assets/{Mtc-CCE0x7h2.js → Mtc-CHYJq6zK.js} +1 -1
  36. package/src/assets/web-panel/assets/{MtcAudit-BBkz0XUO.js → MtcAudit-BZxUO0qt.js} +1 -1
  37. package/src/assets/web-panel/assets/{Multisig-CIKSJvTY.js → Multisig-FZTmJgW1.js} +1 -1
  38. package/src/assets/web-panel/assets/{NLProgramming-BDkgeFcq.js → NLProgramming-C9Mhefph.js} +1 -1
  39. package/src/assets/web-panel/assets/{Notes-ONiUxfN1.js → Notes-W7usj-Ar.js} +1 -1
  40. package/src/assets/web-panel/assets/{NotificationSettings-CGcyKEIe.js → NotificationSettings-PBuYv_Bh.js} +1 -1
  41. package/src/assets/web-panel/assets/{Organization-BZtMYBJt.js → Organization-CuYCE-rF.js} +1 -1
  42. package/src/assets/web-panel/assets/{Overflow-C4LfFZAI.js → Overflow-Dojx-kzE.js} +1 -1
  43. package/src/assets/web-panel/assets/{P2P-D71Cpk-m.js → P2P-BgIaSrLX.js} +1 -1
  44. package/src/assets/web-panel/assets/{Permissions-DRGYF29v.js → Permissions-Byj2dkF_.js} +1 -1
  45. package/src/assets/web-panel/assets/{PersonalDataHub-CfRYoIua.js → PersonalDataHub-CMOOI13-.js} +1 -1
  46. package/src/assets/web-panel/assets/{Pipeline-BOyp0_Qo.js → Pipeline-CWwEOF09.js} +1 -1
  47. package/src/assets/web-panel/assets/{Privacy-a_AcphvF.js → Privacy-VT7gldcN.js} +1 -1
  48. package/src/assets/web-panel/assets/{ProjectInit-CFu1grYt.js → ProjectInit-7UH3c3p7.js} +1 -1
  49. package/src/assets/web-panel/assets/{ProjectSettings-p54Eivhh.js → ProjectSettings-DqLp-72a.js} +1 -1
  50. package/src/assets/web-panel/assets/{Projects-DkB88XAu.js → Projects-B_54eDhH.js} +1 -1
  51. package/src/assets/web-panel/assets/{Providers-EK7f8DEd.js → Providers-BIrNfNpc.js} +1 -1
  52. package/src/assets/web-panel/assets/{QuickAsk-CpO0w3iP.js → QuickAsk-BbYPwCso.js} +1 -1
  53. package/src/assets/web-panel/assets/{Recommend-BUJVQdv9.js → Recommend-BF4qBssF.js} +1 -1
  54. package/src/assets/web-panel/assets/{Reputation-kU2fOuZt.js → Reputation-DPEzlC2V.js} +1 -1
  55. package/src/assets/web-panel/assets/{Row-oGWRbk6g.js → Row-DjHxhH1L.js} +1 -1
  56. package/src/assets/web-panel/assets/{RssFeed-saC_46Yo.js → RssFeed-D0_j678P.js} +1 -1
  57. package/src/assets/web-panel/assets/{Search-CjtRqFUu.js → Search-DctfGehu.js} +1 -1
  58. package/src/assets/web-panel/assets/{Security-BX0NBVfQ.js → Security-BFHggeYM.js} +1 -1
  59. package/src/assets/web-panel/assets/{Services-Bgxsnei_.js → Services-CmrFMukV.js} +1 -1
  60. package/src/assets/web-panel/assets/{Skeleton-CwBb3k2a.js → Skeleton-DR4vn_nS.js} +1 -1
  61. package/src/assets/web-panel/assets/{Skills-CZCMYH6Z.js → Skills-DlXG2yyV.js} +1 -1
  62. package/src/assets/web-panel/assets/{Sla-Djy1uHnZ.js → Sla-4PPGL3SE.js} +1 -1
  63. package/src/assets/web-panel/assets/{SpeechSettings-CGUI_Uyh.js → SpeechSettings-D9EhJOqm.js} +1 -1
  64. package/src/assets/web-panel/assets/{SyncSettings-DK2CKHRD.js → SyncSettings-Dasmbi0p.js} +1 -1
  65. package/src/assets/web-panel/assets/{Tasks-BKiOzeIO.js → Tasks-vilEiuPA.js} +1 -1
  66. package/src/assets/web-panel/assets/{Templates-CnQpleXj.js → Templates-Ca9Rvktn.js} +1 -1
  67. package/src/assets/web-panel/assets/{Tenant-DwKz0cjm.js → Tenant-CEZb9gfK.js} +1 -1
  68. package/src/assets/web-panel/assets/{Terminal-A7t_wsR8.js → Terminal-DanCBdbD.js} +1 -1
  69. package/src/assets/web-panel/assets/{Tokens-BqYY9l44.js → Tokens-SPkClW2d.js} +1 -1
  70. package/src/assets/web-panel/assets/{Trigger-BI4bXFmi.js → Trigger-B645yL7g.js} +1 -1
  71. package/src/assets/web-panel/assets/{Trust-yMynKTRG.js → Trust-D9sM_Ig0.js} +1 -1
  72. package/src/assets/web-panel/assets/{UkeySign-Br4IScM6.js → UkeySign-B_Nr2K-u.js} +1 -1
  73. package/src/assets/web-panel/assets/{VideoEditing-CWcThGsP.js → VideoEditing-U01Lea8j.js} +1 -1
  74. package/src/assets/web-panel/assets/{Wallet-CZcAtjxj.js → Wallet-6xBySVV8.js} +1 -1
  75. package/src/assets/web-panel/assets/{WebAuthn-BnTZFMA0.js → WebAuthn-DbgMoBu6.js} +1 -1
  76. package/src/assets/web-panel/assets/{WorkflowEditor-N7gGz3_n.js → WorkflowEditor-Bz-Y6IR2.js} +1 -1
  77. package/src/assets/web-panel/assets/{chat-D175ZIO0.js → chat-BC_O9hag.js} +1 -1
  78. package/src/assets/web-panel/assets/{colors-LKhZyttv.js → colors-ChlOGOvr.js} +1 -1
  79. package/src/assets/web-panel/assets/{compact-item-CsJSebxT.js → compact-item-BSbAYGGF.js} +1 -1
  80. package/src/assets/web-panel/assets/{createContext-BJ_CPYFC.js → createContext-CFcZly5M.js} +1 -1
  81. package/src/assets/web-panel/assets/{hasIn-CzD3IqH8.js → hasIn-BomYwwYE.js} +1 -1
  82. package/src/assets/web-panel/assets/{index-BSNibAqz.js → index-5Ewm6KZA.js} +1 -1
  83. package/src/assets/web-panel/assets/{index-D8kltMTW.js → index-B6LJHQoE.js} +1 -1
  84. package/src/assets/web-panel/assets/{index-BvF2tC6C.js → index-BEJ6YiLI.js} +1 -1
  85. package/src/assets/web-panel/assets/{index-BjOrt4vw.js → index-BGUbtM3R.js} +1 -1
  86. package/src/assets/web-panel/assets/{index-Dm-3kvtD.js → index-BHGsFwYW.js} +1 -1
  87. package/src/assets/web-panel/assets/{index-D401L3yx.js → index-BHi69MHF.js} +1 -1
  88. package/src/assets/web-panel/assets/{index-R1cFADfk.js → index-BI1jAWcc.js} +1 -1
  89. package/src/assets/web-panel/assets/index-BIRYt1of.js +1 -0
  90. package/src/assets/web-panel/assets/{index-Dd7dICwB.js → index-BYDvb1pi.js} +1 -1
  91. package/src/assets/web-panel/assets/{index-Kn-Of5ew.js → index-BZGdjNLA.js} +1 -1
  92. package/src/assets/web-panel/assets/{index-uTEVWPYA.js → index-BwFykZ5U.js} +1 -1
  93. package/src/assets/web-panel/assets/{index-JTX9A7w0.js → index-ByZQNO0A.js} +1 -1
  94. package/src/assets/web-panel/assets/{index-BmJdof_c.js → index-C0rr1X9W.js} +1 -1
  95. package/src/assets/web-panel/assets/{index-BsirlkJ0.js → index-CBhoZhCO.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-6qPbrYF7.js → index-CCRSz2cR.js} +1 -1
  97. package/src/assets/web-panel/assets/index-CZfySmWX.js +1 -0
  98. package/src/assets/web-panel/assets/{index-DJVkBmSc.js → index-Cj47XwJQ.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-DOO73rHE.js → index-Cmzh8gKL.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-BNVLVzN5.js → index-CnxlKTDK.js} +1 -1
  101. package/src/assets/web-panel/assets/{index-CTIkCKav.js → index-CoF95pYK.js} +1 -1
  102. package/src/assets/web-panel/assets/{index-RIO4JKMP.js → index-Ctx97mH-.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-BEDFHKO3.js → index-D0vX9jQA.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-CRGNuUIM.js → index-DNkth8dM.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-DnPt5OdD.js → index-DRp5_Xns.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-E7t1hAnk.js → index-DW-Ji07y.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-BhiZDGg7.js → index-DXgE2VW6.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-B7UYymse.js → index-D_0B3CiU.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-CyHdYUeZ.js → index-Dbf5YmDX.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-CKjBAdm0.js → index-DsNQ2hqI.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-C2HBKw07.js → index-EY733h9z.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-DM3uBEWD.js → index-QD_n54XT.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-DXp1jVsK.js → index-T5Y_9IPv.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-BDSZDDb2.js → index-b8GbH2Yi.js} +3 -3
  115. package/src/assets/web-panel/assets/{index-BZluCuTH.js → index-gUACAWbM.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-D7ZcBI5s.js → index-onW325hZ.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-D5IZCkZG.js → index-ozVPr1gj.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-BMvdoiFr.js → index-slYX2rCE.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-BXH9ujMW.js → index-t9u2bHpH.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-BV-__mlC.js → index-za1GUJBG.js} +1 -1
  121. package/src/assets/web-panel/assets/{initDefaultProps-CBW0okek.js → initDefaultProps-DnadEaxu.js} +1 -1
  122. package/src/assets/web-panel/assets/{motion-DGAffQ0Z.js → motion-CC_Na0Tl.js} +1 -1
  123. package/src/assets/web-panel/assets/{move-DFJ0-5IW.js → move-C2d9Mkk9.js} +1 -1
  124. package/src/assets/web-panel/assets/{omit-AvrDghg1.js → omit-QvpKbF8p.js} +1 -1
  125. package/src/assets/web-panel/assets/{pickAttrs-D7csw9i1.js → pickAttrs-Dm8r3X1_.js} +1 -1
  126. package/src/assets/web-panel/assets/{placementArrow-hZ6Lg6kG.js → placementArrow-DaqaVfoX.js} +1 -1
  127. package/src/assets/web-panel/assets/{responsiveObserve-DLLx5VvS.js → responsiveObserve-Iida9fIn.js} +1 -1
  128. package/src/assets/web-panel/assets/{slide-BaRIT3ev.js → slide-YqHexXQD.js} +1 -1
  129. package/src/assets/web-panel/assets/{statusUtils-Cdjyuhrz.js → statusUtils-BGKLoeEt.js} +1 -1
  130. package/src/assets/web-panel/assets/{styleChecker-CbrNybTt.js → styleChecker-aI-gsQO8.js} +1 -1
  131. package/src/assets/web-panel/assets/{useFlexGapSupport-B8gAhiRC.js → useFlexGapSupport-BiOsz4rc.js} +1 -1
  132. package/src/assets/web-panel/assets/{useFs-BZPy4ICP.js → useFs-CZy7Zo2X.js} +1 -1
  133. package/src/assets/web-panel/assets/{vnode-6Y0NDMVv.js → vnode-B6WqjmE4.js} +1 -1
  134. package/src/assets/web-panel/assets/{zoom-DTbMGsSH.js → zoom-DTeTrJ2z.js} +1 -1
  135. package/src/assets/web-panel/index.html +1 -1
  136. package/src/commands/__tests__/android.test.js +260 -0
  137. package/src/commands/android.js +284 -0
  138. package/src/commands/hub.js +57 -17
  139. package/src/gateways/ws/personal-data-hub-protocol.js +28 -8
  140. package/src/index.js +2 -0
  141. package/src/lib/cc-android-bridge.js +162 -0
  142. package/src/lib/personal-data-hub-wiring.js +74 -18
  143. package/src/lib/web-ui-server.js +2 -1
  144. package/src/assets/web-panel/assets/index-CY1mQA2I.js +0 -1
  145. package/src/assets/web-panel/assets/index-D9nXHfUB.js +0 -1
@@ -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-BDSZDDb2.js";import{W as To}from"./index-DJVkBmSc.js";import{d as co}from"./devWarning-CNIS3FrJ.js";import{d as X,c as g,a5 as Io,n as Ho,a as wo,f as h,w as zo,b as Po,o as Do,q as Ao,e as Oo,s as w,T as Ro}from"./vendor-DhFY8mDK.js";import{L as k}from"./icons-BOPtEWK4.js";import{g as Wo}from"./compact-item-CsJSebxT.js";import{c as Lo}from"./createContext-BJ_CPYFC.js";import{u as _o}from"./Compact-DSudHzX3.js";import{i as Mo}from"./initDefaultProps-CBW0okek.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=>{Ho(()=>{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(Io,{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(wo({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);zo(_,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===Ro){let m=t.children.trim();return no(m)&&(m=m.split("").join(b)),g("span",null,[m])}return t};return Po(()=>{co(!(o.ghost&&z(o.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Do(K),Ao(K),Oo(()=>{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(To,{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-b8GbH2Yi.js";import{W as To}from"./index-Cj47XwJQ.js";import{d as co}from"./devWarning-CNIS3FrJ.js";import{d as X,c as g,a5 as Io,n as Ho,a as wo,f as h,w as zo,b as Po,o as Do,q as Ao,e as Oo,s as w,T as Ro}from"./vendor-DhFY8mDK.js";import{L as k}from"./icons-BOPtEWK4.js";import{g as Wo}from"./compact-item-BSbAYGGF.js";import{c as Lo}from"./createContext-CFcZly5M.js";import{u as _o}from"./Compact-3_bEraVw.js";import{i as Mo}from"./initDefaultProps-DnadEaxu.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=>{Ho(()=>{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(Io,{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(wo({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);zo(_,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===Ro){let m=t.children.trim();return no(m)&&(m=m.split("").join(b)),g("span",null,[m])}return t};return Po(()=>{co(!(o.ghost&&z(o.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Do(K),Ao(K),Oo(()=>{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(To,{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,4 +1,4 @@
1
- import{P as R,V as S,$ as j,a0 as z,G as v,l as Z,m as ee,h as P,r as oe,af as ne,q,i as k,f as E,au as te,J as ae,ab as le,U as re}from"./index-BDSZDDb2.js";import{c as W}from"./vnode-6Y0NDMVv.js";import{ag as ie}from"./icons-BOPtEWK4.js";import{f as se}from"./firstNotUndefined-CLFzEa0p.js";import{g as ce,c as de}from"./collapseMotion-DfnRZex1.js";import{i as F}from"./initDefaultProps-CBW0okek.js";import{d as G,r as pe,w as ue,c as f,f as fe,b as me,s as ve,a2 as $e,a3 as be,a5 as ge}from"./vendor-DhFY8mDK.js";import{d as xe}from"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";const he=()=>({prefixCls:String,activeKey:z([Array,Number,String]),defaultActiveKey:z([Array,Number,String]),accordion:v(),destroyInactivePanel:v(),bordered:v(),expandIcon:S(),openAnimation:R.object,expandIconPosition:j(),collapsible:j(),ghost:v(),onChange:S(),"onUpdate:activeKey":S()}),J=()=>({openAnimation:R.object,prefixCls:String,header:R.any,headerClass:String,showArrow:v(),isActive:v(),destroyInactivePanel:v(),disabled:v(),accordion:v(),forceRender:v(),expandIcon:S(),extra:R.any,panelKey:z(),collapsible:j(),role:String,onItemClick:S()}),Ce=o=>{const{componentCls:e,collapseContentBg:t,padding:p,collapseContentPaddingHorizontal:s,collapseHeaderBg:c,collapseHeaderPadding:l,collapsePanelBorderRadius:u,lineWidth:m,lineType:b,colorBorder:h,colorText:C,colorTextHeading:$,colorTextDisabled:g,fontSize:y,lineHeight:x,marginSM:A,paddingSM:n,motionDurationSlow:a,fontSizeIcon:r}=o,i=`${m}px ${b} ${h}`;return{[e]:P(P({},oe(o)),{backgroundColor:c,border:i,borderBottom:0,borderRadius:`${u}px`,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:i,"&:last-child":{[`
1
+ import{P as R,V as S,$ as j,a0 as z,G as v,l as Z,m as ee,h as P,r as oe,af as ne,q,i as k,f as E,au as te,J as ae,ab as le,U as re}from"./index-b8GbH2Yi.js";import{c as W}from"./vnode-B6WqjmE4.js";import{ag as ie}from"./icons-BOPtEWK4.js";import{f as se}from"./firstNotUndefined-CLFzEa0p.js";import{g as ce,c as de}from"./collapseMotion-DfnRZex1.js";import{i as F}from"./initDefaultProps-DnadEaxu.js";import{d as G,r as pe,w as ue,c as f,f as fe,b as me,s as ve,a2 as $e,a3 as be,a5 as ge}from"./vendor-DhFY8mDK.js";import{d as xe}from"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";const he=()=>({prefixCls:String,activeKey:z([Array,Number,String]),defaultActiveKey:z([Array,Number,String]),accordion:v(),destroyInactivePanel:v(),bordered:v(),expandIcon:S(),openAnimation:R.object,expandIconPosition:j(),collapsible:j(),ghost:v(),onChange:S(),"onUpdate:activeKey":S()}),J=()=>({openAnimation:R.object,prefixCls:String,header:R.any,headerClass:String,showArrow:v(),isActive:v(),destroyInactivePanel:v(),disabled:v(),accordion:v(),forceRender:v(),expandIcon:S(),extra:R.any,panelKey:z(),collapsible:j(),role:String,onItemClick:S()}),Ce=o=>{const{componentCls:e,collapseContentBg:t,padding:p,collapseContentPaddingHorizontal:s,collapseHeaderBg:c,collapseHeaderPadding:l,collapsePanelBorderRadius:u,lineWidth:m,lineType:b,colorBorder:h,colorText:C,colorTextHeading:$,colorTextDisabled:g,fontSize:y,lineHeight:x,marginSM:A,paddingSM:n,motionDurationSlow:a,fontSizeIcon:r}=o,i=`${m}px ${b} ${h}`;return{[e]:P(P({},oe(o)),{backgroundColor:c,border:i,borderBottom:0,borderRadius:`${u}px`,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:i,"&:last-child":{[`
2
2
  &,
3
3
  & > ${e}-header`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`> ${e}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:l,color:$,lineHeight:x,cursor:"pointer",transition:`all ${a}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:y*x,display:"flex",alignItems:"center",paddingInlineEnd:A},[`${e}-arrow`]:P(P({},ne()),{fontSize:r,svg:{transition:`transform ${a}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}},[`${e}-header-collapsible-only`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-icon-collapsible-only`]:{cursor:"default",[`${e}-expand-icon`]:{cursor:"pointer"}},[`&${e}-no-arrow`]:{[`> ${e}-header`]:{paddingInlineStart:n}}},[`${e}-content`]:{color:C,backgroundColor:t,borderTop:i,[`& > ${e}-content-box`]:{padding:`${p}px ${s}px`},"&-hidden":{display:"none"}},[`${e}-item:last-child`]:{[`> ${e}-content`]:{borderRadius:`0 0 ${u}px ${u}px`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:g,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:A}}}}})}},ye=o=>{const{componentCls:e}=o,t=`> ${e}-item > ${e}-header ${e}-arrow svg`;return{[`${e}-rtl`]:{[t]:{transform:"rotate(180deg)"}}}},Ae=o=>{const{componentCls:e,collapseHeaderBg:t,paddingXXS:p,colorBorder:s}=o;return{[`${e}-borderless`]:{backgroundColor:t,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${s}`},[`
4
4
  > ${e}-item:last-child,
@@ -0,0 +1 @@
1
+ import{A as o}from"./Row-DjHxhH1L.js";import{S as t}from"./index-b8GbH2Yi.js";import"./responsiveObserve-Iida9fIn.js";import"./vendor-DhFY8mDK.js";import"./useFlexGapSupport-BiOsz4rc.js";import"./styleChecker-aI-gsQO8.js";import"./index-gUACAWbM.js";import"./icons-BOPtEWK4.js";const l=t(o);export{l as default};
@@ -1 +1 @@
1
- import{l as q,m as J,h as N,r as Q,$ as P,t as tt,f as b,S as et,p as nt,q as ot,I as st}from"./index-BDSZDDb2.js";import it from"./index-JTX9A7w0.js";import{B as rt}from"./index-D401L3yx.js";import{d as L,b as F,w as lt,c as C,F as D,f as O,s as y,r as at}from"./vendor-DhFY8mDK.js";import{R as ut}from"./icons-BOPtEWK4.js";import"./initDefaultProps-CBW0okek.js";import"./index-DJVkBmSc.js";import"./isVisible-C7tPsqfj.js";import"./useState-DGS1NOyn.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-CsJSebxT.js";import"./createContext-BJ_CPYFC.js";import"./Compact-DSudHzX3.js";import"./_getTag-BVc6NQ_K.js";const ct=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"}}},ht=q("QRCode",r=>ct(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 p;(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,M=l.getTotalBits(t,a);if(M<=m){g=M;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 f=[];for(const m of t){u(m.mode.modeBits,4,f),u(m.numChars,m.mode.numCharCountBits(a),f);for(const M of m.getData())f.push(M)}h(f.length==g);const R=s.getNumDataCodewords(a,n)*8;h(f.length<=R),u(0,Math.min(4,R-f.length),f),u(0,(8-f.length%8)%8,f),h(f.length%8==0);for(let m=236;f.length<R;m^=253)u(m,8,f);const w=[];for(;w.length*8<f.length;)w.push(0);return f.forEach((m,M)=>w[M>>>3]|=m<<7-(M&7)),new s(a,n,w,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 f=this.getPenaltyScore();f<a&&(o=g,a=f),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,d(o,i));this.setFunctionModule(8,7,d(o,6)),this.setFunctionModule(8,8,d(o,7)),this.setFunctionModule(7,8,d(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,d(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,d(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,d(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=d(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),f=[],R=s.reedSolomonComputeDivisor(i);for(let m=0,M=0;m<o;m++){const v=t.slice(M,M+g-i+(m<a?0:1));M+=v.length;const A=s.reedSolomonComputeRemainder(v,R);m<a&&v.push(0),f.push(v.concat(A))}const w=[];for(let m=0;m<f[0].length;m++)f.forEach((M,v)=>{(m!=g-i||v>=a)&&w.push(M[m])});return h(w.length==c),w}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]=d(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 f=0;f<this.size;f++)this.modules[i][f]==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][f],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 f=0;f<this.size;f++)this.modules[f][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[f][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 d(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})(p||(p={}));(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={}))})(p||(p={}));(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={}))})(p||(p={}));const U={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,dt=4,gt=0,mt=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(d,h){let l=null;d.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===d.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,d)=>d<s.y||d>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,d){if(d==null)return null;const h=r.length+u*2,l=Math.floor(s*mt),E=h/s,t=(d.width||l)*E,n=(d.height||l)*E,e=d.x==null?r.length/2-t/2:d.x*E,o=d.y==null?r.length/2-n/2:d.y*E;let i=null;if(d.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),f=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:f}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?dt:gt}const Et=(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:d}=s;const h=O(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return d({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),F(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:f}=r;if(l.value!=null){const R=l.value,w=R.getContext("2d");if(!w)return;let m=p.QrCode.encodeText(n,U[o]).getModules();const M=_(a,g),v=m.length+M*2,A=X(m,e,M,f),I=E.value,x=t.value&&A!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;R.height=R.width=e*B;const T=e/v*B;w.scale(T,T),w.fillStyle=i,w.fillRect(0,0,v,v),w.fillStyle=c,Et?w.fill(new Path2D(Y(m,M))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&w.fillRect(Z+M,j+M,1,1)})}),x&&w.drawImage(I,A.x+M,A.y+M,A.w,A.h)}},{flush:"post"}),lt(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(D,null,[C("canvas",b(b({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),wt=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,d=null,h=null,l=null,E=null;return F(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=p.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),d=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 ${d} ${d}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${d}v${d}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Ct=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:d,expose:h}=s;const[l]=nt("QRCode"),{prefixCls:E}=ot("qrcode",r),[t,n]=ht(E),[,e]=st(),o=at();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=O(()=>{const{value:c,icon:a="",size:g=160,iconSize:f=40,color:R=e.value.colorText,bgColor:w="transparent",errorLevel:m="M"}=r,M={src:a,x:void 0,y:void 0,height:f,width:f,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:w,fgColor:R,imageSettings:a?M:void 0}});return()=>{const c=E.value;return t(C("div",b(b({},d),{},{style:[d.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(it,null,null),r.status==="expired"&&C(D,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(rt,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ut,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,b({ref:o},i.value),null):C(wt,i.value,null)]))}}}),Dt=et(Ct);export{Dt as default};
1
+ import{l as q,m as J,h as N,r as Q,$ as P,t as tt,f as b,S as et,p as nt,q as ot,I as st}from"./index-b8GbH2Yi.js";import it from"./index-ByZQNO0A.js";import{B as rt}from"./index-BHi69MHF.js";import{d as L,b as F,w as lt,c as C,F as D,f as O,s as y,r as at}from"./vendor-DhFY8mDK.js";import{R as ut}from"./icons-BOPtEWK4.js";import"./initDefaultProps-DnadEaxu.js";import"./index-Cj47XwJQ.js";import"./isVisible-C7tPsqfj.js";import"./useState-DGS1NOyn.js";import"./raf-Deuc0E8-.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-BSbAYGGF.js";import"./createContext-CFcZly5M.js";import"./Compact-3_bEraVw.js";import"./_getTag-BVc6NQ_K.js";const ct=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"}}},ht=q("QRCode",r=>ct(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 p;(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,M=l.getTotalBits(t,a);if(M<=m){g=M;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 f=[];for(const m of t){u(m.mode.modeBits,4,f),u(m.numChars,m.mode.numCharCountBits(a),f);for(const M of m.getData())f.push(M)}h(f.length==g);const R=s.getNumDataCodewords(a,n)*8;h(f.length<=R),u(0,Math.min(4,R-f.length),f),u(0,(8-f.length%8)%8,f),h(f.length%8==0);for(let m=236;f.length<R;m^=253)u(m,8,f);const w=[];for(;w.length*8<f.length;)w.push(0);return f.forEach((m,M)=>w[M>>>3]|=m<<7-(M&7)),new s(a,n,w,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 f=this.getPenaltyScore();f<a&&(o=g,a=f),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,d(o,i));this.setFunctionModule(8,7,d(o,6)),this.setFunctionModule(8,8,d(o,7)),this.setFunctionModule(7,8,d(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,d(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,d(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,d(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=d(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),f=[],R=s.reedSolomonComputeDivisor(i);for(let m=0,M=0;m<o;m++){const v=t.slice(M,M+g-i+(m<a?0:1));M+=v.length;const A=s.reedSolomonComputeRemainder(v,R);m<a&&v.push(0),f.push(v.concat(A))}const w=[];for(let m=0;m<f[0].length;m++)f.forEach((M,v)=>{(m!=g-i||v>=a)&&w.push(M[m])});return h(w.length==c),w}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]=d(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 f=0;f<this.size;f++)this.modules[i][f]==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][f],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 f=0;f<this.size;f++)this.modules[f][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[f][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 d(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})(p||(p={}));(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={}))})(p||(p={}));(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={}))})(p||(p={}));const U={L:p.QrCode.Ecc.LOW,M:p.QrCode.Ecc.MEDIUM,Q:p.QrCode.Ecc.QUARTILE,H:p.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,dt=4,gt=0,mt=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(d,h){let l=null;d.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===d.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,d)=>d<s.y||d>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,d){if(d==null)return null;const h=r.length+u*2,l=Math.floor(s*mt),E=h/s,t=(d.width||l)*E,n=(d.height||l)*E,e=d.x==null?r.length/2-t/2:d.x*E,o=d.y==null?r.length/2-n/2:d.y*E;let i=null;if(d.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),f=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:f}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?dt:gt}const Et=(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:d}=s;const h=O(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return d({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),F(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:f}=r;if(l.value!=null){const R=l.value,w=R.getContext("2d");if(!w)return;let m=p.QrCode.encodeText(n,U[o]).getModules();const M=_(a,g),v=m.length+M*2,A=X(m,e,M,f),I=E.value,x=t.value&&A!=null&&I!==null&&I.complete&&I.naturalHeight!==0&&I.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;R.height=R.width=e*B;const T=e/v*B;w.scale(T,T),w.fillStyle=i,w.fillRect(0,0,v,v),w.fillStyle=c,Et?w.fill(new Path2D(Y(m,M))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&w.fillRect(Z+M,j+M,1,1)})}),x&&w.drawImage(I,A.x+M,A.y+M,A.w,A.h)}},{flush:"post"}),lt(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(D,null,[C("canvas",b(b({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),wt=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,d=null,h=null,l=null,E=null;return F(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=p.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),d=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 ${d} ${d}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${d}v${d}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Ct=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:d,expose:h}=s;const[l]=nt("QRCode"),{prefixCls:E}=ot("qrcode",r),[t,n]=ht(E),[,e]=st(),o=at();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=O(()=>{const{value:c,icon:a="",size:g=160,iconSize:f=40,color:R=e.value.colorText,bgColor:w="transparent",errorLevel:m="M"}=r,M={src:a,x:void 0,y:void 0,height:f,width:f,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:w,fgColor:R,imageSettings:a?M:void 0}});return()=>{const c=E.value;return t(C("div",b(b({},d),{},{style:[d.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(it,null,null),r.status==="expired"&&C(D,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(rt,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ut,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,b({ref:o},i.value),null):C(wt,i.value,null)]))}}}),Dt=et(Ct);export{Dt as default};
@@ -1 +1 @@
1
- import{q as J,P as B,J as lt,f as E,i as ot,ae as pt,ab as vt,l as $t,m as ft,h as M,r as ht,t as et,ad as G,G as it,V as St,a0 as q,Z as yt}from"./index-BDSZDDb2.js";import xt from"./index-JTX9A7w0.js";import{u as bt,e as Ct,P as It}from"./index-C2HBKw07.js";import{A as _t}from"./Row-oGWRbk6g.js";import{C as Lt}from"./Col-CWhNU6A7.js";import{c as zt}from"./vnode-6Y0NDMVv.js";import{d as Y,c as r,i as Mt,r as W,w as Pt,f as I,p as wt,a8 as nt}from"./vendor-DhFY8mDK.js";import{i as Et}from"./initDefaultProps-CBW0okek.js";import{r as at}from"./responsiveObserve-DLLx5VvS.js";import"./icons-BOPtEWK4.js";import"./index-BEDFHKO3.js";import"./Trigger-BI4bXFmi.js";import"./raf-Deuc0E8-.js";import"./motion-DGAffQ0Z.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./KeyCode-D63Tfrq7.js";import"./BaseInput-CVLx7HVq.js";import"./pickAttrs-D7csw9i1.js";import"./Overflow-C4LfFZAI.js";import"./index-Dm-3kvtD.js";import"./isMobile--2fOlCHx.js";import"./omit-AvrDghg1.js";import"./useMergedState-WwedrFR0.js";import"./useState-DGS1NOyn.js";import"./FormItemContext-BxGLLt9r.js";import"./createContext-BJ_CPYFC.js";import"./statusUtils-Cdjyuhrz.js";import"./Compact-DSudHzX3.js";import"./move-DFJ0-5IW.js";import"./slide-BaRIT3ev.js";import"./compact-item-CsJSebxT.js";import"./index-DOO73rHE.js";import"./firstNotUndefined-CLFzEa0p.js";import"./useFlexGapSupport-B8gAhiRC.js";import"./styleChecker-CbrNybTt.js";import"./index-BZluCuTH.js";const Tt=()=>({avatar:B.any,description:B.any,prefixCls:String,title:B.any}),Bt=Y({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}=J("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=Y({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}=Mt(rt,{grid:W(),itemLayout:W()}),{prefixCls:p}=J("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,zt(_,{key:"extra"})]]});return c.value?r(Lt,{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`}}}},Gt=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`}}}}}},Wt=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[Wt(e),Ht(e),Gt(e)]},{contentWidth:220}),Kt=()=>({bordered:it(),dataSource:yt(),extra:G(),grid:et(),itemLayout:String,loading:q([Boolean,Object]),loadMore:G(),pagination:q([Boolean,Object]),prefixCls:String,rowKey:q([String,Number,Function]),renderItem:St(),size:String,split:it(),header:G(),footer:G(),locale:et()}),z=Y({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;wt(rt,{grid:nt(t,"grid"),itemLayout:nt(t,"itemLayout")});const p={current:1,total:0},{prefixCls:a,direction:S,renderEmpty:d}=J("list",t),[m,u]=Dt(a),s=I(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),f=W((o=s.value.defaultCurrent)!==null&&o!==void 0?o:1),v=W((c=s.value.defaultPageSize)!==null&&c!==void 0?c:10);Pt(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=bt(),D=Ct(()=>{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(It,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(_t,{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(xt,$.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 as J,P as B,J as lt,f as E,i as ot,ae as pt,ab as vt,l as $t,m as ft,h as M,r as ht,t as et,ad as G,G as it,V as St,a0 as q,Z as yt}from"./index-b8GbH2Yi.js";import xt from"./index-ByZQNO0A.js";import{u as bt,e as Ct,P as It}from"./index-EY733h9z.js";import{A as _t}from"./Row-DjHxhH1L.js";import{C as Lt}from"./Col-DU9NoUIi.js";import{c as zt}from"./vnode-B6WqjmE4.js";import{d as Y,c as r,i as Mt,r as W,w as Pt,f as I,p as wt,a8 as nt}from"./vendor-DhFY8mDK.js";import{i as Et}from"./initDefaultProps-DnadEaxu.js";import{r as at}from"./responsiveObserve-Iida9fIn.js";import"./icons-BOPtEWK4.js";import"./index-D0vX9jQA.js";import"./Trigger-B645yL7g.js";import"./raf-Deuc0E8-.js";import"./motion-CC_Na0Tl.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-BVc6NQ_K.js";import"./KeyCode-D63Tfrq7.js";import"./BaseInput-BJzs_ZtT.js";import"./pickAttrs-Dm8r3X1_.js";import"./Overflow-Dojx-kzE.js";import"./index-BHGsFwYW.js";import"./isMobile--2fOlCHx.js";import"./omit-QvpKbF8p.js";import"./useMergedState-WwedrFR0.js";import"./useState-DGS1NOyn.js";import"./FormItemContext-9E9dNGtx.js";import"./createContext-CFcZly5M.js";import"./statusUtils-BGKLoeEt.js";import"./Compact-3_bEraVw.js";import"./move-C2d9Mkk9.js";import"./slide-YqHexXQD.js";import"./compact-item-BSbAYGGF.js";import"./index-Cmzh8gKL.js";import"./firstNotUndefined-CLFzEa0p.js";import"./useFlexGapSupport-BiOsz4rc.js";import"./styleChecker-aI-gsQO8.js";import"./index-gUACAWbM.js";const Tt=()=>({avatar:B.any,description:B.any,prefixCls:String,title:B.any}),Bt=Y({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}=J("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=Y({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}=Mt(rt,{grid:W(),itemLayout:W()}),{prefixCls:p}=J("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,zt(_,{key:"extra"})]]});return c.value?r(Lt,{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`}}}},Gt=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`}}}}}},Wt=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[Wt(e),Ht(e),Gt(e)]},{contentWidth:220}),Kt=()=>({bordered:it(),dataSource:yt(),extra:G(),grid:et(),itemLayout:String,loading:q([Boolean,Object]),loadMore:G(),pagination:q([Boolean,Object]),prefixCls:String,rowKey:q([String,Number,Function]),renderItem:St(),size:String,split:it(),header:G(),footer:G(),locale:et()}),z=Y({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;wt(rt,{grid:nt(t,"grid"),itemLayout:nt(t,"itemLayout")});const p={current:1,total:0},{prefixCls:a,direction:S,renderEmpty:d}=J("list",t),[m,u]=Dt(a),s=I(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),f=W((o=s.value.defaultCurrent)!==null&&o!==void 0?o:1),v=W((c=s.value.defaultPageSize)!==null&&c!==void 0?c:10);Pt(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=bt(),D=Ct(()=>{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(It,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(_t,{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(xt,$.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,3 +1,3 @@
1
- import{l as J,m as K,h as H,r as Q,S as Y,q as Z,i as ee,U as oe,g as ne,P as v,O as te,f as N}from"./index-BDSZDDb2.js";import{d as le,c as s,a5 as ie,s as w,f as ae,a2 as se,a3 as re}from"./vendor-DhFY8mDK.js";import{c as ce,d as de,e as ue,f as ge,E as pe,C as me,I as fe,a as ve,b as $e}from"./icons-BOPtEWK4.js";import{c as he}from"./vnode-6Y0NDMVv.js";const B=(e,o,n,i,a)=>({backgroundColor:e,border:`${i.lineWidth}px ${i.lineType} ${o}`,[`${a}-icon`]:{color:n}}),ye=e=>{const{componentCls:o,motionDurationSlow:n,marginXS:i,marginSM:a,fontSize:u,fontSizeLG:r,lineHeight:g,borderRadiusLG:$,motionEaseInOutCirc:c,alertIconSizeLG:d,colorText:m,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:C,paddingContentHorizontalLG:S}=e;return{[o]:H(H({},Q(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:$,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:u,lineHeight:g},"&-message":{color:m},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},
1
+ import{l as J,m as K,h as H,r as Q,S as Y,q as Z,i as ee,U as oe,g as ne,P as v,O as te,f as N}from"./index-b8GbH2Yi.js";import{d as le,c as s,a5 as ie,s as w,f as ae,a2 as se,a3 as re}from"./vendor-DhFY8mDK.js";import{c as ce,d as de,e as ue,f as ge,E as pe,C as me,I as fe,a as ve,b as $e}from"./icons-BOPtEWK4.js";import{c as he}from"./vnode-B6WqjmE4.js";const B=(e,o,n,i,a)=>({backgroundColor:e,border:`${i.lineWidth}px ${i.lineType} ${o}`,[`${a}-icon`]:{color:n}}),ye=e=>{const{componentCls:o,motionDurationSlow:n,marginXS:i,marginSM:a,fontSize:u,fontSizeLG:r,lineHeight:g,borderRadiusLG:$,motionEaseInOutCirc:c,alertIconSizeLG:d,colorText:m,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:C,paddingContentHorizontalLG:S}=e;return{[o]:H(H({},Q(e)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:$,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:u,lineHeight:g},"&-message":{color:m},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},
2
2
  padding-top ${n} ${c}, padding-bottom ${n} ${c},
3
3
  margin-bottom ${n} ${c}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${o}-with-description`]:{alignItems:"flex-start",paddingInline:S,paddingBlock:C,[`${o}-icon`]:{marginInlineEnd:a,fontSize:d,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:i,color:m,fontSize:r},[`${o}-description`]:{display:"block"}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},Ce=e=>{const{componentCls:o,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:a,colorWarning:u,colorWarningBorder:r,colorWarningBg:g,colorError:$,colorErrorBorder:c,colorErrorBg:d,colorInfo:m,colorInfoBorder:f,colorInfoBg:h}=e;return{[o]:{"&-success":B(a,i,n,e,o),"&-info":B(h,f,m,e,o),"&-warning":B(g,r,u,e,o),"&-error":H(H({},B(d,c,$,e,o)),{[`${o}-description > pre`]:{margin:0,padding:0}})}}},Se=e=>{const{componentCls:o,iconCls:n,motionDurationMid:i,marginXS:a,fontSizeIcon:u,colorIcon:r,colorIconHover:g}=e;return{[o]:{"&-action":{marginInlineStart:a},[`${o}-close-icon`]:{marginInlineStart:a,padding:0,overflow:"hidden",fontSize:u,lineHeight:`${u}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:r,transition:`color ${i}`,"&:hover":{color:g}}},"&-close-text":{color:r,transition:`color ${i}`,"&:hover":{color:g}}}}},xe=e=>[ye(e),Ce(e),Se(e)],Ie=J("Alert",e=>{const{fontSizeHeading3:o}=e,n=K(e,{alertIconSizeLG:o,alertPaddingHorizontal:12});return[xe(n)]}),be={success:ve,info:fe,error:me,warning:pe},we={success:ge,info:ue,error:de,warning:ce},Be=te("success","info","warning","error"),He=()=>({type:v.oneOf(Be),closable:{type:Boolean,default:void 0},closeText:v.any,message:v.any,description:v.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:v.any,closeIcon:v.any,onClose:Function}),Te=le({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:He(),setup(e,o){let{slots:n,emit:i,attrs:a,expose:u}=o;const{prefixCls:r,direction:g}=Z("alert",e),[$,c]=Ie(r),d=w(!1),m=w(!1),f=w(),h=l=>{l.preventDefault();const p=f.value;p.style.height=`${p.offsetHeight}px`,p.style.height=`${p.offsetHeight}px`,d.value=!0,i("close",l)},C=()=>{var l;d.value=!1,m.value=!0,(l=e.afterClose)===null||l===void 0||l.call(e)},S=ae(()=>{const{type:l}=e;return l!==void 0?l:e.banner?"warning":"info"});u({animationEnd:C});const V=w({});return()=>{var l,p,T,E,_,z,A,O,L,F;const{banner:D,closeIcon:W=(l=n.closeIcon)===null||l===void 0?void 0:l.call(n)}=e;let{closable:M,showIcon:y}=e;const P=(p=e.closeText)!==null&&p!==void 0?p:(T=n.closeText)===null||T===void 0?void 0:T.call(n),x=(E=e.description)!==null&&E!==void 0?E:(_=n.description)===null||_===void 0?void 0:_.call(n),G=(z=e.message)!==null&&z!==void 0?z:(A=n.message)===null||A===void 0?void 0:A.call(n),I=(O=e.icon)!==null&&O!==void 0?O:(L=n.icon)===null||L===void 0?void 0:L.call(n),R=(F=n.action)===null||F===void 0?void 0:F.call(n);y=D&&y===void 0?!0:y;const j=(x?we:be)[S.value]||null;P&&(M=!0);const t=r.value,k=ee(t,{[`${t}-${S.value}`]:!0,[`${t}-closing`]:d.value,[`${t}-with-description`]:!!x,[`${t}-no-icon`]:!y,[`${t}-banner`]:!!D,[`${t}-closable`]:M,[`${t}-rtl`]:g.value==="rtl",[c.value]:!0}),X=M?s("button",{type:"button",onClick:h,class:`${t}-close-icon`,tabindex:0},[P?s("span",{class:`${t}-close-text`},[P]):W===void 0?s($e,null,null):W]):null,q=I&&(oe(I)?he(I,{class:`${t}-icon`}):s("span",{class:`${t}-icon`},[I]))||s(j,{class:`${t}-icon`},null),U=ne(`${t}-motion`,{appear:!1,css:!0,onAfterLeave:C,onBeforeLeave:b=>{b.style.maxHeight=`${b.offsetHeight}px`},onLeave:b=>{b.style.maxHeight="0px"}});return $(m.value?null:s(ie,U,{default:()=>[se(s("div",N(N({role:"alert"},a),{},{style:[a.style,V.value],class:[a.class,k],"data-show":!d.value,ref:f}),[y?q:null,s("div",{class:`${t}-content`},[G?s("div",{class:`${t}-message`},[G]):null,x?s("div",{class:`${t}-description`},[x]):null]),R?s("div",{class:`${t}-action`},[R]):null,X]),[[re,!d.value]])]}))}}}),Oe=Y(Te);export{He as alertProps,Oe as default};
@@ -1 +1 @@
1
- import{l as E,m as L,h as x,r as X,K as O,q as P,f as I,M as _,ac as G,P as T}from"./index-BDSZDDb2.js";import{i as A}from"./initDefaultProps-CBW0okek.js";import{d as B,s as H,w as j,e as R,c as r,k as M,a6 as N}from"./vendor-DhFY8mDK.js";import"./icons-BOPtEWK4.js";function V(n,e,c){var t=c||{},i=t.noTrailing,m=i===void 0?!1:i,b=t.noLeading,$=b===void 0?!1:b,y=t.debounceMode,a=y===void 0?void 0:y,o,g=!1,f=0;function D(){o&&clearTimeout(o)}function z(d){var v=d||{},p=v.upcomingOnly,h=p===void 0?!1:p;D(),g=!h}function S(){for(var d=arguments.length,v=new Array(d),p=0;p<d;p++)v[p]=arguments[p];var h=this,l=Date.now()-f;if(g)return;function u(){f=Date.now(),e.apply(h,v)}function s(){o=void 0}!$&&a&&!o&&u(),D(),a===void 0&&l>n?$?(f=Date.now(),m||(o=setTimeout(a?s:u,n))):u():m!==!0&&(o=setTimeout(a?s:u,a===void 0?n-l:n))}return S.cancel=z,S}function F(n,e,c){var t={},i=t.atBegin,m=i===void 0?!1:i;return V(n,e,{debounceMode:m!==!1})}const K=new O("antSpinMove",{to:{opacity:1}}),q=new O("antRotate",{to:{transform:"rotate(405deg)"}}),U=n=>({[`${n.componentCls}`]:x(x({},X(n)),{position:"absolute",display:"none",color:n.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${n.motionDurationSlow} ${n.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${n.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:n.contentHeight,[`${n.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-n.spinDotSize/2},[`${n.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(n.spinDotSize-n.fontSize)/2+2,textShadow:`0 1px 2px ${n.colorBgContainer}`},[`&${n.componentCls}-show-text ${n.componentCls}-dot`]:{marginTop:-(n.spinDotSize/2)-10},"&-sm":{[`${n.componentCls}-dot`]:{margin:-n.spinDotSizeSM/2},[`${n.componentCls}-text`]:{paddingTop:(n.spinDotSizeSM-n.fontSize)/2+2},[`&${n.componentCls}-show-text ${n.componentCls}-dot`]:{marginTop:-(n.spinDotSizeSM/2)-10}},"&-lg":{[`${n.componentCls}-dot`]:{margin:-(n.spinDotSizeLG/2)},[`${n.componentCls}-text`]:{paddingTop:(n.spinDotSizeLG-n.fontSize)/2+2},[`&${n.componentCls}-show-text ${n.componentCls}-dot`]:{marginTop:-(n.spinDotSizeLG/2)-10}}},[`${n.componentCls}-container`]:{position:"relative",transition:`opacity ${n.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:n.colorBgContainer,opacity:0,transition:`all ${n.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${n.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:n.spinDotDefault},[`${n.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:n.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(n.spinDotSize-n.marginXXS/2)/2,height:(n.spinDotSize-n.marginXXS/2)/2,backgroundColor:n.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:K,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:q,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${n.componentCls}-dot`]:{fontSize:n.spinDotSizeSM,i:{width:(n.spinDotSizeSM-n.marginXXS/2)/2,height:(n.spinDotSizeSM-n.marginXXS/2)/2}},[`&-lg ${n.componentCls}-dot`]:{fontSize:n.spinDotSizeLG,i:{width:(n.spinDotSizeLG-n.marginXXS)/2,height:(n.spinDotSizeLG-n.marginXXS)/2}},[`&${n.componentCls}-show-text ${n.componentCls}-text`]:{display:"block"}})}),J=E("Spin",n=>{const e=L(n,{spinDotDefault:n.colorTextDescription,spinDotSize:n.controlHeightLG/2,spinDotSizeSM:n.controlHeightLG*.35,spinDotSizeLG:n.controlHeight});return[U(e)]},{contentHeight:400});var Q=function(n,e){var c={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.indexOf(t)<0&&(c[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(n);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(n,t[i])&&(c[t[i]]=n[t[i]]);return c};const W=()=>({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:T.any,delay:Number,indicator:T.any});let C=null;function Y(n,e){return!!n&&!!e&&!isNaN(Number(e))}function Z(n){const e=n.indicator;C=typeof e=="function"?e:()=>r(e,null,null)}const w=B({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:A(W(),{size:"default",spinning:!0,wrapperClassName:""}),setup(n,e){let{attrs:c,slots:t}=e;const{prefixCls:i,size:m,direction:b}=P("spin",n),[$,y]=J(i),a=H(n.spinning&&!Y(n.spinning,n.delay));let o;return j([()=>n.spinning,()=>n.delay],()=>{o?.cancel(),o=F(n.delay,()=>{a.value=n.spinning}),o?.()},{immediate:!0,flush:"post"}),R(()=>{o?.cancel()}),()=>{var g,f;const{class:D}=c,z=Q(c,["class"]),{tip:S=(g=t.tip)===null||g===void 0?void 0:g.call(t)}=n,d=(f=t.default)===null||f===void 0?void 0:f.call(t),v={[y.value]:!0,[i.value]:!0,[`${i.value}-sm`]:m.value==="small",[`${i.value}-lg`]:m.value==="large",[`${i.value}-spinning`]:a.value,[`${i.value}-show-text`]:!!S,[`${i.value}-rtl`]:b.value==="rtl",[D]:!!D};function p(l){const u=`${l}-dot`;let s=G(t,n,"indicator");return s===null?null:(Array.isArray(s)&&(s=s.length===1?s[0]:s),M(s)?N(s,{class:u}):C&&M(C())?N(C(),{class:u}):r("span",{class:`${u} ${l}-dot-spin`},[r("i",{class:`${l}-dot-item`},null),r("i",{class:`${l}-dot-item`},null),r("i",{class:`${l}-dot-item`},null),r("i",{class:`${l}-dot-item`},null)]))}const h=r("div",I(I({},z),{},{class:v,"aria-live":"polite","aria-busy":a.value}),[p(i.value),S?r("div",{class:`${i.value}-text`},[S]):null]);if(d&&_(d).length){const l={[`${i.value}-container`]:!0,[`${i.value}-blur`]:a.value};return $(r("div",{class:[`${i.value}-nested-loading`,n.wrapperClassName,y.value]},[a.value&&r("div",{key:"loading"},[h]),r("div",{class:l,key:"container"},[d])]))}return $(h)}}});w.setDefaultIndicator=Z;w.install=function(n){return n.component(w.name,w),n};export{w as default,W as spinProps};
1
+ import{l as E,m as L,h as x,r as X,K as O,q as P,f as I,M as _,ac as G,P as T}from"./index-b8GbH2Yi.js";import{i as A}from"./initDefaultProps-DnadEaxu.js";import{d as B,s as H,w as j,e as R,c as r,k as M,a6 as N}from"./vendor-DhFY8mDK.js";import"./icons-BOPtEWK4.js";function V(n,e,c){var t=c||{},i=t.noTrailing,m=i===void 0?!1:i,b=t.noLeading,$=b===void 0?!1:b,y=t.debounceMode,a=y===void 0?void 0:y,o,g=!1,f=0;function D(){o&&clearTimeout(o)}function z(d){var v=d||{},p=v.upcomingOnly,h=p===void 0?!1:p;D(),g=!h}function S(){for(var d=arguments.length,v=new Array(d),p=0;p<d;p++)v[p]=arguments[p];var h=this,l=Date.now()-f;if(g)return;function u(){f=Date.now(),e.apply(h,v)}function s(){o=void 0}!$&&a&&!o&&u(),D(),a===void 0&&l>n?$?(f=Date.now(),m||(o=setTimeout(a?s:u,n))):u():m!==!0&&(o=setTimeout(a?s:u,a===void 0?n-l:n))}return S.cancel=z,S}function F(n,e,c){var t={},i=t.atBegin,m=i===void 0?!1:i;return V(n,e,{debounceMode:m!==!1})}const K=new O("antSpinMove",{to:{opacity:1}}),q=new O("antRotate",{to:{transform:"rotate(405deg)"}}),U=n=>({[`${n.componentCls}`]:x(x({},X(n)),{position:"absolute",display:"none",color:n.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${n.motionDurationSlow} ${n.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${n.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:n.contentHeight,[`${n.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-n.spinDotSize/2},[`${n.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(n.spinDotSize-n.fontSize)/2+2,textShadow:`0 1px 2px ${n.colorBgContainer}`},[`&${n.componentCls}-show-text ${n.componentCls}-dot`]:{marginTop:-(n.spinDotSize/2)-10},"&-sm":{[`${n.componentCls}-dot`]:{margin:-n.spinDotSizeSM/2},[`${n.componentCls}-text`]:{paddingTop:(n.spinDotSizeSM-n.fontSize)/2+2},[`&${n.componentCls}-show-text ${n.componentCls}-dot`]:{marginTop:-(n.spinDotSizeSM/2)-10}},"&-lg":{[`${n.componentCls}-dot`]:{margin:-(n.spinDotSizeLG/2)},[`${n.componentCls}-text`]:{paddingTop:(n.spinDotSizeLG-n.fontSize)/2+2},[`&${n.componentCls}-show-text ${n.componentCls}-dot`]:{marginTop:-(n.spinDotSizeLG/2)-10}}},[`${n.componentCls}-container`]:{position:"relative",transition:`opacity ${n.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:n.colorBgContainer,opacity:0,transition:`all ${n.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${n.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:n.spinDotDefault},[`${n.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:n.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(n.spinDotSize-n.marginXXS/2)/2,height:(n.spinDotSize-n.marginXXS/2)/2,backgroundColor:n.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:K,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:q,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${n.componentCls}-dot`]:{fontSize:n.spinDotSizeSM,i:{width:(n.spinDotSizeSM-n.marginXXS/2)/2,height:(n.spinDotSizeSM-n.marginXXS/2)/2}},[`&-lg ${n.componentCls}-dot`]:{fontSize:n.spinDotSizeLG,i:{width:(n.spinDotSizeLG-n.marginXXS)/2,height:(n.spinDotSizeLG-n.marginXXS)/2}},[`&${n.componentCls}-show-text ${n.componentCls}-text`]:{display:"block"}})}),J=E("Spin",n=>{const e=L(n,{spinDotDefault:n.colorTextDescription,spinDotSize:n.controlHeightLG/2,spinDotSizeSM:n.controlHeightLG*.35,spinDotSizeLG:n.controlHeight});return[U(e)]},{contentHeight:400});var Q=function(n,e){var c={};for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&e.indexOf(t)<0&&(c[t]=n[t]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(n);i<t.length;i++)e.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(n,t[i])&&(c[t[i]]=n[t[i]]);return c};const W=()=>({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:T.any,delay:Number,indicator:T.any});let C=null;function Y(n,e){return!!n&&!!e&&!isNaN(Number(e))}function Z(n){const e=n.indicator;C=typeof e=="function"?e:()=>r(e,null,null)}const w=B({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:A(W(),{size:"default",spinning:!0,wrapperClassName:""}),setup(n,e){let{attrs:c,slots:t}=e;const{prefixCls:i,size:m,direction:b}=P("spin",n),[$,y]=J(i),a=H(n.spinning&&!Y(n.spinning,n.delay));let o;return j([()=>n.spinning,()=>n.delay],()=>{o?.cancel(),o=F(n.delay,()=>{a.value=n.spinning}),o?.()},{immediate:!0,flush:"post"}),R(()=>{o?.cancel()}),()=>{var g,f;const{class:D}=c,z=Q(c,["class"]),{tip:S=(g=t.tip)===null||g===void 0?void 0:g.call(t)}=n,d=(f=t.default)===null||f===void 0?void 0:f.call(t),v={[y.value]:!0,[i.value]:!0,[`${i.value}-sm`]:m.value==="small",[`${i.value}-lg`]:m.value==="large",[`${i.value}-spinning`]:a.value,[`${i.value}-show-text`]:!!S,[`${i.value}-rtl`]:b.value==="rtl",[D]:!!D};function p(l){const u=`${l}-dot`;let s=G(t,n,"indicator");return s===null?null:(Array.isArray(s)&&(s=s.length===1?s[0]:s),M(s)?N(s,{class:u}):C&&M(C())?N(C(),{class:u}):r("span",{class:`${u} ${l}-dot-spin`},[r("i",{class:`${l}-dot-item`},null),r("i",{class:`${l}-dot-item`},null),r("i",{class:`${l}-dot-item`},null),r("i",{class:`${l}-dot-item`},null)]))}const h=r("div",I(I({},z),{},{class:v,"aria-live":"polite","aria-busy":a.value}),[p(i.value),S?r("div",{class:`${i.value}-text`},[S]):null]);if(d&&_(d).length){const l={[`${i.value}-container`]:!0,[`${i.value}-blur`]:a.value};return $(r("div",{class:[`${i.value}-nested-loading`,n.wrapperClassName,y.value]},[a.value&&r("div",{key:"loading"},[h]),r("div",{class:l,key:"container"},[d])]))}return $(h)}}});w.setDefaultIndicator=Z;w.install=function(n){return n.component(w.name,w),n};export{w as default,W as spinProps};
@@ -1,4 +1,4 @@
1
- import{M as Oe,h as A,P as J,$ as Ke,i as D,f as V,H as Ae,q as ie,L as Re,a5 as Q,O as Ye,w as Ze,U as Xe}from"./index-BDSZDDb2.js";import{a as Ee,F as ue,N as _e}from"./FormItemContext-BxGLLt9r.js";import{g as le,a as we}from"./statusUtils-Cdjyuhrz.js";import{o as X}from"./omit-AvrDghg1.js";import{c as ee}from"./vnode-6Y0NDMVv.js";import{d as q,c as C,r as Z,s as W,w as se,f as Y,o as Fe,F as Te,n as pe,a7 as qe,e as ye,b as Se,g as Ne}from"./vendor-DhFY8mDK.js";import{B as je}from"./BaseInput-CVLx7HVq.js";import{C as Me,t as Je,as as Qe,aU as et}from"./icons-BOPtEWK4.js";import{u as tt,N as ze}from"./Compact-DSudHzX3.js";import{u as Ie}from"./index-DOO73rHE.js";import{B as nt}from"./index-D401L3yx.js";import{i as at}from"./isPlainObject-_gz-soRW.js";import{R as lt}from"./index-Dm-3kvtD.js";import{w as fe}from"./raf-Deuc0E8-.js";import"./createContext-BJ_CPYFC.js";import"./_getTag-BVc6NQ_K.js";import"./compact-item-CsJSebxT.js";import"./index-DJVkBmSc.js";import"./isVisible-C7tPsqfj.js";import"./useState-DGS1NOyn.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./initDefaultProps-CBW0okek.js";import"./ResizeObserver.es-D6qJbdzf.js";const oe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function $e(e){return oe(e.prefix)||oe(e.suffix)||oe(e.allowClear)}function ve(e){return oe(e.addonBefore)||oe(e.addonAfter)}function Ce(e){return typeof e>"u"||e===null?"":String(e)}function re(e,f,t,n){if(!t)return;const a=f;if(f.type==="click"){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0});const m=e.cloneNode(!0);a.target=m,a.currentTarget=m,m.value="",t(a);return}if(n!==void 0){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0}),a.target=e,a.currentTarget=e,e.value=n,t(a);return}t(a)}function Ve(e,f){if(!e)return;e.focus(f);const{cursor:t}=f||{};if(t){const n=e.value.length;switch(t){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}const ot=()=>({addonBefore:J.any,addonAfter:J.any,prefix:J.any,suffix:J.any,clearIcon:J.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),ke=()=>A(A({},ot()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:J.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),De=()=>A(A({},ke()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ke("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),rt=q({name:"BaseInput",inheritAttrs:!1,props:ke(),setup(e,f){let{slots:t,attrs:n}=f;const a=Z(),m=l=>{var d;if(!((d=a.value)===null||d===void 0)&&d.contains(l.target)){const{triggerFocus:s}=e;s?.()}},i=()=>{var l;const{allowClear:d,value:s,disabled:h,readonly:p,handleReset:u,suffix:_=t.suffix,prefixCls:z}=e;if(!d)return null;const P=!h&&!p&&s,c=`${z}-clear-icon`,O=((l=t.clearIcon)===null||l===void 0?void 0:l.call(t))||"*";return C("span",{onClick:u,onMousedown:S=>S.preventDefault(),class:D({[`${c}-hidden`]:!P,[`${c}-has-suffix`]:!!_},c),role:"button",tabindex:-1},[O])};return()=>{var l,d;const{focused:s,value:h,disabled:p,allowClear:u,readonly:_,hidden:z,prefixCls:P,prefix:c=(l=t.prefix)===null||l===void 0?void 0:l.call(t),suffix:O=(d=t.suffix)===null||d===void 0?void 0:d.call(t),addonAfter:S=t.addonAfter,addonBefore:$=t.addonBefore,inputElement:E,affixWrapperClassName:v,wrapperClassName:g,groupClassName:o}=e;let w=ee(E,{value:h,hidden:z});if($e({prefix:c,suffix:O,allowClear:u})){const y=`${P}-affix-wrapper`,R=D(y,{[`${y}-disabled`]:p,[`${y}-focused`]:s,[`${y}-readonly`]:_,[`${y}-input-with-clear-btn`]:O&&u&&h},!ve({addonAfter:S,addonBefore:$})&&n.class,v),N=(O||u)&&C("span",{class:`${P}-suffix`},[i(),O]);w=C("span",{class:R,style:n.style,hidden:!ve({addonAfter:S,addonBefore:$})&&z,onMousedown:m,ref:a},[c&&C("span",{class:`${P}-prefix`},[c]),ee(E,{style:null,value:h,hidden:null}),N])}if(ve({addonAfter:S,addonBefore:$})){const y=`${P}-group`,R=`${y}-addon`,N=D(`${P}-wrapper`,y,g),T=D(`${P}-group-wrapper`,n.class,o);return C("span",{class:T,style:n.style,hidden:z},[C("span",{class:N},[$&&C("span",{class:R},[$]),ee(w,{style:null,hidden:null}),S&&C("span",{class:R},[S])])])}return w}}});var ut=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const st=q({name:"VCInput",inheritAttrs:!1,props:De(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=W(e.value===void 0?e.defaultValue:e.value),l=W(!1),d=W(),s=W();se(()=>e.value,()=>{i.value=e.value}),se(()=>e.disabled,()=>{e.disabled&&(l.value=!1)});const h=o=>{d.value&&Ve(d.value.input,o)},p=()=>{var o;(o=d.value.input)===null||o===void 0||o.blur()},u=(o,w,y)=>{var R;(R=d.value.input)===null||R===void 0||R.setSelectionRange(o,w,y)},_=()=>{var o;(o=d.value.input)===null||o===void 0||o.select()};a({focus:h,blur:p,input:Y(()=>{var o;return(o=d.value.input)===null||o===void 0?void 0:o.input}),stateValue:i,setSelectionRange:u,select:_});const z=o=>{m("change",o)},P=(o,w)=>{i.value!==o&&(e.value===void 0?i.value=o:pe(()=>{var y;d.value.input.value!==i.value&&((y=s.value)===null||y===void 0||y.$forceUpdate())}),pe(()=>{w&&w()}))},c=o=>{const{value:w}=o.target;if(i.value===w)return;const y=o.target.value;re(d.value.input,o,z),P(y)},O=o=>{o.keyCode===13&&m("pressEnter",o),m("keydown",o)},S=o=>{l.value=!0,m("focus",o)},$=o=>{l.value=!1,m("blur",o)},E=o=>{re(d.value.input,o,z),P("",()=>{h()})},v=()=>{var o,w;const{addonBefore:y=t.addonBefore,addonAfter:R=t.addonAfter,disabled:N,valueModifiers:T={},htmlSize:x,autocomplete:I,prefixCls:F,inputClassName:j,prefix:L=(o=t.prefix)===null||o===void 0?void 0:o.call(t),suffix:G=(w=t.suffix)===null||w===void 0?void 0:w.call(t),allowClear:r,type:b="text"}=e,B=X(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),M=A(A(A({},B),n),{autocomplete:I,onChange:c,onInput:c,onFocus:S,onBlur:$,onKeydown:O,class:D(F,{[`${F}-disabled`]:N},j,!ve({addonAfter:R,addonBefore:y})&&!$e({prefix:L,suffix:G,allowClear:r})&&n.class),ref:d,key:"ant-input",size:x,type:b,lazy:e.lazy});return T.lazy&&delete M.onInput,M.autofocus||delete M.autofocus,C(je,X(M,["size"]),null)},g=()=>{var o;const{maxlength:w,suffix:y=(o=t.suffix)===null||o===void 0?void 0:o.call(t),showCount:R,prefixCls:N}=e,T=Number(w)>0;if(y||R){const x=[...Ce(i.value)].length,I=typeof R=="object"?R.formatter({count:x,maxlength:w}):`${x}${T?` / ${w}`:""}`;return C(Te,null,[!!R&&C("span",{class:D(`${N}-show-count-suffix`,{[`${N}-show-count-has-suffix`]:!!y})},[I]),y])}return null};return Fe(()=>{}),()=>{const{prefixCls:o,disabled:w}=e,y=ut(e,["prefixCls","disabled"]);return C(rt,V(V(V({},y),n),{},{ref:s,prefixCls:o,inputElement:v(),handleReset:E,value:Ce(i.value),focused:l.value,triggerFocus:h,suffix:g(),disabled:w}),t)}}}),me=()=>X(De(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),Ue=()=>A(A({},X(me(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Ae(),onCompositionend:Ae(),valueModifiers:Object});var it=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const k=q({compatConfig:{MODE:3},name:"AInput",inheritAttrs:!1,props:me(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=Z(),l=Ee(),d=ue.useInject(),s=Y(()=>we(d.status,e.status)),{direction:h,prefixCls:p,size:u,autocomplete:_}=ie("input",e),{compactSize:z,compactItemClassnames:P}=tt(p,h),c=Y(()=>z.value||u.value),[O,S]=Ie(p),$=Re();a({focus:x=>{var I;(I=i.value)===null||I===void 0||I.focus(x)},blur:()=>{var x;(x=i.value)===null||x===void 0||x.blur()},input:i,setSelectionRange:(x,I,F)=>{var j;(j=i.value)===null||j===void 0||j.setSelectionRange(x,I,F)},select:()=>{var x;(x=i.value)===null||x===void 0||x.select()}});const w=Z([]),y=()=>{w.value.push(setTimeout(()=>{var x,I,F,j;!((x=i.value)===null||x===void 0)&&x.input&&((I=i.value)===null||I===void 0?void 0:I.input.getAttribute("type"))==="password"&&(!((F=i.value)===null||F===void 0)&&F.input.hasAttribute("value"))&&((j=i.value)===null||j===void 0||j.input.removeAttribute("value"))}))};Fe(()=>{y()}),qe(()=>{w.value.forEach(x=>clearTimeout(x))}),ye(()=>{w.value.forEach(x=>clearTimeout(x))});const R=x=>{y(),m("blur",x),l.onFieldBlur()},N=x=>{y(),m("focus",x)},T=x=>{m("update:value",x.target.value),m("change",x),m("input",x),l.onFieldChange()};return()=>{var x,I,F,j,L,G;const{hasFeedback:r,feedbackIcon:b}=d,{allowClear:B,bordered:M=!0,prefix:U=(x=t.prefix)===null||x===void 0?void 0:x.call(t),suffix:ae=(I=t.suffix)===null||I===void 0?void 0:I.call(t),addonAfter:de=(F=t.addonAfter)===null||F===void 0?void 0:F.call(t),addonBefore:te=(j=t.addonBefore)===null||j===void 0?void 0:j.call(t),id:ce=(L=l.id)===null||L===void 0?void 0:L.value}=e,ne=it(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),Le=(r||ae)&&C(Te,null,[ae,r&&b]),H=p.value,We=$e({prefix:U,suffix:ae})||!!r,Ge=t.clearIcon||(()=>C(Me,null,null));return O(C(st,V(V(V({},n),X(ne,["onUpdate:value","onChange","onInput"])),{},{onChange:T,id:ce,disabled:(G=e.disabled)!==null&&G!==void 0?G:$.value,ref:i,prefixCls:H,autocomplete:_.value,onBlur:R,onFocus:N,prefix:U,suffix:Le,allowClear:B,addonAfter:de&&C(ze,null,{default:()=>[C(_e,null,{default:()=>[de]})]}),addonBefore:te&&C(ze,null,{default:()=>[C(_e,null,{default:()=>[te]})]}),class:[n.class,P.value],inputClassName:D({[`${H}-sm`]:c.value==="small",[`${H}-lg`]:c.value==="large",[`${H}-rtl`]:h.value==="rtl",[`${H}-borderless`]:!M},!We&&le(H,s.value),S.value),affixWrapperClassName:D({[`${H}-affix-wrapper-sm`]:c.value==="small",[`${H}-affix-wrapper-lg`]:c.value==="large",[`${H}-affix-wrapper-rtl`]:h.value==="rtl",[`${H}-affix-wrapper-borderless`]:!M},le(`${H}-affix-wrapper`,s.value,r),S.value),wrapperClassName:D({[`${H}-group-rtl`]:h.value==="rtl"},S.value),groupClassName:D({[`${H}-group-wrapper-sm`]:c.value==="small",[`${H}-group-wrapper-lg`]:c.value==="large",[`${H}-group-wrapper-rtl`]:h.value==="rtl"},le(`${H}-group-wrapper`,s.value,r),S.value)}),A(A({},t),{clearIcon:Ge})))}}}),dt=q({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,f){let{slots:t,attrs:n}=f;const{prefixCls:a,direction:m,getPrefixCls:i}=ie("input-group",e),l=ue.useInject();ue.useProvide(l,{isFormItemInput:!1});const d=Y(()=>i("input")),[s,h]=Ie(d),p=Y(()=>{const u=a.value;return{[`${u}`]:!0,[h.value]:!0,[`${u}-lg`]:e.size==="large",[`${u}-sm`]:e.size==="small",[`${u}-compact`]:e.compact,[`${u}-rtl`]:m.value==="rtl"}});return()=>{var u;return s(C("span",V(V({},n),{},{class:D(p.value,n.class)}),[(u=t.default)===null||u===void 0?void 0:u.call(t)]))}}});var ct=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const ft=q({compatConfig:{MODE:3},name:"AInputSearch",inheritAttrs:!1,props:A(A({},me()),{inputPrefixCls:String,enterButton:J.any,onSearch:{type:Function}}),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=W(),l=W(!1);a({focus:()=>{var v;(v=i.value)===null||v===void 0||v.focus()},blur:()=>{var v;(v=i.value)===null||v===void 0||v.blur()}});const h=v=>{m("update:value",v.target.value),v&&v.target&&v.type==="click"&&m("search",v.target.value,v),m("change",v)},p=v=>{var g;document.activeElement===((g=i.value)===null||g===void 0?void 0:g.input)&&v.preventDefault()},u=v=>{var g,o;m("search",(o=(g=i.value)===null||g===void 0?void 0:g.input)===null||o===void 0?void 0:o.stateValue,v)},_=v=>{l.value||e.loading||u(v)},z=v=>{l.value=!0,m("compositionstart",v)},P=v=>{l.value=!1,m("compositionend",v)},{prefixCls:c,getPrefixCls:O,direction:S,size:$}=ie("input-search",e),E=Y(()=>O("input",e.inputPrefixCls));return()=>{var v,g,o,w;const{disabled:y,loading:R,addonAfter:N=(v=t.addonAfter)===null||v===void 0?void 0:v.call(t),suffix:T=(g=t.suffix)===null||g===void 0?void 0:g.call(t)}=e,x=ct(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:I=(w=(o=t.enterButton)===null||o===void 0?void 0:o.call(t))!==null&&w!==void 0?w:!1}=e;I=I||I==="";const F=typeof I=="boolean"?C(Je,null,null):null,j=`${c.value}-button`,L=Array.isArray(I)?I[0]:I;let G;const r=L.type&&at(L.type)&&L.type.__ANT_BUTTON;if(r||L.tagName==="button")G=ee(L,A({onMousedown:p,onClick:u,key:"enterButton"},r?{class:j,size:$.value}:{}),!1);else{const B=F&&!I;G=C(nt,{class:j,type:I?"primary":void 0,size:$.value,disabled:y,key:"enterButton",onMousedown:p,onClick:u,loading:R,icon:B?F:null},{default:()=>[B?null:F||I]})}N&&(G=[G,N]);const b=D(c.value,{[`${c.value}-rtl`]:S.value==="rtl",[`${c.value}-${$.value}`]:!!$.value,[`${c.value}-with-button`]:!!I},n.class);return C(k,V(V(V({ref:i},X(x,["onUpdate:value","onSearch","enterButton"])),n),{},{onPressEnter:_,onCompositionstart:z,onCompositionend:P,size:$.value,prefixCls:E.value,addonAfter:G,suffix:T,onChange:h,class:b,disabled:y}),t)}}}),Pe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function vt(e){return Pe(e.addonBefore)||Pe(e.addonAfter)}const pt=["text","input"],mt=q({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:J.oneOf(Ye("text","input")),value:Q(),defaultValue:Q(),allowClear:{type:Boolean,default:void 0},element:Q(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:Q(),prefix:Q(),addonBefore:Q(),addonAfter:Q(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,f){let{slots:t,attrs:n}=f;const a=ue.useInject(),m=l=>{const{value:d,disabled:s,readonly:h,handleReset:p,suffix:u=t.suffix}=e,_=!s&&!h&&d,z=`${l}-clear-icon`;return C(Me,{onClick:p,onMousedown:P=>P.preventDefault(),class:D({[`${z}-hidden`]:!_,[`${z}-has-suffix`]:!!u},z),role:"button"},null)},i=(l,d)=>{const{value:s,allowClear:h,direction:p,bordered:u,hidden:_,status:z,addonAfter:P=t.addonAfter,addonBefore:c=t.addonBefore,hashId:O}=e,{status:S,hasFeedback:$}=a;if(!h)return ee(d,{value:s,disabled:e.disabled});const E=D(`${l}-affix-wrapper`,`${l}-affix-wrapper-textarea-with-clear-btn`,le(`${l}-affix-wrapper`,we(S,z),$),{[`${l}-affix-wrapper-rtl`]:p==="rtl",[`${l}-affix-wrapper-borderless`]:!u,[`${n.class}`]:!vt({addonAfter:P,addonBefore:c})&&n.class},O);return C("span",{class:E,style:n.style,hidden:_},[ee(d,{style:null,value:s,disabled:e.disabled}),m(l)])};return()=>{var l;const{prefixCls:d,inputType:s,element:h=(l=t.element)===null||l===void 0?void 0:l.call(t)}=e;return s===pt[0]?i(d,h):null}}}),gt=`
1
+ import{M as Oe,h as A,P as J,$ as Ke,i as D,f as V,H as Ae,q as ie,L as Re,a5 as Q,O as Ye,w as Ze,U as Xe}from"./index-b8GbH2Yi.js";import{a as Ee,F as ue,N as _e}from"./FormItemContext-9E9dNGtx.js";import{g as le,a as we}from"./statusUtils-BGKLoeEt.js";import{o as X}from"./omit-QvpKbF8p.js";import{c as ee}from"./vnode-B6WqjmE4.js";import{d as q,c as C,r as Z,s as W,w as se,f as Y,o as Fe,F as Te,n as pe,a7 as qe,e as ye,b as Se,g as Ne}from"./vendor-DhFY8mDK.js";import{B as je}from"./BaseInput-BJzs_ZtT.js";import{C as Me,t as Je,as as Qe,aU as et}from"./icons-BOPtEWK4.js";import{u as tt,N as ze}from"./Compact-3_bEraVw.js";import{u as Ie}from"./index-Cmzh8gKL.js";import{B as nt}from"./index-BHi69MHF.js";import{i as at}from"./isPlainObject-_gz-soRW.js";import{R as lt}from"./index-BHGsFwYW.js";import{w as fe}from"./raf-Deuc0E8-.js";import"./createContext-CFcZly5M.js";import"./_getTag-BVc6NQ_K.js";import"./compact-item-BSbAYGGF.js";import"./index-Cj47XwJQ.js";import"./isVisible-C7tPsqfj.js";import"./useState-DGS1NOyn.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./initDefaultProps-DnadEaxu.js";import"./ResizeObserver.es-D6qJbdzf.js";const oe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function $e(e){return oe(e.prefix)||oe(e.suffix)||oe(e.allowClear)}function ve(e){return oe(e.addonBefore)||oe(e.addonAfter)}function Ce(e){return typeof e>"u"||e===null?"":String(e)}function re(e,f,t,n){if(!t)return;const a=f;if(f.type==="click"){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0});const m=e.cloneNode(!0);a.target=m,a.currentTarget=m,m.value="",t(a);return}if(n!==void 0){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0}),a.target=e,a.currentTarget=e,e.value=n,t(a);return}t(a)}function Ve(e,f){if(!e)return;e.focus(f);const{cursor:t}=f||{};if(t){const n=e.value.length;switch(t){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}const ot=()=>({addonBefore:J.any,addonAfter:J.any,prefix:J.any,suffix:J.any,clearIcon:J.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),ke=()=>A(A({},ot()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:J.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),De=()=>A(A({},ke()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ke("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),rt=q({name:"BaseInput",inheritAttrs:!1,props:ke(),setup(e,f){let{slots:t,attrs:n}=f;const a=Z(),m=l=>{var d;if(!((d=a.value)===null||d===void 0)&&d.contains(l.target)){const{triggerFocus:s}=e;s?.()}},i=()=>{var l;const{allowClear:d,value:s,disabled:h,readonly:p,handleReset:u,suffix:_=t.suffix,prefixCls:z}=e;if(!d)return null;const P=!h&&!p&&s,c=`${z}-clear-icon`,O=((l=t.clearIcon)===null||l===void 0?void 0:l.call(t))||"*";return C("span",{onClick:u,onMousedown:S=>S.preventDefault(),class:D({[`${c}-hidden`]:!P,[`${c}-has-suffix`]:!!_},c),role:"button",tabindex:-1},[O])};return()=>{var l,d;const{focused:s,value:h,disabled:p,allowClear:u,readonly:_,hidden:z,prefixCls:P,prefix:c=(l=t.prefix)===null||l===void 0?void 0:l.call(t),suffix:O=(d=t.suffix)===null||d===void 0?void 0:d.call(t),addonAfter:S=t.addonAfter,addonBefore:$=t.addonBefore,inputElement:E,affixWrapperClassName:v,wrapperClassName:g,groupClassName:o}=e;let w=ee(E,{value:h,hidden:z});if($e({prefix:c,suffix:O,allowClear:u})){const y=`${P}-affix-wrapper`,R=D(y,{[`${y}-disabled`]:p,[`${y}-focused`]:s,[`${y}-readonly`]:_,[`${y}-input-with-clear-btn`]:O&&u&&h},!ve({addonAfter:S,addonBefore:$})&&n.class,v),N=(O||u)&&C("span",{class:`${P}-suffix`},[i(),O]);w=C("span",{class:R,style:n.style,hidden:!ve({addonAfter:S,addonBefore:$})&&z,onMousedown:m,ref:a},[c&&C("span",{class:`${P}-prefix`},[c]),ee(E,{style:null,value:h,hidden:null}),N])}if(ve({addonAfter:S,addonBefore:$})){const y=`${P}-group`,R=`${y}-addon`,N=D(`${P}-wrapper`,y,g),T=D(`${P}-group-wrapper`,n.class,o);return C("span",{class:T,style:n.style,hidden:z},[C("span",{class:N},[$&&C("span",{class:R},[$]),ee(w,{style:null,hidden:null}),S&&C("span",{class:R},[S])])])}return w}}});var ut=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const st=q({name:"VCInput",inheritAttrs:!1,props:De(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=W(e.value===void 0?e.defaultValue:e.value),l=W(!1),d=W(),s=W();se(()=>e.value,()=>{i.value=e.value}),se(()=>e.disabled,()=>{e.disabled&&(l.value=!1)});const h=o=>{d.value&&Ve(d.value.input,o)},p=()=>{var o;(o=d.value.input)===null||o===void 0||o.blur()},u=(o,w,y)=>{var R;(R=d.value.input)===null||R===void 0||R.setSelectionRange(o,w,y)},_=()=>{var o;(o=d.value.input)===null||o===void 0||o.select()};a({focus:h,blur:p,input:Y(()=>{var o;return(o=d.value.input)===null||o===void 0?void 0:o.input}),stateValue:i,setSelectionRange:u,select:_});const z=o=>{m("change",o)},P=(o,w)=>{i.value!==o&&(e.value===void 0?i.value=o:pe(()=>{var y;d.value.input.value!==i.value&&((y=s.value)===null||y===void 0||y.$forceUpdate())}),pe(()=>{w&&w()}))},c=o=>{const{value:w}=o.target;if(i.value===w)return;const y=o.target.value;re(d.value.input,o,z),P(y)},O=o=>{o.keyCode===13&&m("pressEnter",o),m("keydown",o)},S=o=>{l.value=!0,m("focus",o)},$=o=>{l.value=!1,m("blur",o)},E=o=>{re(d.value.input,o,z),P("",()=>{h()})},v=()=>{var o,w;const{addonBefore:y=t.addonBefore,addonAfter:R=t.addonAfter,disabled:N,valueModifiers:T={},htmlSize:x,autocomplete:I,prefixCls:F,inputClassName:j,prefix:L=(o=t.prefix)===null||o===void 0?void 0:o.call(t),suffix:G=(w=t.suffix)===null||w===void 0?void 0:w.call(t),allowClear:r,type:b="text"}=e,B=X(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),M=A(A(A({},B),n),{autocomplete:I,onChange:c,onInput:c,onFocus:S,onBlur:$,onKeydown:O,class:D(F,{[`${F}-disabled`]:N},j,!ve({addonAfter:R,addonBefore:y})&&!$e({prefix:L,suffix:G,allowClear:r})&&n.class),ref:d,key:"ant-input",size:x,type:b,lazy:e.lazy});return T.lazy&&delete M.onInput,M.autofocus||delete M.autofocus,C(je,X(M,["size"]),null)},g=()=>{var o;const{maxlength:w,suffix:y=(o=t.suffix)===null||o===void 0?void 0:o.call(t),showCount:R,prefixCls:N}=e,T=Number(w)>0;if(y||R){const x=[...Ce(i.value)].length,I=typeof R=="object"?R.formatter({count:x,maxlength:w}):`${x}${T?` / ${w}`:""}`;return C(Te,null,[!!R&&C("span",{class:D(`${N}-show-count-suffix`,{[`${N}-show-count-has-suffix`]:!!y})},[I]),y])}return null};return Fe(()=>{}),()=>{const{prefixCls:o,disabled:w}=e,y=ut(e,["prefixCls","disabled"]);return C(rt,V(V(V({},y),n),{},{ref:s,prefixCls:o,inputElement:v(),handleReset:E,value:Ce(i.value),focused:l.value,triggerFocus:h,suffix:g(),disabled:w}),t)}}}),me=()=>X(De(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),Ue=()=>A(A({},X(me(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Ae(),onCompositionend:Ae(),valueModifiers:Object});var it=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const k=q({compatConfig:{MODE:3},name:"AInput",inheritAttrs:!1,props:me(),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=Z(),l=Ee(),d=ue.useInject(),s=Y(()=>we(d.status,e.status)),{direction:h,prefixCls:p,size:u,autocomplete:_}=ie("input",e),{compactSize:z,compactItemClassnames:P}=tt(p,h),c=Y(()=>z.value||u.value),[O,S]=Ie(p),$=Re();a({focus:x=>{var I;(I=i.value)===null||I===void 0||I.focus(x)},blur:()=>{var x;(x=i.value)===null||x===void 0||x.blur()},input:i,setSelectionRange:(x,I,F)=>{var j;(j=i.value)===null||j===void 0||j.setSelectionRange(x,I,F)},select:()=>{var x;(x=i.value)===null||x===void 0||x.select()}});const w=Z([]),y=()=>{w.value.push(setTimeout(()=>{var x,I,F,j;!((x=i.value)===null||x===void 0)&&x.input&&((I=i.value)===null||I===void 0?void 0:I.input.getAttribute("type"))==="password"&&(!((F=i.value)===null||F===void 0)&&F.input.hasAttribute("value"))&&((j=i.value)===null||j===void 0||j.input.removeAttribute("value"))}))};Fe(()=>{y()}),qe(()=>{w.value.forEach(x=>clearTimeout(x))}),ye(()=>{w.value.forEach(x=>clearTimeout(x))});const R=x=>{y(),m("blur",x),l.onFieldBlur()},N=x=>{y(),m("focus",x)},T=x=>{m("update:value",x.target.value),m("change",x),m("input",x),l.onFieldChange()};return()=>{var x,I,F,j,L,G;const{hasFeedback:r,feedbackIcon:b}=d,{allowClear:B,bordered:M=!0,prefix:U=(x=t.prefix)===null||x===void 0?void 0:x.call(t),suffix:ae=(I=t.suffix)===null||I===void 0?void 0:I.call(t),addonAfter:de=(F=t.addonAfter)===null||F===void 0?void 0:F.call(t),addonBefore:te=(j=t.addonBefore)===null||j===void 0?void 0:j.call(t),id:ce=(L=l.id)===null||L===void 0?void 0:L.value}=e,ne=it(e,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),Le=(r||ae)&&C(Te,null,[ae,r&&b]),H=p.value,We=$e({prefix:U,suffix:ae})||!!r,Ge=t.clearIcon||(()=>C(Me,null,null));return O(C(st,V(V(V({},n),X(ne,["onUpdate:value","onChange","onInput"])),{},{onChange:T,id:ce,disabled:(G=e.disabled)!==null&&G!==void 0?G:$.value,ref:i,prefixCls:H,autocomplete:_.value,onBlur:R,onFocus:N,prefix:U,suffix:Le,allowClear:B,addonAfter:de&&C(ze,null,{default:()=>[C(_e,null,{default:()=>[de]})]}),addonBefore:te&&C(ze,null,{default:()=>[C(_e,null,{default:()=>[te]})]}),class:[n.class,P.value],inputClassName:D({[`${H}-sm`]:c.value==="small",[`${H}-lg`]:c.value==="large",[`${H}-rtl`]:h.value==="rtl",[`${H}-borderless`]:!M},!We&&le(H,s.value),S.value),affixWrapperClassName:D({[`${H}-affix-wrapper-sm`]:c.value==="small",[`${H}-affix-wrapper-lg`]:c.value==="large",[`${H}-affix-wrapper-rtl`]:h.value==="rtl",[`${H}-affix-wrapper-borderless`]:!M},le(`${H}-affix-wrapper`,s.value,r),S.value),wrapperClassName:D({[`${H}-group-rtl`]:h.value==="rtl"},S.value),groupClassName:D({[`${H}-group-wrapper-sm`]:c.value==="small",[`${H}-group-wrapper-lg`]:c.value==="large",[`${H}-group-wrapper-rtl`]:h.value==="rtl"},le(`${H}-group-wrapper`,s.value,r),S.value)}),A(A({},t),{clearIcon:Ge})))}}}),dt=q({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(e,f){let{slots:t,attrs:n}=f;const{prefixCls:a,direction:m,getPrefixCls:i}=ie("input-group",e),l=ue.useInject();ue.useProvide(l,{isFormItemInput:!1});const d=Y(()=>i("input")),[s,h]=Ie(d),p=Y(()=>{const u=a.value;return{[`${u}`]:!0,[h.value]:!0,[`${u}-lg`]:e.size==="large",[`${u}-sm`]:e.size==="small",[`${u}-compact`]:e.compact,[`${u}-rtl`]:m.value==="rtl"}});return()=>{var u;return s(C("span",V(V({},n),{},{class:D(p.value,n.class)}),[(u=t.default)===null||u===void 0?void 0:u.call(t)]))}}});var ct=function(e,f){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&f.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)f.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const ft=q({compatConfig:{MODE:3},name:"AInputSearch",inheritAttrs:!1,props:A(A({},me()),{inputPrefixCls:String,enterButton:J.any,onSearch:{type:Function}}),setup(e,f){let{slots:t,attrs:n,expose:a,emit:m}=f;const i=W(),l=W(!1);a({focus:()=>{var v;(v=i.value)===null||v===void 0||v.focus()},blur:()=>{var v;(v=i.value)===null||v===void 0||v.blur()}});const h=v=>{m("update:value",v.target.value),v&&v.target&&v.type==="click"&&m("search",v.target.value,v),m("change",v)},p=v=>{var g;document.activeElement===((g=i.value)===null||g===void 0?void 0:g.input)&&v.preventDefault()},u=v=>{var g,o;m("search",(o=(g=i.value)===null||g===void 0?void 0:g.input)===null||o===void 0?void 0:o.stateValue,v)},_=v=>{l.value||e.loading||u(v)},z=v=>{l.value=!0,m("compositionstart",v)},P=v=>{l.value=!1,m("compositionend",v)},{prefixCls:c,getPrefixCls:O,direction:S,size:$}=ie("input-search",e),E=Y(()=>O("input",e.inputPrefixCls));return()=>{var v,g,o,w;const{disabled:y,loading:R,addonAfter:N=(v=t.addonAfter)===null||v===void 0?void 0:v.call(t),suffix:T=(g=t.suffix)===null||g===void 0?void 0:g.call(t)}=e,x=ct(e,["disabled","loading","addonAfter","suffix"]);let{enterButton:I=(w=(o=t.enterButton)===null||o===void 0?void 0:o.call(t))!==null&&w!==void 0?w:!1}=e;I=I||I==="";const F=typeof I=="boolean"?C(Je,null,null):null,j=`${c.value}-button`,L=Array.isArray(I)?I[0]:I;let G;const r=L.type&&at(L.type)&&L.type.__ANT_BUTTON;if(r||L.tagName==="button")G=ee(L,A({onMousedown:p,onClick:u,key:"enterButton"},r?{class:j,size:$.value}:{}),!1);else{const B=F&&!I;G=C(nt,{class:j,type:I?"primary":void 0,size:$.value,disabled:y,key:"enterButton",onMousedown:p,onClick:u,loading:R,icon:B?F:null},{default:()=>[B?null:F||I]})}N&&(G=[G,N]);const b=D(c.value,{[`${c.value}-rtl`]:S.value==="rtl",[`${c.value}-${$.value}`]:!!$.value,[`${c.value}-with-button`]:!!I},n.class);return C(k,V(V(V({ref:i},X(x,["onUpdate:value","onSearch","enterButton"])),n),{},{onPressEnter:_,onCompositionstart:z,onCompositionend:P,size:$.value,prefixCls:E.value,addonAfter:G,suffix:T,onChange:h,class:b,disabled:y}),t)}}}),Pe=e=>e!=null&&(Array.isArray(e)?Oe(e).length:!0);function vt(e){return Pe(e.addonBefore)||Pe(e.addonAfter)}const pt=["text","input"],mt=q({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:J.oneOf(Ye("text","input")),value:Q(),defaultValue:Q(),allowClear:{type:Boolean,default:void 0},element:Q(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:Q(),prefix:Q(),addonBefore:Q(),addonAfter:Q(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(e,f){let{slots:t,attrs:n}=f;const a=ue.useInject(),m=l=>{const{value:d,disabled:s,readonly:h,handleReset:p,suffix:u=t.suffix}=e,_=!s&&!h&&d,z=`${l}-clear-icon`;return C(Me,{onClick:p,onMousedown:P=>P.preventDefault(),class:D({[`${z}-hidden`]:!_,[`${z}-has-suffix`]:!!u},z),role:"button"},null)},i=(l,d)=>{const{value:s,allowClear:h,direction:p,bordered:u,hidden:_,status:z,addonAfter:P=t.addonAfter,addonBefore:c=t.addonBefore,hashId:O}=e,{status:S,hasFeedback:$}=a;if(!h)return ee(d,{value:s,disabled:e.disabled});const E=D(`${l}-affix-wrapper`,`${l}-affix-wrapper-textarea-with-clear-btn`,le(`${l}-affix-wrapper`,we(S,z),$),{[`${l}-affix-wrapper-rtl`]:p==="rtl",[`${l}-affix-wrapper-borderless`]:!u,[`${n.class}`]:!vt({addonAfter:P,addonBefore:c})&&n.class},O);return C("span",{class:E,style:n.style,hidden:_},[ee(d,{style:null,value:s,disabled:e.disabled}),m(l)])};return()=>{var l;const{prefixCls:d,inputType:s,element:h=(l=t.element)===null||l===void 0?void 0:l.call(t)}=e;return s===pt[0]?i(d,h):null}}}),gt=`
2
2
  min-height:0 !important;
3
3
  max-height:none !important;
4
4
  height:0 !important;