chainlesschain 0.157.7 → 0.157.9
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.
- package/package.json +1 -1
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AIOps-CoVPS4_f.js → AIOps-C4XQxptM.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BYA9htq4.js → ActionButton-CvKbykKA.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-CkCmN3yh.js → Analytics-DFMAWKUR.js} +2 -2
- package/src/assets/web-panel/assets/AppLayout-BkNdtTbn.js +1 -0
- package/src/assets/web-panel/assets/AppLayout-CKMl4NLf.css +1 -0
- package/src/assets/web-panel/assets/Audit-Bw7KSJD_.js +1 -0
- package/src/assets/web-panel/assets/Audit-L4_ApS01.css +1 -0
- package/src/assets/web-panel/assets/{Backup-SPQtiUev.js → Backup-D46qSgzQ.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-BAmfd4Ir.js → BaseInput-CvAa9Hm_.js} +1 -1
- package/src/assets/web-panel/assets/Chat-3Kj2JQP4.js +2 -0
- package/src/assets/web-panel/assets/{Checkbox-BiSO-WqE.js → Checkbox-YsCNWg9S.js} +1 -1
- package/src/assets/web-panel/assets/Codegen-AVAcL7NA.css +1 -0
- package/src/assets/web-panel/assets/Codegen-DDiVk21N.js +1 -0
- package/src/assets/web-panel/assets/{Col-DIGPvqVy.js → Col-Dpb7Eik4.js} +1 -1
- package/src/assets/web-panel/assets/{Community-RZzIND1A.js → Community-Bglv8oIv.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-B-UF0szM.js → Compact-DC8UsEAe.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-D7dNQEQ9.js → Compliance-DzVghx7L.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CPj75S0j.js → Cowork-pgKzBNDo.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-PnlUFCIP.js → Cron-I81HiCa1.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-C7Kxjjlo.js → Crosschain-48CdkgQf.js} +1 -1
- package/src/assets/web-panel/assets/{DID-B3aBXElX.js → DID-CVYxjLQn.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-XxsWjoEF.js → Dashboard-sqj42zKx.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-B6FSgG11.js → Dropdown-DBfZJHBI.js} +1 -1
- package/src/assets/web-panel/assets/Federation-BT-pF1wN.js +1 -0
- package/src/assets/web-panel/assets/Federation-BftELHDw.css +1 -0
- package/src/assets/web-panel/assets/{FormItemContext-B0xgi547.js → FormItemContext-B-sn9E_W.js} +1 -1
- package/src/assets/web-panel/assets/{Git-BnVgKR_0.js → Git-DTh2i-Qk.js} +2 -2
- package/src/assets/web-panel/assets/Governance-BfmfQBGB.css +1 -0
- package/src/assets/web-panel/assets/Governance-D788Lws6.js +1 -0
- package/src/assets/web-panel/assets/{Inference-pcPaCXHq.js → Inference-CnFa6Se9.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-CH3dpH-_.js → KnowledgeGraph-DHaMxawn.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-4wvIp1ss.js → Logs-B39LUZs9.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-BydQkgpf.js → Marketplace-BdOCF2RA.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-DBERPbTA.js → McpTools-DbwkdBUE.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-CMNbDULN.js → Memory-Vl_lYCs2.js} +2 -2
- package/src/assets/web-panel/assets/{NLProgramming-DVSbNLly.js → NLProgramming-CgD2H0Pc.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-DMgBT122.js → Notes-BvC5_V2H.js} +2 -2
- package/src/assets/web-panel/assets/{Organization-u7P1VpPr.js → Organization-Cxhhw4aD.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-BYKMeaWJ.js → Overflow-L_28D41_.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-DKDUTaaL.js → P2P-BflX74Hm.js} +2 -2
- package/src/assets/web-panel/assets/{Permissions-DlZ_n4w_.js → Permissions-ByLhEAbz.js} +3 -3
- package/src/assets/web-panel/assets/Pipeline-CnZJNdgt.js +1 -0
- package/src/assets/web-panel/assets/Privacy-BJIajCGG.js +1 -0
- package/src/assets/web-panel/assets/{ProjectSettings-DnrhLjZI.js → ProjectSettings-N0r_mtec.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-Bi66Yv3y.js → Projects-DLvUzeIB.js} +2 -2
- package/src/assets/web-panel/assets/{Providers-CikNkb5X.js → Providers-B2A35VhD.js} +2 -2
- package/src/assets/web-panel/assets/Recommend-DYb61WNp.js +1 -0
- package/src/assets/web-panel/assets/Recommend-DgNSCgRX.css +1 -0
- package/src/assets/web-panel/assets/Reputation-C9BfnI0z.js +1 -0
- package/src/assets/web-panel/assets/Reputation-y-46ThW8.css +1 -0
- package/src/assets/web-panel/assets/{Row-Dq1TXcMH.js → Row-CpPHVi7H.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-NMgrJXli.js → RssFeed-CbqJDErh.js} +3 -3
- package/src/assets/web-panel/assets/Search-BTk9rglb.css +1 -0
- package/src/assets/web-panel/assets/Search-C0gd765-.js +1 -0
- package/src/assets/web-panel/assets/{Security-C8Ivt-oU.js → Security-DsYWAhpE.js} +3 -3
- package/src/assets/web-panel/assets/Services-7Blny0Jc.js +2 -0
- package/src/assets/web-panel/assets/{Skeleton-CVXI8LKZ.js → Skeleton-TzxE-JJt.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-CIv4Cs3T.js → Skills-DfaRaffm.js} +1 -1
- package/src/assets/web-panel/assets/Sla-C1WYuQKf.css +1 -0
- package/src/assets/web-panel/assets/Sla-mftEtvGn.js +1 -0
- package/src/assets/web-panel/assets/{Tasks-DePDDw0g.js → Tasks-Db9TRjE7.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-h2flhfZ2.js → Templates-DgonVRQJ.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BZN5JCLW.js → Tenant-BB-LLJMZ.js} +1 -1
- package/src/assets/web-panel/assets/Tokens-DHOkHNur.js +1 -0
- package/src/assets/web-panel/assets/Tokens-KvJRHQcl.css +1 -0
- package/src/assets/web-panel/assets/{Trigger-DmhLeltH.js → Trigger-BV4JPD3z.js} +1 -1
- package/src/assets/web-panel/assets/Trust-BLI308Ik.css +1 -0
- package/src/assets/web-panel/assets/Trust-BpC4gDis.js +1 -0
- package/src/assets/web-panel/assets/{VideoEditing-DP5Te9MV.js → VideoEditing-CeDFfKrq.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-DbdgPt_i.js → Wallet-CcNCVaor.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-0qV34Bht.js → WebAuthn-BbIPA6Ca.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-C4sIrXd7.js → WorkflowEditor-DxkitXpf.js} +1 -1
- package/src/assets/web-panel/assets/{colors-Iv3ft_s8.js → colors-2MPUdPu2.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-CtT5KcXA.js → compact-item-B4vcKR0x.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-CHLVxTn6.js → createContext-Div8Cl0F.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-B9IRZs23.js → hasIn-9c9xldOR.js} +1 -1
- package/src/assets/web-panel/assets/icons-ukMaZ3tx.js +57 -0
- package/src/assets/web-panel/assets/{index-q__DPgfq.js → index--tOLU2ID.js} +1 -1
- package/src/assets/web-panel/assets/{index-KZbeEKa2.js → index-3KbT-bG7.js} +2 -2
- package/src/assets/web-panel/assets/index-B4hcllQg.js +12 -0
- package/src/assets/web-panel/assets/index-B58J4NxK.js +21 -0
- package/src/assets/web-panel/assets/{index-DUg23xvw.js → index-B65KFSc3.js} +1 -1
- package/src/assets/web-panel/assets/index-BCfVA9mJ.js +13 -0
- package/src/assets/web-panel/assets/{index-CzGZa5Ow.js → index-BbqCdQXU.js} +3 -3
- package/src/assets/web-panel/assets/{index-BWtxplKf.js → index-BcnQrVVZ.js} +1 -1
- package/src/assets/web-panel/assets/{index-CYQVfA_R.js → index-BfoYep3e.js} +1 -1
- package/src/assets/web-panel/assets/{index-D7VXIYiM.js → index-BjGOthNv.js} +1 -1
- package/src/assets/web-panel/assets/{index-DXEG5UZz.js → index-BntG0RJO.js} +1 -1
- package/src/assets/web-panel/assets/{index-DzKYMmMu.js → index-BuVNDnn8.js} +1 -1
- package/src/assets/web-panel/assets/index-BzBaZFuT.js +1 -0
- package/src/assets/web-panel/assets/{index-CMKIwCKt.js → index-C-CTCrAH.js} +1 -1
- package/src/assets/web-panel/assets/{index-C8LBTJ8l.js → index-C1GXp5YD.js} +1 -1
- package/src/assets/web-panel/assets/index-CDoxJ9Cl.js +1 -0
- package/src/assets/web-panel/assets/{index-4wtT_zvC.js → index-CIE6ht2b.js} +1 -1
- package/src/assets/web-panel/assets/{index-4I01hpiN.js → index-CIWKlZ1X.js} +1 -1
- package/src/assets/web-panel/assets/{index-NJzH4w-U.js → index-COJ-mQYg.js} +2 -2
- package/src/assets/web-panel/assets/{index-E7-XzEfE.js → index-COdKVelL.js} +1 -1
- package/src/assets/web-panel/assets/{index-DiZ3aYcD.js → index-CVYrm1az.js} +1 -1
- package/src/assets/web-panel/assets/{index-d3aFQf7u.js → index-Ca3iTiXs.js} +2 -2
- package/src/assets/web-panel/assets/{index-cqU5_E3h.js → index-CtM3tjRj.js} +2 -2
- package/src/assets/web-panel/assets/{index-Dbaj1U7z.js → index-D--EKCHy.js} +1 -1
- package/src/assets/web-panel/assets/{index-dzwxxvlh.js → index-D-0g6tCK.js} +1 -1
- package/src/assets/web-panel/assets/{index-ThYPc1ub.js → index-D0GALIQZ.js} +1 -1
- package/src/assets/web-panel/assets/{index-C1uasX17.js → index-D1JeOKve.js} +1 -1
- package/src/assets/web-panel/assets/index-DIe3dY84.js +1 -0
- package/src/assets/web-panel/assets/{index-BOlkR4CB.js → index-DJAPu9VF.js} +1 -1
- package/src/assets/web-panel/assets/{index--eBMlDjO.js → index-DdHPswKn.js} +1 -1
- package/src/assets/web-panel/assets/index-DgWftysw.js +1 -0
- package/src/assets/web-panel/assets/index-Dk3ZySO2.js +55 -0
- package/src/assets/web-panel/assets/index-DogHNcyC.js +1 -0
- package/src/assets/web-panel/assets/{index-B6JARzH-.js → index-IzAqu_OK.js} +2 -2
- package/src/assets/web-panel/assets/{index-BRlYu6_d.js → index-OhUZFfxQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-UmTF1KQy.js → index-ZW72ov7W.js} +1 -1
- package/src/assets/web-panel/assets/index-ZZ_4A9um.js +36 -0
- package/src/assets/web-panel/assets/{index-CDWpDZgD.js → index-dV8k_pMc.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-BcWs5QbR.js → initDefaultProps--L8bzddm.js} +1 -1
- package/src/assets/web-panel/assets/{motion-CrLibvjP.js → motion-BR7NF0vx.js} +1 -1
- package/src/assets/web-panel/assets/{move-B5c6-VQr.js → move-BpyQMRtF.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DpIEkCg5.js → omit-RkKN6uqw.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-KtgV4VKB.js → pickAttrs-Bk8_mKGY.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-UtY5srm7.js → placementArrow-CBAaXBxj.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-C---VD6e.js → responsiveObserve-BzrPInK7.js} +1 -1
- package/src/assets/web-panel/assets/{slide-hr0X8KAK.js → slide-CXFBsLyp.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-CgoYe6s3.js → statusUtils-6TeOuUzQ.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DJv72QFU.js → styleChecker-CQt4HHRm.js} +1 -1
- package/src/assets/web-panel/assets/{transition-D2wU6PAY.js → transition-CGYDOK3N.js} +1 -1
- package/src/assets/web-panel/assets/{useConfigInject-DqhngD-R.js → useConfigInject-BKqJUQaF.js} +2 -2
- package/src/assets/web-panel/assets/{useFlexGapSupport-CTWfwV__.js → useFlexGapSupport--RuYYIc6.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-B2xg11HE.js → vnode-I9keNa_U.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-BGImMPSi.js → zoom-BNV3xYvt.js} +1 -1
- package/src/assets/web-panel/index.html +2 -2
- package/src/assets/web-panel/assets/AppLayout-BbhrUX4i.css +0 -1
- package/src/assets/web-panel/assets/AppLayout-CcqxQGmE.js +0 -1
- package/src/assets/web-panel/assets/Chat-Cl9LpsTj.js +0 -2
- package/src/assets/web-panel/assets/Pipeline-BUqsWXKt.js +0 -1
- package/src/assets/web-panel/assets/Privacy-5YZQ-neP.js +0 -1
- package/src/assets/web-panel/assets/Services-CEuZeNM6.js +0 -2
- package/src/assets/web-panel/assets/icons-srBCpwXl.js +0 -57
- package/src/assets/web-panel/assets/index-69KL83qL.js +0 -1
- package/src/assets/web-panel/assets/index-B0IQIuHE.js +0 -1
- package/src/assets/web-panel/assets/index-B18bc0ut.js +0 -21
- package/src/assets/web-panel/assets/index-BaHFTtgz.js +0 -55
- package/src/assets/web-panel/assets/index-BjC8S1t1.js +0 -12
- package/src/assets/web-panel/assets/index-C8wxMp_Z.js +0 -1
- package/src/assets/web-panel/assets/index-Cps5gHTC.js +0 -1
- package/src/assets/web-panel/assets/index-D5hcqkeW.js +0 -13
- package/src/assets/web-panel/assets/index-DlSUq1W3.js +0 -36
- package/src/assets/web-panel/assets/index-TOigBSzr.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a,o as I,w as ee}from"./index-DlSUq1W3.js";import{P as v}from"./index-U4Zd5IK6.js";import{T as te}from"./Trigger-DmhLeltH.js";import{p as oe,M as ne,g as re,a as le}from"./placementArrow-UtY5srm7.js";import{d as H,c as P,f as ie,s as R,r as L,w as ae,j as N}from"./vendor-BVetwVfk.js";import{A as se,c as k,g as pe,m as Q,r as ue,u as de,x as ce,z as fe,P as me,Q as ge}from"./useConfigInject-DqhngD-R.js";import{c as W}from"./vnode-B2xg11HE.js";import{f as ve}from"./firstNotUndefined-CLFzEa0p.js";import{w as U}from"./raf-Deuc0E8-.js";import{i as ye,g as be}from"./colors-Iv3ft_s8.js";import{i as Ce}from"./zoom-BGImMPSi.js";import{b as he}from"./transition-D2wU6PAY.js";import{i as Pe}from"./initDefaultProps-BcWs5QbR.js";const we={prefixCls:String,id:String,overlayInnerStyle:v.any},Oe=H({compatConfig:{MODE:3},name:"TooltipContent",props:we,setup(e,n){let{slots:i}=n;return()=>{var o;return P("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=i.overlay)===null||o===void 0?void 0:o.call(i)])}}});var Se=function(e,n){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(i[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(i[o[l]]=e[o[l]]);return i};function X(){}const xe=H({compatConfig:{MODE:3},name:"Tooltip",inheritAttrs:!1,props:{trigger:v.any.def(["hover"]),defaultVisible:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:v.string.def("right"),transitionName:String,animation:v.any,afterVisibleChange:v.func.def(()=>{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:v.string.def("rc-tooltip"),mouseEnterDelay:v.number.def(.1),mouseLeaveDelay:v.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:v.object.def(()=>({})),arrowContent:v.any.def(null),tipId:String,builtinPlacements:v.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,n){let{slots:i,attrs:o,expose:l}=n;const p=R(),m=()=>{const{prefixCls:s,tipId:f,overlayInnerStyle:C}=e;return[e.arrow?P("div",{class:`${s}-arrow`,key:"arrow"},[se(i,e,"arrowContent")]):null,P(Oe,{key:"content",prefixCls:s,id:f,overlayInnerStyle:C},{overlay:i.overlay})]};l({getPopupDomNode:()=>p.value.getPopupDomNode(),triggerDOM:p,forcePopupAlign:()=>{var s;return(s=p.value)===null||s===void 0?void 0:s.forcePopupAlign()}});const b=R(!1),O=R(!1);return ie(()=>{const{destroyTooltipOnHide:s}=e;if(typeof s=="boolean")b.value=s;else if(s&&typeof s=="object"){const{keepParent:f}=s;b.value=f===!0,O.value=f===!1}}),()=>{const{overlayClassName:s,trigger:f,mouseEnterDelay:C,mouseLeaveDelay:S,overlayStyle:w,prefixCls:B,afterVisibleChange:M,transitionName:_,animation:x,placement:$,align:j,destroyTooltipOnHide:F,defaultVisible:A}=e,V=Se(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),D=a({},V);e.visible!==void 0&&(D.popupVisible=e.visible);const E=a(a(a({popupClassName:s,prefixCls:B,action:f,builtinPlacements:oe,popupPlacement:$,popupAlign:j,afterPopupVisibleChange:M,popupTransitionName:_,popupAnimation:x,defaultPopupVisible:A,destroyPopupOnHide:b.value,autoDestroy:O.value,mouseLeaveDelay:S,popupStyle:w,mouseEnterDelay:C},D),o),{onPopupVisibleChange:e.onVisibleChange||X,onPopupAlign:e.onPopupAlign||X,ref:p,arrow:!!e.arrow,popup:m()});return P(te,E,{default:i.default})}}}),Te=(()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:I(),overlayInnerStyle:I(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:I(),builtinPlacements:I(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}));function Ae(e,n){const i=ye(n),o=k({[`${e}-${n}`]:n&&i}),l={},p={};return n&&!i&&(l.background=n,p["--antd-arrow-background-color"]=n),{className:o,overlayStyle:l,arrowStyle:p}}const Ne=e=>{const{componentCls:n,tooltipMaxWidth:i,tooltipColor:o,tooltipBg:l,tooltipBorderRadius:p,zIndexPopup:m,controlHeight:y,boxShadowSecondary:b,paddingSM:O,paddingXS:s,tooltipRadiusOuter:f}=e;return[{[n]:a(a(a(a({},ue(e)),{position:"absolute",zIndex:m,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:i,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":l,[`${n}-inner`]:{minWidth:y,minHeight:y,padding:`${O/2}px ${s}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:l,borderRadius:p,boxShadow:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:Math.min(p,ne)}},[`${n}-content`]:{position:"relative"}}),be(e,(C,S)=>{let{darkColor:w}=S;return{[`&${n}-${C}`]:{[`${n}-inner`]:{backgroundColor:w},[`${n}-arrow`]:{"--antd-arrow-background-color":w}}}})),{"&-rtl":{direction:"rtl"}})},re(Q(e,{borderRadiusOuter:f}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:p,limitVerticalRadius:!0}),{[`${n}-pure`]:{position:"relative",maxWidth:"none"}}]},_e=((e,n)=>pe("Tooltip",o=>{if(n?.value===!1)return[];const{borderRadius:l,colorTextLightSolid:p,colorBgDefault:m,borderRadiusOuter:y}=o,b=Q(o,{tooltipMaxWidth:250,tooltipColor:p,tooltipBorderRadius:l,tooltipBg:m,tooltipRadiusOuter:y>4?4:y});return[Ne(b),Ce(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:l,colorBgSpotlight:p}=o;return{zIndexPopup:l+70,colorBgDefault:p}})(e)),De=(e,n)=>{const i={},o=a({},e);return n.forEach(l=>{e&&l in e&&(i[l]=e[l],delete o[l])}),{picked:i,omitted:o}},Z=()=>a(a({},Te()),{title:v.any}),Xe=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),Ie=H({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:Pe(Z(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,n){let{slots:i,emit:o,attrs:l,expose:p}=n;const{prefixCls:m,getPopupContainer:y,direction:b,rootPrefixCls:O}=de("tooltip",e),s=N(()=>{var t;return(t=e.open)!==null&&t!==void 0?t:e.visible}),f=L(ve([e.open,e.visible])),C=L();let S;ae(s,t=>{U.cancel(S),S=U(()=>{f.value=!!t})});const w=()=>{var t;const r=(t=e.title)!==null&&t!==void 0?t:i.title;return!r&&r!==0},B=t=>{const r=w();s.value===void 0&&(f.value=r?!1:t),r||(o("update:visible",t),o("visibleChange",t),o("update:open",t),o("openChange",t))};p({getPopupDomNode:()=>C.value.getPopupDomNode(),open:f,forcePopupAlign:()=>{var t;return(t=C.value)===null||t===void 0?void 0:t.forcePopupAlign()}});const _=N(()=>{var t;const{builtinPlacements:r,autoAdjustOverflow:h,arrow:d,arrowPointAtCenter:g}=e;let u=g;return typeof d=="object"&&(u=(t=d.pointAtCenter)!==null&&t!==void 0?t:g),r||le({arrowPointAtCenter:u,autoAdjustOverflow:h})}),x=t=>t||t==="",$=t=>{const r=t.type;if(typeof r=="object"&&t.props&&((r.__ANT_BUTTON===!0||r==="button")&&x(t.props.disabled)||r.__ANT_SWITCH===!0&&(x(t.props.disabled)||x(t.props.loading))||r.__ANT_RADIO===!0&&x(t.props.disabled))){const{picked:h,omitted:d}=De(ge(t),["position","left","right","top","bottom","float","display","zIndex"]),g=a(a({display:"inline-block"},h),{cursor:"not-allowed",lineHeight:1,width:t.props&&t.props.block?"100%":void 0}),u=a(a({},d),{pointerEvents:"none"}),c=W(t,{style:u},!0);return P("span",{style:g,class:`${m.value}-disabled-compatible-wrapper`},[c])}return t},j=()=>{var t,r;return(t=e.title)!==null&&t!==void 0?t:(r=i.title)===null||r===void 0?void 0:r.call(i)},F=(t,r)=>{const h=_.value,d=Object.keys(h).find(g=>{var u,c;return h[g].points[0]===((u=r.points)===null||u===void 0?void 0:u[0])&&h[g].points[1]===((c=r.points)===null||c===void 0?void 0:c[1])});if(d){const g=t.getBoundingClientRect(),u={top:"50%",left:"50%"};d.indexOf("top")>=0||d.indexOf("Bottom")>=0?u.top=`${g.height-r.offset[1]}px`:(d.indexOf("Top")>=0||d.indexOf("bottom")>=0)&&(u.top=`${-r.offset[1]}px`),d.indexOf("left")>=0||d.indexOf("Right")>=0?u.left=`${g.width-r.offset[0]}px`:(d.indexOf("right")>=0||d.indexOf("Left")>=0)&&(u.left=`${-r.offset[0]}px`),t.style.transformOrigin=`${u.left} ${u.top}`}},A=N(()=>Ae(m.value,e.color)),V=N(()=>l["data-popover-inject"]),[D,E]=_e(m,N(()=>!V.value));return()=>{var t,r;const{openClassName:h,overlayClassName:d,overlayStyle:g,overlayInnerStyle:u}=e;let c=(r=ce((t=i.default)===null||t===void 0?void 0:t.call(i)))!==null&&r!==void 0?r:null;c=c.length===1?c[0]:c;let z=f.value;if(s.value===void 0&&w()&&(z=!1),!c)return null;const T=$(fe(c)&&!me(c)?c:P("span",null,[c])),q=k({[h||`${m.value}-open`]:!0,[T.props&&T.props.class]:T.props&&T.props.class}),G=k(d,{[`${m.value}-rtl`]:b.value==="rtl"},A.value.className,E.value),J=a(a({},A.value.overlayStyle),u),K=A.value.arrowStyle,Y=a(a(a({},l),e),{prefixCls:m.value,arrow:!!e.arrow,getPopupContainer:y?.value,builtinPlacements:_.value,visible:z,ref:C,overlayClassName:G,overlayStyle:a(a({},K),g),overlayInnerStyle:J,onVisibleChange:B,onPopupAlign:F,transitionName:he(O.value,"zoom-big-fast",e.transitionName)});return D(P(xe,Y,{default:()=>[f.value?W(T,{class:q}):T],arrowContent:()=>P("span",{class:`${m.value}-arrow-content`},null),overlay:j}))}}}),Be=ee(Ie),Qe=Object.freeze(Object.defineProperty({__proto__:null,default:Be,tooltipProps:Z},Symbol.toStringTag,{value:"Module"}));export{Be as T,Te as a,Z as b,Qe as i,Xe as t};
|
|
1
|
+
import{_ as a,o as I,w as ee}from"./index-ZZ_4A9um.js";import{P as v}from"./index-U4Zd5IK6.js";import{T as te}from"./Trigger-BV4JPD3z.js";import{p as oe,M as ne,g as re,a as le}from"./placementArrow-CBAaXBxj.js";import{d as H,c as P,f as ie,s as E,r as L,w as ae,j as N}from"./vendor-BVetwVfk.js";import{A as se,c as k,g as pe,m as Q,r as ue,u as de,x as ce,z as fe,Q as me,R as ge}from"./useConfigInject-BKqJUQaF.js";import{c as W}from"./vnode-I9keNa_U.js";import{f as ve}from"./firstNotUndefined-CLFzEa0p.js";import{w as U}from"./raf-Deuc0E8-.js";import{i as ye,g as be}from"./colors-2MPUdPu2.js";import{i as Ce}from"./zoom-BNV3xYvt.js";import{b as he}from"./transition-CGYDOK3N.js";import{i as Pe}from"./initDefaultProps--L8bzddm.js";const we={prefixCls:String,id:String,overlayInnerStyle:v.any},Oe=H({compatConfig:{MODE:3},name:"TooltipContent",props:we,setup(e,n){let{slots:i}=n;return()=>{var o;return P("div",{class:`${e.prefixCls}-inner`,id:e.id,role:"tooltip",style:e.overlayInnerStyle},[(o=i.overlay)===null||o===void 0?void 0:o.call(i)])}}});var Se=function(e,n){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(i[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(e);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(e,o[l])&&(i[o[l]]=e[o[l]]);return i};function X(){}const xe=H({compatConfig:{MODE:3},name:"Tooltip",inheritAttrs:!1,props:{trigger:v.any.def(["hover"]),defaultVisible:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:v.string.def("right"),transitionName:String,animation:v.any,afterVisibleChange:v.func.def(()=>{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:v.string.def("rc-tooltip"),mouseEnterDelay:v.number.def(.1),mouseLeaveDelay:v.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:v.object.def(()=>({})),arrowContent:v.any.def(null),tipId:String,builtinPlacements:v.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(e,n){let{slots:i,attrs:o,expose:l}=n;const p=E(),m=()=>{const{prefixCls:s,tipId:f,overlayInnerStyle:C}=e;return[e.arrow?P("div",{class:`${s}-arrow`,key:"arrow"},[se(i,e,"arrowContent")]):null,P(Oe,{key:"content",prefixCls:s,id:f,overlayInnerStyle:C},{overlay:i.overlay})]};l({getPopupDomNode:()=>p.value.getPopupDomNode(),triggerDOM:p,forcePopupAlign:()=>{var s;return(s=p.value)===null||s===void 0?void 0:s.forcePopupAlign()}});const b=E(!1),O=E(!1);return ie(()=>{const{destroyTooltipOnHide:s}=e;if(typeof s=="boolean")b.value=s;else if(s&&typeof s=="object"){const{keepParent:f}=s;b.value=f===!0,O.value=f===!1}}),()=>{const{overlayClassName:s,trigger:f,mouseEnterDelay:C,mouseLeaveDelay:S,overlayStyle:w,prefixCls:B,afterVisibleChange:M,transitionName:_,animation:x,placement:$,align:j,destroyTooltipOnHide:F,defaultVisible:A}=e,V=Se(e,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),D=a({},V);e.visible!==void 0&&(D.popupVisible=e.visible);const R=a(a(a({popupClassName:s,prefixCls:B,action:f,builtinPlacements:oe,popupPlacement:$,popupAlign:j,afterPopupVisibleChange:M,popupTransitionName:_,popupAnimation:x,defaultPopupVisible:A,destroyPopupOnHide:b.value,autoDestroy:O.value,mouseLeaveDelay:S,popupStyle:w,mouseEnterDelay:C},D),o),{onPopupVisibleChange:e.onVisibleChange||X,onPopupAlign:e.onPopupAlign||X,ref:p,arrow:!!e.arrow,popup:m()});return P(te,R,{default:i.default})}}}),Te=(()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:I(),overlayInnerStyle:I(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:I(),builtinPlacements:I(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}));function Ae(e,n){const i=ye(n),o=k({[`${e}-${n}`]:n&&i}),l={},p={};return n&&!i&&(l.background=n,p["--antd-arrow-background-color"]=n),{className:o,overlayStyle:l,arrowStyle:p}}const Ne=e=>{const{componentCls:n,tooltipMaxWidth:i,tooltipColor:o,tooltipBg:l,tooltipBorderRadius:p,zIndexPopup:m,controlHeight:y,boxShadowSecondary:b,paddingSM:O,paddingXS:s,tooltipRadiusOuter:f}=e;return[{[n]:a(a(a(a({},ue(e)),{position:"absolute",zIndex:m,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:i,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":l,[`${n}-inner`]:{minWidth:y,minHeight:y,padding:`${O/2}px ${s}px`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:l,borderRadius:p,boxShadow:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:Math.min(p,ne)}},[`${n}-content`]:{position:"relative"}}),be(e,(C,S)=>{let{darkColor:w}=S;return{[`&${n}-${C}`]:{[`${n}-inner`]:{backgroundColor:w},[`${n}-arrow`]:{"--antd-arrow-background-color":w}}}})),{"&-rtl":{direction:"rtl"}})},re(Q(e,{borderRadiusOuter:f}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:p,limitVerticalRadius:!0}),{[`${n}-pure`]:{position:"relative",maxWidth:"none"}}]},_e=((e,n)=>pe("Tooltip",o=>{if(n?.value===!1)return[];const{borderRadius:l,colorTextLightSolid:p,colorBgDefault:m,borderRadiusOuter:y}=o,b=Q(o,{tooltipMaxWidth:250,tooltipColor:p,tooltipBorderRadius:l,tooltipBg:m,tooltipRadiusOuter:y>4?4:y});return[Ne(b),Ce(o,"zoom-big-fast")]},o=>{let{zIndexPopupBase:l,colorBgSpotlight:p}=o;return{zIndexPopup:l+70,colorBgDefault:p}})(e)),De=(e,n)=>{const i={},o=a({},e);return n.forEach(l=>{e&&l in e&&(i[l]=e[l],delete o[l])}),{picked:i,omitted:o}},Z=()=>a(a({},Te()),{title:v.any}),Xe=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),Ie=H({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:Pe(Z(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(e,n){let{slots:i,emit:o,attrs:l,expose:p}=n;const{prefixCls:m,getPopupContainer:y,direction:b,rootPrefixCls:O}=de("tooltip",e),s=N(()=>{var t;return(t=e.open)!==null&&t!==void 0?t:e.visible}),f=L(ve([e.open,e.visible])),C=L();let S;ae(s,t=>{U.cancel(S),S=U(()=>{f.value=!!t})});const w=()=>{var t;const r=(t=e.title)!==null&&t!==void 0?t:i.title;return!r&&r!==0},B=t=>{const r=w();s.value===void 0&&(f.value=r?!1:t),r||(o("update:visible",t),o("visibleChange",t),o("update:open",t),o("openChange",t))};p({getPopupDomNode:()=>C.value.getPopupDomNode(),open:f,forcePopupAlign:()=>{var t;return(t=C.value)===null||t===void 0?void 0:t.forcePopupAlign()}});const _=N(()=>{var t;const{builtinPlacements:r,autoAdjustOverflow:h,arrow:d,arrowPointAtCenter:g}=e;let u=g;return typeof d=="object"&&(u=(t=d.pointAtCenter)!==null&&t!==void 0?t:g),r||le({arrowPointAtCenter:u,autoAdjustOverflow:h})}),x=t=>t||t==="",$=t=>{const r=t.type;if(typeof r=="object"&&t.props&&((r.__ANT_BUTTON===!0||r==="button")&&x(t.props.disabled)||r.__ANT_SWITCH===!0&&(x(t.props.disabled)||x(t.props.loading))||r.__ANT_RADIO===!0&&x(t.props.disabled))){const{picked:h,omitted:d}=De(ge(t),["position","left","right","top","bottom","float","display","zIndex"]),g=a(a({display:"inline-block"},h),{cursor:"not-allowed",lineHeight:1,width:t.props&&t.props.block?"100%":void 0}),u=a(a({},d),{pointerEvents:"none"}),c=W(t,{style:u},!0);return P("span",{style:g,class:`${m.value}-disabled-compatible-wrapper`},[c])}return t},j=()=>{var t,r;return(t=e.title)!==null&&t!==void 0?t:(r=i.title)===null||r===void 0?void 0:r.call(i)},F=(t,r)=>{const h=_.value,d=Object.keys(h).find(g=>{var u,c;return h[g].points[0]===((u=r.points)===null||u===void 0?void 0:u[0])&&h[g].points[1]===((c=r.points)===null||c===void 0?void 0:c[1])});if(d){const g=t.getBoundingClientRect(),u={top:"50%",left:"50%"};d.indexOf("top")>=0||d.indexOf("Bottom")>=0?u.top=`${g.height-r.offset[1]}px`:(d.indexOf("Top")>=0||d.indexOf("bottom")>=0)&&(u.top=`${-r.offset[1]}px`),d.indexOf("left")>=0||d.indexOf("Right")>=0?u.left=`${g.width-r.offset[0]}px`:(d.indexOf("right")>=0||d.indexOf("Left")>=0)&&(u.left=`${-r.offset[0]}px`),t.style.transformOrigin=`${u.left} ${u.top}`}},A=N(()=>Ae(m.value,e.color)),V=N(()=>l["data-popover-inject"]),[D,R]=_e(m,N(()=>!V.value));return()=>{var t,r;const{openClassName:h,overlayClassName:d,overlayStyle:g,overlayInnerStyle:u}=e;let c=(r=ce((t=i.default)===null||t===void 0?void 0:t.call(i)))!==null&&r!==void 0?r:null;c=c.length===1?c[0]:c;let z=f.value;if(s.value===void 0&&w()&&(z=!1),!c)return null;const T=$(fe(c)&&!me(c)?c:P("span",null,[c])),q=k({[h||`${m.value}-open`]:!0,[T.props&&T.props.class]:T.props&&T.props.class}),G=k(d,{[`${m.value}-rtl`]:b.value==="rtl"},A.value.className,R.value),J=a(a({},A.value.overlayStyle),u),K=A.value.arrowStyle,Y=a(a(a({},l),e),{prefixCls:m.value,arrow:!!e.arrow,getPopupContainer:y?.value,builtinPlacements:_.value,visible:z,ref:C,overlayClassName:G,overlayStyle:a(a({},K),g),overlayInnerStyle:J,onVisibleChange:B,onPopupAlign:F,transitionName:he(O.value,"zoom-big-fast",e.transitionName)});return D(P(xe,Y,{default:()=>[f.value?W(T,{class:q}):T],arrowContent:()=>P("span",{class:`${m.value}-arrow-content`},null),overlay:j}))}}}),Be=ee(Ie),Qe=Object.freeze(Object.defineProperty({__proto__:null,default:Be,tooltipProps:Z},Symbol.toStringTag,{value:"Module"}));export{Be as T,Te as a,Z as b,Qe as i,Xe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as o}from"./Col-Dpb7Eik4.js";import{w as t}from"./index-ZZ_4A9um.js";import"./useConfigInject-BKqJUQaF.js";import"./vendor-BVetwVfk.js";import"./icons-ukMaZ3tx.js";import"./index-D-0g6tCK.js";const l=t(o);export{l as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as j,m as M,r as O,u as A,_ as y}from"./useConfigInject-
|
|
1
|
+
import{g as j,m as M,r as O,u as A,_ as y}from"./useConfigInject-BKqJUQaF.js";import{_ as p,n as U,v as $,k as B,q as P,z as _}from"./index-ZZ_4A9um.js";import{i as N}from"./initDefaultProps--L8bzddm.js";import{c as f,d as R,l as L,_ as V,o as X,r as D}from"./vendor-BVetwVfk.js";import{S as q}from"./Skeleton-TzxE-JJt.js";import{o as Y}from"./omit-RkKN6uqw.js";import"./icons-ukMaZ3tx.js";import"./Keyframes-C7fCrnlS.js";const z=t=>{const{value:n,formatter:e,precision:a,decimalSeparator:s,groupSeparator:u="",prefixCls:r}=t;let c;if(typeof e=="function")c=e({value:n});else{const i=String(n),m=i.match(/^(-?)(\d*)(\.(\d+))?$/);if(!m)c=i;else{const d=m[1];let o=m[2]||"0",l=m[4]||"";o=o.replace(/\B(?=(\d{3})+(?!\d))/g,u),typeof a=="number"&&(l=l.padEnd(a,"0").slice(0,a>0?a:0)),l&&(l=`${s}${l}`),c=[f("span",{key:"int",class:`${r}-content-value-int`},[d,o]),l&&f("span",{key:"decimal",class:`${r}-content-value-decimal`},[l])]}}return f("span",{class:`${r}-content-value`},[c])};z.displayName="StatisticNumber";const G=t=>{const{componentCls:n,marginXXS:e,padding:a,colorTextDescription:s,statisticTitleFontSize:u,colorTextHeading:r,statisticContentFontSize:c,statisticFontFamily:i}=t;return{[`${n}`]:p(p({},O(t)),{[`${n}-title`]:{marginBottom:e,color:s,fontSize:u},[`${n}-skeleton`]:{paddingTop:a},[`${n}-content`]:{color:r,fontSize:c,fontFamily:i,[`${n}-content-value`]:{display:"inline-block",direction:"ltr"},[`${n}-content-prefix, ${n}-content-suffix`]:{display:"inline-block"},[`${n}-content-prefix`]:{marginInlineEnd:e},[`${n}-content-suffix`]:{marginInlineStart:e}}})}},J=j("Statistic",t=>{const{fontSizeHeading3:n,fontSize:e,fontFamily:a}=t,s=M(t,{statisticTitleFontSize:e,statisticContentFontSize:n,statisticFontFamily:a});return[G(s)]}),k=()=>({prefixCls:String,decimalSeparator:String,groupSeparator:String,format:String,value:_([Number,String,Object]),valueStyle:{type:Object,default:void 0},valueRender:P(),formatter:B(),precision:Number,prefix:$(),suffix:$(),title:$(),loading:U()}),v=R({compatConfig:{MODE:3},name:"AStatistic",inheritAttrs:!1,props:N(k(),{decimalSeparator:".",groupSeparator:",",loading:!1}),slots:Object,setup(t,n){let{slots:e,attrs:a}=n;const{prefixCls:s,direction:u}=A("statistic",t),[r,c]=J(s);return()=>{var i,m,d,o,l,g,S;const{value:E=0,valueStyle:H,valueRender:T}=t,x=s.value,h=(i=t.title)!==null&&i!==void 0?i:(m=e.title)===null||m===void 0?void 0:m.call(e),b=(d=t.prefix)!==null&&d!==void 0?d:(o=e.prefix)===null||o===void 0?void 0:o.call(e),F=(l=t.suffix)!==null&&l!==void 0?l:(g=e.suffix)===null||g===void 0?void 0:g.call(e),I=(S=t.formatter)!==null&&S!==void 0?S:e.formatter;let C=f(z,y({"data-for-update":Date.now()},p(p({},t),{prefixCls:x,value:E,formatter:I})),null);return T&&(C=T(C)),r(f("div",y(y({},a),{},{class:[x,{[`${x}-rtl`]:u.value==="rtl"},a.class,c.value]}),[h&&f("div",{class:`${x}-title`},[h]),f(q,{paragraph:!1,loading:t.loading},{default:()=>[f("div",{style:H,class:`${x}-content`},[b&&f("span",{class:`${x}-content-prefix`},[b]),C,F&&f("span",{class:`${x}-content-suffix`},[F])])]})]))}}}),K=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Q(t,n){let e=t;const a=/\[[^\]]*]/g,s=(n.match(a)||[]).map(i=>i.slice(1,-1)),u=n.replace(a,"[]"),r=K.reduce((i,m)=>{let[d,o]=m;if(i.includes(d)){const l=Math.floor(e/o);return e-=l*o,i.replace(new RegExp(`${d}+`,"g"),g=>{const S=g.length;return l.toString().padStart(S,"0")})}return i},u);let c=0;return r.replace(a,()=>{const i=s[c];return c+=1,i})}function W(t,n){const{format:e=""}=n,a=new Date(t).getTime(),s=Date.now(),u=Math.max(a-s,0);return Q(u,e)}const Z=1e3/30;function w(t){return new Date(t).getTime()}const tt=()=>p(p({},k()),{value:_([Number,String,Object]),format:String,onFinish:Function,onChange:Function}),et=R({compatConfig:{MODE:3},name:"AStatisticCountdown",props:N(tt(),{format:"HH:mm:ss"}),setup(t,n){let{emit:e,slots:a}=n;const s=D(),u=D(),r=()=>{const{value:o}=t;w(o)>=Date.now()?c():i()},c=()=>{if(s.value)return;const o=w(t.value);s.value=setInterval(()=>{u.value.$forceUpdate(),o>Date.now()&&e("change",o-Date.now()),r()},Z)},i=()=>{const{value:o}=t;s.value&&(clearInterval(s.value),s.value=void 0,w(o)<Date.now()&&e("finish"))},m=o=>{let{value:l,config:g}=o;const{format:S}=t;return W(l,p(p({},g),{format:S}))},d=o=>o;return L(()=>{r()}),V(()=>{r()}),X(()=>{i()}),()=>{const o=t.value;return f(v,y({ref:u},p(p({},Y(t,["onFinish","onChange"])),{value:o,valueRender:d,formatter:m})),a)}}});v.Countdown=et;v.install=function(t){return t.component(v.name,v),t.component(v.Countdown.name,v.Countdown),t};const ut=v.Countdown;export{ut as StatisticCountdown,v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as lt,_ as B,z as it,c as ye,G as Ne,A as rt,H as ht,B as It,g as St,m as je,q as Ve,r as Ct,d as xt,u as Mt}from"./useConfigInject-DqhngD-R.js";import{_ as p,o as Ae}from"./index-DlSUq1W3.js";import{U as We,i as de,d as J,a4 as Ge,p as ge,j as m,o as he,w as X,c as f,g as at,s as H,r as F,$ as wt,a0 as Kt,a1 as Ot,H as Ee,l as Tt,f as Te,u as be,T as kt}from"./vendor-BVetwVfk.js";import{d as Ie}from"./devWarning-CNIS3FrJ.js";import{s as st,S as Pt,c as Bt,T as Et}from"./Trigger-DmhLeltH.js";import{a as Dt}from"./_arrayIncludes-B8uzE354.js";import{n as ke}from"./_getTag-CWA3v-Ds.js";import{S as At}from"./injectionKey-BXVc-oGP.js";import{O as fe}from"./Overflow-BYKMeaWJ.js";import{P as Se}from"./index-U4Zd5IK6.js";import{c as _e}from"./vnode-B2xg11HE.js";import{T as _t}from"./index-C8LBTJ8l.js";import{K as Rt}from"./KeyCode-D63Tfrq7.js";import{w as Pe}from"./raf-Deuc0E8-.js";import{a as Ht}from"./transition-D2wU6PAY.js";import{T as Xe,aH as zt}from"./icons-srBCpwXl.js";import{g as Ft,c as Lt}from"./collapseMotion-D3P4mRvK.js";import{i as Ye}from"./slide-hr0X8KAK.js";import{i as Nt}from"./zoom-BGImMPSi.js";import{a as jt}from"./OverrideContext-DEW2m7K6.js";import"./warning-Pq00owYb.js";import"./motion-CrLibvjP.js";import"./Portal-CHsntPCQ.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./index-BWtxplKf.js";import"./placementArrow-UtY5srm7.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-Iv3ft_s8.js";import"./initDefaultProps-BcWs5QbR.js";import"./Keyframes-C7fCrnlS.js";function Vt(){}var Wt=1/0,Gt=ke&&1/st(new ke([,-0]))[1]==Wt?function(t){return new ke(t)}:Vt,Xt=200;function Yt(t,n,e){var o=-1,l=Dt,u=t.length,c=!0,i=[],s=i;if(u>=Xt){var v=Gt(t);if(v)return st(v);c=!1,l=Bt,s=new Pt}else s=i;e:for(;++o<u;){var d=t[o],r=d;if(d=d!==0?d:0,c&&r===r){for(var $=s.length;$--;)if(s[$]===r)continue e;i.push(d)}else l(s,r,e)||(s!==i&&s.push(r),i.push(d))}return i}function Be(t){return t&&t.length?Yt(t):[]}function Ut(t,n,e,o){let l;if(l!==void 0)return!!l;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;const u=Object.keys(t),c=Object.keys(n);if(u.length!==c.length)return!1;const i=Object.prototype.hasOwnProperty.bind(n);for(let s=0;s<u.length;s++){const v=u[s];if(!i(v))return!1;const d=t[v],r=n[v];if(l=void 0,l===!1||l===void 0&&d!==r)return!1}return!0}function ve(t,n){return Ut(We(t),We(n))}const ut=Symbol("menuContextKey"),ct=t=>{ge(ut,t)},Q=()=>de(ut),dt=Symbol("ForceRenderKey"),qt=t=>{ge(dt,t)},mt=()=>de(dt,!1),vt=Symbol("menuFirstLevelContextKey"),ft=t=>{ge(vt,t)},Zt=()=>de(vt,!0),Ce=J({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(t,n){let{slots:e}=n;const o=Q(),l=p({},o);return t.mode!==void 0&&(l.mode=Ge(t,"mode")),t.overflowDisabled!==void 0&&(l.overflowDisabled=Ge(t,"overflowDisabled")),ct(l),()=>{var u;return(u=e.default)===null||u===void 0?void 0:u.call(e)}}}),$e="$$__vc-menu-more__key",pt=Symbol("KeyPathContext"),Re=()=>de(pt,{parentEventKeys:m(()=>[]),parentKeys:m(()=>[]),parentInfo:{}}),Jt=(t,n,e)=>{const{parentEventKeys:o,parentKeys:l}=Re(),u=m(()=>[...o.value,t]),c=m(()=>[...l.value,n]);return ge(pt,{parentEventKeys:u,parentKeys:c,parentInfo:e}),c},gt=Symbol("measure"),Ue=J({compatConfig:{MODE:3},setup(t,n){let{slots:e}=n;return ge(gt,!0),()=>{var o;return(o=e.default)===null||o===void 0?void 0:o.call(e)}}}),He=()=>de(gt,!1);function bt(t){const{mode:n,rtl:e,inlineIndent:o}=Q();return m(()=>n.value!=="inline"?null:e.value?{paddingRight:`${t.value*o.value}px`}:{paddingLeft:`${t.value*o.value}px`})}let Qt=0;const en=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:Se.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:Ae()}),pe=J({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:en(),slots:Object,setup(t,n){let{slots:e,emit:o,attrs:l}=n;const u=at(),c=He(),i=typeof u.vnode.key=="symbol"?String(u.vnode.key):u.vnode.key;Ie(typeof u.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(i)}"\` not support Symbol type`);const s=`menu_item_${++Qt}_$$_${i}`,{parentEventKeys:v,parentKeys:d}=Re(),{prefixCls:r,activeKeys:$,disabled:y,changeActiveKeys:g,rtl:C,inlineCollapsed:x,siderCollapsed:k,onItemClick:K,selectedKeys:L,registerMenuInfo:q,unRegisterMenuInfo:I}=Q(),O=Zt(),R=H(!1),_=m(()=>[...d.value,i]);q(s,{eventKey:s,key:i,parentEventKeys:v,parentKeys:d,isLeaf:!0}),he(()=>{I(s)}),X($,()=>{R.value=!!$.value.find(h=>h===i)},{immediate:!0});const T=m(()=>y.value||t.disabled),V=m(()=>L.value.includes(i)),W=m(()=>{const h=`${r.value}-item`;return{[`${h}`]:!0,[`${h}-danger`]:t.danger,[`${h}-active`]:R.value,[`${h}-selected`]:V.value,[`${h}-disabled`]:T.value}}),Y=h=>({key:i,eventKey:s,keyPath:_.value,eventKeyPath:[...v.value,s],domEvent:h,item:p(p({},t),l)}),re=h=>{if(T.value)return;const E=Y(h);o("click",h),K(E)},ae=h=>{T.value||(g(_.value),o("mouseenter",h))},ee=h=>{T.value||(g([]),o("mouseleave",h))},te=h=>{if(o("keydown",h),h.which===Rt.ENTER){const E=Y(h);o("click",h),K(E)}},se=h=>{g(_.value),o("focus",h)},N=(h,E)=>{const z=f("span",{class:`${r.value}-title-content`},[E]);return(!h||it(E)&&E.type==="span")&&E&&x.value&&O&&typeof E=="string"?f("div",{class:`${r.value}-inline-collapsed-noicon`},[E.charAt(0)]):z},me=bt(m(()=>_.value.length));return()=>{var h,E,z,Z,ne;if(c)return null;const U=(h=t.title)!==null&&h!==void 0?h:(E=e.title)===null||E===void 0?void 0:E.call(e),a=lt((z=e.default)===null||z===void 0?void 0:z.call(e)),b=a.length;let M=U;typeof U>"u"?M=O&&b?a:"":U===!1&&(M="");const P={title:M};!k.value&&!x.value&&(P.title=null,P.open=!1);const D={};t.role==="option"&&(D["aria-selected"]=V.value);const w=(Z=t.icon)!==null&&Z!==void 0?Z:(ne=e.icon)===null||ne===void 0?void 0:ne.call(e,t);return f(_t,B(B({},P),{},{placement:C.value?"left":"right",overlayClassName:`${r.value}-inline-collapsed-tooltip`}),{default:()=>[f(fe.Item,B(B(B({component:"li"},l),{},{id:t.id,style:p(p({},l.style||{}),me.value),class:[W.value,{[`${l.class}`]:!!l.class,[`${r.value}-item-only-child`]:(w?b+1:b)===1}],role:t.role||"menuitem",tabindex:t.disabled?null:-1,"data-menu-id":i,"aria-disabled":t.disabled},D),{},{onMouseenter:ae,onMouseleave:ee,onClick:re,onKeydown:te,onFocus:se,title:typeof U=="string"?U:void 0}),{default:()=>[_e(typeof w=="function"?w(t.originItemValue):w,{class:`${r.value}-item-icon`},!1),N(w,a)]})]})}}}),le={adjustX:1,adjustY:1},tn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},nn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},on={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},qe=J({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(t,n){let{slots:e,emit:o}=n;const l=H(!1),{getPopupContainer:u,rtl:c,subMenuOpenDelay:i,subMenuCloseDelay:s,builtinPlacements:v,triggerSubMenuAction:d,forceSubMenuRender:r,motion:$,defaultMotions:y,rootClassName:g}=Q(),C=mt(),x=m(()=>c.value?p(p({},nn),v.value):p(p({},tn),v.value)),k=m(()=>on[t.mode]),K=H();X(()=>t.visible,I=>{Pe.cancel(K.value),K.value=Pe(()=>{l.value=I})},{immediate:!0}),he(()=>{Pe.cancel(K.value)});const L=I=>{o("visibleChange",I)},q=m(()=>{var I,O;const R=$.value||((I=y.value)===null||I===void 0?void 0:I[t.mode])||((O=y.value)===null||O===void 0?void 0:O.other),_=typeof R=="function"?R():R;return _?Ht(_.name,{css:!0}):void 0});return()=>{const{prefixCls:I,popupClassName:O,mode:R,popupOffset:_,disabled:j}=t;return f(Et,{prefixCls:I,popupClassName:ye(`${I}-popup`,{[`${I}-rtl`]:c.value},O,g.value),stretch:R==="horizontal"?"minWidth":null,getPopupContainer:u.value,builtinPlacements:x.value,popupPlacement:k.value,popupVisible:l.value,popupAlign:_&&{offset:_},action:j?[]:[d.value],mouseEnterDelay:i.value,mouseLeaveDelay:s.value,onPopupVisibleChange:L,forceRender:C||r.value,popupAnimation:q.value},{popup:e.popup,default:e.default})}}}),ze=(t,n)=>{let{slots:e,attrs:o}=n;var l;const{prefixCls:u,mode:c}=Q();return f("ul",B(B({},o),{},{class:ye(u.value,`${u.value}-sub`,`${u.value}-${c.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(l=e.default)===null||l===void 0?void 0:l.call(e)])};ze.displayName="SubMenuList";const ln=J({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(t,n){let{slots:e}=n;const o=m(()=>"inline"),{motion:l,mode:u,defaultMotions:c}=Q(),i=m(()=>u.value===o.value),s=F(!i.value),v=m(()=>i.value?t.open:!1);X(u,()=>{i.value&&(s.value=!1)},{flush:"post"});const d=m(()=>{var r,$;const y=l.value||((r=c.value)===null||r===void 0?void 0:r[o.value])||(($=c.value)===null||$===void 0?void 0:$.other),g=typeof y=="function"?y():y;return p(p({},g),{appear:t.keyPath.length<=1})});return()=>{var r;return s.value?null:f(Ce,{mode:o.value},{default:()=>[f(wt,d.value,{default:()=>[Kt(f(ze,{id:t.id},{default:()=>[(r=e.default)===null||r===void 0?void 0:r.call(e)]}),[[Ot,v.value]])]})]})}}});let Ze=0;const rn=()=>({icon:Se.any,title:Se.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:Ae()}),ce=J({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:rn(),slots:Object,setup(t,n){let{slots:e,attrs:o,emit:l}=n;var u,c;ft(!1);const i=He(),s=at(),v=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Ie(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(v)}"\` not support Symbol type`);const d=Ne(v)?v:`sub_menu_${++Ze}_$$_not_set_key`,r=(u=t.eventKey)!==null&&u!==void 0?u:Ne(v)?`sub_menu_${++Ze}_$$_${v}`:d,{parentEventKeys:$,parentInfo:y,parentKeys:g}=Re(),C=m(()=>[...g.value,d]),x=H([]),k={eventKey:r,key:d,parentEventKeys:$,childrenEventKeys:x,parentKeys:g};(c=y.childrenEventKeys)===null||c===void 0||c.value.push(r),he(()=>{var S;y.childrenEventKeys&&(y.childrenEventKeys.value=(S=y.childrenEventKeys)===null||S===void 0?void 0:S.value.filter(A=>A!=r))}),Jt(r,d,k);const{prefixCls:K,activeKeys:L,disabled:q,changeActiveKeys:I,mode:O,inlineCollapsed:R,openKeys:_,overflowDisabled:j,onOpenChange:T,registerMenuInfo:V,unRegisterMenuInfo:W,selectedSubMenuKeys:Y,expandIcon:re,theme:ae}=Q(),ee=v!=null,te=!i&&(mt()||!ee);qt(te),(i&&ee||!i&&!ee||te)&&(V(r,k),he(()=>{W(r)}));const se=m(()=>`${K.value}-submenu`),N=m(()=>q.value||t.disabled),me=H(),h=H(),E=m(()=>_.value.includes(d)),z=m(()=>!j.value&&E.value),Z=m(()=>Y.value.includes(d)),ne=H(!1);X(L,()=>{ne.value=!!L.value.find(S=>S===d)},{immediate:!0});const U=S=>{N.value||(l("titleClick",S,d),O.value==="inline"&&T(d,!E.value))},a=S=>{N.value||(I(C.value),l("mouseenter",S))},b=S=>{N.value||(I([]),l("mouseleave",S))},M=bt(m(()=>C.value.length)),P=S=>{O.value!=="inline"&&T(d,S)},D=()=>{I(C.value)},w=r&&`${r}-popup`,G=m(()=>ye(K.value,`${K.value}-${t.theme||ae.value}`,t.popupClassName)),ue=(S,A)=>{if(!A)return R.value&&!g.value.length&&S&&typeof S=="string"?f("div",{class:`${K.value}-inline-collapsed-noicon`},[S.charAt(0)]):f("span",{class:`${K.value}-title-content`},[S]);const oe=it(S)&&S.type==="span";return f(Ee,null,[_e(typeof A=="function"?A(t.originItemValue):A,{class:`${K.value}-item-icon`},!1),oe?S:f("span",{class:`${K.value}-title-content`},[S])])},we=m(()=>O.value!=="inline"&&C.value.length>1?"vertical":O.value),$t=m(()=>O.value==="horizontal"?"vertical":O.value),yt=m(()=>we.value==="horizontal"?"vertical":we.value),Fe=()=>{var S,A;const oe=se.value,Ke=(S=t.icon)!==null&&S!==void 0?S:(A=e.icon)===null||A===void 0?void 0:A.call(e,t),Le=t.expandIcon||e.expandIcon||re.value,Oe=ue(rt(e,t,"title"),Ke);return f("div",{style:M.value,class:`${oe}-title`,tabindex:N.value?null:-1,ref:me,title:typeof Oe=="string"?Oe:null,"data-menu-id":d,"aria-expanded":z.value,"aria-haspopup":!0,"aria-controls":w,"aria-disabled":N.value,onClick:U,onFocus:D},[Oe,O.value!=="horizontal"&&Le?Le(p(p({},t),{isOpen:z.value})):f("i",{class:`${oe}-arrow`},null)])};return()=>{var S;if(i)return ee?(S=e.default)===null||S===void 0?void 0:S.call(e):null;const A=se.value;let oe=()=>null;if(!j.value&&O.value!=="inline"){const Ke=O.value==="horizontal"?[0,8]:[10,0];oe=()=>f(qe,{mode:we.value,prefixCls:A,visible:!t.internalPopupClose&&z.value,popupClassName:G.value,popupOffset:t.popupOffset||Ke,disabled:N.value,onVisibleChange:P},{default:()=>[Fe()],popup:()=>f(Ce,{mode:yt.value},{default:()=>[f(ze,{id:w,ref:h},{default:e.default})]})})}else oe=()=>f(qe,null,{default:Fe});return f(Ce,{mode:$t.value},{default:()=>[f(fe.Item,B(B({component:"li"},o),{},{role:"none",class:ye(A,`${A}-${O.value}`,o.class,{[`${A}-open`]:z.value,[`${A}-active`]:ne.value,[`${A}-selected`]:Z.value,[`${A}-disabled`]:N.value}),onMouseenter:a,onMouseleave:b,"data-submenu-id":d}),{default:()=>f(Ee,null,[oe(),!j.value&&f(ln,{id:w,open:z.value,keyPath:C.value},{default:e.default})])})]})}}}),an=()=>({title:Se.any,originItemValue:Ae()}),xe=J({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:an(),slots:Object,setup(t,n){let{slots:e,attrs:o}=n;const{prefixCls:l}=Q(),u=m(()=>`${l.value}-item-group`),c=He();return()=>{var i,s;return c?(i=e.default)===null||i===void 0?void 0:i.call(e):f("li",B(B({},o),{},{onClick:v=>v.stopPropagation(),class:u.value}),[f("div",{title:typeof t.title=="string"?t.title:void 0,class:`${u.value}-title`},[rt(e,t,"title")]),f("ul",{class:`${u.value}-list`},[(s=e.default)===null||s===void 0?void 0:s.call(e)])])}}}),sn=()=>({prefixCls:String,dashed:Boolean}),Me=J({compatConfig:{MODE:3},name:"AMenuDivider",props:sn(),setup(t){const{prefixCls:n}=Q(),e=m(()=>({[`${n.value}-item-divider`]:!0,[`${n.value}-item-divider-dashed`]:!!t.dashed}));return()=>f("li",{class:e.value},null)}});var un=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(t);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(e[o[l]]=t[o[l]]);return e};function De(t,n,e){return(t||[]).map((o,l)=>{if(o&&typeof o=="object"){const u=o,{label:c,children:i,key:s,type:v}=u,d=un(u,["label","children","key","type"]),r=s??`tmp-${l}`,$=e?e.parentKeys.slice():[],y=[],g={eventKey:r,key:r,parentEventKeys:F($),parentKeys:F($),childrenEventKeys:F(y),isLeaf:!1};if(i||v==="group"){if(v==="group"){const x=De(i,n,e);return f(xe,B(B({key:r},d),{},{title:c,originItemValue:o}),{default:()=>[x]})}n.set(r,g),e&&e.childrenEventKeys.push(r);const C=De(i,n,{childrenEventKeys:y,parentKeys:[].concat($,r)});return f(ce,B(B({key:r},d),{},{title:c,originItemValue:o}),{default:()=>[C]})}return v==="divider"?f(Me,B({key:r},d),null):(g.isLeaf=!0,n.set(r,g),f(pe,B(B({key:r},d),{},{originItemValue:o}),{default:()=>[c]}))}return null}).filter(o=>o)}function cn(t){const n=H([]),e=H(!1),o=H(new Map);return X(()=>t.items,()=>{const l=new Map;e.value=!1,t.items?(e.value=!0,n.value=De(t.items,l)):n.value=void 0,o.value=l},{immediate:!0,deep:!0}),{itemsNodes:n,store:o,hasItmes:e}}const dn=t=>{const{componentCls:n,motionDurationSlow:e,menuHorizontalHeight:o,colorSplit:l,lineWidth:u,lineType:c,menuItemPaddingInline:i}=t;return{[`${n}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${u}px ${c} ${l}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${n}-item, ${n}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},[`> ${n}-item:hover,
|
|
1
|
+
import{t as lt,_ as B,z as it,c as ye,H as Ne,A as rt,I as ht,B as It,g as St,m as je,q as Ve,r as Ct,d as xt,u as Mt}from"./useConfigInject-BKqJUQaF.js";import{_ as p,o as Ae}from"./index-ZZ_4A9um.js";import{U as We,i as de,d as J,a4 as Ge,p as ge,j as m,o as he,w as X,c as f,g as at,s as H,r as F,$ as wt,a0 as Kt,a1 as Ot,H as Ee,l as Tt,f as Te,u as be,T as kt}from"./vendor-BVetwVfk.js";import{d as Ie}from"./devWarning-CNIS3FrJ.js";import{s as st,S as Pt,c as Bt,T as Et}from"./Trigger-BV4JPD3z.js";import{a as Dt}from"./_arrayIncludes-B8uzE354.js";import{n as ke}from"./_getTag-CWA3v-Ds.js";import{S as At}from"./injectionKey-BXVc-oGP.js";import{O as fe}from"./Overflow-L_28D41_.js";import{P as Se}from"./index-U4Zd5IK6.js";import{c as _e}from"./vnode-I9keNa_U.js";import{T as _t}from"./index-C1GXp5YD.js";import{K as Rt}from"./KeyCode-D63Tfrq7.js";import{w as Pe}from"./raf-Deuc0E8-.js";import{a as Ht}from"./transition-CGYDOK3N.js";import{T as Xe,aS as zt}from"./icons-ukMaZ3tx.js";import{g as Ft,c as Lt}from"./collapseMotion-D3P4mRvK.js";import{i as Ye}from"./slide-CXFBsLyp.js";import{i as Nt}from"./zoom-BNV3xYvt.js";import{a as jt}from"./OverrideContext-DEW2m7K6.js";import"./warning-Pq00owYb.js";import"./motion-BR7NF0vx.js";import"./Portal-CHsntPCQ.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./index-BcnQrVVZ.js";import"./placementArrow-CBAaXBxj.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-2MPUdPu2.js";import"./initDefaultProps--L8bzddm.js";import"./Keyframes-C7fCrnlS.js";function Vt(){}var Wt=1/0,Gt=ke&&1/st(new ke([,-0]))[1]==Wt?function(t){return new ke(t)}:Vt,Xt=200;function Yt(t,n,e){var o=-1,l=Dt,u=t.length,c=!0,i=[],s=i;if(u>=Xt){var v=Gt(t);if(v)return st(v);c=!1,l=Bt,s=new Pt}else s=i;e:for(;++o<u;){var d=t[o],r=d;if(d=d!==0?d:0,c&&r===r){for(var $=s.length;$--;)if(s[$]===r)continue e;i.push(d)}else l(s,r,e)||(s!==i&&s.push(r),i.push(d))}return i}function Be(t){return t&&t.length?Yt(t):[]}function Ut(t,n,e,o){let l;if(l!==void 0)return!!l;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;const u=Object.keys(t),c=Object.keys(n);if(u.length!==c.length)return!1;const i=Object.prototype.hasOwnProperty.bind(n);for(let s=0;s<u.length;s++){const v=u[s];if(!i(v))return!1;const d=t[v],r=n[v];if(l=void 0,l===!1||l===void 0&&d!==r)return!1}return!0}function ve(t,n){return Ut(We(t),We(n))}const ut=Symbol("menuContextKey"),ct=t=>{ge(ut,t)},Q=()=>de(ut),dt=Symbol("ForceRenderKey"),qt=t=>{ge(dt,t)},mt=()=>de(dt,!1),vt=Symbol("menuFirstLevelContextKey"),ft=t=>{ge(vt,t)},Zt=()=>de(vt,!0),Ce=J({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(t,n){let{slots:e}=n;const o=Q(),l=p({},o);return t.mode!==void 0&&(l.mode=Ge(t,"mode")),t.overflowDisabled!==void 0&&(l.overflowDisabled=Ge(t,"overflowDisabled")),ct(l),()=>{var u;return(u=e.default)===null||u===void 0?void 0:u.call(e)}}}),$e="$$__vc-menu-more__key",pt=Symbol("KeyPathContext"),Re=()=>de(pt,{parentEventKeys:m(()=>[]),parentKeys:m(()=>[]),parentInfo:{}}),Jt=(t,n,e)=>{const{parentEventKeys:o,parentKeys:l}=Re(),u=m(()=>[...o.value,t]),c=m(()=>[...l.value,n]);return ge(pt,{parentEventKeys:u,parentKeys:c,parentInfo:e}),c},gt=Symbol("measure"),Ue=J({compatConfig:{MODE:3},setup(t,n){let{slots:e}=n;return ge(gt,!0),()=>{var o;return(o=e.default)===null||o===void 0?void 0:o.call(e)}}}),He=()=>de(gt,!1);function bt(t){const{mode:n,rtl:e,inlineIndent:o}=Q();return m(()=>n.value!=="inline"?null:e.value?{paddingRight:`${t.value*o.value}px`}:{paddingLeft:`${t.value*o.value}px`})}let Qt=0;const en=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:Se.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:Ae()}),pe=J({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:en(),slots:Object,setup(t,n){let{slots:e,emit:o,attrs:l}=n;const u=at(),c=He(),i=typeof u.vnode.key=="symbol"?String(u.vnode.key):u.vnode.key;Ie(typeof u.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(i)}"\` not support Symbol type`);const s=`menu_item_${++Qt}_$$_${i}`,{parentEventKeys:v,parentKeys:d}=Re(),{prefixCls:r,activeKeys:$,disabled:y,changeActiveKeys:g,rtl:C,inlineCollapsed:x,siderCollapsed:k,onItemClick:K,selectedKeys:L,registerMenuInfo:q,unRegisterMenuInfo:I}=Q(),O=Zt(),R=H(!1),_=m(()=>[...d.value,i]);q(s,{eventKey:s,key:i,parentEventKeys:v,parentKeys:d,isLeaf:!0}),he(()=>{I(s)}),X($,()=>{R.value=!!$.value.find(h=>h===i)},{immediate:!0});const T=m(()=>y.value||t.disabled),V=m(()=>L.value.includes(i)),W=m(()=>{const h=`${r.value}-item`;return{[`${h}`]:!0,[`${h}-danger`]:t.danger,[`${h}-active`]:R.value,[`${h}-selected`]:V.value,[`${h}-disabled`]:T.value}}),Y=h=>({key:i,eventKey:s,keyPath:_.value,eventKeyPath:[...v.value,s],domEvent:h,item:p(p({},t),l)}),re=h=>{if(T.value)return;const E=Y(h);o("click",h),K(E)},ae=h=>{T.value||(g(_.value),o("mouseenter",h))},ee=h=>{T.value||(g([]),o("mouseleave",h))},te=h=>{if(o("keydown",h),h.which===Rt.ENTER){const E=Y(h);o("click",h),K(E)}},se=h=>{g(_.value),o("focus",h)},N=(h,E)=>{const z=f("span",{class:`${r.value}-title-content`},[E]);return(!h||it(E)&&E.type==="span")&&E&&x.value&&O&&typeof E=="string"?f("div",{class:`${r.value}-inline-collapsed-noicon`},[E.charAt(0)]):z},me=bt(m(()=>_.value.length));return()=>{var h,E,z,Z,ne;if(c)return null;const U=(h=t.title)!==null&&h!==void 0?h:(E=e.title)===null||E===void 0?void 0:E.call(e),a=lt((z=e.default)===null||z===void 0?void 0:z.call(e)),b=a.length;let M=U;typeof U>"u"?M=O&&b?a:"":U===!1&&(M="");const P={title:M};!k.value&&!x.value&&(P.title=null,P.open=!1);const D={};t.role==="option"&&(D["aria-selected"]=V.value);const w=(Z=t.icon)!==null&&Z!==void 0?Z:(ne=e.icon)===null||ne===void 0?void 0:ne.call(e,t);return f(_t,B(B({},P),{},{placement:C.value?"left":"right",overlayClassName:`${r.value}-inline-collapsed-tooltip`}),{default:()=>[f(fe.Item,B(B(B({component:"li"},l),{},{id:t.id,style:p(p({},l.style||{}),me.value),class:[W.value,{[`${l.class}`]:!!l.class,[`${r.value}-item-only-child`]:(w?b+1:b)===1}],role:t.role||"menuitem",tabindex:t.disabled?null:-1,"data-menu-id":i,"aria-disabled":t.disabled},D),{},{onMouseenter:ae,onMouseleave:ee,onClick:re,onKeydown:te,onFocus:se,title:typeof U=="string"?U:void 0}),{default:()=>[_e(typeof w=="function"?w(t.originItemValue):w,{class:`${r.value}-item-icon`},!1),N(w,a)]})]})}}}),le={adjustX:1,adjustY:1},tn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},nn={topLeft:{points:["bl","tl"],overflow:le,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:le,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:le,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:le,offset:[4,0]}},on={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},qe=J({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(t,n){let{slots:e,emit:o}=n;const l=H(!1),{getPopupContainer:u,rtl:c,subMenuOpenDelay:i,subMenuCloseDelay:s,builtinPlacements:v,triggerSubMenuAction:d,forceSubMenuRender:r,motion:$,defaultMotions:y,rootClassName:g}=Q(),C=mt(),x=m(()=>c.value?p(p({},nn),v.value):p(p({},tn),v.value)),k=m(()=>on[t.mode]),K=H();X(()=>t.visible,I=>{Pe.cancel(K.value),K.value=Pe(()=>{l.value=I})},{immediate:!0}),he(()=>{Pe.cancel(K.value)});const L=I=>{o("visibleChange",I)},q=m(()=>{var I,O;const R=$.value||((I=y.value)===null||I===void 0?void 0:I[t.mode])||((O=y.value)===null||O===void 0?void 0:O.other),_=typeof R=="function"?R():R;return _?Ht(_.name,{css:!0}):void 0});return()=>{const{prefixCls:I,popupClassName:O,mode:R,popupOffset:_,disabled:j}=t;return f(Et,{prefixCls:I,popupClassName:ye(`${I}-popup`,{[`${I}-rtl`]:c.value},O,g.value),stretch:R==="horizontal"?"minWidth":null,getPopupContainer:u.value,builtinPlacements:x.value,popupPlacement:k.value,popupVisible:l.value,popupAlign:_&&{offset:_},action:j?[]:[d.value],mouseEnterDelay:i.value,mouseLeaveDelay:s.value,onPopupVisibleChange:L,forceRender:C||r.value,popupAnimation:q.value},{popup:e.popup,default:e.default})}}}),ze=(t,n)=>{let{slots:e,attrs:o}=n;var l;const{prefixCls:u,mode:c}=Q();return f("ul",B(B({},o),{},{class:ye(u.value,`${u.value}-sub`,`${u.value}-${c.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(l=e.default)===null||l===void 0?void 0:l.call(e)])};ze.displayName="SubMenuList";const ln=J({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(t,n){let{slots:e}=n;const o=m(()=>"inline"),{motion:l,mode:u,defaultMotions:c}=Q(),i=m(()=>u.value===o.value),s=F(!i.value),v=m(()=>i.value?t.open:!1);X(u,()=>{i.value&&(s.value=!1)},{flush:"post"});const d=m(()=>{var r,$;const y=l.value||((r=c.value)===null||r===void 0?void 0:r[o.value])||(($=c.value)===null||$===void 0?void 0:$.other),g=typeof y=="function"?y():y;return p(p({},g),{appear:t.keyPath.length<=1})});return()=>{var r;return s.value?null:f(Ce,{mode:o.value},{default:()=>[f(wt,d.value,{default:()=>[Kt(f(ze,{id:t.id},{default:()=>[(r=e.default)===null||r===void 0?void 0:r.call(e)]}),[[Ot,v.value]])]})]})}}});let Ze=0;const rn=()=>({icon:Se.any,title:Se.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:Ae()}),ce=J({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:rn(),slots:Object,setup(t,n){let{slots:e,attrs:o,emit:l}=n;var u,c;ft(!1);const i=He(),s=at(),v=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Ie(typeof s.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(v)}"\` not support Symbol type`);const d=Ne(v)?v:`sub_menu_${++Ze}_$$_not_set_key`,r=(u=t.eventKey)!==null&&u!==void 0?u:Ne(v)?`sub_menu_${++Ze}_$$_${v}`:d,{parentEventKeys:$,parentInfo:y,parentKeys:g}=Re(),C=m(()=>[...g.value,d]),x=H([]),k={eventKey:r,key:d,parentEventKeys:$,childrenEventKeys:x,parentKeys:g};(c=y.childrenEventKeys)===null||c===void 0||c.value.push(r),he(()=>{var S;y.childrenEventKeys&&(y.childrenEventKeys.value=(S=y.childrenEventKeys)===null||S===void 0?void 0:S.value.filter(A=>A!=r))}),Jt(r,d,k);const{prefixCls:K,activeKeys:L,disabled:q,changeActiveKeys:I,mode:O,inlineCollapsed:R,openKeys:_,overflowDisabled:j,onOpenChange:T,registerMenuInfo:V,unRegisterMenuInfo:W,selectedSubMenuKeys:Y,expandIcon:re,theme:ae}=Q(),ee=v!=null,te=!i&&(mt()||!ee);qt(te),(i&&ee||!i&&!ee||te)&&(V(r,k),he(()=>{W(r)}));const se=m(()=>`${K.value}-submenu`),N=m(()=>q.value||t.disabled),me=H(),h=H(),E=m(()=>_.value.includes(d)),z=m(()=>!j.value&&E.value),Z=m(()=>Y.value.includes(d)),ne=H(!1);X(L,()=>{ne.value=!!L.value.find(S=>S===d)},{immediate:!0});const U=S=>{N.value||(l("titleClick",S,d),O.value==="inline"&&T(d,!E.value))},a=S=>{N.value||(I(C.value),l("mouseenter",S))},b=S=>{N.value||(I([]),l("mouseleave",S))},M=bt(m(()=>C.value.length)),P=S=>{O.value!=="inline"&&T(d,S)},D=()=>{I(C.value)},w=r&&`${r}-popup`,G=m(()=>ye(K.value,`${K.value}-${t.theme||ae.value}`,t.popupClassName)),ue=(S,A)=>{if(!A)return R.value&&!g.value.length&&S&&typeof S=="string"?f("div",{class:`${K.value}-inline-collapsed-noicon`},[S.charAt(0)]):f("span",{class:`${K.value}-title-content`},[S]);const oe=it(S)&&S.type==="span";return f(Ee,null,[_e(typeof A=="function"?A(t.originItemValue):A,{class:`${K.value}-item-icon`},!1),oe?S:f("span",{class:`${K.value}-title-content`},[S])])},we=m(()=>O.value!=="inline"&&C.value.length>1?"vertical":O.value),$t=m(()=>O.value==="horizontal"?"vertical":O.value),yt=m(()=>we.value==="horizontal"?"vertical":we.value),Fe=()=>{var S,A;const oe=se.value,Ke=(S=t.icon)!==null&&S!==void 0?S:(A=e.icon)===null||A===void 0?void 0:A.call(e,t),Le=t.expandIcon||e.expandIcon||re.value,Oe=ue(rt(e,t,"title"),Ke);return f("div",{style:M.value,class:`${oe}-title`,tabindex:N.value?null:-1,ref:me,title:typeof Oe=="string"?Oe:null,"data-menu-id":d,"aria-expanded":z.value,"aria-haspopup":!0,"aria-controls":w,"aria-disabled":N.value,onClick:U,onFocus:D},[Oe,O.value!=="horizontal"&&Le?Le(p(p({},t),{isOpen:z.value})):f("i",{class:`${oe}-arrow`},null)])};return()=>{var S;if(i)return ee?(S=e.default)===null||S===void 0?void 0:S.call(e):null;const A=se.value;let oe=()=>null;if(!j.value&&O.value!=="inline"){const Ke=O.value==="horizontal"?[0,8]:[10,0];oe=()=>f(qe,{mode:we.value,prefixCls:A,visible:!t.internalPopupClose&&z.value,popupClassName:G.value,popupOffset:t.popupOffset||Ke,disabled:N.value,onVisibleChange:P},{default:()=>[Fe()],popup:()=>f(Ce,{mode:yt.value},{default:()=>[f(ze,{id:w,ref:h},{default:e.default})]})})}else oe=()=>f(qe,null,{default:Fe});return f(Ce,{mode:$t.value},{default:()=>[f(fe.Item,B(B({component:"li"},o),{},{role:"none",class:ye(A,`${A}-${O.value}`,o.class,{[`${A}-open`]:z.value,[`${A}-active`]:ne.value,[`${A}-selected`]:Z.value,[`${A}-disabled`]:N.value}),onMouseenter:a,onMouseleave:b,"data-submenu-id":d}),{default:()=>f(Ee,null,[oe(),!j.value&&f(ln,{id:w,open:z.value,keyPath:C.value},{default:e.default})])})]})}}}),an=()=>({title:Se.any,originItemValue:Ae()}),xe=J({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:an(),slots:Object,setup(t,n){let{slots:e,attrs:o}=n;const{prefixCls:l}=Q(),u=m(()=>`${l.value}-item-group`),c=He();return()=>{var i,s;return c?(i=e.default)===null||i===void 0?void 0:i.call(e):f("li",B(B({},o),{},{onClick:v=>v.stopPropagation(),class:u.value}),[f("div",{title:typeof t.title=="string"?t.title:void 0,class:`${u.value}-title`},[rt(e,t,"title")]),f("ul",{class:`${u.value}-list`},[(s=e.default)===null||s===void 0?void 0:s.call(e)])])}}}),sn=()=>({prefixCls:String,dashed:Boolean}),Me=J({compatConfig:{MODE:3},name:"AMenuDivider",props:sn(),setup(t){const{prefixCls:n}=Q(),e=m(()=>({[`${n.value}-item-divider`]:!0,[`${n.value}-item-divider-dashed`]:!!t.dashed}));return()=>f("li",{class:e.value},null)}});var un=function(t,n){var e={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&n.indexOf(o)<0&&(e[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(t);l<o.length;l++)n.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(t,o[l])&&(e[o[l]]=t[o[l]]);return e};function De(t,n,e){return(t||[]).map((o,l)=>{if(o&&typeof o=="object"){const u=o,{label:c,children:i,key:s,type:v}=u,d=un(u,["label","children","key","type"]),r=s??`tmp-${l}`,$=e?e.parentKeys.slice():[],y=[],g={eventKey:r,key:r,parentEventKeys:F($),parentKeys:F($),childrenEventKeys:F(y),isLeaf:!1};if(i||v==="group"){if(v==="group"){const x=De(i,n,e);return f(xe,B(B({key:r},d),{},{title:c,originItemValue:o}),{default:()=>[x]})}n.set(r,g),e&&e.childrenEventKeys.push(r);const C=De(i,n,{childrenEventKeys:y,parentKeys:[].concat($,r)});return f(ce,B(B({key:r},d),{},{title:c,originItemValue:o}),{default:()=>[C]})}return v==="divider"?f(Me,B({key:r},d),null):(g.isLeaf=!0,n.set(r,g),f(pe,B(B({key:r},d),{},{originItemValue:o}),{default:()=>[c]}))}return null}).filter(o=>o)}function cn(t){const n=H([]),e=H(!1),o=H(new Map);return X(()=>t.items,()=>{const l=new Map;e.value=!1,t.items?(e.value=!0,n.value=De(t.items,l)):n.value=void 0,o.value=l},{immediate:!0,deep:!0}),{itemsNodes:n,store:o,hasItmes:e}}const dn=t=>{const{componentCls:n,motionDurationSlow:e,menuHorizontalHeight:o,colorSplit:l,lineWidth:u,lineType:c,menuItemPaddingInline:i}=t;return{[`${n}-horizontal`]:{lineHeight:`${o}px`,border:0,borderBottom:`${u}px ${c} ${l}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${n}-item, ${n}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:i},[`> ${n}-item:hover,
|
|
2
2
|
> ${n}-item-active,
|
|
3
3
|
> ${n}-submenu ${n}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${n}-item, ${n}-submenu-title`]:{transition:[`border-color ${e}`,`background ${e}`].join(",")},[`${n}-submenu-arrow`]:{display:"none"}}}},mn=t=>{let{componentCls:n,menuArrowOffset:e}=t;return{[`${n}-rtl`]:{direction:"rtl"},[`${n}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${n}-rtl${n}-vertical,
|
|
4
4
|
${n}-submenu-rtl ${n}-vertical`]:{[`${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${e})`},"&::after":{transform:`rotate(45deg) translateY(${e})`}}}}},Je=t=>p({},ht(t)),Qe=(t,n)=>{const{componentCls:e,colorItemText:o,colorItemTextSelected:l,colorGroupTitle:u,colorItemBg:c,colorSubItemBg:i,colorItemBgSelected:s,colorActiveBarHeight:v,colorActiveBarWidth:d,colorActiveBarBorderSize:r,motionDurationSlow:$,motionEaseInOut:y,motionEaseOut:g,menuItemPaddingInline:C,motionDurationMid:x,colorItemTextHover:k,lineType:K,colorSplit:L,colorItemTextDisabled:q,colorDangerItemText:I,colorDangerItemTextHover:O,colorDangerItemTextSelected:R,colorDangerItemBgActive:_,colorDangerItemBgSelected:j,colorItemBgHover:T,menuSubMenuBg:V,colorItemTextSelectedHorizontal:W,colorItemBgSelectedHorizontal:Y}=t;return{[`${e}-${n}`]:{color:o,background:c,[`&${e}-root:focus-visible`]:p({},Je(t)),[`${e}-item-group-title`]:{color:u},[`${e}-submenu-selected`]:{[`> ${e}-submenu-title`]:{color:l}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{color:`${q} !important`},[`${e}-item:hover, ${e}-submenu-title:hover`]:{[`&:not(${e}-item-selected):not(${e}-submenu-selected)`]:{color:k}},[`&:not(${e}-horizontal)`]:{[`${e}-item:not(${e}-item-selected)`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:s}},[`${e}-submenu-title`]:{"&:hover":{backgroundColor:T},"&:active":{backgroundColor:s}}},[`${e}-item-danger`]:{color:I,[`&${e}-item:hover`]:{[`&:not(${e}-item-selected):not(${e}-submenu-selected)`]:{color:O}},[`&${e}-item:active`]:{background:_}},[`${e}-item a`]:{"&, &:hover":{color:"inherit"}},[`${e}-item-selected`]:{color:l,[`&${e}-item-danger`]:{color:R},"a, a:hover":{color:"inherit"}},[`& ${e}-item-selected`]:{backgroundColor:s,[`&${e}-item-danger`]:{backgroundColor:j}},[`${e}-item, ${e}-submenu-title`]:{[`&:not(${e}-item-disabled):focus-visible`]:p({},Je(t))},[`&${e}-submenu > ${e}`]:{backgroundColor:V},[`&${e}-popup > ${e}`]:{backgroundColor:c},[`&${e}-horizontal`]:p(p({},n==="dark"?{borderBottom:0}:{}),{[`> ${e}-item, > ${e}-submenu`]:{top:r,marginTop:-r,marginBottom:0,borderRadius:0,"&::after":{position:"absolute",insetInline:C,bottom:0,borderBottom:`${v}px solid transparent`,transition:`border-color ${$} ${y}`,content:'""'},"&:hover, &-active, &-open":{"&::after":{borderBottomWidth:v,borderBottomColor:W}},"&-selected":{color:W,backgroundColor:Y,"&::after":{borderBottomWidth:v,borderBottomColor:W}}}}),[`&${e}-root`]:{[`&${e}-inline, &${e}-vertical`]:{borderInlineEnd:`${r}px ${K} ${L}`}},[`&${e}-inline`]:{[`${e}-sub${e}-inline`]:{background:i},[`${e}-item, ${e}-submenu-title`]:r&&d?{width:`calc(100% + ${r}px)`}:{},[`${e}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${d}px solid ${l}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${x} ${g}`,`opacity ${x} ${g}`].join(","),content:'""'},[`&${e}-item-danger`]:{"&::after":{borderInlineEndColor:R}}},[`${e}-selected, ${e}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${x} ${y}`,`opacity ${x} ${y}`].join(",")}}}}}},et=t=>{const{componentCls:n,menuItemHeight:e,itemMarginInline:o,padding:l,menuArrowSize:u,marginXS:c,marginXXS:i}=t,s=l+u+c;return{[`${n}-item`]:{position:"relative"},[`${n}-item, ${n}-submenu-title`]:{height:e,lineHeight:`${e}px`,paddingInline:l,overflow:"hidden",textOverflow:"ellipsis",marginInline:o,marginBlock:i,width:`calc(100% - ${o*2}px)`},[`${n}-submenu`]:{paddingBottom:.02},[`> ${n}-item,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as d,p as ce,n as w,o as A,z as ue}from"./index-
|
|
1
|
+
import{_ as d,p as ce,n as w,o as A,z as ue}from"./index-ZZ_4A9um.js";import{D as me}from"./Dropdown-DBfZJHBI.js";import{g as ge,m as ve,r as be,p as X,u as Z,_ as H,c as E,z as U}from"./useConfigInject-BKqJUQaF.js";import{b as $e,B as M}from"./index-DIe3dY84.js";import{i as q}from"./initDefaultProps--L8bzddm.js";import{P as J}from"./index-U4Zd5IK6.js";import{aS as fe,a4 as F}from"./icons-ukMaZ3tx.js";import{b as we,r as he,a as ye}from"./placementArrow-CBAaXBxj.js";import{i as Y}from"./move-BpyQMRtF.js";import{s as Ce,a as Se,b as xe,c as Pe,i as k}from"./slide-CXFBsLyp.js";import{i as _e}from"./zoom-BNV3xYvt.js";import{d as K,c as $,j as P}from"./vendor-BVetwVfk.js";import{c as G}from"./vnode-I9keNa_U.js";import{d as W}from"./devWarning-CNIS3FrJ.js";import{o as Oe}from"./omit-RkKN6uqw.js";import{u as De}from"./OverrideContext-DEW2m7K6.js";import"./Trigger-BV4JPD3z.js";import"./raf-Deuc0E8-.js";import"./motion-BR7NF0vx.js";import"./Portal-CHsntPCQ.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-CGYDOK3N.js";import"./index-C-CTCrAH.js";import"./useState-DoAhV80c.js";import"./compact-item-B4vcKR0x.js";import"./createContext-Div8Cl0F.js";import"./Compact-DC8UsEAe.js";import"./Keyframes-C7fCrnlS.js";import"./warning-Pq00owYb.js";const Q=()=>({arrow:ue([Boolean,Object]),trigger:{type:[Array,String]},menu:A(),overlay:J.any,visible:w(),open:w(),disabled:w(),danger:w(),autofocus:w(),align:A(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:A(),forceRender:w(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:w(),destroyPopupOnHide:w(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),L=$e(),Ie=()=>d(d({},Q()),{type:L.type,size:String,htmlType:L.htmlType,href:String,disabled:w(),prefixCls:String,icon:J.any,title:String,loading:L.loading,onClick:ce()}),Re=e=>{const{componentCls:o,antCls:n,paddingXS:i,opacityLoading:a}=e;return{[`${o}-button`]:{whiteSpace:"nowrap",[`&${n}-btn-group > ${n}-btn`]:{[`&-loading, &-loading + ${n}-btn`]:{cursor:"default",pointerEvents:"none",opacity:a},[`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]:{paddingInline:i}}}}},Be=e=>{const{componentCls:o,menuCls:n,colorError:i,colorTextLightSolid:a}=e,l=`${n}-item`;return{[`${o}, ${o}-menu-submenu`]:{[`${n} ${l}`]:{[`&${l}-danger:not(${l}-disabled)`]:{color:i,"&:hover":{color:a,backgroundColor:i}}}}}},Ne=e=>{const{componentCls:o,menuCls:n,zIndexPopup:i,dropdownArrowDistance:a,dropdownArrowOffset:l,sizePopupArrow:v,antCls:t,iconCls:c,motionDurationMid:b,dropdownPaddingVertical:h,fontSize:y,dropdownEdgeChildPadding:p,colorTextDisabled:m,fontSizeIcon:g,controlPaddingHorizontal:C,colorBgElevated:r,boxShadowPopoverArrow:s}=e;return[{[o]:d(d({},be(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:i,display:"block","&::before":{position:"absolute",insetBlock:-a+v/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${o}-wrap`]:{position:"relative",[`${t}-btn > ${c}-down`]:{fontSize:g},[`${c}-down::before`]:{transition:`transform ${b}`}},[`${o}-wrap-open`]:{[`${c}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`
|
|
2
2
|
&-show-arrow${o}-placement-topLeft,
|
|
3
3
|
&-show-arrow${o}-placement-top,
|
|
4
4
|
&-show-arrow${o}-placement-topRight
|
|
@@ -28,4 +28,4 @@ import{_ as d,p as ce,n as w,o as A,z as ue}from"./index-DlSUq1W3.js";import{D a
|
|
|
28
28
|
&${t}-slide-down-leave${t}-slide-down-leave-active${o}-placement-bottom,
|
|
29
29
|
&${t}-slide-down-leave${t}-slide-down-leave-active${o}-placement-bottomRight`]:{animationName:Se},[`&${t}-slide-up-leave${t}-slide-up-leave-active${o}-placement-topLeft,
|
|
30
30
|
&${t}-slide-up-leave${t}-slide-up-leave-active${o}-placement-top,
|
|
31
|
-
&${t}-slide-up-leave${t}-slide-up-leave-active${o}-placement-topRight`]:{animationName:Ce}})},{[`${o} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:i,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${o}, ${o}-menu-submenu`]:{[n]:d(d({padding:p,listStyleType:"none",backgroundColor:r,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},
|
|
31
|
+
&${t}-slide-up-leave${t}-slide-up-leave-active${o}-placement-topRight`]:{animationName:Ce}})},{[`${o} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:i,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${o}, ${o}-menu-submenu`]:{[n]:d(d({padding:p,listStyleType:"none",backgroundColor:r,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},X(e)),{[`${n}-item-group-title`]:{padding:`${h}px ${C}px`,color:e.colorTextDescription,transition:`all ${b}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:e.borderRadiusSM},[`${n}-item-icon`]:{minWidth:y,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${b}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:d(d({clear:"both",margin:0,padding:`${h}px ${C}px`,color:e.colorText,fontWeight:"normal",fontSize:y,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${b}`,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},X(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:m,cursor:"not-allowed","&:hover":{color:m,backgroundColor:r,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${e.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${o}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${o}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorTextDescription,fontSize:g,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${e.marginXS}px`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:C+e.fontSizeSM},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${o}-menu-submenu-title`]:{[`&, ${o}-menu-submenu-arrow-icon`]:{color:m,backgroundColor:r,cursor:"not-allowed"}},[`${n}-submenu-selected ${o}-menu-submenu-title`]:{color:e.colorPrimary}})}},[k(e,"slide-up"),k(e,"slide-down"),Y(e,"move-up"),Y(e,"move-down"),_e(e,"zoom-big")]]},ee=ge("Dropdown",(e,o)=>{let{rootPrefixCls:n}=o;const{marginXXS:i,sizePopupArrow:a,controlHeight:l,fontSize:v,lineHeight:t,paddingXXS:c,componentCls:b,borderRadiusOuter:h,borderRadiusLG:y}=e,p=(l-v*t)/2,{dropdownArrowOffset:m}=we({sizePopupArrow:a,contentRadius:y,borderRadiusOuter:h}),g=ve(e,{menuCls:`${b}-menu`,rootPrefixCls:n,dropdownArrowDistance:a/2+i,dropdownArrowOffset:m,dropdownPaddingVertical:p,dropdownEdgeChildPadding:c});return[Ne(g),Re(g),Be(g)]},e=>({zIndexPopup:e.zIndexPopupBase+50}));var Te=function(e,o){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&o.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(e);a<i.length;a++)o.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]]);return n};const ze=M.Group,B=K({compatConfig:{MODE:3},name:"ADropdownButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:q(Ie(),{trigger:"hover",placement:"bottomRight",type:"default"}),slots:Object,setup(e,o){let{slots:n,attrs:i,emit:a}=o;const l=p=>{a("update:visible",p),a("visibleChange",p),a("update:open",p),a("openChange",p)},{prefixCls:v,direction:t,getPopupContainer:c}=Z("dropdown",e),b=P(()=>`${v.value}-button`),[h,y]=ee(v);return()=>{var p,m;const g=d(d({},e),i),{type:C="default",disabled:r,danger:s,loading:f,htmlType:_,class:u="",overlay:S=(p=n.overlay)===null||p===void 0?void 0:p.call(n),trigger:x,align:O,open:D,visible:I,onVisibleChange:N,placement:T=t.value==="rtl"?"bottomLeft":"bottomRight",href:z,title:oe,icon:te=((m=n.icon)===null||m===void 0?void 0:m.call(n))||$(fe,null,null),mouseEnterDelay:ne,mouseLeaveDelay:re,overlayClassName:ae,overlayStyle:ie,destroyPopupOnHide:le,onClick:se,"onUpdate:open":Ae}=g,de=Te(g,["type","disabled","danger","loading","htmlType","class","overlay","trigger","align","open","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:open"]),pe={align:O,disabled:r,trigger:r?[]:x,placement:T,getPopupContainer:c?.value,onOpenChange:l,mouseEnterDelay:ne,mouseLeaveDelay:re,open:D??I,overlayClassName:ae,overlayStyle:ie,destroyPopupOnHide:le},j=$(M,{danger:s,type:C,disabled:r,loading:f,onClick:se,htmlType:_,href:z,title:oe},{default:n.default}),V=$(M,{danger:s,type:C,icon:te},null);return h($(ze,H(H({},de),{},{class:E(b.value,u,y.value)}),{default:()=>[n.leftButton?n.leftButton({button:j}):j,$(R,pe,{default:()=>[n.rightButton?n.rightButton({button:V}):V],overlay:()=>S})]}))}}}),R=K({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:q(Q(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:Object,setup(e,o){let{slots:n,attrs:i,emit:a}=o;const{prefixCls:l,rootPrefixCls:v,direction:t,getPopupContainer:c}=Z("dropdown",e),[b,h]=ee(l),y=P(()=>{const{placement:r="",transitionName:s}=e;return s!==void 0?s:r.includes("top")?`${v.value}-slide-down`:`${v.value}-slide-up`});De({prefixCls:P(()=>`${l.value}-menu`),expandIcon:P(()=>$("span",{class:`${l.value}-menu-submenu-arrow`},[$(F,{class:`${l.value}-menu-submenu-arrow-icon`},null)])),mode:P(()=>"vertical"),selectable:P(()=>!1),onClick:()=>{},validator:r=>{let{mode:s}=r}});const p=()=>{var r,s,f;const _=e.overlay||((r=n.overlay)===null||r===void 0?void 0:r.call(n)),u=Array.isArray(_)?_[0]:_;if(!u)return null;const S=u.props||{};W(!S.mode||S.mode==="vertical","Dropdown",`mode="${S.mode}" is not supported for Dropdown's Menu.`);const{selectable:x=!1,expandIcon:O=(f=(s=u.children)===null||s===void 0?void 0:s.expandIcon)===null||f===void 0?void 0:f.call(s)}=S,D=typeof O<"u"&&U(O)?O:$("span",{class:`${l.value}-menu-submenu-arrow`},[$(F,{class:`${l.value}-menu-submenu-arrow-icon`},null)]);return U(u)?G(u,{mode:"vertical",selectable:x,expandIcon:()=>D}):u},m=P(()=>{const r=e.placement;if(!r)return t.value==="rtl"?"bottomRight":"bottomLeft";if(r.includes("Center")){const s=r.slice(0,r.indexOf("Center"));return W(!r.includes("Center"),"Dropdown",`You are using '${r}' placement in Dropdown, which is deprecated. Try to use '${s}' instead.`),s}return r}),g=P(()=>typeof e.visible=="boolean"?e.visible:e.open),C=r=>{a("update:visible",r),a("visibleChange",r),a("update:open",r),a("openChange",r)};return()=>{var r,s;const{arrow:f,trigger:_,disabled:u,overlayClassName:S}=e,x=(r=n.default)===null||r===void 0?void 0:r.call(n)[0],O=G(x,d({class:E((s=x?.props)===null||s===void 0?void 0:s.class,{[`${l.value}-rtl`]:t.value==="rtl"},`${l.value}-trigger`)},u?{disabled:u}:{})),D=E(S,h.value,{[`${l.value}-rtl`]:t.value==="rtl"}),I=u?[]:_;let N;I&&I.includes("contextmenu")&&(N=!0);const T=ye({arrowPointAtCenter:typeof f=="object"&&f.pointAtCenter,autoAdjustOverflow:!0}),z=Oe(d(d(d({},e),i),{visible:g.value,builtinPlacements:T,overlayClassName:D,arrow:!!f,alignPoint:N,prefixCls:l.value,getPopupContainer:c?.value,transitionName:y.value,trigger:I,onVisibleChange:C,placement:m.value}),["overlay","onUpdate:visible"]);return b($(me,z,{default:()=>[O],overlay:p}))}}});R.Button=B;R.Button=B;R.install=function(e){return e.component(R.name,R),e.component(B.name,B),e};export{B as DropdownButton,R as default,Ie as dropdownButtonProps,Q as dropdownProps};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as te,m as le,r as E,
|
|
1
|
+
import{g as te,m as le,r as E,I as ie,u as K,v as se,t as ce,c as N,_ as D}from"./useConfigInject-BKqJUQaF.js";import{_ as s,n as p,q as I,x as A,y as de,a as ue}from"./index-ZZ_4A9um.js";import{V as be}from"./Checkbox-YsCNWg9S.js";import{u as X,F as ve}from"./FormItemContext-B-sn9E_W.js";import{P as fe}from"./index-U4Zd5IK6.js";import{K as me}from"./Keyframes-C7fCrnlS.js";import{d as L,i as pe,f as he,o as ge,l as xe,c as P,j as S,r as w,w as U,p as Ce}from"./vendor-BVetwVfk.js";const $e=new me("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ye=e=>{const{checkboxCls:a}=e,r=`${a}-wrapper`;return[{[`${a}-group`]:s(s({},E(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:s(s({},E(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[a]:s(s({},E(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${a}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${a}-inner`]:s({},ie(e))},[`${a}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:e.checkboxSize/14*5,height:e.checkboxSize/14*8,border:`${e.lineWidthBold}px solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[a]:{"&-indeterminate":{[`${a}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:e.fontSizeLG/2,height:e.fontSizeLG/2,backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${r}:hover ${a}:after`]:{visibility:"visible"},[`
|
|
2
2
|
${r}:not(${r}-disabled),
|
|
3
3
|
${a}:not(${a}-disabled)
|
|
4
4
|
`]:{[`&:hover ${a}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${a}-checked:not(${a}-disabled) ${a}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${a}-checked:not(${a}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${a}-checked`]:{[`${a}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:e.borderRadiusSM,visibility:"hidden",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,animationName:$e,animationDuration:e.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${e.motionDurationSlow}`}},[`
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as ie,E as me,_ as te,g as bt,m as ft,r as tt,B as mt,p as at,t as ht,z as gt,F as $t,u as yt}from"./useConfigInject-DqhngD-R.js";import{_ as T,q as j,o as he,x as xt,y as xe,n as St,z as _t}from"./index-DlSUq1W3.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-BVetwVfk.js";import{K as q}from"./KeyCode-D63Tfrq7.js";import wt,{Item as Pt}from"./index-4I01hpiN.js";import{D as Rt}from"./Dropdown-B6FSgG11.js";import{P as we}from"./index-U4Zd5IK6.js";import{u as D}from"./useState-DoAhV80c.js";import{aH as It,a6 as Et,ah as Bt}from"./icons-srBCpwXl.js";import{u as Lt}from"./OverrideContext-DEW2m7K6.js";import{R as Xe}from"./index-BWtxplKf.js";import{u as At}from"./useRefs-DRyTVik7.js";import{c as nt,t as Dt,a as kt,b as Mt,h as Nt,f as Ot}from"./hasIn-B9IRZs23.js";import{i as Wt}from"./Trigger-DmhLeltH.js";import{h as Fe}from"./_getTag-CWA3v-Ds.js";import{c as Ht}from"./vnode-B2xg11HE.js";import{i as zt}from"./isMobile--2fOlCHx.js";import{u as je}from"./useMergedState-DbHXwBgv.js";import{d as De}from"./devWarning-CNIS3FrJ.js";import{o as Kt}from"./omit-DpIEkCg5.js";import{i as Ve}from"./slide-hr0X8KAK.js";import{i as ot}from"./initDefaultProps-BcWs5QbR.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-BYKMeaWJ.js";import"./index-C8LBTJ8l.js";import"./placementArrow-UtY5srm7.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-Iv3ft_s8.js";import"./zoom-BGImMPSi.js";import"./Keyframes-C7fCrnlS.js";import"./motion-CrLibvjP.js";import"./Portal-CHsntPCQ.js";import"./transition-D2wU6PAY.js";import"./collapseMotion-D3P4mRvK.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,F as me,_ as te,g as bt,m as ft,r as tt,B as mt,p as at,t as ht,z as gt,G as $t,u as yt}from"./useConfigInject-BKqJUQaF.js";import{_ as T,q as j,o as he,x as xt,y as xe,n as St,z as _t}from"./index-ZZ_4A9um.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-BVetwVfk.js";import{K as q}from"./KeyCode-D63Tfrq7.js";import wt,{Item as Pt}from"./index-CIWKlZ1X.js";import{D as Rt}from"./Dropdown-DBfZJHBI.js";import{P as we}from"./index-U4Zd5IK6.js";import{u as D}from"./useState-DoAhV80c.js";import{aS as It,ac as Et,am as Bt}from"./icons-ukMaZ3tx.js";import{u as Lt}from"./OverrideContext-DEW2m7K6.js";import{R as Xe}from"./index-BcnQrVVZ.js";import{u as At}from"./useRefs-DRyTVik7.js";import{c as nt,t as Dt,a as kt,b as Mt,h as Nt,f as Ot}from"./hasIn-9c9xldOR.js";import{i as Wt}from"./Trigger-BV4JPD3z.js";import{h as Fe}from"./_getTag-CWA3v-Ds.js";import{c as Ht}from"./vnode-I9keNa_U.js";import{i as zt}from"./isMobile--2fOlCHx.js";import{u as je}from"./useMergedState-DbHXwBgv.js";import{d as De}from"./devWarning-CNIS3FrJ.js";import{o as Kt}from"./omit-RkKN6uqw.js";import{i as Ve}from"./slide-CXFBsLyp.js";import{i as ot}from"./initDefaultProps--L8bzddm.js";import"./_arrayIncludes-B8uzE354.js";import"./injectionKey-BXVc-oGP.js";import"./Overflow-L_28D41_.js";import"./index-C1GXp5YD.js";import"./placementArrow-CBAaXBxj.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-2MPUdPu2.js";import"./zoom-BNV3xYvt.js";import"./Keyframes-C7fCrnlS.js";import"./motion-BR7NF0vx.js";import"./Portal-CHsntPCQ.js";import"./transition-CGYDOK3N.js";import"./collapseMotion-D3P4mRvK.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,3 +1,3 @@
|
|
|
1
|
-
import{_ as $,g as G,m as
|
|
1
|
+
import{_ as $,g as G,m as z,r as K,u as V}from"./useConfigInject-BKqJUQaF.js";import{i as _}from"./initDefaultProps--L8bzddm.js";import{aZ as A,az as Y,am as q,a1 as Q,ai as U}from"./icons-ukMaZ3tx.js";import{y as w,z as X,o as Z,k as E,n as J,q as ee,_ as x,w as te}from"./index-ZZ_4A9um.js";import{d as re}from"./devWarning-CNIS3FrJ.js";import{d as I,c as g,H as F,j as u,_ as oe,r as B}from"./vendor-BVetwVfk.js";import{u as se}from"./useRefs-DRyTVik7.js";import{T as ne}from"./index-C1GXp5YD.js";import{K as ie}from"./Keyframes-C7fCrnlS.js";import"./warning-Pq00owYb.js";import"./index-U4Zd5IK6.js";import"./Trigger-BV4JPD3z.js";import"./raf-Deuc0E8-.js";import"./motion-BR7NF0vx.js";import"./Portal-CHsntPCQ.js";import"./vnode-I9keNa_U.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./_getTag-CWA3v-Ds.js";import"./transition-CGYDOK3N.js";import"./placementArrow-CBAaXBxj.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-2MPUdPu2.js";import"./zoom-BNV3xYvt.js";const le=["normal","exception","active","success"],j=()=>({prefixCls:String,type:w(),percent:Number,format:ee(),status:w(),showInfo:J(),strokeWidth:Number,strokeLinecap:w(),strokeColor:E(),trailColor:String,width:Number,success:Z(),gapDegree:Number,gapPosition:w(),size:X([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:w()});function P(e){return!e||e<0?0:e>100?100:e}function D(e){let{success:t,successPercent:o}=e,r=o;return t&&"progress"in t&&(re(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),r=t.progress),t&&"percent"in t&&(r=t.percent),r}function ae(e){let{percent:t,success:o,successPercent:r}=e;const s=P(D({success:o,successPercent:r}));return[s,P(P(t)-s)]}function ce(e){let{success:t={},strokeColor:o}=e;const{strokeColor:r}=t;return[r||A.green,o||null]}const W=(e,t,o)=>{var r,s,f,i;let n=-1,l=-1;if(t==="step"){const v=o.steps,d=o.strokeWidth;typeof e=="string"||typeof e>"u"?(n=e==="small"?2:14,l=d??8):typeof e=="number"?[n,l]=[e,e]:[n=14,l=8]=e,n*=v}else if(t==="line"){const v=o?.strokeWidth;typeof e=="string"||typeof e>"u"?l=v||(e==="small"?6:8):typeof e=="number"?[n,l]=[e,e]:[n=-1,l=8]=e}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[n,l]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[n,l]=[e,e]:(n=(s=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&s!==void 0?s:120,l=(i=(f=e[0])!==null&&f!==void 0?f:e[1])!==null&&i!==void 0?i:120));return{width:n,height:l}};var ue=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(o[r[s]]=e[r[s]]);return o};const de=()=>x(x({},j()),{strokeColor:E(),direction:w()}),ge=e=>{let t=[];return Object.keys(e).forEach(o=>{const r=parseFloat(o.replace(/%/g,""));isNaN(r)||t.push({key:r,value:e[o]})}),t=t.sort((o,r)=>o.key-r.key),t.map(o=>{let{key:r,value:s}=o;return`${s} ${r}%`}).join(", ")},pe=(e,t)=>{const{from:o=A.blue,to:r=A.blue,direction:s=t==="rtl"?"to left":"to right"}=e,f=ue(e,["from","to","direction"]);if(Object.keys(f).length!==0){const i=ge(f);return{backgroundImage:`linear-gradient(${s}, ${i})`}}return{backgroundImage:`linear-gradient(${s}, ${o}, ${r})`}},fe=I({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:de(),setup(e,t){let{slots:o,attrs:r}=t;const s=u(()=>{const{strokeColor:a,direction:p}=e;return a&&typeof a!="string"?pe(a,p):{backgroundColor:a}}),f=u(()=>e.strokeLinecap==="square"||e.strokeLinecap==="butt"?0:void 0),i=u(()=>e.trailColor?{backgroundColor:e.trailColor}:void 0),n=u(()=>{var a;return(a=e.size)!==null&&a!==void 0?a:[-1,e.strokeWidth||(e.size==="small"?6:8)]}),l=u(()=>W(n.value,"line",{strokeWidth:e.strokeWidth})),v=u(()=>{const{percent:a}=e;return x({width:`${P(a)}%`,height:`${l.value.height}px`,borderRadius:f.value},s.value)}),d=u(()=>D(e)),C=u(()=>{const{success:a}=e;return{width:`${P(d.value)}%`,height:`${l.value.height}px`,borderRadius:f.value,backgroundColor:a?.strokeColor}}),m={width:l.value.width<0?"100%":l.value.width,height:`${l.value.height}px`};return()=>{var a;return g(F,null,[g("div",$($({},r),{},{class:[`${e.prefixCls}-outer`,r.class],style:[r.style,m]}),[g("div",{class:`${e.prefixCls}-inner`,style:i.value},[g("div",{class:`${e.prefixCls}-bg`,style:v.value},null),d.value!==void 0?g("div",{class:`${e.prefixCls}-success-bg`,style:C.value},null):null])]),(a=o.default)===null||a===void 0?void 0:a.call(o)])}}}),me={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},ve=e=>{const t=B(null);return oe(()=>{const o=Date.now();let r=!1;e.value.forEach(s=>{const f=s?.$el||s;if(!f)return;r=!0;const i=f.style;i.transitionDuration=".3s, .3s, .3s, .06s",t.value&&o-t.value<100&&(i.transitionDuration="0s, 0s")}),r&&(t.value=Date.now())}),e},he={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var ye=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(o[r[s]]=e[r[s]]);return o};let N=0;function R(e){return+e.replace("%","")}function T(e){return Array.isArray(e)?e:[e]}function M(e,t,o,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,f=arguments.length>5?arguments[5]:void 0;const i=50-r/2;let n=0,l=-i,v=0,d=-2*i;switch(f){case"left":n=-i,l=0,v=2*i,d=0;break;case"right":n=i,l=0,v=-2*i,d=0;break;case"bottom":l=i,d=2*i;break}const C=`M 50,50 m ${n},${l}
|
|
2
2
|
a ${i},${i} 0 1 1 ${v},${-d}
|
|
3
|
-
a ${i},${i} 0 1 1 ${-v},${d}`,m=Math.PI*2*i,a={stroke:o,strokeDasharray:`${t/100*(m-s)}px ${m}px`,strokeDashoffset:`-${s/2+e/100*(m-s)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:C,pathStyle:a}}const Ce=I({compatConfig:{MODE:3},name:"VCCircle",props:_(he,me),setup(e){N+=1;const t=B(N),o=u(()=>T(e.percent)),r=u(()=>T(e.strokeColor)),[s,f]=se();ve(f);const i=()=>{const{prefixCls:n,strokeWidth:l,strokeLinecap:v,gapDegree:d,gapPosition:C}=e;let m=0;return o.value.map((a,p)=>{const c=r.value[p]||r.value[r.value.length-1],b=Object.prototype.toString.call(c)==="[object Object]"?`url(#${n}-gradient-${t.value})`:"",{pathString:y,pathStyle:S}=M(m,a,c,l,d,C);m+=a;const k={key:p,d:y,stroke:b,"stroke-linecap":v,"stroke-width":l,opacity:a===0?0:1,"fill-opacity":"0",class:`${n}-circle-path`,style:S};return g("path",$({ref:s(p)},k),null)})};return()=>{const{prefixCls:n,strokeWidth:l,trailWidth:v,gapDegree:d,gapPosition:C,trailColor:m,strokeLinecap:a,strokeColor:p}=e,c=ye(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:b,pathStyle:y}=M(0,100,m,l,d,C);delete c.percent;const S=r.value.find(h=>Object.prototype.toString.call(h)==="[object Object]"),k={d:b,stroke:m,"stroke-linecap":a,"stroke-width":v||l,"fill-opacity":"0",class:`${n}-circle-trail`,style:y};return g("svg",$({class:`${n}-circle`,viewBox:"0 0 100 100"},c),[S&&g("defs",null,[g("linearGradient",{id:`${n}-gradient-${t.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(S).sort((h,O)=>R(h)-R(O)).map((h,O)=>g("stop",{key:O,offset:h,"stop-color":S[h]},null))])]),g("path",k,null),i().reverse()])}}}),be=()=>x(x({},j()),{strokeColor:E()}),$e=3,Se=e=>$e/e*100,ke=I({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:_(be(),{trailColor:null}),setup(e,t){let{slots:o,attrs:r}=t;const s=u(()=>{var c;return(c=e.width)!==null&&c!==void 0?c:120}),f=u(()=>{var c;return(c=e.size)!==null&&c!==void 0?c:[s.value,s.value]}),i=u(()=>W(f.value,"circle")),n=u(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),l=u(()=>({width:`${i.value.width}px`,height:`${i.value.height}px`,fontSize:`${i.value.width*.15+6}px`})),v=u(()=>{var c;return(c=e.strokeWidth)!==null&&c!==void 0?c:Math.max(Se(i.value.width),6)}),d=u(()=>e.gapPosition||e.type==="dashboard"&&"bottom"||void 0),C=u(()=>ae(e)),m=u(()=>Object.prototype.toString.call(e.strokeColor)==="[object Object]"),a=u(()=>ce({success:e.success,strokeColor:e.strokeColor})),p=u(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:m.value}));return()=>{var c;const b=g(Ce,{percent:C.value,strokeWidth:v.value,trailWidth:v.value,strokeColor:a.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:n.value,gapPosition:d.value},null);return g("div",$($({},r),{},{class:[p.value,r.class],style:[r.style,l.value]}),[i.value.width<=20?g(ne,null,{default:()=>[g("span",null,[b])],title:o.default}):g(F,null,[b,(c=o.default)===null||c===void 0?void 0:c.call(o)])])}}}),xe=()=>x(x({},j()),{steps:Number,strokeColor:X(),trailColor:String}),Pe=I({compatConfig:{MODE:3},name:"Steps",props:xe(),setup(e,t){let{slots:o}=t;const r=u(()=>Math.round(e.steps*((e.percent||0)/100))),s=u(()=>{var n;return(n=e.size)!==null&&n!==void 0?n:[e.size==="small"?2:14,e.strokeWidth||8]}),f=u(()=>W(s.value,"step",{steps:e.steps,strokeWidth:e.strokeWidth||8})),i=u(()=>{const{steps:n,strokeColor:l,trailColor:v,prefixCls:d}=e,C=[];for(let m=0;m<n;m+=1){const a=Array.isArray(l)?l[m]:l,p={[`${d}-steps-item`]:!0,[`${d}-steps-item-active`]:m<=r.value-1};C.push(g("div",{key:m,class:p,style:{backgroundColor:m<=r.value-1?a:v,width:`${f.value.width/n}px`,height:`${f.value.height}px`}},null))}return C});return()=>{var n;return g("div",{class:`${e.prefixCls}-steps-outer`},[i.value,(n=o.default)===null||n===void 0?void 0:n.call(o)])}}}),we=new ie("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),Oe=e=>{const{componentCls:t,iconCls:o}=e;return{[t]:x(x({},
|
|
3
|
+
a ${i},${i} 0 1 1 ${-v},${d}`,m=Math.PI*2*i,a={stroke:o,strokeDasharray:`${t/100*(m-s)}px ${m}px`,strokeDashoffset:`-${s/2+e/100*(m-s)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:C,pathStyle:a}}const Ce=I({compatConfig:{MODE:3},name:"VCCircle",props:_(he,me),setup(e){N+=1;const t=B(N),o=u(()=>T(e.percent)),r=u(()=>T(e.strokeColor)),[s,f]=se();ve(f);const i=()=>{const{prefixCls:n,strokeWidth:l,strokeLinecap:v,gapDegree:d,gapPosition:C}=e;let m=0;return o.value.map((a,p)=>{const c=r.value[p]||r.value[r.value.length-1],b=Object.prototype.toString.call(c)==="[object Object]"?`url(#${n}-gradient-${t.value})`:"",{pathString:y,pathStyle:S}=M(m,a,c,l,d,C);m+=a;const k={key:p,d:y,stroke:b,"stroke-linecap":v,"stroke-width":l,opacity:a===0?0:1,"fill-opacity":"0",class:`${n}-circle-path`,style:S};return g("path",$({ref:s(p)},k),null)})};return()=>{const{prefixCls:n,strokeWidth:l,trailWidth:v,gapDegree:d,gapPosition:C,trailColor:m,strokeLinecap:a,strokeColor:p}=e,c=ye(e,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:b,pathStyle:y}=M(0,100,m,l,d,C);delete c.percent;const S=r.value.find(h=>Object.prototype.toString.call(h)==="[object Object]"),k={d:b,stroke:m,"stroke-linecap":a,"stroke-width":v||l,"fill-opacity":"0",class:`${n}-circle-trail`,style:y};return g("svg",$({class:`${n}-circle`,viewBox:"0 0 100 100"},c),[S&&g("defs",null,[g("linearGradient",{id:`${n}-gradient-${t.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(S).sort((h,O)=>R(h)-R(O)).map((h,O)=>g("stop",{key:O,offset:h,"stop-color":S[h]},null))])]),g("path",k,null),i().reverse()])}}}),be=()=>x(x({},j()),{strokeColor:E()}),$e=3,Se=e=>$e/e*100,ke=I({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:_(be(),{trailColor:null}),setup(e,t){let{slots:o,attrs:r}=t;const s=u(()=>{var c;return(c=e.width)!==null&&c!==void 0?c:120}),f=u(()=>{var c;return(c=e.size)!==null&&c!==void 0?c:[s.value,s.value]}),i=u(()=>W(f.value,"circle")),n=u(()=>{if(e.gapDegree||e.gapDegree===0)return e.gapDegree;if(e.type==="dashboard")return 75}),l=u(()=>({width:`${i.value.width}px`,height:`${i.value.height}px`,fontSize:`${i.value.width*.15+6}px`})),v=u(()=>{var c;return(c=e.strokeWidth)!==null&&c!==void 0?c:Math.max(Se(i.value.width),6)}),d=u(()=>e.gapPosition||e.type==="dashboard"&&"bottom"||void 0),C=u(()=>ae(e)),m=u(()=>Object.prototype.toString.call(e.strokeColor)==="[object Object]"),a=u(()=>ce({success:e.success,strokeColor:e.strokeColor})),p=u(()=>({[`${e.prefixCls}-inner`]:!0,[`${e.prefixCls}-circle-gradient`]:m.value}));return()=>{var c;const b=g(Ce,{percent:C.value,strokeWidth:v.value,trailWidth:v.value,strokeColor:a.value,strokeLinecap:e.strokeLinecap,trailColor:e.trailColor,prefixCls:e.prefixCls,gapDegree:n.value,gapPosition:d.value},null);return g("div",$($({},r),{},{class:[p.value,r.class],style:[r.style,l.value]}),[i.value.width<=20?g(ne,null,{default:()=>[g("span",null,[b])],title:o.default}):g(F,null,[b,(c=o.default)===null||c===void 0?void 0:c.call(o)])])}}}),xe=()=>x(x({},j()),{steps:Number,strokeColor:X(),trailColor:String}),Pe=I({compatConfig:{MODE:3},name:"Steps",props:xe(),setup(e,t){let{slots:o}=t;const r=u(()=>Math.round(e.steps*((e.percent||0)/100))),s=u(()=>{var n;return(n=e.size)!==null&&n!==void 0?n:[e.size==="small"?2:14,e.strokeWidth||8]}),f=u(()=>W(s.value,"step",{steps:e.steps,strokeWidth:e.strokeWidth||8})),i=u(()=>{const{steps:n,strokeColor:l,trailColor:v,prefixCls:d}=e,C=[];for(let m=0;m<n;m+=1){const a=Array.isArray(l)?l[m]:l,p={[`${d}-steps-item`]:!0,[`${d}-steps-item-active`]:m<=r.value-1};C.push(g("div",{key:m,class:p,style:{backgroundColor:m<=r.value-1?a:v,width:`${f.value.width/n}px`,height:`${f.value.height}px`}},null))}return C});return()=>{var n;return g("div",{class:`${e.prefixCls}-steps-outer`},[i.value,(n=o.default)===null||n===void 0?void 0:n.call(o)])}}}),we=new ie("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),Oe=e=>{const{componentCls:t,iconCls:o}=e;return{[t]:x(x({},K(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize,marginInlineEnd:e.marginXS,marginBottom:e.marginXS},[`${t}-outer`]:{display:"inline-block",width:"100%"},[`&${t}-show-info`]:{[`${t}-outer`]:{marginInlineEnd:`calc(-2em - ${e.marginXS}px)`,paddingInlineEnd:`calc(2em + ${e.paddingXS}px)`}},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:e.progressRemainingColor,borderRadius:e.progressLineRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorInfo}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",backgroundColor:e.colorInfo,borderRadius:e.progressLineRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",width:"2em",marginInlineStart:e.marginXS,color:e.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[o]:{fontSize:e.fontSize}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.progressLineRadius,opacity:0,animationName:we,animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Ie=e=>{const{componentCls:t,iconCls:o}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.progressRemainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[o]:{fontSize:`${e.fontSize/e.fontSizeSM}em`}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},De=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.progressRemainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.colorInfo}}}}}},je=e=>{const{componentCls:t,iconCls:o}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${o}`]:{fontSize:e.fontSizeSM}}}},We=G("Progress",e=>{const t=e.marginXXS/2,o=z(e,{progressLineRadius:100,progressInfoTextColor:e.colorText,progressDefaultColor:e.colorInfo,progressRemainingColor:e.colorFillSecondary,progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Oe(o),Ie(o),De(o),je(o)]});var Ae=function(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(o[r[s]]=e[r[s]]);return o};const _e=I({compatConfig:{MODE:3},name:"AProgress",inheritAttrs:!1,props:_(j(),{type:"line",percent:0,showInfo:!0,trailColor:null,size:"default",strokeLinecap:"round"}),slots:Object,setup(e,t){let{slots:o,attrs:r}=t;const{prefixCls:s,direction:f}=V("progress",e),[i,n]=We(s),l=u(()=>Array.isArray(e.strokeColor)?e.strokeColor[0]:e.strokeColor),v=u(()=>{const{percent:p=0}=e,c=D(e);return parseInt(c!==void 0?c.toString():p.toString(),10)}),d=u(()=>{const{status:p}=e;return!le.includes(p)&&v.value>=100?"success":p||"normal"}),C=u(()=>{const{type:p,showInfo:c,size:b}=e,y=s.value;return{[y]:!0,[`${y}-inline-circle`]:p==="circle"&&W(b,"circle").width<=20,[`${y}-${p==="dashboard"&&"circle"||p}`]:!0,[`${y}-status-${d.value}`]:!0,[`${y}-show-info`]:c,[`${y}-${b}`]:b,[`${y}-rtl`]:f.value==="rtl",[n.value]:!0}}),m=u(()=>typeof e.strokeColor=="string"||Array.isArray(e.strokeColor)?e.strokeColor:void 0),a=()=>{const{showInfo:p,format:c,type:b,percent:y,title:S}=e,k=D(e);if(!p)return null;let h;const O=c||o?.format||(H=>`${H}%`),L=b==="line";return c||o?.format||d.value!=="exception"&&d.value!=="success"?h=O(P(y),P(k)):d.value==="exception"?h=L?g(Y,null,null):g(q,null,null):d.value==="success"&&(h=L?g(Q,null,null):g(U,null,null)),g("span",{class:`${s.value}-text`,title:S===void 0&&typeof h=="string"?h:void 0},[h])};return()=>{const{type:p,steps:c,title:b}=e,{class:y}=r,S=Ae(r,["class"]),k=a();let h;return p==="line"?h=c?g(Pe,$($({},e),{},{strokeColor:m.value,prefixCls:s.value,steps:c}),{default:()=>[k]}):g(fe,$($({},e),{},{strokeColor:l.value,prefixCls:s.value,direction:f.value}),{default:()=>[k]}):(p==="circle"||p==="dashboard")&&(h=g(ke,$($({},e),{},{prefixCls:s.value,strokeColor:l.value,progressStatus:d.value}),{default:()=>[k]})),i(g("div",$($({role:"progressbar"},S),{},{class:[C.value,y],title:b}),[h]))}}}),st=te(_e);export{st as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{g as oo,m as eo,r as
|
|
2
|
-
&:hover ${i}`]:{borderColor:t},[`${r}-input:focus-visible + ${i}`]:I({},K(o)),[`${r}:hover::after, ${r}-wrapper:hover &::after`]:{visibility:"visible"},[`${r}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:e,height:e,marginBlockStart:e/-2,marginInlineStart:e/-2,backgroundColor:p?t:y,borderBlockStart:0,borderInlineStart:0,borderRadius:e,transform:"scale(0)",opacity:0,transition:`all ${d} ${f}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:e,height:e,backgroundColor:b,borderColor:B,borderStyle:"solid",borderWidth:g,borderRadius:"50%",transition:`all ${s}`},[`${r}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${r}-checked`]:{[i]:{borderColor:t,backgroundColor:p?b:t,"&::after":{transform:`scale(${C/e})`,opacity:1,transition:`all ${d} ${f}`}}},[`${r}-disabled`]:{cursor:"not-allowed",[i]:{backgroundColor:x,borderColor:B,cursor:"not-allowed","&::after":{backgroundColor:a}},[`${r}-input`]:{cursor:"not-allowed"},[`${r}-disabled + span`]:{color:c,cursor:"not-allowed"},[`&${r}-checked`]:{[i]:{"&::after":{transform:`scale(${u/e})`}}}},[`span${r} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},Co=o=>{const{radioButtonColor:r,controlHeight:n,componentCls:t,lineWidth:e,lineType:d,colorBorder:s,motionDurationSlow:w,motionDurationMid:f,radioButtonPaddingHorizontal:b,fontSize:B,radioButtonBg:g,fontSizeLG:C,controlHeightLG:x,controlHeightSM:c,paddingXS:h,borderRadius:a,borderRadiusSM:m,borderRadiusLG:u,radioCheckedColor:p,radioButtonCheckedBg:y,radioButtonHoverColor:i,radioButtonActiveColor:v,radioSolidCheckedColor:R,colorTextDisabled:l,colorBgContainerDisabled:S,radioDisabledButtonCheckedColor:P,radioDisabledButtonCheckedBg:G}=o;return{[`${t}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:b,paddingBlock:0,color:r,fontSize:B,lineHeight:`${n-e*2}px`,background:g,border:`${e}px ${d} ${s}`,borderBlockStartWidth:e+.02,borderInlineStartWidth:0,borderInlineEndWidth:e,cursor:"pointer",transition:[`color ${f}`,`background ${f}`,`border-color ${f}`,`box-shadow ${f}`].join(","),a:{color:r},[`> ${t}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-e,insetInlineStart:-e,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:e,paddingInline:0,backgroundColor:s,transition:`background-color ${w}`,content:'""'}},"&:first-child":{borderInlineStart:`${e}px ${d} ${s}`,borderStartStartRadius:a,borderEndStartRadius:a},"&:last-child":{borderStartEndRadius:a,borderEndEndRadius:a},"&:first-child:last-child":{borderRadius:a},[`${t}-group-large &`]:{height:x,fontSize:C,lineHeight:`${x-e*2}px`,"&:first-child":{borderStartStartRadius:u,borderEndStartRadius:u},"&:last-child":{borderStartEndRadius:u,borderEndEndRadius:u}},[`${t}-group-small &`]:{height:c,paddingInline:h-e,paddingBlock:0,lineHeight:`${c-e*2}px`,"&:first-child":{borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m}},"&:hover":{position:"relative",color:p},"&:has(:focus-visible)":I({},K(o)),[`${t}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${t}-button-wrapper-disabled)`]:{zIndex:1,color:p,background:y,borderColor:p,"&::before":{backgroundColor:p},"&:first-child":{borderColor:p},"&:hover":{color:i,borderColor:i,"&::before":{backgroundColor:i}},"&:active":{color:v,borderColor:v,"&::before":{backgroundColor:v}}},[`${t}-group-solid &-checked:not(${t}-button-wrapper-disabled)`]:{color:R,background:p,borderColor:p,"&:hover":{color:R,background:i,borderColor:i},"&:active":{color:R,background:v,borderColor:v}},"&-disabled":{color:l,backgroundColor:S,borderColor:s,cursor:"not-allowed","&:first-child, &:hover":{color:l,backgroundColor:S,borderColor:s}},[`&-disabled${t}-button-wrapper-checked`]:{color:P,backgroundColor:G,borderColor:s,boxShadow:"none"}}}},Q=oo("Radio",o=>{const{padding:r,lineWidth:n,controlItemBgActiveDisabled:t,colorTextDisabled:e,colorBgContainer:d,fontSizeLG:s,controlOutline:w,colorPrimaryHover:f,colorPrimaryActive:b,colorText:B,colorPrimary:g,marginXS:C,controlOutlineWidth:x,colorTextLightSolid:c,wireframe:h}=o,a=`0 0 0 ${x}px ${w}`,m=a,u=s,p=4,y=u-p*2,i=h?y:u-(p+n)*2,v=g,R=B,l=f,S=b,P=r-n,$=eo(o,{radioFocusShadow:a,radioButtonFocusShadow:m,radioSize:u,radioDotSize:i,radioDotDisabledSize:y,radioCheckedColor:v,radioDotDisabledColor:e,radioSolidCheckedColor:c,radioButtonBg:d,radioButtonCheckedBg:d,radioButtonColor:R,radioButtonHoverColor:l,radioButtonActiveColor:S,radioButtonPaddingHorizontal:P,radioDisabledButtonCheckedBg:t,radioDisabledButtonCheckedColor:e,radioWrapperMarginRight:C});return[ho($),fo($),Co($)]});var vo=function(o,r){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&r.indexOf(t)<0&&(n[t]=o[t]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,t=Object.getOwnPropertySymbols(o);e<t.length;e++)r.indexOf(t[e])<0&&Object.prototype.propertyIsEnumerable.call(o,t[e])&&(n[t[e]]=o[t[e]]);return n};const Y=()=>({prefixCls:String,checked:z(),disabled:z(),isGroup:z(),value:L.any,name:String,id:String,autofocus:z(),onChange:E(),onFocus:E(),onBlur:E(),onClick:E(),"onUpdate:checked":E(),"onUpdate:value":E()}),k=_({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:Y(),setup(o,r){let{emit:n,expose:t,slots:e,attrs:d}=r;const s=U(),w=no.useInject(),f=bo(),b=uo(),B=A(),g=O(()=>{var l;return(l=h.value)!==null&&l!==void 0?l:B.value}),C=
|
|
1
|
+
import{g as oo,m as eo,r as F,I as K,v as A,u as W,c as V,_ as D}from"./useConfigInject-BKqJUQaF.js";import{_ as I,q as E,n as z,y as j,x as to}from"./index-ZZ_4A9um.js";import{P as L}from"./index-U4Zd5IK6.js";import{V as ro}from"./Checkbox-YsCNWg9S.js";import{u as U,F as no}from"./FormItemContext-B-sn9E_W.js";import{o as ao}from"./omit-RkKN6uqw.js";import{i as N,p as X,d as _,c as T,j as O,r as H,w as io,n as lo}from"./vendor-BVetwVfk.js";import{K as so}from"./Keyframes-C7fCrnlS.js";import"./icons-ukMaZ3tx.js";import"./initDefaultProps--L8bzddm.js";import"./createContext-Div8Cl0F.js";const q=Symbol("radioGroupContextKey"),co=o=>{X(q,o)},uo=()=>N(q,void 0),J=Symbol("radioOptionTypeContextKey"),po=o=>{X(J,o)},bo=()=>N(J,void 0),go=new so("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),ho=o=>{const{componentCls:r,antCls:n}=o,t=`${r}-group`;return{[t]:I(I({},F(o)),{display:"inline-block",fontSize:0,[`&${t}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},fo=o=>{const{componentCls:r,radioWrapperMarginRight:n,radioCheckedColor:t,radioSize:e,motionDurationSlow:d,motionDurationMid:s,motionEaseInOut:w,motionEaseInOutCirc:f,radioButtonBg:b,colorBorder:B,lineWidth:g,radioDotSize:C,colorBgContainerDisabled:x,colorTextDisabled:c,paddingXS:h,radioDotDisabledColor:a,lineType:m,radioDotDisabledSize:u,wireframe:p,colorWhite:y}=o,i=`${r}-inner`;return{[`${r}-wrapper`]:I(I({},F(o)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${r}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:o.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${r}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${g}px ${m} ${t}`,borderRadius:"50%",visibility:"hidden",animationName:go,animationDuration:d,animationTimingFunction:w,animationFillMode:"both",content:'""'},[r]:I(I({},F(o)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${r}-wrapper:hover &,
|
|
2
|
+
&:hover ${i}`]:{borderColor:t},[`${r}-input:focus-visible + ${i}`]:I({},K(o)),[`${r}:hover::after, ${r}-wrapper:hover &::after`]:{visibility:"visible"},[`${r}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:e,height:e,marginBlockStart:e/-2,marginInlineStart:e/-2,backgroundColor:p?t:y,borderBlockStart:0,borderInlineStart:0,borderRadius:e,transform:"scale(0)",opacity:0,transition:`all ${d} ${f}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:e,height:e,backgroundColor:b,borderColor:B,borderStyle:"solid",borderWidth:g,borderRadius:"50%",transition:`all ${s}`},[`${r}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${r}-checked`]:{[i]:{borderColor:t,backgroundColor:p?b:t,"&::after":{transform:`scale(${C/e})`,opacity:1,transition:`all ${d} ${f}`}}},[`${r}-disabled`]:{cursor:"not-allowed",[i]:{backgroundColor:x,borderColor:B,cursor:"not-allowed","&::after":{backgroundColor:a}},[`${r}-input`]:{cursor:"not-allowed"},[`${r}-disabled + span`]:{color:c,cursor:"not-allowed"},[`&${r}-checked`]:{[i]:{"&::after":{transform:`scale(${u/e})`}}}},[`span${r} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},Co=o=>{const{radioButtonColor:r,controlHeight:n,componentCls:t,lineWidth:e,lineType:d,colorBorder:s,motionDurationSlow:w,motionDurationMid:f,radioButtonPaddingHorizontal:b,fontSize:B,radioButtonBg:g,fontSizeLG:C,controlHeightLG:x,controlHeightSM:c,paddingXS:h,borderRadius:a,borderRadiusSM:m,borderRadiusLG:u,radioCheckedColor:p,radioButtonCheckedBg:y,radioButtonHoverColor:i,radioButtonActiveColor:v,radioSolidCheckedColor:R,colorTextDisabled:l,colorBgContainerDisabled:S,radioDisabledButtonCheckedColor:P,radioDisabledButtonCheckedBg:G}=o;return{[`${t}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:b,paddingBlock:0,color:r,fontSize:B,lineHeight:`${n-e*2}px`,background:g,border:`${e}px ${d} ${s}`,borderBlockStartWidth:e+.02,borderInlineStartWidth:0,borderInlineEndWidth:e,cursor:"pointer",transition:[`color ${f}`,`background ${f}`,`border-color ${f}`,`box-shadow ${f}`].join(","),a:{color:r},[`> ${t}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-e,insetInlineStart:-e,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:e,paddingInline:0,backgroundColor:s,transition:`background-color ${w}`,content:'""'}},"&:first-child":{borderInlineStart:`${e}px ${d} ${s}`,borderStartStartRadius:a,borderEndStartRadius:a},"&:last-child":{borderStartEndRadius:a,borderEndEndRadius:a},"&:first-child:last-child":{borderRadius:a},[`${t}-group-large &`]:{height:x,fontSize:C,lineHeight:`${x-e*2}px`,"&:first-child":{borderStartStartRadius:u,borderEndStartRadius:u},"&:last-child":{borderStartEndRadius:u,borderEndEndRadius:u}},[`${t}-group-small &`]:{height:c,paddingInline:h-e,paddingBlock:0,lineHeight:`${c-e*2}px`,"&:first-child":{borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m}},"&:hover":{position:"relative",color:p},"&:has(:focus-visible)":I({},K(o)),[`${t}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${t}-button-wrapper-disabled)`]:{zIndex:1,color:p,background:y,borderColor:p,"&::before":{backgroundColor:p},"&:first-child":{borderColor:p},"&:hover":{color:i,borderColor:i,"&::before":{backgroundColor:i}},"&:active":{color:v,borderColor:v,"&::before":{backgroundColor:v}}},[`${t}-group-solid &-checked:not(${t}-button-wrapper-disabled)`]:{color:R,background:p,borderColor:p,"&:hover":{color:R,background:i,borderColor:i},"&:active":{color:R,background:v,borderColor:v}},"&-disabled":{color:l,backgroundColor:S,borderColor:s,cursor:"not-allowed","&:first-child, &:hover":{color:l,backgroundColor:S,borderColor:s}},[`&-disabled${t}-button-wrapper-checked`]:{color:P,backgroundColor:G,borderColor:s,boxShadow:"none"}}}},Q=oo("Radio",o=>{const{padding:r,lineWidth:n,controlItemBgActiveDisabled:t,colorTextDisabled:e,colorBgContainer:d,fontSizeLG:s,controlOutline:w,colorPrimaryHover:f,colorPrimaryActive:b,colorText:B,colorPrimary:g,marginXS:C,controlOutlineWidth:x,colorTextLightSolid:c,wireframe:h}=o,a=`0 0 0 ${x}px ${w}`,m=a,u=s,p=4,y=u-p*2,i=h?y:u-(p+n)*2,v=g,R=B,l=f,S=b,P=r-n,$=eo(o,{radioFocusShadow:a,radioButtonFocusShadow:m,radioSize:u,radioDotSize:i,radioDotDisabledSize:y,radioCheckedColor:v,radioDotDisabledColor:e,radioSolidCheckedColor:c,radioButtonBg:d,radioButtonCheckedBg:d,radioButtonColor:R,radioButtonHoverColor:l,radioButtonActiveColor:S,radioButtonPaddingHorizontal:P,radioDisabledButtonCheckedBg:t,radioDisabledButtonCheckedColor:e,radioWrapperMarginRight:C});return[ho($),fo($),Co($)]});var vo=function(o,r){var n={};for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&r.indexOf(t)<0&&(n[t]=o[t]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,t=Object.getOwnPropertySymbols(o);e<t.length;e++)r.indexOf(t[e])<0&&Object.prototype.propertyIsEnumerable.call(o,t[e])&&(n[t[e]]=o[t[e]]);return n};const Y=()=>({prefixCls:String,checked:z(),disabled:z(),isGroup:z(),value:L.any,name:String,id:String,autofocus:z(),onChange:E(),onFocus:E(),onBlur:E(),onClick:E(),"onUpdate:checked":E(),"onUpdate:value":E()}),k=_({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:Y(),setup(o,r){let{emit:n,expose:t,slots:e,attrs:d}=r;const s=U(),w=no.useInject(),f=bo(),b=uo(),B=A(),g=O(()=>{var l;return(l=h.value)!==null&&l!==void 0?l:B.value}),C=H(),{prefixCls:x,direction:c,disabled:h}=W("radio",o),a=O(()=>b?.optionType.value==="button"||f==="button"?`${x.value}-button`:x.value),m=A(),[u,p]=Q(x);t({focus:()=>{C.value.focus()},blur:()=>{C.value.blur()}});const v=l=>{const S=l.target.checked;n("update:checked",S),n("update:value",S),n("change",l),s.onFieldChange()},R=l=>{n("change",l),b&&b.onChange&&b.onChange(l)};return()=>{var l;const S=b,{prefixCls:P,id:G=s.id.value}=o,M=vo(o,["prefixCls","id"]),$=I(I({prefixCls:a.value,id:G},ao(M,["onUpdate:checked","onUpdate:value"])),{disabled:(l=h.value)!==null&&l!==void 0?l:m.value});S?($.name=S.name.value,$.onChange=R,$.checked=o.value===S.value.value,$.disabled=g.value||S.disabled.value):$.onChange=v;const Z=V({[`${a.value}-wrapper`]:!0,[`${a.value}-wrapper-checked`]:$.checked,[`${a.value}-wrapper-disabled`]:$.disabled,[`${a.value}-wrapper-rtl`]:c.value==="rtl",[`${a.value}-wrapper-in-form-item`]:w.isFormItemInput},d.class,p.value);return u(T("label",D(D({},d),{},{class:Z}),[T(ro,D(D({},$),{},{type:"radio",ref:C}),null),e.default&&T("span",null,[e.default()])]))}}}),mo=()=>({prefixCls:String,value:L.any,size:j(),options:to(),disabled:z(),name:String,buttonStyle:j("outline"),id:String,optionType:j("default"),onChange:E(),"onUpdate:value":E()}),So=_({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:mo(),setup(o,r){let{slots:n,emit:t,attrs:e}=r;const d=U(),{prefixCls:s,direction:w,size:f}=W("radio",o),[b,B]=Q(s),g=H(o.value),C=H(!1);return io(()=>o.value,c=>{g.value=c,C.value=!1}),co({onChange:c=>{const h=g.value,{value:a}=c.target;"value"in o||(g.value=a),!C.value&&a!==h&&(C.value=!0,t("update:value",a),t("change",c),d.onFieldChange()),lo(()=>{C.value=!1})},value:g,disabled:O(()=>o.disabled),name:O(()=>o.name),optionType:O(()=>o.optionType)}),()=>{var c;const{options:h,buttonStyle:a,id:m=d.id.value}=o,u=`${s.value}-group`,p=V(u,`${u}-${a}`,{[`${u}-${f.value}`]:f.value,[`${u}-rtl`]:w.value==="rtl"},e.class,B.value);let y=null;return h&&h.length>0?y=h.map(i=>{if(typeof i=="string"||typeof i=="number")return T(k,{key:i,prefixCls:s.value,disabled:o.disabled,value:i,checked:g.value===i},{default:()=>[i]});const{value:v,disabled:R,label:l}=i;return T(k,{key:`radio-group-value-options-${v}`,prefixCls:s.value,disabled:R||o.disabled,value:v,checked:g.value===v},{default:()=>[l]})}):y=(c=n.default)===null||c===void 0?void 0:c.call(n),b(T("div",D(D({},e),{},{class:p,id:m}),[y]))}}}),$o=_({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:Y(),setup(o,r){let{slots:n,attrs:t}=r;const{prefixCls:e}=W("radio",o);return po("button"),()=>{var d;return T(k,D(D(D({},t),o),{},{prefixCls:e.value}),{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]})}}});k.Group=So;k.Button=$o;k.install=function(o){return o.component(k.name,k),o.component(k.Group.name,k.Group),o.component(k.Button.name,k.Button),o};export{$o as Button,So as Group,$o as RadioButton,So as RadioGroup,k as default};
|