chainlesschain 0.162.85 → 0.162.87
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/assets/{AIOps-9s5boloe.js → AIOps-B5qoKwDX.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-nuq5gtIb.js → ActionButton-BdKytPee.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DrDHYSjZ.js → Analytics-CeSpW9WC.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-BDs4ULs3.js → AppLayout-CN0HcGHl.js} +5 -5
- package/src/assets/web-panel/assets/{Audit-DaqX39ZA.js → Audit-DiLVSuxs.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-ZpAZcYWU.js → Backup-RBZEr_Cm.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-rEL4bCmz.js → BaseInput-BLwgjz7w.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-LkXtveTN.js → Chat-hWbKo3Y8.js} +5 -5
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-BdkD-opG.js → ChatBubbleRenderer-DCQz2Fh1.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-B_nJ54jp.js → Checkbox-DjSvCtwm.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-C0NHbbUn.js → Codegen-CS5mCkDD.js} +1 -1
- package/src/assets/web-panel/assets/{Col-Bijl1DuU.js → Col-CXZT4-Kf.js} +1 -1
- package/src/assets/web-panel/assets/{Community-CVxkvzf7.js → Community-sRpeoMwv.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-CXmuCEc2.js → Compact-DLud5sT4.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-CsP-YVrE.js → Compliance-BaC6_OKU.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-B31Nw8vF.js → Cowork-CkDgjPCR.js} +4 -4
- package/src/assets/web-panel/assets/{Cron-Bo_cDFwM.js → Cron-JIyvROA6.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-D0C8hYOr.js → Crosschain-3zqCVPCv.js} +1 -1
- package/src/assets/web-panel/assets/{DID-eq7i-KXB.js → DID-B3tgwNrV.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-CVRBWNgx.js → Dashboard-7bPbgI4P.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-DcEm3tiv.js → Dropdown--vLJWMQt.js} +1 -1
- package/src/assets/web-panel/assets/EmailListRenderer-By5OyD2q.js +1 -0
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-C1THZ4cA.js → FamilyGuardDashboard-CCox4cK9.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-BO6tO2cA.js → Federation--4n8yx-h.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-BLCjbBnQ.js → FormItemContext-CP8g135H.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-HGQG6O9G.js → GenericCardRenderer-DhiGHyKC.js} +1 -1
- package/src/assets/web-panel/assets/{Git-DN44Wtw8.js → Git-CrnIJELY.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-BwUlWRZa.js → Governance-BudsrPFK.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-CI7XUJpq.js → Inference-Dmi_oji4.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-D5AFdDA1.js → KnowledgeGraph-C25fw0FO.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-ChxfsVjf.js → Logs-DShQrjB9.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-fzmD7edl.js → Marketplace-Dkw8f7jY.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-egeEEiOo.js → McpTools-BHx1HO5R.js} +5 -5
- package/src/assets/web-panel/assets/{Memory-ClfkU0Zc.js → Memory-RI41JeXd.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-CZP0a7ug.js → MobileBridge-CelTeD1k.js} +2 -2
- package/src/assets/web-panel/assets/{MobileProjects-ClhNmxpO.js → MobileProjects-B8pQWHvj.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-2W2NWMiR.js → Mtc-CK1SSiwH.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-BTH5f5vy.js → MtcAudit-CRdIoMd4.js} +6 -6
- package/src/assets/web-panel/assets/{Multisig-Dm-8GZVC.js → Multisig-Bw-b9lKa.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-CWvQYw0f.js → NLProgramming-BwwxruYQ.js} +1 -1
- package/src/assets/web-panel/assets/Notes-D4u4Q26j.js +7 -0
- package/src/assets/web-panel/assets/{NotificationSettings-DhGUAxEK.js → NotificationSettings-C6NlrEiz.js} +1 -1
- package/src/assets/web-panel/assets/OrderTableRenderer-B085DzwZ.js +1 -0
- package/src/assets/web-panel/assets/{Organization-BE6PoYoV.js → Organization-CJ-HZOGl.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-CidZn_Vh.js → Overflow-DP-Gr0MB.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-D8KPm4lA.js → P2P-ClZ8vSAq.js} +2 -2
- package/src/assets/web-panel/assets/PdhVaultBrowser-Cp_Cp_QM.js +7 -0
- package/src/assets/web-panel/assets/{Permissions-DBRrTNke.js → Permissions-CFNoSn65.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DYhCXT0Y.js → PersonalDataHub-BB7QWWJg.js} +4 -4
- package/src/assets/web-panel/assets/{Pipeline-CcP7z75i.js → Pipeline-X8zOudQr.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DIL17ASI.js → Privacy-BhHTcrIP.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-UbjZrOSd.js → ProjectInit-DyexCLNd.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-DEi3eB8z.js → ProjectSettings-6OwfY6DN.js} +2 -2
- package/src/assets/web-panel/assets/Projects-CXz0fJTM.js +1 -0
- package/src/assets/web-panel/assets/{Providers-BDh_Pzi1.js → Providers-DcV93Yo5.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-BDRMDklR.js → QuickAsk-D-hrghMC.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-SiCcAGiO.js → Recommend-zaqUMInK.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-CHG51BYr.js → Reputation-F6S8NTxc.js} +1 -1
- package/src/assets/web-panel/assets/{Row-syZxxDmc.js → Row-DAH0pXst.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-CLfcVChu.js → RssFeed-CiAB906Z.js} +3 -3
- package/src/assets/web-panel/assets/{Search-By-0Z5NO.js → Search-Coqx1seG.js} +1 -1
- package/src/assets/web-panel/assets/{Security-gxHVmg1J.js → Security-BoxcgnJV.js} +4 -4
- package/src/assets/web-panel/assets/{Services-DGbUxRrs.js → Services-COCvhr-B.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-JiyfBUz-.js → Skeleton-B1eVJHIi.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-C4xFz9Bd.js → Skills-CE9Dmx9j.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-DyeMx6KJ.js → Sla-BNTAqoF4.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CY8SKnF9.js → SpeechSettings-Bcz7uwC6.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-t3ZgQs5m.js → SyncSettings-BYavRqFb.js} +2 -2
- package/src/assets/web-panel/assets/Tasks-DIChx79b.js +1 -0
- package/src/assets/web-panel/assets/{Templates-dZ0agBUO.js → Templates-CtFWI9Wo.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-DEoI-tNH.js → Tenant-D3_a2Q-F.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-CvMaElnO.js → Terminal-tUKKFhFe.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-CUS477-i.js → TimelineRenderer-CAuPIfP3.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-B9-haDN7.js → Tokens-HwfHQxS6.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-den4MocY.js → Trigger-DqBh0u8h.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-DqnPipcT.js → Trust-BZisudc4.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-CmPLZGO2.js → UkeySign-BDVHNHgW.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-BcldEyuI.js → VideoEditing-CVg27K9W.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-Dap9Ydle.js → Wallet-C_C9Uozu.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-cSNYDx2c.js → WebAuthn-BJOqrscu.js} +5 -5
- package/src/assets/web-panel/assets/{WorkflowEditor-R4gjxnPH.js → WorkflowEditor-D371gIHp.js} +1 -1
- package/src/assets/web-panel/assets/{chat-Dgaug64C.js → chat-Bg3mtk60.js} +1 -1
- package/src/assets/web-panel/assets/{colors-CzEwsWwx.js → colors-DbsZDd0h.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-DWfrBoYH.js → compact-item-DdUiFvWf.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-DTQOT4YN.js → createContext-CdIrP9Fp.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-Cx5sL2Te.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-BZffORzo.js → hasIn-yRPIU6sb.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bz3VXQHs.js → index--f_sM-jB.js} +1 -1
- package/src/assets/web-panel/assets/{index-C0YRxk_4.js → index-06QSa3lu.js} +1 -1
- package/src/assets/web-panel/assets/{index-C7wTpk38.js → index-3ByeAY2K.js} +1 -1
- package/src/assets/web-panel/assets/{index-BgWQb3ab.js → index-6AVqepI5.js} +1 -1
- package/src/assets/web-panel/assets/{index-BgqftzvZ.js → index-7ME2_dHQ.js} +3 -3
- package/src/assets/web-panel/assets/index-A3QJglda.js +1 -0
- package/src/assets/web-panel/assets/{index-CU_6ho7E.js → index-BB6vndQ4.js} +1 -1
- package/src/assets/web-panel/assets/{index-D_TSRl0O.js → index-BMtLrQ_2.js} +1 -1
- package/src/assets/web-panel/assets/{index-OvBi64nW.js → index-BSg5Da6w.js} +1 -1
- package/src/assets/web-panel/assets/{index-C2pcp3GP.js → index-BVzaPW2D.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFYzC2yk.js → index-Be6UZot2.js} +1 -1
- package/src/assets/web-panel/assets/{index-C-aIuwpi.js → index-Bqz7zZa7.js} +1 -1
- package/src/assets/web-panel/assets/{index-D7h9VCvX.js → index-C-KhRvoX.js} +1 -1
- package/src/assets/web-panel/assets/{index-DRAeb51w.js → index-C1TOvQrI.js} +1 -1
- package/src/assets/web-panel/assets/{index-CN37EzzF.js → index-C1qvwqu6.js} +1 -1
- package/src/assets/web-panel/assets/{index-DGjB2DHG.js → index-C9vGPhlv.js} +1 -1
- package/src/assets/web-panel/assets/{index-CXK7GqtK.js → index-CI6-JPV0.js} +1 -1
- package/src/assets/web-panel/assets/{index-FEhVHCgN.js → index-CI9zX_HP.js} +1 -1
- package/src/assets/web-panel/assets/{index-CZWIp8ei.js → index-CO_F1Qu3.js} +1 -1
- package/src/assets/web-panel/assets/{index-CKs7M2hi.js → index-Ca_WrpLv.js} +1 -1
- package/src/assets/web-panel/assets/{index-D3XaluNc.js → index-CbVz-2sW.js} +1 -1
- package/src/assets/web-panel/assets/{index-D6B2nVTh.js → index-CiSWEzLQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-BI6qopNT.js → index-CkJ_vwPY.js} +1 -1
- package/src/assets/web-panel/assets/{index-3of1AqNk.js → index-Co41LvAQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-OoAfomZi.js → index-DFREoy8V.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bx9jDCsw.js → index-DPG-ZpDS.js} +1 -1
- package/src/assets/web-panel/assets/{index-B4Zncxxn.js → index-DTV6uuEg.js} +1 -1
- package/src/assets/web-panel/assets/{index-CR6f7W_w.js → index-DVdMu7WX.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ov5m4jW7.js → index-DXK5QEYX.js} +1 -1
- package/src/assets/web-panel/assets/index-DYZJhSD2.js +1 -0
- package/src/assets/web-panel/assets/{index-CV7WR2SO.js → index-D_OnF9Ge.js} +1 -1
- package/src/assets/web-panel/assets/{index-4Vr4kM9h.js → index-DhZHHas9.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dlc29Z4D.js → index-DilAf_75.js} +1 -1
- package/src/assets/web-panel/assets/{index-MpkucUn9.js → index-DmN9cfv0.js} +1 -1
- package/src/assets/web-panel/assets/{index-CCHs-tnT.js → index-DoR3E0kH.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cl1aGzuh.js → index-M2Kx4V8G.js} +1 -1
- package/src/assets/web-panel/assets/{index-CS3ZkiIg.js → index-XLmzFKoX.js} +1 -1
- package/src/assets/web-panel/assets/{index-CFNgAerJ.js → index-g_ZbMU32.js} +1 -1
- package/src/assets/web-panel/assets/{index-B5fMCVs_.js → index-xOjyFW4Q.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-B2v8eGiE.js → initDefaultProps-CziU9pk-.js} +1 -1
- package/src/assets/web-panel/assets/{motion-CwkWvaNW.js → motion-BOZPhyUp.js} +1 -1
- package/src/assets/web-panel/assets/{move-BYJ058wL.js → move-BwhvSRTb.js} +1 -1
- package/src/assets/web-panel/assets/{omit-B3nuYFSU.js → omit-BfU3fObW.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-0hcTSJaT.js → pickAttrs-eGMYizN6.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-D6IUlBKU.js → placementArrow-8A1qsZl_.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-FKtuDNR2.js → responsiveObserve-BU9yRWZK.js} +1 -1
- package/src/assets/web-panel/assets/{slide-B_QbBNod.js → slide-BG428wmF.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-rGTl4pd7.js → statusUtils-_TFDDXxp.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DSo1kqIn.js → styleChecker-DuM2cLhx.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-CxkZaI6s.js → useFlexGapSupport-fg8Q35CB.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-DrW3e3kn.js → useFs-3EiVX8L4.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-CVKkAaON.js → usePersonalDataHub-C8OgHGoE.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-lTUDdHso.js → vnode--NhVoccz.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-D9qIJ7kF.js → zoom-Bf0hAHy7.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/lib/image-input.js +27 -3
- package/src/repl/agent-repl.js +4 -1
- package/src/repl/config-summary.js +48 -0
- package/src/runtime/coding-agent-shell-policy.cjs +58 -18
- package/src/runtime/headless-stream.js +55 -1
- package/src/assets/web-panel/assets/EmailListRenderer-B16xNYan.js +0 -1
- package/src/assets/web-panel/assets/Notes-Ba9QC8Nt.js +0 -7
- package/src/assets/web-panel/assets/OrderTableRenderer-DwM-WxqV.js +0 -1
- package/src/assets/web-panel/assets/PdhVaultBrowser-uALWSx7o.js +0 -7
- package/src/assets/web-panel/assets/Projects-DhHbGqmv.js +0 -1
- package/src/assets/web-panel/assets/Tasks-BavjuZCf.js +0 -1
- package/src/assets/web-panel/assets/devWarning-BpZTkDGI.js +0 -1
- package/src/assets/web-panel/assets/index-CmQTcEwA.js +0 -1
- package/src/assets/web-panel/assets/index-vzAexOhR.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as o}from"./Col-CXZT4-Kf.js";import{U as t}from"./index-7ME2_dHQ.js";import"./vendor-BvqAck49.js";import"./index-Bqz7zZa7.js";import"./icons-DP3uiYxy.js";const s=t(o);export{s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as b,m as w,h as s,r as z,U as y,q as C,J as M,f}from"./index-
|
|
1
|
+
import{l as b,m as w,h as s,r as z,U as y,q as C,J as M,f}from"./index-7ME2_dHQ.js";import{d as B,b as d,c as u}from"./vendor-BvqAck49.js";import"./icons-DP3uiYxy.js";const I=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:o,colorSplit:n,lineWidth:i}=t;return{[e]:s(s({},z(t)),{borderBlockStart:`${i}px solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${t.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${t.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${t.dividerHorizontalWithTextGutterMargin}px 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${e}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${e}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:o}},[`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:o}}})}},G=b("Divider",t=>{const e=w(t,{dividerVerticalGutterMargin:t.marginXS,dividerHorizontalWithTextGutterMargin:t.margin,dividerHorizontalGutterMargin:t.marginLG});return[I(e)]},{sizePaddingEdgeHorizontal:0}),H=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),W=B({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:H(),setup(t,e){let{slots:o,attrs:n}=e;const{prefixCls:i,direction:m}=C("divider",t),[v,h]=G(i),g=d(()=>t.orientation==="left"&&t.orientationMargin!=null),c=d(()=>t.orientation==="right"&&t.orientationMargin!=null),x=d(()=>{const{type:r,dashed:l,plain:S}=t,a=i.value;return{[a]:!0,[h.value]:!!h.value,[`${a}-${r}`]:!0,[`${a}-dashed`]:!!l,[`${a}-plain`]:!!S,[`${a}-rtl`]:m.value==="rtl",[`${a}-no-default-orientation-margin-left`]:g.value,[`${a}-no-default-orientation-margin-right`]:c.value}}),$=d(()=>{const r=typeof t.orientationMargin=="number"?`${t.orientationMargin}px`:t.orientationMargin;return s(s({},g.value&&{marginLeft:r}),c.value&&{marginRight:r})}),p=d(()=>t.orientation.length>0?"-"+t.orientation:t.orientation);return()=>{var r;const l=M((r=o.default)===null||r===void 0?void 0:r.call(o));return v(u("div",f(f({},n),{},{class:[x.value,l.length?`${i.value}-with-text ${i.value}-with-text${p.value}`:"",n.class],role:"separator"}),[l.length?u("span",{class:`${i.value}-inner-text`,style:$.value},[l]):null]))}}}),A=y(W);export{A as default,H as dividerProps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as q,m as J,h as N,r as Q,a8 as P,t as tt,f as I,U as et,w as nt,p as ot,q as st,I as it}from"./index-BgqftzvZ.js";import{d as L,b as F,e as D,w as rt,c as C,F as O,s as y,r as lt}from"./vendor-BvqAck49.js";import at from"./index-CV7WR2SO.js";import{B as ut}from"./index-D6B2nVTh.js";import{R as ct}from"./icons-DP3uiYxy.js";import"./initDefaultProps-B2v8eGiE.js";import"./index-Cl1aGzuh.js";import"./isVisible-C7tPsqfj.js";import"./useState-BK4hy8Ma.js";import"./raf-Deuc0E8-.js";import"./devWarning-BpZTkDGI.js";import"./compact-item-DWfrBoYH.js";import"./createContext-DTQOT4YN.js";import"./Compact-CXmuCEc2.js";import"./_getTag-DnrRH4E6.js";const ht=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},dt=q("QRCode",r=>ht(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var R;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,w=l.getTotalBits(t,a);if(w<=m){g=w;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const d=[];for(const m of t){u(m.mode.modeBits,4,d),u(m.numChars,m.mode.numCharCountBits(a),d);for(const w of m.getData())d.push(w)}h(d.length==g);const p=s.getNumDataCodewords(a,n)*8;h(d.length<=p),u(0,Math.min(4,p-d.length),d),u(0,(8-d.length%8)%8,d),h(d.length%8==0);for(let m=236;d.length<p;m^=253)u(m,8,d);const M=[];for(;M.length*8<d.length;)M.push(0);return d.forEach((m,w)=>M[w>>>3]|=m<<7-(w&7)),new s(a,n,M,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const d=this.getPenaltyScore();d<a&&(o=g,a=d),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,f(o,i));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,f(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,f(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,f(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=f(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),d=[],p=s.reedSolomonComputeDivisor(i);for(let m=0,w=0;m<o;m++){const v=t.slice(w,w+g-i+(m<a?0:1));w+=v.length;const A=s.reedSolomonComputeRemainder(v,p);m<a&&v.push(0),d.push(v.concat(A))}const M=[];for(let m=0;m<d[0].length;m++)d.forEach((w,v)=>{(m!=g-i||v>=a)&&M.push(w[m])});return h(M.length==c),M}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=f(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][d],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[d][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function f(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(R||(R={}));const U={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,gt=4,mt=0,Et=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(f,h){let l=null;f.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===f.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,f)=>f<s.y||f>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,f){if(f==null)return null;const h=r.length+u*2,l=Math.floor(s*Et),E=h/s,t=(f.width||l)*E,n=(f.height||l)*E,e=f.x==null?r.length/2-t/2:f.x*E,o=f.y==null?r.length/2-n/2:f.y*E;let i=null;if(f.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),d=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:d}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?gt:mt}const wt=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:f}=s;const h=F(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return f({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),D(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:d}=r;if(l.value!=null){const p=l.value,M=p.getContext("2d");if(!M)return;let m=R.QrCode.encodeText(n,U[o]).getModules();const w=_(a,g),v=m.length+w*2,A=X(m,e,w,d),b=E.value,x=t.value&&A!=null&&b!==null&&b.complete&&b.naturalHeight!==0&&b.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;p.height=p.width=e*B;const T=e/v*B;M.scale(T,T),M.fillStyle=i,M.fillRect(0,0,v,v),M.fillStyle=c,wt?M.fill(new Path2D(Y(m,w))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&M.fillRect(Z+w,j+w,1,1)})}),x&&M.drawImage(b,A.x+w,A.y+w,A.w,A.h)}},{flush:"post"}),rt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(O,null,[C("canvas",I(I({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),Ct=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,f=null,h=null,l=null,E=null;return D(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=R.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),f=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${f} ${f}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${f}v${f}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Rt=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:f,expose:h}=s;nt(!(r.icon&&r.errorLevel==="L"),"QRCode","ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.");const[l]=ot("QRCode"),{prefixCls:E}=st("qrcode",r),[t,n]=dt(E),[,e]=it(),o=lt();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=F(()=>{const{value:c,icon:a="",size:g=160,iconSize:d=40,color:p=e.value.colorText,bgColor:M="transparent",errorLevel:m="M"}=r,w={src:a,x:void 0,y:void 0,height:d,width:d,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:M,fgColor:p,imageSettings:a?w:void 0}});return()=>{const c=E.value;return t(C("div",I(I({},f),{},{style:[f.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(at,null,null),r.status==="expired"&&C(O,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(ut,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ct,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,I({ref:o},i.value),null):C(Ct,i.value,null)]))}}}),Dt=et(Rt);export{Dt as default};
|
|
1
|
+
import{l as q,m as J,h as N,r as Q,a8 as P,t as tt,f as I,U as et,w as nt,p as ot,q as st,I as it}from"./index-7ME2_dHQ.js";import{d as L,b as F,e as D,w as rt,c as C,F as O,s as y,r as lt}from"./vendor-BvqAck49.js";import at from"./index-D_OnF9Ge.js";import{B as ut}from"./index-CiSWEzLQ.js";import{R as ct}from"./icons-DP3uiYxy.js";import"./initDefaultProps-CziU9pk-.js";import"./index-M2Kx4V8G.js";import"./isVisible-C7tPsqfj.js";import"./useState-BK4hy8Ma.js";import"./raf-Deuc0E8-.js";import"./devWarning-Cx5sL2Te.js";import"./compact-item-DdUiFvWf.js";import"./createContext-CdIrP9Fp.js";import"./Compact-DLud5sT4.js";import"./_getTag-DnrRH4E6.js";const ht=r=>{const{componentCls:s}=r;return{[s]:N(N({},Q(r)),{display:"flex",justifyContent:"center",alignItems:"center",padding:r.paddingSM,backgroundColor:r.colorWhite,borderRadius:r.borderRadiusLG,border:`${r.lineWidth}px ${r.lineType} ${r.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${s}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:r.colorText,lineHeight:r.lineHeight,background:r.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${s}-expired , & > ${s}-scanned`]:{color:r.QRCodeTextColor}},"&-icon":{marginBlockEnd:r.marginXS,fontSize:r.controlHeight}}),[`${s}-borderless`]:{borderColor:"transparent"}}},dt=q("QRCode",r=>ht(J(r,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"}))),z=()=>({size:{type:Number,default:160},value:{type:String,required:!0},type:P("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:tt()}),ft=()=>N(N({},z()),{errorLevel:P("M"),icon:String,iconSize:{type:Number,default:40},status:P("active"),bordered:{type:Boolean,default:!0}});var R;(function(r){class s{static encodeText(t,n){const e=r.QrSegment.makeSegments(t);return s.encodeSegments(e,n)}static encodeBinary(t,n){const e=r.QrSegment.makeBytes(t);return s.encodeSegments([e],n)}static encodeSegments(t,n){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(s.MIN_VERSION<=e&&e<=o&&o<=s.MAX_VERSION)||i<-1||i>7)throw new RangeError("Invalid value");let a,g;for(a=e;;a++){const m=s.getNumDataCodewords(a,n)*8,w=l.getTotalBits(t,a);if(w<=m){g=w;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[s.Ecc.MEDIUM,s.Ecc.QUARTILE,s.Ecc.HIGH])c&&g<=s.getNumDataCodewords(a,m)*8&&(n=m);const d=[];for(const m of t){u(m.mode.modeBits,4,d),u(m.numChars,m.mode.numCharCountBits(a),d);for(const w of m.getData())d.push(w)}h(d.length==g);const p=s.getNumDataCodewords(a,n)*8;h(d.length<=p),u(0,Math.min(4,p-d.length),d),u(0,(8-d.length%8)%8,d),h(d.length%8==0);for(let m=236;d.length<p;m^=253)u(m,8,d);const M=[];for(;M.length*8<d.length;)M.push(0);return d.forEach((m,w)=>M[w>>>3]|=m<<7-(w&7)),new s(a,n,M,i)}constructor(t,n,e,o){if(this.version=t,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=[];for(let a=0;a<this.size;a++)i.push(!1);for(let a=0;a<this.size;a++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(e);if(this.drawCodewords(c),o==-1){let a=1e9;for(let g=0;g<8;g++){this.applyMask(g),this.drawFormatBits(g);const d=this.getPenaltyScore();d<a&&(o=g,a=d),this.applyMask(g)}}h(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}getModule(t,n){return 0<=t&&t<this.size&&0<=n&&n<this.size&&this.modules[n][t]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let e=0;e<n;e++)for(let o=0;o<n;o++)e==0&&o==0||e==0&&o==n-1||e==n-1&&o==0||this.drawAlignmentPattern(t[e],t[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.errorCorrectionLevel.formatBits<<3|t;let e=n;for(let i=0;i<10;i++)e=e<<1^(e>>>9)*1335;const o=(n<<10|e)^21522;h(o>>>15==0);for(let i=0;i<=5;i++)this.setFunctionModule(8,i,f(o,i));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,f(o,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,f(o,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,f(o,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let e=0;e<12;e++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;h(n>>>18==0);for(let e=0;e<18;e++){const o=f(n,e),i=this.size-11+e%3,c=Math.floor(e/3);this.setFunctionModule(i,c,o),this.setFunctionModule(c,i,o)}}drawFinderPattern(t,n){for(let e=-4;e<=4;e++)for(let o=-4;o<=4;o++){const i=Math.max(Math.abs(o),Math.abs(e)),c=t+o,a=n+e;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,a,i!=2&&i!=4)}}drawAlignmentPattern(t,n){for(let e=-2;e<=2;e++)for(let o=-2;o<=2;o++)this.setFunctionModule(t+o,n+e,Math.max(Math.abs(o),Math.abs(e))!=1)}setFunctionModule(t,n,e){this.modules[n][t]=e,this.isFunction[n][t]=!0}addEccAndInterleave(t){const n=this.version,e=this.errorCorrectionLevel;if(t.length!=s.getNumDataCodewords(n,e))throw new RangeError("Invalid argument");const o=s.NUM_ERROR_CORRECTION_BLOCKS[e.ordinal][n],i=s.ECC_CODEWORDS_PER_BLOCK[e.ordinal][n],c=Math.floor(s.getNumRawDataModules(n)/8),a=o-c%o,g=Math.floor(c/o),d=[],p=s.reedSolomonComputeDivisor(i);for(let m=0,w=0;m<o;m++){const v=t.slice(w,w+g-i+(m<a?0:1));w+=v.length;const A=s.reedSolomonComputeRemainder(v,p);m<a&&v.push(0),d.push(v.concat(A))}const M=[];for(let m=0;m<d[0].length;m++)d.forEach((w,v)=>{(m!=g-i||v>=a)&&M.push(w[m])});return h(M.length==c),M}drawCodewords(t){if(t.length!=Math.floor(s.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const c=e-i,g=(e+1&2)==0?this.size-1-o:o;!this.isFunction[g][c]&&n<t.length*8&&(this.modules[g][c]=f(t[n>>>3],7-(n&7)),n++)}}h(n==t.length*8)}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let e=0;e<this.size;e++){let o;switch(t){case 0:o=(e+n)%2==0;break;case 1:o=n%2==0;break;case 2:o=e%3==0;break;case 3:o=(e+n)%3==0;break;case 4:o=(Math.floor(e/3)+Math.floor(n/2))%2==0;break;case 5:o=e*n%2+e*n%3==0;break;case 6:o=(e*n%2+e*n%3)%2==0;break;case 7:o=((e+n)%2+e*n%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[n][e]&&o&&(this.modules[n][e]=!this.modules[n][e])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[i][d]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[i][d],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size;i++){let c=!1,a=0;const g=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][i]==c?(a++,a==5?t+=s.PENALTY_N1:a>5&&t++):(this.finderPenaltyAddHistory(a,g),c||(t+=this.finderPenaltyCountPatterns(g)*s.PENALTY_N3),c=this.modules[d][i],a=1);t+=this.finderPenaltyTerminateAndCount(c,a,g)*s.PENALTY_N3}for(let i=0;i<this.size-1;i++)for(let c=0;c<this.size-1;c++){const a=this.modules[i][c];a==this.modules[i][c+1]&&a==this.modules[i+1][c]&&a==this.modules[i+1][c+1]&&(t+=s.PENALTY_N2)}let n=0;for(const i of this.modules)n=i.reduce((c,a)=>c+(a?1:0),n);const e=this.size*this.size,o=Math.ceil(Math.abs(n*20-e*10)/e)-1;return h(0<=o&&o<=9),t+=o*s.PENALTY_N4,h(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{const t=Math.floor(this.version/7)+2,n=this.version==32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,e=[6];for(let o=this.size-7;e.length<t;o-=n)e.splice(1,0,o);return e}}static getNumRawDataModules(t){if(t<s.MIN_VERSION||t>s.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*t+128)*t+64;if(t>=2){const e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return h(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(s.getNumRawDataModules(t)/8)-s.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*s.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw new RangeError("Degree out of range");const n=[];for(let o=0;o<t-1;o++)n.push(0);n.push(1);let e=1;for(let o=0;o<t;o++){for(let i=0;i<n.length;i++)n[i]=s.reedSolomonMultiply(n[i],e),i+1<n.length&&(n[i]^=n[i+1]);e=s.reedSolomonMultiply(e,2)}return n}static reedSolomonComputeRemainder(t,n){const e=n.map(o=>0);for(const o of t){const i=o^e.shift();e.push(0),n.forEach((c,a)=>e[a]^=s.reedSolomonMultiply(c,i))}return e}static reedSolomonMultiply(t,n){if(t>>>8||n>>>8)throw new RangeError("Byte out of range");let e=0;for(let o=7;o>=0;o--)e=e<<1^(e>>>7)*285,e^=(n>>>o&1)*t;return h(e>>>8==0),e}finderPenaltyCountPatterns(t){const n=t[1];h(n<=this.size*3);const e=n>0&&t[2]==n&&t[3]==n*3&&t[4]==n&&t[5]==n;return(e&&t[0]>=n*4&&t[6]>=n?1:0)+(e&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,e){return t&&(this.finderPenaltyAddHistory(n,e),n=0),n+=this.size,this.finderPenaltyAddHistory(n,e),this.finderPenaltyCountPatterns(e)}finderPenaltyAddHistory(t,n){n[0]==0&&(t+=this.size),n.pop(),n.unshift(t)}}s.MIN_VERSION=1,s.MAX_VERSION=40,s.PENALTY_N1=3,s.PENALTY_N2=3,s.PENALTY_N3=40,s.PENALTY_N4=10,s.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],s.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],r.QrCode=s;function u(E,t,n){if(t<0||t>31||E>>>t)throw new RangeError("Value out of range");for(let e=t-1;e>=0;e--)n.push(E>>>e&1)}function f(E,t){return(E>>>t&1)!=0}function h(E){if(!E)throw new Error("Assertion error")}class l{static makeBytes(t){const n=[];for(const e of t)u(e,8,n);return new l(l.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!l.isNumeric(t))throw new RangeError("String contains non-numeric characters");const n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);u(parseInt(t.substring(e,e+o),10),o*3+1,n),e+=o}return new l(l.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!l.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");const n=[];let e;for(e=0;e+2<=t.length;e+=2){let o=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e))*45;o+=l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e+1)),u(o,11,n)}return e<t.length&&u(l.ALPHANUMERIC_CHARSET.indexOf(t.charAt(e)),6,n),new l(l.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==""?[]:l.isNumeric(t)?[l.makeNumeric(t)]:l.isAlphanumeric(t)?[l.makeAlphanumeric(t)]:[l.makeBytes(l.toUtf8ByteArray(t))]}static makeEci(t){const n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)u(t,8,n);else if(t<16384)u(2,2,n),u(t,14,n);else if(t<1e6)u(6,3,n),u(t,21,n);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,n)}static isNumeric(t){return l.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return l.ALPHANUMERIC_REGEX.test(t)}constructor(t,n,e){if(this.mode=t,this.numChars=n,this.bitData=e,n<0)throw new RangeError("Invalid argument");this.bitData=e.slice()}getData(){return this.bitData.slice()}static getTotalBits(t,n){let e=0;for(const o of t){const i=o.mode.numCharCountBits(n);if(o.numChars>=1<<i)return 1/0;e+=4+i+o.bitData.length}return e}static toUtf8ByteArray(t){t=encodeURI(t);const n=[];for(let e=0;e<t.length;e++)t.charAt(e)!="%"?n.push(t.charCodeAt(e)):(n.push(parseInt(t.substring(e+1,e+3),16)),e+=2);return n}}l.NUMERIC_REGEX=/^[0-9]*$/,l.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,l.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",r.QrSegment=l})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.ordinal=h,this.formatBits=l}}u.LOW=new u(0,1),u.MEDIUM=new u(1,0),u.QUARTILE=new u(2,3),u.HIGH=new u(3,2),s.Ecc=u})(r.QrCode||(r.QrCode={}))})(R||(R={}));(function(r){(function(s){class u{constructor(h,l){this.modeBits=h,this.numBitsCharCount=l}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+7)/17)]}}u.NUMERIC=new u(1,[10,12,14]),u.ALPHANUMERIC=new u(2,[9,11,13]),u.BYTE=new u(4,[8,16,16]),u.KANJI=new u(8,[8,10,12]),u.ECI=new u(7,[0,0,0]),s.Mode=u})(r.QrSegment||(r.QrSegment={}))})(R||(R={}));const U={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH},S=128,$="L",k="#FFFFFF",H="#000000",G=!1,gt=4,mt=0,Et=.1;function Y(r){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const u=[];return r.forEach(function(f,h){let l=null;f.forEach(function(E,t){if(!E&&l!==null){u.push(`M${l+s} ${h+s}h${t-l}v1H${l+s}z`),l=null;return}if(t===f.length-1){if(!E)return;l===null?u.push(`M${t+s},${h+s} h1v1H${t+s}z`):u.push(`M${l+s},${h+s} h${t+1-l}v1H${l+s}z`);return}E&&l===null&&(l=t)})}),u.join("")}function V(r,s){return r.slice().map((u,f)=>f<s.y||f>=s.y+s.h?u:u.map((h,l)=>l<s.x||l>=s.x+s.w?h:!1))}function X(r,s,u,f){if(f==null)return null;const h=r.length+u*2,l=Math.floor(s*Et),E=h/s,t=(f.width||l)*E,n=(f.height||l)*E,e=f.x==null?r.length/2-t/2:f.x*E,o=f.y==null?r.length/2-n/2:f.y*E;let i=null;if(f.excavate){const c=Math.floor(e),a=Math.floor(o),g=Math.ceil(t+e-c),d=Math.ceil(n+o-a);i={x:c,y:a,w:g,h:d}}return{x:e,y:o,h:n,w:t,excavation:i}}function _(r,s){return s!=null?Math.floor(s):r?gt:mt}const wt=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Mt=L({name:"QRCodeCanvas",inheritAttrs:!1,props:N(N({},z()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(r,s){let{attrs:u,expose:f}=s;const h=F(()=>{var n;return(n=r.imageSettings)===null||n===void 0?void 0:n.src}),l=y(null),E=y(null),t=y(!1);return f({toDataURL:(n,e)=>{var o;return(o=l.value)===null||o===void 0?void 0:o.toDataURL(n,e)}}),D(()=>{const{value:n,size:e=S,level:o=$,bgColor:i=k,fgColor:c=H,includeMargin:a=G,marginSize:g,imageSettings:d}=r;if(l.value!=null){const p=l.value,M=p.getContext("2d");if(!M)return;let m=R.QrCode.encodeText(n,U[o]).getModules();const w=_(a,g),v=m.length+w*2,A=X(m,e,w,d),b=E.value,x=t.value&&A!=null&&b!==null&&b.complete&&b.naturalHeight!==0&&b.naturalWidth!==0;x&&A.excavation!=null&&(m=V(m,A.excavation));const B=window.devicePixelRatio||1;p.height=p.width=e*B;const T=e/v*B;M.scale(T,T),M.fillStyle=i,M.fillRect(0,0,v,v),M.fillStyle=c,wt?M.fill(new Path2D(Y(m,w))):m.forEach(function(W,j){W.forEach(function(K,Z){K&&M.fillRect(Z+w,j+w,1,1)})}),x&&M.drawImage(b,A.x+w,A.y+w,A.w,A.h)}},{flush:"post"}),rt(h,()=>{t.value=!1}),()=>{var n;const e=(n=r.size)!==null&&n!==void 0?n:S,o={height:`${e}px`,width:`${e}px`};let i=null;return h.value!=null&&(i=C("img",{src:h.value,key:h.value,style:{display:"none"},onLoad:()=>{t.value=!0},ref:E},null)),C(O,null,[C("canvas",I(I({},u),{},{style:[o,u.style],ref:l}),null),i])}}}),Ct=L({name:"QRCodeSVG",inheritAttrs:!1,props:N(N({},z()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(r){let s=null,u=null,f=null,h=null,l=null,E=null;return D(()=>{const{value:t,size:n=S,level:e=$,includeMargin:o=G,marginSize:i,imageSettings:c}=r;s=R.QrCode.encodeText(t,U[e]).getModules(),u=_(o,i),f=s.length+u*2,h=X(s,n,u,c),c!=null&&h!=null&&(h.excavation!=null&&(s=V(s,h.excavation)),E=C("image",{"xlink:href":c.src,height:h.h,width:h.w,x:h.x+u,y:h.y+u,preserveAspectRatio:"none"},null)),l=Y(s,u)}),()=>{const t=r.bgColor&&k,n=r.fgColor&&H;return C("svg",{height:r.size,width:r.size,viewBox:`0 0 ${f} ${f}`},[!!r.title&&C("title",null,[r.title]),C("path",{fill:t,d:`M0,0 h${f}v${f}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:n,d:l,"shape-rendering":"crispEdges"},null),E])}}}),Rt=L({name:"AQrcode",inheritAttrs:!1,props:ft(),emits:["refresh"],setup(r,s){let{emit:u,attrs:f,expose:h}=s;nt(!(r.icon&&r.errorLevel==="L"),"QRCode","ErrorLevel `L` is not recommended to be used with `icon`, for scanning result would be affected by low level.");const[l]=ot("QRCode"),{prefixCls:E}=st("qrcode",r),[t,n]=dt(E),[,e]=it(),o=lt();h({toDataURL:(c,a)=>{var g;return(g=o.value)===null||g===void 0?void 0:g.toDataURL(c,a)}});const i=F(()=>{const{value:c,icon:a="",size:g=160,iconSize:d=40,color:p=e.value.colorText,bgColor:M="transparent",errorLevel:m="M"}=r,w={src:a,x:void 0,y:void 0,height:d,width:d,excavate:!0};return{value:c,size:g-(e.value.paddingSM+e.value.lineWidth)*2,level:m,bgColor:M,fgColor:p,imageSettings:a?w:void 0}});return()=>{const c=E.value;return t(C("div",I(I({},f),{},{style:[f.style,{width:`${r.size}px`,height:`${r.size}px`,backgroundColor:i.value.bgColor}],class:[n.value,c,{[`${c}-borderless`]:!r.bordered}]}),[r.status!=="active"&&C("div",{class:`${c}-mask`},[r.status==="loading"&&C(at,null,null),r.status==="expired"&&C(O,null,[C("p",{class:`${c}-expired`},[l.value.expired]),C(ut,{type:"link",onClick:a=>u("refresh",a)},{default:()=>[l.value.refresh],icon:()=>C(ct,null,null)})]),r.status==="scanned"&&C("p",{class:`${c}-scanned`},[l.value.scanned])]),r.type==="canvas"?C(Mt,I({ref:o},i.value),null):C(Ct,i.value,null)]))}}}),Dt=et(Rt);export{Dt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Le,k as Re,l as Ee,m as De,r as We,n as je,o as Ve,p as le,q as _e,w as xe,s as Y,t as K,v as Ge,C as Ke,x as Xe,y as Ue,z as Qe}from"./index-
|
|
1
|
+
import{K as ye,P as h,f as $,g as be,h as i,i as U,j as Le,k as Re,l as Ee,m as De,r as We,n as je,o as Ve,p as le,q as _e,w as xe,s as Y,t as K,v as Ge,C as Ke,x as Xe,y as Ue,z as Qe}from"./index-7ME2_dHQ.js";import{d as O,b as q,c as a,a6 as $e,a3 as Se,r as X,n as ke,a4 as he,s as T,w as Z,f as Ye,e as qe,F as Ze,A as se,u as Je,j as eo}from"./vendor-BvqAck49.js";import{K as ce}from"./KeyCode-D63Tfrq7.js";import{o as we}from"./omit-BfU3fObW.js";import{p as oo}from"./pickAttrs-eGMYizN6.js";import{i as J}from"./initDefaultProps-CziU9pk-.js";import{i as no,P as to,a as lo}from"./motion-BOZPhyUp.js";import{b as ao,E as io,C as ro,a as so,I as co}from"./icons-DP3uiYxy.js";import{B as de,c as uo}from"./index-CiSWEzLQ.js";import{c as fo}from"./styleChecker-DuM2cLhx.js";import{i as mo}from"./zoom-Bf0hAHy7.js";import{A as ue}from"./ActionButton-BdKytPee.js";import{t as po}from"./vnode--NhVoccz.js";import"./raf-Deuc0E8-.js";import"./index-M2Kx4V8G.js";import"./isVisible-C7tPsqfj.js";import"./useState-BK4hy8Ma.js";import"./devWarning-Cx5sL2Te.js";import"./compact-item-DdUiFvWf.js";import"./createContext-CdIrP9Fp.js";import"./Compact-DLud5sT4.js";import"./_getTag-DnrRH4E6.js";const go=new ye("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),vo=new ye("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Co=function(e){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=e,t=`${n}-fade`,l=o?"&":"";return[no(t,go,vo,e.motionDurationMid,o),{[`
|
|
2
2
|
${l}${t}-enter,
|
|
3
3
|
${l}${t}-appear
|
|
4
4
|
`]:{opacity:0,animationTimingFunction:"linear"},[`${l}${t}-leave`]:{animationTimingFunction:"linear"}}]};function ae(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:h.shape({x:Number,y:Number}).loose,title:h.any,footer:h.any,transitionName:String,maskTransitionName:String,animation:h.any,maskAnimation:h.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:h.any,maskProps:h.any,wrapProps:h.any,getContainer:h.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:h.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function fe(e,o,n){let t=o;return!t&&n&&(t=`${e}-${n}`),t}let me=-1;function yo(){return me+=1,me}function pe(e,o){let n=e[`page${o?"Y":"X"}Offset`];const t=`scroll${o?"Top":"Left"}`;if(typeof n!="number"){const l=e.document;n=l.documentElement[t],typeof n!="number"&&(n=l.body[t])}return n}function bo(e){const o=e.getBoundingClientRect(),n={left:o.left,top:o.top},t=e.ownerDocument,l=t.defaultView||t.parentWindow;return n.left+=pe(l),n.top+=pe(l,!0),n}const xo={width:0,height:0,overflow:"hidden",outline:"none"},$o={outline:"none"},So=O({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:i(i({},ae()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(e,o){let{expose:n,slots:t,attrs:l}=o;const s=X(),p=X(),g=X();n({focus:()=>{var c;(c=s.value)===null||c===void 0||c.focus({preventScroll:!0})},changeActive:c=>{const{activeElement:r}=document;c&&r===p.value?s.value.focus({preventScroll:!0}):!c&&r===s.value&&p.value.focus({preventScroll:!0})}});const S=X(),m=q(()=>{const{width:c,height:r}=e,C={};return c!==void 0&&(C.width=typeof c=="number"?`${c}px`:c),r!==void 0&&(C.height=typeof r=="number"?`${r}px`:r),S.value&&(C.transformOrigin=S.value),C}),u=()=>{ke(()=>{if(g.value){const c=bo(g.value);S.value=e.mousePosition?`${e.mousePosition.x-c.left}px ${e.mousePosition.y-c.top}px`:""}})},d=c=>{e.onVisibleChanged(c)};return()=>{var c,r,C,y;const{prefixCls:x,footer:f=(c=t.footer)===null||c===void 0?void 0:c.call(t),title:b=(r=t.title)===null||r===void 0?void 0:r.call(t),ariaId:v,closable:w,closeIcon:B=(C=t.closeIcon)===null||C===void 0?void 0:C.call(t),onClose:F,bodyStyle:I,bodyProps:M,onMousedown:H,onMouseup:A,visible:E,modalRender:D=t.modalRender,destroyOnClose:_,motionName:N}=e;let W;f&&(W=a("div",{class:`${x}-footer`},[f]));let j;b&&(j=a("div",{class:`${x}-header`},[a("div",{class:`${x}-title`,id:v},[b])]));let L;w&&(L=a("button",{type:"button",onClick:F,"aria-label":"Close",class:`${x}-close`},[B||a("span",{class:`${x}-close-x`},null)]));const z=a("div",{class:`${x}-content`},[L,j,a("div",$({class:`${x}-body`,style:I},M),[(y=t.default)===null||y===void 0?void 0:y.call(t)]),W]),ee=be(N);return a($e,$($({},ee),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[E||!_?Se(a("div",$($({},l),{},{ref:g,key:"dialog-element",role:"document",style:[m.value,l.style],class:[x,l.class],onMousedown:H,onMouseup:A}),[a("div",{tabindex:0,ref:s,style:$o},[D?D({originVNode:z}):z]),a("div",{tabindex:0,ref:p,style:xo},null)]),[[he,E]]):null]})}}}),ho=O({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(e,o){return()=>{const{prefixCls:n,visible:t,maskProps:l,motionName:s}=e,p=be(s);return a($e,p,{default:()=>[Se(a("div",$({class:`${n}-mask`},l),null),[[he,t]])]})}}}),ge=O({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:J(i(i({},ae()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(e,o){let{attrs:n,slots:t}=o;const l=T(),s=T(),p=T(),g=T(e.visible),S=T(`vcDialogTitle${yo()}`),m=f=>{var b,v;if(f)Le(s.value,document.activeElement)||(l.value=document.activeElement,(b=p.value)===null||b===void 0||b.focus());else{const w=g.value;if(g.value=!1,e.mask&&l.value&&e.focusTriggerAfterClose){try{l.value.focus({preventScroll:!0})}catch{}l.value=null}w&&((v=e.afterClose)===null||v===void 0||v.call(e))}},u=f=>{var b;(b=e.onClose)===null||b===void 0||b.call(e,f)},d=T(!1),c=T(),r=()=>{clearTimeout(c.value),d.value=!0},C=()=>{c.value=setTimeout(()=>{d.value=!1})},y=f=>{if(!e.maskClosable)return null;d.value?d.value=!1:s.value===f.target&&u(f)},x=f=>{if(e.keyboard&&f.keyCode===ce.ESC){f.stopPropagation(),u(f);return}e.visible&&f.keyCode===ce.TAB&&p.value.changeActive(!f.shiftKey)};return Z(()=>e.visible,()=>{e.visible&&(g.value=!0)},{flush:"post"}),Ye(()=>{var f;clearTimeout(c.value),(f=e.scrollLocker)===null||f===void 0||f.unLock()}),qe(()=>{var f,b;(f=e.scrollLocker)===null||f===void 0||f.unLock(),g.value&&((b=e.scrollLocker)===null||b===void 0||b.lock())}),()=>{const{prefixCls:f,mask:b,visible:v,maskTransitionName:w,maskAnimation:B,zIndex:F,wrapClassName:I,rootClassName:M,wrapStyle:H,closable:A,maskProps:E,maskStyle:D,transitionName:_,animation:N,wrapProps:W,title:j=t.title}=e,{style:L,class:z}=n;return a("div",$({class:[`${f}-root`,M]},oo(e,{data:!0})),[a(ho,{prefixCls:f,visible:b&&v,motionName:fe(f,w,B),style:i({zIndex:F},D),maskProps:E},null),a("div",$({tabIndex:-1,onKeydown:x,class:U(`${f}-wrap`,I),ref:s,onClick:y,role:"dialog","aria-labelledby":j?S.value:null,style:i(i({zIndex:F},H),{display:g.value?null:"none"})},W),[a(So,$($({},we(e,["scrollLocker"])),{},{style:L,class:z,onMousedown:r,onMouseup:C,ref:p,closable:A,ariaId:S.value,prefixCls:f,visible:v,onClose:u,onVisibleChanged:m,motionName:fe(f,_,N)}),t)])])}}}),wo=ae(),To=O({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:J(wo,{visible:!1}),setup(e,o){let{attrs:n,slots:t}=o;const l=X(e.visible);return Re({},{inTriggerContext:!1}),Z(()=>e.visible,()=>{e.visible&&(l.value=!0)},{flush:"post"}),()=>{const{visible:s,getContainer:p,forceRender:g,destroyOnClose:S=!1,afterClose:m}=e;let u=i(i(i({},e),n),{ref:"_component",key:"dialog"});return p===!1?a(ge,$($({},u),{},{getOpenCount:()=>2}),t):!g&&S&&!l.value?null:a(to,{autoLock:!0,visible:s,forceRender:g,getContainer:p},{default:d=>(u=i(i(i({},u),d),{afterClose:()=>{m?.(),l.value=!1}}),a(ge,u,t))})}}});function ve(e){return{position:e,top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0}}const Bo=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}${e.antCls}-zoom-enter, ${o}${e.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${o}${e.antCls}-zoom-leave ${o}-content`]:{pointerEvents:"none"},[`${o}-mask`]:i(i({},ve("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,[`${o}-hidden`]:{display:"none"}}),[`${o}-wrap`]:i(i({},ve("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${o}-root`]:Co(e)}]},Po=e=>{const{componentCls:o}=e;return[{[`${o}-root`]:{[`${o}-wrap`]:{zIndex:e.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${o}-wrap-rtl`]:{direction:"rtl"},[`${o}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[o]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax})`]:{[o]:{maxWidth:"calc(100vw - 16px)",margin:`${e.marginXS} auto`},[`${o}-centered`]:{[o]:{flex:1}}}}},{[o]:i(i({},We(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${e.margin*2}px)`,margin:"0 auto",paddingBottom:e.paddingLG,[`${o}-title`]:{margin:0,color:e.modalHeadingColor,fontWeight:e.fontWeightStrong,fontSize:e.modalHeaderTitleFontSize,lineHeight:e.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${o}-content`]:{position:"relative",backgroundColor:e.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadowSecondary,pointerEvents:"auto",padding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`},[`${o}-close`]:i({position:"absolute",top:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,insetInlineEnd:(e.modalHeaderCloseSize-e.modalCloseBtnSize)/2,zIndex:e.zIndexPopupBase+10,padding:0,color:e.modalCloseColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalConfirmIconSize,height:e.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"block",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:`${e.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:e.modalIconHoverColor,backgroundColor:e.wireframe?"transparent":e.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:e.wireframe?"transparent":e.colorFillContentHover}},je(e)),[`${o}-header`]:{color:e.colorText,background:e.modalHeaderBg,borderRadius:`${e.borderRadiusLG}px ${e.borderRadiusLG}px 0 0`,marginBottom:e.marginXS},[`${o}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word"},[`${o}-footer`]:{textAlign:"end",background:e.modalFooterBg,marginTop:e.marginSM,[`${e.antCls}-btn + ${e.antCls}-btn:not(${e.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:e.marginXS}},[`${o}-open`]:{overflow:"hidden"}})},{[`${o}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${o}-content,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as p,J as lt,f as B,a7 as it,P as ye,t as Ae,i as he,g as ht,as as Ne,V as at,am as It,a4 as St,l as Ct,m as Ve,o as je,r as xt,ab as Mt,q as wt}from"./index-BgqftzvZ.js";import{z as We,p as ge,i as de,d as J,a8 as Ge,b as m,f as Ie,w as X,c as f,g as rt,s as z,r as F,a6 as Kt,a3 as Ot,a4 as Tt,F as Ee,o as kt,e as Te,u as be,v as Pt}from"./vendor-BvqAck49.js";import{d as Se}from"./devWarning-BpZTkDGI.js";import{m as st,f as Bt,h as Et,T as Dt}from"./Trigger-den4MocY.js";import{a as At}from"./_arrayIncludes-B8uzE354.js";import{q as ke}from"./_getTag-DnrRH4E6.js";import{S as _t}from"./injectionKey-BXVc-oGP.js";import{O as fe}from"./Overflow-CidZn_Vh.js";import{c as _e}from"./vnode-lTUDdHso.js";import{T as Rt}from"./index-BgWQb3ab.js";import{K as zt}from"./KeyCode-D63Tfrq7.js";import{w as Pe}from"./raf-Deuc0E8-.js";import{T as Xe,ba as Ht}from"./icons-DP3uiYxy.js";import{g as Ft,c as Lt}from"./collapseMotion-mxzzcDsg.js";import{i as Ye}from"./slide-B_QbBNod.js";import{i as Nt}from"./zoom-D9qIJ7kF.js";import{a as Vt}from"./OverrideContext-C2r4vyBb.js";import"./motion-CwkWvaNW.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./index-Ov5m4jW7.js";import"./placementArrow-D6IUlBKU.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-CzEwsWwx.js";import"./initDefaultProps-B2v8eGiE.js";function jt(){}var Wt=1/0,Gt=ke&&1/st(new ke([,-0]))[1]==Wt?function(t){return new ke(t)}:jt,Xt=200;function Yt(t,n,e){var o=-1,l=At,u=t.length,c=!0,i=[],s=i;if(u>=Xt){var v=Gt(t);if(v)return st(v);c=!1,l=Et,s=new Bt}else s=i;e:for(;++o<u;){var d=t[o],a=d;if(d=d!==0?d:0,c&&a===a){for(var $=s.length;$--;)if(s[$]===a)continue e;i.push(d)}else l(s,a,e)||(s!==i&&s.push(a),i.push(d))}return i}function Be(t){return t&&t.length?Yt(t):[]}function qt(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],a=n[v];if(l=void 0,l===!1||l===void 0&&d!==a)return!1}return!0}function ve(t,n){return qt(We(t),We(n))}const ut=Symbol("menuContextKey"),ct=t=>{ge(ut,t)},Q=()=>de(ut),dt=Symbol("ForceRenderKey"),Ut=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"),qe=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)}}}),ze=()=>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:ye.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=rt(),c=ze(),i=typeof u.vnode.key=="symbol"?String(u.vnode.key):u.vnode.key;Se(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:a,activeKeys:$,disabled:y,changeActiveKeys:g,rtl:C,inlineCollapsed:x,siderCollapsed:k,onItemClick:K,selectedKeys:L,registerMenuInfo:U,unRegisterMenuInfo:I}=Q(),O=Zt(),R=z(!1),_=m(()=>[...d.value,i]);U(s,{eventKey:s,key:i,parentEventKeys:v,parentKeys:d,isLeaf:!0}),Ie(()=>{I(s)}),X($,()=>{R.value=!!$.value.find(h=>h===i)},{immediate:!0});const T=m(()=>y.value||t.disabled),j=m(()=>L.value.includes(i)),W=m(()=>{const h=`${a.value}-item`;return{[`${h}`]:!0,[`${h}-danger`]:t.danger,[`${h}-active`]:R.value,[`${h}-selected`]:j.value,[`${h}-disabled`]:T.value}}),Y=h=>({key:i,eventKey:s,keyPath:_.value,eventKeyPath:[...v.value,s],domEvent:h,item:p(p({},t),l)}),ae=h=>{if(T.value)return;const E=Y(h);o("click",h),K(E)},re=h=>{T.value||(g(_.value),o("mouseenter",h))},ee=h=>{T.value||(g([]),o("mouseleave",h))},te=h=>{if(o("keydown",h),h.which===zt.ENTER){const E=Y(h);o("click",h),K(E)}},se=h=>{g(_.value),o("focus",h)},N=(h,E)=>{const H=f("span",{class:`${a.value}-title-content`},[E]);return(!h||it(E)&&E.type==="span")&&E&&x.value&&O&&typeof E=="string"?f("div",{class:`${a.value}-inline-collapsed-noicon`},[E.charAt(0)]):H},me=bt(m(()=>_.value.length));return()=>{var h,E,H,Z,ne;if(c)return null;const q=(h=t.title)!==null&&h!==void 0?h:(E=e.title)===null||E===void 0?void 0:E.call(e),r=lt((H=e.default)===null||H===void 0?void 0:H.call(e)),b=r.length;let M=q;typeof q>"u"?M=O&&b?r:"":q===!1&&(M="");const P={title:M};!k.value&&!x.value&&(P.title=null,P.open=!1);const D={};t.role==="option"&&(D["aria-selected"]=j.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(Rt,B(B({},P),{},{placement:C.value?"left":"right",overlayClassName:`${a.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,[`${a.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:re,onMouseleave:ee,onClick:ae,onKeydown:te,onFocus:se,title:typeof q=="string"?q:void 0}),{default:()=>[_e(typeof w=="function"?w(t.originItemValue):w,{class:`${a.value}-item-icon`},!1),N(w,r)]})]})}}}),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"},Ue=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=z(!1),{getPopupContainer:u,rtl:c,subMenuOpenDelay:i,subMenuCloseDelay:s,builtinPlacements:v,triggerSubMenuAction:d,forceSubMenuRender:a,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=z();X(()=>t.visible,I=>{Pe.cancel(K.value),K.value=Pe(()=>{l.value=I})},{immediate:!0}),Ie(()=>{Pe.cancel(K.value)});const L=I=>{o("visibleChange",I)},U=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:V}=t;return f(Dt,{prefixCls:I,popupClassName:he(`${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:V?[]:[d.value],mouseEnterDelay:i.value,mouseLeaveDelay:s.value,onPopupVisibleChange:L,forceRender:C||a.value,popupAnimation:U.value},{popup:e.popup,default:e.default})}}}),He=(t,n)=>{let{slots:e,attrs:o}=n;var l;const{prefixCls:u,mode:c}=Q();return f("ul",B(B({},o),{},{class:he(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)])};He.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 a,$;const y=l.value||((a=c.value)===null||a===void 0?void 0:a[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 a;return s.value?null:f(Ce,{mode:o.value},{default:()=>[f(Kt,d.value,{default:()=>[Ot(f(He,{id:t.id},{default:()=>[(a=e.default)===null||a===void 0?void 0:a.call(e)]}),[[Tt,v.value]])]})]})}}});let Ze=0;const an=()=>({icon:ye.any,title:ye.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:an(),slots:Object,setup(t,n){let{slots:e,attrs:o,emit:l}=n;var u,c;ft(!1);const i=ze(),s=rt(),v=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Se(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`,a=(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=z([]),k={eventKey:a,key:d,parentEventKeys:$,childrenEventKeys:x,parentKeys:g};(c=y.childrenEventKeys)===null||c===void 0||c.value.push(a),Ie(()=>{var S;y.childrenEventKeys&&(y.childrenEventKeys.value=(S=y.childrenEventKeys)===null||S===void 0?void 0:S.value.filter(A=>A!=a))}),Jt(a,d,k);const{prefixCls:K,activeKeys:L,disabled:U,changeActiveKeys:I,mode:O,inlineCollapsed:R,openKeys:_,overflowDisabled:V,onOpenChange:T,registerMenuInfo:j,unRegisterMenuInfo:W,selectedSubMenuKeys:Y,expandIcon:ae,theme:re}=Q(),ee=v!=null,te=!i&&(mt()||!ee);Ut(te),(i&&ee||!i&&!ee||te)&&(j(a,k),Ie(()=>{W(a)}));const se=m(()=>`${K.value}-submenu`),N=m(()=>U.value||t.disabled),me=z(),h=z(),E=m(()=>_.value.includes(d)),H=m(()=>!V.value&&E.value),Z=m(()=>Y.value.includes(d)),ne=z(!1);X(L,()=>{ne.value=!!L.value.find(S=>S===d)},{immediate:!0});const q=S=>{N.value||(l("titleClick",S,d),O.value==="inline"&&T(d,!E.value))},r=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=a&&`${a}-popup`,G=m(()=>he(K.value,`${K.value}-${t.theme||re.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||ae.value,Oe=ue(at(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":H.value,"aria-haspopup":!0,"aria-controls":w,"aria-disabled":N.value,onClick:q,onFocus:D},[Oe,O.value!=="horizontal"&&Le?Le(p(p({},t),{isOpen:H.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(!V.value&&O.value!=="inline"){const Ke=O.value==="horizontal"?[0,8]:[10,0];oe=()=>f(Ue,{mode:we.value,prefixCls:A,visible:!t.internalPopupClose&&H.value,popupClassName:G.value,popupOffset:t.popupOffset||Ke,disabled:N.value,onVisibleChange:P},{default:()=>[Fe()],popup:()=>f(Ce,{mode:yt.value},{default:()=>[f(He,{id:w,ref:h},{default:e.default})]})})}else oe=()=>f(Ue,null,{default:Fe});return f(Ce,{mode:$t.value},{default:()=>[f(fe.Item,B(B({component:"li"},o),{},{role:"none",class:he(A,`${A}-${O.value}`,o.class,{[`${A}-open`]:H.value,[`${A}-active`]:ne.value,[`${A}-selected`]:Z.value,[`${A}-disabled`]:N.value}),onMouseenter:r,onMouseleave:b,"data-submenu-id":d}),{default:()=>f(Ee,null,[oe(),!V.value&&f(ln,{id:w,open:H.value,keyPath:C.value},{default:e.default})])})]})}}}),rn=()=>({title:ye.any,originItemValue:Ae()}),xe=J({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:rn(),slots:Object,setup(t,n){let{slots:e,attrs:o}=n;const{prefixCls:l}=Q(),u=m(()=>`${l.value}-item-group`),c=ze();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`},[at(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"]),a=s??`tmp-${l}`,$=e?e.parentKeys.slice():[],y=[],g={eventKey:a,key:a,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:a},d),{},{title:c,originItemValue:o}),{default:()=>[x]})}n.set(a,g),e&&e.childrenEventKeys.push(a);const C=De(i,n,{childrenEventKeys:y,parentKeys:[].concat($,a)});return f(ce,B(B({key:a},d),{},{title:c,originItemValue:o}),{default:()=>[C]})}return v==="divider"?f(Me,B({key:a},d),null):(g.isLeaf=!0,n.set(a,g),f(pe,B(B({key:a},d),{},{originItemValue:o}),{default:()=>[c]}))}return null}).filter(o=>o)}function cn(t){const n=z([]),e=z(!1),o=z(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{h as p,J as lt,f as B,a7 as it,P as ye,t as Ae,i as he,g as ht,as as Ne,V as at,am as It,a4 as St,l as Ct,m as Ve,o as je,r as xt,ab as Mt,q as wt}from"./index-7ME2_dHQ.js";import{z as We,p as ge,i as de,d as J,a8 as Ge,b as m,f as Ie,w as X,c as f,g as rt,s as z,r as F,a6 as Kt,a3 as Ot,a4 as Tt,F as Ee,o as kt,e as Te,u as be,v as Pt}from"./vendor-BvqAck49.js";import{d as Se}from"./devWarning-Cx5sL2Te.js";import{m as st,f as Bt,h as Et,T as Dt}from"./Trigger-DqBh0u8h.js";import{a as At}from"./_arrayIncludes-B8uzE354.js";import{q as ke}from"./_getTag-DnrRH4E6.js";import{S as _t}from"./injectionKey-BXVc-oGP.js";import{O as fe}from"./Overflow-DP-Gr0MB.js";import{c as _e}from"./vnode--NhVoccz.js";import{T as Rt}from"./index-6AVqepI5.js";import{K as zt}from"./KeyCode-D63Tfrq7.js";import{w as Pe}from"./raf-Deuc0E8-.js";import{T as Xe,ba as Ht}from"./icons-DP3uiYxy.js";import{g as Ft,c as Lt}from"./collapseMotion-mxzzcDsg.js";import{i as Ye}from"./slide-BG428wmF.js";import{i as Nt}from"./zoom-Bf0hAHy7.js";import{a as Vt}from"./OverrideContext-C2r4vyBb.js";import"./motion-BOZPhyUp.js";import"./isVisible-C7tPsqfj.js";import"./ResizeObserver.es-D6qJbdzf.js";import"./index-DXK5QEYX.js";import"./placementArrow-8A1qsZl_.js";import"./firstNotUndefined-CLFzEa0p.js";import"./colors-DbsZDd0h.js";import"./initDefaultProps-CziU9pk-.js";function jt(){}var Wt=1/0,Gt=ke&&1/st(new ke([,-0]))[1]==Wt?function(t){return new ke(t)}:jt,Xt=200;function Yt(t,n,e){var o=-1,l=At,u=t.length,c=!0,i=[],s=i;if(u>=Xt){var v=Gt(t);if(v)return st(v);c=!1,l=Et,s=new Bt}else s=i;e:for(;++o<u;){var d=t[o],a=d;if(d=d!==0?d:0,c&&a===a){for(var $=s.length;$--;)if(s[$]===a)continue e;i.push(d)}else l(s,a,e)||(s!==i&&s.push(a),i.push(d))}return i}function Be(t){return t&&t.length?Yt(t):[]}function qt(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],a=n[v];if(l=void 0,l===!1||l===void 0&&d!==a)return!1}return!0}function ve(t,n){return qt(We(t),We(n))}const ut=Symbol("menuContextKey"),ct=t=>{ge(ut,t)},Q=()=>de(ut),dt=Symbol("ForceRenderKey"),Ut=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"),qe=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)}}}),ze=()=>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:ye.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=rt(),c=ze(),i=typeof u.vnode.key=="symbol"?String(u.vnode.key):u.vnode.key;Se(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:a,activeKeys:$,disabled:y,changeActiveKeys:g,rtl:C,inlineCollapsed:x,siderCollapsed:k,onItemClick:K,selectedKeys:L,registerMenuInfo:U,unRegisterMenuInfo:I}=Q(),O=Zt(),R=z(!1),_=m(()=>[...d.value,i]);U(s,{eventKey:s,key:i,parentEventKeys:v,parentKeys:d,isLeaf:!0}),Ie(()=>{I(s)}),X($,()=>{R.value=!!$.value.find(h=>h===i)},{immediate:!0});const T=m(()=>y.value||t.disabled),j=m(()=>L.value.includes(i)),W=m(()=>{const h=`${a.value}-item`;return{[`${h}`]:!0,[`${h}-danger`]:t.danger,[`${h}-active`]:R.value,[`${h}-selected`]:j.value,[`${h}-disabled`]:T.value}}),Y=h=>({key:i,eventKey:s,keyPath:_.value,eventKeyPath:[...v.value,s],domEvent:h,item:p(p({},t),l)}),ae=h=>{if(T.value)return;const E=Y(h);o("click",h),K(E)},re=h=>{T.value||(g(_.value),o("mouseenter",h))},ee=h=>{T.value||(g([]),o("mouseleave",h))},te=h=>{if(o("keydown",h),h.which===zt.ENTER){const E=Y(h);o("click",h),K(E)}},se=h=>{g(_.value),o("focus",h)},N=(h,E)=>{const H=f("span",{class:`${a.value}-title-content`},[E]);return(!h||it(E)&&E.type==="span")&&E&&x.value&&O&&typeof E=="string"?f("div",{class:`${a.value}-inline-collapsed-noicon`},[E.charAt(0)]):H},me=bt(m(()=>_.value.length));return()=>{var h,E,H,Z,ne;if(c)return null;const q=(h=t.title)!==null&&h!==void 0?h:(E=e.title)===null||E===void 0?void 0:E.call(e),r=lt((H=e.default)===null||H===void 0?void 0:H.call(e)),b=r.length;let M=q;typeof q>"u"?M=O&&b?r:"":q===!1&&(M="");const P={title:M};!k.value&&!x.value&&(P.title=null,P.open=!1);const D={};t.role==="option"&&(D["aria-selected"]=j.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(Rt,B(B({},P),{},{placement:C.value?"left":"right",overlayClassName:`${a.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,[`${a.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:re,onMouseleave:ee,onClick:ae,onKeydown:te,onFocus:se,title:typeof q=="string"?q:void 0}),{default:()=>[_e(typeof w=="function"?w(t.originItemValue):w,{class:`${a.value}-item-icon`},!1),N(w,r)]})]})}}}),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"},Ue=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=z(!1),{getPopupContainer:u,rtl:c,subMenuOpenDelay:i,subMenuCloseDelay:s,builtinPlacements:v,triggerSubMenuAction:d,forceSubMenuRender:a,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=z();X(()=>t.visible,I=>{Pe.cancel(K.value),K.value=Pe(()=>{l.value=I})},{immediate:!0}),Ie(()=>{Pe.cancel(K.value)});const L=I=>{o("visibleChange",I)},U=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:V}=t;return f(Dt,{prefixCls:I,popupClassName:he(`${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:V?[]:[d.value],mouseEnterDelay:i.value,mouseLeaveDelay:s.value,onPopupVisibleChange:L,forceRender:C||a.value,popupAnimation:U.value},{popup:e.popup,default:e.default})}}}),He=(t,n)=>{let{slots:e,attrs:o}=n;var l;const{prefixCls:u,mode:c}=Q();return f("ul",B(B({},o),{},{class:he(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)])};He.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 a,$;const y=l.value||((a=c.value)===null||a===void 0?void 0:a[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 a;return s.value?null:f(Ce,{mode:o.value},{default:()=>[f(Kt,d.value,{default:()=>[Ot(f(He,{id:t.id},{default:()=>[(a=e.default)===null||a===void 0?void 0:a.call(e)]}),[[Tt,v.value]])]})]})}}});let Ze=0;const an=()=>({icon:ye.any,title:ye.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:an(),slots:Object,setup(t,n){let{slots:e,attrs:o,emit:l}=n;var u,c;ft(!1);const i=ze(),s=rt(),v=typeof s.vnode.key=="symbol"?String(s.vnode.key):s.vnode.key;Se(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`,a=(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=z([]),k={eventKey:a,key:d,parentEventKeys:$,childrenEventKeys:x,parentKeys:g};(c=y.childrenEventKeys)===null||c===void 0||c.value.push(a),Ie(()=>{var S;y.childrenEventKeys&&(y.childrenEventKeys.value=(S=y.childrenEventKeys)===null||S===void 0?void 0:S.value.filter(A=>A!=a))}),Jt(a,d,k);const{prefixCls:K,activeKeys:L,disabled:U,changeActiveKeys:I,mode:O,inlineCollapsed:R,openKeys:_,overflowDisabled:V,onOpenChange:T,registerMenuInfo:j,unRegisterMenuInfo:W,selectedSubMenuKeys:Y,expandIcon:ae,theme:re}=Q(),ee=v!=null,te=!i&&(mt()||!ee);Ut(te),(i&&ee||!i&&!ee||te)&&(j(a,k),Ie(()=>{W(a)}));const se=m(()=>`${K.value}-submenu`),N=m(()=>U.value||t.disabled),me=z(),h=z(),E=m(()=>_.value.includes(d)),H=m(()=>!V.value&&E.value),Z=m(()=>Y.value.includes(d)),ne=z(!1);X(L,()=>{ne.value=!!L.value.find(S=>S===d)},{immediate:!0});const q=S=>{N.value||(l("titleClick",S,d),O.value==="inline"&&T(d,!E.value))},r=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=a&&`${a}-popup`,G=m(()=>he(K.value,`${K.value}-${t.theme||re.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||ae.value,Oe=ue(at(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":H.value,"aria-haspopup":!0,"aria-controls":w,"aria-disabled":N.value,onClick:q,onFocus:D},[Oe,O.value!=="horizontal"&&Le?Le(p(p({},t),{isOpen:H.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(!V.value&&O.value!=="inline"){const Ke=O.value==="horizontal"?[0,8]:[10,0];oe=()=>f(Ue,{mode:we.value,prefixCls:A,visible:!t.internalPopupClose&&H.value,popupClassName:G.value,popupOffset:t.popupOffset||Ke,disabled:N.value,onVisibleChange:P},{default:()=>[Fe()],popup:()=>f(Ce,{mode:yt.value},{default:()=>[f(He,{id:w,ref:h},{default:e.default})]})})}else oe=()=>f(Ue,null,{default:Fe});return f(Ce,{mode:$t.value},{default:()=>[f(fe.Item,B(B({component:"li"},o),{},{role:"none",class:he(A,`${A}-${O.value}`,o.class,{[`${A}-open`]:H.value,[`${A}-active`]:ne.value,[`${A}-selected`]:Z.value,[`${A}-disabled`]:N.value}),onMouseenter:r,onMouseleave:b,"data-submenu-id":d}),{default:()=>f(Ee,null,[oe(),!V.value&&f(ln,{id:w,open:H.value,keyPath:C.value},{default:e.default})])})]})}}}),rn=()=>({title:ye.any,originItemValue:Ae()}),xe=J({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:rn(),slots:Object,setup(t,n){let{slots:e,attrs:o}=n;const{prefixCls:l}=Q(),u=m(()=>`${l.value}-item-group`),c=ze();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`},[at(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"]),a=s??`tmp-${l}`,$=e?e.parentKeys.slice():[],y=[],g={eventKey:a,key:a,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:a},d),{},{title:c,originItemValue:o}),{default:()=>[x]})}n.set(a,g),e&&e.childrenEventKeys.push(a);const C=De(i,n,{childrenEventKeys:y,parentKeys:[].concat($,a)});return f(ce,B(B({key:a},d),{},{title:c,originItemValue:o}),{default:()=>[C]})}return v==="divider"?f(Me,B({key:a},d),null):(g.isLeaf=!0,n.set(a,g),f(pe,B(B({key:a},d),{},{originItemValue:o}),{default:()=>[c]}))}return null}).filter(o=>o)}function cn(t){const n=z([]),e=z(!1),o=z(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({},It(t)),Qe=(t,n)=>{const{componentCls:e,colorItemText:o,colorItemTextSelected:l,colorGroupTitle:u,colorItemBg:c,colorSubItemBg:i,colorItemBgSelected:s,colorActiveBarHeight:v,colorActiveBarWidth:d,colorActiveBarBorderSize:a,motionDurationSlow:$,motionEaseInOut:y,motionEaseOut:g,menuItemPaddingInline:C,motionDurationMid:x,colorItemTextHover:k,lineType:K,colorSplit:L,colorItemTextDisabled:U,colorDangerItemText:I,colorDangerItemTextHover:O,colorDangerItemTextSelected:R,colorDangerItemBgActive:_,colorDangerItemBgSelected:V,colorItemBgHover:T,menuSubMenuBg:j,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:`${U} !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:V}},[`${e}-item, ${e}-submenu-title`]:{[`&:not(${e}-item-disabled):focus-visible`]:p({},Je(t))},[`&${e}-submenu > ${e}`]:{backgroundColor:j},[`&${e}-popup > ${e}`]:{backgroundColor:c},[`&${e}-horizontal`]:p(p({},n==="dark"?{borderBottom:0}:{}),{[`> ${e}-item, > ${e}-submenu`]:{top:a,marginTop:-a,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:`${a}px ${K} ${L}`}},[`&${e}-inline`]:{[`${e}-sub${e}-inline`]:{background:i},[`${e}-item, ${e}-submenu-title`]:a&&d?{width:`calc(100% + ${a}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{h as S,aa as gn,P as V,f as k,i as ue,a7 as Pe,J as Rt,A as bn,O as ve,au as St,r as Je,a4 as Qe,m as Se,ab as Dt,l as Sn,q as yn,L as wn,av as In,Z as Cn,a8 as Me,G as xn,$ as yt,s as $n,aw as On}from"./index-BgqftzvZ.js";import{d as fe,b as H,c as M,r as me,k as Tn,a7 as Vt,i as Be,e as Ie,o as ye,w as ne,Q as qe,F as Fe,s as X,f as De,p as ke,j as Mn,a as $e,t as En,x as Pn,z as et,n as Ee,q as Fn,a8 as ge}from"./vendor-BvqAck49.js";import{T as Rn}from"./Trigger-den4MocY.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ht}from"./vnode-lTUDdHso.js";import{B as Dn}from"./BaseInput-rEL4bCmz.js";import{p as tt}from"./pickAttrs-0hcTSJaT.js";import{O as Vn}from"./Overflow-CidZn_Vh.js";import{i as Hn}from"./isMobile--2fOlCHx.js";import{i as nt}from"./initDefaultProps-B2v8eGiE.js";import{R as Nn}from"./index-Ov5m4jW7.js";import{w as he}from"./raf-Deuc0E8-.js";import{s as be}from"./motion-CwkWvaNW.js";import{o as _e}from"./omit-B3nuYFSU.js";import{u as wt}from"./useMergedState-Cl2q1fes.js";import{u as It}from"./useState-BK4hy8Ma.js";import{C as Ln,L as Bn,aj as _n,b as An,k as zn,ah as Wn}from"./icons-DP3uiYxy.js";import{u as Kn,F as jn}from"./FormItemContext-BLCjbBnQ.js";import{a as Un,g as Gn}from"./statusUtils-rGTl4pd7.js";import{u as Yn}from"./Compact-CXmuCEc2.js";import{i as Ct}from"./move-BYJ058wL.js";import{s as Xn,a as Qn,b as qn,c as Zn,i as xt}from"./slide-B_QbBNod.js";import{g as Jn}from"./compact-item-DWfrBoYH.js";import{d as kn}from"./devWarning-BpZTkDGI.js";function $t(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Nt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function eo(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:c}=Nt(t,!1);function a(f,s){f.forEach(r=>{const m=r[l];if(s||!(c in r)){const b=r[i];n.push({key:$t(r,n.length),groupOption:s,data:r,label:m,value:b})}else{let b=m;b===void 0&&o&&(b=r.label),n.push({key:$t(r,n.length),group:!0,data:r,label:b}),a(r[c],!0)}})}return a(e,!1),n}function Ze(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return gn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function to(e,t){if(!t||!t.length)return null;let o=!1;function n(i,c){let[a,...f]=c;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,m)=>[...r,...n(m,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var no=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const oo=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},lo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:V.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:V.oneOfType([Number,Boolean]).def(!0),popupElement:V.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=H(()=>{const{dropdownMatchSelectWidth:a}=e;return oo(a)}),c=me();return l({getPopupElement:()=>c.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=no(a,["empty"]),{visible:r,dropdownAlign:m,prefixCls:b,popupElement:C,dropdownClassName:g,dropdownStyle:y,direction:w="ltr",placement:x,dropdownMatchSelectWidth:D,containerWidth:E,dropdownRender:I,animation:v,transitionName:P,getPopupContainer:O,getTriggerDOMNode:R,onPopupVisibleChange:N,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=C;I&&(W=I({menuNode:C,props:e}));const G=v?`${Y}-${v}`:P,z=S({minWidth:`${E}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${E}px`),M(Rn,k(k({},e),{},{showAction:N?["click"]:[],hideAction:N?["click"]:[],popupPlacement:x||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:m,popupVisible:r,getPopupContainer:O,popupClassName:ue(g,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:R,onPopupVisibleChange:N}),{default:o.default,popup:()=>M("div",{ref:c,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),Ce=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:c,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(c):s=Tn(i)?Vt(i):i,M("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:M("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};Ce.inheritAttrs=!1;Ce.displayName="TransBtn";Ce.props={class:String,customizeIcon:V.any,customizeIconProps:V.any,onMousedown:Function,onClick:Function};const io={inputRef:V.any,prefixCls:String,id:String,inputElement:V.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:V.oneOfType([V.number,V.string]),attrs:V.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Lt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:io,setup(e){let t=null;const o=Be("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:c,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:m,activeDescendantId:b,value:C,onKeydown:g,onMousedown:y,onChange:w,onPaste:x,onCompositionstart:D,onCompositionend:E,onFocus:I,onBlur:v,open:P,inputRef:O,attrs:R}=e;let N=c||M(Dn,null,null);const A=N.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return N=Ht(N,S(S(S(S(S({type:"search"},A),{id:i,ref:O,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=N?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),R),{value:m?C:"",readonly:!m,unselectable:m?null:"on",style:S(S({},ie),{opacity:m?null:0}),onKeydown:p=>{g(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){E(p),oe&&oe(p)},onPaste:x,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),I&&I(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,L=new Array(p),T=0;T<p;T++)L[T]=arguments[T];t=setTimeout(()=>{W&&W(L[0]),v&&v(L[0]),o?.blur(L[0])},100)}}),N.type==="textarea"?{}:{type:"search"}),!0,!0),N}}}),ao=Symbol("TreeSelectLegacyContextPropsKey");function ot(){return Be(ao,{})}const ro={id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),compositionStatus:Boolean,removeIcon:V.any,choiceTransitionName:String,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},Ot=e=>{e.preventDefault(),e.stopPropagation()},so=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:ro,setup(e){const t=X(),o=X(0),n=X(!1),l=ot(),i=H(()=>`${e.prefixCls}-selection`),c=H(()=>e.open||e.mode==="tags"?e.searchValue:""),a=H(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ie(()=>{f.value=c.value}),ye(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(g,y,w,x,D){return M("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof g=="string"||typeof g=="number"?g.toString():void 0},[M("span",{class:`${i.value}-item-content`},[y]),x&&M(Ce,{class:`${i.value}-item-remove`,onMousedown:Ot,onClick:D,customizeIcon:e.removeIcon},{default:()=>[qe("×")]})])}function r(g,y,w,x,D,E){var I;const v=O=>{Ot(O),e.onToggleOpen(!open)};let P=E;return l.keyEntities&&(P=((I=l.keyEntities[g])===null||I===void 0?void 0:I.node)||{}),M("span",{key:g,onMousedown:v},[e.tagRender({label:y,value:g,disabled:w,closable:x,onClose:D,option:P})])}function m(g){const{disabled:y,label:w,value:x,option:D}=g,E=!e.disabled&&!y;let I=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(I);P.length>e.maxTagTextLength&&(I=`${P.slice(0,e.maxTagTextLength)}...`)}const v=P=>{var O;P&&P.stopPropagation(),(O=e.onRemove)===null||O===void 0||O.call(e,g)};return typeof e.tagRender=="function"?r(x,I,y,E,v,D):s(w,I,y,E,v)}function b(g){const{maxTagPlaceholder:y=x=>`+ ${x.length} ...`}=e,w=typeof y=="function"?y(g):y;return s(w,w,!1)}const C=g=>{const y=g.target.composing;f.value=g.target.value,y||e.onInputChange(g)};return()=>{const{id:g,prefixCls:y,values:w,open:x,inputRef:D,placeholder:E,disabled:I,autofocus:v,autocomplete:P,activeDescendantId:O,tabindex:R,compositionStatus:N,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=M("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[M(Lt,{inputRef:D,open:x,prefixCls:y,id:g,inputElement:null,disabled:I,autofocus:v,autocomplete:P,editable:a.value,activeDescendantId:O,value:f.value,onKeydown:B,onMousedown:U,onChange:C,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),M("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,qe(" ")])]),z=M(Vn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:m,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return M(Fe,null,[z,!w.length&&!c.value&&!N&&M("span",{class:`${i.value}-placeholder`},[E])])}}}),uo={inputElement:V.any,id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},lt=fe({name:"SingleSelector",setup(e){const t=X(!1),o=H(()=>e.mode==="combobox"),n=H(()=>o.value||e.showSearch),l=H(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=ot();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const c=H(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=H(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=c.value?{visibility:"hidden"}:void 0;return M("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,m,b,C;const{inputElement:g,prefixCls:y,id:w,values:x,inputRef:D,disabled:E,autofocus:I,autocomplete:v,activeDescendantId:P,open:O,tabindex:R,optionLabelRender:N,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=x[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((m=i.keyEntities[oe])===null||m===void 0?void 0:m.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=N&&G?N(G.option):G?.label;return M(Fe,null,[M("span",{class:`${y}-selection-search`},[M(Lt,{inputRef:D,prefixCls:y,id:w,open:O,inputElement:g,disabled:E,autofocus:I,autocomplete:v,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0)},null)]),!o.value&&G&&!c.value&&M("span",{class:`${y}-selection-item`,title:a.value},[M(Fe,{key:(C=G.key)!==null&&C!==void 0?C:G.value},[z])]),f()])}}});lt.props=uo;lt.inheritAttrs=!1;function co(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Bt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;De(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Re(){const e=t=>{e.current=t};return e}const fo=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:V.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:V.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),disabled:{type:Boolean,default:void 0},placeholder:V.any,removeIcon:V.any,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Re(),l=me(!1),[i,c]=Bt(0),a=x=>{const{which:D}=x;(D===_.UP||D===_.DOWN)&&x.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(x),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(x.target.value),co(D)&&e.onToggleOpen(!0)},f=()=>{c(!0)};let s=null;const r=x=>{e.onSearch(x,!0,l.value)!==!1&&e.onToggleOpen(!0)},m=()=>{l.value=!0},b=x=>{l.value=!1,e.mode!=="combobox"&&r(x.target.value)},C=x=>{let{target:{value:D}}=x;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const E=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(E,s)}s=null,r(D)},g=x=>{const{clipboardData:D}=x;s=D.getData("text")},y=x=>{let{target:D}=x;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=x=>{const D=i();x.target!==n.current&&!D&&x.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:x,domRef:D,mode:E}=e,I={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:C,onInputPaste:g,compositionStatus:l.value,onInputCompositionStart:m,onInputCompositionEnd:b},v=E==="multiple"||E==="tags"?M(so,k(k({},e),I),null):M(lt,k(k({},e),I),null);return M("div",{ref:D,class:`${x}-selector`,onClick:y,onMousedown:w},[v])}}});function po(e,t,o){function n(l){var i,c,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(c=e[1])===null||c===void 0?void 0:c.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}ye(()=>{window.addEventListener("mousedown",n)}),De(()=>{window.removeEventListener("mousedown",n)})}function mo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return ye(()=>{n()}),[t,(i,c)=>{n(),o=setTimeout(()=>{t.value=i,c&&c()},e)},n]}const _t=Symbol("BaseSelectContextKey");function vo(e){return ke(_t,e)}function ho(){return Be(_t,{})}function At(e){if(!Mn(e))return $e(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return $e(t)}var go=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const bo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],So=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:V.any,emptyOptions:Boolean}),zt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:V.any,placeholder:V.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:V.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:V.any,clearIcon:V.any,removeIcon:V.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),yo=()=>S(S({},So()),zt());function it(e){return e==="tags"||e==="multiple"}const wo=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:nt(yo(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=H(()=>it(e.mode)),c=H(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);ye(()=>{a.value=Hn()});const f=ot(),s=X(null),r=Re(),m=X(null),b=X(null),C=X(null),g=me(!1),[y,w,x]=mo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var d;return(d=C.value)===null||d===void 0?void 0:d.scrollTo(u)}});const I=H(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const d=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof d=="string"||typeof d=="number"?String(d):""}),v=e.open!==void 0?e.open:e.defaultOpen,P=X(v),O=X(v),R=u=>{P.value=e.open!==void 0?e.open:u,O.value=P.value};ne(()=>e.open,()=>{R(e.open)});const N=H(()=>!e.notFoundContent&&e.emptyOptions);Ie(()=>{O.value=P.value,(e.disabled||N.value&&O.value&&e.mode==="combobox")&&(O.value=!1)});const A=H(()=>N.value?!1:O.value),B=u=>{const d=u!==void 0?u:!O.value;O.value!==d&&!e.disabled&&(R(d),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(d),!d&&K.value&&(K.value=!1,w(!1,()=>{L.value=!1,g.value=!1})))},U=H(()=>(e.tokenSeparators||[]).some(u=>[`
|
|
1
|
+
import{h as S,aa as gn,P as V,f as k,i as ue,a7 as Pe,J as Rt,A as bn,O as ve,au as St,r as Je,a4 as Qe,m as Se,ab as Dt,l as Sn,q as yn,L as wn,av as In,Z as Cn,a8 as Me,G as xn,$ as yt,s as $n,aw as On}from"./index-7ME2_dHQ.js";import{d as fe,b as H,c as M,r as me,k as Tn,a7 as Vt,i as Be,e as Ie,o as ye,w as ne,Q as qe,F as Fe,s as X,f as De,p as ke,j as Mn,a as $e,t as En,x as Pn,z as et,n as Ee,q as Fn,a8 as ge}from"./vendor-BvqAck49.js";import{T as Rn}from"./Trigger-DqBh0u8h.js";import{K as _}from"./KeyCode-D63Tfrq7.js";import{c as Ht}from"./vnode--NhVoccz.js";import{B as Dn}from"./BaseInput-BLwgjz7w.js";import{p as tt}from"./pickAttrs-eGMYizN6.js";import{O as Vn}from"./Overflow-DP-Gr0MB.js";import{i as Hn}from"./isMobile--2fOlCHx.js";import{i as nt}from"./initDefaultProps-CziU9pk-.js";import{R as Nn}from"./index-DXK5QEYX.js";import{w as he}from"./raf-Deuc0E8-.js";import{s as be}from"./motion-BOZPhyUp.js";import{o as _e}from"./omit-BfU3fObW.js";import{u as wt}from"./useMergedState-Cl2q1fes.js";import{u as It}from"./useState-BK4hy8Ma.js";import{C as Ln,L as Bn,aj as _n,b as An,k as zn,ah as Wn}from"./icons-DP3uiYxy.js";import{u as Kn,F as jn}from"./FormItemContext-CP8g135H.js";import{a as Un,g as Gn}from"./statusUtils-_TFDDXxp.js";import{u as Yn}from"./Compact-DLud5sT4.js";import{i as Ct}from"./move-BwhvSRTb.js";import{s as Xn,a as Qn,b as qn,c as Zn,i as xt}from"./slide-BG428wmF.js";import{g as Jn}from"./compact-item-DdUiFvWf.js";import{d as kn}from"./devWarning-Cx5sL2Te.js";function $t(e,t){const{key:o}=e;let n;return"value"in e&&({value:n}=e),o??(n!==void 0?n:`rc-index-key-${t}`)}function Nt(e,t){const{label:o,value:n,options:l}=e||{};return{label:o||(t?"children":"label"),value:n||"value",options:l||"options"}}function eo(e){let{fieldNames:t,childrenAsData:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=[],{label:l,value:i,options:c}=Nt(t,!1);function a(f,s){f.forEach(r=>{const m=r[l];if(s||!(c in r)){const b=r[i];n.push({key:$t(r,n.length),groupOption:s,data:r,label:m,value:b})}else{let b=m;b===void 0&&o&&(b=r.label),n.push({key:$t(r,n.length),group:!0,data:r,label:b}),a(r[c],!0)}})}return a(e,!1),n}function Ze(e){const t=S({},e);return"props"in t||Object.defineProperty(t,"props",{get(){return gn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}function to(e,t){if(!t||!t.length)return null;let o=!1;function n(i,c){let[a,...f]=c;if(!a)return[i];const s=i.split(a);return o=o||s.length>1,s.reduce((r,m)=>[...r,...n(m,f)],[]).filter(r=>r)}const l=n(e,t);return o?l:null}var no=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const oo=e=>{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1}}}},lo=fe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:V.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:V.oneOfType([Number,Boolean]).def(!0),popupElement:V.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(e,t){let{slots:o,attrs:n,expose:l}=t;const i=H(()=>{const{dropdownMatchSelectWidth:a}=e;return oo(a)}),c=me();return l({getPopupElement:()=>c.value}),()=>{const a=S(S({},e),n),{empty:f=!1}=a,s=no(a,["empty"]),{visible:r,dropdownAlign:m,prefixCls:b,popupElement:C,dropdownClassName:g,dropdownStyle:y,direction:w="ltr",placement:x,dropdownMatchSelectWidth:D,containerWidth:E,dropdownRender:I,animation:v,transitionName:P,getPopupContainer:O,getTriggerDOMNode:R,onPopupVisibleChange:N,onPopupMouseEnter:A,onPopupFocusin:B,onPopupFocusout:U}=s,Y=`${b}-dropdown`;let W=C;I&&(W=I({menuNode:C,props:e}));const G=v?`${Y}-${v}`:P,z=S({minWidth:`${E}px`},y);return typeof D=="number"?z.width=`${D}px`:D&&(z.width=`${E}px`),M(Rn,k(k({},e),{},{showAction:N?["click"]:[],hideAction:N?["click"]:[],popupPlacement:x||(w==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:i.value,prefixCls:Y,popupTransitionName:G,popupAlign:m,popupVisible:r,getPopupContainer:O,popupClassName:ue(g,{[`${Y}-empty`]:f}),popupStyle:z,getTriggerDOMNode:R,onPopupVisibleChange:N}),{default:o.default,popup:()=>M("div",{ref:c,onMouseenter:A,onFocusin:B,onFocusout:U},[W])})}}}),Ce=(e,t)=>{let{slots:o}=t;var n;const{class:l,customizeIcon:i,customizeIconProps:c,onMousedown:a,onClick:f}=e;let s;return typeof i=="function"?s=i(c):s=Tn(i)?Vt(i):i,M("span",{class:l,onMousedown:r=>{r.preventDefault(),a&&a(r)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:f,"aria-hidden":!0},[s!==void 0?s:M("span",{class:l.split(/\s+/).map(r=>`${r}-icon`)},[(n=o.default)===null||n===void 0?void 0:n.call(o)])])};Ce.inheritAttrs=!1;Ce.displayName="TransBtn";Ce.props={class:String,customizeIcon:V.any,customizeIconProps:V.any,onMousedown:Function,onClick:Function};const io={inputRef:V.any,prefixCls:String,id:String,inputElement:V.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:V.oneOfType([V.number,V.string]),attrs:V.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},Lt=fe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:io,setup(e){let t=null;const o=Be("VCSelectContainerEvent");return()=>{var n;const{prefixCls:l,id:i,inputElement:c,disabled:a,tabindex:f,autofocus:s,autocomplete:r,editable:m,activeDescendantId:b,value:C,onKeydown:g,onMousedown:y,onChange:w,onPaste:x,onCompositionstart:D,onCompositionend:E,onFocus:I,onBlur:v,open:P,inputRef:O,attrs:R}=e;let N=c||M(Dn,null,null);const A=N.props||{},{onKeydown:B,onInput:U,onFocus:Y,onBlur:W,onMousedown:G,onCompositionstart:z,onCompositionend:oe,style:ie}=A;return N=Ht(N,S(S(S(S(S({type:"search"},A),{id:i,ref:O,disabled:a,tabindex:f,lazy:!1,autocomplete:r||"off",autofocus:s,class:ue(`${l}-selection-search-input`,(n=N?.props)===null||n===void 0?void 0:n.class),role:"combobox","aria-expanded":P,"aria-haspopup":"listbox","aria-owns":`${i}_list`,"aria-autocomplete":"list","aria-controls":`${i}_list`,"aria-activedescendant":b}),R),{value:m?C:"",readonly:!m,unselectable:m?null:"on",style:S(S({},ie),{opacity:m?null:0}),onKeydown:p=>{g(p),B&&B(p)},onMousedown:p=>{y(p),G&&G(p)},onInput:p=>{w(p),U&&U(p)},onCompositionstart(p){D(p),z&&z(p)},onCompositionend(p){E(p),oe&&oe(p)},onPaste:x,onFocus:function(){clearTimeout(t),Y&&Y(arguments.length<=0?void 0:arguments[0]),I&&I(arguments.length<=0?void 0:arguments[0]),o?.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var p=arguments.length,L=new Array(p),T=0;T<p;T++)L[T]=arguments[T];t=setTimeout(()=>{W&&W(L[0]),v&&v(L[0]),o?.blur(L[0])},100)}}),N.type==="textarea"?{}:{type:"search"}),!0,!0),N}}}),ao=Symbol("TreeSelectLegacyContextPropsKey");function ot(){return Be(ao,{})}const ro={id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),compositionStatus:Boolean,removeIcon:V.any,choiceTransitionName:String,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any.def(()=>e=>`+ ${e.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},Ot=e=>{e.preventDefault(),e.stopPropagation()},so=fe({name:"MultipleSelectSelector",inheritAttrs:!1,props:ro,setup(e){const t=X(),o=X(0),n=X(!1),l=ot(),i=H(()=>`${e.prefixCls}-selection`),c=H(()=>e.open||e.mode==="tags"?e.searchValue:""),a=H(()=>e.mode==="tags"||e.showSearch&&(e.open||n.value)),f=me("");Ie(()=>{f.value=c.value}),ye(()=>{ne(f,()=>{o.value=t.value.scrollWidth},{flush:"post",immediate:!0})});function s(g,y,w,x,D){return M("span",{class:ue(`${i.value}-item`,{[`${i.value}-item-disabled`]:w}),title:typeof g=="string"||typeof g=="number"?g.toString():void 0},[M("span",{class:`${i.value}-item-content`},[y]),x&&M(Ce,{class:`${i.value}-item-remove`,onMousedown:Ot,onClick:D,customizeIcon:e.removeIcon},{default:()=>[qe("×")]})])}function r(g,y,w,x,D,E){var I;const v=O=>{Ot(O),e.onToggleOpen(!open)};let P=E;return l.keyEntities&&(P=((I=l.keyEntities[g])===null||I===void 0?void 0:I.node)||{}),M("span",{key:g,onMousedown:v},[e.tagRender({label:y,value:g,disabled:w,closable:x,onClose:D,option:P})])}function m(g){const{disabled:y,label:w,value:x,option:D}=g,E=!e.disabled&&!y;let I=w;if(typeof e.maxTagTextLength=="number"&&(typeof w=="string"||typeof w=="number")){const P=String(I);P.length>e.maxTagTextLength&&(I=`${P.slice(0,e.maxTagTextLength)}...`)}const v=P=>{var O;P&&P.stopPropagation(),(O=e.onRemove)===null||O===void 0||O.call(e,g)};return typeof e.tagRender=="function"?r(x,I,y,E,v,D):s(w,I,y,E,v)}function b(g){const{maxTagPlaceholder:y=x=>`+ ${x.length} ...`}=e,w=typeof y=="function"?y(g):y;return s(w,w,!1)}const C=g=>{const y=g.target.composing;f.value=g.target.value,y||e.onInputChange(g)};return()=>{const{id:g,prefixCls:y,values:w,open:x,inputRef:D,placeholder:E,disabled:I,autofocus:v,autocomplete:P,activeDescendantId:O,tabindex:R,compositionStatus:N,onInputPaste:A,onInputKeyDown:B,onInputMouseDown:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=M("div",{class:`${i.value}-search`,style:{width:o.value+"px"},key:"input"},[M(Lt,{inputRef:D,open:x,prefixCls:y,id:g,inputElement:null,disabled:I,autofocus:v,autocomplete:P,editable:a.value,activeDescendantId:O,value:f.value,onKeydown:B,onMousedown:U,onChange:C,onPaste:A,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0),onFocus:()=>n.value=!0,onBlur:()=>n.value=!1},null),M("span",{ref:t,class:`${i.value}-search-mirror`,"aria-hidden":!0},[f.value,qe(" ")])]),z=M(Vn,{prefixCls:`${i.value}-overflow`,data:w,renderItem:m,renderRest:b,suffix:G,itemKey:"key",maxCount:e.maxTagCount,key:"overflow"},null);return M(Fe,null,[z,!w.length&&!c.value&&!N&&M("span",{class:`${i.value}-placeholder`},[E])])}}}),uo={inputElement:V.any,id:String,prefixCls:String,values:V.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:V.any,placeholder:V.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},lt=fe({name:"SingleSelector",setup(e){const t=X(!1),o=H(()=>e.mode==="combobox"),n=H(()=>o.value||e.showSearch),l=H(()=>{let r=e.searchValue||"";return o.value&&e.activeValue&&!t.value&&(r=e.activeValue),r}),i=ot();ne([o,()=>e.activeValue],()=>{o.value&&(t.value=!1)},{immediate:!0});const c=H(()=>e.mode!=="combobox"&&!e.open&&!e.showSearch?!1:!!l.value||e.compositionStatus),a=H(()=>{const r=e.values[0];return r&&(typeof r.label=="string"||typeof r.label=="number")?r.label.toString():void 0}),f=()=>{if(e.values[0])return null;const r=c.value?{visibility:"hidden"}:void 0;return M("span",{class:`${e.prefixCls}-selection-placeholder`,style:r},[e.placeholder])},s=r=>{r.target.composing||(t.value=!0,e.onInputChange(r))};return()=>{var r,m,b,C;const{inputElement:g,prefixCls:y,id:w,values:x,inputRef:D,disabled:E,autofocus:I,autocomplete:v,activeDescendantId:P,open:O,tabindex:R,optionLabelRender:N,onInputKeyDown:A,onInputMouseDown:B,onInputPaste:U,onInputCompositionStart:Y,onInputCompositionEnd:W}=e,G=x[0];let z=null;if(G&&i.customSlots){const oe=(r=G.key)!==null&&r!==void 0?r:G.value,ie=((m=i.keyEntities[oe])===null||m===void 0?void 0:m.node)||{};z=i.customSlots[(b=ie.slots)===null||b===void 0?void 0:b.title]||i.customSlots.title||G.label,typeof z=="function"&&(z=z(ie))}else z=N&&G?N(G.option):G?.label;return M(Fe,null,[M("span",{class:`${y}-selection-search`},[M(Lt,{inputRef:D,prefixCls:y,id:w,open:O,inputElement:g,disabled:E,autofocus:I,autocomplete:v,editable:n.value,activeDescendantId:P,value:l.value,onKeydown:A,onMousedown:B,onChange:s,onPaste:U,onCompositionstart:Y,onCompositionend:W,tabindex:R,attrs:tt(e,!0)},null)]),!o.value&&G&&!c.value&&M("span",{class:`${y}-selection-item`,title:a.value},[M(Fe,{key:(C=G.key)!==null&&C!==void 0?C:G.value},[z])]),f()])}}});lt.props=uo;lt.inheritAttrs=!1;function co(e){return![_.ESC,_.SHIFT,_.BACKSPACE,_.TAB,_.WIN_KEY,_.ALT,_.META,_.WIN_KEY_RIGHT,_.CTRL,_.SEMICOLON,_.EQUALS,_.CAPS_LOCK,_.CONTEXT_MENU,_.F1,_.F2,_.F3,_.F4,_.F5,_.F6,_.F7,_.F8,_.F9,_.F10,_.F11,_.F12].includes(e)}function Bt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=null,o;De(()=>{clearTimeout(o)});function n(l){(l||t===null)&&(t=l),clearTimeout(o),o=setTimeout(()=>{t=null},e)}return[()=>t,n]}function Re(){const e=t=>{e.current=t};return e}const fo=fe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:V.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:V.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:V.oneOfType([V.number,V.string]),disabled:{type:Boolean,default:void 0},placeholder:V.any,removeIcon:V.any,maxTagCount:V.oneOfType([V.number,V.string]),maxTagTextLength:Number,maxTagPlaceholder:V.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(e,t){let{expose:o}=t;const n=Re(),l=me(!1),[i,c]=Bt(0),a=x=>{const{which:D}=x;(D===_.UP||D===_.DOWN)&&x.preventDefault(),e.onInputKeyDown&&e.onInputKeyDown(x),D===_.ENTER&&e.mode==="tags"&&!l.value&&!e.open&&e.onSearchSubmit(x.target.value),co(D)&&e.onToggleOpen(!0)},f=()=>{c(!0)};let s=null;const r=x=>{e.onSearch(x,!0,l.value)!==!1&&e.onToggleOpen(!0)},m=()=>{l.value=!0},b=x=>{l.value=!1,e.mode!=="combobox"&&r(x.target.value)},C=x=>{let{target:{value:D}}=x;if(e.tokenWithEnter&&s&&/[\r\n]/.test(s)){const E=s.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");D=D.replace(E,s)}s=null,r(D)},g=x=>{const{clipboardData:D}=x;s=D.getData("text")},y=x=>{let{target:D}=x;D!==n.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{n.current.focus()}):n.current.focus())},w=x=>{const D=i();x.target!==n.current&&!D&&x.preventDefault(),(e.mode!=="combobox"&&(!e.showSearch||!D)||!e.open)&&(e.open&&e.onSearch("",!0,!1),e.onToggleOpen())};return o({focus:()=>{n.current.focus()},blur:()=>{n.current.blur()}}),()=>{const{prefixCls:x,domRef:D,mode:E}=e,I={inputRef:n,onInputKeyDown:a,onInputMouseDown:f,onInputChange:C,onInputPaste:g,compositionStatus:l.value,onInputCompositionStart:m,onInputCompositionEnd:b},v=E==="multiple"||E==="tags"?M(so,k(k({},e),I),null):M(lt,k(k({},e),I),null);return M("div",{ref:D,class:`${x}-selector`,onClick:y,onMousedown:w},[v])}}});function po(e,t,o){function n(l){var i,c,a;let f=l.target;f.shadowRoot&&l.composed&&(f=l.composedPath()[0]||f);const s=[(i=e[0])===null||i===void 0?void 0:i.value,(a=(c=e[1])===null||c===void 0?void 0:c.value)===null||a===void 0?void 0:a.getPopupElement()];t.value&&s.every(r=>r&&!r.contains(f)&&r!==f)&&o(!1)}ye(()=>{window.addEventListener("mousedown",n)}),De(()=>{window.removeEventListener("mousedown",n)})}function mo(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const t=X(!1);let o;const n=()=>{clearTimeout(o)};return ye(()=>{n()}),[t,(i,c)=>{n(),o=setTimeout(()=>{t.value=i,c&&c()},e)},n]}const _t=Symbol("BaseSelectContextKey");function vo(e){return ke(_t,e)}function ho(){return Be(_t,{})}function At(e){if(!Mn(e))return $e(e);const t=new Proxy({},{get(o,n,l){return Reflect.get(e.value,n,l)},set(o,n,l){return e.value[n]=l,!0},deleteProperty(o,n){return Reflect.deleteProperty(e.value,n)},has(o,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return $e(t)}var go=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const bo=["value","onChange","removeIcon","placeholder","autofocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabindex","OptionList","notFoundContent"],So=()=>({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:V.any,emptyOptions:Boolean}),zt=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:V.any,placeholder:V.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:V.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:V.any,clearIcon:V.any,removeIcon:V.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),yo=()=>S(S({},So()),zt());function it(e){return e==="tags"||e==="multiple"}const wo=fe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:nt(yo(),{showAction:[],notFoundContent:"Not Found"}),setup(e,t){let{attrs:o,expose:n,slots:l}=t;const i=H(()=>it(e.mode)),c=H(()=>e.showSearch!==void 0?e.showSearch:i.value||e.mode==="combobox"),a=X(!1);ye(()=>{a.value=Hn()});const f=ot(),s=X(null),r=Re(),m=X(null),b=X(null),C=X(null),g=me(!1),[y,w,x]=mo();n({focus:()=>{var u;(u=b.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=b.value)===null||u===void 0||u.blur()},scrollTo:u=>{var d;return(d=C.value)===null||d===void 0?void 0:d.scrollTo(u)}});const I=H(()=>{var u;if(e.mode!=="combobox")return e.searchValue;const d=(u=e.displayValues[0])===null||u===void 0?void 0:u.value;return typeof d=="string"||typeof d=="number"?String(d):""}),v=e.open!==void 0?e.open:e.defaultOpen,P=X(v),O=X(v),R=u=>{P.value=e.open!==void 0?e.open:u,O.value=P.value};ne(()=>e.open,()=>{R(e.open)});const N=H(()=>!e.notFoundContent&&e.emptyOptions);Ie(()=>{O.value=P.value,(e.disabled||N.value&&O.value&&e.mode==="combobox")&&(O.value=!1)});const A=H(()=>N.value?!1:O.value),B=u=>{const d=u!==void 0?u:!O.value;O.value!==d&&!e.disabled&&(R(d),e.onDropdownVisibleChange&&e.onDropdownVisibleChange(d),!d&&K.value&&(K.value=!1,w(!1,()=>{L.value=!1,g.value=!1})))},U=H(()=>(e.tokenSeparators||[]).some(u=>[`
|
|
2
2
|
`,`\r
|
|
3
3
|
`].includes(u))),Y=(u,d,F)=>{var $,j;let q=!0,Z=u;($=e.onActiveValueChange)===null||$===void 0||$.call(e,null);const J=F?null:to(u,e.tokenSeparators);return e.mode!=="combobox"&&J&&(Z="",(j=e.onSearchSplit)===null||j===void 0||j.call(e,J),B(!1),q=!1),e.onSearch&&I.value!==Z&&e.onSearch(Z,{source:d?"typing":"effect"}),q},W=u=>{var d;!u||!u.trim()||(d=e.onSearch)===null||d===void 0||d.call(e,u,{source:"submit"})};ne(O,()=>{!O.value&&!i.value&&e.mode!=="combobox"&&Y("",!1,!1)},{immediate:!0,flush:"post"}),ne(()=>e.disabled,()=>{P.value&&e.disabled&&R(!1),e.disabled&&!g.value&&w(!1)},{immediate:!0});const[G,z]=Bt(),oe=function(u){var d;const F=G(),{which:$}=u;if($===_.ENTER&&(e.mode!=="combobox"&&u.preventDefault(),O.value||B(!0)),z(!!I.value),$===_.BACKSPACE&&!F&&i.value&&!I.value&&e.displayValues.length){const J=[...e.displayValues];let Q=null;for(let le=J.length-1;le>=0;le-=1){const ae=J[le];if(!ae.disabled){J.splice(le,1),Q=ae;break}}Q&&e.onDisplayValuesChange(J,{type:"remove",values:[Q]})}for(var j=arguments.length,q=new Array(j>1?j-1:0),Z=1;Z<j;Z++)q[Z-1]=arguments[Z];O.value&&C.value&&C.value.onKeydown(u,...q),(d=e.onKeydown)===null||d===void 0||d.call(e,u,...q)},ie=function(u){for(var d=arguments.length,F=new Array(d>1?d-1:0),$=1;$<d;$++)F[$-1]=arguments[$];O.value&&C.value&&C.value.onKeyup(u,...F),e.onKeyup&&e.onKeyup(u,...F)},p=u=>{const d=e.displayValues.filter(F=>F!==u);e.onDisplayValuesChange(d,{type:"remove",values:[u]})},L=X(!1),T=function(){w(!0),e.disabled||(e.onFocus&&!L.value&&e.onFocus(...arguments),e.showAction&&e.showAction.includes("focus")&&B(!0)),L.value=!0},K=me(!1),te=function(){if(K.value||(g.value=!0,w(!1,()=>{L.value=!1,g.value=!1,B(!1)}),e.disabled))return;const u=I.value;u&&(e.mode==="tags"?e.onSearch(u,{source:"submit"}):e.mode==="multiple"&&e.onSearch("",{source:"blur"})),e.onBlur&&e.onBlur(...arguments)},re=()=>{K.value=!0},se=()=>{K.value=!1};ke("VCSelectContainerEvent",{focus:T,blur:te});const ee=[];ye(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)}),De(()=>{ee.forEach(u=>clearTimeout(u)),ee.splice(0,ee.length)});const ce=function(u){var d,F;const{target:$}=u,j=(d=m.value)===null||d===void 0?void 0:d.getPopupElement();if(j&&j.contains($)){const Q=setTimeout(()=>{var le;const ae=ee.indexOf(Q);ae!==-1&&ee.splice(ae,1),x(),!a.value&&!j.contains(document.activeElement)&&((le=b.value)===null||le===void 0||le.focus())});ee.push(Q)}for(var q=arguments.length,Z=new Array(q>1?q-1:0),J=1;J<q;J++)Z[J-1]=arguments[J];(F=e.onMousedown)===null||F===void 0||F.call(e,u,...Z)},de=X(null),h=()=>{};return ye(()=>{ne(A,()=>{var u;if(A.value){const d=Math.ceil((u=s.value)===null||u===void 0?void 0:u.offsetWidth);de.value!==d&&!Number.isNaN(d)&&(de.value=d)}},{immediate:!0,flush:"post"})}),po([s,m],A,B),vo(At(S(S({},En(e)),{open:O,triggerOpen:A,showSearch:c,multiple:i,toggleOpen:B}))),()=>{const u=S(S({},e),o),{prefixCls:d,id:F,open:$,defaultOpen:j,mode:q,showSearch:Z,searchValue:J,onSearch:Q,allowClear:le,clearIcon:ae,showArrow:Ve,inputIcon:He,disabled:Oe,loading:Ne,getInputElement:ct,getPopupContainer:Xt,placement:Qt,animation:qt,transitionName:Zt,dropdownStyle:Jt,dropdownClassName:kt,dropdownMatchSelectWidth:en,dropdownRender:tn,dropdownAlign:nn,showAction:cl,direction:on,tokenSeparators:dl,tagRender:ln,optionLabelRender:an,onPopupScroll:fl,onDropdownVisibleChange:pl,onFocus:ml,onBlur:vl,onKeyup:hl,onKeydown:gl,onMousedown:bl,onClear:ze,omitDomProps:We,getRawInputElement:dt,displayValues:Le,onDisplayValuesChange:rn,emptyOptions:sn,activeDescendantId:un,activeValue:cn,OptionList:dn}=u,fn=go(u,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),ft=q==="combobox"&&ct&&ct()||null,Te=typeof dt=="function"&&dt(),Ke=S({},fn);let pt;Te&&(pt=we=>{B(we)}),bo.forEach(we=>{delete Ke[we]}),We?.forEach(we=>{delete Ke[we]});const mt=Ve!==void 0?Ve:Ne||!i.value&&q!=="combobox";let vt;mt&&(vt=M(Ce,{class:ue(`${d}-arrow`,{[`${d}-arrow-loading`]:Ne}),customizeIcon:He,customizeIconProps:{loading:Ne,searchValue:I.value,open:O.value,focused:y.value,showSearch:c.value}},null));let ht;const pn=()=>{ze?.(),rn([],{type:"clear",values:Le}),Y("",!1,!1)};!Oe&&le&&(Le.length||I.value)&&(ht=M(Ce,{class:`${d}-clear`,onMousedown:pn,customizeIcon:ae},{default:()=>[qe("×")]}));const mn=M(dn,{ref:C},S(S({},f.customSlots),{option:l.option})),vn=ue(d,o.class,{[`${d}-focused`]:y.value,[`${d}-multiple`]:i.value,[`${d}-single`]:!i.value,[`${d}-allow-clear`]:le,[`${d}-show-arrow`]:mt,[`${d}-disabled`]:Oe,[`${d}-loading`]:Ne,[`${d}-open`]:O.value,[`${d}-customize-input`]:ft,[`${d}-show-search`]:c.value}),gt=M(lo,{ref:m,disabled:Oe,prefixCls:d,visible:A.value,popupElement:mn,containerWidth:de.value,animation:qt,transitionName:Zt,dropdownStyle:Jt,dropdownClassName:kt,direction:on,dropdownMatchSelectWidth:en,dropdownRender:tn,dropdownAlign:nn,placement:Qt,getPopupContainer:Xt,empty:sn,getTriggerDOMNode:()=>r.current,onPopupVisibleChange:pt,onPopupMouseEnter:h,onPopupFocusin:re,onPopupFocusout:se},{default:()=>Te?Pe(Te)&&Ht(Te,{ref:r},!1,!0):M(fo,k(k({},e),{},{domRef:r,prefixCls:d,inputElement:ft,ref:b,id:F,showSearch:c.value,mode:q,activeDescendantId:un,tagRender:ln,optionLabelRender:an,values:Le,open:O.value,onToggleOpen:B,activeValue:cn,searchValue:I.value,onSearch:Y,onSearchSubmit:W,onRemove:p,tokenWithEnter:U.value}),null)});let je;return Te?je=gt:je=M("div",k(k({},Ke),{},{class:vn,ref:s,onMousedown:ce,onKeydown:oe,onKeyup:ie}),[y.value&&!O.value&&M("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${Le.map(we=>{let{label:bt,value:hn}=we;return["number","string"].includes(typeof bt)?bt:hn}).join(", ")}`]),gt,vt,ht]),je}}}),Ae=(e,t)=>{let{height:o,offset:n,prefixCls:l,onInnerResize:i}=e,{slots:c}=t;var a;let f={},s={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:`${o}px`,position:"relative",overflow:"hidden"},s=S(S({},s),{transform:`translateY(${n}px)`,position:"absolute",left:0,right:0,top:0})),M("div",{style:f},[M(Nn,{onResize:r=>{let{offsetHeight:m}=r;m&&i&&i()}},{default:()=>[M("div",{style:s,class:ue({[`${l}-holder-inner`]:l})},[(a=c.default)===null||a===void 0?void 0:a.call(c)])]})])};Ae.displayName="Filter";Ae.inheritAttrs=!1;Ae.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const Wt=(e,t)=>{let{setRef:o}=e,{slots:n}=t;var l;const i=Rt((l=n.default)===null||l===void 0?void 0:l.call(n));return i&&i.length?Vt(i[0],{ref:o}):i};Wt.props={setRef:{type:Function,default:()=>{}}};const Io=20;function Tt(e){return"touches"in e?e.touches[0].pageY:e.pageY}const Co=fe({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:Re(),thumbRef:Re(),visibleTimeout:null,state:$e({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var e,t;(e=this.scrollbarRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onScrollbarTouchStart,be?{passive:!1}:!1),(t=this.thumbRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onMouseDown,be?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(e){e.preventDefault()},onContainerMouseDown(e){e.stopPropagation(),e.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,be?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,be?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,be?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,be?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),he.cancel(this.moveRaf)},onMouseDown(e){const{onStartMove:t}=this.$props;S(this.state,{dragging:!0,pageY:Tt(e),startTop:this.getTop()}),t(),this.patchEvents(),e.stopPropagation(),e.preventDefault()},onMouseMove(e){const{dragging:t,pageY:o,startTop:n}=this.state,{onScroll:l}=this.$props;if(he.cancel(this.moveRaf),t){const i=Tt(e)-o,c=n+i,a=this.getEnableScrollRange(),f=this.getEnableHeightRange(),s=f?c/f:0,r=Math.ceil(s*a);this.moveRaf=he(()=>{l(r)})}},onMouseUp(){const{onStopMove:e}=this.$props;this.state.dragging=!1,e(),this.removeEvents()},getSpinHeight(){const{height:e,scrollHeight:t}=this.$props;let o=e/t*100;return o=Math.max(o,Io),o=Math.min(o,e/2),Math.floor(o)},getEnableScrollRange(){const{scrollHeight:e,height:t}=this.$props;return e-t||0},getEnableHeightRange(){const{height:e}=this.$props,t=this.getSpinHeight();return e-t||0},getTop(){const{scrollTop:e}=this.$props,t=this.getEnableScrollRange(),o=this.getEnableHeightRange();return e===0||t===0?0:e/t*o},showScroll(){const{height:e,scrollHeight:t}=this.$props;return t>e}},render(){const{dragging:e,visible:t}=this.state,{prefixCls:o}=this.$props,n=this.getSpinHeight()+"px",l=this.getTop()+"px",i=this.showScroll(),c=i&&t;return M("div",{ref:this.scrollbarRef,class:ue(`${o}-scrollbar`,{[`${o}-scrollbar-show`]:i}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:c?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[M("div",{ref:this.thumbRef,class:ue(`${o}-scrollbar-thumb`,{[`${o}-scrollbar-thumb-moving`]:e}),style:{width:"100%",height:n,top:l,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function xo(e,t,o,n){const l=new Map,i=new Map,c=me(Symbol("update"));ne(e,()=>{c.value=Symbol("update")});let a;function f(){he.cancel(a)}function s(){f(),a=he(()=>{l.forEach((m,b)=>{if(m&&m.offsetParent){const{offsetHeight:C}=m;i.get(b)!==C&&(c.value=Symbol("update"),i.set(b,m.offsetHeight))}})})}function r(m,b){const C=t(m);l.get(C),b?(l.set(C,b.$el||b),s()):l.delete(C)}return Pn(()=>{f()}),[r,s,i,c]}function $o(e,t,o,n,l,i,c,a){let f;return s=>{if(s==null){a();return}he.cancel(f);const r=t.value,m=n.itemHeight;if(typeof s=="number")c(s);else if(s&&typeof s=="object"){let b;const{align:C}=s;"index"in s?{index:b}=s:b=r.findIndex(w=>l(w)===s.key);const{offset:g=0}=s,y=(w,x)=>{if(w<0||!e.value)return;const D=e.value.clientHeight;let E=!1,I=x;if(D){const v=x||C;let P=0,O=0,R=0;const N=Math.min(r.length,b);for(let U=0;U<=N;U+=1){const Y=l(r[U]);O=P;const W=o.get(Y);R=O+(W===void 0?m:W),P=R,U===b&&W===void 0&&(E=!0)}const A=e.value.scrollTop;let B=null;switch(v){case"top":B=O-g;break;case"bottom":B=R-D+g;break;default:{const U=A+D;O<A?I="top":R>U&&(I="bottom")}}B!==null&&B!==A&&c(B)}f=he(()=>{E&&i(),y(w-1,I)},2)};y(5)}}}const Oo=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),Kt=((e,t)=>{let o=!1,n=null;function l(){clearTimeout(n),o=!0,n=setTimeout(()=>{o=!1},50)}return function(i){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const a=i<0&&e.value||i>0&&t.value;return c&&a?(clearTimeout(n),o=!1):(!a||o)&&l(),!o&&a}});function To(e,t,o,n){let l=0,i=null,c=null,a=!1;const f=Kt(t,o);function s(m){if(!e.value)return;he.cancel(i);const{deltaY:b}=m;l+=b,c=b,!f(b)&&(Oo||m.preventDefault(),i=he(()=>{n(l*(a?10:1)),l=0}))}function r(m){e.value&&(a=m.detail===c)}return[s,r]}const Mo=14/15;function Eo(e,t,o){let n=!1,l=0,i=null,c=null;const a=()=>{i&&(i.removeEventListener("touchmove",f),i.removeEventListener("touchend",s))},f=b=>{if(n){const C=Math.ceil(b.touches[0].pageY);let g=l-C;l=C,o(g)&&b.preventDefault(),clearInterval(c),c=setInterval(()=>{g*=Mo,(!o(g,!0)||Math.abs(g)<=.1)&&clearInterval(c)},16)}},s=()=>{n=!1,a()},r=b=>{a(),b.touches.length===1&&!n&&(n=!0,l=Math.ceil(b.touches[0].pageY),i=b.target,i.addEventListener("touchmove",f,{passive:!1}),i.addEventListener("touchend",s))},m=()=>{};ye(()=>{document.addEventListener("touchmove",m,{passive:!1}),ne(e,b=>{t.value.removeEventListener("touchstart",r),a(),clearInterval(c),b&&t.value.addEventListener("touchstart",r,{passive:!1})},{immediate:!0})}),De(()=>{document.removeEventListener("touchmove",m)})}var Po=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const Fo=[],Ro={overflowY:"auto",overflowAnchor:"none"};function Do(e,t,o,n,l,i){let{getKey:c}=i;return e.slice(t,o+1).map((a,f)=>{const s=t+f,r=l(a,s,{}),m=c(a);return M(Wt,{key:m,setRef:b=>n(a,b)},{default:()=>[r]})})}const Vo=fe({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:V.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(e,t){let{expose:o}=t;const n=H(()=>{const{height:p,itemHeight:L,virtual:T}=e;return!!(T!==!1&&p&&L)}),l=H(()=>{const{height:p,itemHeight:L,data:T}=e;return n.value&&T&&L*T.length>p}),i=$e({scrollTop:0,scrollMoving:!1}),c=H(()=>e.data||Fo),a=X([]);ne(c,()=>{a.value=et(c.value).slice()},{immediate:!0});const f=X(p=>{});ne(()=>e.itemKey,p=>{typeof p=="function"?f.value=p:f.value=L=>L?.[p]},{immediate:!0});const s=X(),r=X(),m=X(),b=p=>f.value(p),C={getKey:b};function g(p){let L;typeof p=="function"?L=p(i.scrollTop):L=p;const T=P(L);s.value&&(s.value.scrollTop=T),i.scrollTop=T}const[y,w,x,D]=xo(a,b),E=$e({scrollHeight:void 0,start:0,end:0,offset:void 0}),I=X(0);ye(()=>{Ee(()=>{var p;I.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),Fn(()=>{Ee(()=>{var p;I.value=((p=r.value)===null||p===void 0?void 0:p.offsetHeight)||0})}),ne([n,a],()=>{n.value||S(E,{scrollHeight:void 0,start:0,end:a.value.length-1,offset:void 0})},{immediate:!0}),ne([n,a,I,l],()=>{n.value&&!l.value&&S(E,{scrollHeight:I.value,start:0,end:a.value.length-1,offset:void 0}),s.value&&(i.scrollTop=s.value.scrollTop)},{immediate:!0}),ne([l,n,()=>i.scrollTop,a,D,()=>e.height,I],()=>{if(!n.value||!l.value)return;let p=0,L,T,K;const te=a.value.length,re=a.value,se=i.scrollTop,{itemHeight:ee,height:ce}=e,de=se+ce;for(let h=0;h<te;h+=1){const u=re[h],d=b(u);let F=x.get(d);F===void 0&&(F=ee);const $=p+F;L===void 0&&$>=se&&(L=h,T=p),K===void 0&&$>de&&(K=h),p=$}L===void 0&&(L=0,T=0,K=Math.ceil(ce/ee)),K===void 0&&(K=te-1),K=Math.min(K+1,te),S(E,{scrollHeight:p,start:L,end:K,offset:T})},{immediate:!0});const v=H(()=>E.scrollHeight-e.height);function P(p){let L=p;return Number.isNaN(v.value)||(L=Math.min(L,v.value)),L=Math.max(L,0),L}const O=H(()=>i.scrollTop<=0),R=H(()=>i.scrollTop>=v.value),N=Kt(O,R);function A(p){g(p)}function B(p){var L;const{scrollTop:T}=p.currentTarget;T!==i.scrollTop&&g(T),(L=e.onScroll)===null||L===void 0||L.call(e,p)}const[U,Y]=To(n,O,R,p=>{g(L=>L+p)});Eo(n,s,(p,L)=>N(p,L)?!1:(U({preventDefault(){},deltaY:p}),!0));function W(p){n.value&&p.preventDefault()}const G=()=>{s.value&&(s.value.removeEventListener("wheel",U,be?{passive:!1}:!1),s.value.removeEventListener("DOMMouseScroll",Y),s.value.removeEventListener("MozMousePixelScroll",W))};Ie(()=>{Ee(()=>{s.value&&(G(),s.value.addEventListener("wheel",U,be?{passive:!1}:!1),s.value.addEventListener("DOMMouseScroll",Y),s.value.addEventListener("MozMousePixelScroll",W))})}),De(()=>{G()});const z=$o(s,a,x,e,b,w,g,()=>{var p;(p=m.value)===null||p===void 0||p.delayHidden()});o({scrollTo:z});const oe=H(()=>{let p=null;return e.height&&(p=S({[e.fullHeight?"height":"maxHeight"]:e.height+"px"},Ro),n.value&&(p.overflowY="hidden",i.scrollMoving&&(p.pointerEvents="none"))),p});return ne([()=>E.start,()=>E.end,a],()=>{if(e.onVisibleChange){const p=a.value.slice(E.start,E.end+1);e.onVisibleChange(p,a.value)}},{flush:"post"}),{state:i,mergedData:a,componentStyle:oe,onFallbackScroll:B,onScrollBar:A,componentRef:s,useVirtual:n,calRes:E,collectHeight:w,setInstance:y,sharedConfig:C,scrollBarRef:m,fillerInnerRef:r,delayHideScrollBar:()=>{var p;(p=m.value)===null||p===void 0||p.delayHidden()}}},render(){const e=S(S({},this.$props),this.$attrs),{prefixCls:t="rc-virtual-list",height:o,itemHeight:n,fullHeight:l,data:i,itemKey:c,virtual:a,component:f="div",onScroll:s,children:r=this.$slots.default,style:m,class:b}=e,C=Po(e,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),g=ue(t,b),{scrollTop:y}=this.state,{scrollHeight:w,offset:x,start:D,end:E}=this.calRes,{componentStyle:I,onFallbackScroll:v,onScrollBar:P,useVirtual:O,collectHeight:R,sharedConfig:N,setInstance:A,mergedData:B,delayHideScrollBar:U}=this;return M("div",k({style:S(S({},m),{position:"relative"}),class:g},C),[M(f,{class:`${t}-holder`,style:I,ref:"componentRef",onScroll:v,onMouseenter:U},{default:()=>[M(Ae,{prefixCls:t,height:w,offset:x,onInnerResize:R,ref:"fillerInnerRef"},{default:()=>Do(B,D,E,A,r,N)})]}),O&&M(Co,{ref:"scrollBarRef",prefixCls:t,scrollTop:y,height:o,scrollHeight:w,count:B.length,onScroll:P,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function Ho(e,t,o){const n=me(e());return ne(t,(l,i)=>{o?o(l,i)&&(n.value=e()):n.value=e()}),n}function No(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const jt=Symbol("SelectContextKey");function Lo(e){return ke(jt,e)}function Bo(){return Be(jt,{})}var _o=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Mt(e){return typeof e=="string"||typeof e=="number"}const Ao=fe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(e,t){let{expose:o,slots:n}=t;const l=ho(),i=Bo(),c=H(()=>`${l.prefixCls}-item`),a=Ho(()=>i.flattenOptions,[()=>l.open,()=>i.flattenOptions],v=>v[0]),f=Re(),s=v=>{v.preventDefault()},r=v=>{f.current&&f.current.scrollTo(typeof v=="number"?{index:v}:v)},m=function(v){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const O=a.value.length;for(let R=0;R<O;R+=1){const N=(v+R*P+O)%O,{group:A,data:B}=a.value[N];if(!A&&!B.disabled)return N}return-1},b=$e({activeIndex:m(0)}),C=function(v){let P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;b.activeIndex=v;const O={source:P?"keyboard":"mouse"},R=a.value[v];if(!R){i.onActiveValue(null,-1,O);return}i.onActiveValue(R.value,v,O)};ne([()=>a.value.length,()=>l.searchValue],()=>{C(i.defaultActiveFirstOption!==!1?m(0):-1)},{immediate:!0});const g=v=>i.rawValues.has(v)&&l.mode!=="combobox";ne([()=>l.open,()=>l.searchValue],()=>{if(!l.multiple&&l.open&&i.rawValues.size===1){const v=Array.from(i.rawValues)[0],P=et(a.value).findIndex(O=>{let{data:R}=O;return R[i.fieldNames.value]===v});P!==-1&&(C(P),Ee(()=>{r(P)}))}l.open&&Ee(()=>{var v;(v=f.current)===null||v===void 0||v.scrollTo(void 0)})},{immediate:!0,flush:"post"});const y=v=>{v!==void 0&&i.onSelect(v,{selected:!i.rawValues.has(v)}),l.multiple||l.toggleOpen(!1)},w=v=>typeof v.label=="function"?v.label():v.label;function x(v){const P=a.value[v];if(!P)return null;const O=P.data||{},{value:R}=O,{group:N}=P,A=tt(O,!0),B=w(P);return P?M("div",k(k({"aria-label":typeof B=="string"&&!N?B:null},A),{},{key:v,role:N?"presentation":"option",id:`${l.id}_list_${v}`,"aria-selected":g(R)}),[R]):null}return o({onKeydown:v=>{const{which:P,ctrlKey:O}=v;switch(P){case _.N:case _.P:case _.UP:case _.DOWN:{let R=0;if(P===_.UP?R=-1:P===_.DOWN?R=1:No()&&O&&(P===_.N?R=1:P===_.P&&(R=-1)),R!==0){const N=m(b.activeIndex+R,R);r(N),C(N,!0)}break}case _.ENTER:{const R=a.value[b.activeIndex];R&&!R.data.disabled?y(R.value):y(void 0),l.open&&v.preventDefault();break}case _.ESC:l.toggleOpen(!1),l.open&&v.stopPropagation()}},onKeyup:()=>{},scrollTo:v=>{r(v)}}),()=>{const{id:v,notFoundContent:P,onPopupScroll:O}=l,{menuItemSelectedIcon:R,fieldNames:N,virtual:A,listHeight:B,listItemHeight:U}=i,Y=n.option,{activeIndex:W}=b,G=Object.keys(N).map(z=>N[z]);return a.value.length===0?M("div",{role:"listbox",id:`${v}_list`,class:`${c.value}-empty`,onMousedown:s},[P]):M(Fe,null,[M("div",{role:"listbox",id:`${v}_list`,style:{height:0,width:0,overflow:"hidden"}},[x(W-1),x(W),x(W+1)]),M(Vo,{itemKey:"key",ref:f,data:a.value,height:B,itemHeight:U,fullHeight:!1,onMousedown:s,onScroll:O,virtual:A},{default:(z,oe)=>{var ie;const{group:p,groupOption:L,data:T,value:K}=z,{key:te}=T,re=typeof z.label=="function"?z.label():z.label;if(p){const ae=(ie=T.title)!==null&&ie!==void 0?ie:Mt(re)&&re;return M("div",{class:ue(c.value,`${c.value}-group`),title:ae},[Y?Y(T):re!==void 0?re:te])}const{disabled:se,title:ee,children:ce,style:de,class:h,className:u}=T,d=_o(T,["disabled","title","children","style","class","className"]),F=_e(d,G),$=g(K),j=`${c.value}-option`,q=ue(c.value,j,h,u,{[`${j}-grouped`]:L,[`${j}-active`]:W===oe&&!se,[`${j}-disabled`]:se,[`${j}-selected`]:$}),Z=w(z),J=!R||typeof R=="function"||$,Q=typeof Z=="number"?Z:Z||K;let le=Mt(Q)?Q.toString():void 0;return ee!==void 0&&(le=ee),M("div",k(k({},F),{},{"aria-selected":$,class:q,title:le,onMousemove:ae=>{d.onMousemove&&d.onMousemove(ae),!(W===oe||se)&&C(oe)},onClick:ae=>{se||y(K),d.onClick&&d.onClick(ae)},style:de}),[M("div",{class:`${j}-content`},[Y?Y(T):Q]),Pe(R)||$,J&&M(Ce,{class:`${c.value}-option-state`,customizeIcon:R,customizeIconProps:{isSelected:$}},{default:()=>[$?"✓":null]})])}})])}}});var zo=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};function Wo(e){const t=e,{key:o,children:n}=t,l=t.props,{value:i,disabled:c}=l,a=zo(l,["value","disabled"]),f=n?.default;return S({key:o,value:i!==void 0?i:o,children:f,disabled:c||c===""},a)}function at(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Rt(e).map((n,l)=>{var i;if(!Pe(n)||!n.type)return null;const{type:{isSelectOptGroup:c},key:a,children:f,props:s}=n;if(t||!c)return Wo(n);const r=f&&f.default?f.default():void 0,m=s?.label||((i=f.label)===null||i===void 0?void 0:i.call(f))||a;return S(S({key:`__RC_SELECT_GRP__${a===null?l:String(a)}__`},s),{label:m,options:at(r||[])})}).filter(n=>n)}function Ko(e,t,o){const n=X(),l=X(),i=X(),c=X([]);return ne([e,t],()=>{e.value?c.value=et(e.value).slice():c.value=at(t.value)},{immediate:!0,deep:!0}),Ie(()=>{const a=c.value,f=new Map,s=new Map,r=o.value;function m(b){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let g=0;g<b.length;g+=1){const y=b[g];!y[r.options]||C?(f.set(y[r.value],y),s.set(y[r.label],y)):m(y[r.options],!0)}}m(a),n.value=a,l.value=f,i.value=s}),{options:n,valueOptions:l,labelOptions:i}}let Et=0;const jo=bn();function Uo(){let e;return jo?(e=Et,Et+=1):e="TEST_OR_SSR",e}function Go(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:me("");const t=`rc_select_${Uo()}`;return e.value||t}function rt(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function Yo(e){const{mode:t,options:o,children:n,backfill:l,allowClear:i,placeholder:c,getInputElement:a,showSearch:f,onSearch:s,defaultOpen:r,autofocus:m,labelInValue:b,value:C,inputValue:g,optionLabelProp:y}=e,w=it(t),x=f!==void 0?f:w||t==="combobox",D=o||at(n);if(ve(t!=="tags"||D.every(E=>!E.disabled),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),ve(t!=="combobox"||!y,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),ve(t==="combobox"||!l,"`backfill` only works with `combobox` mode."),ve(t==="combobox"||!a,"`getInputElement` only work with `combobox` mode."),St(t!=="combobox"||!a||!i||!c,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),s&&!x&&t!=="combobox"&&t!=="tags"&&ve(!1,"`onSearch` should work with `showSearch` instead of use alone."),St(!r||m,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autofocus` if needed."),C!=null){const E=rt(C);ve(!b||E.every(I=>typeof I=="object"&&("key"in I||"value"in I)),"`value` should in shape of `{ value: string | number, label?: any }` when you set `labelInValue` to `true`"),ve(!w||Array.isArray(C),"`value` should be array when `mode` is `multiple` or `tags`")}if(n){let E=null;n.some(I=>{var v;if(!Pe(I)||!I.type)return!1;const{type:P}=I;return P.isSelectOption?!1:P.isSelectOptGroup?!(((v=I.children)===null||v===void 0?void 0:v.default())||[]).every(N=>!Pe(N)||!I.type||N.type.isSelectOption?!0:(E=N.type,!1)):(E=P,!0)}),E&&ve(!1,`\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${E.displayName||E.name||E}\`.`),ve(g===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ue(e,t){return rt(e).join("").toUpperCase().includes(t)}const Xo=((e,t,o,n,l)=>H(()=>{const i=o.value,c=l?.value,a=n?.value;if(!i||a===!1)return e.value;const{options:f,label:s,value:r}=t.value,m=[],b=typeof a=="function",C=i.toUpperCase(),g=b?a:(w,x)=>c?Ue(x[c],C):x[f]?Ue(x[s!=="children"?s:"label"],C):Ue(x[r],C),y=b?w=>Ze(w):w=>w;return e.value.forEach(w=>{if(w[f]){if(g(i,y(w)))m.push(w);else{const D=w[f].filter(E=>g(i,y(E)));D.length&&m.push(S(S({},w),{[f]:D}))}return}g(i,y(w))&&m.push(w)}),m})),Qo=((e,t)=>{const o=X({values:new Map,options:new Map});return[H(()=>{const{values:i,options:c}=o.value,a=e.value.map(r=>{var m;return r.label===void 0?S(S({},r),{label:(m=i.get(r.value))===null||m===void 0?void 0:m.label}):r}),f=new Map,s=new Map;return a.forEach(r=>{f.set(r.value,r),s.set(r.value,t.value.get(r.value)||c.get(r.value))}),o.value.values=f,o.value.options=s,a}),i=>t.value.get(i)||o.value.options.get(i)]}),qo=["inputValue"];function Ut(){return S(S({},zt()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:V.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:V.any,defaultValue:V.any,onChange:Function,children:Array})}function Zo(e){return!e||typeof e!="object"}const Jo=fe({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:nt(Ut(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(e,t){let{expose:o,attrs:n,slots:l}=t;const i=Go(ge(e,"id")),c=H(()=>it(e.mode)),a=H(()=>!!(!e.options&&e.children)),f=H(()=>e.filterOption===void 0&&e.mode==="combobox"?!1:e.filterOption),s=H(()=>Nt(e.fieldNames,a.value)),[r,m]=wt("",{value:H(()=>e.searchValue!==void 0?e.searchValue:e.inputValue),postState:h=>h||""}),b=Ko(ge(e,"options"),ge(e,"children"),s),{valueOptions:C,labelOptions:g,options:y}=b,w=h=>rt(h).map(d=>{var F,$;let j,q,Z,J;Zo(d)?j=d:(Z=d.key,q=d.label,j=(F=d.value)!==null&&F!==void 0?F:Z);const Q=C.value.get(j);return Q&&(q===void 0&&(q=Q?.[e.optionLabelProp||s.value.label]),Z===void 0&&(Z=($=Q?.key)!==null&&$!==void 0?$:j),J=Q?.disabled),{label:q,value:j,key:Z,disabled:J,option:Q}}),[x,D]=wt(e.defaultValue,{value:ge(e,"value")}),E=H(()=>{var h;const u=w(x.value);return e.mode==="combobox"&&!(!((h=u[0])===null||h===void 0)&&h.value)?[]:u}),[I,v]=Qo(E,C),P=H(()=>{if(!e.mode&&I.value.length===1){const h=I.value[0];if(h.value===null&&(h.label===null||h.label===void 0))return[]}return I.value.map(h=>{var u;return S(S({},h),{label:(u=typeof h.label=="function"?h.label():h.label)!==null&&u!==void 0?u:h.value})})}),O=H(()=>new Set(I.value.map(h=>h.value)));Ie(()=>{var h;if(e.mode==="combobox"){const u=(h=I.value[0])===null||h===void 0?void 0:h.value;u!=null&&m(String(u))}},{flush:"post"});const R=(h,u)=>{const d=u??h;return{[s.value.value]:h,[s.value.label]:d}},N=X();Ie(()=>{if(e.mode!=="tags"){N.value=y.value;return}const h=y.value.slice(),u=d=>C.value.has(d);[...I.value].sort((d,F)=>d.value<F.value?-1:1).forEach(d=>{const F=d.value;u(F)||h.push(R(F,d.label))}),N.value=h});const A=Xo(N,s,r,f,ge(e,"optionFilterProp")),B=H(()=>e.mode!=="tags"||!r.value||A.value.some(h=>h[e.optionFilterProp||"value"]===r.value)?A.value:[R(r.value),...A.value]),U=H(()=>e.filterSort?[...B.value].sort((h,u)=>e.filterSort(h,u)):B.value),Y=H(()=>eo(U.value,{fieldNames:s.value,childrenAsData:a.value})),W=h=>{const u=w(h);if(D(u),e.onChange&&(u.length!==I.value.length||u.some((d,F)=>{var $;return(($=I.value[F])===null||$===void 0?void 0:$.value)!==d?.value}))){const d=e.labelInValue?u.map($=>S(S({},$),{originLabel:$.label,label:typeof $.label=="function"?$.label():$.label})):u.map($=>$.value),F=u.map($=>Ze(v($.value)));e.onChange(c.value?d:d[0],c.value?F:F[0])}},[G,z]=It(null),[oe,ie]=It(0),p=H(()=>e.defaultActiveFirstOption!==void 0?e.defaultActiveFirstOption:e.mode!=="combobox"),L=function(h,u){let{source:d="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ie(u),e.backfill&&e.mode==="combobox"&&h!==null&&d==="keyboard"&&z(String(h))},T=(h,u)=>{const d=()=>{var F;const $=v(h),j=$?.[s.value.label];return[e.labelInValue?{label:typeof j=="function"?j():j,originLabel:j,value:h,key:(F=$?.key)!==null&&F!==void 0?F:h}:h,Ze($)]};if(u&&e.onSelect){const[F,$]=d();e.onSelect(F,$)}else if(!u&&e.onDeselect){const[F,$]=d();e.onDeselect(F,$)}},K=(h,u)=>{let d;const F=c.value?u.selected:!0;F?d=c.value?[...I.value,h]:[h]:d=I.value.filter($=>$.value!==h),W(d),T(h,F),e.mode==="combobox"?z(""):(!c.value||e.autoClearSearchValue)&&(m(""),z(""))},te=(h,u)=>{W(h),(u.type==="remove"||u.type==="clear")&&u.values.forEach(d=>{T(d.value,!1)})},re=(h,u)=>{var d;if(m(h),z(null),u.source==="submit"){const F=(h||"").trim();if(F){const $=Array.from(new Set([...O.value,F]));W($),T(F,!0),m("")}return}u.source!=="blur"&&(e.mode==="combobox"&&W(h),(d=e.onSearch)===null||d===void 0||d.call(e,h))},se=h=>{let u=h;e.mode!=="tags"&&(u=h.map(F=>{const $=g.value.get(F);return $?.value}).filter(F=>F!==void 0));const d=Array.from(new Set([...O.value,...u]));W(d),d.forEach(F=>{T(F,!0)})},ee=H(()=>e.virtual!==!1&&e.dropdownMatchSelectWidth!==!1);Lo(At(S(S({},b),{flattenOptions:Y,onActiveValue:L,defaultActiveFirstOption:p,onSelect:K,menuItemSelectedIcon:ge(e,"menuItemSelectedIcon"),rawValues:O,fieldNames:s,virtual:ee,listHeight:ge(e,"listHeight"),listItemHeight:ge(e,"listItemHeight"),childrenAsData:a}))),Ie(()=>{Yo(e)},{flush:"post"});const ce=me();o({focus(){var h;(h=ce.value)===null||h===void 0||h.focus()},blur(){var h;(h=ce.value)===null||h===void 0||h.blur()},scrollTo(h){var u;(u=ce.value)===null||u===void 0||u.scrollTo(h)}});const de=H(()=>_e(e,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>M(wo,k(k(k({},de.value),n),{},{id:i,prefixCls:e.prefixCls,ref:ce,omitDomProps:qo,mode:e.mode,displayValues:P.value,onDisplayValuesChange:te,searchValue:r.value,onSearch:re,onSearchSplit:se,dropdownMatchSelectWidth:e.dropdownMatchSelectWidth,OptionList:Ao,emptyOptions:!Y.value.length,activeValue:G.value,activeDescendantId:`${i}_list_${oe.value}`}),l)}}),st=()=>null;st.isSelectOption=!0;st.displayName="ASelectOption";const ut=()=>null;ut.isSelectOptGroup=!0;ut.displayName="ASelectOptGroup";function ko(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{loading:o,multiple:n,prefixCls:l,hasFeedback:i,feedbackIcon:c,showArrow:a}=e,f=e.suffixIcon||t.suffixIcon&&t.suffixIcon(),s=e.clearIcon||t.clearIcon&&t.clearIcon(),r=e.menuItemSelectedIcon||t.menuItemSelectedIcon&&t.menuItemSelectedIcon(),m=e.removeIcon||t.removeIcon&&t.removeIcon(),b=s??M(Ln,null,null),C=x=>M(Fe,null,[a!==!1&&x,i&&c]);let g=null;if(f!==void 0)g=C(f);else if(o)g=C(M(Bn,{spin:!0},null));else{const x=`${l}-suffix`;g=D=>{let{open:E,showSearch:I}=D;return C(E&&I?M(zn,{class:x},null):M(Wn,{class:x},null))}}let y=null;r!==void 0?y=r:n?y=M(_n,null,null):y=null;let w=null;return m!==void 0?w=m:w=M(An,null,null),{clearIcon:b,suffixIcon:g,itemIcon:y,removeIcon:w}}const Pt=e=>{const{controlPaddingHorizontal:t}=e;return{position:"relative",display:"block",minHeight:e.controlHeight,padding:`${(e.controlHeight-e.fontSize*e.lineHeight)/2}px ${t}px`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,boxSizing:"border-box"}},el=e=>{const{antCls:t,componentCls:o}=e,n=`${o}-item`;return[{[`${o}-dropdown`]:S(S({},Je(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
|
|
4
4
|
&${t}-slide-up-enter${t}-slide-up-enter-active${o}-dropdown-placement-bottomLeft,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as p,b as i,p as $}from"./vendor-BvqAck49.js";import{l as d,m as u,h as a}from"./index-
|
|
1
|
+
import{i as p,b as i,p as $}from"./vendor-BvqAck49.js";import{l as d,m as u,h as a}from"./index-7ME2_dHQ.js";const c=Symbol("rowContextKey"),w=o=>{$(c,o)},I=()=>p(c,{gutter:i(()=>{}),wrap:i(()=>{}),supportFlexGap:i(()=>{})}),m=o=>{const{componentCls:e}=o;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},f=o=>{const{componentCls:e}=o;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},y=(o,e)=>{const{componentCls:t,gridColumns:s}=o,r={};for(let n=s;n>=0;n--)n===0?(r[`${t}${e}-${n}`]={display:"none"},r[`${t}-push-${n}`]={insetInlineStart:"auto"},r[`${t}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-push-${n}`]={insetInlineStart:"auto"},r[`${t}${e}-pull-${n}`]={insetInlineEnd:"auto"},r[`${t}${e}-offset-${n}`]={marginInlineEnd:0},r[`${t}${e}-order-${n}`]={order:0}):(r[`${t}${e}-${n}`]={display:"block",flex:`0 0 ${n/s*100}%`,maxWidth:`${n/s*100}%`},r[`${t}${e}-push-${n}`]={insetInlineStart:`${n/s*100}%`},r[`${t}${e}-pull-${n}`]={insetInlineEnd:`${n/s*100}%`},r[`${t}${e}-offset-${n}`]={marginInlineStart:`${n/s*100}%`},r[`${t}${e}-order-${n}`]={order:n});return r},l=(o,e)=>y(o,e),x=(o,e,t)=>({[`@media (min-width: ${e}px)`]:a({},l(o,t))}),M=d("Grid",o=>[m(o)]),b=d("Grid",o=>{const e=u(o,{gridColumns:24}),t={"-sm":e.screenSMMin,"-md":e.screenMDMin,"-lg":e.screenLGMin,"-xl":e.screenXLMin,"-xxl":e.screenXXLMin};return[f(e),l(e,""),l(e,"-xs"),Object.keys(t).map(s=>x(e,t[s],s)).reduce((s,r)=>a(a({},s),r),{})]});export{b as a,M as b,w as c,I as u};
|