chainlesschain 0.156.6 → 0.156.7

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 (113) hide show
  1. package/README.md +24 -0
  2. package/package.json +2 -1
  3. package/src/assets/web-panel/assets/{ActionButton-Dme4LGax.js → ActionButton-Cs4QdjYb.js} +1 -1
  4. package/src/assets/web-panel/assets/{Analytics-B3-5BjRm.js → Analytics-Xot0e9TT.js} +1 -1
  5. package/src/assets/web-panel/assets/{AppLayout-DvVLRyPs.js → AppLayout-3qsE1-pz.js} +1 -1
  6. package/src/assets/web-panel/assets/{BaseInput-wLmjCc9u.js → BaseInput-Tg40P4JM.js} +1 -1
  7. package/src/assets/web-panel/assets/{Checkbox-BfbEUJDW.js → Checkbox-CheA2Ety.js} +1 -1
  8. package/src/assets/web-panel/assets/{Col-HJI40OzO.js → Col-Cdfsmnaq.js} +1 -1
  9. package/src/assets/web-panel/assets/{Compact-ADVAwcbQ.js → Compact-D3LSgEpW.js} +1 -1
  10. package/src/assets/web-panel/assets/{Cron-DcNB5TYu.js → Cron-9MV6k-MV.js} +1 -1
  11. package/src/assets/web-panel/assets/{Dashboard-p_Wuj0Un.js → Dashboard-A1TZC5_t.js} +1 -1
  12. package/src/assets/web-panel/assets/{Dropdown-CrXGzreQ.js → Dropdown-DZxUTZvw.js} +1 -1
  13. package/src/assets/web-panel/assets/{FormItemContext-B97Dibo2.js → FormItemContext-C3_-j_SR.js} +1 -1
  14. package/src/assets/web-panel/assets/{Git-90CPsOOr.js → Git-Cw-gW-kh.js} +1 -1
  15. package/src/assets/web-panel/assets/{Memory-B_3zNQNB.js → Memory-CMweTJyn.js} +1 -1
  16. package/src/assets/web-panel/assets/{Notes-DNQz9UXh.js → Notes-B_W3BfZF.js} +1 -1
  17. package/src/assets/web-panel/assets/{Organization-CgXUnp-W.js → Organization-Dz_jGbAM.js} +1 -1
  18. package/src/assets/web-panel/assets/{Overflow-BVsn6SM5.js → Overflow-Dka3nWV9.js} +1 -1
  19. package/src/assets/web-panel/assets/{Permissions-DIFqcnjU.js → Permissions-DvXVIlHX.js} +1 -1
  20. package/src/assets/web-panel/assets/{Providers-mscN7CK5.js → Providers-DUfX_ynl.js} +1 -1
  21. package/src/assets/web-panel/assets/{Row-BFUWxIkx.js → Row-DZhDSo2Q.js} +1 -1
  22. package/src/assets/web-panel/assets/{RssFeed-Dpa4h-q_.js → RssFeed-CHQpUl3h.js} +1 -1
  23. package/src/assets/web-panel/assets/{Security-DR6HKo_S.js → Security-FUSOn89T.js} +1 -1
  24. package/src/assets/web-panel/assets/{Skeleton-VNikEgM4.js → Skeleton-DxmZ7zRw.js} +1 -1
  25. package/src/assets/web-panel/assets/{Templates-Ny_4GO6a.js → Templates-BVbmyn38.js} +1 -1
  26. package/src/assets/web-panel/assets/{Trigger-C7MTh_xj.js → Trigger-xAvohiq9.js} +1 -1
  27. package/src/assets/web-panel/assets/{VideoEditing-BNRFHgJ9.js → VideoEditing-BUWYQv2y.js} +1 -1
  28. package/src/assets/web-panel/assets/{Wallet-BUfg4IAx.js → Wallet-BDYdEwFf.js} +1 -1
  29. package/src/assets/web-panel/assets/{WebAuthn-Cia89OyQ.js → WebAuthn-CvpuagtK.js} +1 -1
  30. package/src/assets/web-panel/assets/{WorkflowEditor-C1OsMtqv.js → WorkflowEditor-BR7W5cjw.js} +1 -1
  31. package/src/assets/web-panel/assets/{colors-C_wDMX2Q.js → colors-C5kDbQCi.js} +1 -1
  32. package/src/assets/web-panel/assets/{compact-item-C1ikzEN-.js → compact-item-Bo_1zDrX.js} +1 -1
  33. package/src/assets/web-panel/assets/{createContext-XExBTk9v.js → createContext-CniPpJsG.js} +1 -1
  34. package/src/assets/web-panel/assets/{hasIn-mXvd_Kdq.js → hasIn-ClDc6Sz8.js} +1 -1
  35. package/src/assets/web-panel/assets/{index-D6Hyy0Bc.js → index--lcO-bOn.js} +1 -1
  36. package/src/assets/web-panel/assets/{index-lPIeHtHE.js → index-6tQekF0Y.js} +1 -1
  37. package/src/assets/web-panel/assets/{index-BfncNR8d.js → index-8qWxPHSb.js} +1 -1
  38. package/src/assets/web-panel/assets/{index-C53dnYiq.js → index-B7nGNm_C.js} +1 -1
  39. package/src/assets/web-panel/assets/{index-CMYADk0v.js → index-B8y0NO-M.js} +1 -1
  40. package/src/assets/web-panel/assets/{index-DMcLOtIo.js → index-BAlSSCbs.js} +1 -1
  41. package/src/assets/web-panel/assets/{index-DJkIheU6.js → index-BCXFoTAw.js} +1 -1
  42. package/src/assets/web-panel/assets/{index-kLUQdSDJ.js → index-BHruTebo.js} +1 -1
  43. package/src/assets/web-panel/assets/{index-1ZqkTPt2.js → index-BJx6C3J8.js} +1 -1
  44. package/src/assets/web-panel/assets/{index-CbpKJ2W0.js → index-BUTCJTbj.js} +1 -1
  45. package/src/assets/web-panel/assets/{index-B6P9mWuk.js → index-BYShDlZ0.js} +1 -1
  46. package/src/assets/web-panel/assets/{index-D9tzxSFs.js → index-Bv2OmZAS.js} +1 -1
  47. package/src/assets/web-panel/assets/{index-BFFb9yPd.js → index-C92K4iDE.js} +1 -1
  48. package/src/assets/web-panel/assets/{index-v4Oi0d0l.js → index-CCdb36il.js} +1 -1
  49. package/src/assets/web-panel/assets/{index-B-TI0cZ2.js → index-CKR2ITFk.js} +1 -1
  50. package/src/assets/web-panel/assets/{index-fLUJs2Sr.js → index-CMcGcbea.js} +1 -1
  51. package/src/assets/web-panel/assets/{index-BirLVqrC.js → index-CTetsi8W.js} +1 -1
  52. package/src/assets/web-panel/assets/{index-LpE6Six-.js → index-CXxLp7Aw.js} +1 -1
  53. package/src/assets/web-panel/assets/{index-qtDQSqTG.js → index-CeSV8f3b.js} +1 -1
  54. package/src/assets/web-panel/assets/{index-DwMlStra.js → index-Ch5mAXeh.js} +1 -1
  55. package/src/assets/web-panel/assets/{index-BOqmUcij.js → index-CwhWEkmA.js} +1 -1
  56. package/src/assets/web-panel/assets/{index-D_oSE2Nk.js → index-D2fe9a6f.js} +1 -1
  57. package/src/assets/web-panel/assets/index-D3UDIt7h.js +1 -0
  58. package/src/assets/web-panel/assets/{index-CxwU-EjS.js → index-D90sLw5Q.js} +1 -1
  59. package/src/assets/web-panel/assets/{index-D1eekAaa.js → index-D9bolkbl.js} +1 -1
  60. package/src/assets/web-panel/assets/{index-BL27IhbN.js → index-DNY0K7iI.js} +1 -1
  61. package/src/assets/web-panel/assets/{index-Du7KGlCP.js → index-DSiHmo4b.js} +1 -1
  62. package/src/assets/web-panel/assets/{index-CttcpCq_.js → index-DTYnvYqB.js} +1 -1
  63. package/src/assets/web-panel/assets/{index-jg5cpQg9.js → index-DaLYbr0E.js} +1 -1
  64. package/src/assets/web-panel/assets/{index-DYLE4bnY.js → index-DkSNIJhM.js} +1 -1
  65. package/src/assets/web-panel/assets/{index-DZjQgmBq.js → index-DnQkqOZj.js} +1 -1
  66. package/src/assets/web-panel/assets/{index-DaMG8ksh.js → index-Dn_OQQaV.js} +3 -3
  67. package/src/assets/web-panel/assets/{index-Dz6RDRcu.js → index-Dtfrhky9.js} +1 -1
  68. package/src/assets/web-panel/assets/{index-CTle6zcb.js → index-JNbd08FN.js} +1 -1
  69. package/src/assets/web-panel/assets/index-PT376OZM.js +1 -0
  70. package/src/assets/web-panel/assets/{index-BBOVB9YK.js → index-cIgCeEqo.js} +1 -1
  71. package/src/assets/web-panel/assets/{index-a0qENb5U.js → index-vBi4x_6g.js} +1 -1
  72. package/src/assets/web-panel/assets/{index-C5Zv4fBx.js → index-xL8gcpmy.js} +1 -1
  73. package/src/assets/web-panel/assets/{initDefaultProps-DOj2K4bh.js → initDefaultProps-DMfJaUzk.js} +1 -1
  74. package/src/assets/web-panel/assets/{motion-joGf7r-l.js → motion-sEbWmOWo.js} +1 -1
  75. package/src/assets/web-panel/assets/{move-Cwb6tumJ.js → move-DIWXVs--.js} +1 -1
  76. package/src/assets/web-panel/assets/{omit-CPycjJ8C.js → omit-D7mkMPhu.js} +1 -1
  77. package/src/assets/web-panel/assets/{pickAttrs-CnibXC3T.js → pickAttrs-B25NUX4k.js} +1 -1
  78. package/src/assets/web-panel/assets/{placementArrow-DWcIO1y4.js → placementArrow-By1Bkq1d.js} +1 -1
  79. package/src/assets/web-panel/assets/{responsiveObserve-C5giLhLf.js → responsiveObserve-B3aCQz5r.js} +1 -1
  80. package/src/assets/web-panel/assets/{slide-zwgmm7vM.js → slide-eR-f56FQ.js} +1 -1
  81. package/src/assets/web-panel/assets/{statusUtils-CK8tJSHq.js → statusUtils-zcNWczhN.js} +1 -1
  82. package/src/assets/web-panel/assets/{styleChecker-BzLSEXyu.js → styleChecker-u9Z0IfRy.js} +1 -1
  83. package/src/assets/web-panel/assets/{transition-D4AbuDdO.js → transition-gRK4XSlW.js} +1 -1
  84. package/src/assets/web-panel/assets/{useConfigInject-ImjEZhXr.js → useConfigInject-ZEunuNHN.js} +1 -1
  85. package/src/assets/web-panel/assets/{useFlexGapSupport-Cd-PoTMl.js → useFlexGapSupport-BpbEJfeh.js} +1 -1
  86. package/src/assets/web-panel/assets/{vnode-DAWimP6X.js → vnode-DVHvXn9F.js} +1 -1
  87. package/src/assets/web-panel/assets/{zoom-u6SXbmzZ.js → zoom-ByzgJIn6.js} +1 -1
  88. package/src/assets/web-panel/index.html +1 -1
  89. package/src/commands/pack.js +463 -0
  90. package/src/commands/ui.js +6 -0
  91. package/src/gateways/ws/ws-server.js +29 -3
  92. package/src/index.js +34 -1
  93. package/src/lib/governance-v2-helpers.js +109 -0
  94. package/src/lib/packer/config-template-builder.js +151 -0
  95. package/src/lib/packer/errors.js +30 -0
  96. package/src/lib/packer/index.js +383 -0
  97. package/src/lib/packer/manifest-writer.js +93 -0
  98. package/src/lib/packer/native-prebuild-collector.js +305 -0
  99. package/src/lib/packer/pack-update-applier.js +203 -0
  100. package/src/lib/packer/pack-update-checker.js +185 -0
  101. package/src/lib/packer/pack-update-downloader.js +162 -0
  102. package/src/lib/packer/pkg-config-generator.js +325 -0
  103. package/src/lib/packer/pkg-runner.js +139 -0
  104. package/src/lib/packer/precheck.js +273 -0
  105. package/src/lib/packer/project-assets-collector.js +0 -0
  106. package/src/lib/packer/smoke-runner.js +339 -0
  107. package/src/lib/packer/web-panel-builder.js +157 -0
  108. package/src/lib/web-ui-server.js +95 -2
  109. package/src/lib/ws-server.js +1 -0
  110. package/src/runtime/agent-runtime.js +1 -0
  111. package/src/runtime/policies/agent-policy.js +1 -0
  112. package/src/assets/web-panel/assets/index-DQgS_8Fd.js +0 -1
  113. package/src/assets/web-panel/assets/index-f4W8Sok0.js +0 -1
@@ -1 +1 @@
1
- import{g as M,m as lo,r as io,u as L,c as F,_ as b,f as W,S as so,l as co}from"./useConfigInject-ImjEZhXr.js";import{_ as c,w as V,a as K,k as y,o as R,x as po}from"./index-DaMG8ksh.js";import{T as uo,t as X,a as q}from"./index-BirLVqrC.js";import{o as G}from"./omit-CPycjJ8C.js";import{b as U}from"./transition-D4AbuDdO.js";import{i as mo}from"./zoom-u6SXbmzZ.js";import{g as fo}from"./placementArrow-DWcIO1y4.js";import{P as vo}from"./colors-C_wDMX2Q.js";import{i as Z}from"./initDefaultProps-DOj2K4bh.js";import{d as J,c as d,r as Q,j as N,H as go,a2 as Co}from"./vendor-C5RM7MZO.js";import{c as H,B as xo}from"./index-BfncNR8d.js";import{ae as yo}from"./icons-CpgFsfkd.js";import{u as Po}from"./useMergedState-CXfbNKuO.js";import{K as bo}from"./KeyCode-D63Tfrq7.js";import{b as ho}from"./vnode-DAWimP6X.js";import{A as $o}from"./ActionButton-Dme4LGax.js";import"./index-U4Zd5IK6.js";import"./Trigger-C7MTh_xj.js";import"./raf-Deuc0E8-.js";import"./motion-joGf7r-l.js";import"./Portal-CFB5Y97t.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./firstNotUndefined-CLFzEa0p.js";import"./Keyframes-C7fCrnlS.js";import"./index-a0qENb5U.js";import"./useState-DRbnp348.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-C1ikzEN-.js";import"./createContext-XExBTk9v.js";import"./Compact-ADVAwcbQ.js";const So=o=>{const{componentCls:e,popoverBg:t,popoverColor:n,width:a,fontWeightStrong:v,popoverPadding:i,boxShadowSecondary:p,colorTextHeading:g,borderRadiusLG:m,zIndexPopup:C,marginXS:x,colorBgElevated:s}=o;return[{[e]:c(c({},io(o)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:C,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":s,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:t,backgroundClip:"padding-box",borderRadius:m,boxShadow:p,padding:i},[`${e}-title`]:{minWidth:a,marginBottom:x,color:g,fontWeight:v},[`${e}-inner-content`]:{color:n}})},fo(o,{colorBg:"var(--antd-arrow-background-color)"}),{[`${e}-pure`]:{position:"relative",maxWidth:"none",[`${e}-content`]:{display:"inline-block"}}}]},ko=o=>{const{componentCls:e}=o;return{[e]:vo.map(t=>{const n=o[`${t}-6`];return{[`&${e}-${t}`]:{"--antd-arrow-background-color":n,[`${e}-inner`]:{backgroundColor:n},[`${e}-arrow`]:{background:"transparent"}}}})}},To=o=>{const{componentCls:e,lineWidth:t,lineType:n,colorSplit:a,paddingSM:v,controlHeight:i,fontSize:p,lineHeight:g,padding:m}=o,C=i-Math.round(p*g),x=C/2,s=C/2-t,f=m;return{[e]:{[`${e}-inner`]:{padding:0},[`${e}-title`]:{margin:0,padding:`${x}px ${f}px ${s}px`,borderBottom:`${t}px ${n} ${a}`},[`${e}-inner-content`]:{padding:`${v}px ${f}px`}}}},Bo=M("Popover",o=>{const{colorBgElevated:e,colorText:t,wireframe:n}=o,a=lo(o,{popoverBg:e,popoverColor:t,popoverPadding:12});return[So(a),ko(a),n&&To(a),mo(a,"zoom-big")]},o=>{let{zIndexPopupBase:e}=o;return{zIndexPopup:e+30,width:177}}),wo=()=>c(c({},q()),{content:y(),title:y()}),_o=J({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:Z(wo(),c(c({},X()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(o,e){let{expose:t,slots:n,attrs:a}=e;const v=Q();K(o.visible===void 0),t({getPopupDomNode:()=>{var s,f;return(f=(s=v.value)===null||s===void 0?void 0:s.getPopupDomNode)===null||f===void 0?void 0:f.call(s)}});const{prefixCls:i,configProvider:p}=L("popover",o),[g,m]=Bo(i),C=N(()=>p.getPrefixCls()),x=()=>{var s,f;const{title:P=W((s=n.title)===null||s===void 0?void 0:s.call(n)),content:u=W((f=n.content)===null||f===void 0?void 0:f.call(n))}=o,h=!!(Array.isArray(P)?P.length:P),B=!!(Array.isArray(u)?u.length:P);return!h&&!B?null:d(go,null,[h&&d("div",{class:`${i.value}-title`},[P]),d("div",{class:`${i.value}-inner-content`},[u])])};return()=>{const s=F(o.overlayClassName,m.value);return g(d(uo,b(b(b({},G(o,["title","content"])),a),{},{prefixCls:i.value,ref:v,overlayClassName:s,transitionName:U(C.value,"zoom-big",o.transitionName),"data-popover-inject":!0}),{title:x,default:n.default}))}}}),Oo=V(_o),No=o=>{const{componentCls:e,iconCls:t,zIndexPopup:n,colorText:a,colorWarning:v,marginXS:i,fontSize:p,fontWeightStrong:g,lineHeight:m}=o;return{[e]:{zIndex:n,[`${e}-inner-content`]:{color:a},[`${e}-message`]:{position:"relative",marginBottom:i,color:a,fontSize:p,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${t}`]:{color:v,fontSize:p,flex:"none",lineHeight:1,paddingTop:(Math.round(p*m)-p)/2},"&-title":{flex:"auto",marginInlineStart:i},"&-title-only":{fontWeight:g}},[`${e}-description`]:{position:"relative",marginInlineStart:p+i,marginBottom:i,color:a,fontSize:p},[`${e}-buttons`]:{textAlign:"end",button:{marginInlineStart:i}}}}},zo=M("Popconfirm",o=>No(o),o=>{const{zIndexPopupBase:e}=o;return{zIndexPopup:e+60}});var Io=function(o,e){var t={};for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&e.indexOf(n)<0&&(t[n]=o[n]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(o);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(o,n[a])&&(t[n[a]]=o[n[a]]);return t};const Ao=()=>c(c({},q()),{prefixCls:String,content:y(),title:y(),description:y(),okType:po("primary"),disabled:{type:Boolean,default:!1},okText:y(),cancelText:y(),icon:y(),okButtonProps:R(),cancelButtonProps:R(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),Do=J({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:Z(Ao(),c(c({},X()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(o,e){let{slots:t,emit:n,expose:a,attrs:v}=e;const i=Q();K(o.visible===void 0),a({getPopupDomNode:()=>{var r,l;return(l=(r=i.value)===null||r===void 0?void 0:r.getPopupDomNode)===null||l===void 0?void 0:l.call(r)}});const[p,g]=Po(!1,{value:Co(o,"open")}),m=(r,l)=>{o.open===void 0&&g(r),n("update:open",r),n("openChange",r,l)},C=r=>{m(!1,r)},x=r=>{var l;return(l=o.onConfirm)===null||l===void 0?void 0:l.call(o,r)},s=r=>{var l;m(!1,r),(l=o.onCancel)===null||l===void 0||l.call(o,r)},f=r=>{r.keyCode===bo.ESC&&p&&m(!1,r)},P=r=>{const{disabled:l}=o;l||m(r)},{prefixCls:u,getPrefixCls:h}=L("popconfirm",o),B=N(()=>h()),Y=N(()=>h("btn")),[oo]=zo(u),[z]=so("Popconfirm",co.Popconfirm),eo=()=>{var r,l,$,S,k;const{okButtonProps:T,cancelButtonProps:w,title:_=(r=t.title)===null||r===void 0?void 0:r.call(t),description:O=(l=t.description)===null||l===void 0?void 0:l.call(t),cancelText:to=($=t.cancel)===null||$===void 0?void 0:$.call(t),okText:no=(S=t.okText)===null||S===void 0?void 0:S.call(t),okType:I,icon:A=((k=t.icon)===null||k===void 0?void 0:k.call(t))||d(yo,null,null),showCancel:ro=!0}=o,{cancelButton:D,okButton:j}=t,E=c({onClick:s,size:"small"},w),ao=c(c(c({onClick:x},H(I)),{size:"small"}),T);return d("div",{class:`${u.value}-inner-content`},[d("div",{class:`${u.value}-message`},[A&&d("span",{class:`${u.value}-message-icon`},[A]),d("div",{class:[`${u.value}-message-title`,{[`${u.value}-message-title-only`]:!!O}]},[_])]),O&&d("div",{class:`${u.value}-description`},[O]),d("div",{class:`${u.value}-buttons`},[ro?D?D(E):d(xo,E,{default:()=>[to||z.value.cancelText]}):null,j?j(ao):d($o,{buttonProps:c(c({size:"small"},H(I)),T),actionFn:x,close:C,prefixCls:Y.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[no||z.value.okText]})])])};return()=>{var r;const{placement:l,overlayClassName:$,trigger:S="click"}=o,k=Io(o,["placement","overlayClassName","trigger"]),T=G(k,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),w=F(u.value,$);return oo(d(Oo,b(b(b({},T),v),{},{trigger:S,placement:l,onOpenChange:P,open:p.value,overlayClassName:w,transitionName:U(B.value,"zoom-big",o.transitionName),ref:i,"data-popover-inject":!0}),{default:()=>[ho(((r=t.default)===null||r===void 0?void 0:r.call(t))||[],{onKeydown:_=>{f(_)}},!1)],content:eo}))}}}),ve=V(Do);export{ve as default,Ao as popconfirmProps};
1
+ import{g as M,m as lo,r as io,u as L,c as F,_ as b,f as W,S as so,l as co}from"./useConfigInject-ZEunuNHN.js";import{_ as c,w as V,a as K,k as y,o as R,x as po}from"./index-Dn_OQQaV.js";import{T as uo,t as X,a as q}from"./index-CTetsi8W.js";import{o as G}from"./omit-D7mkMPhu.js";import{b as U}from"./transition-gRK4XSlW.js";import{i as mo}from"./zoom-ByzgJIn6.js";import{g as fo}from"./placementArrow-By1Bkq1d.js";import{P as vo}from"./colors-C5kDbQCi.js";import{i as Z}from"./initDefaultProps-DMfJaUzk.js";import{d as J,c as d,r as Q,j as N,H as go,a2 as Co}from"./vendor-C5RM7MZO.js";import{c as H,B as xo}from"./index-8qWxPHSb.js";import{ae as yo}from"./icons-CpgFsfkd.js";import{u as Po}from"./useMergedState-CXfbNKuO.js";import{K as bo}from"./KeyCode-D63Tfrq7.js";import{b as ho}from"./vnode-DVHvXn9F.js";import{A as $o}from"./ActionButton-Cs4QdjYb.js";import"./index-U4Zd5IK6.js";import"./Trigger-xAvohiq9.js";import"./raf-Deuc0E8-.js";import"./motion-sEbWmOWo.js";import"./Portal-CFB5Y97t.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./firstNotUndefined-CLFzEa0p.js";import"./Keyframes-C7fCrnlS.js";import"./index-vBi4x_6g.js";import"./useState-DRbnp348.js";import"./devWarning-CNIS3FrJ.js";import"./warning-Pq00owYb.js";import"./compact-item-Bo_1zDrX.js";import"./createContext-CniPpJsG.js";import"./Compact-D3LSgEpW.js";const So=o=>{const{componentCls:e,popoverBg:t,popoverColor:n,width:a,fontWeightStrong:v,popoverPadding:i,boxShadowSecondary:p,colorTextHeading:g,borderRadiusLG:m,zIndexPopup:C,marginXS:x,colorBgElevated:s}=o;return[{[e]:c(c({},io(o)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:C,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":s,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:t,backgroundClip:"padding-box",borderRadius:m,boxShadow:p,padding:i},[`${e}-title`]:{minWidth:a,marginBottom:x,color:g,fontWeight:v},[`${e}-inner-content`]:{color:n}})},fo(o,{colorBg:"var(--antd-arrow-background-color)"}),{[`${e}-pure`]:{position:"relative",maxWidth:"none",[`${e}-content`]:{display:"inline-block"}}}]},ko=o=>{const{componentCls:e}=o;return{[e]:vo.map(t=>{const n=o[`${t}-6`];return{[`&${e}-${t}`]:{"--antd-arrow-background-color":n,[`${e}-inner`]:{backgroundColor:n},[`${e}-arrow`]:{background:"transparent"}}}})}},To=o=>{const{componentCls:e,lineWidth:t,lineType:n,colorSplit:a,paddingSM:v,controlHeight:i,fontSize:p,lineHeight:g,padding:m}=o,C=i-Math.round(p*g),x=C/2,s=C/2-t,f=m;return{[e]:{[`${e}-inner`]:{padding:0},[`${e}-title`]:{margin:0,padding:`${x}px ${f}px ${s}px`,borderBottom:`${t}px ${n} ${a}`},[`${e}-inner-content`]:{padding:`${v}px ${f}px`}}}},Bo=M("Popover",o=>{const{colorBgElevated:e,colorText:t,wireframe:n}=o,a=lo(o,{popoverBg:e,popoverColor:t,popoverPadding:12});return[So(a),ko(a),n&&To(a),mo(a,"zoom-big")]},o=>{let{zIndexPopupBase:e}=o;return{zIndexPopup:e+30,width:177}}),wo=()=>c(c({},q()),{content:y(),title:y()}),_o=J({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:Z(wo(),c(c({},X()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(o,e){let{expose:t,slots:n,attrs:a}=e;const v=Q();K(o.visible===void 0),t({getPopupDomNode:()=>{var s,f;return(f=(s=v.value)===null||s===void 0?void 0:s.getPopupDomNode)===null||f===void 0?void 0:f.call(s)}});const{prefixCls:i,configProvider:p}=L("popover",o),[g,m]=Bo(i),C=N(()=>p.getPrefixCls()),x=()=>{var s,f;const{title:P=W((s=n.title)===null||s===void 0?void 0:s.call(n)),content:u=W((f=n.content)===null||f===void 0?void 0:f.call(n))}=o,h=!!(Array.isArray(P)?P.length:P),B=!!(Array.isArray(u)?u.length:P);return!h&&!B?null:d(go,null,[h&&d("div",{class:`${i.value}-title`},[P]),d("div",{class:`${i.value}-inner-content`},[u])])};return()=>{const s=F(o.overlayClassName,m.value);return g(d(uo,b(b(b({},G(o,["title","content"])),a),{},{prefixCls:i.value,ref:v,overlayClassName:s,transitionName:U(C.value,"zoom-big",o.transitionName),"data-popover-inject":!0}),{title:x,default:n.default}))}}}),Oo=V(_o),No=o=>{const{componentCls:e,iconCls:t,zIndexPopup:n,colorText:a,colorWarning:v,marginXS:i,fontSize:p,fontWeightStrong:g,lineHeight:m}=o;return{[e]:{zIndex:n,[`${e}-inner-content`]:{color:a},[`${e}-message`]:{position:"relative",marginBottom:i,color:a,fontSize:p,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${t}`]:{color:v,fontSize:p,flex:"none",lineHeight:1,paddingTop:(Math.round(p*m)-p)/2},"&-title":{flex:"auto",marginInlineStart:i},"&-title-only":{fontWeight:g}},[`${e}-description`]:{position:"relative",marginInlineStart:p+i,marginBottom:i,color:a,fontSize:p},[`${e}-buttons`]:{textAlign:"end",button:{marginInlineStart:i}}}}},zo=M("Popconfirm",o=>No(o),o=>{const{zIndexPopupBase:e}=o;return{zIndexPopup:e+60}});var Io=function(o,e){var t={};for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&e.indexOf(n)<0&&(t[n]=o[n]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(o);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(o,n[a])&&(t[n[a]]=o[n[a]]);return t};const Ao=()=>c(c({},q()),{prefixCls:String,content:y(),title:y(),description:y(),okType:po("primary"),disabled:{type:Boolean,default:!1},okText:y(),cancelText:y(),icon:y(),okButtonProps:R(),cancelButtonProps:R(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),Do=J({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:Z(Ao(),c(c({},X()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(o,e){let{slots:t,emit:n,expose:a,attrs:v}=e;const i=Q();K(o.visible===void 0),a({getPopupDomNode:()=>{var r,l;return(l=(r=i.value)===null||r===void 0?void 0:r.getPopupDomNode)===null||l===void 0?void 0:l.call(r)}});const[p,g]=Po(!1,{value:Co(o,"open")}),m=(r,l)=>{o.open===void 0&&g(r),n("update:open",r),n("openChange",r,l)},C=r=>{m(!1,r)},x=r=>{var l;return(l=o.onConfirm)===null||l===void 0?void 0:l.call(o,r)},s=r=>{var l;m(!1,r),(l=o.onCancel)===null||l===void 0||l.call(o,r)},f=r=>{r.keyCode===bo.ESC&&p&&m(!1,r)},P=r=>{const{disabled:l}=o;l||m(r)},{prefixCls:u,getPrefixCls:h}=L("popconfirm",o),B=N(()=>h()),Y=N(()=>h("btn")),[oo]=zo(u),[z]=so("Popconfirm",co.Popconfirm),eo=()=>{var r,l,$,S,k;const{okButtonProps:T,cancelButtonProps:w,title:_=(r=t.title)===null||r===void 0?void 0:r.call(t),description:O=(l=t.description)===null||l===void 0?void 0:l.call(t),cancelText:to=($=t.cancel)===null||$===void 0?void 0:$.call(t),okText:no=(S=t.okText)===null||S===void 0?void 0:S.call(t),okType:I,icon:A=((k=t.icon)===null||k===void 0?void 0:k.call(t))||d(yo,null,null),showCancel:ro=!0}=o,{cancelButton:D,okButton:j}=t,E=c({onClick:s,size:"small"},w),ao=c(c(c({onClick:x},H(I)),{size:"small"}),T);return d("div",{class:`${u.value}-inner-content`},[d("div",{class:`${u.value}-message`},[A&&d("span",{class:`${u.value}-message-icon`},[A]),d("div",{class:[`${u.value}-message-title`,{[`${u.value}-message-title-only`]:!!O}]},[_])]),O&&d("div",{class:`${u.value}-description`},[O]),d("div",{class:`${u.value}-buttons`},[ro?D?D(E):d(xo,E,{default:()=>[to||z.value.cancelText]}):null,j?j(ao):d($o,{buttonProps:c(c({size:"small"},H(I)),T),actionFn:x,close:C,prefixCls:Y.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[no||z.value.okText]})])])};return()=>{var r;const{placement:l,overlayClassName:$,trigger:S="click"}=o,k=Io(o,["placement","overlayClassName","trigger"]),T=G(k,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),w=F(u.value,$);return oo(d(Oo,b(b(b({},T),v),{},{trigger:S,placement:l,onOpenChange:P,open:p.value,overlayClassName:w,transitionName:U(B.value,"zoom-big",o.transitionName),ref:i,"data-popover-inject":!0}),{default:()=>[ho(((r=t.default)===null||r===void 0?void 0:r.call(t))||[],{onKeydown:_=>{f(_)}},!1)],content:eo}))}}}),ve=V(Do);export{ve as default,Ao as popconfirmProps};
@@ -1 +1 @@
1
- import{c as F,u as L,f as lt,g as it,m as st,r as Y,_ as T,a as ut,b as ct}from"./useConfigInject-ImjEZhXr.js";import{_ as i}from"./index-DaMG8ksh.js";import{d as W,a as dt,w as G,M as mt,c as v,j as f,r as H,T as gt,Q as bt,R as ft}from"./vendor-C5RM7MZO.js";import{P as z}from"./index-U4Zd5IK6.js";import{c as J}from"./vnode-DAWimP6X.js";import{g as vt}from"./transition-D4AbuDdO.js";import{K as O}from"./Keyframes-C7fCrnlS.js";import{g as Q,i as k}from"./colors-C_wDMX2Q.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-CpgFsfkd.js";function q(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=dt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=H();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),mt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[q(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return q(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:z.any,component:String,title:z.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?J(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=Q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=Q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var Tt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const zt=()=>({prefix:String,color:{type:String},text:z.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:zt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=Tt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",T({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:z.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:z.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=H(t.count),g=H(r.value),S=H(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:j,color:X}=t,U=e.style,Z=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=j??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!Z?null:v("span",{class:`${x}-status-text`},[Z]),at=typeof C=="object"||C===void 0&&a.count?J(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",T(T({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[Z])]))}const rt=vt(w?`${x}-zoom`:"",{appear:!1});let R=i(i({},D),t.numberStyle);return X&&!b.value&&(R=R||{},R.background=X),d(v("span",T(T({},e),{},{class:K}),[w,v(gt,rt,{default:()=>[bt(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:R,key:"scrollNumber"},{default:()=>[at]}),[[ft,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
1
+ import{c as F,u as L,f as lt,g as it,m as st,r as Y,_ as T,a as ut,b as ct}from"./useConfigInject-ZEunuNHN.js";import{_ as i}from"./index-Dn_OQQaV.js";import{d as W,a as dt,w as G,M as mt,c as v,j as f,r as H,T as gt,Q as bt,R as ft}from"./vendor-C5RM7MZO.js";import{P as z}from"./index-U4Zd5IK6.js";import{c as J}from"./vnode-DVHvXn9F.js";import{g as vt}from"./transition-gRK4XSlW.js";import{K as O}from"./Keyframes-C7fCrnlS.js";import{g as Q,i as k}from"./colors-C5kDbQCi.js";import{i as pt}from"./isNumeric-DjvBa-1E.js";import"./icons-CpgFsfkd.js";function q(t){let{prefixCls:o,value:a,current:e,offset:n=0}=t,c;return n&&(c={position:"absolute",top:`${n}00%`,left:0}),v("p",{style:c,class:F(`${o}-only-unit`,{current:e})},[a])}function ht(t,o,a){let e=t,n=0;for(;(e+10)%10!==o;)e+=a,n+=a;return n}const $t=W({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const o=f(()=>Number(t.value)),a=f(()=>Math.abs(t.count)),e=dt({prevValue:o.value,prevCount:a.value}),n=()=>{e.prevValue=o.value,e.prevCount=a.value},c=H();return G(o,()=>{clearTimeout(c.value),c.value=setTimeout(()=>{n()},1e3)},{flush:"post"}),mt(()=>{clearTimeout(c.value)}),()=>{let d,p={};const s=o.value;if(e.prevValue===s||Number.isNaN(s)||Number.isNaN(e.prevValue))d=[q(i(i({},t),{current:!0}))],p={transition:"none"};else{d=[];const h=s+10,m=[];for(let r=s;r<=h;r+=1)m.push(r);const l=m.findIndex(r=>r%10===e.prevValue);d=m.map((r,y)=>{const $=r%10;return q(i(i({},t),{value:$,offset:y-l,current:y===l}))});const u=e.prevCount<a.value?1:-1;p={transform:`translateY(${-ht(e.prevValue,s,u)}00%)`}}return v("span",{class:`${t.prefixCls}-only`,style:p,onTransitionend:()=>n()},[d])}}});var St=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const yt={prefixCls:String,count:z.any,component:String,title:z.any,show:Boolean},Ct=W({compatConfig:{MODE:3},name:"ScrollNumber",inheritAttrs:!1,props:yt,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n}=L("scroll-number",t);return()=>{var c;const d=i(i({},t),a),{prefixCls:p,count:s,title:h,show:m,component:l="sup",class:u,style:r}=d,y=St(d,["prefixCls","count","title","show","component","class","style"]),$=i(i({},y),{style:r,"data-show":t.show,class:F(n.value,u),title:h});let g=s;if(s&&Number(s)%1===0){const b=String(s).split("");g=b.map((P,B)=>v($t,{prefixCls:n.value,count:Number(s),value:P,key:b.length-B},null))}r&&r.borderColor&&($.style=i(i({},r),{boxShadow:`0 0 0 1px ${r.borderColor} inset`}));const S=lt((c=e.default)===null||c===void 0?void 0:c.call(e));return S&&S.length?J(S,{class:F(`${n.value}-custom-component`)},!1):v(l,$,{default:()=>[g]})}}}),xt=new O("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),wt=new O("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),Nt=new O("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),Ot=new O("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),Pt=new O("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),Bt=new O("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),It=t=>{const{componentCls:o,iconCls:a,antCls:e,badgeFontHeight:n,badgeShadowSize:c,badgeHeightSm:d,motionDurationSlow:p,badgeStatusSize:s,marginXS:h,badgeRibbonOffset:m}=t,l=`${e}-scroll-number`,u=`${e}-ribbon`,r=`${e}-ribbon-wrapper`,y=Q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${o} ${o}-color-${g}`]:{background:b,[`&:not(${o}-count)`]:{color:b}}}}),$=Q(t,(g,S)=>{let{darkColor:b}=S;return{[`&${u}-color-${g}`]:{background:b,color:b}}});return{[o]:i(i(i(i({},Y(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${o}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${o}-count-sm`]:{minWidth:d,height:d,fontSize:t.badgeFontSizeSm,lineHeight:`${d}px`,borderRadius:d/2},[`${o}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${o}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${c}px ${t.badgeShadowColor}`},[`${o}-dot${l}`]:{transition:`background ${p}`},[`${o}-count, ${o}-dot, ${l}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${a}-spin`]:{animationName:Bt,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${o}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${o}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:s,height:s,verticalAlign:"middle",borderRadius:"50%"},[`${o}-status-success`]:{backgroundColor:t.colorSuccess},[`${o}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:c,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:xt,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${o}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${o}-status-error`]:{backgroundColor:t.colorError},[`${o}-status-warning`]:{backgroundColor:t.colorWarning},[`${o}-status-text`]:{marginInlineStart:h,color:t.colorText,fontSize:t.fontSize}}}),y),{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:wt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${o}-zoom-leave`]:{animationName:Nt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${o}-not-a-wrapper`]:{[`${o}-zoom-appear, ${o}-zoom-enter`]:{animationName:Ot,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${o}-zoom-leave`]:{animationName:Pt,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${o}-status)`]:{verticalAlign:"middle"},[`${l}-custom-component, ${o}-count`]:{transform:"none"},[`${l}-custom-component, ${l}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${l}`]:{overflow:"hidden",[`${l}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${l}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${l}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${o}-count, ${o}-dot, ${l}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${r}`]:{position:"relative"},[`${u}`]:i(i(i(i({},Y(t)),{position:"absolute",top:h,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${n}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${u}-text`]:{color:t.colorTextLightSolid},[`${u}-corner`]:{position:"absolute",top:"100%",width:m,height:m,color:"currentcolor",border:`${m/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),$),{[`&${u}-placement-end`]:{insetInlineEnd:-m,borderEndEndRadius:0,[`${u}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${u}-placement-start`]:{insetInlineStart:-m,borderEndStartRadius:0,[`${u}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},tt=it("Badge",t=>{const{fontSize:o,lineHeight:a,fontSizeSM:e,lineWidth:n,marginXS:c,colorBorderBg:d}=t,p=Math.round(o*a),s=n,h="auto",m=p-2*s,l=t.colorBgContainer,u="normal",r=e,y=t.colorError,$=t.colorErrorHover,g=o,S=e/2,b=e,P=e/2,B=st(t,{badgeFontHeight:p,badgeShadowSize:s,badgeZIndex:h,badgeHeight:m,badgeTextColor:l,badgeFontWeight:u,badgeFontSize:r,badgeColor:y,badgeColorHover:$,badgeShadowColor:d,badgeHeightSm:g,badgeDotSize:S,badgeFontSizeSm:b,badgeStatusSize:P,badgeProcessingDuration:"1.2s",badgeRibbonOffset:c,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[It(B)]});var Tt=function(t,o){var a={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&o.indexOf(e)<0&&(a[e]=t[e]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,e=Object.getOwnPropertySymbols(t);n<e.length;n++)o.indexOf(e[n])<0&&Object.prototype.propertyIsEnumerable.call(t,e[n])&&(a[e[n]]=t[e[n]]);return a};const zt=()=>({prefix:String,color:{type:String},text:z.any,placement:{type:String,default:"end"}}),V=W({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:zt(),slots:Object,setup(t,o){let{attrs:a,slots:e}=o;const{prefixCls:n,direction:c}=L("ribbon",t),[d,p]=tt(n),s=f(()=>k(t.color,!1)),h=f(()=>[n.value,`${n.value}-placement-${t.placement}`,{[`${n.value}-rtl`]:c.value==="rtl",[`${n.value}-color-${t.color}`]:s.value}]);return()=>{var m,l;const{class:u,style:r}=a,y=Tt(a,["class","style"]),$={},g={};return t.color&&!s.value&&($.background=t.color,g.color=t.color),d(v("div",T({class:`${n.value}-wrapper ${p.value}`},y),[(m=e.default)===null||m===void 0?void 0:m.call(e),v("div",{class:[h.value,u,p.value],style:i(i({},$),r)},[v("span",{class:`${n.value}-text`},[t.text||((l=e.text)===null||l===void 0?void 0:l.call(e))]),v("div",{class:`${n.value}-corner`,style:g},null)])]))}}}),Et=()=>({count:z.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:z.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),M=W({compatConfig:{MODE:3},name:"ABadge",Ribbon:V,inheritAttrs:!1,props:Et(),slots:Object,setup(t,o){let{slots:a,attrs:e}=o;const{prefixCls:n,direction:c}=L("badge",t),[d,p]=tt(n),s=f(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),h=f(()=>s.value==="0"||s.value===0),m=f(()=>t.count===null||h.value&&!t.showZero),l=f(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&m.value),u=f(()=>t.dot&&!h.value),r=f(()=>u.value?"":s.value),y=f(()=>(r.value===null||r.value===void 0||r.value===""||h.value&&!t.showZero)&&!u.value),$=H(t.count),g=H(r.value),S=H(u.value);G([()=>t.count,r,u],()=>{y.value||($.value=t.count,g.value=r.value,S.value=u.value)},{immediate:!0});const b=f(()=>k(t.color,!1)),P=f(()=>({[`${n.value}-status-dot`]:l.value,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value})),B=f(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),et=f(()=>({[`${n.value}-dot`]:S.value,[`${n.value}-count`]:!S.value,[`${n.value}-count-sm`]:t.size==="small",[`${n.value}-multiple-words`]:!S.value&&g.value&&g.value.toString().length>1,[`${n.value}-status-${t.status}`]:!!t.status,[`${n.value}-color-${t.color}`]:b.value}));return()=>{var E,_;const{offset:N,title:j,color:X}=t,U=e.style,Z=ut(a,t,"text"),x=n.value,C=$.value;let w=ct((E=a.default)===null||E===void 0?void 0:E.call(a));w=w.length?w:null;const A=!!(!y.value||a.count),D=(()=>{if(!N)return i({},U);const I={marginTop:pt(N[1])?`${N[1]}px`:N[1]};return c.value==="rtl"?I.left=`${parseInt(N[0],10)}px`:I.right=`${-parseInt(N[0],10)}px`,i(i({},I),U)})(),ot=j??(typeof C=="string"||typeof C=="number"?C:void 0),nt=A||!Z?null:v("span",{class:`${x}-status-text`},[Z]),at=typeof C=="object"||C===void 0&&a.count?J(C??((_=a.count)===null||_===void 0?void 0:_.call(a)),{style:D},!1):null,K=F(x,{[`${x}-status`]:l.value,[`${x}-not-a-wrapper`]:!w,[`${x}-rtl`]:c.value==="rtl"},e.class,p.value);if(!w&&l.value){const I=D.color;return d(v("span",T(T({},e),{},{class:K,style:D}),[v("span",{class:P.value,style:B.value},null),v("span",{style:{color:I},class:`${x}-status-text`},[Z])]))}const rt=vt(w?`${x}-zoom`:"",{appear:!1});let R=i(i({},D),t.numberStyle);return X&&!b.value&&(R=R||{},R.background=X),d(v("span",T(T({},e),{},{class:K}),[w,v(gt,rt,{default:()=>[bt(v(Ct,{prefixCls:t.scrollNumberPrefixCls,show:A,class:et.value,count:g.value,title:ot,style:R,key:"scrollNumber"},{default:()=>[at]}),[[ft,A]])]}),nt]))}}});M.install=function(t){return t.component(M.name,M),t.component(V.name,V),t};export{V as BadgeRibbon,M as default};
@@ -1,3 +1,3 @@
1
- import{c as ie,D as me,_ as te,g as bt,m as ft,r as tt,t as mt,A as at,b as ht,i as gt,E as $t,u as yt}from"./useConfigInject-ImjEZhXr.js";import{_ as T,p as j,o as he,q as xt,x as xe,n as St,y as _t}from"./index-DaMG8ksh.js";import{w as ge}from"./raf-Deuc0E8-.js";import{s as W,o as Me,d as re,c as h,r as J,j as H,f as Ce,l as Te,w as oe,i as Ct,p as Tt}from"./vendor-C5RM7MZO.js";import{K as q}from"./KeyCode-D63Tfrq7.js";import wt,{Item as Pt}from"./index-D1eekAaa.js";import{D as Rt}from"./Dropdown-CrXGzreQ.js";import{P as we}from"./index-U4Zd5IK6.js";import{u as D}from"./useState-DRbnp348.js";import{ah as It,U as Et,a4 as Bt}from"./icons-CpgFsfkd.js";import{u as Lt}from"./OverrideContext-7M2Kv4Ru.js";import{R as Xe}from"./index-1ZqkTPt2.js";import{u as At}from"./useRefs-DwsdQTxa.js";import{c as nt,t as Dt,a as kt,b as Mt,h as Nt,f as Ot}from"./hasIn-mXvd_Kdq.js";import{i as Wt}from"./Trigger-C7MTh_xj.js";import{h as Fe}from"./_getTag-CWA3v-Ds.js";import{c as Ht}from"./vnode-DAWimP6X.js";import{i as zt}from"./isMobile--2fOlCHx.js";import{u as je}from"./useMergedState-CXfbNKuO.js";import{d as De}from"./devWarning-CNIS3FrJ.js";import{o as Kt}from"./omit-CPycjJ8C.js";import{i as Ve}from"./slide-zwgmm7vM.js";import{i as ot}from"./initDefaultProps-DOj2K4bh.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-BVsn6SM5.js";import"./index-BirLVqrC.js";import"./placementArrow-DWcIO1y4.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-C_wDMX2Q.js";import"./zoom-u6SXbmzZ.js";import"./Keyframes-C7fCrnlS.js";import"./motion-joGf7r-l.js";import"./Portal-CFB5Y97t.js";import"./transition-D4AbuDdO.js";import"./collapseMotion-DnZigkzG.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./isSymbol-CsP9Ob42.js";import"./isVisible-C7tPsqfj.js";import"./warning-Pq00owYb.js";function Gt(e,t,a,i){if(!Fe(e))return e;t=nt(t,e);for(var o=-1,r=t.length,n=r-1,s=e;s!=null&&++o<r;){var v=Dt(t[o]),d=a;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(o!=n){var b=s[v];d=void 0,d===void 0&&(d=Fe(b)?b:Wt(t[o+1])?[]:{})}kt(s,v,d),s=s[v]}return e}function Xt(e,t,a){for(var i=-1,o=t.length,r={};++i<o;){var n=t[i],s=Mt(e,n);a(s,n)&&Gt(r,nt(n,e),s)}return r}function Ft(e,t){return Xt(e,t,function(a,i){return Nt(e,i)})}var it=Ot(function(e,t){return e==null?{}:Ft(e,t)});function jt(e){const t=W(),a=W(!1);function i(){for(var o=arguments.length,r=new Array(o),n=0;n<o;n++)r[n]=arguments[n];a.value||(ge.cancel(t.value),t.value=ge(()=>{e(...r)}))}return Me(()=>{a.value=!0,ge.cancel(t.value)}),i}function Vt(e){const t=W([]),a=W(typeof e=="function"?e():e),i=jt(()=>{let r=a.value;t.value.forEach(n=>{r=n(r)}),t.value=[],a.value=r});function o(r){t.value.push(r),i()}return[a,o]}const Yt=re({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:a,attrs:i}=t;const o=J();function r(v){var d;!((d=e.tab)===null||d===void 0)&&d.disabled||e.onClick(v)}a({domRef:o});function n(v){var d;v.preventDefault(),v.stopPropagation(),e.editable.onEdit("remove",{key:(d=e.tab)===null||d===void 0?void 0:d.key,event:v})}const s=H(()=>{var v;return e.editable&&e.closable!==!1&&!(!((v=e.tab)===null||v===void 0)&&v.disabled)});return()=>{var v;const{prefixCls:d,id:b,active:_,tab:{key:m,tab:c,disabled:y,closeIcon:x},renderWrapper:w,removeAriaLabel:C,editable:k,onFocus:K}=e,M=`${d}-tab`,l=h("div",{key:m,ref:o,class:ie(M,{[`${M}-with-remove`]:s.value,[`${M}-active`]:_,[`${M}-disabled`]:y}),style:i.style,onClick:r},[h("div",{role:"tab","aria-selected":_,id:b&&`${b}-tab-${m}`,class:`${M}-btn`,"aria-controls":b&&`${b}-panel-${m}`,"aria-disabled":y,tabindex:y?null:0,onClick:g=>{g.stopPropagation(),r(g)},onKeydown:g=>{[q.SPACE,q.ENTER].includes(g.which)&&(g.preventDefault(),r(g))},onFocus:K},[typeof c=="function"?c():c]),s.value&&h("button",{type:"button","aria-label":C||"remove",tabindex:0,class:`${M}-remove`,onClick:g=>{g.stopPropagation(),n(g)}},[x?.()||((v=k.removeIcon)===null||v===void 0?void 0:v.call(k))||"×"])]);return w?w(l):l}}}),Ye={width:0,height:0,left:0,top:0};function Ut(e,t){const a=J(new Map);return Ce(()=>{var i,o;const r=new Map,n=e.value,s=t.value.get((i=n[0])===null||i===void 0?void 0:i.key)||Ye,v=s.left+s.width;for(let d=0;d<n.length;d+=1){const{key:b}=n[d];let _=t.value.get(b);_||(_=t.value.get((o=n[d-1])===null||o===void 0?void 0:o.key)||Ye);const m=r.get(b)||T({},_);m.right=v-m.left-m.width,r.set(b,m)}a.value=new Map(r)}),a}const rt=re({compatConfig:{MODE:3},name:"AddButton",inheritAttrs:!1,props:{prefixCls:String,editable:{type:Object},locale:{type:Object,default:void 0}},setup(e,t){let{expose:a,attrs:i}=t;const o=J();return a({domRef:o}),()=>{const{prefixCls:r,editable:n,locale:s}=e;return!n||n.showAdd===!1?null:h("button",{ref:o,type:"button",class:`${r}-nav-add`,style:i.style,"aria-label":s?.addAriaLabel||"Add tab",onClick:v=>{n.onEdit("add",{event:v})}},[n.addIcon?n.addIcon():"+"])}}}),Zt={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:we.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:j()},qt=re({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:Zt,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:a,slots:i}=t;const[o,r]=D(!1),[n,s]=D(null),v=c=>{const y=e.tabs.filter(C=>!C.disabled);let x=y.findIndex(C=>C.key===n.value)||0;const w=y.length;for(let C=0;C<w;C+=1){x=(x+c+w)%w;const k=y[x];if(!k.disabled){s(k.key);return}}},d=c=>{const{which:y}=c;if(!o.value){[q.DOWN,q.SPACE,q.ENTER].includes(y)&&(r(!0),c.preventDefault());return}switch(y){case q.UP:v(-1),c.preventDefault();break;case q.DOWN:v(1),c.preventDefault();break;case q.ESC:r(!1);break;case q.SPACE:case q.ENTER:n.value!==null&&e.onTabClick(n.value,c);break}},b=H(()=>`${e.id}-more-popup`),_=H(()=>n.value!==null?`${b.value}-${n.value}`:null),m=(c,y)=>{c.preventDefault(),c.stopPropagation(),e.editable.onEdit("remove",{key:y,event:c})};return Te(()=>{oe(n,()=>{const c=document.getElementById(_.value);c&&c.scrollIntoView&&c.scrollIntoView(!1)},{flush:"post",immediate:!0})}),oe(o,()=>{o.value||s(null)}),Lt({}),()=>{var c;const{prefixCls:y,id:x,tabs:w,locale:C,mobile:k,moreIcon:K=((c=i.moreIcon)===null||c===void 0?void 0:c.call(i))||h(It,null,null),moreTransitionName:M,editable:l,tabBarGutter:g,rtl:u,onTabClick:$,popupClassName:E}=e;if(!w.length)return null;const R=`${y}-dropdown`,G=C?.dropdownAriaLabel,le={[u?"marginRight":"marginLeft"]:g};w.length||(le.visibility="hidden",le.order=1);const se=ie({[`${R}-rtl`]:u,[`${E}`]:!0}),ce=k?null:h(Rt,{prefixCls:R,trigger:["hover"],visible:o.value,transitionName:M,onVisibleChange:r,overlayClassName:se,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>h(wt,{onClick:I=>{let{key:Q,domEvent:N}=I;$(Q,N),r(!1)},id:b.value,tabindex:-1,role:"listbox","aria-activedescendant":_.value,selectedKeys:[n.value],"aria-label":G!==void 0?G:"expanded dropdown"},{default:()=>[w.map(I=>{var Q,N;const V=l&&I.closable!==!1&&!I.disabled;return h(Pt,{key:I.key,id:`${b.value}-${I.key}`,role:"option","aria-controls":x&&`${x}-panel-${I.key}`,disabled:I.disabled},{default:()=>[h("span",null,[typeof I.tab=="function"?I.tab():I.tab]),V&&h("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${R}-menu-item-remove`,onClick:Y=>{Y.stopPropagation(),m(Y,I.key)}},[((Q=I.closeIcon)===null||Q===void 0?void 0:Q.call(I))||((N=l.removeIcon)===null||N===void 0?void 0:N.call(l))||"×"])]})})]}),default:()=>h("button",{type:"button",class:`${y}-nav-more`,style:le,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":b.value,id:`${x}-more`,"aria-expanded":o.value,onKeydown:d},[K])});return h("div",{class:ie(`${y}-nav-operations`,a.class),style:a.style},[ce,h(rt,{prefixCls:y,locale:C,editable:l},null)])}}}),lt=Symbol("tabsContextKey"),Jt=e=>{Tt(lt,e)},st=()=>Ct(lt,{tabs:J([]),prefixCls:J()}),Qt=.1,Ue=.01,Se=20,Ze=Math.pow(.995,Se);function ea(e,t){const[a,i]=D(),[o,r]=D(0),[n,s]=D(0),[v,d]=D(),b=J();function _(l){const{screenX:g,screenY:u}=l.touches[0];i({x:g,y:u}),clearInterval(b.value)}function m(l){if(!a.value)return;l.preventDefault();const{screenX:g,screenY:u}=l.touches[0],$=g-a.value.x,E=u-a.value.y;t($,E),i({x:g,y:u});const R=Date.now();s(R-o.value),r(R),d({x:$,y:E})}function c(){if(!a.value)return;const l=v.value;if(i(null),d(null),l){const g=l.x/n.value,u=l.y/n.value,$=Math.abs(g),E=Math.abs(u);if(Math.max($,E)<Qt)return;let R=g,G=u;b.value=setInterval(()=>{if(Math.abs(R)<Ue&&Math.abs(G)<Ue){clearInterval(b.value);return}R*=Ze,G*=Ze,t(R*Se,G*Se)},Se)}}const y=J();function x(l){const{deltaX:g,deltaY:u}=l;let $=0;const E=Math.abs(g),R=Math.abs(u);E===R?$=y.value==="x"?g:u:E>R?($=g,y.value="x"):($=u,y.value="y"),t(-$,-$)&&l.preventDefault()}const w=J({onTouchStart:_,onTouchMove:m,onTouchEnd:c,onWheel:x});function C(l){w.value.onTouchStart(l)}function k(l){w.value.onTouchMove(l)}function K(l){w.value.onTouchEnd(l)}function M(l){w.value.onWheel(l)}Te(()=>{var l,g;document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",K,{passive:!1}),(l=e.value)===null||l===void 0||l.addEventListener("touchstart",C,{passive:!1}),(g=e.value)===null||g===void 0||g.addEventListener("wheel",M,{passive:!1})}),Me(()=>{document.removeEventListener("touchmove",k),document.removeEventListener("touchend",K)})}function qe(e,t){const a=J(e);function i(o){const r=typeof o=="function"?o(a.value):o;r!==a.value&&t(r,a.value),a.value=r}return[a,i]}const Je={width:0,height:0,left:0,top:0,right:0},ta=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:he(),editable:he(),moreIcon:we.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:he(),popupClassName:String,getPopupContainer:j(),onTabClick:{type:Function},onTabScroll:{type:Function}}),aa=(e,t)=>{const{offsetWidth:a,offsetHeight:i,offsetTop:o,offsetLeft:r}=e,{width:n,height:s,x:v,y:d}=e.getBoundingClientRect();return Math.abs(n-a)<1?[n,s,v-t.x,d-t.y]:[a,i,r,o]},Qe=re({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:ta(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:a,slots:i}=t;const{tabs:o,prefixCls:r}=st(),n=W(),s=W(),v=W(),d=W(),[b,_]=At(),m=H(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[c,y]=qe(0,(f,p)=>{m.value&&e.onTabScroll&&e.onTabScroll({direction:f>p?"left":"right"})}),[x,w]=qe(0,(f,p)=>{!m.value&&e.onTabScroll&&e.onTabScroll({direction:f>p?"top":"bottom"})}),[C,k]=D(0),[K,M]=D(0),[l,g]=D(null),[u,$]=D(null),[E,R]=D(0),[G,le]=D(0),[se,ce]=Vt(new Map),I=Ut(o,se),Q=H(()=>`${r.value}-nav-operations-hidden`),N=W(0),V=W(0);Ce(()=>{m.value?e.rtl?(N.value=0,V.value=Math.max(0,C.value-l.value)):(N.value=Math.min(0,l.value-C.value),V.value=0):(N.value=Math.min(0,u.value-K.value),V.value=0)});const Y=f=>f<N.value?N.value:f>V.value?V.value:f,ue=W(),[z,ve]=D(),pe=()=>{ve(Date.now())},be=()=>{clearTimeout(ue.value)},$e=(f,p)=>{f(S=>Y(S+p))};ea(n,(f,p)=>{if(m.value){if(l.value>=C.value)return!1;$e(y,f)}else{if(u.value>=K.value)return!1;$e(w,p)}return be(),pe(),!0}),oe(z,()=>{be(),z.value&&(ue.value=setTimeout(()=>{ve(0)},100))});const de=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const p=I.value.get(f)||{width:0,height:0,left:0,right:0,top:0};if(m.value){let S=c.value;e.rtl?p.right<c.value?S=p.right:p.right+p.width>c.value+l.value&&(S=p.right+p.width-l.value):p.left<-c.value?S=-p.left:p.left+p.width>-c.value+l.value&&(S=-(p.left+p.width-l.value)),w(0),y(Y(S))}else{let S=x.value;p.top<-x.value?S=-p.top:p.top+p.height>-x.value+u.value&&(S=-(p.top+p.height-u.value)),y(0),w(Y(S))}},Pe=W(0),Re=W(0);Ce(()=>{let f,p,S,P,L,B;const U=I.value;["top","bottom"].includes(e.tabPosition)?(f="width",P=l.value,L=C.value,B=E.value,p=e.rtl?"right":"left",S=Math.abs(c.value)):(f="height",P=u.value,L=C.value,B=G.value,p="top",S=-x.value);let O=P;L+B>P&&L<P&&(O=P-B);const F=o.value;if(!F.length)return[Pe.value,Re.value]=[0,0];const Z=F.length;let ne=Z;for(let X=0;X<Z;X+=1){const ee=U.get(F[X].key)||Je;if(ee[p]+ee[f]>S+O){ne=X-1;break}}let A=0;for(let X=Z-1;X>=0;X-=1)if((U.get(F[X].key)||Je)[p]<S){A=X+1;break}return[Pe.value,Re.value]=[A,ne]});const Ne=()=>{ce(()=>{var f;const p=new Map,S=(f=s.value)===null||f===void 0?void 0:f.getBoundingClientRect();return o.value.forEach(P=>{let{key:L}=P;const B=_.value.get(L),U=B?.$el||B;if(U){const[O,F,Z,ne]=aa(U,S);p.set(L,{width:O,height:F,left:Z,top:ne})}}),p})};oe(()=>o.value.map(f=>f.key).join("%%"),()=>{Ne()},{flush:"post"});const Ie=()=>{var f,p,S,P,L;const B=((f=n.value)===null||f===void 0?void 0:f.offsetWidth)||0,U=((p=n.value)===null||p===void 0?void 0:p.offsetHeight)||0,O=((S=d.value)===null||S===void 0?void 0:S.$el)||{},F=O.offsetWidth||0,Z=O.offsetHeight||0;g(B),$(U),R(F),le(Z);const ne=(((P=s.value)===null||P===void 0?void 0:P.offsetWidth)||0)-F,A=(((L=s.value)===null||L===void 0?void 0:L.offsetHeight)||0)-Z;k(ne),M(A),Ne()},Oe=H(()=>[...o.value.slice(0,Pe.value),...o.value.slice(Re.value+1)]),[ct,ut]=D(),ae=H(()=>I.value.get(e.activeKey)),We=W(),He=()=>{ge.cancel(We.value)};oe([ae,m,()=>e.rtl],()=>{const f={};ae.value&&(m.value?(e.rtl?f.right=me(ae.value.right):f.left=me(ae.value.left),f.width=me(ae.value.width)):(f.top=me(ae.value.top),f.height=me(ae.value.height))),He(),We.value=ge(()=>{ut(f)})}),oe([()=>e.activeKey,ae,I,m],()=>{de()},{flush:"post"}),oe([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>o.value],()=>{Ie()},{flush:"post"});const Ee=f=>{let{position:p,prefixCls:S,extra:P}=f;if(!P)return null;const L=P?.({position:p});return L?h("div",{class:`${S}-extra-content`},[L]):null};return Me(()=>{be(),He()}),()=>{const{id:f,animated:p,activeKey:S,rtl:P,editable:L,locale:B,tabPosition:U,tabBarGutter:O,onTabClick:F}=e,{class:Z,style:ne}=a,A=r.value,X=!!Oe.value.length,ee=`${A}-nav-wrap`;let Be,Le,ze,Ke;m.value?P?(Le=c.value>0,Be=c.value+l.value<C.value):(Be=c.value<0,Le=-c.value+l.value<C.value):(ze=x.value<0,Ke=-x.value+u.value<K.value);const ye={};U==="top"||U==="bottom"?ye[P?"marginRight":"marginLeft"]=typeof O=="number"?`${O}px`:O:ye.marginTop=typeof O=="number"?`${O}px`:O;const Ge=o.value.map((Ae,vt)=>{const{key:fe}=Ae;return h(Yt,{id:f,prefixCls:A,key:fe,tab:Ae,style:vt===0?void 0:ye,closable:Ae.closable,editable:L,active:fe===S,removeAriaLabel:B?.removeAriaLabel,ref:b(fe),onClick:pt=>{F(fe,pt)},onFocus:()=>{de(fe),pe(),n.value&&(P||(n.value.scrollLeft=0),n.value.scrollTop=0)}},i)});return h("div",{role:"tablist",class:ie(`${A}-nav`,Z),style:ne,onKeydown:()=>{pe()}},[h(Ee,{position:"left",prefixCls:A,extra:i.leftExtra},null),h(Xe,{onResize:Ie},{default:()=>[h("div",{class:ie(ee,{[`${ee}-ping-left`]:Be,[`${ee}-ping-right`]:Le,[`${ee}-ping-top`]:ze,[`${ee}-ping-bottom`]:Ke}),ref:n},[h(Xe,{onResize:Ie},{default:()=>[h("div",{ref:s,class:`${A}-nav-list`,style:{transform:`translate(${c.value}px, ${x.value}px)`,transition:z.value?"none":void 0}},[Ge,h(rt,{ref:d,prefixCls:A,locale:B,editable:L,style:T(T({},Ge.length===0?void 0:ye),{visibility:X?"hidden":null})},null),h("div",{class:ie(`${A}-ink-bar`,{[`${A}-ink-bar-animated`]:p.inkBar}),style:ct.value},null)])]})])]}),h(qt,te(te({},e),{},{removeAriaLabel:B?.removeAriaLabel,ref:v,prefixCls:A,tabs:Oe.value,class:!X&&Q.value}),it(i,["moreIcon"])),h(Ee,{position:"right",prefixCls:A,extra:i.rightExtra},null),h(Ee,{position:"right",prefixCls:A,extra:i.tabBarExtraContent},null)])}}}),na=re({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:a}=st();return()=>{const{id:i,activeKey:o,animated:r,tabPosition:n,rtl:s,destroyInactiveTabPane:v}=e,d=r.tabPane,b=a.value,_=t.value.findIndex(m=>m.key===o);return h("div",{class:`${b}-content-holder`},[h("div",{class:[`${b}-content`,`${b}-content-${n}`,{[`${b}-content-animated`]:d}],style:_&&d?{[s?"marginRight":"marginLeft"]:`-${_}00%`}:null},[t.value.map(m=>Ht(m.node,{key:m.key,prefixCls:b,tabKey:m.key,id:i,animated:d,active:m.key===o,destroyInactiveTabPane:v}))])])}}}),oa=e=>{const{componentCls:t,motionDurationSlow:a}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${a}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${a}`}}}}},[Ve(e,"slide-up"),Ve(e,"slide-down")]]},ia=e=>{const{componentCls:t,tabsCardHorizontalPadding:a,tabsCardHeadBackground:i,tabsCardGutter:o,colorSplit:r}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:a,background:i,border:`${e.lineWidth}px ${e.lineType} ${r}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${o}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${o}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},ra=e=>{const{componentCls:t,tabsHoverColor:a,dropdownEdgeChildVerticalPadding:i}=e;return{[`${t}-dropdown`]:T(T({},tt(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${i}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":T(T({},mt),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:a}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},la=e=>{const{componentCls:t,margin:a,colorSplit:i}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${a}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${i}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
1
+ import{c as ie,D as me,_ as te,g as bt,m as ft,r as tt,t as mt,A as at,b as ht,i as gt,E as $t,u as yt}from"./useConfigInject-ZEunuNHN.js";import{_ as T,p as j,o as he,q as xt,x as xe,n as St,y as _t}from"./index-Dn_OQQaV.js";import{w as ge}from"./raf-Deuc0E8-.js";import{s as W,o as Me,d as re,c as h,r as J,j as H,f as Ce,l as Te,w as oe,i as Ct,p as Tt}from"./vendor-C5RM7MZO.js";import{K as q}from"./KeyCode-D63Tfrq7.js";import wt,{Item as Pt}from"./index-D9bolkbl.js";import{D as Rt}from"./Dropdown-DZxUTZvw.js";import{P as we}from"./index-U4Zd5IK6.js";import{u as D}from"./useState-DRbnp348.js";import{ah as It,U as Et,a4 as Bt}from"./icons-CpgFsfkd.js";import{u as Lt}from"./OverrideContext-7M2Kv4Ru.js";import{R as Xe}from"./index-BJx6C3J8.js";import{u as At}from"./useRefs-DwsdQTxa.js";import{c as nt,t as Dt,a as kt,b as Mt,h as Nt,f as Ot}from"./hasIn-ClDc6Sz8.js";import{i as Wt}from"./Trigger-xAvohiq9.js";import{h as Fe}from"./_getTag-CWA3v-Ds.js";import{c as Ht}from"./vnode-DVHvXn9F.js";import{i as zt}from"./isMobile--2fOlCHx.js";import{u as je}from"./useMergedState-CXfbNKuO.js";import{d as De}from"./devWarning-CNIS3FrJ.js";import{o as Kt}from"./omit-D7mkMPhu.js";import{i as Ve}from"./slide-eR-f56FQ.js";import{i as ot}from"./initDefaultProps-DMfJaUzk.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-Dka3nWV9.js";import"./index-CTetsi8W.js";import"./placementArrow-By1Bkq1d.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-C5kDbQCi.js";import"./zoom-ByzgJIn6.js";import"./Keyframes-C7fCrnlS.js";import"./motion-sEbWmOWo.js";import"./Portal-CFB5Y97t.js";import"./transition-gRK4XSlW.js";import"./collapseMotion-DnZigkzG.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./isSymbol-CsP9Ob42.js";import"./isVisible-C7tPsqfj.js";import"./warning-Pq00owYb.js";function Gt(e,t,a,i){if(!Fe(e))return e;t=nt(t,e);for(var o=-1,r=t.length,n=r-1,s=e;s!=null&&++o<r;){var v=Dt(t[o]),d=a;if(v==="__proto__"||v==="constructor"||v==="prototype")return e;if(o!=n){var b=s[v];d=void 0,d===void 0&&(d=Fe(b)?b:Wt(t[o+1])?[]:{})}kt(s,v,d),s=s[v]}return e}function Xt(e,t,a){for(var i=-1,o=t.length,r={};++i<o;){var n=t[i],s=Mt(e,n);a(s,n)&&Gt(r,nt(n,e),s)}return r}function Ft(e,t){return Xt(e,t,function(a,i){return Nt(e,i)})}var it=Ot(function(e,t){return e==null?{}:Ft(e,t)});function jt(e){const t=W(),a=W(!1);function i(){for(var o=arguments.length,r=new Array(o),n=0;n<o;n++)r[n]=arguments[n];a.value||(ge.cancel(t.value),t.value=ge(()=>{e(...r)}))}return Me(()=>{a.value=!0,ge.cancel(t.value)}),i}function Vt(e){const t=W([]),a=W(typeof e=="function"?e():e),i=jt(()=>{let r=a.value;t.value.forEach(n=>{r=n(r)}),t.value=[],a.value=r});function o(r){t.value.push(r),i()}return[a,o]}const Yt=re({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(e,t){let{expose:a,attrs:i}=t;const o=J();function r(v){var d;!((d=e.tab)===null||d===void 0)&&d.disabled||e.onClick(v)}a({domRef:o});function n(v){var d;v.preventDefault(),v.stopPropagation(),e.editable.onEdit("remove",{key:(d=e.tab)===null||d===void 0?void 0:d.key,event:v})}const s=H(()=>{var v;return e.editable&&e.closable!==!1&&!(!((v=e.tab)===null||v===void 0)&&v.disabled)});return()=>{var v;const{prefixCls:d,id:b,active:_,tab:{key:m,tab:c,disabled:y,closeIcon:x},renderWrapper:w,removeAriaLabel:C,editable:k,onFocus:K}=e,M=`${d}-tab`,l=h("div",{key:m,ref:o,class:ie(M,{[`${M}-with-remove`]:s.value,[`${M}-active`]:_,[`${M}-disabled`]:y}),style:i.style,onClick:r},[h("div",{role:"tab","aria-selected":_,id:b&&`${b}-tab-${m}`,class:`${M}-btn`,"aria-controls":b&&`${b}-panel-${m}`,"aria-disabled":y,tabindex:y?null:0,onClick:g=>{g.stopPropagation(),r(g)},onKeydown:g=>{[q.SPACE,q.ENTER].includes(g.which)&&(g.preventDefault(),r(g))},onFocus:K},[typeof c=="function"?c():c]),s.value&&h("button",{type:"button","aria-label":C||"remove",tabindex:0,class:`${M}-remove`,onClick:g=>{g.stopPropagation(),n(g)}},[x?.()||((v=k.removeIcon)===null||v===void 0?void 0:v.call(k))||"×"])]);return w?w(l):l}}}),Ye={width:0,height:0,left:0,top:0};function Ut(e,t){const a=J(new Map);return Ce(()=>{var i,o;const r=new Map,n=e.value,s=t.value.get((i=n[0])===null||i===void 0?void 0:i.key)||Ye,v=s.left+s.width;for(let d=0;d<n.length;d+=1){const{key:b}=n[d];let _=t.value.get(b);_||(_=t.value.get((o=n[d-1])===null||o===void 0?void 0:o.key)||Ye);const m=r.get(b)||T({},_);m.right=v-m.left-m.width,r.set(b,m)}a.value=new Map(r)}),a}const rt=re({compatConfig:{MODE:3},name:"AddButton",inheritAttrs:!1,props:{prefixCls:String,editable:{type:Object},locale:{type:Object,default:void 0}},setup(e,t){let{expose:a,attrs:i}=t;const o=J();return a({domRef:o}),()=>{const{prefixCls:r,editable:n,locale:s}=e;return!n||n.showAdd===!1?null:h("button",{ref:o,type:"button",class:`${r}-nav-add`,style:i.style,"aria-label":s?.addAriaLabel||"Add tab",onClick:v=>{n.onEdit("add",{event:v})}},[n.addIcon?n.addIcon():"+"])}}}),Zt={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:we.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:j()},qt=re({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:Zt,emits:["tabClick"],slots:Object,setup(e,t){let{attrs:a,slots:i}=t;const[o,r]=D(!1),[n,s]=D(null),v=c=>{const y=e.tabs.filter(C=>!C.disabled);let x=y.findIndex(C=>C.key===n.value)||0;const w=y.length;for(let C=0;C<w;C+=1){x=(x+c+w)%w;const k=y[x];if(!k.disabled){s(k.key);return}}},d=c=>{const{which:y}=c;if(!o.value){[q.DOWN,q.SPACE,q.ENTER].includes(y)&&(r(!0),c.preventDefault());return}switch(y){case q.UP:v(-1),c.preventDefault();break;case q.DOWN:v(1),c.preventDefault();break;case q.ESC:r(!1);break;case q.SPACE:case q.ENTER:n.value!==null&&e.onTabClick(n.value,c);break}},b=H(()=>`${e.id}-more-popup`),_=H(()=>n.value!==null?`${b.value}-${n.value}`:null),m=(c,y)=>{c.preventDefault(),c.stopPropagation(),e.editable.onEdit("remove",{key:y,event:c})};return Te(()=>{oe(n,()=>{const c=document.getElementById(_.value);c&&c.scrollIntoView&&c.scrollIntoView(!1)},{flush:"post",immediate:!0})}),oe(o,()=>{o.value||s(null)}),Lt({}),()=>{var c;const{prefixCls:y,id:x,tabs:w,locale:C,mobile:k,moreIcon:K=((c=i.moreIcon)===null||c===void 0?void 0:c.call(i))||h(It,null,null),moreTransitionName:M,editable:l,tabBarGutter:g,rtl:u,onTabClick:$,popupClassName:E}=e;if(!w.length)return null;const R=`${y}-dropdown`,G=C?.dropdownAriaLabel,le={[u?"marginRight":"marginLeft"]:g};w.length||(le.visibility="hidden",le.order=1);const se=ie({[`${R}-rtl`]:u,[`${E}`]:!0}),ce=k?null:h(Rt,{prefixCls:R,trigger:["hover"],visible:o.value,transitionName:M,onVisibleChange:r,overlayClassName:se,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:e.getPopupContainer},{overlay:()=>h(wt,{onClick:I=>{let{key:Q,domEvent:N}=I;$(Q,N),r(!1)},id:b.value,tabindex:-1,role:"listbox","aria-activedescendant":_.value,selectedKeys:[n.value],"aria-label":G!==void 0?G:"expanded dropdown"},{default:()=>[w.map(I=>{var Q,N;const V=l&&I.closable!==!1&&!I.disabled;return h(Pt,{key:I.key,id:`${b.value}-${I.key}`,role:"option","aria-controls":x&&`${x}-panel-${I.key}`,disabled:I.disabled},{default:()=>[h("span",null,[typeof I.tab=="function"?I.tab():I.tab]),V&&h("button",{type:"button","aria-label":e.removeAriaLabel||"remove",tabindex:0,class:`${R}-menu-item-remove`,onClick:Y=>{Y.stopPropagation(),m(Y,I.key)}},[((Q=I.closeIcon)===null||Q===void 0?void 0:Q.call(I))||((N=l.removeIcon)===null||N===void 0?void 0:N.call(l))||"×"])]})})]}),default:()=>h("button",{type:"button",class:`${y}-nav-more`,style:le,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":b.value,id:`${x}-more`,"aria-expanded":o.value,onKeydown:d},[K])});return h("div",{class:ie(`${y}-nav-operations`,a.class),style:a.style},[ce,h(rt,{prefixCls:y,locale:C,editable:l},null)])}}}),lt=Symbol("tabsContextKey"),Jt=e=>{Tt(lt,e)},st=()=>Ct(lt,{tabs:J([]),prefixCls:J()}),Qt=.1,Ue=.01,Se=20,Ze=Math.pow(.995,Se);function ea(e,t){const[a,i]=D(),[o,r]=D(0),[n,s]=D(0),[v,d]=D(),b=J();function _(l){const{screenX:g,screenY:u}=l.touches[0];i({x:g,y:u}),clearInterval(b.value)}function m(l){if(!a.value)return;l.preventDefault();const{screenX:g,screenY:u}=l.touches[0],$=g-a.value.x,E=u-a.value.y;t($,E),i({x:g,y:u});const R=Date.now();s(R-o.value),r(R),d({x:$,y:E})}function c(){if(!a.value)return;const l=v.value;if(i(null),d(null),l){const g=l.x/n.value,u=l.y/n.value,$=Math.abs(g),E=Math.abs(u);if(Math.max($,E)<Qt)return;let R=g,G=u;b.value=setInterval(()=>{if(Math.abs(R)<Ue&&Math.abs(G)<Ue){clearInterval(b.value);return}R*=Ze,G*=Ze,t(R*Se,G*Se)},Se)}}const y=J();function x(l){const{deltaX:g,deltaY:u}=l;let $=0;const E=Math.abs(g),R=Math.abs(u);E===R?$=y.value==="x"?g:u:E>R?($=g,y.value="x"):($=u,y.value="y"),t(-$,-$)&&l.preventDefault()}const w=J({onTouchStart:_,onTouchMove:m,onTouchEnd:c,onWheel:x});function C(l){w.value.onTouchStart(l)}function k(l){w.value.onTouchMove(l)}function K(l){w.value.onTouchEnd(l)}function M(l){w.value.onWheel(l)}Te(()=>{var l,g;document.addEventListener("touchmove",k,{passive:!1}),document.addEventListener("touchend",K,{passive:!1}),(l=e.value)===null||l===void 0||l.addEventListener("touchstart",C,{passive:!1}),(g=e.value)===null||g===void 0||g.addEventListener("wheel",M,{passive:!1})}),Me(()=>{document.removeEventListener("touchmove",k),document.removeEventListener("touchend",K)})}function qe(e,t){const a=J(e);function i(o){const r=typeof o=="function"?o(a.value):o;r!==a.value&&t(r,a.value),a.value=r}return[a,i]}const Je={width:0,height:0,left:0,top:0,right:0},ta=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:he(),editable:he(),moreIcon:we.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:he(),popupClassName:String,getPopupContainer:j(),onTabClick:{type:Function},onTabScroll:{type:Function}}),aa=(e,t)=>{const{offsetWidth:a,offsetHeight:i,offsetTop:o,offsetLeft:r}=e,{width:n,height:s,x:v,y:d}=e.getBoundingClientRect();return Math.abs(n-a)<1?[n,s,v-t.x,d-t.y]:[a,i,r,o]},Qe=re({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:ta(),slots:Object,emits:["tabClick","tabScroll"],setup(e,t){let{attrs:a,slots:i}=t;const{tabs:o,prefixCls:r}=st(),n=W(),s=W(),v=W(),d=W(),[b,_]=At(),m=H(()=>e.tabPosition==="top"||e.tabPosition==="bottom"),[c,y]=qe(0,(f,p)=>{m.value&&e.onTabScroll&&e.onTabScroll({direction:f>p?"left":"right"})}),[x,w]=qe(0,(f,p)=>{!m.value&&e.onTabScroll&&e.onTabScroll({direction:f>p?"top":"bottom"})}),[C,k]=D(0),[K,M]=D(0),[l,g]=D(null),[u,$]=D(null),[E,R]=D(0),[G,le]=D(0),[se,ce]=Vt(new Map),I=Ut(o,se),Q=H(()=>`${r.value}-nav-operations-hidden`),N=W(0),V=W(0);Ce(()=>{m.value?e.rtl?(N.value=0,V.value=Math.max(0,C.value-l.value)):(N.value=Math.min(0,l.value-C.value),V.value=0):(N.value=Math.min(0,u.value-K.value),V.value=0)});const Y=f=>f<N.value?N.value:f>V.value?V.value:f,ue=W(),[z,ve]=D(),pe=()=>{ve(Date.now())},be=()=>{clearTimeout(ue.value)},$e=(f,p)=>{f(S=>Y(S+p))};ea(n,(f,p)=>{if(m.value){if(l.value>=C.value)return!1;$e(y,f)}else{if(u.value>=K.value)return!1;$e(w,p)}return be(),pe(),!0}),oe(z,()=>{be(),z.value&&(ue.value=setTimeout(()=>{ve(0)},100))});const de=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e.activeKey;const p=I.value.get(f)||{width:0,height:0,left:0,right:0,top:0};if(m.value){let S=c.value;e.rtl?p.right<c.value?S=p.right:p.right+p.width>c.value+l.value&&(S=p.right+p.width-l.value):p.left<-c.value?S=-p.left:p.left+p.width>-c.value+l.value&&(S=-(p.left+p.width-l.value)),w(0),y(Y(S))}else{let S=x.value;p.top<-x.value?S=-p.top:p.top+p.height>-x.value+u.value&&(S=-(p.top+p.height-u.value)),y(0),w(Y(S))}},Pe=W(0),Re=W(0);Ce(()=>{let f,p,S,P,L,B;const U=I.value;["top","bottom"].includes(e.tabPosition)?(f="width",P=l.value,L=C.value,B=E.value,p=e.rtl?"right":"left",S=Math.abs(c.value)):(f="height",P=u.value,L=C.value,B=G.value,p="top",S=-x.value);let O=P;L+B>P&&L<P&&(O=P-B);const F=o.value;if(!F.length)return[Pe.value,Re.value]=[0,0];const Z=F.length;let ne=Z;for(let X=0;X<Z;X+=1){const ee=U.get(F[X].key)||Je;if(ee[p]+ee[f]>S+O){ne=X-1;break}}let A=0;for(let X=Z-1;X>=0;X-=1)if((U.get(F[X].key)||Je)[p]<S){A=X+1;break}return[Pe.value,Re.value]=[A,ne]});const Ne=()=>{ce(()=>{var f;const p=new Map,S=(f=s.value)===null||f===void 0?void 0:f.getBoundingClientRect();return o.value.forEach(P=>{let{key:L}=P;const B=_.value.get(L),U=B?.$el||B;if(U){const[O,F,Z,ne]=aa(U,S);p.set(L,{width:O,height:F,left:Z,top:ne})}}),p})};oe(()=>o.value.map(f=>f.key).join("%%"),()=>{Ne()},{flush:"post"});const Ie=()=>{var f,p,S,P,L;const B=((f=n.value)===null||f===void 0?void 0:f.offsetWidth)||0,U=((p=n.value)===null||p===void 0?void 0:p.offsetHeight)||0,O=((S=d.value)===null||S===void 0?void 0:S.$el)||{},F=O.offsetWidth||0,Z=O.offsetHeight||0;g(B),$(U),R(F),le(Z);const ne=(((P=s.value)===null||P===void 0?void 0:P.offsetWidth)||0)-F,A=(((L=s.value)===null||L===void 0?void 0:L.offsetHeight)||0)-Z;k(ne),M(A),Ne()},Oe=H(()=>[...o.value.slice(0,Pe.value),...o.value.slice(Re.value+1)]),[ct,ut]=D(),ae=H(()=>I.value.get(e.activeKey)),We=W(),He=()=>{ge.cancel(We.value)};oe([ae,m,()=>e.rtl],()=>{const f={};ae.value&&(m.value?(e.rtl?f.right=me(ae.value.right):f.left=me(ae.value.left),f.width=me(ae.value.width)):(f.top=me(ae.value.top),f.height=me(ae.value.height))),He(),We.value=ge(()=>{ut(f)})}),oe([()=>e.activeKey,ae,I,m],()=>{de()},{flush:"post"}),oe([()=>e.rtl,()=>e.tabBarGutter,()=>e.activeKey,()=>o.value],()=>{Ie()},{flush:"post"});const Ee=f=>{let{position:p,prefixCls:S,extra:P}=f;if(!P)return null;const L=P?.({position:p});return L?h("div",{class:`${S}-extra-content`},[L]):null};return Me(()=>{be(),He()}),()=>{const{id:f,animated:p,activeKey:S,rtl:P,editable:L,locale:B,tabPosition:U,tabBarGutter:O,onTabClick:F}=e,{class:Z,style:ne}=a,A=r.value,X=!!Oe.value.length,ee=`${A}-nav-wrap`;let Be,Le,ze,Ke;m.value?P?(Le=c.value>0,Be=c.value+l.value<C.value):(Be=c.value<0,Le=-c.value+l.value<C.value):(ze=x.value<0,Ke=-x.value+u.value<K.value);const ye={};U==="top"||U==="bottom"?ye[P?"marginRight":"marginLeft"]=typeof O=="number"?`${O}px`:O:ye.marginTop=typeof O=="number"?`${O}px`:O;const Ge=o.value.map((Ae,vt)=>{const{key:fe}=Ae;return h(Yt,{id:f,prefixCls:A,key:fe,tab:Ae,style:vt===0?void 0:ye,closable:Ae.closable,editable:L,active:fe===S,removeAriaLabel:B?.removeAriaLabel,ref:b(fe),onClick:pt=>{F(fe,pt)},onFocus:()=>{de(fe),pe(),n.value&&(P||(n.value.scrollLeft=0),n.value.scrollTop=0)}},i)});return h("div",{role:"tablist",class:ie(`${A}-nav`,Z),style:ne,onKeydown:()=>{pe()}},[h(Ee,{position:"left",prefixCls:A,extra:i.leftExtra},null),h(Xe,{onResize:Ie},{default:()=>[h("div",{class:ie(ee,{[`${ee}-ping-left`]:Be,[`${ee}-ping-right`]:Le,[`${ee}-ping-top`]:ze,[`${ee}-ping-bottom`]:Ke}),ref:n},[h(Xe,{onResize:Ie},{default:()=>[h("div",{ref:s,class:`${A}-nav-list`,style:{transform:`translate(${c.value}px, ${x.value}px)`,transition:z.value?"none":void 0}},[Ge,h(rt,{ref:d,prefixCls:A,locale:B,editable:L,style:T(T({},Ge.length===0?void 0:ye),{visibility:X?"hidden":null})},null),h("div",{class:ie(`${A}-ink-bar`,{[`${A}-ink-bar-animated`]:p.inkBar}),style:ct.value},null)])]})])]}),h(qt,te(te({},e),{},{removeAriaLabel:B?.removeAriaLabel,ref:v,prefixCls:A,tabs:Oe.value,class:!X&&Q.value}),it(i,["moreIcon"])),h(Ee,{position:"right",prefixCls:A,extra:i.rightExtra},null),h(Ee,{position:"right",prefixCls:A,extra:i.tabBarExtraContent},null)])}}}),na=re({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(e){const{tabs:t,prefixCls:a}=st();return()=>{const{id:i,activeKey:o,animated:r,tabPosition:n,rtl:s,destroyInactiveTabPane:v}=e,d=r.tabPane,b=a.value,_=t.value.findIndex(m=>m.key===o);return h("div",{class:`${b}-content-holder`},[h("div",{class:[`${b}-content`,`${b}-content-${n}`,{[`${b}-content-animated`]:d}],style:_&&d?{[s?"marginRight":"marginLeft"]:`-${_}00%`}:null},[t.value.map(m=>Ht(m.node,{key:m.key,prefixCls:b,tabKey:m.key,id:i,animated:d,active:m.key===o,destroyInactiveTabPane:v}))])])}}}),oa=e=>{const{componentCls:t,motionDurationSlow:a}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${a}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${a}`}}}}},[Ve(e,"slide-up"),Ve(e,"slide-down")]]},ia=e=>{const{componentCls:t,tabsCardHorizontalPadding:a,tabsCardHeadBackground:i,tabsCardGutter:o,colorSplit:r}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:a,background:i,border:`${e.lineWidth}px ${e.lineType} ${r}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:e.colorPrimary,background:e.colorBgContainer},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:`${o}px`}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:`${o}px`}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadiusLG}px 0 0 ${e.borderRadiusLG}px`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadiusLG}px ${e.borderRadiusLG}px 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},ra=e=>{const{componentCls:t,tabsHoverColor:a,dropdownEdgeChildVerticalPadding:i}=e;return{[`${t}-dropdown`]:T(T({},tt(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${i}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":T(T({},mt),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${e.paddingXXS}px ${e.paddingSM}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:a}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},la=e=>{const{componentCls:t,margin:a,colorSplit:i}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:`0 0 ${a}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${e.lineWidth}px ${e.lineType} ${i}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
2
2
  right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
3
3
  > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:`${a}px`,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:e.controlHeight*1.25,[`${t}-tab`]:{padding:`${e.paddingXS}px ${e.paddingLG}px`,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:`${e.margin}px 0 0 0`},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${e.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-e.lineWidth},borderRight:{_skip_check_:!0,value:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},sa=e=>{const{componentCls:t,padding:a}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px 0`,fontSize:e.fontSize}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${a}px 0`,fontSize:e.fontSizeLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXXS*1.5}px ${a}px`}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${e.borderRadius}px ${e.borderRadius}px`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${e.borderRadius}px ${e.borderRadius}px 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${e.borderRadius}px ${e.borderRadius}px 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${e.borderRadius}px 0 0 ${e.borderRadius}px`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:`${e.paddingXS}px ${a}px ${e.paddingXXS*1.5}px`}}}}}},da=e=>{const{componentCls:t,tabsActiveColor:a,tabsHoverColor:i,iconCls:o,tabsHorizontalGutter:r}=e,n=`${t}-tab`;return{[n]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${e.paddingSM}px 0`,fontSize:`${e.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":T({"&:focus:not(:focus-visible), &:active":{color:a}},at(e)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-e.marginXXS},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorTextDescription,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},"&:hover":{color:i},[`&${n}-active ${n}-btn`]:{color:e.colorPrimary,textShadow:e.tabsActiveTextShadow},[`&${n}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-disabled ${n}-btn, &${n}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${n}-remove ${o}`]:{margin:0},[o]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${n} + ${n}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${r}px`}}}},ca=e=>{const{componentCls:t,tabsHorizontalGutter:a,iconCls:i,tabsCardGutter:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${a}px`},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[i]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${e.marginSM}px`}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${e.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${e.marginXXS}px`},[i]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:`${o}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},ua=e=>{const{componentCls:t,tabsCardHorizontalPadding:a,tabsCardHeight:i,tabsCardGutter:o,tabsHoverColor:r,tabsActiveColor:n,colorSplit:s}=e;return{[t]:T(T(T(T({},tt(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:a,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:T({minWidth:`${i}px`,marginLeft:{_skip_check_:!0,value:`${o}px`},padding:`0 ${e.paddingXS}px`,background:"transparent",border:`${e.lineWidth}px ${e.lineType} ${s}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:r},"&:active, &:focus:not(:focus-visible)":{color:n}},at(e))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.colorPrimary,pointerEvents:"none"}}),da(e)),{[`${t}-content`]:{position:"relative",display:"flex",width:"100%","&-animated":{transition:"margin 0.3s"}},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},va=bt("Tabs",e=>{const t=e.controlHeightLG,a=ft(e,{tabsHoverColor:e.colorPrimaryHover,tabsActiveColor:e.colorPrimaryActive,tabsCardHorizontalPadding:`${(t-Math.round(e.fontSize*e.lineHeight))/2-e.lineWidth}px ${e.padding}px`,tabsCardHeight:t,tabsCardGutter:e.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:e.colorFillAlter,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[sa(a),ca(a),la(a),ra(a),ia(a),ua(a),oa(a)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));let et=0;const dt=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:j(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:xe(),animated:_t([Boolean,Object]),renderTabBar:j(),tabBarGutter:{type:Number},tabBarStyle:he(),tabPosition:xe(),destroyInactiveTabPane:St(),hideAdd:Boolean,type:xe(),size:xe(),centered:Boolean,onEdit:j(),onChange:j(),onTabClick:j(),onTabScroll:j(),"onUpdate:activeKey":j(),locale:he(),onPrevClick:j(),onNextClick:j(),tabBarExtraContent:we.any});function pa(e){return e.map(t=>{if(gt(t)){const a=T({},t.props||{});for(const[m,c]of Object.entries(a))delete a[m],a[$t(m)]=c;const i=t.children||{},o=t.key!==void 0?t.key:void 0,{tab:r=i.tab,disabled:n,forceRender:s,closable:v,animated:d,active:b,destroyInactiveTabPane:_}=a;return T(T({key:o},a),{node:t,closeIcon:i.closeIcon,tab:r,disabled:n===""||n,forceRender:s===""||s,closable:v===""||v,animated:d===""||d,active:b===""||b,destroyInactiveTabPane:_===""||_})}return null}).filter(t=>t)}const ba=re({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:T(T({},ot(dt(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:xt()}),slots:Object,setup(e,t){let{attrs:a,slots:i}=t;De(e.onPrevClick===void 0&&e.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),De(e.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),De(i.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:o,direction:r,size:n,rootPrefixCls:s,getPopupContainer:v}=yt("tabs",e),[d,b]=va(o),_=H(()=>r.value==="rtl"),m=H(()=>{const{animated:u,tabPosition:$}=e;return u===!1||["left","right"].includes($)?{inkBar:!1,tabPane:!1}:u===!0?{inkBar:!0,tabPane:!0}:T({inkBar:!0,tabPane:!1},typeof u=="object"?u:{})}),[c,y]=D(!1);Te(()=>{y(zt())});const[x,w]=je(()=>{var u;return(u=e.tabs[0])===null||u===void 0?void 0:u.key},{value:H(()=>e.activeKey),defaultValue:e.defaultActiveKey}),[C,k]=D(()=>e.tabs.findIndex(u=>u.key===x.value));Ce(()=>{var u;let $=e.tabs.findIndex(E=>E.key===x.value);$===-1&&($=Math.max(0,Math.min(C.value,e.tabs.length-1)),w((u=e.tabs[$])===null||u===void 0?void 0:u.key)),k($)});const[K,M]=je(null,{value:H(()=>e.id)}),l=H(()=>c.value&&!["left","right"].includes(e.tabPosition)?"top":e.tabPosition);Te(()=>{e.id||(M(`rc-tabs-${et}`),et+=1)});const g=(u,$)=>{var E,R;(E=e.onTabClick)===null||E===void 0||E.call(e,u,$);const G=u!==x.value;w(u),G&&((R=e.onChange)===null||R===void 0||R.call(e,u))};return Jt({tabs:H(()=>e.tabs),prefixCls:o}),()=>{const{id:u,type:$,tabBarGutter:E,tabBarStyle:R,locale:G,destroyInactiveTabPane:le,renderTabBar:se=i.renderTabBar,onTabScroll:ce,hideAdd:I,centered:Q}=e,N={id:K.value,activeKey:x.value,animated:m.value,tabPosition:l.value,rtl:_.value,mobile:c.value};let V;$==="editable-card"&&(V={onEdit:(ve,pe)=>{let{key:be,event:$e}=pe;var de;(de=e.onEdit)===null||de===void 0||de.call(e,ve==="add"?$e:be,ve)},removeIcon:()=>h(Bt,null,null),addIcon:i.addIcon?i.addIcon:()=>h(Et,null,null),showAdd:I!==!0});let Y;const ue=T(T({},N),{moreTransitionName:`${s.value}-slide-up`,editable:V,locale:G,tabBarGutter:E,onTabClick:g,onTabScroll:ce,style:R,getPopupContainer:v.value,popupClassName:ie(e.popupClassName,b.value)});se?Y=se(T(T({},ue),{DefaultTabBar:Qe})):Y=h(Qe,ue,it(i,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const z=o.value;return d(h("div",te(te({},a),{},{id:u,class:ie(z,`${z}-${l.value}`,{[b.value]:!0,[`${z}-${n.value}`]:n.value,[`${z}-card`]:["card","editable-card"].includes($),[`${z}-editable-card`]:$==="editable-card",[`${z}-centered`]:Q,[`${z}-mobile`]:c.value,[`${z}-editable`]:$==="editable-card",[`${z}-rtl`]:_.value},a.class)}),[Y,h(na,te(te({destroyInactiveTabPane:le},N),{},{animated:m.value}),null)]))}}}),_e=re({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:ot(dt(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(e,t){let{attrs:a,slots:i,emit:o}=t;const r=n=>{o("update:activeKey",n),o("change",n)};return()=>{var n;const s=pa(ht((n=i.default)===null||n===void 0?void 0:n.call(i)));return h(ba,te(te(te({},Kt(e,["onUpdate:activeKey"])),a),{},{onChange:r,tabs:s}),i)}}}),fa=()=>({tab:we.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),ke=re({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:fa(),slots:Object,setup(e,t){let{attrs:a,slots:i}=t;const o=J(e.forceRender);oe([()=>e.active,()=>e.destroyInactiveTabPane],()=>{e.active?o.value=!0:e.destroyInactiveTabPane&&(o.value=!1)},{immediate:!0});const r=H(()=>e.active?{}:e.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var n;const{prefixCls:s,forceRender:v,id:d,active:b,tabKey:_}=e;return h("div",{id:d&&`${d}-panel-${_}`,role:"tabpanel",tabindex:b?0:-1,"aria-labelledby":d&&`${d}-tab-${_}`,"aria-hidden":!b,style:[r.value,a.style],class:[`${s}-tabpane`,b&&`${s}-tabpane-active`,a.class]},[(b||o.value||v)&&((n=i.default)===null||n===void 0?void 0:n.call(i))])}}});_e.TabPane=ke;_e.install=function(e){return e.component(_e.name,_e),e.component(ke.name,ke),e};export{ke as TabPane,_e as default};
@@ -1,4 +1,4 @@
1
- import{g as Ce,m as Te,r as ze,d as A,t as ie,u as v,_ as m,c as I,e as y,b as Be,h as Me,a as j}from"./useConfigInject-ImjEZhXr.js";import oe from"./index-DJkIheU6.js";import{P as x}from"./index-U4Zd5IK6.js";import{i as we}from"./isPlainObject-DSTnI585.js";import{d as Ae}from"./devWarning-CNIS3FrJ.js";import{_ as n,v as q}from"./index-DaMG8ksh.js";import{u as D,E as X,s as H,S as s,a as re}from"./Skeleton-VNikEgM4.js";import{i as ne}from"./initDefaultProps-DOj2K4bh.js";import{d as $,c as o,j as T,S as ae}from"./vendor-C5RM7MZO.js";import{o as le}from"./omit-CPycjJ8C.js";import{a as Ie}from"./vnode-DAWimP6X.js";import"./icons-CpgFsfkd.js";import"./raf-Deuc0E8-.js";import"./KeyCode-D63Tfrq7.js";import"./index-D1eekAaa.js";import"./Trigger-C7MTh_xj.js";import"./motion-joGf7r-l.js";import"./Portal-CFB5Y97t.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-D4AbuDdO.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-BVsn6SM5.js";import"./index-1ZqkTPt2.js";import"./index-BirLVqrC.js";import"./placementArrow-DWcIO1y4.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-C_wDMX2Q.js";import"./zoom-u6SXbmzZ.js";import"./Keyframes-C7fCrnlS.js";import"./collapseMotion-DnZigkzG.js";import"./slide-zwgmm7vM.js";import"./OverrideContext-7M2Kv4Ru.js";import"./Dropdown-CrXGzreQ.js";import"./useState-DRbnp348.js";import"./useRefs-DwsdQTxa.js";import"./hasIn-mXvd_Kdq.js";import"./isSymbol-CsP9Ob42.js";import"./isMobile--2fOlCHx.js";import"./useMergedState-CXfbNKuO.js";import"./warning-Pq00owYb.js";const De=e=>{const{antCls:t,componentCls:a,cardHeadHeight:i,cardPaddingBase:r,cardHeadTabsMarginBottom:d}=e;return n(n({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${r}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},A()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":n(n({display:"inline-block",flex:1},ie),{[`
1
+ import{g as Ce,m as Te,r as ze,d as A,t as ie,u as v,_ as m,c as I,e as y,b as Be,h as Me,a as j}from"./useConfigInject-ZEunuNHN.js";import oe from"./index-BCXFoTAw.js";import{P as x}from"./index-U4Zd5IK6.js";import{i as we}from"./isPlainObject-DSTnI585.js";import{d as Ae}from"./devWarning-CNIS3FrJ.js";import{_ as n,v as q}from"./index-Dn_OQQaV.js";import{u as D,E as X,s as H,S as s,a as re}from"./Skeleton-DxmZ7zRw.js";import{i as ne}from"./initDefaultProps-DMfJaUzk.js";import{d as $,c as o,j as T,S as ae}from"./vendor-C5RM7MZO.js";import{o as le}from"./omit-D7mkMPhu.js";import{a as Ie}from"./vnode-DVHvXn9F.js";import"./icons-CpgFsfkd.js";import"./raf-Deuc0E8-.js";import"./KeyCode-D63Tfrq7.js";import"./index-D9bolkbl.js";import"./Trigger-xAvohiq9.js";import"./motion-sEbWmOWo.js";import"./Portal-CFB5Y97t.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-gRK4XSlW.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-Dka3nWV9.js";import"./index-BJx6C3J8.js";import"./index-CTetsi8W.js";import"./placementArrow-By1Bkq1d.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-C5kDbQCi.js";import"./zoom-ByzgJIn6.js";import"./Keyframes-C7fCrnlS.js";import"./collapseMotion-DnZigkzG.js";import"./slide-eR-f56FQ.js";import"./OverrideContext-7M2Kv4Ru.js";import"./Dropdown-DZxUTZvw.js";import"./useState-DRbnp348.js";import"./useRefs-DwsdQTxa.js";import"./hasIn-ClDc6Sz8.js";import"./isSymbol-CsP9Ob42.js";import"./isMobile--2fOlCHx.js";import"./useMergedState-CXfbNKuO.js";import"./warning-Pq00owYb.js";const De=e=>{const{antCls:t,componentCls:a,cardHeadHeight:i,cardPaddingBase:r,cardHeadTabsMarginBottom:d}=e;return n(n({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${r}px`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,background:"transparent",borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`},A()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":n(n({display:"inline-block",flex:1},ie),{[`
2
2
  > ${a}-typography,
3
3
  > ${a}-typography-edit-content
4
4
  `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:d,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${e.lineWidth}px ${e.lineType} ${e.colorBorderSecondary}`}}})},He=e=>{const{cardPaddingBase:t,colorBorderSecondary:a,cardShadow:i,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
@@ -1 +1 @@
1
- import{_ as l}from"./index-DaMG8ksh.js";import{i as C}from"./ResizeObserver.es-D6qJbdzf.js";import{C as O}from"./useConfigInject-ImjEZhXr.js";import{d as R,l as M,$ as x,M as H,w as W,g as _,a as B}from"./vendor-C5RM7MZO.js";const F=R({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(i,v){let{slots:c}=v;const n=B({width:0,height:0,offsetHeight:0,offsetWidth:0});let h=null,s=null;const r=()=>{s&&(s.disconnect(),s=null)},b=e=>{const{onResize:t}=i,o=e[0].target,{width:z,height:w}=o.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=o,g=Math.floor(z),m=Math.floor(w);if(n.width!==g||n.height!==m||n.offsetWidth!==d||n.offsetHeight!==f){const u={width:g,height:m,offsetWidth:d,offsetHeight:f};l(n,u),t&&Promise.resolve().then(()=>{t(l(l({},u),{offsetWidth:d,offsetHeight:f}),o)})}},p=_(),a=()=>{const{disabled:e}=i;if(e){r();return}const t=O(p);t!==h&&(r(),h=t),!s&&t&&(s=new C(b),s.observe(t))};return M(()=>{a()}),x(()=>{a()}),H(()=>{r()}),W(()=>i.disabled,()=>{a()},{flush:"post"}),()=>{var e;return(e=c.default)===null||e===void 0?void 0:e.call(c)[0]}}});export{F as R};
1
+ import{_ as l}from"./index-Dn_OQQaV.js";import{i as C}from"./ResizeObserver.es-D6qJbdzf.js";import{C as O}from"./useConfigInject-ZEunuNHN.js";import{d as R,l as M,$ as x,M as H,w as W,g as _,a as B}from"./vendor-C5RM7MZO.js";const F=R({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(i,v){let{slots:c}=v;const n=B({width:0,height:0,offsetHeight:0,offsetWidth:0});let h=null,s=null;const r=()=>{s&&(s.disconnect(),s=null)},b=e=>{const{onResize:t}=i,o=e[0].target,{width:z,height:w}=o.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=o,g=Math.floor(z),m=Math.floor(w);if(n.width!==g||n.height!==m||n.offsetWidth!==d||n.offsetHeight!==f){const u={width:g,height:m,offsetWidth:d,offsetHeight:f};l(n,u),t&&Promise.resolve().then(()=>{t(l(l({},u),{offsetWidth:d,offsetHeight:f}),o)})}},p=_(),a=()=>{const{disabled:e}=i;if(e){r();return}const t=O(p);t!==h&&(r(),h=t),!s&&t&&(s=new C(b),s.observe(t))};return M(()=>{a()}),x(()=>{a()}),H(()=>{r()}),W(()=>i.disabled,()=>{a()},{flush:"post"}),()=>{var e;return(e=c.default)===null||e===void 0?void 0:e.call(c)[0]}}});export{F as R};
@@ -1 +1 @@
1
- import{_ as v,t as D}from"./index-DaMG8ksh.js";import{g as re,m as ne,u as O,c as M,_ as F}from"./useConfigInject-ImjEZhXr.js";import{a as Z,S as ae}from"./injectionKey-BXVc-oGP.js";import{d as L,c as g,j as ie,r as le,p as G,i as se,s as A,w as j,l as de,o as ue}from"./vendor-C5RM7MZO.js";import{P as p}from"./index-U4Zd5IK6.js";import{i as ce}from"./initDefaultProps-DOj2K4bh.js";import{i as ge}from"./isNumeric-DjvBa-1E.js";import{am as fe,an as _,x as X}from"./icons-CpgFsfkd.js";const pe=e=>{const{componentCls:n,colorBgContainer:o,colorBgBody:s,colorText:a}=e;return{[`${n}-sider-light`]:{background:o,[`${n}-sider-trigger`]:{color:a,background:o},[`${n}-sider-zero-width-trigger`]:{color:a,background:o,border:`1px solid ${s}`,borderInlineStart:0}}}},me=e=>{const{antCls:n,componentCls:o,colorText:s,colorTextLightSolid:a,colorBgHeader:f,colorBgBody:d,colorBgTrigger:i,layoutHeaderHeight:u,layoutHeaderPaddingInline:h,layoutHeaderColor:x,layoutFooterPadding:t,layoutTriggerHeight:l,layoutZeroTriggerSize:y,motionDurationMid:S,motionDurationSlow:r,fontSize:m,borderRadius:c}=e;return{[o]:v(v({display:"flex",flex:"auto",flexDirection:"column",color:s,minHeight:0,background:d,"&, *":{boxSizing:"border-box"},[`&${o}-has-sider`]:{flexDirection:"row",[`> ${o}, > ${o}-content`]:{width:0}},[`${o}-header, &${o}-footer`]:{flex:"0 0 auto"},[`${o}-header`]:{height:u,paddingInline:h,color:x,lineHeight:`${u}px`,background:f,[`${n}-menu`]:{lineHeight:"inherit"}},[`${o}-footer`]:{padding:t,color:s,fontSize:m,background:d},[`${o}-content`]:{flex:"auto",minHeight:0},[`${o}-sider`]:{position:"relative",minWidth:0,background:f,transition:`all ${S}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${n}-menu${n}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:l},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:l,color:a,lineHeight:`${l}px`,textAlign:"center",background:i,cursor:"pointer",transition:`all ${S}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:u,insetInlineEnd:-y,zIndex:1,width:y,height:y,color:a,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:f,borderStartStartRadius:0,borderStartEndRadius:c,borderEndEndRadius:c,borderEndStartRadius:0,cursor:"pointer",transition:`background ${r} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${r}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-y,borderStartStartRadius:c,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:c}}}}},pe(e)),{"&-rtl":{direction:"rtl"}})}},he=re("Layout",e=>{const{colorText:n,controlHeightSM:o,controlHeight:s,controlHeightLG:a,marginXXS:f}=e,d=a*1.25,i=ne(e,{layoutHeaderHeight:s*2,layoutHeaderPaddingInline:d,layoutHeaderColor:n,layoutFooterPadding:`${o}px ${d}px`,layoutTriggerHeight:a+f*2,layoutZeroTriggerSize:a});return[me(i)]},e=>{const{colorBgLayout:n}=e;return{colorBgHeader:"#001529",colorBgBody:n,colorBgTrigger:"#002140"}}),P=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function B(e){let{suffixCls:n,tagName:o,name:s}=e;return a=>L({compatConfig:{MODE:3},name:s,props:P(),setup(d,i){let{slots:u}=i;const{prefixCls:h}=O(n,d);return()=>{const x=v(v({},d),{prefixCls:h.value,tagName:o});return g(a,x,u)}}})}const R=L({compatConfig:{MODE:3},props:P(),setup(e,n){let{slots:o}=n;return()=>g(e.tagName,{class:e.prefixCls},o)}}),xe=L({compatConfig:{MODE:3},inheritAttrs:!1,props:P(),setup(e,n){let{slots:o,attrs:s}=n;const{prefixCls:a,direction:f}=O("",e),[d,i]=he(a),u=le([]);G(Z,{addSider:t=>{u.value=[...u.value,t]},removeSider:t=>{u.value=u.value.filter(l=>l!==t)}});const x=ie(()=>{const{prefixCls:t,hasSider:l}=e;return{[i.value]:!0,[`${t}`]:!0,[`${t}-has-sider`]:typeof l=="boolean"?l:u.value.length>0,[`${t}-rtl`]:f.value==="rtl"}});return()=>{const{tagName:t}=e;return d(g(t,v(v({},s),{class:[x.value,s.class]}),o))}}}),I=B({suffixCls:"layout",tagName:"section",name:"ALayout"})(xe),C=B({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(R),w=B({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(R),H=B({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(R),K={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},ye=()=>({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:p.any,width:p.oneOfType([p.number,p.string]),collapsedWidth:p.oneOfType([p.number,p.string]),breakpoint:p.oneOf(D("xs","sm","md","lg","xl","xxl","xxxl")),theme:p.oneOf(D("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),ve=(()=>{let e=0;return function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${n}${e}`}})(),k=L({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ce(ye(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,n){let{emit:o,attrs:s,slots:a}=n;const{prefixCls:f}=O("layout-sider",e),d=se(Z,void 0),i=A(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),u=A(!1);j(()=>e.collapsed,()=>{i.value=!!e.collapsed}),G(ae,i);const h=(r,m)=>{e.collapsed===void 0&&(i.value=r),o("update:collapsed",r),o("collapse",r,m)},x=A(r=>{u.value=r.matches,o("breakpoint",r.matches),i.value!==r.matches&&h(r.matches,"responsive")});let t;function l(r){return x.value(r)}const y=ve("ant-sider-");d&&d.addSider(y),de(()=>{j(()=>e.breakpoint,()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}if(typeof window<"u"){const{matchMedia:r}=window;if(r&&e.breakpoint&&e.breakpoint in K){t=r(`(max-width: ${K[e.breakpoint]})`);try{t.addEventListener("change",l)}catch{t.addListener(l)}l(t)}}},{immediate:!0})}),ue(()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}d&&d.removeSider(y)});const S=()=>{h(!i.value,"clickTrigger")};return()=>{var r,m;const c=f.value,{collapsedWidth:N,width:U,reverseArrow:T,zeroWidthTriggerStyle:V,trigger:$=(r=a.trigger)===null||r===void 0?void 0:r.call(a),collapsible:W,theme:J}=e,z=i.value?N:U,b=ge(z)?`${z}px`:String(z),E=parseFloat(String(N||0))===0?g("span",{onClick:S,class:M(`${c}-zero-width-trigger`,`${c}-zero-width-trigger-${T?"right":"left"}`),style:V},[$||g(fe,null,null)]):null,Q={expanded:T?g(X,null,null):g(_,null,null),collapsed:T?g(_,null,null):g(X,null,null)},Y=i.value?"collapsed":"expanded",q=Q[Y],ee=$!==null?E||g("div",{class:`${c}-trigger`,onClick:S,style:{width:b}},[$||q]):null,te=[s.style,{flex:`0 0 ${b}`,maxWidth:b,minWidth:b,width:b}],oe=M(c,`${c}-${J}`,{[`${c}-collapsed`]:!!i.value,[`${c}-has-trigger`]:W&&$!==null&&!E,[`${c}-below`]:!!u.value,[`${c}-zero-width`]:parseFloat(b)===0},s.class);return g("aside",F(F({},s),{},{class:oe,style:te}),[g("div",{class:`${c}-children`},[(m=a.default)===null||m===void 0?void 0:m.call(a)]),W||u.value&&E?ee:null])}}}),Be=C,Te=w,ze=k,Ee=H,Ae=v(I,{Header:C,Footer:w,Content:H,Sider:k,install:e=>(e.component(I.name,I),e.component(C.name,C),e.component(w.name,w),e.component(k.name,k),e.component(H.name,H),e)});export{Ee as LayoutContent,Te as LayoutFooter,Be as LayoutHeader,ze as LayoutSider,Ae as default};
1
+ import{_ as v,t as D}from"./index-Dn_OQQaV.js";import{g as re,m as ne,u as O,c as M,_ as F}from"./useConfigInject-ZEunuNHN.js";import{a as Z,S as ae}from"./injectionKey-BXVc-oGP.js";import{d as L,c as g,j as ie,r as le,p as G,i as se,s as A,w as j,l as de,o as ue}from"./vendor-C5RM7MZO.js";import{P as p}from"./index-U4Zd5IK6.js";import{i as ce}from"./initDefaultProps-DMfJaUzk.js";import{i as ge}from"./isNumeric-DjvBa-1E.js";import{am as fe,an as _,x as X}from"./icons-CpgFsfkd.js";const pe=e=>{const{componentCls:n,colorBgContainer:o,colorBgBody:s,colorText:a}=e;return{[`${n}-sider-light`]:{background:o,[`${n}-sider-trigger`]:{color:a,background:o},[`${n}-sider-zero-width-trigger`]:{color:a,background:o,border:`1px solid ${s}`,borderInlineStart:0}}}},me=e=>{const{antCls:n,componentCls:o,colorText:s,colorTextLightSolid:a,colorBgHeader:f,colorBgBody:d,colorBgTrigger:i,layoutHeaderHeight:u,layoutHeaderPaddingInline:h,layoutHeaderColor:x,layoutFooterPadding:t,layoutTriggerHeight:l,layoutZeroTriggerSize:y,motionDurationMid:S,motionDurationSlow:r,fontSize:m,borderRadius:c}=e;return{[o]:v(v({display:"flex",flex:"auto",flexDirection:"column",color:s,minHeight:0,background:d,"&, *":{boxSizing:"border-box"},[`&${o}-has-sider`]:{flexDirection:"row",[`> ${o}, > ${o}-content`]:{width:0}},[`${o}-header, &${o}-footer`]:{flex:"0 0 auto"},[`${o}-header`]:{height:u,paddingInline:h,color:x,lineHeight:`${u}px`,background:f,[`${n}-menu`]:{lineHeight:"inherit"}},[`${o}-footer`]:{padding:t,color:s,fontSize:m,background:d},[`${o}-content`]:{flex:"auto",minHeight:0},[`${o}-sider`]:{position:"relative",minWidth:0,background:f,transition:`all ${S}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${n}-menu${n}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:l},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:l,color:a,lineHeight:`${l}px`,textAlign:"center",background:i,cursor:"pointer",transition:`all ${S}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:u,insetInlineEnd:-y,zIndex:1,width:y,height:y,color:a,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:f,borderStartStartRadius:0,borderStartEndRadius:c,borderEndEndRadius:c,borderEndStartRadius:0,cursor:"pointer",transition:`background ${r} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${r}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-y,borderStartStartRadius:c,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:c}}}}},pe(e)),{"&-rtl":{direction:"rtl"}})}},he=re("Layout",e=>{const{colorText:n,controlHeightSM:o,controlHeight:s,controlHeightLG:a,marginXXS:f}=e,d=a*1.25,i=ne(e,{layoutHeaderHeight:s*2,layoutHeaderPaddingInline:d,layoutHeaderColor:n,layoutFooterPadding:`${o}px ${d}px`,layoutTriggerHeight:a+f*2,layoutZeroTriggerSize:a});return[me(i)]},e=>{const{colorBgLayout:n}=e;return{colorBgHeader:"#001529",colorBgBody:n,colorBgTrigger:"#002140"}}),P=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function B(e){let{suffixCls:n,tagName:o,name:s}=e;return a=>L({compatConfig:{MODE:3},name:s,props:P(),setup(d,i){let{slots:u}=i;const{prefixCls:h}=O(n,d);return()=>{const x=v(v({},d),{prefixCls:h.value,tagName:o});return g(a,x,u)}}})}const R=L({compatConfig:{MODE:3},props:P(),setup(e,n){let{slots:o}=n;return()=>g(e.tagName,{class:e.prefixCls},o)}}),xe=L({compatConfig:{MODE:3},inheritAttrs:!1,props:P(),setup(e,n){let{slots:o,attrs:s}=n;const{prefixCls:a,direction:f}=O("",e),[d,i]=he(a),u=le([]);G(Z,{addSider:t=>{u.value=[...u.value,t]},removeSider:t=>{u.value=u.value.filter(l=>l!==t)}});const x=ie(()=>{const{prefixCls:t,hasSider:l}=e;return{[i.value]:!0,[`${t}`]:!0,[`${t}-has-sider`]:typeof l=="boolean"?l:u.value.length>0,[`${t}-rtl`]:f.value==="rtl"}});return()=>{const{tagName:t}=e;return d(g(t,v(v({},s),{class:[x.value,s.class]}),o))}}}),I=B({suffixCls:"layout",tagName:"section",name:"ALayout"})(xe),C=B({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(R),w=B({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(R),H=B({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(R),K={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},ye=()=>({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:p.any,width:p.oneOfType([p.number,p.string]),collapsedWidth:p.oneOfType([p.number,p.string]),breakpoint:p.oneOf(D("xs","sm","md","lg","xl","xxl","xxxl")),theme:p.oneOf(D("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),ve=(()=>{let e=0;return function(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${n}${e}`}})(),k=L({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ce(ye(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(e,n){let{emit:o,attrs:s,slots:a}=n;const{prefixCls:f}=O("layout-sider",e),d=se(Z,void 0),i=A(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),u=A(!1);j(()=>e.collapsed,()=>{i.value=!!e.collapsed}),G(ae,i);const h=(r,m)=>{e.collapsed===void 0&&(i.value=r),o("update:collapsed",r),o("collapse",r,m)},x=A(r=>{u.value=r.matches,o("breakpoint",r.matches),i.value!==r.matches&&h(r.matches,"responsive")});let t;function l(r){return x.value(r)}const y=ve("ant-sider-");d&&d.addSider(y),de(()=>{j(()=>e.breakpoint,()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}if(typeof window<"u"){const{matchMedia:r}=window;if(r&&e.breakpoint&&e.breakpoint in K){t=r(`(max-width: ${K[e.breakpoint]})`);try{t.addEventListener("change",l)}catch{t.addListener(l)}l(t)}}},{immediate:!0})}),ue(()=>{try{t?.removeEventListener("change",l)}catch{t?.removeListener(l)}d&&d.removeSider(y)});const S=()=>{h(!i.value,"clickTrigger")};return()=>{var r,m;const c=f.value,{collapsedWidth:N,width:U,reverseArrow:T,zeroWidthTriggerStyle:V,trigger:$=(r=a.trigger)===null||r===void 0?void 0:r.call(a),collapsible:W,theme:J}=e,z=i.value?N:U,b=ge(z)?`${z}px`:String(z),E=parseFloat(String(N||0))===0?g("span",{onClick:S,class:M(`${c}-zero-width-trigger`,`${c}-zero-width-trigger-${T?"right":"left"}`),style:V},[$||g(fe,null,null)]):null,Q={expanded:T?g(X,null,null):g(_,null,null),collapsed:T?g(_,null,null):g(X,null,null)},Y=i.value?"collapsed":"expanded",q=Q[Y],ee=$!==null?E||g("div",{class:`${c}-trigger`,onClick:S,style:{width:b}},[$||q]):null,te=[s.style,{flex:`0 0 ${b}`,maxWidth:b,minWidth:b,width:b}],oe=M(c,`${c}-${J}`,{[`${c}-collapsed`]:!!i.value,[`${c}-has-trigger`]:W&&$!==null&&!E,[`${c}-below`]:!!u.value,[`${c}-zero-width`]:parseFloat(b)===0},s.class);return g("aside",F(F({},s),{},{class:oe,style:te}),[g("div",{class:`${c}-children`},[(m=a.default)===null||m===void 0?void 0:m.call(a)]),W||u.value&&E?ee:null])}}}),Be=C,Te=w,ze=k,Ee=H,Ae=v(I,{Header:C,Footer:w,Content:H,Sider:k,install:e=>(e.component(I.name,I),e.component(C.name,C),e.component(w.name,w),e.component(k.name,k),e.component(H.name,H),e)});export{Ee as LayoutContent,Te as LayoutFooter,Be as LayoutHeader,ze as LayoutSider,Ae as default};
@@ -1 +1 @@
1
- import{g as _,m as F,r as L,A,B as O,u as V,_ as $,a as v}from"./useConfigInject-ImjEZhXr.js";import{T as W,v as X}from"./icons-CpgFsfkd.js";import{P as c}from"./index-U4Zd5IK6.js";import{K as f}from"./KeyCode-D63Tfrq7.js";import{W as j}from"./index-a0qENb5U.js";import{_ as w,w as R,t as K}from"./index-DaMG8ksh.js";import{u as N}from"./FormItemContext-B97Dibo2.js";import{o as U}from"./omit-CPycjJ8C.js";import{d as G,_ as Q,r as b,w as q,l as J,n as Y,c as o,j as I}from"./vendor-C5RM7MZO.js";import"./isVisible-C7tPsqfj.js";import"./useState-DRbnp348.js";import"./raf-Deuc0E8-.js";import"./createContext-XExBTk9v.js";const Z=i=>{const{componentCls:n}=i,e=`${n}-inner`;return{[n]:{[`&${n}-small`]:{minWidth:i.switchMinWidthSM,height:i.switchHeightSM,lineHeight:`${i.switchHeightSM}px`,[`${n}-inner`]:{paddingInlineStart:i.switchInnerMarginMaxSM,paddingInlineEnd:i.switchInnerMarginMinSM,[`${e}-checked`]:{marginInlineStart:`calc(-100% + ${i.switchPinSizeSM+i.switchPadding*2}px - ${i.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${i.switchPinSizeSM+i.switchPadding*2}px + ${i.switchInnerMarginMaxSM*2}px)`},[`${e}-unchecked`]:{marginTop:-i.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:i.switchPinSizeSM,height:i.switchPinSizeSM},[`${n}-loading-icon`]:{top:(i.switchPinSizeSM-i.switchLoadingIconSize)/2,fontSize:i.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:i.switchInnerMarginMinSM,paddingInlineEnd:i.switchInnerMarginMaxSM,[`${e}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${e}-unchecked`]:{marginInlineStart:`calc(100% - ${i.switchPinSizeSM+i.switchPadding*2}px + ${i.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${i.switchPinSizeSM+i.switchPadding*2}px - ${i.switchInnerMarginMaxSM*2}px)`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${i.switchPinSizeSM+i.switchPadding}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${e}`]:{[`${e}-unchecked`]:{marginInlineStart:i.marginXXS/2,marginInlineEnd:-i.marginXXS/2}},[`&${n}-checked ${e}`]:{[`${e}-checked`]:{marginInlineStart:-i.marginXXS/2,marginInlineEnd:i.marginXXS/2}}}}}}},k=i=>{const{componentCls:n}=i;return{[n]:{[`${n}-loading-icon${i.iconCls}`]:{position:"relative",top:(i.switchPinSize-i.fontSize)/2,color:i.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:i.switchColor}}}},ii=i=>{const{componentCls:n}=i,e=`${n}-handle`;return{[n]:{[e]:{position:"absolute",top:i.switchPadding,insetInlineStart:i.switchPadding,width:i.switchPinSize,height:i.switchPinSize,transition:`all ${i.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i.colorWhite,borderRadius:i.switchPinSize/2,boxShadow:i.switchHandleShadow,transition:`all ${i.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${e}`]:{insetInlineStart:`calc(100% - ${i.switchPinSize+i.switchPadding}px)`},[`&:not(${n}-disabled):active`]:{[`${e}::before`]:{insetInlineEnd:i.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${e}::before`]:{insetInlineEnd:0,insetInlineStart:i.switchHandleActiveInset}}}}},ni=i=>{const{componentCls:n}=i,e=`${n}-inner`;return{[n]:{[e]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i.switchInnerMarginMax,paddingInlineEnd:i.switchInnerMarginMin,transition:`padding-inline-start ${i.switchDuration} ease-in-out, padding-inline-end ${i.switchDuration} ease-in-out`,[`${e}-checked, ${e}-unchecked`]:{display:"block",color:i.colorTextLightSolid,fontSize:i.fontSizeSM,transition:`margin-inline-start ${i.switchDuration} ease-in-out, margin-inline-end ${i.switchDuration} ease-in-out`,pointerEvents:"none"},[`${e}-checked`]:{marginInlineStart:`calc(-100% + ${i.switchPinSize+i.switchPadding*2}px - ${i.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${i.switchPinSize+i.switchPadding*2}px + ${i.switchInnerMarginMax*2}px)`},[`${e}-unchecked`]:{marginTop:-i.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${e}`]:{paddingInlineStart:i.switchInnerMarginMin,paddingInlineEnd:i.switchInnerMarginMax,[`${e}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${e}-unchecked`]:{marginInlineStart:`calc(100% - ${i.switchPinSize+i.switchPadding*2}px + ${i.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${i.switchPinSize+i.switchPadding*2}px - ${i.switchInnerMarginMax*2}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${e}`]:{[`${e}-unchecked`]:{marginInlineStart:i.switchPadding*2,marginInlineEnd:-i.switchPadding*2}},[`&${n}-checked ${e}`]:{[`${e}-checked`]:{marginInlineStart:-i.switchPadding*2,marginInlineEnd:i.switchPadding*2}}}}}},ei=i=>{const{componentCls:n}=i;return{[n]:w(w(w(w({},L(i)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i.switchMinWidth,height:i.switchHeight,lineHeight:`${i.switchHeight}px`,verticalAlign:"middle",background:i.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${i.motionDurationMid}`,userSelect:"none",[`&:hover:not(${n}-disabled)`]:{background:i.colorTextTertiary}}),A(i)),{[`&${n}-checked`]:{background:i.switchColor,[`&:hover:not(${n}-disabled)`]:{background:i.colorPrimaryHover}},[`&${n}-loading, &${n}-disabled`]:{cursor:"not-allowed",opacity:i.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${n}-rtl`]:{direction:"rtl"}})}},ai=_("Switch",i=>{const n=i.fontSize*i.lineHeight,e=i.controlHeight/2,t=2,h=n-t*2,l=e-t*2,s=F(i,{switchMinWidth:h*2+t*4,switchHeight:n,switchDuration:i.motionDurationMid,switchColor:i.colorPrimary,switchDisabledOpacity:i.opacityLoading,switchInnerMarginMin:h/2,switchInnerMarginMax:h+t+t*2,switchPadding:t,switchPinSize:h,switchBg:i.colorBgContainer,switchMinWidthSM:l*2+t*2,switchHeightSM:e,switchInnerMarginMinSM:l/2,switchInnerMarginMaxSM:l+t+t*2,switchPinSizeSM:l,switchHandleShadow:`0 2px 4px 0 ${new W("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:i.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${i.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ei(s),ni(s),ii(s),k(s),Z(s)]}),ci=K("small","default"),ti=()=>({id:String,prefixCls:String,size:c.oneOf(ci),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),di=G({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:ti(),slots:Object,setup(i,n){let{attrs:e,slots:t,expose:h,emit:l}=n;const s=N(),x=O(),g=I(()=>{var a;return(a=i.disabled)!==null&&a!==void 0?a:x.value});Q(()=>{});const S=b(i.checked!==void 0?i.checked:e.defaultChecked),p=I(()=>S.value===i.checkedValue);q(()=>i.checked,()=>{S.value=i.checked});const{prefixCls:d,direction:C,size:y}=V("switch",i),[P,z]=ai(d),u=b(),M=()=>{var a;(a=u.value)===null||a===void 0||a.focus()};h({focus:M,blur:()=>{var a;(a=u.value)===null||a===void 0||a.blur()}}),J(()=>{Y(()=>{i.autofocus&&!g.value&&u.value.focus()})});const m=(a,r)=>{g.value||(l("update:checked",a),l("change",a,r),s.onFieldChange())},H=a=>{l("blur",a)},E=a=>{M();const r=p.value?i.unCheckedValue:i.checkedValue;m(r,a),l("click",r,a)},T=a=>{a.keyCode===f.LEFT?m(i.unCheckedValue,a):a.keyCode===f.RIGHT&&m(i.checkedValue,a),l("keydown",a)},D=a=>{var r;(r=u.value)===null||r===void 0||r.blur(),l("mouseup",a)},B=I(()=>({[`${d.value}-small`]:y.value==="small",[`${d.value}-loading`]:i.loading,[`${d.value}-checked`]:p.value,[`${d.value}-disabled`]:g.value,[d.value]:!0,[`${d.value}-rtl`]:C.value==="rtl",[z.value]:!0}));return()=>{var a;return P(o(j,null,{default:()=>[o("button",$($($({},U(i,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),e),{},{id:(a=i.id)!==null&&a!==void 0?a:s.id.value,onKeydown:T,onClick:E,onBlur:H,onMouseup:D,type:"button",role:"switch","aria-checked":S.value,disabled:g.value||i.loading,class:[e.class,B.value],ref:u}),[o("div",{class:`${d.value}-handle`},[i.loading?o(X,{class:`${d.value}-loading-icon`},null):null]),o("span",{class:`${d.value}-inner`},[o("span",{class:`${d.value}-inner-checked`},[v(t,i,"checkedChildren")]),o("span",{class:`${d.value}-inner-unchecked`},[v(t,i,"unCheckedChildren")])])])]}))}}}),vi=R(di);export{ci as SwitchSizes,vi as default,ti as switchProps};
1
+ import{g as _,m as F,r as L,A,B as O,u as V,_ as $,a as v}from"./useConfigInject-ZEunuNHN.js";import{T as W,v as X}from"./icons-CpgFsfkd.js";import{P as c}from"./index-U4Zd5IK6.js";import{K as f}from"./KeyCode-D63Tfrq7.js";import{W as j}from"./index-vBi4x_6g.js";import{_ as w,w as R,t as K}from"./index-Dn_OQQaV.js";import{u as N}from"./FormItemContext-C3_-j_SR.js";import{o as U}from"./omit-D7mkMPhu.js";import{d as G,_ as Q,r as b,w as q,l as J,n as Y,c as o,j as I}from"./vendor-C5RM7MZO.js";import"./isVisible-C7tPsqfj.js";import"./useState-DRbnp348.js";import"./raf-Deuc0E8-.js";import"./createContext-CniPpJsG.js";const Z=i=>{const{componentCls:n}=i,e=`${n}-inner`;return{[n]:{[`&${n}-small`]:{minWidth:i.switchMinWidthSM,height:i.switchHeightSM,lineHeight:`${i.switchHeightSM}px`,[`${n}-inner`]:{paddingInlineStart:i.switchInnerMarginMaxSM,paddingInlineEnd:i.switchInnerMarginMinSM,[`${e}-checked`]:{marginInlineStart:`calc(-100% + ${i.switchPinSizeSM+i.switchPadding*2}px - ${i.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${i.switchPinSizeSM+i.switchPadding*2}px + ${i.switchInnerMarginMaxSM*2}px)`},[`${e}-unchecked`]:{marginTop:-i.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${n}-handle`]:{width:i.switchPinSizeSM,height:i.switchPinSizeSM},[`${n}-loading-icon`]:{top:(i.switchPinSizeSM-i.switchLoadingIconSize)/2,fontSize:i.switchLoadingIconSize},[`&${n}-checked`]:{[`${n}-inner`]:{paddingInlineStart:i.switchInnerMarginMinSM,paddingInlineEnd:i.switchInnerMarginMaxSM,[`${e}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${e}-unchecked`]:{marginInlineStart:`calc(100% - ${i.switchPinSizeSM+i.switchPadding*2}px + ${i.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${i.switchPinSizeSM+i.switchPadding*2}px - ${i.switchInnerMarginMaxSM*2}px)`}},[`${n}-handle`]:{insetInlineStart:`calc(100% - ${i.switchPinSizeSM+i.switchPadding}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${e}`]:{[`${e}-unchecked`]:{marginInlineStart:i.marginXXS/2,marginInlineEnd:-i.marginXXS/2}},[`&${n}-checked ${e}`]:{[`${e}-checked`]:{marginInlineStart:-i.marginXXS/2,marginInlineEnd:i.marginXXS/2}}}}}}},k=i=>{const{componentCls:n}=i;return{[n]:{[`${n}-loading-icon${i.iconCls}`]:{position:"relative",top:(i.switchPinSize-i.fontSize)/2,color:i.switchLoadingIconColor,verticalAlign:"top"},[`&${n}-checked ${n}-loading-icon`]:{color:i.switchColor}}}},ii=i=>{const{componentCls:n}=i,e=`${n}-handle`;return{[n]:{[e]:{position:"absolute",top:i.switchPadding,insetInlineStart:i.switchPadding,width:i.switchPinSize,height:i.switchPinSize,transition:`all ${i.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:i.colorWhite,borderRadius:i.switchPinSize/2,boxShadow:i.switchHandleShadow,transition:`all ${i.switchDuration} ease-in-out`,content:'""'}},[`&${n}-checked ${e}`]:{insetInlineStart:`calc(100% - ${i.switchPinSize+i.switchPadding}px)`},[`&:not(${n}-disabled):active`]:{[`${e}::before`]:{insetInlineEnd:i.switchHandleActiveInset,insetInlineStart:0},[`&${n}-checked ${e}::before`]:{insetInlineEnd:0,insetInlineStart:i.switchHandleActiveInset}}}}},ni=i=>{const{componentCls:n}=i,e=`${n}-inner`;return{[n]:{[e]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i.switchInnerMarginMax,paddingInlineEnd:i.switchInnerMarginMin,transition:`padding-inline-start ${i.switchDuration} ease-in-out, padding-inline-end ${i.switchDuration} ease-in-out`,[`${e}-checked, ${e}-unchecked`]:{display:"block",color:i.colorTextLightSolid,fontSize:i.fontSizeSM,transition:`margin-inline-start ${i.switchDuration} ease-in-out, margin-inline-end ${i.switchDuration} ease-in-out`,pointerEvents:"none"},[`${e}-checked`]:{marginInlineStart:`calc(-100% + ${i.switchPinSize+i.switchPadding*2}px - ${i.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${i.switchPinSize+i.switchPadding*2}px + ${i.switchInnerMarginMax*2}px)`},[`${e}-unchecked`]:{marginTop:-i.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${n}-checked ${e}`]:{paddingInlineStart:i.switchInnerMarginMin,paddingInlineEnd:i.switchInnerMarginMax,[`${e}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${e}-unchecked`]:{marginInlineStart:`calc(100% - ${i.switchPinSize+i.switchPadding*2}px + ${i.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${i.switchPinSize+i.switchPadding*2}px - ${i.switchInnerMarginMax*2}px)`}},[`&:not(${n}-disabled):active`]:{[`&:not(${n}-checked) ${e}`]:{[`${e}-unchecked`]:{marginInlineStart:i.switchPadding*2,marginInlineEnd:-i.switchPadding*2}},[`&${n}-checked ${e}`]:{[`${e}-checked`]:{marginInlineStart:-i.switchPadding*2,marginInlineEnd:i.switchPadding*2}}}}}},ei=i=>{const{componentCls:n}=i;return{[n]:w(w(w(w({},L(i)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:i.switchMinWidth,height:i.switchHeight,lineHeight:`${i.switchHeight}px`,verticalAlign:"middle",background:i.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${i.motionDurationMid}`,userSelect:"none",[`&:hover:not(${n}-disabled)`]:{background:i.colorTextTertiary}}),A(i)),{[`&${n}-checked`]:{background:i.switchColor,[`&:hover:not(${n}-disabled)`]:{background:i.colorPrimaryHover}},[`&${n}-loading, &${n}-disabled`]:{cursor:"not-allowed",opacity:i.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${n}-rtl`]:{direction:"rtl"}})}},ai=_("Switch",i=>{const n=i.fontSize*i.lineHeight,e=i.controlHeight/2,t=2,h=n-t*2,l=e-t*2,s=F(i,{switchMinWidth:h*2+t*4,switchHeight:n,switchDuration:i.motionDurationMid,switchColor:i.colorPrimary,switchDisabledOpacity:i.opacityLoading,switchInnerMarginMin:h/2,switchInnerMarginMax:h+t+t*2,switchPadding:t,switchPinSize:h,switchBg:i.colorBgContainer,switchMinWidthSM:l*2+t*2,switchHeightSM:e,switchInnerMarginMinSM:l/2,switchInnerMarginMaxSM:l+t+t*2,switchPinSizeSM:l,switchHandleShadow:`0 2px 4px 0 ${new W("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:i.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${i.opacityLoading})`,switchHandleActiveInset:"-30%"});return[ei(s),ni(s),ii(s),k(s),Z(s)]}),ci=K("small","default"),ti=()=>({id:String,prefixCls:String,size:c.oneOf(ci),disabled:{type:Boolean,default:void 0},checkedChildren:c.any,unCheckedChildren:c.any,tabindex:c.oneOfType([c.string,c.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:c.oneOfType([c.string,c.number,c.looseBool]),checkedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!0),unCheckedValue:c.oneOfType([c.string,c.number,c.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),di=G({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:ti(),slots:Object,setup(i,n){let{attrs:e,slots:t,expose:h,emit:l}=n;const s=N(),x=O(),g=I(()=>{var a;return(a=i.disabled)!==null&&a!==void 0?a:x.value});Q(()=>{});const S=b(i.checked!==void 0?i.checked:e.defaultChecked),p=I(()=>S.value===i.checkedValue);q(()=>i.checked,()=>{S.value=i.checked});const{prefixCls:d,direction:C,size:y}=V("switch",i),[P,z]=ai(d),u=b(),M=()=>{var a;(a=u.value)===null||a===void 0||a.focus()};h({focus:M,blur:()=>{var a;(a=u.value)===null||a===void 0||a.blur()}}),J(()=>{Y(()=>{i.autofocus&&!g.value&&u.value.focus()})});const m=(a,r)=>{g.value||(l("update:checked",a),l("change",a,r),s.onFieldChange())},H=a=>{l("blur",a)},E=a=>{M();const r=p.value?i.unCheckedValue:i.checkedValue;m(r,a),l("click",r,a)},T=a=>{a.keyCode===f.LEFT?m(i.unCheckedValue,a):a.keyCode===f.RIGHT&&m(i.checkedValue,a),l("keydown",a)},D=a=>{var r;(r=u.value)===null||r===void 0||r.blur(),l("mouseup",a)},B=I(()=>({[`${d.value}-small`]:y.value==="small",[`${d.value}-loading`]:i.loading,[`${d.value}-checked`]:p.value,[`${d.value}-disabled`]:g.value,[d.value]:!0,[`${d.value}-rtl`]:C.value==="rtl",[z.value]:!0}));return()=>{var a;return P(o(j,null,{default:()=>[o("button",$($($({},U(i,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),e),{},{id:(a=i.id)!==null&&a!==void 0?a:s.id.value,onKeydown:T,onClick:E,onBlur:H,onMouseup:D,type:"button",role:"switch","aria-checked":S.value,disabled:g.value||i.loading,class:[e.class,B.value],ref:u}),[o("div",{class:`${d.value}-handle`},[i.loading?o(X,{class:`${d.value}-loading-icon`},null):null]),o("span",{class:`${d.value}-inner`},[o("span",{class:`${d.value}-inner-checked`},[v(t,i,"checkedChildren")]),o("span",{class:`${d.value}-inner-unchecked`},[v(t,i,"unCheckedChildren")])])])]}))}}}),vi=R(di);export{ci as SwitchSizes,vi as default,ti as switchProps};
@@ -1 +1 @@
1
- import{g as E,m as _,r as L,u as X,_ as x,f as P,a as G}from"./useConfigInject-ImjEZhXr.js";import{P as I}from"./index-U4Zd5IK6.js";import{i as A}from"./initDefaultProps-DOj2K4bh.js";import{_ as T}from"./index-DaMG8ksh.js";import{K as M}from"./Keyframes-C7fCrnlS.js";import{d as B,s as H,w as j,o as R,c as r,S as N,a0 as O}from"./vendor-C5RM7MZO.js";import"./icons-CpgFsfkd.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 M("antSpinMove",{to:{opacity:1}}),U=new M("antRotate",{to:{transform:"rotate(405deg)"}}),q=n=>({[`${n.componentCls}`]:T(T({},L(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:U,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=_(n,{spinDotDefault:n.colorTextDescription,spinDotSize:n.controlHeightLG/2,spinDotSizeSM:n.controlHeightLG*.35,spinDotSizeLG:n.controlHeight});return[q(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:I.any,delay:Number,indicator:I.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}=X("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),N(s)?O(s,{class:u}):C&&N(C())?O(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",x(x({},z),{},{class:v,"aria-live":"polite","aria-busy":a.value}),[p(i.value),S?r("div",{class:`${i.value}-text`},[S]):null]);if(d&&P(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{g as E,m as _,r as L,u as X,_ as x,f as P,a as G}from"./useConfigInject-ZEunuNHN.js";import{P as I}from"./index-U4Zd5IK6.js";import{i as A}from"./initDefaultProps-DMfJaUzk.js";import{_ as T}from"./index-Dn_OQQaV.js";import{K as M}from"./Keyframes-C7fCrnlS.js";import{d as B,s as H,w as j,o as R,c as r,S as N,a0 as O}from"./vendor-C5RM7MZO.js";import"./icons-CpgFsfkd.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 M("antSpinMove",{to:{opacity:1}}),U=new M("antRotate",{to:{transform:"rotate(405deg)"}}),q=n=>({[`${n.componentCls}`]:T(T({},L(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:U,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=_(n,{spinDotDefault:n.colorTextDescription,spinDotSize:n.controlHeightLG/2,spinDotSizeSM:n.controlHeightLG*.35,spinDotSizeLG:n.controlHeight});return[q(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:I.any,delay:Number,indicator:I.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}=X("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),N(s)?O(s,{class:u}):C&&N(C())?O(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",x(x({},z),{},{class:v,"aria-live":"polite","aria-busy":a.value}),[p(i.value),S?r("div",{class:`${i.value}-text`},[S]):null]);if(d&&P(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 +1 @@
1
- import{i as c,j as s,p as $}from"./vendor-C5RM7MZO.js";import{_ as a}from"./index-DaMG8ksh.js";import{g as d,m as u}from"./useConfigInject-ImjEZhXr.js";const p=Symbol("rowContextKey"),I=o=>{$(p,o)},j=()=>c(p,{gutter:s(()=>{}),wrap:s(()=>{}),supportFlexGap:s(()=>{})}),m=o=>{const{componentCls:e}=o;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},f=o=>{const{componentCls:e}=o;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},y=(o,e)=>{const{componentCls:t,gridColumns:i}=o,r={};for(let n=i;n>=0;n--)n===0?(r[`${t}${e}-${n}`]={display:"none"},r[`${t}-push-${n}`]={insetInlineStart:"auto"},r[`${t}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-push-${n}`]={insetInlineStart:"auto"},r[`${t}${e}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-offset-${n}`]={marginInlineEnd:0},r[`${t}${e}-order-${n}`]={order:0}):(r[`${t}${e}-${n}`]={display:"block",flex:`0 0 ${n/i*100}%`,maxWidth:`${n/i*100}%`},r[`${t}${e}-push-${n}`]={insetInlineStart:`${n/i*100}%`},r[`${t}${e}-pull-${n}`]={insetInlineEnd:`${n/i*100}%`},r[`${t}${e}-offset-${n}`]={marginInlineStart:`${n/i*100}%`},r[`${t}${e}-order-${n}`]={order:n});return r},l=(o,e)=>y(o,e),g=(o,e,t)=>({[`@media (min-width: ${e}px)`]:a({},l(o,t))}),M=d("Grid",o=>[m(o)]),C=d("Grid",o=>{const e=u(o,{gridColumns:24}),t={"-sm":e.screenSMMin,"-md":e.screenMDMin,"-lg":e.screenLGMin,"-xl":e.screenXLMin,"-xxl":e.screenXXLMin};return[f(e),l(e,""),l(e,"-xs"),Object.keys(t).map(i=>g(e,t[i],i)).reduce((i,r)=>a(a({},i),r),{})]});export{C as a,M as b,I as c,j as u};
1
+ import{i as c,j as s,p as $}from"./vendor-C5RM7MZO.js";import{_ as a}from"./index-Dn_OQQaV.js";import{g as d,m as u}from"./useConfigInject-ZEunuNHN.js";const p=Symbol("rowContextKey"),I=o=>{$(p,o)},j=()=>c(p,{gutter:s(()=>{}),wrap:s(()=>{}),supportFlexGap:s(()=>{})}),m=o=>{const{componentCls:e}=o;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},f=o=>{const{componentCls:e}=o;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},y=(o,e)=>{const{componentCls:t,gridColumns:i}=o,r={};for(let n=i;n>=0;n--)n===0?(r[`${t}${e}-${n}`]={display:"none"},r[`${t}-push-${n}`]={insetInlineStart:"auto"},r[`${t}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-push-${n}`]={insetInlineStart:"auto"},r[`${t}${e}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-offset-${n}`]={marginInlineEnd:0},r[`${t}${e}-order-${n}`]={order:0}):(r[`${t}${e}-${n}`]={display:"block",flex:`0 0 ${n/i*100}%`,maxWidth:`${n/i*100}%`},r[`${t}${e}-push-${n}`]={insetInlineStart:`${n/i*100}%`},r[`${t}${e}-pull-${n}`]={insetInlineEnd:`${n/i*100}%`},r[`${t}${e}-offset-${n}`]={marginInlineStart:`${n/i*100}%`},r[`${t}${e}-order-${n}`]={order:n});return r},l=(o,e)=>y(o,e),g=(o,e,t)=>({[`@media (min-width: ${e}px)`]:a({},l(o,t))}),M=d("Grid",o=>[m(o)]),C=d("Grid",o=>{const e=u(o,{gridColumns:24}),t={"-sm":e.screenSMMin,"-md":e.screenMDMin,"-lg":e.screenLGMin,"-xl":e.screenXLMin,"-xxl":e.screenXXLMin};return[f(e),l(e,""),l(e,"-xs"),Object.keys(t).map(i=>g(e,t[i],i)).reduce((i,r)=>a(a({},i),r),{})]});export{C as a,M as b,I as c,j as u};
@@ -1,4 +1,4 @@
1
- import{c as R,i as $e,_ as P,J as Ce,M as Y,g as Ve,m as we,r as Be,u as Me}from"./useConfigInject-ImjEZhXr.js";import{_ as f,w as Te,p as z,y as D,n as N,x as Pe,o as He}from"./index-DaMG8ksh.js";import{P as g,w as Oe}from"./index-U4Zd5IK6.js";import{B as J}from"./Trigger-C7MTh_xj.js";import{c as w,d as I,l as ke,o as ie,s as Z,j as le,w as Fe,a6 as Le,r as U}from"./vendor-C5RM7MZO.js";import{s as ue,a as G}from"./motion-joGf7r-l.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-DOj2K4bh.js";import{T as Ne,b as Ee}from"./index-BirLVqrC.js";import{w as ee}from"./raf-Deuc0E8-.js";import{u as De}from"./FormItemContext-B97Dibo2.js";import{T as je}from"./icons-CpgFsfkd.js";import"./Portal-CFB5Y97t.js";import"./vnode-DAWimP6X.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-D4AbuDdO.js";import"./placementArrow-DWcIO1y4.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-C_wDMX2Q.js";import"./zoom-u6SXbmzZ.js";import"./Keyframes-C7fCrnlS.js";import"./createContext-XExBTk9v.js";const q=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:r,class:a}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const d=s?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},p=f(f({},r),d);return n?w("div",{class:a,style:p},null):null};q.inheritAttrs=!1;const Re=(e,o,t,n,s,r)=>{const a=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=r;i+=n)a.indexOf(i)===-1&&a.push(i);return a},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:r,marks:a,dots:i,step:l,included:u,lowerBound:d,upperBound:p,max:b,min:C,dotStyle:y,activeDotStyle:B}=t,h=b-C,x=Re(s,a,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===p||u&&c<=p&&c>=d;let S=s?f(f({},y),{[r?"top":"bottom"]:$}):f(f({},y),{[r?"right":"left"]:$});V&&(S=f(f({},S),B));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:r});return w("span",{class:v,style:S,key:c},null)});return w("div",{class:`${n}-step`},[x])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:r,reverse:a,marks:i,included:l,upperBound:u,lowerBound:d,max:p,min:b,onClickLabel:C}=t,y=Object.keys(i),B=n.mark,h=p-b,x=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let S=V?$.label:$;if(!S&&S!==0)return null;B&&(S=B({point:c,label:S}));const v=!l&&c===u||l&&c<=u&&c>=d,m=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[a?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(c-b)/h*100}%`},T=r?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return w("span",P({class:m,style:L,key:c,onMousedown:k=>C(k,c)},H),[S])});return w("div",{class:s},[x])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,o){let{attrs:t,emit:n,expose:s}=o;const r=Z(!1),a=Z(),i=()=>{document.activeElement===a.value&&(r.value=!0)},l=h=>{r.value=!1,n("blur",h)},u=()=>{r.value=!1},d=()=>{var h;(h=a.value)===null||h===void 0||h.focus()},p=()=>{var h;(h=a.value)===null||h===void 0||h.blur()},b=()=>{r.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:p,clickFocus:b,ref:a});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const B=le(()=>{const{vertical:h,offset:x,reverse:c}=e;return h?{[c?"top":"bottom"]:`${x}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${x}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:x,min:c,max:$,value:V,tabindex:S,ariaLabel:v,ariaLabelledBy:m,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:r.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!x},k=[t.style,B.value];let F=S||0;(x||S===null)&&(F=null);let W;M&&(W=M(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:T,ref:a,style:k});return w("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":m,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function me(e,o){let{min:t,max:n}=o;return e<t||e>n}function te(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function ne(e,o){let{marks:t,step:n,min:s,max:r}=o;const a=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,pe(n)),u=Math.floor((r*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),p=Math.round(d)*n+s;a.push(p)}const i=a.map(l=>Math.abs(e-l));return a[i.indexOf(Math.min(...i))]}function pe(e){const o=e.toString();let t=0;return o.indexOf(".")>=0&&(t=o.length-o.indexOf(".")-1),t}function oe(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.clientY:o.pageX)/t}function se(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.touches[0].clientY:o.touches[0].pageX)/t}function re(e,o){const t=o.getBoundingClientRect();return e?t.top+t.height*.5:window.scrollX+t.left+t.width*.5}function Q(e,o){let{max:t,min:n}=o;return e<=n?n:e>=t?t:e}function ge(e,o){const{step:t}=o,n=isFinite(ne(e,o))?ne(e,o):0;return t===null?n:parseFloat(n.toFixed(pe(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(a,i)=>a+i,decrease:(a,i)=>a-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),r=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[r]?t.marks[r]:o}function ve(e,o,t){const n="increase",s="decrease";let r=n;switch(e.keyCode){case E.UP:r=o&&t?s:n;break;case E.RIGHT:r=!o&&t?s:n;break;case E.DOWN:r=o&&t?n:s;break;case E.LEFT:r=!o&&t?n:s;break;case E.END:return(a,i)=>i.max;case E.HOME:return(a,i)=>i.min;case E.PAGE_UP:return(a,i)=>a+i.step*2;case E.PAGE_DOWN:return(a,i)=>a-i.step*2;default:return}return(a,i)=>ze(r,a,i)}var Ae=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)o.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t};function j(){}function be(e){const o={id:String,min:Number,max:Number,step:Number,marks:g.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:g.object,maximumTrackStyle:g.object,handleStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),trackStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),railStyle:g.object,dotStyle:g.object,activeDotStyle:g.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return I({compatConfig:{MODE:3},name:"CreateSlider",mixins:[J,e],inheritAttrs:!1,props:de(o,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){const{step:t,max:n,min:s}=this;return this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:t,disabled:n}=this;t&&!n&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(t){var{index:n,directives:s,className:r,style:a}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:r,style:a,key:n});return w(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:r,vertical:a}=this.$props,{bounds:i}=this.$data,l=r&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=r&&i.length>=2&&!u&&!l.map((d,p)=>{const b=p?!0:d>=i[p];return p===l.length-1?d<=i[p]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=re(a,t.target);this.dragOffset=s-d,s=d}this.onStart(s)}},onMouseDown(t){if(t.button!==0)return;this.removeDocumentEvents();const n=this.$props.vertical,s=oe(n,t);this.onDown(t,s),this.addDocumentMouseEvents()},onTouchStart(t){if(te(t))return;const n=this.vertical,s=se(n,t);this.onDown(t,s),this.addDocumentTouchEvents(),A(t)},onFocus(t){const{vertical:n}=this;if(X(t,this.handlesRefs)&&!this.dragTrack){const s=re(n,t.target);this.dragOffset=0,this.onStart(s),A(t),this.$emit("focus",t)}},onBlur(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(t){if(!this.sliderRef){this.onEnd();return}const n=oe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(t){if(te(t)||!this.sliderRef){this.onEnd();return}const n=se(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(t){this.sliderRef&&X(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel(t,n){t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},()=>this.onEnd(!0))},getSliderStart(){const t=this.sliderRef,{vertical:n,reverse:s}=this,r=t.getBoundingClientRect();return n?s?r.bottom:r.top:window.scrollX+(s?r.right:r.left)},getSliderLength(){const t=this.sliderRef;if(!t)return 0;const n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents(){this.onTouchMoveListener=G(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=G(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=G(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=G(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(t=>{var n,s;(s=(n=this.handlesRefs[t])===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)})},calcValue(t){const{vertical:n,min:s,max:r}=this,a=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-a)*(r-s)+s:a*(r-s)+s},calcValueByPos(t){const s=(this.reverse?-1:1)*(t-this.getSliderStart());return this.trimAlignValue(this.calcValue(s))},calcOffset(t){const{min:n,max:s}=this,r=(t-n)/(s-n);return Math.max(0,r*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:r,included:a,disabled:i,vertical:l,reverse:u,min:d,max:p,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:B,id:h}=this,{class:x,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),S=R(t,x,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},m={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return w("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:S},m),{},{onMousedown:i?j:this.onMouseDown,onMouseup:i?j:this.onMouseUp,onKeydown:i?j:this.onKeyDown,onFocus:i?j:this.onFocus,onBlur:i?j:this.onBlur,style:c}),[w("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,w(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:r,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,dotStyle:y,activeDotStyle:B},null),V,w(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[J],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,o=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(o),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const o=e!==void 0?e:this.sValue,t=this.trimAlignValue(o,this.$props);t!==this.sValue&&(this.setState({sValue:t}),me(o,this.$props)&&this.$emit("change",t))},onChange(e){const o=!Y(this,"value"),t=e.sValue>this.max?f(f({},e),{sValue:this.max}):e;o&&this.setState(t);const n=t.sValue;this.$emit("change",n)},onStart(e){this.setState({dragging:!0});const{sValue:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==o&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd(e){const{dragging:o}=this;this.removeDocumentEvents(),(o||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,o){A(e);const{sValue:t}=this,n=this.calcValueByPos(o);n!==t&&this.onChange({sValue:n})},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{sValue:s}=this,r=n(s,this.$props),a=this.trimAlignValue(r);if(a===s)return;this.onChange({sValue:a}),this.$emit("afterChange",a),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const t=f(f({},this.$props),o),n=Q(e,t);return ge(n,t)},getTrack(e){let{prefixCls:o,reverse:t,vertical:n,included:s,minimumTrackStyle:r,mergedTrackStyle:a,length:i,offset:l}=e;return w(q,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},r),a)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:r,handleStyle:a,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:p,max:b,startPoint:C,reverse:y,handle:B,defaultHandle:h}=this,x=B||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),S=x({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:p,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:a[0]||a,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,m=r[0]||r;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:m,length:V-v}),handles:S}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:r,pushable:a}=s,i=Number(a),l=Q(o,s);let u=l;return!r&&t!=null&&n!==void 0&&(t>0&&l<=n[t-1]+i&&(u=n[t-1]+i),t<n.length-1&&l>=n[t+1]-i&&(u=n[t+1]-i)),ge(u,s)},_e={defaultValue:g.arrayOf(g.number),value:g.arrayOf(g.number),count:Number,pushable:Oe(g.oneOfType([g.looseBool,g.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:g.arrayOf(g.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ge=I({compatConfig:{MODE:3},name:"Range",mixins:[J],inheritAttrs:!1,props:de(_e,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:o,max:t}=this,n=Array(...Array(e+1)).map(()=>o),s=Y(this,"defaultValue")?this.defaultValue:n;let{value:r}=this;r===void 0&&(r=s);const a=r.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:a[0]===t?0:a.length-1,bounds:a}},watch:{value:{handler(e){const{bounds:o}=this;this.setChangeValue(e||o)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:o}=this;let t=e.map((n,s)=>_({value:n,handle:s,bounds:o,props:this.$props}));if(o.length===t.length){if(t.every((n,s)=>n===o[s]))return null}else t=e.map((n,s)=>_({value:n,handle:s,props:this.$props}));if(this.setState({bounds:t}),e.some(n=>me(n,this.$props))){const n=e.map(s=>Q(s,this.$props));this.$emit("change",n)}},onChange(e){if(!Y(this,"value"))this.setState(e);else{const s={};["sHandle","recent"].forEach(r=>{e[r]!==void 0&&(s[r]=e[r])}),Object.keys(s).length&&this.setState(s)}const n=f(f({},this.$data),e).bounds;this.$emit("change",n)},positionGetValue(e){const o=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),s=this.getBoundNeedMoving(t,n),r=o[s];if(t===r)return null;const a=[...o];return a[s]=t,a},onStart(e){const{bounds:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;const n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const s=o[this.prevMovedHandleIndex];if(t===s)return;const r=[...o];r[this.prevMovedHandleIndex]=t,this.onChange({bounds:r})},onEnd(e){const{sHandle:o}=this;this.removeDocumentEvents(),o||(this.dragTrack=!1),(o!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,o,t,n){A(e);const{$data:s,$props:r}=this,a=r.max||100,i=r.min||0;if(t){let b=r.vertical?-o:o;b=r.reverse?-b:b;const C=a-Math.max(...n),y=i-Math.min(...n),B=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(x=>Math.floor(Math.max(Math.min(x+B,a),i)));s.bounds.map((x,c)=>x===h[c]).some(x=>!x)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),p=l[u];d!==p&&this.moveTo(d)},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{bounds:s,sHandle:r}=this,a=s[r===null?this.recent:r],i=n(a,this.$props),l=_({value:i,handle:r,bounds:s,props:this.$props});if(l===a)return;this.moveTo(l,!0)}},getClosestBound(e){const{bounds:o}=this;let t=0;for(let n=1;n<o.length-1;n+=1)e>=o[n]&&(t=n);return Math.abs(o[t+1]-e)<Math.abs(o[t]-e)&&(t+=1),t},getBoundNeedMoving(e,o){const{bounds:t,recent:n}=this;let s=o;const r=t[o+1]===t[o];return r&&t[n]===t[o]&&(s=n),r&&e!==t[o+1]&&(s=e<t[o+1]?o:o+1),s},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:o,min:t,max:n}=this,s=this.internalPointsCache;if(!s||s.marks!==e||s.step!==o){const r=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)r[i]=i;const a=Object.keys(r).map(parseFloat);a.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:a}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,r=n===null?s:n;t[r]=e;let a=r;this.$props.pushable!==!1?this.pushSurroundingHandles(t,a):this.$props.allowCross&&(t.sort((i,l)=>i-l),a=t.indexOf(e)),this.onChange({recent:a,sHandle:a,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let r=0;if(e[o+1]-t<s&&(r=1),t-e[o-1]<s&&(r=-1),r===0)return;const a=o+r,i=r*(e[a]-t);this.pushHandle(e,a,r,s-i)||(e[o]=e[a]-r*s)},pushHandle(e,o,t,n){const s=e[o];let r=e[o];for(;t*(r-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;r=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),r=n.indexOf(e[o])+t;if(r>=n.length||r<0)return!1;const a=o+t,i=n[r],{pushable:l}=this,u=Number(l),d=t*(e[a]-i);return this.pushHandle(e,a,t,u-d)?(e[o]=i,!0):!1},trimAlignValue(e){const{sHandle:o,bounds:t}=this;return _({value:e,handle:o,bounds:t,props:this.$props})},ensureValueNotConflict(e,o,t){let{allowCross:n,pushable:s}=t;const r=this.$data||{},{bounds:a}=r;if(e=e===void 0?r.sHandle:e,s=Number(s),!n&&e!=null&&a!==void 0){if(e>0&&o<=a[e-1]+s)return a[e-1]+s;if(e<a.length-1&&o>=a[e+1]-s)return a[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:r,offsets:a,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,p=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return w(q,{class:p,vertical:s,reverse:n,included:r,offset:a[d-1],length:a[d]-a[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:r,min:a,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:p,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:B,ariaValueTextFormatterGroupForHandles:h}=this,x=u||d,c=o.map(S=>this.calcOffset(S)),$=`${t}-handle`,V=o.map((S,v)=>{let m=C[v]||0;(r||C[v]===null)&&(m=null);const M=e===v;return x({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:S,index:v,tabindex:m,min:a,max:i,reverse:l,disabled:r,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:B[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:p}),handles:V}}}}),Ue=be(Ge),Ke=I({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Ee(),setup(e,o){let{attrs:t,slots:n}=o;const s=U(null),r=U(null);function a(){ee.cancel(r.value),r.value=null}function i(){r.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),r.value=null})}const l=()=>{a(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{a()}),()=>w(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:r,colorFillContentHover:a}=e;return{[o]:f(f({},Be(e)),{position:"relative",height:t,margin:`${r}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${r}px`},[`${o}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${o}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${o}-rail`]:{backgroundColor:e.colorFillSecondary},[`${o}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${o}-dot`]:{borderColor:a},[`${o}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${o}-dot-active`]:{borderColor:e.colorPrimary}},[`${o}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${o}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
1
+ import{c as R,i as $e,_ as P,J as Ce,M as Y,g as Ve,m as we,r as Be,u as Me}from"./useConfigInject-ZEunuNHN.js";import{_ as f,w as Te,p as z,y as D,n as N,x as Pe,o as He}from"./index-Dn_OQQaV.js";import{P as g,w as Oe}from"./index-U4Zd5IK6.js";import{B as J}from"./Trigger-xAvohiq9.js";import{c as w,d as I,l as ke,o as ie,s as Z,j as le,w as Fe,a6 as Le,r as U}from"./vendor-C5RM7MZO.js";import{s as ue,a as G}from"./motion-sEbWmOWo.js";import{K as E}from"./KeyCode-D63Tfrq7.js";import{i as de}from"./initDefaultProps-DMfJaUzk.js";import{T as Ne,b as Ee}from"./index-CTetsi8W.js";import{w as ee}from"./raf-Deuc0E8-.js";import{u as De}from"./FormItemContext-C3_-j_SR.js";import{T as je}from"./icons-CpgFsfkd.js";import"./Portal-CFB5Y97t.js";import"./vnode-DVHvXn9F.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-gRK4XSlW.js";import"./placementArrow-By1Bkq1d.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-C5kDbQCi.js";import"./zoom-ByzgJIn6.js";import"./Keyframes-C7fCrnlS.js";import"./createContext-CniPpJsG.js";const q=(e,o)=>{let{attrs:t}=o;const{included:n,vertical:s,style:r,class:a}=t;let{length:i,offset:l,reverse:u}=t;i<0&&(u=!u,i=Math.abs(i),l=100-l);const d=s?{[u?"top":"bottom"]:`${l}%`,[u?"bottom":"top"]:"auto",height:`${i}%`}:{[u?"right":"left"]:`${l}%`,[u?"left":"right"]:"auto",width:`${i}%`},p=f(f({},r),d);return n?w("div",{class:a,style:p},null):null};q.inheritAttrs=!1;const Re=(e,o,t,n,s,r)=>{const a=Object.keys(o).map(parseFloat).sort((i,l)=>i-l);if(t&&n)for(let i=s;i<=r;i+=n)a.indexOf(i)===-1&&a.push(i);return a},ce=(e,o)=>{let{attrs:t}=o;const{prefixCls:n,vertical:s,reverse:r,marks:a,dots:i,step:l,included:u,lowerBound:d,upperBound:p,max:b,min:C,dotStyle:y,activeDotStyle:B}=t,h=b-C,x=Re(s,a,i,l,C,b).map(c=>{const $=`${Math.abs(c-C)/h*100}%`,V=!u&&c===p||u&&c<=p&&c>=d;let S=s?f(f({},y),{[r?"top":"bottom"]:$}):f(f({},y),{[r?"right":"left"]:$});V&&(S=f(f({},S),B));const v=R({[`${n}-dot`]:!0,[`${n}-dot-active`]:V,[`${n}-dot-reverse`]:r});return w("span",{class:v,style:S,key:c},null)});return w("div",{class:`${n}-step`},[x])};ce.inheritAttrs=!1;const he=(e,o)=>{let{attrs:t,slots:n}=o;const{class:s,vertical:r,reverse:a,marks:i,included:l,upperBound:u,lowerBound:d,max:p,min:b,onClickLabel:C}=t,y=Object.keys(i),B=n.mark,h=p-b,x=y.map(parseFloat).sort((c,$)=>c-$).map(c=>{const $=typeof i[c]=="function"?i[c]():i[c],V=typeof $=="object"&&!$e($);let S=V?$.label:$;if(!S&&S!==0)return null;B&&(S=B({point:c,label:S}));const v=!l&&c===u||l&&c<=u&&c>=d,m=R({[`${s}-text`]:!0,[`${s}-text-active`]:v}),M={marginBottom:"-50%",[a?"top":"bottom"]:`${(c-b)/h*100}%`},O={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(c-b)/h*100}%`},T=r?M:O,L=V?f(f({},T),$.style):T,H={[ue?"onTouchstartPassive":"onTouchstart"]:k=>C(k,c)};return w("span",P({class:m,style:L,key:c,onMousedown:k=>C(k,c)},H),[S])});return w("div",{class:s},[x])};he.inheritAttrs=!1;const fe=I({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(e,o){let{attrs:t,emit:n,expose:s}=o;const r=Z(!1),a=Z(),i=()=>{document.activeElement===a.value&&(r.value=!0)},l=h=>{r.value=!1,n("blur",h)},u=()=>{r.value=!1},d=()=>{var h;(h=a.value)===null||h===void 0||h.focus()},p=()=>{var h;(h=a.value)===null||h===void 0||h.blur()},b=()=>{r.value=!0,d()},C=h=>{h.preventDefault(),d(),n("mousedown",h)};s({focus:d,blur:p,clickFocus:b,ref:a});let y=null;ke(()=>{y=G(document,"mouseup",i)}),ie(()=>{y?.remove()});const B=le(()=>{const{vertical:h,offset:x,reverse:c}=e;return h?{[c?"top":"bottom"]:`${x}%`,[c?"bottom":"top"]:"auto",transform:c?null:"translateY(+50%)"}:{[c?"right":"left"]:`${x}%`,[c?"left":"right"]:"auto",transform:`translateX(${c?"+":"-"}50%)`}});return()=>{const{prefixCls:h,disabled:x,min:c,max:$,value:V,tabindex:S,ariaLabel:v,ariaLabelledBy:m,ariaValueTextFormatter:M,onMouseenter:O,onMouseleave:T}=e,L=R(t.class,{[`${h}-handle-click-focused`]:r.value}),H={"aria-valuemin":c,"aria-valuemax":$,"aria-valuenow":V,"aria-disabled":!!x},k=[t.style,B.value];let F=S||0;(x||S===null)&&(F=null);let W;M&&(W=M(V));const K=f(f(f(f({},t),{role:"slider",tabindex:F}),H),{class:L,onBlur:l,onKeydown:u,onMousedown:C,onMouseenter:O,onMouseleave:T,ref:a,style:k});return w("div",P(P({},K),{},{"aria-label":v,"aria-labelledby":m,"aria-valuetext":W}),null)}}});function X(e,o){try{return Object.keys(o).some(t=>e.target===o[t].ref)}catch{return!1}}function me(e,o){let{min:t,max:n}=o;return e<t||e>n}function te(e){return e.touches.length>1||e.type.toLowerCase()==="touchend"&&e.touches.length>0}function ne(e,o){let{marks:t,step:n,min:s,max:r}=o;const a=Object.keys(t).map(parseFloat);if(n!==null){const l=Math.pow(10,pe(n)),u=Math.floor((r*l-s*l)/(n*l)),d=Math.min((e-s)/n,u),p=Math.round(d)*n+s;a.push(p)}const i=a.map(l=>Math.abs(e-l));return a[i.indexOf(Math.min(...i))]}function pe(e){const o=e.toString();let t=0;return o.indexOf(".")>=0&&(t=o.length-o.indexOf(".")-1),t}function oe(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.clientY:o.pageX)/t}function se(e,o){let t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(e?o.touches[0].clientY:o.touches[0].pageX)/t}function re(e,o){const t=o.getBoundingClientRect();return e?t.top+t.height*.5:window.scrollX+t.left+t.width*.5}function Q(e,o){let{max:t,min:n}=o;return e<=n?n:e>=t?t:e}function ge(e,o){const{step:t}=o,n=isFinite(ne(e,o))?ne(e,o):0;return t===null?n:parseFloat(n.toFixed(pe(t)))}function A(e){e.stopPropagation(),e.preventDefault()}function ze(e,o,t){const n={increase:(a,i)=>a+i,decrease:(a,i)=>a-i},s=n[e](Object.keys(t.marks).indexOf(JSON.stringify(o)),1),r=Object.keys(t.marks)[s];return t.step?n[e](o,t.step):Object.keys(t.marks).length&&t.marks[r]?t.marks[r]:o}function ve(e,o,t){const n="increase",s="decrease";let r=n;switch(e.keyCode){case E.UP:r=o&&t?s:n;break;case E.RIGHT:r=!o&&t?s:n;break;case E.DOWN:r=o&&t?n:s;break;case E.LEFT:r=!o&&t?n:s;break;case E.END:return(a,i)=>i.max;case E.HOME:return(a,i)=>i.min;case E.PAGE_UP:return(a,i)=>a+i.step*2;case E.PAGE_DOWN:return(a,i)=>a-i.step*2;default:return}return(a,i)=>ze(r,a,i)}var Ae=function(e,o){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)o.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(t[n[s]]=e[n[s]]);return t};function j(){}function be(e){const o={id:String,min:Number,max:Number,step:Number,marks:g.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:g.object,maximumTrackStyle:g.object,handleStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),trackStyle:g.oneOfType([g.object,g.arrayOf(g.object)]),railStyle:g.object,dotStyle:g.object,activeDotStyle:g.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return I({compatConfig:{MODE:3},name:"CreateSlider",mixins:[J,e],inheritAttrs:!1,props:de(o,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data(){const{step:t,max:n,min:s}=this;return this.handlesRefs={},{}},mounted(){this.$nextTick(()=>{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:t,disabled:n}=this;t&&!n&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(t){var{index:n,directives:s,className:r,style:a}=t,i=Ae(t,["index","directives","className","style"]);if(delete i.dragging,i.value===null)return null;const l=f(f({},i),{class:r,style:a,key:n});return w(fe,l,null)},onDown(t,n){let s=n;const{draggableTrack:r,vertical:a}=this.$props,{bounds:i}=this.$data,l=r&&this.positionGetValue?this.positionGetValue(s)||[]:[],u=X(t,this.handlesRefs);if(this.dragTrack=r&&i.length>=2&&!u&&!l.map((d,p)=>{const b=p?!0:d>=i[p];return p===l.length-1?d<=i[p]:b}).some(d=>!d),this.dragTrack)this.dragOffset=s,this.startBounds=[...i];else{if(!u)this.dragOffset=0;else{const d=re(a,t.target);this.dragOffset=s-d,s=d}this.onStart(s)}},onMouseDown(t){if(t.button!==0)return;this.removeDocumentEvents();const n=this.$props.vertical,s=oe(n,t);this.onDown(t,s),this.addDocumentMouseEvents()},onTouchStart(t){if(te(t))return;const n=this.vertical,s=se(n,t);this.onDown(t,s),this.addDocumentTouchEvents(),A(t)},onFocus(t){const{vertical:n}=this;if(X(t,this.handlesRefs)&&!this.dragTrack){const s=re(n,t.target);this.dragOffset=0,this.onStart(s),A(t),this.$emit("focus",t)}},onBlur(t){this.dragTrack||this.onEnd(),this.$emit("blur",t)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(t){if(!this.sliderRef){this.onEnd();return}const n=oe(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(t){if(te(t)||!this.sliderRef){this.onEnd();return}const n=se(this.vertical,t);this.onMove(t,n-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(t){this.sliderRef&&X(t,this.handlesRefs)&&this.onKeyboard(t)},onClickMarkLabel(t,n){t.stopPropagation(),this.onChange({sValue:n}),this.setState({sValue:n},()=>this.onEnd(!0))},getSliderStart(){const t=this.sliderRef,{vertical:n,reverse:s}=this,r=t.getBoundingClientRect();return n?s?r.bottom:r.top:window.scrollX+(s?r.right:r.left)},getSliderLength(){const t=this.sliderRef;if(!t)return 0;const n=t.getBoundingClientRect();return this.vertical?n.height:n.width},addDocumentTouchEvents(){this.onTouchMoveListener=G(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=G(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=G(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=G(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var t;this.$props.disabled||(t=this.handlesRefs[0])===null||t===void 0||t.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(t=>{var n,s;(s=(n=this.handlesRefs[t])===null||n===void 0?void 0:n.blur)===null||s===void 0||s.call(n)})},calcValue(t){const{vertical:n,min:s,max:r}=this,a=Math.abs(Math.max(t,0)/this.getSliderLength());return n?(1-a)*(r-s)+s:a*(r-s)+s},calcValueByPos(t){const s=(this.reverse?-1:1)*(t-this.getSliderStart());return this.trimAlignValue(this.calcValue(s))},calcOffset(t){const{min:n,max:s}=this,r=(t-n)/(s-n);return Math.max(0,r*100)},saveSlider(t){this.sliderRef=t},saveHandle(t,n){this.handlesRefs[t]=n}},render(){const{prefixCls:t,marks:n,dots:s,step:r,included:a,disabled:i,vertical:l,reverse:u,min:d,max:p,maximumTrackStyle:b,railStyle:C,dotStyle:y,activeDotStyle:B,id:h}=this,{class:x,style:c}=this.$attrs,{tracks:$,handles:V}=this.renderSlider(),S=R(t,x,{[`${t}-with-marks`]:Object.keys(n).length,[`${t}-disabled`]:i,[`${t}-vertical`]:l,[`${t}-horizontal`]:!l}),v={vertical:l,marks:n,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,reverse:u,class:`${t}-mark`,onClickLabel:i?j:this.onClickMarkLabel},m={[ue?"onTouchstartPassive":"onTouchstart"]:i?j:this.onTouchStart};return w("div",P(P({id:h,ref:this.saveSlider,tabindex:"-1",class:S},m),{},{onMousedown:i?j:this.onMouseDown,onMouseup:i?j:this.onMouseUp,onKeydown:i?j:this.onKeyDown,onFocus:i?j:this.onFocus,onBlur:i?j:this.onBlur,style:c}),[w("div",{class:`${t}-rail`,style:f(f({},b),C)},null),$,w(ce,{prefixCls:t,vertical:l,reverse:u,marks:n,dots:s,step:r,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:d,dotStyle:y,activeDotStyle:B},null),V,w(he,v,{mark:this.$slots.mark}),Ce(this)])}})}const Ie=I({compatConfig:{MODE:3},name:"Slider",mixins:[J],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:g.oneOfType([g.number,g.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const e=this.defaultValue!==void 0?this.defaultValue:this.min,o=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(o),dragging:!1}},watch:{value:{handler(e){this.setChangeValue(e)},deep:!0},min(){const{sValue:e}=this;this.setChangeValue(e)},max(){const{sValue:e}=this;this.setChangeValue(e)}},methods:{setChangeValue(e){const o=e!==void 0?e:this.sValue,t=this.trimAlignValue(o,this.$props);t!==this.sValue&&(this.setState({sValue:t}),me(o,this.$props)&&this.$emit("change",t))},onChange(e){const o=!Y(this,"value"),t=e.sValue>this.max?f(f({},e),{sValue:this.max}):e;o&&this.setState(t);const n=t.sValue;this.$emit("change",n)},onStart(e){this.setState({dragging:!0});const{sValue:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e,t!==o&&(this.prevMovedHandleIndex=0,this.onChange({sValue:t}))},onEnd(e){const{dragging:o}=this;this.removeDocumentEvents(),(o||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(e,o){A(e);const{sValue:t}=this,n=this.calcValueByPos(o);n!==t&&this.onChange({sValue:n})},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{sValue:s}=this,r=n(s,this.$props),a=this.trimAlignValue(r);if(a===s)return;this.onChange({sValue:a}),this.$emit("afterChange",a),this.onEnd()}},getLowerBound(){const e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound(){return this.$data.sValue<this.$props.startPoint?this.$props.startPoint:this.$data.sValue},trimAlignValue(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;const t=f(f({},this.$props),o),n=Q(e,t);return ge(n,t)},getTrack(e){let{prefixCls:o,reverse:t,vertical:n,included:s,minimumTrackStyle:r,mergedTrackStyle:a,length:i,offset:l}=e;return w(q,{class:`${o}-track`,vertical:n,included:s,offset:l,reverse:t,length:i,style:f(f({},r),a)},null)},renderSlider(){const{prefixCls:e,vertical:o,included:t,disabled:n,minimumTrackStyle:s,trackStyle:r,handleStyle:a,tabindex:i,ariaLabelForHandle:l,ariaLabelledByForHandle:u,ariaValueTextFormatterForHandle:d,min:p,max:b,startPoint:C,reverse:y,handle:B,defaultHandle:h}=this,x=B||h,{sValue:c,dragging:$}=this,V=this.calcOffset(c),S=x({class:`${e}-handle`,prefixCls:e,vertical:o,offset:V,value:c,dragging:$,disabled:n,min:p,max:b,reverse:y,index:0,tabindex:i,ariaLabel:l,ariaLabelledBy:u,ariaValueTextFormatter:d,style:a[0]||a,ref:M=>this.saveHandle(0,M),onFocus:this.onFocus,onBlur:this.onBlur}),v=C!==void 0?this.calcOffset(C):0,m=r[0]||r;return{tracks:this.getTrack({prefixCls:e,reverse:y,vertical:o,included:t,offset:v,minimumTrackStyle:s,mergedTrackStyle:m,length:V-v}),handles:S}}}}),We=be(Ie),_=e=>{let{value:o,handle:t,bounds:n,props:s}=e;const{allowCross:r,pushable:a}=s,i=Number(a),l=Q(o,s);let u=l;return!r&&t!=null&&n!==void 0&&(t>0&&l<=n[t-1]+i&&(u=n[t-1]+i),t<n.length-1&&l>=n[t+1]-i&&(u=n[t+1]-i)),ge(u,s)},_e={defaultValue:g.arrayOf(g.number),value:g.arrayOf(g.number),count:Number,pushable:Oe(g.oneOfType([g.looseBool,g.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:g.arrayOf(g.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ge=I({compatConfig:{MODE:3},name:"Range",mixins:[J],inheritAttrs:!1,props:de(_e,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:e,min:o,max:t}=this,n=Array(...Array(e+1)).map(()=>o),s=Y(this,"defaultValue")?this.defaultValue:n;let{value:r}=this;r===void 0&&(r=s);const a=r.map((l,u)=>_({value:l,handle:u,props:this.$props}));return{sHandle:null,recent:a[0]===t?0:a.length-1,bounds:a}},watch:{value:{handler(e){const{bounds:o}=this;this.setChangeValue(e||o)},deep:!0},min(){const{value:e}=this;this.setChangeValue(e||this.bounds)},max(){const{value:e}=this;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue(e){const{bounds:o}=this;let t=e.map((n,s)=>_({value:n,handle:s,bounds:o,props:this.$props}));if(o.length===t.length){if(t.every((n,s)=>n===o[s]))return null}else t=e.map((n,s)=>_({value:n,handle:s,props:this.$props}));if(this.setState({bounds:t}),e.some(n=>me(n,this.$props))){const n=e.map(s=>Q(s,this.$props));this.$emit("change",n)}},onChange(e){if(!Y(this,"value"))this.setState(e);else{const s={};["sHandle","recent"].forEach(r=>{e[r]!==void 0&&(s[r]=e[r])}),Object.keys(s).length&&this.setState(s)}const n=f(f({},this.$data),e).bounds;this.$emit("change",n)},positionGetValue(e){const o=this.getValue(),t=this.calcValueByPos(e),n=this.getClosestBound(t),s=this.getBoundNeedMoving(t,n),r=o[s];if(t===r)return null;const a=[...o];return a[s]=t,a},onStart(e){const{bounds:o}=this;this.$emit("beforeChange",o);const t=this.calcValueByPos(e);this.startValue=t,this.startPosition=e;const n=this.getClosestBound(t);this.prevMovedHandleIndex=this.getBoundNeedMoving(t,n),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const s=o[this.prevMovedHandleIndex];if(t===s)return;const r=[...o];r[this.prevMovedHandleIndex]=t,this.onChange({bounds:r})},onEnd(e){const{sHandle:o}=this;this.removeDocumentEvents(),o||(this.dragTrack=!1),(o!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(e,o,t,n){A(e);const{$data:s,$props:r}=this,a=r.max||100,i=r.min||0;if(t){let b=r.vertical?-o:o;b=r.reverse?-b:b;const C=a-Math.max(...n),y=i-Math.min(...n),B=Math.min(Math.max(b/(this.getSliderLength()/100),y),C),h=n.map(x=>Math.floor(Math.max(Math.min(x+B,a),i)));s.bounds.map((x,c)=>x===h[c]).some(x=>!x)&&this.onChange({bounds:h});return}const{bounds:l,sHandle:u}=this,d=this.calcValueByPos(o),p=l[u];d!==p&&this.moveTo(d)},onKeyboard(e){const{reverse:o,vertical:t}=this.$props,n=ve(e,t,o);if(n){A(e);const{bounds:s,sHandle:r}=this,a=s[r===null?this.recent:r],i=n(a,this.$props),l=_({value:i,handle:r,bounds:s,props:this.$props});if(l===a)return;this.moveTo(l,!0)}},getClosestBound(e){const{bounds:o}=this;let t=0;for(let n=1;n<o.length-1;n+=1)e>=o[n]&&(t=n);return Math.abs(o[t+1]-e)<Math.abs(o[t]-e)&&(t+=1),t},getBoundNeedMoving(e,o){const{bounds:t,recent:n}=this;let s=o;const r=t[o+1]===t[o];return r&&t[n]===t[o]&&(s=n),r&&e!==t[o+1]&&(s=e<t[o+1]?o:o+1),s},getLowerBound(){return this.bounds[0]},getUpperBound(){const{bounds:e}=this;return e[e.length-1]},getPoints(){const{marks:e,step:o,min:t,max:n}=this,s=this.internalPointsCache;if(!s||s.marks!==e||s.step!==o){const r=f({},e);if(o!==null)for(let i=t;i<=n;i+=o)r[i]=i;const a=Object.keys(r).map(parseFloat);a.sort((i,l)=>i-l),this.internalPointsCache={marks:e,step:o,points:a}}return this.internalPointsCache.points},moveTo(e,o){const t=[...this.bounds],{sHandle:n,recent:s}=this,r=n===null?s:n;t[r]=e;let a=r;this.$props.pushable!==!1?this.pushSurroundingHandles(t,a):this.$props.allowCross&&(t.sort((i,l)=>i-l),a=t.indexOf(e)),this.onChange({recent:a,sHandle:a,bounds:t}),o&&(this.$emit("afterChange",t),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(e,o){const t=e[o],{pushable:n}=this,s=Number(n);let r=0;if(e[o+1]-t<s&&(r=1),t-e[o-1]<s&&(r=-1),r===0)return;const a=o+r,i=r*(e[a]-t);this.pushHandle(e,a,r,s-i)||(e[o]=e[a]-r*s)},pushHandle(e,o,t,n){const s=e[o];let r=e[o];for(;t*(r-s)<n;){if(!this.pushHandleOnePoint(e,o,t))return e[o]=s,!1;r=e[o]}return!0},pushHandleOnePoint(e,o,t){const n=this.getPoints(),r=n.indexOf(e[o])+t;if(r>=n.length||r<0)return!1;const a=o+t,i=n[r],{pushable:l}=this,u=Number(l),d=t*(e[a]-i);return this.pushHandle(e,a,t,u-d)?(e[o]=i,!0):!1},trimAlignValue(e){const{sHandle:o,bounds:t}=this;return _({value:e,handle:o,bounds:t,props:this.$props})},ensureValueNotConflict(e,o,t){let{allowCross:n,pushable:s}=t;const r=this.$data||{},{bounds:a}=r;if(e=e===void 0?r.sHandle:e,s=Number(s),!n&&e!=null&&a!==void 0){if(e>0&&o<=a[e-1]+s)return a[e-1]+s;if(e<a.length-1&&o>=a[e+1]-s)return a[e+1]-s}return o},getTrack(e){let{bounds:o,prefixCls:t,reverse:n,vertical:s,included:r,offsets:a,trackStyle:i}=e;return o.slice(0,-1).map((l,u)=>{const d=u+1,p=R({[`${t}-track`]:!0,[`${t}-track-${d}`]:!0});return w(q,{class:p,vertical:s,reverse:n,included:r,offset:a[d-1],length:a[d]-a[d-1],style:i[u],key:d},null)})},renderSlider(){const{sHandle:e,bounds:o,prefixCls:t,vertical:n,included:s,disabled:r,min:a,max:i,reverse:l,handle:u,defaultHandle:d,trackStyle:p,handleStyle:b,tabindex:C,ariaLabelGroupForHandles:y,ariaLabelledByGroupForHandles:B,ariaValueTextFormatterGroupForHandles:h}=this,x=u||d,c=o.map(S=>this.calcOffset(S)),$=`${t}-handle`,V=o.map((S,v)=>{let m=C[v]||0;(r||C[v]===null)&&(m=null);const M=e===v;return x({class:R({[$]:!0,[`${$}-${v+1}`]:!0,[`${$}-dragging`]:M}),prefixCls:t,vertical:n,dragging:M,offset:c[v],value:S,index:v,tabindex:m,min:a,max:i,reverse:l,disabled:r,style:b[v],ref:O=>this.saveHandle(v,O),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:y[v],ariaLabelledBy:B[v],ariaValueTextFormatter:h[v]})});return{tracks:this.getTrack({bounds:o,prefixCls:t,reverse:l,vertical:n,included:s,offsets:c,trackStyle:p}),handles:V}}}}),Ue=be(Ge),Ke=I({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:Ee(),setup(e,o){let{attrs:t,slots:n}=o;const s=U(null),r=U(null);function a(){ee.cancel(r.value),r.value=null}function i(){r.value=ee(()=>{var u;(u=s.value)===null||u===void 0||u.forcePopupAlign(),r.value=null})}const l=()=>{a(),e.open&&i()};return Fe([()=>e.open,()=>e.title],()=>{l()},{flush:"post",immediate:!0}),Le(()=>{l()}),ie(()=>{a()}),()=>w(Ne,P(P({ref:s},e),t),n)}}),Xe=e=>{const{componentCls:o,controlSize:t,dotSize:n,marginFull:s,marginPart:r,colorFillContentHover:a}=e;return{[o]:f(f({},Be(e)),{position:"relative",height:t,margin:`${r}px ${s}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${s}px ${r}px`},[`${o}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${o}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${o}-rail`]:{backgroundColor:e.colorFillSecondary},[`${o}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${o}-dot`]:{borderColor:a},[`${o}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${o}-dot-active`]:{borderColor:e.colorPrimary}},[`${o}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${o}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+e.handleLineWidth*2,height:e.handleSize+e.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`
2
2
  inset-inline-start ${e.motionDurationMid},
3
3
  inset-block-start ${e.motionDurationMid},
4
4
  width ${e.motionDurationMid},