@yuku123/z-cognition-component 2.0.0 → 2.0.2
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/dist-lib/ApartmentOutlined-M6qSurnE.js +12 -0
- package/dist-lib/ArrowLeftOutlined-DowsrSUj.js +12 -0
- package/dist-lib/{ConceptsPage-DOf_CJlz.js → ConceptsPage-BOeKdDKI.js} +16 -13
- package/dist-lib/{DocsPage-CiC7TU96.js → DocsPage-BZOBFp3c.js} +4 -4
- package/dist-lib/EvidenceFormList-DXqqSpPV.js +91 -0
- package/dist-lib/{EyeOutlined-CH-5UdnC.js → EyeOutlined-DGSrX-0M.js} +1 -1
- package/dist-lib/ImpactPage-DyhUR6fT.js +71 -0
- package/dist-lib/{LeftOutlined-DQTflZ6D.js → LeftOutlined-Cgo6Izj-.js} +1 -1
- package/dist-lib/{OntologyDetailPage-mgK_NQxP.js → OntologyDetailPage-B8DyU8WW.js} +93 -99
- package/dist-lib/{OntologyInferPage-NUaoaQpN.js → OntologyInferPage-CvcjxpBB.js} +40 -38
- package/dist-lib/{OntologyListPage-C9wH01y0.js → OntologyListPage-Cb0XfpWE.js} +49 -47
- package/dist-lib/OntologyMaterializePage-B0f9TnJa.js +136 -0
- package/dist-lib/OntologyNodesPage-D4MWlm6q.js +1268 -0
- package/dist-lib/{OntologyValidatePage-DtkYK_l4.js → OntologyValidatePage-abQVJwzV.js} +52 -49
- package/dist-lib/{Pagination-Ds8VKQIT.js → Pagination-Dxslodkq.js} +258 -260
- package/dist-lib/PlusOutlined-B_dXo_97.js +12 -0
- package/dist-lib/{ReloadOutlined-B26pDoyV.js → ReloadOutlined-CS-e-TmN.js} +10 -19
- package/dist-lib/{ResolvePage-Cz9HORZ3.js → ResolvePage-rbQ-8nNZ.js} +33 -31
- package/dist-lib/{RotateRightOutlined-B575hEBK.js → RotateRightOutlined-q7zp2e47.js} +1 -1
- package/dist-lib/SearchOutlined-puH6bCY6.js +979 -0
- package/dist-lib/Skeleton-DXcERb5r.js +557 -0
- package/dist-lib/{Table-D8pPXolZ.js → Table-CDagah-g.js} +452 -450
- package/dist-lib/TagsOutlined-B4_qkn6-.js +20 -0
- package/dist-lib/TermDetailPage-CP0D6OvA.js +242 -0
- package/dist-lib/{TermsPage-BuzCMYov.js → TermsPage-CuufAyuL.js} +31 -28
- package/dist-lib/TextArea-DTpTS5HL.js +1897 -0
- package/dist-lib/ThunderboltOutlined-Bf54AaFE.js +20 -0
- package/dist-lib/{agents-DS0rPJGV.js → agents-CvgRLQw2.js} +46 -46
- package/dist-lib/{ai-CQ67aRC4.js → ai-DYDhijtn.js} +30 -30
- package/dist-lib/{ai-chat-share-AOB7rEOb.js → ai-chat-share-DJnybJtS.js} +14 -13
- package/dist-lib/{approval-LLVR3fMa.js → approval-3IbhY8Lp.js} +26 -25
- package/dist-lib/{approvals-D1DSA-Mw.js → approvals-Cd6CVzz4.js} +43 -42
- package/dist-lib/{assistant-DpabpWKV.js → assistant-cIXgilaE.js} +50 -49
- package/dist-lib/{assistant-history-ChvhtZwX.js → assistant-history-BQzH4ChB.js} +5 -5
- package/dist-lib/{assistant-summary-B0ksF8CX.js → assistant-summary-LKTj_HKM.js} +1 -1
- package/dist-lib/{audit-DeU1XEgQ.js → audit-CxuJ5unU.js} +1 -1
- package/dist-lib/{bios-Bk36bVhw.js → bios-BplnCOF4.js} +130 -125
- package/dist-lib/callSuper-DZEfdkXG.js +7 -0
- package/dist-lib/{changelog-xEt2qnho.js → changelog-BoGqt_81.js} +2 -2
- package/dist-lib/{changelog-CCMDMI4R.js → changelog-Cn81Dvgk.js} +1 -1
- package/dist-lib/chunk-YDNE64FV-DGyyfCo0.js +2004 -0
- package/dist-lib/colors-sdAcAcU3.js +24 -0
- package/dist-lib/context-Buz0ggsK.js +710 -0
- package/dist-lib/context-DpmyNOn3.js +21 -0
- package/dist-lib/createForOfIteratorHelper-DEx_aTey.js +51 -0
- package/dist-lib/d3-force-CZK-Rgd6.js +598 -0
- package/dist-lib/{dayjs.min-DoEf5yCX.js → dayjs.min-BauDENhn.js} +1 -1
- package/dist-lib/{detail-Xtof0GoK.js → detail-BaX7WiWV.js} +51 -50
- package/dist-lib/{detail-BW6dD_YP.js → detail-Cx5c4KJH.js} +89 -88
- package/dist-lib/{docx-preview-D4v2g8Yg.js → docx-preview-B5nQuTwk.js} +1 -1
- package/dist-lib/{downloads-Dj4DgBSS.js → downloads-C3Oz04OW.js} +4 -3
- package/dist-lib/{edit-nZ7siGuW.js → edit-Cbn2eJaJ.js} +265 -259
- package/dist-lib/{editor-BuhZwEsv.js → editor-mtaJBQXz.js} +21 -20
- package/dist-lib/embed-CR8XVkMy.js +31148 -0
- package/dist-lib/{evaluation-B-igEqQ9.js → evaluation-BoHiY8yT.js} +15 -14
- package/dist-lib/{focus-set-DfRWcq91.js → focus-set-h0YtOUB2.js} +34 -33
- package/dist-lib/{format-CWI99NCN.js → format-UGmYKemG.js} +1 -1
- package/dist-lib/index-9aQ4BzIK.js +500 -0
- package/dist-lib/{index-BJ2Gpcbi.js → index-B22_2Dzh.js} +2 -2
- package/dist-lib/index-B57Fj7Y0.js +1169 -0
- package/dist-lib/{index-D_-8dmug.js → index-BEjXaDfk.js} +23 -22
- package/dist-lib/{index-rtSfQuYs.js → index-BSlCGnzo.js} +12 -12
- package/dist-lib/index-Bc-Vin3j.js +256 -0
- package/dist-lib/{index-SAPKyv8e.js → index-Bm1sK-VN.js} +10 -10
- package/dist-lib/{index-g9uC_rON.js → index-BwVZgt5s.js} +129 -146
- package/dist-lib/{index-CZipVp1G.js → index-C3AMwzIi.js} +1 -1
- package/dist-lib/{index-B5jr3A7f.js → index-CHBNrCMy.js} +19 -19
- package/dist-lib/{index-BFRg0cn3.js → index-CLTfICbf.js} +6 -6
- package/dist-lib/{index-CnLkqTRm.js → index-CaXylbQR.js} +175 -173
- package/dist-lib/index-Cfu1W1H6.js +535 -0
- package/dist-lib/{index-DzrH4RQ7.js → index-Cj4DDWyj.js} +11 -10
- package/dist-lib/index-CrMcNEAZ.js +9656 -0
- package/dist-lib/index-Cy9i4Kx7.js +699 -0
- package/dist-lib/index-CyKWCYMK.js +218 -0
- package/dist-lib/{index-CjwzwBTy.js → index-D3GHtSlM.js} +94 -93
- package/dist-lib/{index-B8l4PAGJ.js → index-DBlG9uXV.js} +112 -108
- package/dist-lib/index-DBtGE89a.js +168 -0
- package/dist-lib/{index-CS5YTpdI.js → index-DMTPsTna.js} +4 -3
- package/dist-lib/index-DjFPRXl5.js +1484 -0
- package/dist-lib/{index-Bu6udiyN.js → index-DsuUGhTA.js} +123 -121
- package/dist-lib/index-DvWHYX81.js +450 -0
- package/dist-lib/{index-D5V4bZ4e.js → index-PBT9GksC.js} +8 -8
- package/dist-lib/index-Vu6sPBci.js +1884 -0
- package/dist-lib/index-bOY1cBol.js +4890 -0
- package/dist-lib/index-nQSVLWfW.js +356 -0
- package/dist-lib/{index-pcUZcUIA.js → index-o65vKUwa.js} +48 -47
- package/dist-lib/{index-K7z38Ybg.js → index-ounfql2z.js} +33 -31
- package/dist-lib/{index-B1rpIXU7.js → index-y7jVGGI0.js} +23 -21
- package/dist-lib/index.js +3 -1
- package/dist-lib/{jszip.min-dcaDnWUw.js → jszip.min-DcEHhn-b.js} +1 -1
- package/dist-lib/{kb-form-modal-9L0AUHVG.js → kb-form-modal-B0rM1ZvV.js} +71 -71
- package/dist-lib/{kbTeam-BECePvJe.js → kbTeam-Bh_FQH28.js} +3 -3
- package/dist-lib/{knowledge-base-C8gHP0dj.js → knowledge-base-Cl1Ka1e6.js} +104 -103
- package/dist-lib/{knowledge-hub-C9KkDv1A.js → knowledge-hub-CPuzdRiq.js} +52 -51
- package/dist-lib/{markdown-lite-BABX4bcl.js → markdown-lite-Cu62Fl7J.js} +181 -177
- package/dist-lib/{material-preview-docx-lp_xPipj.js → material-preview-docx-CH-09KeC.js} +1 -1
- package/dist-lib/{material-preview-pdf-CKAovvpc.js → material-preview-pdf-CTSo215V.js} +7 -7
- package/dist-lib/{material-preview-pptx-6Byitp0J.js → material-preview-pptx-D8XGDF-u.js} +1 -1
- package/dist-lib/{member-B5WF3FCj.js → member-DKDx77PD.js} +1 -1
- package/dist-lib/{message-kHyjuooj.js → message-BrooQ3Q7.js} +25 -24
- package/dist-lib/{message-D2MSaOMq.js → message-Dievi8Jw.js} +1 -1
- package/dist-lib/{messages-D_VDuKK7.js → messages-xTNmTS9g.js} +16 -15
- package/dist-lib/{meta-CEf_DYcU.js → meta-BD_qYTZu.js} +1 -1
- package/dist-lib/{metrics-hONGW0KG.js → metrics-DiHYqBKB.js} +2 -2
- package/dist-lib/{monitor-DF3WVsVV.js → monitor-BBCu3zRe.js} +8 -8
- package/dist-lib/{monitor-DFmEu6rH.js → monitor-BXsdMJSV.js} +4 -4
- package/dist-lib/{my-access-j53lA6T6.js → my-access-CEGErUgv.js} +4 -4
- package/dist-lib/{my-permissions-C5L8ZN2d.js → my-permissions-wSr5zv7g.js} +23 -22
- package/dist-lib/{new-DfZ61nMQ.js → new-BevAuTe5.js} +14 -12
- package/dist-lib/{ontology-CUH5qslO.js → ontology-DXGSJC-y.js} +145 -142
- package/dist-lib/{ontology-domains-CRC1ZRit.js → ontology-domains-jTG7CZm8.js} +88 -84
- package/dist-lib/ontology-modeling-CjRsa-DR.js +1039 -0
- package/dist-lib/{ontology-modeling-DaSk5fsh.js → ontology-modeling-DOj68TuI.js} +2125 -2117
- package/dist-lib/ontology-scenarios-CcAagMiP.js +660 -0
- package/dist-lib/{ontology-scenarios-DAbyoKV6.js → ontology-scenarios-J5kw6xgi.js} +703 -712
- package/dist-lib/pages-CsexFuEz.js +73 -0
- package/dist-lib/pages.js +3 -3
- package/dist-lib/{permission-CklDU2kO.js → permission-BUXo69Ne.js} +31 -31
- package/dist-lib/{pptx-preview.es-D4ODiBv2.js → pptx-preview.es-AUrdYKu3.js} +2 -2
- package/dist-lib/{preset-Bp_mvsJm.js → preset-gh5SGoYT.js} +9810 -10199
- package/dist-lib/{quota-DLe9so2b.js → quota-D31cXjul.js} +4 -4
- package/dist-lib/{row-CE051ClO.js → row-B5MnGm9M.js} +63 -61
- package/dist-lib/{save-blob-qKrc8-z6.js → save-blob-CiWNK-cX.js} +2 -2
- package/dist-lib/{scenario-mapping-preview-CSDqIN3R.js → scenario-mapping-preview-DQ_OBV4Z.js} +48 -46
- package/dist-lib/{scenario-simple-form-CAkhVgeV.js → scenario-simple-form-DESMvU7A.js} +425 -423
- package/dist-lib/{schedule-B_ujtL3h.js → schedule-BktxwX3S.js} +8 -8
- package/dist-lib/{settings-BIkKTQjc.js → settings-dsB3H65I.js} +147 -146
- package/dist-lib/{shared-Dfz1X4Mq.js → shared-CTCzvhyE.js} +1 -1
- package/dist-lib/{shared-utils-BeRiAkbe.js → shared-utils-BstybhBG.js} +2 -2
- package/dist-lib/{skills-BzpcX5fN.js → skills-CHPlMsgO.js} +40 -39
- package/dist-lib/{source-selection-DOL5LBrV.js → source-selection-tXqc855k.js} +16 -16
- package/dist-lib/{task-config-D0a7TOYt.js → task-config-BiTOiZj0.js} +4 -4
- package/dist-lib/{tech-CH01ekZ5.js → tech-BKlGPkV0.js} +4 -3
- package/dist-lib/{tools-YnTN61uE.js → tools-CouQ4FWk.js} +14 -14
- package/dist-lib/{use-domain-access-CXx1YzE5.js → use-domain-access-BPlNfoiP.js} +13 -13
- package/dist-lib/use-g6-graph-WLX0PweO.js +1119 -0
- package/dist-lib/{use-graph-layers-CowyyYcb.js → use-graph-layers-ja-ZIC_R.js} +50 -48
- package/dist-lib/useClosable-BY7FgWKy.js +59 -0
- package/dist-lib/useForm-Byp1LopG.js +145 -0
- package/dist-lib/{version-control-panel-CLy2ZXI_.js → version-control-panel-CkBm36Yk.js} +27 -26
- package/dist-lib/{version-management-C_v8w1E4.js → version-management-B4kIbdVc.js} +7 -6
- package/dist-lib/{welcome-ChEcA4Ej.js → welcome-F5iZoFB1.js} +4 -3
- package/package.json +2 -3
- package/dist-lib/EvidenceFormList-CrE2FzHk.js +0 -90
- package/dist-lib/ImpactPage-CYiuqy0S.js +0 -68
- package/dist-lib/OntologyMaterializePage-D_fDqYHY.js +0 -134
- package/dist-lib/OntologyNodesPage-5kH7RHwE.js +0 -2844
- package/dist-lib/PlusOutlined-BSTPGLOH.js +0 -21
- package/dist-lib/Skeleton-CxFsInYI.js +0 -671
- package/dist-lib/Table-Civ838nE.js +0 -20514
- package/dist-lib/TermDetailPage-BtkOpbPT.js +0 -263
- package/dist-lib/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist-lib/callSuper-CwIeyYoc.js +0 -7
- package/dist-lib/chunk-6KYCQHYJ-DcgZQlO5.js +0 -1627
- package/dist-lib/context-T27uno74.js +0 -54
- package/dist-lib/d3-force-Cr_oBTiR.js +0 -647
- package/dist-lib/embed-Bs3Hmsyy.js +0 -51377
- package/dist-lib/index-0TvzCTD7.js +0 -2336
- package/dist-lib/index-4tbtbcAt.js +0 -550
- package/dist-lib/index-B1wh6i1C.js +0 -1308
- package/dist-lib/index-BVgdmf6r.js +0 -2487
- package/dist-lib/index-CSnvcFg-.js +0 -543
- package/dist-lib/index-D35Ry0PG.js +0 -1162
- package/dist-lib/index-DC57_dnh.js +0 -604
- package/dist-lib/index-DQ16Zb7x.js +0 -546
- package/dist-lib/index-DRcTwC17.js +0 -418
- package/dist-lib/index-Dd9pPAT3.js +0 -2192
- package/dist-lib/index-DxzorPvG.js +0 -13960
- package/dist-lib/index-If4xc1-H.js +0 -559
- package/dist-lib/index-R71k3nB_.js +0 -710
- package/dist-lib/index-mUlorJxp.js +0 -3279
- package/dist-lib/ontology-modeling-CvJIImxt.js +0 -3612
- package/dist-lib/ontology-scenarios-BRDkk3uA.js +0 -675
- package/dist-lib/pages-CticGC6S.js +0 -512
- package/dist-lib/use-g6-graph-SwJtPLce.js +0 -57552
|
@@ -1,3612 +0,0 @@
|
|
|
1
|
-
import * as l from "react";
|
|
2
|
-
import de, { createContext as Xa, useState as ve, useRef as ge, useEffect as Ee, useMemo as Qt } from "react";
|
|
3
|
-
import { a as Ua } from "./LeftOutlined-DQTflZ6D.js";
|
|
4
|
-
import { bF as F, am as B, bC as Z, bE as Re, c0 as Se, b3 as le, bD as te, ao as qe, aX as ut, bG as lt, bU as je, an as Ye, bB as Je, aL as st, ak as Ke, aB as ft, ah as vt, aA as mt, aj as N, ai as bt, cp as He, cd as Fa, al as gt, aO as ea, be as Lt, aK as qa, aD as At, b2 as ta, aZ as zt, cc as Ya, bM as Ja, bO as it, ct as aa, cb as Za, ck as ct, cw as Bt, c3 as Qa, bP as na, aJ as en, av as tn, bW as an, b1 as jt, cG as nn, aE as rn, aF as Ht, i as on, bR as ln, dA as sn, ap as cn, cj as dn, bK as un, cl as fn, r as X, t as vn, dB as ra, K as mn, dC as bn, df as gn } from "./embed-Bs3Hmsyy.js";
|
|
5
|
-
import { g as hn } from "./collapse-Dtpt-6W_.js";
|
|
6
|
-
import { E as pn, a as yn, b as $n, R as Cn } from "./index-CnLkqTRm.js";
|
|
7
|
-
import { P as xn, Q as Sn } from "./ai-CQ67aRC4.js";
|
|
8
|
-
var oa = /* @__PURE__ */ de.forwardRef(function(e, t) {
|
|
9
|
-
var a = e.prefixCls, n = e.forceRender, r = e.className, o = e.style, s = e.children, i = e.isActive, c = e.role, d = e.classNames, f = e.styles, u = de.useState(i || n), b = F(u, 2), v = b[0], w = b[1];
|
|
10
|
-
return de.useEffect(function() {
|
|
11
|
-
(n || i) && w(!0);
|
|
12
|
-
}, [n, i]), v ? /* @__PURE__ */ de.createElement("div", {
|
|
13
|
-
ref: t,
|
|
14
|
-
className: B("".concat(a, "-content"), Z(Z({}, "".concat(a, "-content-active"), i), "".concat(a, "-content-inactive"), !i), r),
|
|
15
|
-
style: o,
|
|
16
|
-
role: c
|
|
17
|
-
}, /* @__PURE__ */ de.createElement("div", {
|
|
18
|
-
className: B("".concat(a, "-content-box"), d == null ? void 0 : d.body),
|
|
19
|
-
style: f == null ? void 0 : f.body
|
|
20
|
-
}, s)) : null;
|
|
21
|
-
});
|
|
22
|
-
oa.displayName = "PanelContent";
|
|
23
|
-
var wn = ["showArrow", "headerClass", "isActive", "onItemClick", "forceRender", "className", "classNames", "styles", "prefixCls", "collapsible", "accordion", "panelKey", "extra", "header", "expandIcon", "openMotion", "destroyInactivePanel", "children"], ia = /* @__PURE__ */ de.forwardRef(function(e, t) {
|
|
24
|
-
var a = e.showArrow, n = a === void 0 ? !0 : a, r = e.headerClass, o = e.isActive, s = e.onItemClick, i = e.forceRender, c = e.className, d = e.classNames, f = d === void 0 ? {} : d, u = e.styles, b = u === void 0 ? {} : u, v = e.prefixCls, w = e.collapsible, p = e.accordion, C = e.panelKey, m = e.extra, g = e.header, E = e.expandIcon, h = e.openMotion, _ = e.destroyInactivePanel, O = e.children, M = Re(e, wn), y = w === "disabled", $ = m != null && typeof m != "boolean", x = Z(Z(Z({
|
|
25
|
-
onClick: function() {
|
|
26
|
-
s == null || s(C);
|
|
27
|
-
},
|
|
28
|
-
onKeyDown: function(z) {
|
|
29
|
-
(z.key === "Enter" || z.keyCode === Se.ENTER || z.which === Se.ENTER) && (s == null || s(C));
|
|
30
|
-
},
|
|
31
|
-
role: p ? "tab" : "button"
|
|
32
|
-
}, "aria-expanded", o), "aria-disabled", y), "tabIndex", y ? -1 : 0), S = typeof E == "function" ? E(e) : /* @__PURE__ */ de.createElement("i", {
|
|
33
|
-
className: "arrow"
|
|
34
|
-
}), R = S && /* @__PURE__ */ de.createElement("div", le({
|
|
35
|
-
className: "".concat(v, "-expand-icon")
|
|
36
|
-
}, ["header", "icon"].includes(w) ? x : {}), S), D = B("".concat(v, "-item"), Z(Z({}, "".concat(v, "-item-active"), o), "".concat(v, "-item-disabled"), y), c), P = B(r, "".concat(v, "-header"), Z({}, "".concat(v, "-collapsible-").concat(w), !!w), f.header), L = te({
|
|
37
|
-
className: P,
|
|
38
|
-
style: b.header
|
|
39
|
-
}, ["header", "icon"].includes(w) ? {} : x);
|
|
40
|
-
return /* @__PURE__ */ de.createElement("div", le({}, M, {
|
|
41
|
-
ref: t,
|
|
42
|
-
className: D
|
|
43
|
-
}), /* @__PURE__ */ de.createElement("div", L, n && R, /* @__PURE__ */ de.createElement("span", le({
|
|
44
|
-
className: "".concat(v, "-header-text")
|
|
45
|
-
}, w === "header" ? x : {}), g), $ && /* @__PURE__ */ de.createElement("div", {
|
|
46
|
-
className: "".concat(v, "-extra")
|
|
47
|
-
}, m)), /* @__PURE__ */ de.createElement(qe, le({
|
|
48
|
-
visible: o,
|
|
49
|
-
leavedClassName: "".concat(v, "-content-hidden")
|
|
50
|
-
}, h, {
|
|
51
|
-
forceRender: i,
|
|
52
|
-
removeOnLeave: _
|
|
53
|
-
}), function(A, z) {
|
|
54
|
-
var G = A.className, re = A.style;
|
|
55
|
-
return /* @__PURE__ */ de.createElement(oa, {
|
|
56
|
-
ref: z,
|
|
57
|
-
prefixCls: v,
|
|
58
|
-
className: G,
|
|
59
|
-
classNames: f,
|
|
60
|
-
style: re,
|
|
61
|
-
styles: b,
|
|
62
|
-
isActive: o,
|
|
63
|
-
forceRender: i,
|
|
64
|
-
role: p ? "tabpanel" : void 0
|
|
65
|
-
}, O);
|
|
66
|
-
}));
|
|
67
|
-
}), En = ["children", "label", "key", "collapsible", "onItemClick", "destroyInactivePanel"], _n = function(t, a) {
|
|
68
|
-
var n = a.prefixCls, r = a.accordion, o = a.collapsible, s = a.destroyInactivePanel, i = a.onItemClick, c = a.activeKey, d = a.openMotion, f = a.expandIcon;
|
|
69
|
-
return t.map(function(u, b) {
|
|
70
|
-
var v = u.children, w = u.label, p = u.key, C = u.collapsible, m = u.onItemClick, g = u.destroyInactivePanel, E = Re(u, En), h = String(p ?? b), _ = C ?? o, O = g ?? s, M = function(x) {
|
|
71
|
-
_ !== "disabled" && (i(x), m == null || m(x));
|
|
72
|
-
}, y = !1;
|
|
73
|
-
return r ? y = c[0] === h : y = c.indexOf(h) > -1, /* @__PURE__ */ de.createElement(ia, le({}, E, {
|
|
74
|
-
prefixCls: n,
|
|
75
|
-
key: h,
|
|
76
|
-
panelKey: h,
|
|
77
|
-
isActive: y,
|
|
78
|
-
accordion: r,
|
|
79
|
-
openMotion: d,
|
|
80
|
-
expandIcon: f,
|
|
81
|
-
header: w,
|
|
82
|
-
collapsible: _,
|
|
83
|
-
onItemClick: M,
|
|
84
|
-
destroyInactivePanel: O
|
|
85
|
-
}), v);
|
|
86
|
-
});
|
|
87
|
-
}, Pn = function(t, a, n) {
|
|
88
|
-
if (!t) return null;
|
|
89
|
-
var r = n.prefixCls, o = n.accordion, s = n.collapsible, i = n.destroyInactivePanel, c = n.onItemClick, d = n.activeKey, f = n.openMotion, u = n.expandIcon, b = t.key || String(a), v = t.props, w = v.header, p = v.headerClass, C = v.destroyInactivePanel, m = v.collapsible, g = v.onItemClick, E = !1;
|
|
90
|
-
o ? E = d[0] === b : E = d.indexOf(b) > -1;
|
|
91
|
-
var h = m ?? s, _ = function(y) {
|
|
92
|
-
h !== "disabled" && (c(y), g == null || g(y));
|
|
93
|
-
}, O = {
|
|
94
|
-
key: b,
|
|
95
|
-
panelKey: b,
|
|
96
|
-
header: w,
|
|
97
|
-
headerClass: p,
|
|
98
|
-
isActive: E,
|
|
99
|
-
prefixCls: r,
|
|
100
|
-
destroyInactivePanel: C ?? i,
|
|
101
|
-
openMotion: f,
|
|
102
|
-
accordion: o,
|
|
103
|
-
children: t.props.children,
|
|
104
|
-
onItemClick: _,
|
|
105
|
-
expandIcon: u,
|
|
106
|
-
collapsible: h
|
|
107
|
-
};
|
|
108
|
-
return typeof t.type == "string" ? t : (Object.keys(O).forEach(function(M) {
|
|
109
|
-
typeof O[M] > "u" && delete O[M];
|
|
110
|
-
}), /* @__PURE__ */ de.cloneElement(t, O));
|
|
111
|
-
};
|
|
112
|
-
function In(e, t, a) {
|
|
113
|
-
return Array.isArray(e) ? _n(e, a) : ut(t).map(function(n, r) {
|
|
114
|
-
return Pn(n, r, a);
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
function Nn(e) {
|
|
118
|
-
var t = e;
|
|
119
|
-
if (!Array.isArray(t)) {
|
|
120
|
-
var a = Je(t);
|
|
121
|
-
t = a === "number" || a === "string" ? [t] : [];
|
|
122
|
-
}
|
|
123
|
-
return t.map(function(n) {
|
|
124
|
-
return String(n);
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
var On = /* @__PURE__ */ de.forwardRef(function(e, t) {
|
|
128
|
-
var a = e.prefixCls, n = a === void 0 ? "rc-collapse" : a, r = e.destroyInactivePanel, o = r === void 0 ? !1 : r, s = e.style, i = e.accordion, c = e.className, d = e.children, f = e.collapsible, u = e.openMotion, b = e.expandIcon, v = e.activeKey, w = e.defaultActiveKey, p = e.onChange, C = e.items, m = B(n, c), g = lt([], {
|
|
129
|
-
value: v,
|
|
130
|
-
onChange: function($) {
|
|
131
|
-
return p == null ? void 0 : p($);
|
|
132
|
-
},
|
|
133
|
-
defaultValue: w,
|
|
134
|
-
postState: Nn
|
|
135
|
-
}), E = F(g, 2), h = E[0], _ = E[1], O = function($) {
|
|
136
|
-
return _(function() {
|
|
137
|
-
if (i)
|
|
138
|
-
return h[0] === $ ? [] : [$];
|
|
139
|
-
var x = h.indexOf($), S = x > -1;
|
|
140
|
-
return S ? h.filter(function(R) {
|
|
141
|
-
return R !== $;
|
|
142
|
-
}) : [].concat(st(h), [$]);
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
|
-
je(!d, "[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");
|
|
146
|
-
var M = In(C, d, {
|
|
147
|
-
prefixCls: n,
|
|
148
|
-
accordion: i,
|
|
149
|
-
openMotion: u,
|
|
150
|
-
expandIcon: b,
|
|
151
|
-
collapsible: f,
|
|
152
|
-
destroyInactivePanel: o,
|
|
153
|
-
onItemClick: O,
|
|
154
|
-
activeKey: h
|
|
155
|
-
});
|
|
156
|
-
return /* @__PURE__ */ de.createElement("div", le({
|
|
157
|
-
ref: t,
|
|
158
|
-
className: m,
|
|
159
|
-
style: s,
|
|
160
|
-
role: i ? "tablist" : void 0
|
|
161
|
-
}, Ye(e, {
|
|
162
|
-
aria: !0,
|
|
163
|
-
data: !0
|
|
164
|
-
})), M);
|
|
165
|
-
});
|
|
166
|
-
const ht = Object.assign(On, {
|
|
167
|
-
/**
|
|
168
|
-
* @deprecated use `items` instead, will be removed in `v4.0.0`
|
|
169
|
-
*/
|
|
170
|
-
Panel: ia
|
|
171
|
-
});
|
|
172
|
-
ht.Panel;
|
|
173
|
-
const Tn = /* @__PURE__ */ l.forwardRef((e, t) => {
|
|
174
|
-
process.env.NODE_ENV !== "production" && Ke("Collapse.Panel").deprecated(!("disabled" in e), "disabled", 'collapsible="disabled"');
|
|
175
|
-
const {
|
|
176
|
-
getPrefixCls: a
|
|
177
|
-
} = l.useContext(ft), {
|
|
178
|
-
prefixCls: n,
|
|
179
|
-
className: r,
|
|
180
|
-
showArrow: o = !0
|
|
181
|
-
} = e, s = a("collapse", n), i = B({
|
|
182
|
-
[`${s}-no-arrow`]: !o
|
|
183
|
-
}, r);
|
|
184
|
-
return /* @__PURE__ */ l.createElement(ht.Panel, Object.assign({
|
|
185
|
-
ref: t
|
|
186
|
-
}, e, {
|
|
187
|
-
prefixCls: s,
|
|
188
|
-
className: i
|
|
189
|
-
}));
|
|
190
|
-
}), Rn = (e) => {
|
|
191
|
-
const {
|
|
192
|
-
componentCls: t,
|
|
193
|
-
contentBg: a,
|
|
194
|
-
padding: n,
|
|
195
|
-
headerBg: r,
|
|
196
|
-
headerPadding: o,
|
|
197
|
-
collapseHeaderPaddingSM: s,
|
|
198
|
-
collapseHeaderPaddingLG: i,
|
|
199
|
-
collapsePanelBorderRadius: c,
|
|
200
|
-
lineWidth: d,
|
|
201
|
-
lineType: f,
|
|
202
|
-
colorBorder: u,
|
|
203
|
-
colorText: b,
|
|
204
|
-
colorTextHeading: v,
|
|
205
|
-
colorTextDisabled: w,
|
|
206
|
-
fontSizeLG: p,
|
|
207
|
-
lineHeight: C,
|
|
208
|
-
lineHeightLG: m,
|
|
209
|
-
marginSM: g,
|
|
210
|
-
paddingSM: E,
|
|
211
|
-
paddingLG: h,
|
|
212
|
-
paddingXS: _,
|
|
213
|
-
motionDurationSlow: O,
|
|
214
|
-
fontSizeIcon: M,
|
|
215
|
-
contentPadding: y,
|
|
216
|
-
fontHeight: $,
|
|
217
|
-
fontHeightLG: x
|
|
218
|
-
} = e, S = `${N(d)} ${f} ${u}`;
|
|
219
|
-
return {
|
|
220
|
-
[t]: Object.assign(Object.assign({}, bt(e)), {
|
|
221
|
-
backgroundColor: r,
|
|
222
|
-
border: S,
|
|
223
|
-
borderRadius: c,
|
|
224
|
-
"&-rtl": {
|
|
225
|
-
direction: "rtl"
|
|
226
|
-
},
|
|
227
|
-
[`& > ${t}-item`]: {
|
|
228
|
-
borderBottom: S,
|
|
229
|
-
"&:first-child": {
|
|
230
|
-
[`
|
|
231
|
-
&,
|
|
232
|
-
& > ${t}-header`]: {
|
|
233
|
-
borderRadius: `${N(c)} ${N(c)} 0 0`
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
"&:last-child": {
|
|
237
|
-
[`
|
|
238
|
-
&,
|
|
239
|
-
& > ${t}-header`]: {
|
|
240
|
-
borderRadius: `0 0 ${N(c)} ${N(c)}`
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
[`> ${t}-header`]: Object.assign(Object.assign({
|
|
244
|
-
position: "relative",
|
|
245
|
-
display: "flex",
|
|
246
|
-
flexWrap: "nowrap",
|
|
247
|
-
alignItems: "flex-start",
|
|
248
|
-
padding: o,
|
|
249
|
-
color: v,
|
|
250
|
-
lineHeight: C,
|
|
251
|
-
cursor: "pointer",
|
|
252
|
-
transition: `all ${O}, visibility 0s`
|
|
253
|
-
}, He(e)), {
|
|
254
|
-
[`> ${t}-header-text`]: {
|
|
255
|
-
flex: "auto"
|
|
256
|
-
},
|
|
257
|
-
// >>>>> Arrow
|
|
258
|
-
[`${t}-expand-icon`]: {
|
|
259
|
-
height: $,
|
|
260
|
-
display: "flex",
|
|
261
|
-
alignItems: "center",
|
|
262
|
-
paddingInlineEnd: g
|
|
263
|
-
},
|
|
264
|
-
[`${t}-arrow`]: Object.assign(Object.assign({}, Fa()), {
|
|
265
|
-
fontSize: M,
|
|
266
|
-
// when `transform: rotate()` is applied to icon's root element
|
|
267
|
-
transition: `transform ${O}`,
|
|
268
|
-
// when `transform: rotate()` is applied to icon's child element
|
|
269
|
-
svg: {
|
|
270
|
-
transition: `transform ${O}`
|
|
271
|
-
}
|
|
272
|
-
}),
|
|
273
|
-
// >>>>> Text
|
|
274
|
-
[`${t}-header-text`]: {
|
|
275
|
-
marginInlineEnd: "auto"
|
|
276
|
-
}
|
|
277
|
-
}),
|
|
278
|
-
[`${t}-collapsible-header`]: {
|
|
279
|
-
cursor: "default",
|
|
280
|
-
[`${t}-header-text`]: {
|
|
281
|
-
flex: "none",
|
|
282
|
-
cursor: "pointer"
|
|
283
|
-
},
|
|
284
|
-
[`${t}-expand-icon`]: {
|
|
285
|
-
cursor: "pointer"
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
[`${t}-collapsible-icon`]: {
|
|
289
|
-
cursor: "unset",
|
|
290
|
-
[`${t}-expand-icon`]: {
|
|
291
|
-
cursor: "pointer"
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
[`${t}-content`]: {
|
|
296
|
-
color: b,
|
|
297
|
-
backgroundColor: a,
|
|
298
|
-
borderTop: S,
|
|
299
|
-
[`& > ${t}-content-box`]: {
|
|
300
|
-
padding: y
|
|
301
|
-
},
|
|
302
|
-
"&-hidden": {
|
|
303
|
-
display: "none"
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
"&-small": {
|
|
307
|
-
[`> ${t}-item`]: {
|
|
308
|
-
[`> ${t}-header`]: {
|
|
309
|
-
padding: s,
|
|
310
|
-
paddingInlineStart: _,
|
|
311
|
-
[`> ${t}-expand-icon`]: {
|
|
312
|
-
// Arrow offset
|
|
313
|
-
marginInlineStart: e.calc(E).sub(_).equal()
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
[`> ${t}-content > ${t}-content-box`]: {
|
|
317
|
-
padding: E
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
"&-large": {
|
|
322
|
-
[`> ${t}-item`]: {
|
|
323
|
-
fontSize: p,
|
|
324
|
-
lineHeight: m,
|
|
325
|
-
[`> ${t}-header`]: {
|
|
326
|
-
padding: i,
|
|
327
|
-
paddingInlineStart: n,
|
|
328
|
-
[`> ${t}-expand-icon`]: {
|
|
329
|
-
height: x,
|
|
330
|
-
// Arrow offset
|
|
331
|
-
marginInlineStart: e.calc(h).sub(n).equal()
|
|
332
|
-
}
|
|
333
|
-
},
|
|
334
|
-
[`> ${t}-content > ${t}-content-box`]: {
|
|
335
|
-
padding: h
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
},
|
|
339
|
-
[`${t}-item:last-child`]: {
|
|
340
|
-
borderBottom: 0,
|
|
341
|
-
[`> ${t}-content`]: {
|
|
342
|
-
borderRadius: `0 0 ${N(c)} ${N(c)}`
|
|
343
|
-
}
|
|
344
|
-
},
|
|
345
|
-
[`& ${t}-item-disabled > ${t}-header`]: {
|
|
346
|
-
"\n &,\n & > .arrow\n ": {
|
|
347
|
-
color: w,
|
|
348
|
-
cursor: "not-allowed"
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
// ========================== Icon Position ==========================
|
|
352
|
-
[`&${t}-icon-position-end`]: {
|
|
353
|
-
[`& > ${t}-item`]: {
|
|
354
|
-
[`> ${t}-header`]: {
|
|
355
|
-
[`${t}-expand-icon`]: {
|
|
356
|
-
order: 1,
|
|
357
|
-
paddingInlineEnd: 0,
|
|
358
|
-
paddingInlineStart: g
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
})
|
|
364
|
-
};
|
|
365
|
-
}, kn = (e) => {
|
|
366
|
-
const {
|
|
367
|
-
componentCls: t
|
|
368
|
-
} = e, a = `> ${t}-item > ${t}-header ${t}-arrow`;
|
|
369
|
-
return {
|
|
370
|
-
[`${t}-rtl`]: {
|
|
371
|
-
[a]: {
|
|
372
|
-
transform: "rotate(180deg)"
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
}, Dn = (e) => {
|
|
377
|
-
const {
|
|
378
|
-
componentCls: t,
|
|
379
|
-
headerBg: a,
|
|
380
|
-
borderlessContentPadding: n,
|
|
381
|
-
borderlessContentBg: r,
|
|
382
|
-
colorBorder: o
|
|
383
|
-
} = e;
|
|
384
|
-
return {
|
|
385
|
-
[`${t}-borderless`]: {
|
|
386
|
-
backgroundColor: a,
|
|
387
|
-
border: 0,
|
|
388
|
-
[`> ${t}-item`]: {
|
|
389
|
-
borderBottom: `1px solid ${o}`
|
|
390
|
-
},
|
|
391
|
-
[`
|
|
392
|
-
> ${t}-item:last-child,
|
|
393
|
-
> ${t}-item:last-child ${t}-header
|
|
394
|
-
`]: {
|
|
395
|
-
borderRadius: 0
|
|
396
|
-
},
|
|
397
|
-
[`> ${t}-item:last-child`]: {
|
|
398
|
-
borderBottom: 0
|
|
399
|
-
},
|
|
400
|
-
[`> ${t}-item > ${t}-content`]: {
|
|
401
|
-
backgroundColor: r,
|
|
402
|
-
borderTop: 0
|
|
403
|
-
},
|
|
404
|
-
[`> ${t}-item > ${t}-content > ${t}-content-box`]: {
|
|
405
|
-
padding: n
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
}, Mn = (e) => {
|
|
410
|
-
const {
|
|
411
|
-
componentCls: t,
|
|
412
|
-
paddingSM: a
|
|
413
|
-
} = e;
|
|
414
|
-
return {
|
|
415
|
-
[`${t}-ghost`]: {
|
|
416
|
-
backgroundColor: "transparent",
|
|
417
|
-
border: 0,
|
|
418
|
-
[`> ${t}-item`]: {
|
|
419
|
-
borderBottom: 0,
|
|
420
|
-
[`> ${t}-content`]: {
|
|
421
|
-
backgroundColor: "transparent",
|
|
422
|
-
border: 0,
|
|
423
|
-
[`> ${t}-content-box`]: {
|
|
424
|
-
paddingBlock: a
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
};
|
|
430
|
-
}, Ln = (e) => ({
|
|
431
|
-
headerPadding: `${e.paddingSM}px ${e.padding}px`,
|
|
432
|
-
headerBg: e.colorFillAlter,
|
|
433
|
-
contentPadding: `${e.padding}px 16px`,
|
|
434
|
-
// Fixed Value
|
|
435
|
-
contentBg: e.colorBgContainer,
|
|
436
|
-
borderlessContentPadding: `${e.paddingXXS}px 16px ${e.padding}px`,
|
|
437
|
-
borderlessContentBg: "transparent"
|
|
438
|
-
}), An = vt("Collapse", (e) => {
|
|
439
|
-
const t = mt(e, {
|
|
440
|
-
collapseHeaderPaddingSM: `${N(e.paddingXS)} ${N(e.paddingSM)}`,
|
|
441
|
-
collapseHeaderPaddingLG: `${N(e.padding)} ${N(e.paddingLG)}`,
|
|
442
|
-
collapsePanelBorderRadius: e.borderRadiusLG
|
|
443
|
-
});
|
|
444
|
-
return [Rn(t), Dn(t), Mn(t), kn(t), hn(t)];
|
|
445
|
-
}, Ln), la = /* @__PURE__ */ l.forwardRef((e, t) => {
|
|
446
|
-
const {
|
|
447
|
-
getPrefixCls: a,
|
|
448
|
-
direction: n,
|
|
449
|
-
expandIcon: r,
|
|
450
|
-
className: o,
|
|
451
|
-
style: s
|
|
452
|
-
} = gt("collapse"), {
|
|
453
|
-
prefixCls: i,
|
|
454
|
-
className: c,
|
|
455
|
-
rootClassName: d,
|
|
456
|
-
style: f,
|
|
457
|
-
bordered: u = !0,
|
|
458
|
-
ghost: b,
|
|
459
|
-
size: v,
|
|
460
|
-
expandIconPosition: w = "start",
|
|
461
|
-
children: p,
|
|
462
|
-
destroyInactivePanel: C,
|
|
463
|
-
destroyOnHidden: m,
|
|
464
|
-
expandIcon: g
|
|
465
|
-
} = e, E = ea((L) => {
|
|
466
|
-
var A;
|
|
467
|
-
return (A = v ?? L) !== null && A !== void 0 ? A : "middle";
|
|
468
|
-
}), h = a("collapse", i), _ = a(), [O, M, y] = An(h);
|
|
469
|
-
if (process.env.NODE_ENV !== "production") {
|
|
470
|
-
const L = Ke("Collapse");
|
|
471
|
-
process.env.NODE_ENV !== "production" && L(w !== "left" && w !== "right", "deprecated", "`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead."), L.deprecated(!("destroyInactivePanel" in e), "destroyInactivePanel", "destroyOnHidden");
|
|
472
|
-
}
|
|
473
|
-
const $ = l.useMemo(() => w === "left" ? "start" : w === "right" ? "end" : w, [w]), x = g ?? r, S = l.useCallback((L = {}) => {
|
|
474
|
-
const A = typeof x == "function" ? x(L) : /* @__PURE__ */ l.createElement(Ua, {
|
|
475
|
-
rotate: L.isActive ? n === "rtl" ? -90 : 90 : void 0,
|
|
476
|
-
"aria-label": L.isActive ? "expanded" : "collapsed"
|
|
477
|
-
});
|
|
478
|
-
return Lt(A, () => {
|
|
479
|
-
var z;
|
|
480
|
-
return {
|
|
481
|
-
className: B((z = A.props) === null || z === void 0 ? void 0 : z.className, `${h}-arrow`)
|
|
482
|
-
};
|
|
483
|
-
});
|
|
484
|
-
}, [x, h, n]), R = B(`${h}-icon-position-${$}`, {
|
|
485
|
-
[`${h}-borderless`]: !u,
|
|
486
|
-
[`${h}-rtl`]: n === "rtl",
|
|
487
|
-
[`${h}-ghost`]: !!b,
|
|
488
|
-
[`${h}-${E}`]: E !== "middle"
|
|
489
|
-
}, o, c, d, M, y), D = l.useMemo(() => Object.assign(Object.assign({}, qa(_)), {
|
|
490
|
-
motionAppear: !1,
|
|
491
|
-
leavedClassName: `${h}-content-hidden`
|
|
492
|
-
}), [_, h]), P = l.useMemo(() => p ? ut(p).map((L, A) => {
|
|
493
|
-
var z, G;
|
|
494
|
-
const re = L.props;
|
|
495
|
-
if (re != null && re.disabled) {
|
|
496
|
-
const T = (z = L.key) !== null && z !== void 0 ? z : String(A), j = Object.assign(Object.assign({}, At(L.props, ["disabled"])), {
|
|
497
|
-
key: T,
|
|
498
|
-
collapsible: (G = re.collapsible) !== null && G !== void 0 ? G : "disabled"
|
|
499
|
-
});
|
|
500
|
-
return Lt(L, j);
|
|
501
|
-
}
|
|
502
|
-
return L;
|
|
503
|
-
}) : null, [p]);
|
|
504
|
-
return O(
|
|
505
|
-
// @ts-ignore
|
|
506
|
-
/* @__PURE__ */ l.createElement(ht, Object.assign({
|
|
507
|
-
ref: t,
|
|
508
|
-
openMotion: D
|
|
509
|
-
}, At(e, ["rootClassName"]), {
|
|
510
|
-
expandIcon: S,
|
|
511
|
-
prefixCls: h,
|
|
512
|
-
className: R,
|
|
513
|
-
style: Object.assign(Object.assign({}, s), f),
|
|
514
|
-
// TODO: In the future, destroyInactivePanel in rc-collapse needs to be upgrade to destroyOnHidden
|
|
515
|
-
destroyInactivePanel: m ?? C
|
|
516
|
-
}), P)
|
|
517
|
-
);
|
|
518
|
-
});
|
|
519
|
-
process.env.NODE_ENV !== "production" && (la.displayName = "Collapse");
|
|
520
|
-
const jr = Object.assign(la, {
|
|
521
|
-
Panel: Tn
|
|
522
|
-
});
|
|
523
|
-
var zn = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { tag: "path", attrs: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, name: "plus", theme: "outlined" }, Bn = function(t, a) {
|
|
524
|
-
return /* @__PURE__ */ l.createElement(ta, le({}, t, {
|
|
525
|
-
ref: a,
|
|
526
|
-
icon: zn
|
|
527
|
-
}));
|
|
528
|
-
}, sa = /* @__PURE__ */ l.forwardRef(Bn);
|
|
529
|
-
process.env.NODE_ENV !== "production" && (sa.displayName = "PlusOutlined");
|
|
530
|
-
const Ze = /* @__PURE__ */ Xa(null);
|
|
531
|
-
var jn = function(t) {
|
|
532
|
-
var a = t.activeTabOffset, n = t.horizontal, r = t.rtl, o = t.indicator, s = o === void 0 ? {} : o, i = s.size, c = s.align, d = c === void 0 ? "center" : c, f = ve(), u = F(f, 2), b = u[0], v = u[1], w = ge(), p = de.useCallback(function(m) {
|
|
533
|
-
return typeof i == "function" ? i(m) : typeof i == "number" ? i : m;
|
|
534
|
-
}, [i]);
|
|
535
|
-
function C() {
|
|
536
|
-
zt.cancel(w.current);
|
|
537
|
-
}
|
|
538
|
-
return Ee(function() {
|
|
539
|
-
var m = {};
|
|
540
|
-
if (a)
|
|
541
|
-
if (n) {
|
|
542
|
-
m.width = p(a.width);
|
|
543
|
-
var g = r ? "right" : "left";
|
|
544
|
-
d === "start" && (m[g] = a[g]), d === "center" && (m[g] = a[g] + a.width / 2, m.transform = r ? "translateX(50%)" : "translateX(-50%)"), d === "end" && (m[g] = a[g] + a.width, m.transform = "translateX(-100%)");
|
|
545
|
-
} else
|
|
546
|
-
m.height = p(a.height), d === "start" && (m.top = a.top), d === "center" && (m.top = a.top + a.height / 2, m.transform = "translateY(-50%)"), d === "end" && (m.top = a.top + a.height, m.transform = "translateY(-100%)");
|
|
547
|
-
return C(), w.current = zt(function() {
|
|
548
|
-
var E = b && m && Object.keys(m).every(function(h) {
|
|
549
|
-
var _ = m[h], O = b[h];
|
|
550
|
-
return typeof _ == "number" && typeof O == "number" ? Math.round(_) === Math.round(O) : _ === O;
|
|
551
|
-
});
|
|
552
|
-
E || v(m);
|
|
553
|
-
}), C;
|
|
554
|
-
}, [JSON.stringify(a), n, r, d, p]), {
|
|
555
|
-
style: b
|
|
556
|
-
};
|
|
557
|
-
}, Kt = {
|
|
558
|
-
width: 0,
|
|
559
|
-
height: 0,
|
|
560
|
-
left: 0,
|
|
561
|
-
top: 0
|
|
562
|
-
};
|
|
563
|
-
function Hn(e, t, a) {
|
|
564
|
-
return Qt(function() {
|
|
565
|
-
for (var n, r = /* @__PURE__ */ new Map(), o = t.get((n = e[0]) === null || n === void 0 ? void 0 : n.key) || Kt, s = o.left + o.width, i = 0; i < e.length; i += 1) {
|
|
566
|
-
var c = e[i].key, d = t.get(c);
|
|
567
|
-
if (!d) {
|
|
568
|
-
var f;
|
|
569
|
-
d = t.get((f = e[i - 1]) === null || f === void 0 ? void 0 : f.key) || Kt;
|
|
570
|
-
}
|
|
571
|
-
var u = r.get(c) || te({}, d);
|
|
572
|
-
u.right = s - u.left - u.width, r.set(c, u);
|
|
573
|
-
}
|
|
574
|
-
return r;
|
|
575
|
-
}, [e.map(function(n) {
|
|
576
|
-
return n.key;
|
|
577
|
-
}).join("_"), t, a]);
|
|
578
|
-
}
|
|
579
|
-
function Vt(e, t) {
|
|
580
|
-
var a = l.useRef(e), n = l.useState({}), r = F(n, 2), o = r[1];
|
|
581
|
-
function s(i) {
|
|
582
|
-
var c = typeof i == "function" ? i(a.current) : i;
|
|
583
|
-
c !== a.current && t(c, a.current), a.current = c, o({});
|
|
584
|
-
}
|
|
585
|
-
return [a.current, s];
|
|
586
|
-
}
|
|
587
|
-
var Kn = 0.1, Gt = 0.01, Fe = 20, Wt = Math.pow(0.995, Fe);
|
|
588
|
-
function Vn(e, t) {
|
|
589
|
-
var a = ve(), n = F(a, 2), r = n[0], o = n[1], s = ve(0), i = F(s, 2), c = i[0], d = i[1], f = ve(0), u = F(f, 2), b = u[0], v = u[1], w = ve(), p = F(w, 2), C = p[0], m = p[1], g = ge();
|
|
590
|
-
function E($) {
|
|
591
|
-
var x = $.touches[0], S = x.screenX, R = x.screenY;
|
|
592
|
-
o({
|
|
593
|
-
x: S,
|
|
594
|
-
y: R
|
|
595
|
-
}), window.clearInterval(g.current);
|
|
596
|
-
}
|
|
597
|
-
function h($) {
|
|
598
|
-
if (r) {
|
|
599
|
-
var x = $.touches[0], S = x.screenX, R = x.screenY;
|
|
600
|
-
o({
|
|
601
|
-
x: S,
|
|
602
|
-
y: R
|
|
603
|
-
});
|
|
604
|
-
var D = S - r.x, P = R - r.y;
|
|
605
|
-
t(D, P);
|
|
606
|
-
var L = Date.now();
|
|
607
|
-
d(L), v(L - c), m({
|
|
608
|
-
x: D,
|
|
609
|
-
y: P
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
function _() {
|
|
614
|
-
if (r && (o(null), m(null), C)) {
|
|
615
|
-
var $ = C.x / b, x = C.y / b, S = Math.abs($), R = Math.abs(x);
|
|
616
|
-
if (Math.max(S, R) < Kn) return;
|
|
617
|
-
var D = $, P = x;
|
|
618
|
-
g.current = window.setInterval(function() {
|
|
619
|
-
if (Math.abs(D) < Gt && Math.abs(P) < Gt) {
|
|
620
|
-
window.clearInterval(g.current);
|
|
621
|
-
return;
|
|
622
|
-
}
|
|
623
|
-
D *= Wt, P *= Wt, t(D * Fe, P * Fe);
|
|
624
|
-
}, Fe);
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
var O = ge();
|
|
628
|
-
function M($) {
|
|
629
|
-
var x = $.deltaX, S = $.deltaY, R = 0, D = Math.abs(x), P = Math.abs(S);
|
|
630
|
-
D === P ? R = O.current === "x" ? x : S : D > P ? (R = x, O.current = "x") : (R = S, O.current = "y"), t(-R, -R) && $.preventDefault();
|
|
631
|
-
}
|
|
632
|
-
var y = ge(null);
|
|
633
|
-
y.current = {
|
|
634
|
-
onTouchStart: E,
|
|
635
|
-
onTouchMove: h,
|
|
636
|
-
onTouchEnd: _,
|
|
637
|
-
onWheel: M
|
|
638
|
-
}, l.useEffect(function() {
|
|
639
|
-
function $(D) {
|
|
640
|
-
y.current.onTouchStart(D);
|
|
641
|
-
}
|
|
642
|
-
function x(D) {
|
|
643
|
-
y.current.onTouchMove(D);
|
|
644
|
-
}
|
|
645
|
-
function S(D) {
|
|
646
|
-
y.current.onTouchEnd(D);
|
|
647
|
-
}
|
|
648
|
-
function R(D) {
|
|
649
|
-
y.current.onWheel(D);
|
|
650
|
-
}
|
|
651
|
-
return document.addEventListener("touchmove", x, {
|
|
652
|
-
passive: !1
|
|
653
|
-
}), document.addEventListener("touchend", S, {
|
|
654
|
-
passive: !0
|
|
655
|
-
}), e.current.addEventListener("touchstart", $, {
|
|
656
|
-
passive: !0
|
|
657
|
-
}), e.current.addEventListener("wheel", R, {
|
|
658
|
-
passive: !1
|
|
659
|
-
}), function() {
|
|
660
|
-
document.removeEventListener("touchmove", x), document.removeEventListener("touchend", S);
|
|
661
|
-
};
|
|
662
|
-
}, []);
|
|
663
|
-
}
|
|
664
|
-
function ca(e) {
|
|
665
|
-
var t = ve(0), a = F(t, 2), n = a[0], r = a[1], o = ge(0), s = ge();
|
|
666
|
-
return s.current = e, Ya(function() {
|
|
667
|
-
var i;
|
|
668
|
-
(i = s.current) === null || i === void 0 || i.call(s);
|
|
669
|
-
}, [n]), function() {
|
|
670
|
-
o.current === n && (o.current += 1, r(o.current));
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
function Gn(e) {
|
|
674
|
-
var t = ge([]), a = ve({}), n = F(a, 2), r = n[1], o = ge(typeof e == "function" ? e() : e), s = ca(function() {
|
|
675
|
-
var c = o.current;
|
|
676
|
-
t.current.forEach(function(d) {
|
|
677
|
-
c = d(c);
|
|
678
|
-
}), t.current = [], o.current = c, r({});
|
|
679
|
-
});
|
|
680
|
-
function i(c) {
|
|
681
|
-
t.current.push(c), s();
|
|
682
|
-
}
|
|
683
|
-
return [o.current, i];
|
|
684
|
-
}
|
|
685
|
-
var Xt = {
|
|
686
|
-
width: 0,
|
|
687
|
-
height: 0,
|
|
688
|
-
left: 0,
|
|
689
|
-
top: 0,
|
|
690
|
-
right: 0
|
|
691
|
-
};
|
|
692
|
-
function Wn(e, t, a, n, r, o, s) {
|
|
693
|
-
var i = s.tabs, c = s.tabPosition, d = s.rtl, f, u, b;
|
|
694
|
-
return ["top", "bottom"].includes(c) ? (f = "width", u = d ? "right" : "left", b = Math.abs(a)) : (f = "height", u = "top", b = -a), Qt(function() {
|
|
695
|
-
if (!i.length)
|
|
696
|
-
return [0, 0];
|
|
697
|
-
for (var v = i.length, w = v, p = 0; p < v; p += 1) {
|
|
698
|
-
var C = e.get(i[p].key) || Xt;
|
|
699
|
-
if (Math.floor(C[u] + C[f]) > Math.floor(b + t)) {
|
|
700
|
-
w = p - 1;
|
|
701
|
-
break;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
for (var m = 0, g = v - 1; g >= 0; g -= 1) {
|
|
705
|
-
var E = e.get(i[g].key) || Xt;
|
|
706
|
-
if (E[u] < b) {
|
|
707
|
-
m = g + 1;
|
|
708
|
-
break;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
return m > w ? [0, -1] : [m, w];
|
|
712
|
-
}, [e, t, n, r, o, b, c, i.map(function(v) {
|
|
713
|
-
return v.key;
|
|
714
|
-
}).join("_"), d]);
|
|
715
|
-
}
|
|
716
|
-
function Ut(e) {
|
|
717
|
-
var t;
|
|
718
|
-
return e instanceof Map ? (t = {}, e.forEach(function(a, n) {
|
|
719
|
-
t[n] = a;
|
|
720
|
-
})) : t = e, JSON.stringify(t);
|
|
721
|
-
}
|
|
722
|
-
var Xn = "TABS_DQ";
|
|
723
|
-
function da(e) {
|
|
724
|
-
return String(e).replace(/"/g, Xn);
|
|
725
|
-
}
|
|
726
|
-
function pt(e, t, a, n) {
|
|
727
|
-
return (
|
|
728
|
-
// Only editable tabs can be removed
|
|
729
|
-
!(!a || // Tabs cannot be removed when disabled
|
|
730
|
-
n || // closable is false
|
|
731
|
-
e === !1 || // If closable is undefined, the remove button should be hidden when closeIcon is null or false
|
|
732
|
-
e === void 0 && (t === !1 || t === null))
|
|
733
|
-
);
|
|
734
|
-
}
|
|
735
|
-
var ua = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
736
|
-
var a = e.prefixCls, n = e.editable, r = e.locale, o = e.style;
|
|
737
|
-
return !n || n.showAdd === !1 ? null : /* @__PURE__ */ l.createElement("button", {
|
|
738
|
-
ref: t,
|
|
739
|
-
type: "button",
|
|
740
|
-
className: "".concat(a, "-nav-add"),
|
|
741
|
-
style: o,
|
|
742
|
-
"aria-label": (r == null ? void 0 : r.addAriaLabel) || "Add tab",
|
|
743
|
-
onClick: function(i) {
|
|
744
|
-
n.onEdit("add", {
|
|
745
|
-
event: i
|
|
746
|
-
});
|
|
747
|
-
}
|
|
748
|
-
}, n.addIcon || "+");
|
|
749
|
-
}), dt = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
750
|
-
var a = e.position, n = e.prefixCls, r = e.extra;
|
|
751
|
-
if (!r)
|
|
752
|
-
return null;
|
|
753
|
-
var o, s = {};
|
|
754
|
-
return Je(r) === "object" && !/* @__PURE__ */ l.isValidElement(r) ? s = r : s.right = r, a === "right" && (o = s.right), a === "left" && (o = s.left), o ? /* @__PURE__ */ l.createElement("div", {
|
|
755
|
-
className: "".concat(n, "-extra-content"),
|
|
756
|
-
ref: t
|
|
757
|
-
}, o) : null;
|
|
758
|
-
});
|
|
759
|
-
process.env.NODE_ENV !== "production" && (dt.displayName = "ExtraContent");
|
|
760
|
-
var Un = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
761
|
-
var a = e.prefixCls, n = e.id, r = e.tabs, o = e.locale, s = e.mobile, i = e.more, c = i === void 0 ? {} : i, d = e.style, f = e.className, u = e.editable, b = e.tabBarGutter, v = e.rtl, w = e.removeAriaLabel, p = e.onTabClick, C = e.getPopupContainer, m = e.popupClassName, g = ve(!1), E = F(g, 2), h = E[0], _ = E[1], O = ve(null), M = F(O, 2), y = M[0], $ = M[1], x = c.icon, S = x === void 0 ? "More" : x, R = "".concat(n, "-more-popup"), D = "".concat(a, "-dropdown"), P = y !== null ? "".concat(R, "-").concat(y) : null, L = o == null ? void 0 : o.dropdownAriaLabel;
|
|
762
|
-
function A(k, q) {
|
|
763
|
-
k.preventDefault(), k.stopPropagation(), u.onEdit("remove", {
|
|
764
|
-
key: q,
|
|
765
|
-
event: k
|
|
766
|
-
});
|
|
767
|
-
}
|
|
768
|
-
var z = /* @__PURE__ */ l.createElement(pn, {
|
|
769
|
-
onClick: function(q) {
|
|
770
|
-
var Q = q.key, oe = q.domEvent;
|
|
771
|
-
p(Q, oe), _(!1);
|
|
772
|
-
},
|
|
773
|
-
prefixCls: "".concat(D, "-menu"),
|
|
774
|
-
id: R,
|
|
775
|
-
tabIndex: -1,
|
|
776
|
-
role: "listbox",
|
|
777
|
-
"aria-activedescendant": P,
|
|
778
|
-
selectedKeys: [y],
|
|
779
|
-
"aria-label": L !== void 0 ? L : "expanded dropdown"
|
|
780
|
-
}, r.map(function(k) {
|
|
781
|
-
var q = k.closable, Q = k.disabled, oe = k.closeIcon, se = k.key, ue = k.label, ie = pt(q, oe, u, Q);
|
|
782
|
-
return /* @__PURE__ */ l.createElement(yn, {
|
|
783
|
-
key: se,
|
|
784
|
-
id: "".concat(R, "-").concat(se),
|
|
785
|
-
role: "option",
|
|
786
|
-
"aria-controls": n && "".concat(n, "-panel-").concat(se),
|
|
787
|
-
disabled: Q
|
|
788
|
-
}, /* @__PURE__ */ l.createElement("span", null, ue), ie && /* @__PURE__ */ l.createElement("button", {
|
|
789
|
-
type: "button",
|
|
790
|
-
"aria-label": w || "remove",
|
|
791
|
-
tabIndex: 0,
|
|
792
|
-
className: "".concat(D, "-menu-item-remove"),
|
|
793
|
-
onClick: function(U) {
|
|
794
|
-
U.stopPropagation(), A(U, se);
|
|
795
|
-
}
|
|
796
|
-
}, oe || u.removeIcon || "×"));
|
|
797
|
-
}));
|
|
798
|
-
function G(k) {
|
|
799
|
-
for (var q = r.filter(function(ie) {
|
|
800
|
-
return !ie.disabled;
|
|
801
|
-
}), Q = q.findIndex(function(ie) {
|
|
802
|
-
return ie.key === y;
|
|
803
|
-
}) || 0, oe = q.length, se = 0; se < oe; se += 1) {
|
|
804
|
-
Q = (Q + k + oe) % oe;
|
|
805
|
-
var ue = q[Q];
|
|
806
|
-
if (!ue.disabled) {
|
|
807
|
-
$(ue.key);
|
|
808
|
-
return;
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
function re(k) {
|
|
813
|
-
var q = k.which;
|
|
814
|
-
if (!h) {
|
|
815
|
-
[Se.DOWN, Se.SPACE, Se.ENTER].includes(q) && (_(!0), k.preventDefault());
|
|
816
|
-
return;
|
|
817
|
-
}
|
|
818
|
-
switch (q) {
|
|
819
|
-
case Se.UP:
|
|
820
|
-
G(-1), k.preventDefault();
|
|
821
|
-
break;
|
|
822
|
-
case Se.DOWN:
|
|
823
|
-
G(1), k.preventDefault();
|
|
824
|
-
break;
|
|
825
|
-
case Se.ESC:
|
|
826
|
-
_(!1);
|
|
827
|
-
break;
|
|
828
|
-
case Se.SPACE:
|
|
829
|
-
case Se.ENTER:
|
|
830
|
-
y !== null && p(y, k);
|
|
831
|
-
break;
|
|
832
|
-
}
|
|
833
|
-
}
|
|
834
|
-
Ee(function() {
|
|
835
|
-
var k = document.getElementById(P);
|
|
836
|
-
k && k.scrollIntoView && k.scrollIntoView(!1);
|
|
837
|
-
}, [y]), Ee(function() {
|
|
838
|
-
h || $(null);
|
|
839
|
-
}, [h]);
|
|
840
|
-
var T = Z({}, v ? "marginRight" : "marginLeft", b);
|
|
841
|
-
r.length || (T.visibility = "hidden", T.order = 1);
|
|
842
|
-
var j = B(Z({}, "".concat(D, "-rtl"), v)), me = s ? null : /* @__PURE__ */ l.createElement($n, le({
|
|
843
|
-
prefixCls: D,
|
|
844
|
-
overlay: z,
|
|
845
|
-
visible: r.length ? h : !1,
|
|
846
|
-
onVisibleChange: _,
|
|
847
|
-
overlayClassName: B(j, m),
|
|
848
|
-
mouseEnterDelay: 0.1,
|
|
849
|
-
mouseLeaveDelay: 0.1,
|
|
850
|
-
getPopupContainer: C
|
|
851
|
-
}, c), /* @__PURE__ */ l.createElement("button", {
|
|
852
|
-
type: "button",
|
|
853
|
-
className: "".concat(a, "-nav-more"),
|
|
854
|
-
style: T,
|
|
855
|
-
"aria-haspopup": "listbox",
|
|
856
|
-
"aria-controls": R,
|
|
857
|
-
id: "".concat(n, "-more"),
|
|
858
|
-
"aria-expanded": h,
|
|
859
|
-
onKeyDown: re
|
|
860
|
-
}, S));
|
|
861
|
-
return /* @__PURE__ */ l.createElement("div", {
|
|
862
|
-
className: B("".concat(a, "-nav-operations"), f),
|
|
863
|
-
style: d,
|
|
864
|
-
ref: t
|
|
865
|
-
}, me, /* @__PURE__ */ l.createElement(ua, {
|
|
866
|
-
prefixCls: a,
|
|
867
|
-
locale: o,
|
|
868
|
-
editable: u
|
|
869
|
-
}));
|
|
870
|
-
});
|
|
871
|
-
const Fn = /* @__PURE__ */ l.memo(Un, function(e, t) {
|
|
872
|
-
return (
|
|
873
|
-
// https://github.com/ant-design/ant-design/issues/32544
|
|
874
|
-
// We'd better remove syntactic sugar in `rc-menu` since this has perf issue
|
|
875
|
-
t.tabMoving
|
|
876
|
-
);
|
|
877
|
-
});
|
|
878
|
-
var qn = function(t) {
|
|
879
|
-
var a = t.prefixCls, n = t.id, r = t.active, o = t.focus, s = t.tab, i = s.key, c = s.label, d = s.disabled, f = s.closeIcon, u = s.icon, b = t.closable, v = t.renderWrapper, w = t.removeAriaLabel, p = t.editable, C = t.onClick, m = t.onFocus, g = t.onBlur, E = t.onKeyDown, h = t.onMouseDown, _ = t.onMouseUp, O = t.style, M = t.tabCount, y = t.currentPosition, $ = "".concat(a, "-tab"), x = pt(b, f, p, d);
|
|
880
|
-
function S(A) {
|
|
881
|
-
d || C(A);
|
|
882
|
-
}
|
|
883
|
-
function R(A) {
|
|
884
|
-
A.preventDefault(), A.stopPropagation(), p.onEdit("remove", {
|
|
885
|
-
key: i,
|
|
886
|
-
event: A
|
|
887
|
-
});
|
|
888
|
-
}
|
|
889
|
-
var D = l.useMemo(function() {
|
|
890
|
-
return u && typeof c == "string" ? /* @__PURE__ */ l.createElement("span", null, c) : c;
|
|
891
|
-
}, [c, u]), P = l.useRef(null);
|
|
892
|
-
l.useEffect(function() {
|
|
893
|
-
o && P.current && P.current.focus();
|
|
894
|
-
}, [o]);
|
|
895
|
-
var L = /* @__PURE__ */ l.createElement("div", {
|
|
896
|
-
key: i,
|
|
897
|
-
"data-node-key": da(i),
|
|
898
|
-
className: B($, Z(Z(Z(Z({}, "".concat($, "-with-remove"), x), "".concat($, "-active"), r), "".concat($, "-disabled"), d), "".concat($, "-focus"), o)),
|
|
899
|
-
style: O,
|
|
900
|
-
onClick: S
|
|
901
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
902
|
-
ref: P,
|
|
903
|
-
role: "tab",
|
|
904
|
-
"aria-selected": r,
|
|
905
|
-
id: n && "".concat(n, "-tab-").concat(i),
|
|
906
|
-
className: "".concat($, "-btn"),
|
|
907
|
-
"aria-controls": n && "".concat(n, "-panel-").concat(i),
|
|
908
|
-
"aria-disabled": d,
|
|
909
|
-
tabIndex: d ? null : r ? 0 : -1,
|
|
910
|
-
onClick: function(z) {
|
|
911
|
-
z.stopPropagation(), S(z);
|
|
912
|
-
},
|
|
913
|
-
onKeyDown: E,
|
|
914
|
-
onMouseDown: h,
|
|
915
|
-
onMouseUp: _,
|
|
916
|
-
onFocus: m,
|
|
917
|
-
onBlur: g
|
|
918
|
-
}, o && /* @__PURE__ */ l.createElement("div", {
|
|
919
|
-
"aria-live": "polite",
|
|
920
|
-
style: {
|
|
921
|
-
width: 0,
|
|
922
|
-
height: 0,
|
|
923
|
-
position: "absolute",
|
|
924
|
-
overflow: "hidden",
|
|
925
|
-
opacity: 0
|
|
926
|
-
}
|
|
927
|
-
}, "Tab ".concat(y, " of ").concat(M)), u && /* @__PURE__ */ l.createElement("span", {
|
|
928
|
-
className: "".concat($, "-icon")
|
|
929
|
-
}, u), c && D), x && /* @__PURE__ */ l.createElement("button", {
|
|
930
|
-
type: "button",
|
|
931
|
-
role: "tab",
|
|
932
|
-
"aria-label": w || "remove",
|
|
933
|
-
tabIndex: r ? 0 : -1,
|
|
934
|
-
className: "".concat($, "-remove"),
|
|
935
|
-
onClick: function(z) {
|
|
936
|
-
z.stopPropagation(), R(z);
|
|
937
|
-
}
|
|
938
|
-
}, f || p.removeIcon || "×"));
|
|
939
|
-
return v ? v(L) : L;
|
|
940
|
-
}, Yn = function(t, a) {
|
|
941
|
-
var n = t.offsetWidth, r = t.offsetHeight, o = t.offsetTop, s = t.offsetLeft, i = t.getBoundingClientRect(), c = i.width, d = i.height, f = i.left, u = i.top;
|
|
942
|
-
return Math.abs(c - n) < 1 ? [c, d, f - a.left, u - a.top] : [n, r, s, o];
|
|
943
|
-
}, Le = function(t) {
|
|
944
|
-
var a = t.current || {}, n = a.offsetWidth, r = n === void 0 ? 0 : n, o = a.offsetHeight, s = o === void 0 ? 0 : o;
|
|
945
|
-
if (t.current) {
|
|
946
|
-
var i = t.current.getBoundingClientRect(), c = i.width, d = i.height;
|
|
947
|
-
if (Math.abs(c - r) < 1)
|
|
948
|
-
return [c, d];
|
|
949
|
-
}
|
|
950
|
-
return [r, s];
|
|
951
|
-
}, Ue = function(t, a) {
|
|
952
|
-
return t[a ? 0 : 1];
|
|
953
|
-
}, Ft = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
954
|
-
var a = e.className, n = e.style, r = e.id, o = e.animated, s = e.activeKey, i = e.rtl, c = e.extra, d = e.editable, f = e.locale, u = e.tabPosition, b = e.tabBarGutter, v = e.children, w = e.onTabClick, p = e.onTabScroll, C = e.indicator, m = l.useContext(Ze), g = m.prefixCls, E = m.tabs, h = ge(null), _ = ge(null), O = ge(null), M = ge(null), y = ge(null), $ = ge(null), x = ge(null), S = u === "top" || u === "bottom", R = Vt(0, function(Y, I) {
|
|
955
|
-
S && p && p({
|
|
956
|
-
direction: Y > I ? "left" : "right"
|
|
957
|
-
});
|
|
958
|
-
}), D = F(R, 2), P = D[0], L = D[1], A = Vt(0, function(Y, I) {
|
|
959
|
-
!S && p && p({
|
|
960
|
-
direction: Y > I ? "top" : "bottom"
|
|
961
|
-
});
|
|
962
|
-
}), z = F(A, 2), G = z[0], re = z[1], T = ve([0, 0]), j = F(T, 2), me = j[0], k = j[1], q = ve([0, 0]), Q = F(q, 2), oe = Q[0], se = Q[1], ue = ve([0, 0]), ie = F(ue, 2), he = ie[0], U = ie[1], pe = ve([0, 0]), fe = F(pe, 2), W = fe[0], ye = fe[1], be = Gn(/* @__PURE__ */ new Map()), $e = F(be, 2), Ae = $e[0], Qe = $e[1], Oe = Hn(E, Ae, oe[0]), J = Ue(me, S), ce = Ue(oe, S), we = Ue(he, S), _e = Ue(W, S), Pe = Math.floor(J) < Math.floor(ce + we), Ce = Pe ? J - _e : J - we, Pa = "".concat(g, "-nav-operations-hidden"), Ne = 0, Te = 0;
|
|
963
|
-
S && i ? (Ne = 0, Te = Math.max(0, ce - Ce)) : (Ne = Math.min(0, Ce - ce), Te = 0);
|
|
964
|
-
function et(Y) {
|
|
965
|
-
return Y < Ne ? Ne : Y > Te ? Te : Y;
|
|
966
|
-
}
|
|
967
|
-
var tt = ge(null), Ia = ve(), $t = F(Ia, 2), Ve = $t[0], Ct = $t[1];
|
|
968
|
-
function at() {
|
|
969
|
-
Ct(Date.now());
|
|
970
|
-
}
|
|
971
|
-
function nt() {
|
|
972
|
-
tt.current && clearTimeout(tt.current);
|
|
973
|
-
}
|
|
974
|
-
Vn(M, function(Y, I) {
|
|
975
|
-
function V(ee, ne) {
|
|
976
|
-
ee(function(xe) {
|
|
977
|
-
var Me = et(xe + ne);
|
|
978
|
-
return Me;
|
|
979
|
-
});
|
|
980
|
-
}
|
|
981
|
-
return Pe ? (S ? V(L, Y) : V(re, I), nt(), at(), !0) : !1;
|
|
982
|
-
}), Ee(function() {
|
|
983
|
-
return nt(), Ve && (tt.current = setTimeout(function() {
|
|
984
|
-
Ct(0);
|
|
985
|
-
}, 100)), nt;
|
|
986
|
-
}, [Ve]);
|
|
987
|
-
var Na = Wn(
|
|
988
|
-
Oe,
|
|
989
|
-
// Container
|
|
990
|
-
Ce,
|
|
991
|
-
// Transform
|
|
992
|
-
S ? P : G,
|
|
993
|
-
// Tabs
|
|
994
|
-
ce,
|
|
995
|
-
// Add
|
|
996
|
-
we,
|
|
997
|
-
// Operation
|
|
998
|
-
_e,
|
|
999
|
-
te(te({}, e), {}, {
|
|
1000
|
-
tabs: E
|
|
1001
|
-
})
|
|
1002
|
-
), xt = F(Na, 2), Oa = xt[0], Ta = xt[1], St = Ja(function() {
|
|
1003
|
-
var Y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : s, I = Oe.get(Y) || {
|
|
1004
|
-
width: 0,
|
|
1005
|
-
height: 0,
|
|
1006
|
-
left: 0,
|
|
1007
|
-
right: 0,
|
|
1008
|
-
top: 0
|
|
1009
|
-
};
|
|
1010
|
-
if (S) {
|
|
1011
|
-
var V = P;
|
|
1012
|
-
i ? I.right < P ? V = I.right : I.right + I.width > P + Ce && (V = I.right + I.width - Ce) : I.left < -P ? V = -I.left : I.left + I.width > -P + Ce && (V = -(I.left + I.width - Ce)), re(0), L(et(V));
|
|
1013
|
-
} else {
|
|
1014
|
-
var ee = G;
|
|
1015
|
-
I.top < -G ? ee = -I.top : I.top + I.height > -G + Ce && (ee = -(I.top + I.height - Ce)), L(0), re(et(ee));
|
|
1016
|
-
}
|
|
1017
|
-
}), Ra = ve(), wt = F(Ra, 2), ke = wt[0], ze = wt[1], ka = ve(!1), Et = F(ka, 2), Da = Et[0], _t = Et[1], Ie = E.filter(function(Y) {
|
|
1018
|
-
return !Y.disabled;
|
|
1019
|
-
}).map(function(Y) {
|
|
1020
|
-
return Y.key;
|
|
1021
|
-
}), De = function(I) {
|
|
1022
|
-
var V = Ie.indexOf(ke || s), ee = Ie.length, ne = (V + I + ee) % ee, xe = Ie[ne];
|
|
1023
|
-
ze(xe);
|
|
1024
|
-
}, Pt = function(I, V) {
|
|
1025
|
-
var ee = Ie.indexOf(I), ne = E.find(function(Me) {
|
|
1026
|
-
return Me.key === I;
|
|
1027
|
-
}), xe = pt(ne == null ? void 0 : ne.closable, ne == null ? void 0 : ne.closeIcon, d, ne == null ? void 0 : ne.disabled);
|
|
1028
|
-
xe && (V.preventDefault(), V.stopPropagation(), d.onEdit("remove", {
|
|
1029
|
-
key: I,
|
|
1030
|
-
event: V
|
|
1031
|
-
}), ee === Ie.length - 1 ? De(-1) : De(1));
|
|
1032
|
-
}, Ma = function(I, V) {
|
|
1033
|
-
_t(!0), V.button === 1 && Pt(I, V);
|
|
1034
|
-
}, La = function(I) {
|
|
1035
|
-
var V = I.code, ee = i && S, ne = Ie[0], xe = Ie[Ie.length - 1];
|
|
1036
|
-
switch (V) {
|
|
1037
|
-
// LEFT
|
|
1038
|
-
case "ArrowLeft": {
|
|
1039
|
-
S && De(ee ? 1 : -1);
|
|
1040
|
-
break;
|
|
1041
|
-
}
|
|
1042
|
-
// RIGHT
|
|
1043
|
-
case "ArrowRight": {
|
|
1044
|
-
S && De(ee ? -1 : 1);
|
|
1045
|
-
break;
|
|
1046
|
-
}
|
|
1047
|
-
// UP
|
|
1048
|
-
case "ArrowUp": {
|
|
1049
|
-
I.preventDefault(), S || De(-1);
|
|
1050
|
-
break;
|
|
1051
|
-
}
|
|
1052
|
-
// DOWN
|
|
1053
|
-
case "ArrowDown": {
|
|
1054
|
-
I.preventDefault(), S || De(1);
|
|
1055
|
-
break;
|
|
1056
|
-
}
|
|
1057
|
-
// HOME
|
|
1058
|
-
case "Home": {
|
|
1059
|
-
I.preventDefault(), ze(ne);
|
|
1060
|
-
break;
|
|
1061
|
-
}
|
|
1062
|
-
// END
|
|
1063
|
-
case "End": {
|
|
1064
|
-
I.preventDefault(), ze(xe);
|
|
1065
|
-
break;
|
|
1066
|
-
}
|
|
1067
|
-
// Enter & Space
|
|
1068
|
-
case "Enter":
|
|
1069
|
-
case "Space": {
|
|
1070
|
-
I.preventDefault(), w(ke ?? s, I);
|
|
1071
|
-
break;
|
|
1072
|
-
}
|
|
1073
|
-
// Backspace
|
|
1074
|
-
case "Backspace":
|
|
1075
|
-
case "Delete": {
|
|
1076
|
-
Pt(ke, I);
|
|
1077
|
-
break;
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
}, Ge = {};
|
|
1081
|
-
S ? Ge[i ? "marginRight" : "marginLeft"] = b : Ge.marginTop = b;
|
|
1082
|
-
var It = E.map(function(Y, I) {
|
|
1083
|
-
var V = Y.key;
|
|
1084
|
-
return /* @__PURE__ */ l.createElement(qn, {
|
|
1085
|
-
id: r,
|
|
1086
|
-
prefixCls: g,
|
|
1087
|
-
key: V,
|
|
1088
|
-
tab: Y,
|
|
1089
|
-
style: I === 0 ? void 0 : Ge,
|
|
1090
|
-
closable: Y.closable,
|
|
1091
|
-
editable: d,
|
|
1092
|
-
active: V === s,
|
|
1093
|
-
focus: V === ke,
|
|
1094
|
-
renderWrapper: v,
|
|
1095
|
-
removeAriaLabel: f == null ? void 0 : f.removeAriaLabel,
|
|
1096
|
-
tabCount: Ie.length,
|
|
1097
|
-
currentPosition: I + 1,
|
|
1098
|
-
onClick: function(ne) {
|
|
1099
|
-
w(V, ne);
|
|
1100
|
-
},
|
|
1101
|
-
onKeyDown: La,
|
|
1102
|
-
onFocus: function() {
|
|
1103
|
-
Da || ze(V), St(V), at(), M.current && (i || (M.current.scrollLeft = 0), M.current.scrollTop = 0);
|
|
1104
|
-
},
|
|
1105
|
-
onBlur: function() {
|
|
1106
|
-
ze(void 0);
|
|
1107
|
-
},
|
|
1108
|
-
onMouseDown: function(ne) {
|
|
1109
|
-
return Ma(V, ne);
|
|
1110
|
-
},
|
|
1111
|
-
onMouseUp: function() {
|
|
1112
|
-
_t(!1);
|
|
1113
|
-
}
|
|
1114
|
-
});
|
|
1115
|
-
}), Nt = function() {
|
|
1116
|
-
return Qe(function() {
|
|
1117
|
-
var I, V = /* @__PURE__ */ new Map(), ee = (I = y.current) === null || I === void 0 ? void 0 : I.getBoundingClientRect();
|
|
1118
|
-
return E.forEach(function(ne) {
|
|
1119
|
-
var xe, Me = ne.key, Mt = (xe = y.current) === null || xe === void 0 ? void 0 : xe.querySelector('[data-node-key="'.concat(da(Me), '"]'));
|
|
1120
|
-
if (Mt) {
|
|
1121
|
-
var Ha = Yn(Mt, ee), Xe = F(Ha, 4), Ka = Xe[0], Va = Xe[1], Ga = Xe[2], Wa = Xe[3];
|
|
1122
|
-
V.set(Me, {
|
|
1123
|
-
width: Ka,
|
|
1124
|
-
height: Va,
|
|
1125
|
-
left: Ga,
|
|
1126
|
-
top: Wa
|
|
1127
|
-
});
|
|
1128
|
-
}
|
|
1129
|
-
}), V;
|
|
1130
|
-
});
|
|
1131
|
-
};
|
|
1132
|
-
Ee(function() {
|
|
1133
|
-
Nt();
|
|
1134
|
-
}, [E.map(function(Y) {
|
|
1135
|
-
return Y.key;
|
|
1136
|
-
}).join("_")]);
|
|
1137
|
-
var We = ca(function() {
|
|
1138
|
-
var Y = Le(h), I = Le(_), V = Le(O);
|
|
1139
|
-
k([Y[0] - I[0] - V[0], Y[1] - I[1] - V[1]]);
|
|
1140
|
-
var ee = Le(x);
|
|
1141
|
-
U(ee);
|
|
1142
|
-
var ne = Le($);
|
|
1143
|
-
ye(ne);
|
|
1144
|
-
var xe = Le(y);
|
|
1145
|
-
se([xe[0] - ee[0], xe[1] - ee[1]]), Nt();
|
|
1146
|
-
}), Aa = E.slice(0, Oa), za = E.slice(Ta + 1), Ot = [].concat(st(Aa), st(za)), Tt = Oe.get(s), Ba = jn({
|
|
1147
|
-
activeTabOffset: Tt,
|
|
1148
|
-
horizontal: S,
|
|
1149
|
-
indicator: C,
|
|
1150
|
-
rtl: i
|
|
1151
|
-
}), ja = Ba.style;
|
|
1152
|
-
Ee(function() {
|
|
1153
|
-
St();
|
|
1154
|
-
}, [s, Ne, Te, Ut(Tt), Ut(Oe), S]), Ee(function() {
|
|
1155
|
-
We();
|
|
1156
|
-
}, [i]);
|
|
1157
|
-
var Rt = !!Ot.length, Be = "".concat(g, "-nav-wrap"), rt, ot, kt, Dt;
|
|
1158
|
-
return S ? i ? (ot = P > 0, rt = P !== Te) : (rt = P < 0, ot = P !== Ne) : (kt = G < 0, Dt = G !== Ne), /* @__PURE__ */ l.createElement(it, {
|
|
1159
|
-
onResize: We
|
|
1160
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
1161
|
-
ref: aa(t, h),
|
|
1162
|
-
role: "tablist",
|
|
1163
|
-
"aria-orientation": S ? "horizontal" : "vertical",
|
|
1164
|
-
className: B("".concat(g, "-nav"), a),
|
|
1165
|
-
style: n,
|
|
1166
|
-
onKeyDown: function() {
|
|
1167
|
-
at();
|
|
1168
|
-
}
|
|
1169
|
-
}, /* @__PURE__ */ l.createElement(dt, {
|
|
1170
|
-
ref: _,
|
|
1171
|
-
position: "left",
|
|
1172
|
-
extra: c,
|
|
1173
|
-
prefixCls: g
|
|
1174
|
-
}), /* @__PURE__ */ l.createElement(it, {
|
|
1175
|
-
onResize: We
|
|
1176
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
1177
|
-
className: B(Be, Z(Z(Z(Z({}, "".concat(Be, "-ping-left"), rt), "".concat(Be, "-ping-right"), ot), "".concat(Be, "-ping-top"), kt), "".concat(Be, "-ping-bottom"), Dt)),
|
|
1178
|
-
ref: M
|
|
1179
|
-
}, /* @__PURE__ */ l.createElement(it, {
|
|
1180
|
-
onResize: We
|
|
1181
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
1182
|
-
ref: y,
|
|
1183
|
-
className: "".concat(g, "-nav-list"),
|
|
1184
|
-
style: {
|
|
1185
|
-
transform: "translate(".concat(P, "px, ").concat(G, "px)"),
|
|
1186
|
-
transition: Ve ? "none" : void 0
|
|
1187
|
-
}
|
|
1188
|
-
}, It, /* @__PURE__ */ l.createElement(ua, {
|
|
1189
|
-
ref: x,
|
|
1190
|
-
prefixCls: g,
|
|
1191
|
-
locale: f,
|
|
1192
|
-
editable: d,
|
|
1193
|
-
style: te(te({}, It.length === 0 ? void 0 : Ge), {}, {
|
|
1194
|
-
visibility: Rt ? "hidden" : null
|
|
1195
|
-
})
|
|
1196
|
-
}), /* @__PURE__ */ l.createElement("div", {
|
|
1197
|
-
className: B("".concat(g, "-ink-bar"), Z({}, "".concat(g, "-ink-bar-animated"), o.inkBar)),
|
|
1198
|
-
style: ja
|
|
1199
|
-
}))))), /* @__PURE__ */ l.createElement(Fn, le({}, e, {
|
|
1200
|
-
removeAriaLabel: f == null ? void 0 : f.removeAriaLabel,
|
|
1201
|
-
ref: $,
|
|
1202
|
-
prefixCls: g,
|
|
1203
|
-
tabs: Ot,
|
|
1204
|
-
className: !Rt && Pa,
|
|
1205
|
-
tabMoving: !!Ve
|
|
1206
|
-
})), /* @__PURE__ */ l.createElement(dt, {
|
|
1207
|
-
ref: O,
|
|
1208
|
-
position: "right",
|
|
1209
|
-
extra: c,
|
|
1210
|
-
prefixCls: g
|
|
1211
|
-
})));
|
|
1212
|
-
}), yt = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
1213
|
-
var a = e.prefixCls, n = e.className, r = e.style, o = e.id, s = e.active, i = e.tabKey, c = e.children;
|
|
1214
|
-
return /* @__PURE__ */ l.createElement("div", {
|
|
1215
|
-
id: o && "".concat(o, "-panel-").concat(i),
|
|
1216
|
-
role: "tabpanel",
|
|
1217
|
-
tabIndex: s ? 0 : -1,
|
|
1218
|
-
"aria-labelledby": o && "".concat(o, "-tab-").concat(i),
|
|
1219
|
-
"aria-hidden": !s,
|
|
1220
|
-
style: r,
|
|
1221
|
-
className: B(a, s && "".concat(a, "-active"), n),
|
|
1222
|
-
ref: t
|
|
1223
|
-
}, c);
|
|
1224
|
-
});
|
|
1225
|
-
process.env.NODE_ENV !== "production" && (yt.displayName = "TabPane");
|
|
1226
|
-
var Jn = ["renderTabBar"], Zn = ["label", "key"], fa = function(t) {
|
|
1227
|
-
var a = t.renderTabBar, n = Re(t, Jn), r = l.useContext(Ze), o = r.tabs;
|
|
1228
|
-
if (a) {
|
|
1229
|
-
var s = te(te({}, n), {}, {
|
|
1230
|
-
// Legacy support. We do not use this actually
|
|
1231
|
-
panes: o.map(function(i) {
|
|
1232
|
-
var c = i.label, d = i.key, f = Re(i, Zn);
|
|
1233
|
-
return /* @__PURE__ */ l.createElement(yt, le({
|
|
1234
|
-
tab: c,
|
|
1235
|
-
key: d,
|
|
1236
|
-
tabKey: d
|
|
1237
|
-
}, f));
|
|
1238
|
-
})
|
|
1239
|
-
});
|
|
1240
|
-
return a(s, Ft);
|
|
1241
|
-
}
|
|
1242
|
-
return /* @__PURE__ */ l.createElement(Ft, n);
|
|
1243
|
-
};
|
|
1244
|
-
process.env.NODE_ENV !== "production" && (fa.displayName = "TabNavListWrapper");
|
|
1245
|
-
var Qn = ["key", "forceRender", "style", "className", "destroyInactiveTabPane"], er = function(t) {
|
|
1246
|
-
var a = t.id, n = t.activeKey, r = t.animated, o = t.tabPosition, s = t.destroyInactiveTabPane, i = l.useContext(Ze), c = i.prefixCls, d = i.tabs, f = r.tabPane, u = "".concat(c, "-tabpane");
|
|
1247
|
-
return /* @__PURE__ */ l.createElement("div", {
|
|
1248
|
-
className: B("".concat(c, "-content-holder"))
|
|
1249
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
1250
|
-
className: B("".concat(c, "-content"), "".concat(c, "-content-").concat(o), Z({}, "".concat(c, "-content-animated"), f))
|
|
1251
|
-
}, d.map(function(b) {
|
|
1252
|
-
var v = b.key, w = b.forceRender, p = b.style, C = b.className, m = b.destroyInactiveTabPane, g = Re(b, Qn), E = v === n;
|
|
1253
|
-
return /* @__PURE__ */ l.createElement(qe, le({
|
|
1254
|
-
key: v,
|
|
1255
|
-
visible: E,
|
|
1256
|
-
forceRender: w,
|
|
1257
|
-
removeOnLeave: !!(s || m),
|
|
1258
|
-
leavedClassName: "".concat(u, "-hidden")
|
|
1259
|
-
}, r.tabPaneMotion), function(h, _) {
|
|
1260
|
-
var O = h.style, M = h.className;
|
|
1261
|
-
return /* @__PURE__ */ l.createElement(yt, le({}, g, {
|
|
1262
|
-
prefixCls: u,
|
|
1263
|
-
id: a,
|
|
1264
|
-
tabKey: v,
|
|
1265
|
-
animated: f,
|
|
1266
|
-
active: E,
|
|
1267
|
-
style: te(te({}, p), O),
|
|
1268
|
-
className: B(C, M),
|
|
1269
|
-
ref: _
|
|
1270
|
-
}));
|
|
1271
|
-
});
|
|
1272
|
-
})));
|
|
1273
|
-
};
|
|
1274
|
-
function tr() {
|
|
1275
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
1276
|
-
inkBar: !0,
|
|
1277
|
-
tabPane: !1
|
|
1278
|
-
}, t;
|
|
1279
|
-
return e === !1 ? t = {
|
|
1280
|
-
inkBar: !1,
|
|
1281
|
-
tabPane: !1
|
|
1282
|
-
} : e === !0 ? t = {
|
|
1283
|
-
inkBar: !0,
|
|
1284
|
-
tabPane: !1
|
|
1285
|
-
} : t = te({
|
|
1286
|
-
inkBar: !0
|
|
1287
|
-
}, Je(e) === "object" ? e : {}), t.tabPaneMotion && t.tabPane === void 0 && (t.tabPane = !0), !t.tabPaneMotion && t.tabPane && (process.env.NODE_ENV !== "production" && je(!1, "`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."), t.tabPane = !1), t;
|
|
1288
|
-
}
|
|
1289
|
-
var ar = ["id", "prefixCls", "className", "items", "direction", "activeKey", "defaultActiveKey", "editable", "animated", "tabPosition", "tabBarGutter", "tabBarStyle", "tabBarExtraContent", "locale", "more", "destroyInactiveTabPane", "renderTabBar", "onChange", "onTabClick", "onTabScroll", "getPopupContainer", "popupClassName", "indicator"], qt = 0, va = /* @__PURE__ */ l.forwardRef(function(e, t) {
|
|
1290
|
-
var a = e.id, n = e.prefixCls, r = n === void 0 ? "rc-tabs" : n, o = e.className, s = e.items, i = e.direction, c = e.activeKey, d = e.defaultActiveKey, f = e.editable, u = e.animated, b = e.tabPosition, v = b === void 0 ? "top" : b, w = e.tabBarGutter, p = e.tabBarStyle, C = e.tabBarExtraContent, m = e.locale, g = e.more, E = e.destroyInactiveTabPane, h = e.renderTabBar, _ = e.onChange, O = e.onTabClick, M = e.onTabScroll, y = e.getPopupContainer, $ = e.popupClassName, x = e.indicator, S = Re(e, ar), R = l.useMemo(function() {
|
|
1291
|
-
return (s || []).filter(function(W) {
|
|
1292
|
-
return W && Je(W) === "object" && "key" in W;
|
|
1293
|
-
});
|
|
1294
|
-
}, [s]), D = i === "rtl", P = tr(u), L = ve(!1), A = F(L, 2), z = A[0], G = A[1];
|
|
1295
|
-
Ee(function() {
|
|
1296
|
-
G(Za());
|
|
1297
|
-
}, []);
|
|
1298
|
-
var re = lt(function() {
|
|
1299
|
-
var W;
|
|
1300
|
-
return (W = R[0]) === null || W === void 0 ? void 0 : W.key;
|
|
1301
|
-
}, {
|
|
1302
|
-
value: c,
|
|
1303
|
-
defaultValue: d
|
|
1304
|
-
}), T = F(re, 2), j = T[0], me = T[1], k = ve(function() {
|
|
1305
|
-
return R.findIndex(function(W) {
|
|
1306
|
-
return W.key === j;
|
|
1307
|
-
});
|
|
1308
|
-
}), q = F(k, 2), Q = q[0], oe = q[1];
|
|
1309
|
-
Ee(function() {
|
|
1310
|
-
var W = R.findIndex(function(be) {
|
|
1311
|
-
return be.key === j;
|
|
1312
|
-
});
|
|
1313
|
-
if (W === -1) {
|
|
1314
|
-
var ye;
|
|
1315
|
-
W = Math.max(0, Math.min(Q, R.length - 1)), me((ye = R[W]) === null || ye === void 0 ? void 0 : ye.key);
|
|
1316
|
-
}
|
|
1317
|
-
oe(W);
|
|
1318
|
-
}, [R.map(function(W) {
|
|
1319
|
-
return W.key;
|
|
1320
|
-
}).join("_"), j, Q]);
|
|
1321
|
-
var se = lt(null, {
|
|
1322
|
-
value: a
|
|
1323
|
-
}), ue = F(se, 2), ie = ue[0], he = ue[1];
|
|
1324
|
-
Ee(function() {
|
|
1325
|
-
a || (he("rc-tabs-".concat(process.env.NODE_ENV === "test" ? "test" : qt)), qt += 1);
|
|
1326
|
-
}, []);
|
|
1327
|
-
function U(W, ye) {
|
|
1328
|
-
O == null || O(W, ye);
|
|
1329
|
-
var be = W !== j;
|
|
1330
|
-
me(W), be && (_ == null || _(W));
|
|
1331
|
-
}
|
|
1332
|
-
var pe = {
|
|
1333
|
-
id: ie,
|
|
1334
|
-
activeKey: j,
|
|
1335
|
-
animated: P,
|
|
1336
|
-
tabPosition: v,
|
|
1337
|
-
rtl: D,
|
|
1338
|
-
mobile: z
|
|
1339
|
-
}, fe = te(te({}, pe), {}, {
|
|
1340
|
-
editable: f,
|
|
1341
|
-
locale: m,
|
|
1342
|
-
more: g,
|
|
1343
|
-
tabBarGutter: w,
|
|
1344
|
-
onTabClick: U,
|
|
1345
|
-
onTabScroll: M,
|
|
1346
|
-
extra: C,
|
|
1347
|
-
style: p,
|
|
1348
|
-
panes: null,
|
|
1349
|
-
getPopupContainer: y,
|
|
1350
|
-
popupClassName: $,
|
|
1351
|
-
indicator: x
|
|
1352
|
-
});
|
|
1353
|
-
return /* @__PURE__ */ l.createElement(Ze.Provider, {
|
|
1354
|
-
value: {
|
|
1355
|
-
tabs: R,
|
|
1356
|
-
prefixCls: r
|
|
1357
|
-
}
|
|
1358
|
-
}, /* @__PURE__ */ l.createElement("div", le({
|
|
1359
|
-
ref: t,
|
|
1360
|
-
id: a,
|
|
1361
|
-
className: B(r, "".concat(r, "-").concat(v), Z(Z(Z({}, "".concat(r, "-mobile"), z), "".concat(r, "-editable"), f), "".concat(r, "-rtl"), D), o)
|
|
1362
|
-
}, S), /* @__PURE__ */ l.createElement(fa, le({}, fe, {
|
|
1363
|
-
renderTabBar: h
|
|
1364
|
-
})), /* @__PURE__ */ l.createElement(er, le({
|
|
1365
|
-
destroyInactiveTabPane: E
|
|
1366
|
-
}, pe, {
|
|
1367
|
-
animated: P
|
|
1368
|
-
}))));
|
|
1369
|
-
});
|
|
1370
|
-
process.env.NODE_ENV !== "production" && (va.displayName = "Tabs");
|
|
1371
|
-
const nr = {
|
|
1372
|
-
motionAppear: !1,
|
|
1373
|
-
motionEnter: !0,
|
|
1374
|
-
motionLeave: !0
|
|
1375
|
-
};
|
|
1376
|
-
function rr(e, t = {
|
|
1377
|
-
inkBar: !0,
|
|
1378
|
-
tabPane: !1
|
|
1379
|
-
}) {
|
|
1380
|
-
let a;
|
|
1381
|
-
return t === !1 ? a = {
|
|
1382
|
-
inkBar: !1,
|
|
1383
|
-
tabPane: !1
|
|
1384
|
-
} : t === !0 ? a = {
|
|
1385
|
-
inkBar: !0,
|
|
1386
|
-
tabPane: !0
|
|
1387
|
-
} : a = Object.assign({
|
|
1388
|
-
inkBar: !0
|
|
1389
|
-
}, typeof t == "object" ? t : {}), a.tabPane && (a.tabPaneMotion = Object.assign(Object.assign({}, nr), {
|
|
1390
|
-
motionName: ct(e, "switch")
|
|
1391
|
-
})), a;
|
|
1392
|
-
}
|
|
1393
|
-
var or = function(e, t) {
|
|
1394
|
-
var a = {};
|
|
1395
|
-
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
1396
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
1397
|
-
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
1398
|
-
return a;
|
|
1399
|
-
};
|
|
1400
|
-
function ir(e) {
|
|
1401
|
-
return e.filter((t) => t);
|
|
1402
|
-
}
|
|
1403
|
-
function lr(e, t) {
|
|
1404
|
-
if (process.env.NODE_ENV !== "production" && Ke("Tabs").deprecated(!t, "Tabs.TabPane", "items"), e)
|
|
1405
|
-
return e.map((n) => {
|
|
1406
|
-
var r;
|
|
1407
|
-
const o = (r = n.destroyOnHidden) !== null && r !== void 0 ? r : n.destroyInactiveTabPane;
|
|
1408
|
-
return Object.assign(Object.assign({}, n), {
|
|
1409
|
-
// TODO: In the future, destroyInactiveTabPane in rc-tabs needs to be upgrade to destroyOnHidden
|
|
1410
|
-
destroyInactiveTabPane: o
|
|
1411
|
-
});
|
|
1412
|
-
});
|
|
1413
|
-
const a = ut(t).map((n) => {
|
|
1414
|
-
if (/* @__PURE__ */ l.isValidElement(n)) {
|
|
1415
|
-
const {
|
|
1416
|
-
key: r,
|
|
1417
|
-
props: o
|
|
1418
|
-
} = n, s = o || {}, {
|
|
1419
|
-
tab: i
|
|
1420
|
-
} = s, c = or(s, ["tab"]);
|
|
1421
|
-
return Object.assign(Object.assign({
|
|
1422
|
-
key: String(r)
|
|
1423
|
-
}, c), {
|
|
1424
|
-
label: i
|
|
1425
|
-
});
|
|
1426
|
-
}
|
|
1427
|
-
return null;
|
|
1428
|
-
});
|
|
1429
|
-
return ir(a);
|
|
1430
|
-
}
|
|
1431
|
-
const sr = (e) => {
|
|
1432
|
-
const {
|
|
1433
|
-
componentCls: t,
|
|
1434
|
-
motionDurationSlow: a
|
|
1435
|
-
} = e;
|
|
1436
|
-
return [
|
|
1437
|
-
{
|
|
1438
|
-
[t]: {
|
|
1439
|
-
[`${t}-switch`]: {
|
|
1440
|
-
"&-appear, &-enter": {
|
|
1441
|
-
transition: "none",
|
|
1442
|
-
"&-start": {
|
|
1443
|
-
opacity: 0
|
|
1444
|
-
},
|
|
1445
|
-
"&-active": {
|
|
1446
|
-
opacity: 1,
|
|
1447
|
-
transition: `opacity ${a}`
|
|
1448
|
-
}
|
|
1449
|
-
},
|
|
1450
|
-
"&-leave": {
|
|
1451
|
-
position: "absolute",
|
|
1452
|
-
transition: "none",
|
|
1453
|
-
inset: 0,
|
|
1454
|
-
"&-start": {
|
|
1455
|
-
opacity: 1
|
|
1456
|
-
},
|
|
1457
|
-
"&-active": {
|
|
1458
|
-
opacity: 0,
|
|
1459
|
-
transition: `opacity ${a}`
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
}
|
|
1464
|
-
},
|
|
1465
|
-
// Follow code may reuse in other components
|
|
1466
|
-
[Bt(e, "slide-up"), Bt(e, "slide-down")]
|
|
1467
|
-
];
|
|
1468
|
-
}, cr = (e) => {
|
|
1469
|
-
const {
|
|
1470
|
-
componentCls: t,
|
|
1471
|
-
tabsCardPadding: a,
|
|
1472
|
-
cardBg: n,
|
|
1473
|
-
cardGutter: r,
|
|
1474
|
-
colorBorderSecondary: o,
|
|
1475
|
-
itemSelectedColor: s
|
|
1476
|
-
} = e;
|
|
1477
|
-
return {
|
|
1478
|
-
[`${t}-card`]: {
|
|
1479
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1480
|
-
[`${t}-tab`]: {
|
|
1481
|
-
margin: 0,
|
|
1482
|
-
padding: a,
|
|
1483
|
-
background: n,
|
|
1484
|
-
border: `${N(e.lineWidth)} ${e.lineType} ${o}`,
|
|
1485
|
-
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`
|
|
1486
|
-
},
|
|
1487
|
-
[`${t}-tab-active`]: {
|
|
1488
|
-
color: s,
|
|
1489
|
-
background: e.colorBgContainer
|
|
1490
|
-
},
|
|
1491
|
-
[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]: na(e, -3),
|
|
1492
|
-
[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]: {
|
|
1493
|
-
outline: "none"
|
|
1494
|
-
},
|
|
1495
|
-
[`${t}-ink-bar`]: {
|
|
1496
|
-
visibility: "hidden"
|
|
1497
|
-
}
|
|
1498
|
-
},
|
|
1499
|
-
// ========================== Top & Bottom ==========================
|
|
1500
|
-
[`&${t}-top, &${t}-bottom`]: {
|
|
1501
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1502
|
-
[`${t}-tab + ${t}-tab`]: {
|
|
1503
|
-
marginLeft: {
|
|
1504
|
-
_skip_check_: !0,
|
|
1505
|
-
value: N(r)
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
|
-
[`&${t}-top`]: {
|
|
1511
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1512
|
-
[`${t}-tab`]: {
|
|
1513
|
-
borderRadius: `${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)} 0 0`
|
|
1514
|
-
},
|
|
1515
|
-
[`${t}-tab-active`]: {
|
|
1516
|
-
borderBottomColor: e.colorBgContainer
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
},
|
|
1520
|
-
[`&${t}-bottom`]: {
|
|
1521
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1522
|
-
[`${t}-tab`]: {
|
|
1523
|
-
borderRadius: `0 0 ${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)}`
|
|
1524
|
-
},
|
|
1525
|
-
[`${t}-tab-active`]: {
|
|
1526
|
-
borderTopColor: e.colorBgContainer
|
|
1527
|
-
}
|
|
1528
|
-
}
|
|
1529
|
-
},
|
|
1530
|
-
// ========================== Left & Right ==========================
|
|
1531
|
-
[`&${t}-left, &${t}-right`]: {
|
|
1532
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1533
|
-
[`${t}-tab + ${t}-tab`]: {
|
|
1534
|
-
marginTop: N(r)
|
|
1535
|
-
}
|
|
1536
|
-
}
|
|
1537
|
-
},
|
|
1538
|
-
[`&${t}-left`]: {
|
|
1539
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1540
|
-
[`${t}-tab`]: {
|
|
1541
|
-
borderRadius: {
|
|
1542
|
-
_skip_check_: !0,
|
|
1543
|
-
value: `${N(e.borderRadiusLG)} 0 0 ${N(e.borderRadiusLG)}`
|
|
1544
|
-
}
|
|
1545
|
-
},
|
|
1546
|
-
[`${t}-tab-active`]: {
|
|
1547
|
-
borderRightColor: {
|
|
1548
|
-
_skip_check_: !0,
|
|
1549
|
-
value: e.colorBgContainer
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
}
|
|
1553
|
-
},
|
|
1554
|
-
[`&${t}-right`]: {
|
|
1555
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1556
|
-
[`${t}-tab`]: {
|
|
1557
|
-
borderRadius: {
|
|
1558
|
-
_skip_check_: !0,
|
|
1559
|
-
value: `0 ${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)} 0`
|
|
1560
|
-
}
|
|
1561
|
-
},
|
|
1562
|
-
[`${t}-tab-active`]: {
|
|
1563
|
-
borderLeftColor: {
|
|
1564
|
-
_skip_check_: !0,
|
|
1565
|
-
value: e.colorBgContainer
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
};
|
|
1572
|
-
}, dr = (e) => {
|
|
1573
|
-
const {
|
|
1574
|
-
componentCls: t,
|
|
1575
|
-
itemHoverColor: a,
|
|
1576
|
-
dropdownEdgeChildVerticalPadding: n
|
|
1577
|
-
} = e;
|
|
1578
|
-
return {
|
|
1579
|
-
[`${t}-dropdown`]: Object.assign(Object.assign({}, bt(e)), {
|
|
1580
|
-
position: "absolute",
|
|
1581
|
-
top: -9999,
|
|
1582
|
-
left: {
|
|
1583
|
-
_skip_check_: !0,
|
|
1584
|
-
value: -9999
|
|
1585
|
-
},
|
|
1586
|
-
zIndex: e.zIndexPopup,
|
|
1587
|
-
display: "block",
|
|
1588
|
-
"&-hidden": {
|
|
1589
|
-
display: "none"
|
|
1590
|
-
},
|
|
1591
|
-
[`${t}-dropdown-menu`]: {
|
|
1592
|
-
maxHeight: e.tabsDropdownHeight,
|
|
1593
|
-
margin: 0,
|
|
1594
|
-
padding: `${N(n)} 0`,
|
|
1595
|
-
overflowX: "hidden",
|
|
1596
|
-
overflowY: "auto",
|
|
1597
|
-
textAlign: {
|
|
1598
|
-
_skip_check_: !0,
|
|
1599
|
-
value: "left"
|
|
1600
|
-
},
|
|
1601
|
-
listStyleType: "none",
|
|
1602
|
-
backgroundColor: e.colorBgContainer,
|
|
1603
|
-
backgroundClip: "padding-box",
|
|
1604
|
-
borderRadius: e.borderRadiusLG,
|
|
1605
|
-
outline: "none",
|
|
1606
|
-
boxShadow: e.boxShadowSecondary,
|
|
1607
|
-
"&-item": Object.assign(Object.assign({}, Qa), {
|
|
1608
|
-
display: "flex",
|
|
1609
|
-
alignItems: "center",
|
|
1610
|
-
minWidth: e.tabsDropdownWidth,
|
|
1611
|
-
margin: 0,
|
|
1612
|
-
padding: `${N(e.paddingXXS)} ${N(e.paddingSM)}`,
|
|
1613
|
-
color: e.colorText,
|
|
1614
|
-
fontWeight: "normal",
|
|
1615
|
-
fontSize: e.fontSize,
|
|
1616
|
-
lineHeight: e.lineHeight,
|
|
1617
|
-
cursor: "pointer",
|
|
1618
|
-
transition: `all ${e.motionDurationSlow}`,
|
|
1619
|
-
"> span": {
|
|
1620
|
-
flex: 1,
|
|
1621
|
-
whiteSpace: "nowrap"
|
|
1622
|
-
},
|
|
1623
|
-
"&-remove": {
|
|
1624
|
-
flex: "none",
|
|
1625
|
-
marginLeft: {
|
|
1626
|
-
_skip_check_: !0,
|
|
1627
|
-
value: e.marginSM
|
|
1628
|
-
},
|
|
1629
|
-
color: e.colorIcon,
|
|
1630
|
-
fontSize: e.fontSizeSM,
|
|
1631
|
-
background: "transparent",
|
|
1632
|
-
border: 0,
|
|
1633
|
-
cursor: "pointer",
|
|
1634
|
-
"&:hover": {
|
|
1635
|
-
color: a
|
|
1636
|
-
}
|
|
1637
|
-
},
|
|
1638
|
-
"&:hover": {
|
|
1639
|
-
background: e.controlItemBgHover
|
|
1640
|
-
},
|
|
1641
|
-
"&-disabled": {
|
|
1642
|
-
"&, &:hover": {
|
|
1643
|
-
color: e.colorTextDisabled,
|
|
1644
|
-
background: "transparent",
|
|
1645
|
-
cursor: "not-allowed"
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
})
|
|
1649
|
-
}
|
|
1650
|
-
})
|
|
1651
|
-
};
|
|
1652
|
-
}, ur = (e) => {
|
|
1653
|
-
const {
|
|
1654
|
-
componentCls: t,
|
|
1655
|
-
margin: a,
|
|
1656
|
-
colorBorderSecondary: n,
|
|
1657
|
-
horizontalMargin: r,
|
|
1658
|
-
verticalItemPadding: o,
|
|
1659
|
-
verticalItemMargin: s,
|
|
1660
|
-
calc: i
|
|
1661
|
-
} = e;
|
|
1662
|
-
return {
|
|
1663
|
-
// ========================== Top & Bottom ==========================
|
|
1664
|
-
[`${t}-top, ${t}-bottom`]: {
|
|
1665
|
-
flexDirection: "column",
|
|
1666
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1667
|
-
margin: r,
|
|
1668
|
-
"&::before": {
|
|
1669
|
-
position: "absolute",
|
|
1670
|
-
right: {
|
|
1671
|
-
_skip_check_: !0,
|
|
1672
|
-
value: 0
|
|
1673
|
-
},
|
|
1674
|
-
left: {
|
|
1675
|
-
_skip_check_: !0,
|
|
1676
|
-
value: 0
|
|
1677
|
-
},
|
|
1678
|
-
borderBottom: `${N(e.lineWidth)} ${e.lineType} ${n}`,
|
|
1679
|
-
content: "''"
|
|
1680
|
-
},
|
|
1681
|
-
[`${t}-ink-bar`]: {
|
|
1682
|
-
height: e.lineWidthBold,
|
|
1683
|
-
"&-animated": {
|
|
1684
|
-
transition: `width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
|
|
1685
|
-
right ${e.motionDurationSlow}`
|
|
1686
|
-
}
|
|
1687
|
-
},
|
|
1688
|
-
[`${t}-nav-wrap`]: {
|
|
1689
|
-
"&::before, &::after": {
|
|
1690
|
-
top: 0,
|
|
1691
|
-
bottom: 0,
|
|
1692
|
-
width: e.controlHeight
|
|
1693
|
-
},
|
|
1694
|
-
"&::before": {
|
|
1695
|
-
left: {
|
|
1696
|
-
_skip_check_: !0,
|
|
1697
|
-
value: 0
|
|
1698
|
-
},
|
|
1699
|
-
boxShadow: e.boxShadowTabsOverflowLeft
|
|
1700
|
-
},
|
|
1701
|
-
"&::after": {
|
|
1702
|
-
right: {
|
|
1703
|
-
_skip_check_: !0,
|
|
1704
|
-
value: 0
|
|
1705
|
-
},
|
|
1706
|
-
boxShadow: e.boxShadowTabsOverflowRight
|
|
1707
|
-
},
|
|
1708
|
-
[`&${t}-nav-wrap-ping-left::before`]: {
|
|
1709
|
-
opacity: 1
|
|
1710
|
-
},
|
|
1711
|
-
[`&${t}-nav-wrap-ping-right::after`]: {
|
|
1712
|
-
opacity: 1
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
},
|
|
1717
|
-
[`${t}-top`]: {
|
|
1718
|
-
[`> ${t}-nav,
|
|
1719
|
-
> div > ${t}-nav`]: {
|
|
1720
|
-
"&::before": {
|
|
1721
|
-
bottom: 0
|
|
1722
|
-
},
|
|
1723
|
-
[`${t}-ink-bar`]: {
|
|
1724
|
-
bottom: 0
|
|
1725
|
-
}
|
|
1726
|
-
}
|
|
1727
|
-
},
|
|
1728
|
-
[`${t}-bottom`]: {
|
|
1729
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1730
|
-
order: 1,
|
|
1731
|
-
marginTop: a,
|
|
1732
|
-
marginBottom: 0,
|
|
1733
|
-
"&::before": {
|
|
1734
|
-
top: 0
|
|
1735
|
-
},
|
|
1736
|
-
[`${t}-ink-bar`]: {
|
|
1737
|
-
top: 0
|
|
1738
|
-
}
|
|
1739
|
-
},
|
|
1740
|
-
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
1741
|
-
order: 0
|
|
1742
|
-
}
|
|
1743
|
-
},
|
|
1744
|
-
// ========================== Left & Right ==========================
|
|
1745
|
-
[`${t}-left, ${t}-right`]: {
|
|
1746
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1747
|
-
flexDirection: "column",
|
|
1748
|
-
minWidth: i(e.controlHeight).mul(1.25).equal(),
|
|
1749
|
-
// >>>>>>>>>>> Tab
|
|
1750
|
-
[`${t}-tab`]: {
|
|
1751
|
-
padding: o,
|
|
1752
|
-
textAlign: "center"
|
|
1753
|
-
},
|
|
1754
|
-
[`${t}-tab + ${t}-tab`]: {
|
|
1755
|
-
margin: s
|
|
1756
|
-
},
|
|
1757
|
-
// >>>>>>>>>>> Nav
|
|
1758
|
-
[`${t}-nav-wrap`]: {
|
|
1759
|
-
flexDirection: "column",
|
|
1760
|
-
"&::before, &::after": {
|
|
1761
|
-
right: {
|
|
1762
|
-
_skip_check_: !0,
|
|
1763
|
-
value: 0
|
|
1764
|
-
},
|
|
1765
|
-
left: {
|
|
1766
|
-
_skip_check_: !0,
|
|
1767
|
-
value: 0
|
|
1768
|
-
},
|
|
1769
|
-
height: e.controlHeight
|
|
1770
|
-
},
|
|
1771
|
-
"&::before": {
|
|
1772
|
-
top: 0,
|
|
1773
|
-
boxShadow: e.boxShadowTabsOverflowTop
|
|
1774
|
-
},
|
|
1775
|
-
"&::after": {
|
|
1776
|
-
bottom: 0,
|
|
1777
|
-
boxShadow: e.boxShadowTabsOverflowBottom
|
|
1778
|
-
},
|
|
1779
|
-
[`&${t}-nav-wrap-ping-top::before`]: {
|
|
1780
|
-
opacity: 1
|
|
1781
|
-
},
|
|
1782
|
-
[`&${t}-nav-wrap-ping-bottom::after`]: {
|
|
1783
|
-
opacity: 1
|
|
1784
|
-
}
|
|
1785
|
-
},
|
|
1786
|
-
// >>>>>>>>>>> Ink Bar
|
|
1787
|
-
[`${t}-ink-bar`]: {
|
|
1788
|
-
width: e.lineWidthBold,
|
|
1789
|
-
"&-animated": {
|
|
1790
|
-
transition: `height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`
|
|
1791
|
-
}
|
|
1792
|
-
},
|
|
1793
|
-
[`${t}-nav-list, ${t}-nav-operations`]: {
|
|
1794
|
-
flex: "1 0 auto",
|
|
1795
|
-
// fix safari scroll problem
|
|
1796
|
-
flexDirection: "column"
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
},
|
|
1800
|
-
[`${t}-left`]: {
|
|
1801
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1802
|
-
[`${t}-ink-bar`]: {
|
|
1803
|
-
right: {
|
|
1804
|
-
_skip_check_: !0,
|
|
1805
|
-
value: 0
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
},
|
|
1809
|
-
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
1810
|
-
marginLeft: {
|
|
1811
|
-
_skip_check_: !0,
|
|
1812
|
-
value: N(i(e.lineWidth).mul(-1).equal())
|
|
1813
|
-
},
|
|
1814
|
-
borderLeft: {
|
|
1815
|
-
_skip_check_: !0,
|
|
1816
|
-
value: `${N(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
|
|
1817
|
-
},
|
|
1818
|
-
[`> ${t}-content > ${t}-tabpane`]: {
|
|
1819
|
-
paddingLeft: {
|
|
1820
|
-
_skip_check_: !0,
|
|
1821
|
-
value: e.paddingLG
|
|
1822
|
-
}
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
},
|
|
1826
|
-
[`${t}-right`]: {
|
|
1827
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
1828
|
-
order: 1,
|
|
1829
|
-
[`${t}-ink-bar`]: {
|
|
1830
|
-
left: {
|
|
1831
|
-
_skip_check_: !0,
|
|
1832
|
-
value: 0
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
|
-
},
|
|
1836
|
-
[`> ${t}-content-holder, > div > ${t}-content-holder`]: {
|
|
1837
|
-
order: 0,
|
|
1838
|
-
marginRight: {
|
|
1839
|
-
_skip_check_: !0,
|
|
1840
|
-
value: i(e.lineWidth).mul(-1).equal()
|
|
1841
|
-
},
|
|
1842
|
-
borderRight: {
|
|
1843
|
-
_skip_check_: !0,
|
|
1844
|
-
value: `${N(e.lineWidth)} ${e.lineType} ${e.colorBorder}`
|
|
1845
|
-
},
|
|
1846
|
-
[`> ${t}-content > ${t}-tabpane`]: {
|
|
1847
|
-
paddingRight: {
|
|
1848
|
-
_skip_check_: !0,
|
|
1849
|
-
value: e.paddingLG
|
|
1850
|
-
}
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
};
|
|
1855
|
-
}, fr = (e) => {
|
|
1856
|
-
const {
|
|
1857
|
-
componentCls: t,
|
|
1858
|
-
cardPaddingSM: a,
|
|
1859
|
-
cardPaddingLG: n,
|
|
1860
|
-
cardHeightSM: r,
|
|
1861
|
-
cardHeightLG: o,
|
|
1862
|
-
horizontalItemPaddingSM: s,
|
|
1863
|
-
horizontalItemPaddingLG: i
|
|
1864
|
-
} = e;
|
|
1865
|
-
return {
|
|
1866
|
-
// >>>>> shared
|
|
1867
|
-
[t]: {
|
|
1868
|
-
"&-small": {
|
|
1869
|
-
[`> ${t}-nav`]: {
|
|
1870
|
-
[`${t}-tab`]: {
|
|
1871
|
-
padding: s,
|
|
1872
|
-
fontSize: e.titleFontSizeSM
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
},
|
|
1876
|
-
"&-large": {
|
|
1877
|
-
[`> ${t}-nav`]: {
|
|
1878
|
-
[`${t}-tab`]: {
|
|
1879
|
-
padding: i,
|
|
1880
|
-
fontSize: e.titleFontSizeLG,
|
|
1881
|
-
lineHeight: e.lineHeightLG
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
},
|
|
1886
|
-
// >>>>> card
|
|
1887
|
-
[`${t}-card`]: {
|
|
1888
|
-
// Small
|
|
1889
|
-
[`&${t}-small`]: {
|
|
1890
|
-
[`> ${t}-nav`]: {
|
|
1891
|
-
[`${t}-tab`]: {
|
|
1892
|
-
padding: a
|
|
1893
|
-
},
|
|
1894
|
-
[`${t}-nav-add`]: {
|
|
1895
|
-
minWidth: r,
|
|
1896
|
-
minHeight: r
|
|
1897
|
-
}
|
|
1898
|
-
},
|
|
1899
|
-
[`&${t}-bottom`]: {
|
|
1900
|
-
[`> ${t}-nav ${t}-tab`]: {
|
|
1901
|
-
borderRadius: `0 0 ${N(e.borderRadius)} ${N(e.borderRadius)}`
|
|
1902
|
-
}
|
|
1903
|
-
},
|
|
1904
|
-
[`&${t}-top`]: {
|
|
1905
|
-
[`> ${t}-nav ${t}-tab`]: {
|
|
1906
|
-
borderRadius: `${N(e.borderRadius)} ${N(e.borderRadius)} 0 0`
|
|
1907
|
-
}
|
|
1908
|
-
},
|
|
1909
|
-
[`&${t}-right`]: {
|
|
1910
|
-
[`> ${t}-nav ${t}-tab`]: {
|
|
1911
|
-
borderRadius: {
|
|
1912
|
-
_skip_check_: !0,
|
|
1913
|
-
value: `0 ${N(e.borderRadius)} ${N(e.borderRadius)} 0`
|
|
1914
|
-
}
|
|
1915
|
-
}
|
|
1916
|
-
},
|
|
1917
|
-
[`&${t}-left`]: {
|
|
1918
|
-
[`> ${t}-nav ${t}-tab`]: {
|
|
1919
|
-
borderRadius: {
|
|
1920
|
-
_skip_check_: !0,
|
|
1921
|
-
value: `${N(e.borderRadius)} 0 0 ${N(e.borderRadius)}`
|
|
1922
|
-
}
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
},
|
|
1926
|
-
// Large
|
|
1927
|
-
[`&${t}-large`]: {
|
|
1928
|
-
[`> ${t}-nav`]: {
|
|
1929
|
-
[`${t}-tab`]: {
|
|
1930
|
-
padding: n
|
|
1931
|
-
},
|
|
1932
|
-
[`${t}-nav-add`]: {
|
|
1933
|
-
minWidth: o,
|
|
1934
|
-
minHeight: o
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
};
|
|
1940
|
-
}, vr = (e) => {
|
|
1941
|
-
const {
|
|
1942
|
-
componentCls: t,
|
|
1943
|
-
itemActiveColor: a,
|
|
1944
|
-
itemHoverColor: n,
|
|
1945
|
-
iconCls: r,
|
|
1946
|
-
tabsHorizontalItemMargin: o,
|
|
1947
|
-
horizontalItemPadding: s,
|
|
1948
|
-
itemSelectedColor: i,
|
|
1949
|
-
itemColor: c
|
|
1950
|
-
} = e, d = `${t}-tab`;
|
|
1951
|
-
return {
|
|
1952
|
-
[d]: {
|
|
1953
|
-
position: "relative",
|
|
1954
|
-
WebkitTouchCallout: "none",
|
|
1955
|
-
WebkitTapHighlightColor: "transparent",
|
|
1956
|
-
display: "inline-flex",
|
|
1957
|
-
alignItems: "center",
|
|
1958
|
-
padding: s,
|
|
1959
|
-
fontSize: e.titleFontSize,
|
|
1960
|
-
background: "transparent",
|
|
1961
|
-
border: 0,
|
|
1962
|
-
outline: "none",
|
|
1963
|
-
cursor: "pointer",
|
|
1964
|
-
color: c,
|
|
1965
|
-
"&-btn, &-remove": {
|
|
1966
|
-
"&:focus:not(:focus-visible), &:active": {
|
|
1967
|
-
color: a
|
|
1968
|
-
}
|
|
1969
|
-
},
|
|
1970
|
-
"&-btn": {
|
|
1971
|
-
outline: "none",
|
|
1972
|
-
transition: `all ${e.motionDurationSlow}`,
|
|
1973
|
-
[`${d}-icon:not(:last-child)`]: {
|
|
1974
|
-
marginInlineEnd: e.marginSM
|
|
1975
|
-
}
|
|
1976
|
-
},
|
|
1977
|
-
"&-remove": Object.assign({
|
|
1978
|
-
flex: "none",
|
|
1979
|
-
lineHeight: 1,
|
|
1980
|
-
marginRight: {
|
|
1981
|
-
_skip_check_: !0,
|
|
1982
|
-
value: e.calc(e.marginXXS).mul(-1).equal()
|
|
1983
|
-
},
|
|
1984
|
-
marginLeft: {
|
|
1985
|
-
_skip_check_: !0,
|
|
1986
|
-
value: e.marginXS
|
|
1987
|
-
},
|
|
1988
|
-
color: e.colorIcon,
|
|
1989
|
-
fontSize: e.fontSizeSM,
|
|
1990
|
-
background: "transparent",
|
|
1991
|
-
border: "none",
|
|
1992
|
-
outline: "none",
|
|
1993
|
-
cursor: "pointer",
|
|
1994
|
-
transition: `all ${e.motionDurationSlow}`,
|
|
1995
|
-
"&:hover": {
|
|
1996
|
-
color: e.colorTextHeading
|
|
1997
|
-
}
|
|
1998
|
-
}, He(e)),
|
|
1999
|
-
"&:hover": {
|
|
2000
|
-
color: n
|
|
2001
|
-
},
|
|
2002
|
-
[`&${d}-active ${d}-btn`]: {
|
|
2003
|
-
color: i,
|
|
2004
|
-
textShadow: e.tabsActiveTextShadow
|
|
2005
|
-
},
|
|
2006
|
-
[`&${d}-focus ${d}-btn:focus-visible`]: na(e),
|
|
2007
|
-
[`&${d}-disabled`]: {
|
|
2008
|
-
color: e.colorTextDisabled,
|
|
2009
|
-
cursor: "not-allowed"
|
|
2010
|
-
},
|
|
2011
|
-
[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]: {
|
|
2012
|
-
"&:focus, &:active": {
|
|
2013
|
-
color: e.colorTextDisabled
|
|
2014
|
-
}
|
|
2015
|
-
},
|
|
2016
|
-
[`& ${d}-remove ${r}`]: {
|
|
2017
|
-
margin: 0,
|
|
2018
|
-
verticalAlign: "middle"
|
|
2019
|
-
},
|
|
2020
|
-
[`${r}:not(:last-child)`]: {
|
|
2021
|
-
marginRight: {
|
|
2022
|
-
_skip_check_: !0,
|
|
2023
|
-
value: e.marginSM
|
|
2024
|
-
}
|
|
2025
|
-
}
|
|
2026
|
-
},
|
|
2027
|
-
[`${d} + ${d}`]: {
|
|
2028
|
-
margin: {
|
|
2029
|
-
_skip_check_: !0,
|
|
2030
|
-
value: o
|
|
2031
|
-
}
|
|
2032
|
-
}
|
|
2033
|
-
};
|
|
2034
|
-
}, mr = (e) => {
|
|
2035
|
-
const {
|
|
2036
|
-
componentCls: t,
|
|
2037
|
-
tabsHorizontalItemMarginRTL: a,
|
|
2038
|
-
iconCls: n,
|
|
2039
|
-
cardGutter: r,
|
|
2040
|
-
calc: o
|
|
2041
|
-
} = e;
|
|
2042
|
-
return {
|
|
2043
|
-
[`${t}-rtl`]: {
|
|
2044
|
-
direction: "rtl",
|
|
2045
|
-
[`${t}-nav`]: {
|
|
2046
|
-
[`${t}-tab`]: {
|
|
2047
|
-
margin: {
|
|
2048
|
-
_skip_check_: !0,
|
|
2049
|
-
value: a
|
|
2050
|
-
},
|
|
2051
|
-
[`${t}-tab:last-of-type`]: {
|
|
2052
|
-
marginLeft: {
|
|
2053
|
-
_skip_check_: !0,
|
|
2054
|
-
value: 0
|
|
2055
|
-
}
|
|
2056
|
-
},
|
|
2057
|
-
[n]: {
|
|
2058
|
-
marginRight: {
|
|
2059
|
-
_skip_check_: !0,
|
|
2060
|
-
value: 0
|
|
2061
|
-
},
|
|
2062
|
-
marginLeft: {
|
|
2063
|
-
_skip_check_: !0,
|
|
2064
|
-
value: N(e.marginSM)
|
|
2065
|
-
}
|
|
2066
|
-
},
|
|
2067
|
-
[`${t}-tab-remove`]: {
|
|
2068
|
-
marginRight: {
|
|
2069
|
-
_skip_check_: !0,
|
|
2070
|
-
value: N(e.marginXS)
|
|
2071
|
-
},
|
|
2072
|
-
marginLeft: {
|
|
2073
|
-
_skip_check_: !0,
|
|
2074
|
-
value: N(o(e.marginXXS).mul(-1).equal())
|
|
2075
|
-
},
|
|
2076
|
-
[n]: {
|
|
2077
|
-
margin: 0
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
}
|
|
2081
|
-
},
|
|
2082
|
-
[`&${t}-left`]: {
|
|
2083
|
-
[`> ${t}-nav`]: {
|
|
2084
|
-
order: 1
|
|
2085
|
-
},
|
|
2086
|
-
[`> ${t}-content-holder`]: {
|
|
2087
|
-
order: 0
|
|
2088
|
-
}
|
|
2089
|
-
},
|
|
2090
|
-
[`&${t}-right`]: {
|
|
2091
|
-
[`> ${t}-nav`]: {
|
|
2092
|
-
order: 0
|
|
2093
|
-
},
|
|
2094
|
-
[`> ${t}-content-holder`]: {
|
|
2095
|
-
order: 1
|
|
2096
|
-
}
|
|
2097
|
-
},
|
|
2098
|
-
// ====================== Card ======================
|
|
2099
|
-
[`&${t}-card${t}-top, &${t}-card${t}-bottom`]: {
|
|
2100
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2101
|
-
[`${t}-tab + ${t}-tab`]: {
|
|
2102
|
-
marginRight: {
|
|
2103
|
-
_skip_check_: !0,
|
|
2104
|
-
value: r
|
|
2105
|
-
},
|
|
2106
|
-
marginLeft: {
|
|
2107
|
-
_skip_check_: !0,
|
|
2108
|
-
value: 0
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
},
|
|
2114
|
-
[`${t}-dropdown-rtl`]: {
|
|
2115
|
-
direction: "rtl"
|
|
2116
|
-
},
|
|
2117
|
-
[`${t}-menu-item`]: {
|
|
2118
|
-
[`${t}-dropdown-rtl`]: {
|
|
2119
|
-
textAlign: {
|
|
2120
|
-
_skip_check_: !0,
|
|
2121
|
-
value: "right"
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
}
|
|
2125
|
-
};
|
|
2126
|
-
}, br = (e) => {
|
|
2127
|
-
const {
|
|
2128
|
-
componentCls: t,
|
|
2129
|
-
tabsCardPadding: a,
|
|
2130
|
-
cardHeight: n,
|
|
2131
|
-
cardGutter: r,
|
|
2132
|
-
itemHoverColor: o,
|
|
2133
|
-
itemActiveColor: s,
|
|
2134
|
-
colorBorderSecondary: i
|
|
2135
|
-
} = e;
|
|
2136
|
-
return {
|
|
2137
|
-
[t]: Object.assign(Object.assign(Object.assign(Object.assign({}, bt(e)), {
|
|
2138
|
-
display: "flex",
|
|
2139
|
-
// ========================== Navigation ==========================
|
|
2140
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2141
|
-
position: "relative",
|
|
2142
|
-
display: "flex",
|
|
2143
|
-
flex: "none",
|
|
2144
|
-
alignItems: "center",
|
|
2145
|
-
[`${t}-nav-wrap`]: {
|
|
2146
|
-
position: "relative",
|
|
2147
|
-
display: "flex",
|
|
2148
|
-
flex: "auto",
|
|
2149
|
-
alignSelf: "stretch",
|
|
2150
|
-
overflow: "hidden",
|
|
2151
|
-
whiteSpace: "nowrap",
|
|
2152
|
-
transform: "translate(0)",
|
|
2153
|
-
// Fix chrome render bug
|
|
2154
|
-
// >>>>> Ping shadow
|
|
2155
|
-
"&::before, &::after": {
|
|
2156
|
-
position: "absolute",
|
|
2157
|
-
zIndex: 1,
|
|
2158
|
-
opacity: 0,
|
|
2159
|
-
transition: `opacity ${e.motionDurationSlow}`,
|
|
2160
|
-
content: "''",
|
|
2161
|
-
pointerEvents: "none"
|
|
2162
|
-
}
|
|
2163
|
-
},
|
|
2164
|
-
[`${t}-nav-list`]: {
|
|
2165
|
-
position: "relative",
|
|
2166
|
-
display: "flex",
|
|
2167
|
-
transition: `opacity ${e.motionDurationSlow}`
|
|
2168
|
-
},
|
|
2169
|
-
// >>>>>>>> Operations
|
|
2170
|
-
[`${t}-nav-operations`]: {
|
|
2171
|
-
display: "flex",
|
|
2172
|
-
alignSelf: "stretch"
|
|
2173
|
-
},
|
|
2174
|
-
[`${t}-nav-operations-hidden`]: {
|
|
2175
|
-
position: "absolute",
|
|
2176
|
-
visibility: "hidden",
|
|
2177
|
-
pointerEvents: "none"
|
|
2178
|
-
},
|
|
2179
|
-
[`${t}-nav-more`]: {
|
|
2180
|
-
position: "relative",
|
|
2181
|
-
padding: a,
|
|
2182
|
-
background: "transparent",
|
|
2183
|
-
border: 0,
|
|
2184
|
-
color: e.colorText,
|
|
2185
|
-
"&::after": {
|
|
2186
|
-
position: "absolute",
|
|
2187
|
-
right: {
|
|
2188
|
-
_skip_check_: !0,
|
|
2189
|
-
value: 0
|
|
2190
|
-
},
|
|
2191
|
-
bottom: 0,
|
|
2192
|
-
left: {
|
|
2193
|
-
_skip_check_: !0,
|
|
2194
|
-
value: 0
|
|
2195
|
-
},
|
|
2196
|
-
height: e.calc(e.controlHeightLG).div(8).equal(),
|
|
2197
|
-
transform: "translateY(100%)",
|
|
2198
|
-
content: "''"
|
|
2199
|
-
}
|
|
2200
|
-
},
|
|
2201
|
-
[`${t}-nav-add`]: Object.assign({
|
|
2202
|
-
minWidth: n,
|
|
2203
|
-
minHeight: n,
|
|
2204
|
-
marginLeft: {
|
|
2205
|
-
_skip_check_: !0,
|
|
2206
|
-
value: r
|
|
2207
|
-
},
|
|
2208
|
-
background: "transparent",
|
|
2209
|
-
border: `${N(e.lineWidth)} ${e.lineType} ${i}`,
|
|
2210
|
-
borderRadius: `${N(e.borderRadiusLG)} ${N(e.borderRadiusLG)} 0 0`,
|
|
2211
|
-
outline: "none",
|
|
2212
|
-
cursor: "pointer",
|
|
2213
|
-
color: e.colorText,
|
|
2214
|
-
transition: `all ${e.motionDurationSlow} ${e.motionEaseInOut}`,
|
|
2215
|
-
"&:hover": {
|
|
2216
|
-
color: o
|
|
2217
|
-
},
|
|
2218
|
-
"&:active, &:focus:not(:focus-visible)": {
|
|
2219
|
-
color: s
|
|
2220
|
-
}
|
|
2221
|
-
}, He(e, -3))
|
|
2222
|
-
},
|
|
2223
|
-
[`${t}-extra-content`]: {
|
|
2224
|
-
flex: "none"
|
|
2225
|
-
},
|
|
2226
|
-
// ============================ InkBar ============================
|
|
2227
|
-
[`${t}-ink-bar`]: {
|
|
2228
|
-
position: "absolute",
|
|
2229
|
-
background: e.inkBarColor,
|
|
2230
|
-
pointerEvents: "none"
|
|
2231
|
-
}
|
|
2232
|
-
}), vr(e)), {
|
|
2233
|
-
// =========================== TabPanes ===========================
|
|
2234
|
-
[`${t}-content`]: {
|
|
2235
|
-
position: "relative",
|
|
2236
|
-
width: "100%"
|
|
2237
|
-
},
|
|
2238
|
-
[`${t}-content-holder`]: {
|
|
2239
|
-
flex: "auto",
|
|
2240
|
-
minWidth: 0,
|
|
2241
|
-
minHeight: 0
|
|
2242
|
-
},
|
|
2243
|
-
[`${t}-tabpane`]: Object.assign(Object.assign({}, He(e)), {
|
|
2244
|
-
"&-hidden": {
|
|
2245
|
-
display: "none"
|
|
2246
|
-
}
|
|
2247
|
-
})
|
|
2248
|
-
}),
|
|
2249
|
-
[`${t}-centered`]: {
|
|
2250
|
-
[`> ${t}-nav, > div > ${t}-nav`]: {
|
|
2251
|
-
[`${t}-nav-wrap`]: {
|
|
2252
|
-
[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]: {
|
|
2253
|
-
margin: "auto"
|
|
2254
|
-
}
|
|
2255
|
-
}
|
|
2256
|
-
}
|
|
2257
|
-
}
|
|
2258
|
-
};
|
|
2259
|
-
}, gr = (e) => {
|
|
2260
|
-
const {
|
|
2261
|
-
cardHeight: t,
|
|
2262
|
-
cardHeightSM: a,
|
|
2263
|
-
cardHeightLG: n,
|
|
2264
|
-
controlHeight: r,
|
|
2265
|
-
controlHeightLG: o
|
|
2266
|
-
} = e, s = t || o, i = a || r, c = n || o + 8;
|
|
2267
|
-
return {
|
|
2268
|
-
zIndexPopup: e.zIndexPopupBase + 50,
|
|
2269
|
-
cardBg: e.colorFillAlter,
|
|
2270
|
-
// We can not pass this as valid value,
|
|
2271
|
-
// Since `cardHeight` will lock nav add button height.
|
|
2272
|
-
cardHeight: s,
|
|
2273
|
-
cardHeightSM: i,
|
|
2274
|
-
cardHeightLG: c,
|
|
2275
|
-
// Initialize with empty string, because cardPadding will be calculated with cardHeight by default.
|
|
2276
|
-
cardPadding: `${(s - e.fontHeight) / 2 - e.lineWidth}px ${e.padding}px`,
|
|
2277
|
-
cardPaddingSM: `${(i - e.fontHeight) / 2 - e.lineWidth}px ${e.paddingXS}px`,
|
|
2278
|
-
cardPaddingLG: `${(c - e.fontHeightLG) / 2 - e.lineWidth}px ${e.padding}px`,
|
|
2279
|
-
titleFontSize: e.fontSize,
|
|
2280
|
-
titleFontSizeLG: e.fontSizeLG,
|
|
2281
|
-
titleFontSizeSM: e.fontSize,
|
|
2282
|
-
inkBarColor: e.colorPrimary,
|
|
2283
|
-
horizontalMargin: `0 0 ${e.margin}px 0`,
|
|
2284
|
-
horizontalItemGutter: 32,
|
|
2285
|
-
// Fixed Value
|
|
2286
|
-
// Initialize with empty string, because horizontalItemMargin will be calculated with horizontalItemGutter by default.
|
|
2287
|
-
horizontalItemMargin: "",
|
|
2288
|
-
horizontalItemMarginRTL: "",
|
|
2289
|
-
horizontalItemPadding: `${e.paddingSM}px 0`,
|
|
2290
|
-
horizontalItemPaddingSM: `${e.paddingXS}px 0`,
|
|
2291
|
-
horizontalItemPaddingLG: `${e.padding}px 0`,
|
|
2292
|
-
verticalItemPadding: `${e.paddingXS}px ${e.paddingLG}px`,
|
|
2293
|
-
verticalItemMargin: `${e.margin}px 0 0 0`,
|
|
2294
|
-
itemColor: e.colorText,
|
|
2295
|
-
itemSelectedColor: e.colorPrimary,
|
|
2296
|
-
itemHoverColor: e.colorPrimaryHover,
|
|
2297
|
-
itemActiveColor: e.colorPrimaryActive,
|
|
2298
|
-
cardGutter: e.marginXXS / 2
|
|
2299
|
-
};
|
|
2300
|
-
}, hr = vt("Tabs", (e) => {
|
|
2301
|
-
const t = mt(e, {
|
|
2302
|
-
// `cardPadding` is empty by default, so we could calculate with dynamic `cardHeight`
|
|
2303
|
-
tabsCardPadding: e.cardPadding,
|
|
2304
|
-
dropdownEdgeChildVerticalPadding: e.paddingXXS,
|
|
2305
|
-
tabsActiveTextShadow: "0 0 0.25px currentcolor",
|
|
2306
|
-
tabsDropdownHeight: 200,
|
|
2307
|
-
tabsDropdownWidth: 120,
|
|
2308
|
-
tabsHorizontalItemMargin: `0 0 0 ${N(e.horizontalItemGutter)}`,
|
|
2309
|
-
tabsHorizontalItemMarginRTL: `0 0 0 ${N(e.horizontalItemGutter)}`
|
|
2310
|
-
});
|
|
2311
|
-
return [fr(t), mr(t), ur(t), dr(t), cr(t), br(t), sr(t)];
|
|
2312
|
-
}, gr), ma = () => null;
|
|
2313
|
-
process.env.NODE_ENV !== "production" && (ma.displayName = "DeprecatedTabPane");
|
|
2314
|
-
var pr = function(e, t) {
|
|
2315
|
-
var a = {};
|
|
2316
|
-
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
2317
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
2318
|
-
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
2319
|
-
return a;
|
|
2320
|
-
};
|
|
2321
|
-
const yr = /* @__PURE__ */ l.forwardRef((e, t) => {
|
|
2322
|
-
var a, n, r, o, s, i, c, d, f, u, b;
|
|
2323
|
-
const {
|
|
2324
|
-
type: v,
|
|
2325
|
-
className: w,
|
|
2326
|
-
rootClassName: p,
|
|
2327
|
-
size: C,
|
|
2328
|
-
onEdit: m,
|
|
2329
|
-
hideAdd: g,
|
|
2330
|
-
centered: E,
|
|
2331
|
-
addIcon: h,
|
|
2332
|
-
removeIcon: _,
|
|
2333
|
-
moreIcon: O,
|
|
2334
|
-
more: M,
|
|
2335
|
-
popupClassName: y,
|
|
2336
|
-
children: $,
|
|
2337
|
-
items: x,
|
|
2338
|
-
animated: S,
|
|
2339
|
-
style: R,
|
|
2340
|
-
indicatorSize: D,
|
|
2341
|
-
indicator: P,
|
|
2342
|
-
destroyInactiveTabPane: L,
|
|
2343
|
-
destroyOnHidden: A
|
|
2344
|
-
} = e, z = pr(e, ["type", "className", "rootClassName", "size", "onEdit", "hideAdd", "centered", "addIcon", "removeIcon", "moreIcon", "more", "popupClassName", "children", "items", "animated", "style", "indicatorSize", "indicator", "destroyInactiveTabPane", "destroyOnHidden"]), {
|
|
2345
|
-
prefixCls: G
|
|
2346
|
-
} = z, {
|
|
2347
|
-
direction: re,
|
|
2348
|
-
tabs: T,
|
|
2349
|
-
getPrefixCls: j,
|
|
2350
|
-
getPopupContainer: me
|
|
2351
|
-
} = l.useContext(ft), k = j("tabs", G), q = en(k), [Q, oe, se] = hr(k, q), ue = l.useRef(null);
|
|
2352
|
-
l.useImperativeHandle(t, () => ({
|
|
2353
|
-
nativeElement: ue.current
|
|
2354
|
-
}));
|
|
2355
|
-
let ie;
|
|
2356
|
-
v === "editable-card" && (ie = {
|
|
2357
|
-
onEdit: (be, {
|
|
2358
|
-
key: $e,
|
|
2359
|
-
event: Ae
|
|
2360
|
-
}) => {
|
|
2361
|
-
m == null || m(be === "add" ? Ae : $e, be);
|
|
2362
|
-
},
|
|
2363
|
-
removeIcon: (a = _ ?? (T == null ? void 0 : T.removeIcon)) !== null && a !== void 0 ? a : /* @__PURE__ */ l.createElement(tn, null),
|
|
2364
|
-
addIcon: (h ?? (T == null ? void 0 : T.addIcon)) || /* @__PURE__ */ l.createElement(sa, null),
|
|
2365
|
-
showAdd: g !== !0
|
|
2366
|
-
});
|
|
2367
|
-
const he = j();
|
|
2368
|
-
if (process.env.NODE_ENV !== "production") {
|
|
2369
|
-
const be = Ke("Tabs");
|
|
2370
|
-
process.env.NODE_ENV !== "production" && be(!("onPrevClick" in e) && !("onNextClick" in e), "breaking", "`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."), process.env.NODE_ENV !== "production" && be(!(D || T != null && T.indicatorSize), "deprecated", "`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead."), be.deprecated(!("destroyInactiveTabPane" in e || x != null && x.some(($e) => "destroyInactiveTabPane" in $e)), "destroyInactiveTabPane", "destroyOnHidden");
|
|
2371
|
-
}
|
|
2372
|
-
const U = ea(C), pe = lr(x, $), fe = rr(k, S), W = Object.assign(Object.assign({}, T == null ? void 0 : T.style), R), ye = {
|
|
2373
|
-
align: (n = P == null ? void 0 : P.align) !== null && n !== void 0 ? n : (r = T == null ? void 0 : T.indicator) === null || r === void 0 ? void 0 : r.align,
|
|
2374
|
-
size: (c = (s = (o = P == null ? void 0 : P.size) !== null && o !== void 0 ? o : D) !== null && s !== void 0 ? s : (i = T == null ? void 0 : T.indicator) === null || i === void 0 ? void 0 : i.size) !== null && c !== void 0 ? c : T == null ? void 0 : T.indicatorSize
|
|
2375
|
-
};
|
|
2376
|
-
return Q(/* @__PURE__ */ l.createElement(va, Object.assign({
|
|
2377
|
-
ref: ue,
|
|
2378
|
-
direction: re,
|
|
2379
|
-
getPopupContainer: me
|
|
2380
|
-
}, z, {
|
|
2381
|
-
items: pe,
|
|
2382
|
-
className: B({
|
|
2383
|
-
[`${k}-${U}`]: U,
|
|
2384
|
-
[`${k}-card`]: ["card", "editable-card"].includes(v),
|
|
2385
|
-
[`${k}-editable-card`]: v === "editable-card",
|
|
2386
|
-
[`${k}-centered`]: E
|
|
2387
|
-
}, T == null ? void 0 : T.className, w, p, oe, se, q),
|
|
2388
|
-
popupClassName: B(y, oe, se, q),
|
|
2389
|
-
style: W,
|
|
2390
|
-
editable: ie,
|
|
2391
|
-
more: Object.assign({
|
|
2392
|
-
icon: (b = (u = (f = (d = T == null ? void 0 : T.more) === null || d === void 0 ? void 0 : d.icon) !== null && f !== void 0 ? f : T == null ? void 0 : T.moreIcon) !== null && u !== void 0 ? u : O) !== null && b !== void 0 ? b : /* @__PURE__ */ l.createElement(Cn, null),
|
|
2393
|
-
transitionName: `${he}-slide-up`
|
|
2394
|
-
}, M),
|
|
2395
|
-
prefixCls: k,
|
|
2396
|
-
animated: fe,
|
|
2397
|
-
indicator: ye,
|
|
2398
|
-
// TODO: In the future, destroyInactiveTabPane in rc-tabs needs to be upgrade to destroyOnHidden
|
|
2399
|
-
destroyInactiveTabPane: A ?? L
|
|
2400
|
-
})));
|
|
2401
|
-
}), ba = yr;
|
|
2402
|
-
ba.TabPane = ma;
|
|
2403
|
-
process.env.NODE_ENV !== "production" && (ba.displayName = "Tabs");
|
|
2404
|
-
var $r = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { tag: "path", attrs: { d: "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z" } }] }, name: "clock-circle", theme: "outlined" }, Cr = function(t, a) {
|
|
2405
|
-
return /* @__PURE__ */ l.createElement(ta, le({}, t, {
|
|
2406
|
-
ref: a,
|
|
2407
|
-
icon: $r
|
|
2408
|
-
}));
|
|
2409
|
-
}, xr = /* @__PURE__ */ l.forwardRef(Cr);
|
|
2410
|
-
process.env.NODE_ENV !== "production" && (xr.displayName = "ClockCircleOutlined");
|
|
2411
|
-
var Yt = /* @__PURE__ */ l.createContext(null), ga = /* @__PURE__ */ l.createContext({}), Sr = ["prefixCls", "className", "containerRef"], ha = function(t) {
|
|
2412
|
-
var a = t.prefixCls, n = t.className, r = t.containerRef, o = Re(t, Sr), s = l.useContext(ga), i = s.panel, c = aa(i, r);
|
|
2413
|
-
return /* @__PURE__ */ l.createElement("div", le({
|
|
2414
|
-
className: B("".concat(a, "-content"), n),
|
|
2415
|
-
role: "dialog",
|
|
2416
|
-
ref: c
|
|
2417
|
-
}, Ye(t, {
|
|
2418
|
-
aria: !0
|
|
2419
|
-
}), {
|
|
2420
|
-
"aria-modal": "true"
|
|
2421
|
-
}, o));
|
|
2422
|
-
};
|
|
2423
|
-
process.env.NODE_ENV !== "production" && (ha.displayName = "DrawerPanel");
|
|
2424
|
-
function Jt(e) {
|
|
2425
|
-
return typeof e == "string" && String(Number(e)) === e ? (je(!1, "Invalid value type of `width` or `height` which should be number type instead."), Number(e)) : e;
|
|
2426
|
-
}
|
|
2427
|
-
function wr(e) {
|
|
2428
|
-
je(!("wrapperClassName" in e), "'wrapperClassName' is removed. Please use 'rootClassName' instead."), je(an() || !e.open, "Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.");
|
|
2429
|
-
}
|
|
2430
|
-
var Zt = {
|
|
2431
|
-
width: 0,
|
|
2432
|
-
height: 0,
|
|
2433
|
-
overflow: "hidden",
|
|
2434
|
-
outline: "none",
|
|
2435
|
-
position: "absolute"
|
|
2436
|
-
};
|
|
2437
|
-
function Er(e, t) {
|
|
2438
|
-
var a, n, r, o = e.prefixCls, s = e.open, i = e.placement, c = e.inline, d = e.push, f = e.forceRender, u = e.autoFocus, b = e.keyboard, v = e.classNames, w = e.rootClassName, p = e.rootStyle, C = e.zIndex, m = e.className, g = e.id, E = e.style, h = e.motion, _ = e.width, O = e.height, M = e.children, y = e.mask, $ = e.maskClosable, x = e.maskMotion, S = e.maskClassName, R = e.maskStyle, D = e.afterOpenChange, P = e.onClose, L = e.onMouseEnter, A = e.onMouseOver, z = e.onMouseLeave, G = e.onClick, re = e.onKeyDown, T = e.onKeyUp, j = e.styles, me = e.drawerRender, k = l.useRef(), q = l.useRef(), Q = l.useRef();
|
|
2439
|
-
l.useImperativeHandle(t, function() {
|
|
2440
|
-
return k.current;
|
|
2441
|
-
});
|
|
2442
|
-
var oe = function(ce) {
|
|
2443
|
-
var we = ce.keyCode, _e = ce.shiftKey;
|
|
2444
|
-
switch (we) {
|
|
2445
|
-
// Tab active
|
|
2446
|
-
case Se.TAB: {
|
|
2447
|
-
if (we === Se.TAB) {
|
|
2448
|
-
if (!_e && document.activeElement === Q.current) {
|
|
2449
|
-
var Pe;
|
|
2450
|
-
(Pe = q.current) === null || Pe === void 0 || Pe.focus({
|
|
2451
|
-
preventScroll: !0
|
|
2452
|
-
});
|
|
2453
|
-
} else if (_e && document.activeElement === q.current) {
|
|
2454
|
-
var Ce;
|
|
2455
|
-
(Ce = Q.current) === null || Ce === void 0 || Ce.focus({
|
|
2456
|
-
preventScroll: !0
|
|
2457
|
-
});
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
break;
|
|
2461
|
-
}
|
|
2462
|
-
// Close
|
|
2463
|
-
case Se.ESC: {
|
|
2464
|
-
P && b && (ce.stopPropagation(), P(ce));
|
|
2465
|
-
break;
|
|
2466
|
-
}
|
|
2467
|
-
}
|
|
2468
|
-
};
|
|
2469
|
-
l.useEffect(function() {
|
|
2470
|
-
if (s && u) {
|
|
2471
|
-
var J;
|
|
2472
|
-
(J = k.current) === null || J === void 0 || J.focus({
|
|
2473
|
-
preventScroll: !0
|
|
2474
|
-
});
|
|
2475
|
-
}
|
|
2476
|
-
}, [s]);
|
|
2477
|
-
var se = l.useState(!1), ue = F(se, 2), ie = ue[0], he = ue[1], U = l.useContext(Yt), pe;
|
|
2478
|
-
typeof d == "boolean" ? pe = d ? {} : {
|
|
2479
|
-
distance: 0
|
|
2480
|
-
} : pe = d || {};
|
|
2481
|
-
var fe = (a = (n = (r = pe) === null || r === void 0 ? void 0 : r.distance) !== null && n !== void 0 ? n : U == null ? void 0 : U.pushDistance) !== null && a !== void 0 ? a : 180, W = l.useMemo(function() {
|
|
2482
|
-
return {
|
|
2483
|
-
pushDistance: fe,
|
|
2484
|
-
push: function() {
|
|
2485
|
-
he(!0);
|
|
2486
|
-
},
|
|
2487
|
-
pull: function() {
|
|
2488
|
-
he(!1);
|
|
2489
|
-
}
|
|
2490
|
-
};
|
|
2491
|
-
}, [fe]);
|
|
2492
|
-
l.useEffect(function() {
|
|
2493
|
-
if (s) {
|
|
2494
|
-
var J;
|
|
2495
|
-
U == null || (J = U.push) === null || J === void 0 || J.call(U);
|
|
2496
|
-
} else {
|
|
2497
|
-
var ce;
|
|
2498
|
-
U == null || (ce = U.pull) === null || ce === void 0 || ce.call(U);
|
|
2499
|
-
}
|
|
2500
|
-
}, [s]), l.useEffect(function() {
|
|
2501
|
-
return function() {
|
|
2502
|
-
var J;
|
|
2503
|
-
U == null || (J = U.pull) === null || J === void 0 || J.call(U);
|
|
2504
|
-
};
|
|
2505
|
-
}, []);
|
|
2506
|
-
var ye = /* @__PURE__ */ l.createElement(qe, le({
|
|
2507
|
-
key: "mask"
|
|
2508
|
-
}, x, {
|
|
2509
|
-
visible: y && s
|
|
2510
|
-
}), function(J, ce) {
|
|
2511
|
-
var we = J.className, _e = J.style;
|
|
2512
|
-
return /* @__PURE__ */ l.createElement("div", {
|
|
2513
|
-
className: B("".concat(o, "-mask"), we, v == null ? void 0 : v.mask, S),
|
|
2514
|
-
style: te(te(te({}, _e), R), j == null ? void 0 : j.mask),
|
|
2515
|
-
onClick: $ && s ? P : void 0,
|
|
2516
|
-
ref: ce
|
|
2517
|
-
});
|
|
2518
|
-
}), be = typeof h == "function" ? h(i) : h, $e = {};
|
|
2519
|
-
if (ie && fe)
|
|
2520
|
-
switch (i) {
|
|
2521
|
-
case "top":
|
|
2522
|
-
$e.transform = "translateY(".concat(fe, "px)");
|
|
2523
|
-
break;
|
|
2524
|
-
case "bottom":
|
|
2525
|
-
$e.transform = "translateY(".concat(-fe, "px)");
|
|
2526
|
-
break;
|
|
2527
|
-
case "left":
|
|
2528
|
-
$e.transform = "translateX(".concat(fe, "px)");
|
|
2529
|
-
break;
|
|
2530
|
-
default:
|
|
2531
|
-
$e.transform = "translateX(".concat(-fe, "px)");
|
|
2532
|
-
break;
|
|
2533
|
-
}
|
|
2534
|
-
i === "left" || i === "right" ? $e.width = Jt(_) : $e.height = Jt(O);
|
|
2535
|
-
var Ae = {
|
|
2536
|
-
onMouseEnter: L,
|
|
2537
|
-
onMouseOver: A,
|
|
2538
|
-
onMouseLeave: z,
|
|
2539
|
-
onClick: G,
|
|
2540
|
-
onKeyDown: re,
|
|
2541
|
-
onKeyUp: T
|
|
2542
|
-
}, Qe = /* @__PURE__ */ l.createElement(qe, le({
|
|
2543
|
-
key: "panel"
|
|
2544
|
-
}, be, {
|
|
2545
|
-
visible: s,
|
|
2546
|
-
forceRender: f,
|
|
2547
|
-
onVisibleChanged: function(ce) {
|
|
2548
|
-
D == null || D(ce);
|
|
2549
|
-
},
|
|
2550
|
-
removeOnLeave: !1,
|
|
2551
|
-
leavedClassName: "".concat(o, "-content-wrapper-hidden")
|
|
2552
|
-
}), function(J, ce) {
|
|
2553
|
-
var we = J.className, _e = J.style, Pe = /* @__PURE__ */ l.createElement(ha, le({
|
|
2554
|
-
id: g,
|
|
2555
|
-
containerRef: ce,
|
|
2556
|
-
prefixCls: o,
|
|
2557
|
-
className: B(m, v == null ? void 0 : v.content),
|
|
2558
|
-
style: te(te({}, E), j == null ? void 0 : j.content)
|
|
2559
|
-
}, Ye(e, {
|
|
2560
|
-
aria: !0
|
|
2561
|
-
}), Ae), M);
|
|
2562
|
-
return /* @__PURE__ */ l.createElement("div", le({
|
|
2563
|
-
className: B("".concat(o, "-content-wrapper"), v == null ? void 0 : v.wrapper, we),
|
|
2564
|
-
style: te(te(te({}, $e), _e), j == null ? void 0 : j.wrapper)
|
|
2565
|
-
}, Ye(e, {
|
|
2566
|
-
data: !0
|
|
2567
|
-
})), me ? me(Pe) : Pe);
|
|
2568
|
-
}), Oe = te({}, p);
|
|
2569
|
-
return C && (Oe.zIndex = C), /* @__PURE__ */ l.createElement(Yt.Provider, {
|
|
2570
|
-
value: W
|
|
2571
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
2572
|
-
className: B(o, "".concat(o, "-").concat(i), w, Z(Z({}, "".concat(o, "-open"), s), "".concat(o, "-inline"), c)),
|
|
2573
|
-
style: Oe,
|
|
2574
|
-
tabIndex: -1,
|
|
2575
|
-
ref: k,
|
|
2576
|
-
onKeyDown: oe
|
|
2577
|
-
}, ye, /* @__PURE__ */ l.createElement("div", {
|
|
2578
|
-
tabIndex: 0,
|
|
2579
|
-
ref: q,
|
|
2580
|
-
style: Zt,
|
|
2581
|
-
"aria-hidden": "true",
|
|
2582
|
-
"data-sentinel": "start"
|
|
2583
|
-
}), Qe, /* @__PURE__ */ l.createElement("div", {
|
|
2584
|
-
tabIndex: 0,
|
|
2585
|
-
ref: Q,
|
|
2586
|
-
style: Zt,
|
|
2587
|
-
"aria-hidden": "true",
|
|
2588
|
-
"data-sentinel": "end"
|
|
2589
|
-
})));
|
|
2590
|
-
}
|
|
2591
|
-
var pa = /* @__PURE__ */ l.forwardRef(Er);
|
|
2592
|
-
process.env.NODE_ENV !== "production" && (pa.displayName = "DrawerPopup");
|
|
2593
|
-
var ya = function(t) {
|
|
2594
|
-
var a = t.open, n = a === void 0 ? !1 : a, r = t.prefixCls, o = r === void 0 ? "rc-drawer" : r, s = t.placement, i = s === void 0 ? "right" : s, c = t.autoFocus, d = c === void 0 ? !0 : c, f = t.keyboard, u = f === void 0 ? !0 : f, b = t.width, v = b === void 0 ? 378 : b, w = t.mask, p = w === void 0 ? !0 : w, C = t.maskClosable, m = C === void 0 ? !0 : C, g = t.getContainer, E = t.forceRender, h = t.afterOpenChange, _ = t.destroyOnClose, O = t.onMouseEnter, M = t.onMouseOver, y = t.onMouseLeave, $ = t.onClick, x = t.onKeyDown, S = t.onKeyUp, R = t.panelRef, D = l.useState(!1), P = F(D, 2), L = P[0], A = P[1];
|
|
2595
|
-
process.env.NODE_ENV !== "production" && wr(t);
|
|
2596
|
-
var z = l.useState(!1), G = F(z, 2), re = G[0], T = G[1];
|
|
2597
|
-
jt(function() {
|
|
2598
|
-
T(!0);
|
|
2599
|
-
}, []);
|
|
2600
|
-
var j = re ? n : !1, me = l.useRef(), k = l.useRef();
|
|
2601
|
-
jt(function() {
|
|
2602
|
-
j && (k.current = document.activeElement);
|
|
2603
|
-
}, [j]);
|
|
2604
|
-
var q = function(ie) {
|
|
2605
|
-
var he;
|
|
2606
|
-
if (A(ie), h == null || h(ie), !ie && k.current && !((he = me.current) !== null && he !== void 0 && he.contains(k.current))) {
|
|
2607
|
-
var U;
|
|
2608
|
-
(U = k.current) === null || U === void 0 || U.focus({
|
|
2609
|
-
preventScroll: !0
|
|
2610
|
-
});
|
|
2611
|
-
}
|
|
2612
|
-
}, Q = l.useMemo(function() {
|
|
2613
|
-
return {
|
|
2614
|
-
panel: R
|
|
2615
|
-
};
|
|
2616
|
-
}, [R]);
|
|
2617
|
-
if (!E && !L && !j && _)
|
|
2618
|
-
return null;
|
|
2619
|
-
var oe = {
|
|
2620
|
-
onMouseEnter: O,
|
|
2621
|
-
onMouseOver: M,
|
|
2622
|
-
onMouseLeave: y,
|
|
2623
|
-
onClick: $,
|
|
2624
|
-
onKeyDown: x,
|
|
2625
|
-
onKeyUp: S
|
|
2626
|
-
}, se = te(te({}, t), {}, {
|
|
2627
|
-
open: j,
|
|
2628
|
-
prefixCls: o,
|
|
2629
|
-
placement: i,
|
|
2630
|
-
autoFocus: d,
|
|
2631
|
-
keyboard: u,
|
|
2632
|
-
width: v,
|
|
2633
|
-
mask: p,
|
|
2634
|
-
maskClosable: m,
|
|
2635
|
-
inline: g === !1,
|
|
2636
|
-
afterOpenChange: q,
|
|
2637
|
-
ref: me
|
|
2638
|
-
}, oe);
|
|
2639
|
-
return /* @__PURE__ */ l.createElement(ga.Provider, {
|
|
2640
|
-
value: Q
|
|
2641
|
-
}, /* @__PURE__ */ l.createElement(nn, {
|
|
2642
|
-
open: j || E || L,
|
|
2643
|
-
autoDestroy: !1,
|
|
2644
|
-
getContainer: g,
|
|
2645
|
-
autoLock: p && (j || L)
|
|
2646
|
-
}, /* @__PURE__ */ l.createElement(pa, se)));
|
|
2647
|
-
};
|
|
2648
|
-
process.env.NODE_ENV !== "production" && (ya.displayName = "Drawer");
|
|
2649
|
-
const $a = (e) => {
|
|
2650
|
-
var t, a;
|
|
2651
|
-
const {
|
|
2652
|
-
prefixCls: n,
|
|
2653
|
-
ariaId: r,
|
|
2654
|
-
title: o,
|
|
2655
|
-
footer: s,
|
|
2656
|
-
extra: i,
|
|
2657
|
-
closable: c,
|
|
2658
|
-
loading: d,
|
|
2659
|
-
onClose: f,
|
|
2660
|
-
headerStyle: u,
|
|
2661
|
-
bodyStyle: b,
|
|
2662
|
-
footerStyle: v,
|
|
2663
|
-
children: w,
|
|
2664
|
-
classNames: p,
|
|
2665
|
-
styles: C
|
|
2666
|
-
} = e, m = gt("drawer");
|
|
2667
|
-
let g;
|
|
2668
|
-
c === !1 ? g = void 0 : c === void 0 || c === !0 ? g = "start" : g = (c == null ? void 0 : c.placement) === "end" ? "end" : "start";
|
|
2669
|
-
const E = l.useCallback((y) => /* @__PURE__ */ l.createElement("button", {
|
|
2670
|
-
type: "button",
|
|
2671
|
-
onClick: f,
|
|
2672
|
-
className: B(`${n}-close`, {
|
|
2673
|
-
[`${n}-close-${g}`]: g === "end"
|
|
2674
|
-
})
|
|
2675
|
-
}, y), [f, n, g]), [h, _] = rn(Ht(e), Ht(m), {
|
|
2676
|
-
closable: !0,
|
|
2677
|
-
closeIconRender: E
|
|
2678
|
-
}), O = () => {
|
|
2679
|
-
var y, $;
|
|
2680
|
-
return !o && !h ? null : /* @__PURE__ */ l.createElement("div", {
|
|
2681
|
-
style: Object.assign(Object.assign(Object.assign({}, (y = m.styles) === null || y === void 0 ? void 0 : y.header), u), C == null ? void 0 : C.header),
|
|
2682
|
-
className: B(`${n}-header`, {
|
|
2683
|
-
[`${n}-header-close-only`]: h && !o && !i
|
|
2684
|
-
}, ($ = m.classNames) === null || $ === void 0 ? void 0 : $.header, p == null ? void 0 : p.header)
|
|
2685
|
-
}, /* @__PURE__ */ l.createElement("div", {
|
|
2686
|
-
className: `${n}-header-title`
|
|
2687
|
-
}, g === "start" && _, o && /* @__PURE__ */ l.createElement("div", {
|
|
2688
|
-
className: `${n}-title`,
|
|
2689
|
-
id: r
|
|
2690
|
-
}, o)), i && /* @__PURE__ */ l.createElement("div", {
|
|
2691
|
-
className: `${n}-extra`
|
|
2692
|
-
}, i), g === "end" && _);
|
|
2693
|
-
}, M = () => {
|
|
2694
|
-
var y, $;
|
|
2695
|
-
if (!s)
|
|
2696
|
-
return null;
|
|
2697
|
-
const x = `${n}-footer`;
|
|
2698
|
-
return /* @__PURE__ */ l.createElement("div", {
|
|
2699
|
-
className: B(x, (y = m.classNames) === null || y === void 0 ? void 0 : y.footer, p == null ? void 0 : p.footer),
|
|
2700
|
-
style: Object.assign(Object.assign(Object.assign({}, ($ = m.styles) === null || $ === void 0 ? void 0 : $.footer), v), C == null ? void 0 : C.footer)
|
|
2701
|
-
}, s);
|
|
2702
|
-
};
|
|
2703
|
-
return /* @__PURE__ */ l.createElement(l.Fragment, null, O(), /* @__PURE__ */ l.createElement("div", {
|
|
2704
|
-
className: B(`${n}-body`, p == null ? void 0 : p.body, (t = m.classNames) === null || t === void 0 ? void 0 : t.body),
|
|
2705
|
-
style: Object.assign(Object.assign(Object.assign({}, (a = m.styles) === null || a === void 0 ? void 0 : a.body), b), C == null ? void 0 : C.body)
|
|
2706
|
-
}, d ? /* @__PURE__ */ l.createElement(on, {
|
|
2707
|
-
active: !0,
|
|
2708
|
-
title: !1,
|
|
2709
|
-
paragraph: {
|
|
2710
|
-
rows: 5
|
|
2711
|
-
},
|
|
2712
|
-
className: `${n}-body-skeleton`
|
|
2713
|
-
}) : w), M());
|
|
2714
|
-
}, _r = (e) => {
|
|
2715
|
-
const t = "100%";
|
|
2716
|
-
return {
|
|
2717
|
-
left: `translateX(-${t})`,
|
|
2718
|
-
right: `translateX(${t})`,
|
|
2719
|
-
top: `translateY(-${t})`,
|
|
2720
|
-
bottom: `translateY(${t})`
|
|
2721
|
-
}[e];
|
|
2722
|
-
}, Ca = (e, t) => ({
|
|
2723
|
-
"&-enter, &-appear": Object.assign(Object.assign({}, e), {
|
|
2724
|
-
"&-active": t
|
|
2725
|
-
}),
|
|
2726
|
-
"&-leave": Object.assign(Object.assign({}, t), {
|
|
2727
|
-
"&-active": e
|
|
2728
|
-
})
|
|
2729
|
-
}), xa = (e, t) => Object.assign({
|
|
2730
|
-
"&-enter, &-appear, &-leave": {
|
|
2731
|
-
"&-start": {
|
|
2732
|
-
transition: "none"
|
|
2733
|
-
},
|
|
2734
|
-
"&-active": {
|
|
2735
|
-
transition: `all ${t}`
|
|
2736
|
-
}
|
|
2737
|
-
}
|
|
2738
|
-
}, Ca({
|
|
2739
|
-
opacity: e
|
|
2740
|
-
}, {
|
|
2741
|
-
opacity: 1
|
|
2742
|
-
})), Pr = (e, t) => [xa(0.7, t), Ca({
|
|
2743
|
-
transform: _r(e)
|
|
2744
|
-
}, {
|
|
2745
|
-
transform: "none"
|
|
2746
|
-
})], Ir = (e) => {
|
|
2747
|
-
const {
|
|
2748
|
-
componentCls: t,
|
|
2749
|
-
motionDurationSlow: a
|
|
2750
|
-
} = e;
|
|
2751
|
-
return {
|
|
2752
|
-
[t]: {
|
|
2753
|
-
// ======================== Mask ========================
|
|
2754
|
-
[`${t}-mask-motion`]: xa(0, a),
|
|
2755
|
-
// ======================= Panel ========================
|
|
2756
|
-
[`${t}-panel-motion`]: ["left", "right", "top", "bottom"].reduce((n, r) => Object.assign(Object.assign({}, n), {
|
|
2757
|
-
[`&-${r}`]: Pr(r, a)
|
|
2758
|
-
}), {})
|
|
2759
|
-
}
|
|
2760
|
-
};
|
|
2761
|
-
}, Nr = (e) => {
|
|
2762
|
-
const {
|
|
2763
|
-
borderRadiusSM: t,
|
|
2764
|
-
componentCls: a,
|
|
2765
|
-
zIndexPopup: n,
|
|
2766
|
-
colorBgMask: r,
|
|
2767
|
-
colorBgElevated: o,
|
|
2768
|
-
motionDurationSlow: s,
|
|
2769
|
-
motionDurationMid: i,
|
|
2770
|
-
paddingXS: c,
|
|
2771
|
-
padding: d,
|
|
2772
|
-
paddingLG: f,
|
|
2773
|
-
fontSizeLG: u,
|
|
2774
|
-
lineHeightLG: b,
|
|
2775
|
-
lineWidth: v,
|
|
2776
|
-
lineType: w,
|
|
2777
|
-
colorSplit: p,
|
|
2778
|
-
marginXS: C,
|
|
2779
|
-
colorIcon: m,
|
|
2780
|
-
colorIconHover: g,
|
|
2781
|
-
colorBgTextHover: E,
|
|
2782
|
-
colorBgTextActive: h,
|
|
2783
|
-
colorText: _,
|
|
2784
|
-
fontWeightStrong: O,
|
|
2785
|
-
footerPaddingBlock: M,
|
|
2786
|
-
footerPaddingInline: y,
|
|
2787
|
-
calc: $
|
|
2788
|
-
} = e, x = `${a}-content-wrapper`;
|
|
2789
|
-
return {
|
|
2790
|
-
[a]: {
|
|
2791
|
-
position: "fixed",
|
|
2792
|
-
inset: 0,
|
|
2793
|
-
zIndex: n,
|
|
2794
|
-
pointerEvents: "none",
|
|
2795
|
-
color: _,
|
|
2796
|
-
"&-pure": {
|
|
2797
|
-
position: "relative",
|
|
2798
|
-
background: o,
|
|
2799
|
-
display: "flex",
|
|
2800
|
-
flexDirection: "column",
|
|
2801
|
-
[`&${a}-left`]: {
|
|
2802
|
-
boxShadow: e.boxShadowDrawerLeft
|
|
2803
|
-
},
|
|
2804
|
-
[`&${a}-right`]: {
|
|
2805
|
-
boxShadow: e.boxShadowDrawerRight
|
|
2806
|
-
},
|
|
2807
|
-
[`&${a}-top`]: {
|
|
2808
|
-
boxShadow: e.boxShadowDrawerUp
|
|
2809
|
-
},
|
|
2810
|
-
[`&${a}-bottom`]: {
|
|
2811
|
-
boxShadow: e.boxShadowDrawerDown
|
|
2812
|
-
}
|
|
2813
|
-
},
|
|
2814
|
-
"&-inline": {
|
|
2815
|
-
position: "absolute"
|
|
2816
|
-
},
|
|
2817
|
-
// ====================== Mask ======================
|
|
2818
|
-
[`${a}-mask`]: {
|
|
2819
|
-
position: "absolute",
|
|
2820
|
-
inset: 0,
|
|
2821
|
-
zIndex: n,
|
|
2822
|
-
background: r,
|
|
2823
|
-
pointerEvents: "auto"
|
|
2824
|
-
},
|
|
2825
|
-
// ==================== Content =====================
|
|
2826
|
-
[x]: {
|
|
2827
|
-
position: "absolute",
|
|
2828
|
-
zIndex: n,
|
|
2829
|
-
maxWidth: "100vw",
|
|
2830
|
-
transition: `all ${s}`,
|
|
2831
|
-
"&-hidden": {
|
|
2832
|
-
display: "none"
|
|
2833
|
-
}
|
|
2834
|
-
},
|
|
2835
|
-
// Placement
|
|
2836
|
-
[`&-left > ${x}`]: {
|
|
2837
|
-
top: 0,
|
|
2838
|
-
bottom: 0,
|
|
2839
|
-
left: {
|
|
2840
|
-
_skip_check_: !0,
|
|
2841
|
-
value: 0
|
|
2842
|
-
},
|
|
2843
|
-
boxShadow: e.boxShadowDrawerLeft
|
|
2844
|
-
},
|
|
2845
|
-
[`&-right > ${x}`]: {
|
|
2846
|
-
top: 0,
|
|
2847
|
-
right: {
|
|
2848
|
-
_skip_check_: !0,
|
|
2849
|
-
value: 0
|
|
2850
|
-
},
|
|
2851
|
-
bottom: 0,
|
|
2852
|
-
boxShadow: e.boxShadowDrawerRight
|
|
2853
|
-
},
|
|
2854
|
-
[`&-top > ${x}`]: {
|
|
2855
|
-
top: 0,
|
|
2856
|
-
insetInline: 0,
|
|
2857
|
-
boxShadow: e.boxShadowDrawerUp
|
|
2858
|
-
},
|
|
2859
|
-
[`&-bottom > ${x}`]: {
|
|
2860
|
-
bottom: 0,
|
|
2861
|
-
insetInline: 0,
|
|
2862
|
-
boxShadow: e.boxShadowDrawerDown
|
|
2863
|
-
},
|
|
2864
|
-
[`${a}-content`]: {
|
|
2865
|
-
display: "flex",
|
|
2866
|
-
flexDirection: "column",
|
|
2867
|
-
width: "100%",
|
|
2868
|
-
height: "100%",
|
|
2869
|
-
overflow: "auto",
|
|
2870
|
-
background: o,
|
|
2871
|
-
pointerEvents: "auto"
|
|
2872
|
-
},
|
|
2873
|
-
// Header
|
|
2874
|
-
[`${a}-header`]: {
|
|
2875
|
-
display: "flex",
|
|
2876
|
-
flex: 0,
|
|
2877
|
-
alignItems: "center",
|
|
2878
|
-
padding: `${N(d)} ${N(f)}`,
|
|
2879
|
-
fontSize: u,
|
|
2880
|
-
lineHeight: b,
|
|
2881
|
-
borderBottom: `${N(v)} ${w} ${p}`,
|
|
2882
|
-
"&-title": {
|
|
2883
|
-
display: "flex",
|
|
2884
|
-
flex: 1,
|
|
2885
|
-
alignItems: "center",
|
|
2886
|
-
minWidth: 0,
|
|
2887
|
-
minHeight: 0
|
|
2888
|
-
}
|
|
2889
|
-
},
|
|
2890
|
-
[`${a}-extra`]: {
|
|
2891
|
-
flex: "none"
|
|
2892
|
-
},
|
|
2893
|
-
[`${a}-close`]: Object.assign({
|
|
2894
|
-
display: "inline-flex",
|
|
2895
|
-
width: $(u).add(c).equal(),
|
|
2896
|
-
height: $(u).add(c).equal(),
|
|
2897
|
-
borderRadius: t,
|
|
2898
|
-
justifyContent: "center",
|
|
2899
|
-
alignItems: "center",
|
|
2900
|
-
color: m,
|
|
2901
|
-
fontWeight: O,
|
|
2902
|
-
fontSize: u,
|
|
2903
|
-
fontStyle: "normal",
|
|
2904
|
-
lineHeight: 1,
|
|
2905
|
-
textAlign: "center",
|
|
2906
|
-
textTransform: "none",
|
|
2907
|
-
textDecoration: "none",
|
|
2908
|
-
background: "transparent",
|
|
2909
|
-
border: 0,
|
|
2910
|
-
cursor: "pointer",
|
|
2911
|
-
transition: `all ${i}`,
|
|
2912
|
-
textRendering: "auto",
|
|
2913
|
-
[`&${a}-close-end`]: {
|
|
2914
|
-
marginInlineStart: C
|
|
2915
|
-
},
|
|
2916
|
-
[`&:not(${a}-close-end)`]: {
|
|
2917
|
-
marginInlineEnd: C
|
|
2918
|
-
},
|
|
2919
|
-
"&:hover": {
|
|
2920
|
-
color: g,
|
|
2921
|
-
backgroundColor: E,
|
|
2922
|
-
textDecoration: "none"
|
|
2923
|
-
},
|
|
2924
|
-
"&:active": {
|
|
2925
|
-
backgroundColor: h
|
|
2926
|
-
}
|
|
2927
|
-
}, He(e)),
|
|
2928
|
-
[`${a}-title`]: {
|
|
2929
|
-
flex: 1,
|
|
2930
|
-
margin: 0,
|
|
2931
|
-
fontWeight: e.fontWeightStrong,
|
|
2932
|
-
fontSize: u,
|
|
2933
|
-
lineHeight: b
|
|
2934
|
-
},
|
|
2935
|
-
// Body
|
|
2936
|
-
[`${a}-body`]: {
|
|
2937
|
-
flex: 1,
|
|
2938
|
-
minWidth: 0,
|
|
2939
|
-
minHeight: 0,
|
|
2940
|
-
padding: f,
|
|
2941
|
-
overflow: "auto",
|
|
2942
|
-
[`${a}-body-skeleton`]: {
|
|
2943
|
-
width: "100%",
|
|
2944
|
-
height: "100%",
|
|
2945
|
-
display: "flex",
|
|
2946
|
-
justifyContent: "center"
|
|
2947
|
-
}
|
|
2948
|
-
},
|
|
2949
|
-
// Footer
|
|
2950
|
-
[`${a}-footer`]: {
|
|
2951
|
-
flexShrink: 0,
|
|
2952
|
-
padding: `${N(M)} ${N(y)}`,
|
|
2953
|
-
borderTop: `${N(v)} ${w} ${p}`
|
|
2954
|
-
},
|
|
2955
|
-
// ====================== RTL =======================
|
|
2956
|
-
"&-rtl": {
|
|
2957
|
-
direction: "rtl"
|
|
2958
|
-
}
|
|
2959
|
-
}
|
|
2960
|
-
};
|
|
2961
|
-
}, Or = (e) => ({
|
|
2962
|
-
zIndexPopup: e.zIndexPopupBase,
|
|
2963
|
-
footerPaddingBlock: e.paddingXS,
|
|
2964
|
-
footerPaddingInline: e.padding
|
|
2965
|
-
}), Sa = vt("Drawer", (e) => {
|
|
2966
|
-
const t = mt(e, {});
|
|
2967
|
-
return [Nr(t), Ir(t)];
|
|
2968
|
-
}, Or);
|
|
2969
|
-
var wa = function(e, t) {
|
|
2970
|
-
var a = {};
|
|
2971
|
-
for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (a[n] = e[n]);
|
|
2972
|
-
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var r = 0, n = Object.getOwnPropertySymbols(e); r < n.length; r++)
|
|
2973
|
-
t.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[r]) && (a[n[r]] = e[n[r]]);
|
|
2974
|
-
return a;
|
|
2975
|
-
};
|
|
2976
|
-
const Tr = {
|
|
2977
|
-
distance: 180
|
|
2978
|
-
}, Ea = (e) => {
|
|
2979
|
-
var t;
|
|
2980
|
-
const {
|
|
2981
|
-
rootClassName: a,
|
|
2982
|
-
width: n,
|
|
2983
|
-
height: r,
|
|
2984
|
-
size: o = "default",
|
|
2985
|
-
mask: s = !0,
|
|
2986
|
-
push: i = Tr,
|
|
2987
|
-
open: c,
|
|
2988
|
-
afterOpenChange: d,
|
|
2989
|
-
onClose: f,
|
|
2990
|
-
prefixCls: u,
|
|
2991
|
-
getContainer: b,
|
|
2992
|
-
panelRef: v = null,
|
|
2993
|
-
style: w,
|
|
2994
|
-
className: p,
|
|
2995
|
-
"aria-labelledby": C,
|
|
2996
|
-
// Deprecated
|
|
2997
|
-
visible: m,
|
|
2998
|
-
afterVisibleChange: g,
|
|
2999
|
-
maskStyle: E,
|
|
3000
|
-
drawerStyle: h,
|
|
3001
|
-
contentWrapperStyle: _,
|
|
3002
|
-
destroyOnClose: O,
|
|
3003
|
-
destroyOnHidden: M
|
|
3004
|
-
} = e, y = wa(e, ["rootClassName", "width", "height", "size", "mask", "push", "open", "afterOpenChange", "onClose", "prefixCls", "getContainer", "panelRef", "style", "className", "aria-labelledby", "visible", "afterVisibleChange", "maskStyle", "drawerStyle", "contentWrapperStyle", "destroyOnClose", "destroyOnHidden"]), $ = ln(), x = y.title ? $ : void 0, {
|
|
3005
|
-
getPopupContainer: S,
|
|
3006
|
-
getPrefixCls: R,
|
|
3007
|
-
direction: D,
|
|
3008
|
-
className: P,
|
|
3009
|
-
style: L,
|
|
3010
|
-
classNames: A,
|
|
3011
|
-
styles: z
|
|
3012
|
-
} = gt("drawer"), G = R("drawer", u), [re, T, j] = Sa(G), me = (
|
|
3013
|
-
// 有可能为 false,所以不能直接判断
|
|
3014
|
-
b === void 0 && S ? () => S(document.body) : b
|
|
3015
|
-
), k = B({
|
|
3016
|
-
"no-mask": !s,
|
|
3017
|
-
[`${G}-rtl`]: D === "rtl"
|
|
3018
|
-
}, a, T, j);
|
|
3019
|
-
if (process.env.NODE_ENV !== "production") {
|
|
3020
|
-
const W = Ke("Drawer");
|
|
3021
|
-
[["visible", "open"], ["afterVisibleChange", "afterOpenChange"], ["headerStyle", "styles.header"], ["bodyStyle", "styles.body"], ["footerStyle", "styles.footer"], ["contentWrapperStyle", "styles.wrapper"], ["maskStyle", "styles.mask"], ["drawerStyle", "styles.content"], ["destroyInactivePanel", "destroyOnHidden"]].forEach(([ye, be]) => {
|
|
3022
|
-
W.deprecated(!(ye in e), ye, be);
|
|
3023
|
-
}), me !== void 0 && ((t = e.style) === null || t === void 0 ? void 0 : t.position) === "absolute" && process.env.NODE_ENV !== "production" && W(!1, "breaking", "`style` is replaced by `rootStyle` in v5. Please check that `position: absolute` is necessary.");
|
|
3024
|
-
}
|
|
3025
|
-
const q = l.useMemo(() => n ?? (o === "large" ? 736 : 378), [n, o]), Q = l.useMemo(() => r ?? (o === "large" ? 736 : 378), [r, o]), oe = {
|
|
3026
|
-
motionName: ct(G, "mask-motion"),
|
|
3027
|
-
motionAppear: !0,
|
|
3028
|
-
motionEnter: !0,
|
|
3029
|
-
motionLeave: !0,
|
|
3030
|
-
motionDeadline: 500
|
|
3031
|
-
}, se = (W) => ({
|
|
3032
|
-
motionName: ct(G, `panel-motion-${W}`),
|
|
3033
|
-
motionAppear: !0,
|
|
3034
|
-
motionEnter: !0,
|
|
3035
|
-
motionLeave: !0,
|
|
3036
|
-
motionDeadline: 500
|
|
3037
|
-
}), ue = sn(), ie = cn(v, ue), [he, U] = dn("Drawer", y.zIndex), {
|
|
3038
|
-
classNames: pe = {},
|
|
3039
|
-
styles: fe = {}
|
|
3040
|
-
} = y;
|
|
3041
|
-
return re(/* @__PURE__ */ l.createElement(un, {
|
|
3042
|
-
form: !0,
|
|
3043
|
-
space: !0
|
|
3044
|
-
}, /* @__PURE__ */ l.createElement(fn.Provider, {
|
|
3045
|
-
value: U
|
|
3046
|
-
}, /* @__PURE__ */ l.createElement(ya, Object.assign({
|
|
3047
|
-
prefixCls: G,
|
|
3048
|
-
onClose: f,
|
|
3049
|
-
maskMotion: oe,
|
|
3050
|
-
motion: se
|
|
3051
|
-
}, y, {
|
|
3052
|
-
classNames: {
|
|
3053
|
-
mask: B(pe.mask, A.mask),
|
|
3054
|
-
content: B(pe.content, A.content),
|
|
3055
|
-
wrapper: B(pe.wrapper, A.wrapper)
|
|
3056
|
-
},
|
|
3057
|
-
styles: {
|
|
3058
|
-
mask: Object.assign(Object.assign(Object.assign({}, fe.mask), E), z.mask),
|
|
3059
|
-
content: Object.assign(Object.assign(Object.assign({}, fe.content), h), z.content),
|
|
3060
|
-
wrapper: Object.assign(Object.assign(Object.assign({}, fe.wrapper), _), z.wrapper)
|
|
3061
|
-
},
|
|
3062
|
-
open: c ?? m,
|
|
3063
|
-
mask: s,
|
|
3064
|
-
push: i,
|
|
3065
|
-
width: q,
|
|
3066
|
-
height: Q,
|
|
3067
|
-
style: Object.assign(Object.assign({}, L), w),
|
|
3068
|
-
className: B(P, p),
|
|
3069
|
-
rootClassName: k,
|
|
3070
|
-
getContainer: me,
|
|
3071
|
-
afterOpenChange: d ?? g,
|
|
3072
|
-
panelRef: ie,
|
|
3073
|
-
zIndex: he,
|
|
3074
|
-
"aria-labelledby": C ?? x,
|
|
3075
|
-
// TODO: In the future, destroyOnClose in rc-drawer needs to be upgrade to destroyOnHidden
|
|
3076
|
-
destroyOnClose: M ?? O
|
|
3077
|
-
}), /* @__PURE__ */ l.createElement($a, Object.assign({
|
|
3078
|
-
prefixCls: G
|
|
3079
|
-
}, y, {
|
|
3080
|
-
ariaId: x,
|
|
3081
|
-
onClose: f
|
|
3082
|
-
}))))));
|
|
3083
|
-
}, Rr = (e) => {
|
|
3084
|
-
const {
|
|
3085
|
-
prefixCls: t,
|
|
3086
|
-
style: a,
|
|
3087
|
-
className: n,
|
|
3088
|
-
placement: r = "right"
|
|
3089
|
-
} = e, o = wa(e, ["prefixCls", "style", "className", "placement"]), {
|
|
3090
|
-
getPrefixCls: s
|
|
3091
|
-
} = l.useContext(ft), i = s("drawer", t), [c, d, f] = Sa(i), u = B(i, `${i}-pure`, `${i}-${r}`, d, f, n);
|
|
3092
|
-
return c(/* @__PURE__ */ l.createElement("div", {
|
|
3093
|
-
className: u,
|
|
3094
|
-
style: a
|
|
3095
|
-
}, /* @__PURE__ */ l.createElement($a, Object.assign({
|
|
3096
|
-
prefixCls: i
|
|
3097
|
-
}, o))));
|
|
3098
|
-
};
|
|
3099
|
-
Ea._InternalPanelDoNotUseOrYouWillBeFired = Rr;
|
|
3100
|
-
process.env.NODE_ENV !== "production" && (Ea.displayName = "Drawer");
|
|
3101
|
-
const Hr = 1, Kr = "ontology_modeler", Vr = 51093, Gr = 51050;
|
|
3102
|
-
function Wr(e) {
|
|
3103
|
-
return ae(
|
|
3104
|
-
() => X(`${H}/agent/session/page`, {
|
|
3105
|
-
method: "post",
|
|
3106
|
-
data: e,
|
|
3107
|
-
headers: K()
|
|
3108
|
-
})
|
|
3109
|
-
);
|
|
3110
|
-
}
|
|
3111
|
-
function Xr(e) {
|
|
3112
|
-
return ae(
|
|
3113
|
-
() => X(`${H}/agent/session/create`, {
|
|
3114
|
-
method: "post",
|
|
3115
|
-
data: e,
|
|
3116
|
-
headers: K()
|
|
3117
|
-
}),
|
|
3118
|
-
// 失败由调用方按会话状态提示(工作台页头红点 + 保存提示),避免与全局 toast 重复
|
|
3119
|
-
{ silent: !0 }
|
|
3120
|
-
);
|
|
3121
|
-
}
|
|
3122
|
-
function Ur(e, t) {
|
|
3123
|
-
const a = new AbortController(), n = (async () => {
|
|
3124
|
-
var r;
|
|
3125
|
-
try {
|
|
3126
|
-
const o = await fetch(ra(`${H}/agent/chat/streaming`), {
|
|
3127
|
-
method: "POST",
|
|
3128
|
-
credentials: "include",
|
|
3129
|
-
headers: {
|
|
3130
|
-
"Content-Type": "application/json; charset=utf-8",
|
|
3131
|
-
Accept: "text/event-stream",
|
|
3132
|
-
...K(),
|
|
3133
|
-
..._a()
|
|
3134
|
-
},
|
|
3135
|
-
body: JSON.stringify(e),
|
|
3136
|
-
signal: a.signal
|
|
3137
|
-
});
|
|
3138
|
-
if (!o.ok) {
|
|
3139
|
-
let f = `对话请求失败(HTTP ${o.status})`;
|
|
3140
|
-
try {
|
|
3141
|
-
const u = await o.text();
|
|
3142
|
-
if (u) {
|
|
3143
|
-
const b = JSON.parse(u);
|
|
3144
|
-
b.message && (f = b.message);
|
|
3145
|
-
}
|
|
3146
|
-
} catch {
|
|
3147
|
-
}
|
|
3148
|
-
throw new Error(f);
|
|
3149
|
-
}
|
|
3150
|
-
if (!o.body)
|
|
3151
|
-
throw new Error("当前浏览器不支持流式响应");
|
|
3152
|
-
const s = o.body.getReader(), i = new TextDecoder("utf-8");
|
|
3153
|
-
let c = "";
|
|
3154
|
-
const d = (f) => {
|
|
3155
|
-
const u = xn(f);
|
|
3156
|
-
if (u)
|
|
3157
|
-
try {
|
|
3158
|
-
t.onEvent(JSON.parse(u));
|
|
3159
|
-
} catch {
|
|
3160
|
-
}
|
|
3161
|
-
};
|
|
3162
|
-
for (; ; ) {
|
|
3163
|
-
const { done: f, value: u } = await s.read();
|
|
3164
|
-
if (f)
|
|
3165
|
-
break;
|
|
3166
|
-
c += i.decode(u, { stream: !0 });
|
|
3167
|
-
let b = c.search(/\r?\n\r?\n/);
|
|
3168
|
-
for (; b >= 0; ) {
|
|
3169
|
-
const v = c.slice(0, b), w = c.slice(b).match(/^\r?\n\r?\n/);
|
|
3170
|
-
c = c.slice(b + (w ? w[0].length : 2)), d(v), b = c.search(/\r?\n\r?\n/);
|
|
3171
|
-
}
|
|
3172
|
-
}
|
|
3173
|
-
c += i.decode(), c.trim() && d(c);
|
|
3174
|
-
} catch (o) {
|
|
3175
|
-
if (a.signal.aborted)
|
|
3176
|
-
return;
|
|
3177
|
-
(r = t.onError) == null || r.call(
|
|
3178
|
-
t,
|
|
3179
|
-
o instanceof Error && o.message ? o.message : "对话执行失败"
|
|
3180
|
-
);
|
|
3181
|
-
}
|
|
3182
|
-
})();
|
|
3183
|
-
return { abort: () => a.abort(), done: n };
|
|
3184
|
-
}
|
|
3185
|
-
function Fr(e, t) {
|
|
3186
|
-
return ae(
|
|
3187
|
-
() => X(`${H}/agent/chat/interrupt`, {
|
|
3188
|
-
method: "post",
|
|
3189
|
-
data: { agentCode: e, conversationId: t },
|
|
3190
|
-
headers: K()
|
|
3191
|
-
})
|
|
3192
|
-
);
|
|
3193
|
-
}
|
|
3194
|
-
function qr(e) {
|
|
3195
|
-
const t = new URLSearchParams({ conversationId: e });
|
|
3196
|
-
return X(`${H}/agent/history?${t.toString()}`, {
|
|
3197
|
-
method: "get",
|
|
3198
|
-
headers: K()
|
|
3199
|
-
});
|
|
3200
|
-
}
|
|
3201
|
-
function Yr(e) {
|
|
3202
|
-
return ae(
|
|
3203
|
-
() => {
|
|
3204
|
-
var t;
|
|
3205
|
-
return X(`${H}/proposal/page`, {
|
|
3206
|
-
method: "get",
|
|
3207
|
-
params: {
|
|
3208
|
-
...e,
|
|
3209
|
-
orderStatus: (t = e.orderStatus) != null && t.length ? e.orderStatus.join(",") : void 0
|
|
3210
|
-
},
|
|
3211
|
-
headers: K()
|
|
3212
|
-
});
|
|
3213
|
-
}
|
|
3214
|
-
);
|
|
3215
|
-
}
|
|
3216
|
-
function Jr(e, t) {
|
|
3217
|
-
return ae(
|
|
3218
|
-
() => X(`${H}/proposal/detail`, {
|
|
3219
|
-
method: "get",
|
|
3220
|
-
params: { code: e },
|
|
3221
|
-
headers: K(),
|
|
3222
|
-
silent: t == null ? void 0 : t.silent
|
|
3223
|
-
}),
|
|
3224
|
-
t
|
|
3225
|
-
);
|
|
3226
|
-
}
|
|
3227
|
-
function Zr(e, t, a, n, r) {
|
|
3228
|
-
return ae(
|
|
3229
|
-
() => X(`${H}/proposal/submit`, {
|
|
3230
|
-
method: "post",
|
|
3231
|
-
// 归属域按显式字段上送:后端要求与请求头 X-Domain-Code 一致,避免展示域与落库域分叉
|
|
3232
|
-
data: { code: e, itemSeqNos: t, title: a, note: n, domainCode: r },
|
|
3233
|
-
headers: K()
|
|
3234
|
-
})
|
|
3235
|
-
);
|
|
3236
|
-
}
|
|
3237
|
-
function Qr(e) {
|
|
3238
|
-
return ae(
|
|
3239
|
-
() => X(`${H}/proposal/workspace`, {
|
|
3240
|
-
method: "get",
|
|
3241
|
-
params: { conversationId: e },
|
|
3242
|
-
headers: K()
|
|
3243
|
-
})
|
|
3244
|
-
);
|
|
3245
|
-
}
|
|
3246
|
-
const eo = [
|
|
3247
|
-
"STRING",
|
|
3248
|
-
"INT",
|
|
3249
|
-
"DOUBLE",
|
|
3250
|
-
"BOOL",
|
|
3251
|
-
"DATE",
|
|
3252
|
-
"DATETIME",
|
|
3253
|
-
"TEXT"
|
|
3254
|
-
];
|
|
3255
|
-
function to(e) {
|
|
3256
|
-
return X(`${H}/proposal/manual/create`, {
|
|
3257
|
-
method: "post",
|
|
3258
|
-
data: e,
|
|
3259
|
-
headers: K()
|
|
3260
|
-
});
|
|
3261
|
-
}
|
|
3262
|
-
function ao(e, t) {
|
|
3263
|
-
return X(`${H}/proposal/bindConversation`, {
|
|
3264
|
-
method: "post",
|
|
3265
|
-
data: { code: e, conversationId: t },
|
|
3266
|
-
headers: K()
|
|
3267
|
-
});
|
|
3268
|
-
}
|
|
3269
|
-
function no(e, t) {
|
|
3270
|
-
return X(`${H}/proposal/item/list`, {
|
|
3271
|
-
method: "get",
|
|
3272
|
-
params: { proposalCode: e },
|
|
3273
|
-
headers: K(),
|
|
3274
|
-
silent: t == null ? void 0 : t.silent
|
|
3275
|
-
});
|
|
3276
|
-
}
|
|
3277
|
-
function ro(e) {
|
|
3278
|
-
return X(`${H}/proposal/item/add`, {
|
|
3279
|
-
method: "post",
|
|
3280
|
-
data: e,
|
|
3281
|
-
headers: K()
|
|
3282
|
-
});
|
|
3283
|
-
}
|
|
3284
|
-
function oo(e) {
|
|
3285
|
-
return X(`${H}/proposal/item/update`, {
|
|
3286
|
-
method: "post",
|
|
3287
|
-
data: e,
|
|
3288
|
-
headers: K()
|
|
3289
|
-
});
|
|
3290
|
-
}
|
|
3291
|
-
function io(e, t, a) {
|
|
3292
|
-
return X(`${H}/proposal/item/delete`, {
|
|
3293
|
-
method: "post",
|
|
3294
|
-
data: { proposalCode: e, itemId: t },
|
|
3295
|
-
headers: { ...K(), ...a ? { "X-Domain-Code": a } : {} }
|
|
3296
|
-
});
|
|
3297
|
-
}
|
|
3298
|
-
function lo(e, t) {
|
|
3299
|
-
return X(`${H}/proposal/item/batchSave`, {
|
|
3300
|
-
method: "post",
|
|
3301
|
-
data: { proposalCode: e, items: t },
|
|
3302
|
-
headers: K()
|
|
3303
|
-
});
|
|
3304
|
-
}
|
|
3305
|
-
function so(e, t) {
|
|
3306
|
-
return ae(
|
|
3307
|
-
() => X(`${H}/proposal/patch`, {
|
|
3308
|
-
method: "post",
|
|
3309
|
-
data: e,
|
|
3310
|
-
headers: K()
|
|
3311
|
-
}),
|
|
3312
|
-
t
|
|
3313
|
-
);
|
|
3314
|
-
}
|
|
3315
|
-
function co(e) {
|
|
3316
|
-
return {
|
|
3317
|
-
1: "新增对象类型",
|
|
3318
|
-
2: "修改对象类型",
|
|
3319
|
-
3: "退役对象类型",
|
|
3320
|
-
4: "新增关系类型",
|
|
3321
|
-
5: "修改关系类型",
|
|
3322
|
-
6: "退役关系类型",
|
|
3323
|
-
7: "新增端点约束",
|
|
3324
|
-
8: "退役端点约束",
|
|
3325
|
-
9: "实例同步",
|
|
3326
|
-
10: "创建场景",
|
|
3327
|
-
11: "更新场景",
|
|
3328
|
-
12: "下线场景"
|
|
3329
|
-
}[e] || `类型${e}`;
|
|
3330
|
-
}
|
|
3331
|
-
function uo(e) {
|
|
3332
|
-
return { 1: { label: "安全", color: "green" }, 2: { label: "增量", color: "blue" }, 3: { label: "受限", color: "red" } }[e] || { label: `档${e}`, color: "default" };
|
|
3333
|
-
}
|
|
3334
|
-
function fo(e) {
|
|
3335
|
-
return ae(
|
|
3336
|
-
() => X(`${H}/order/page`, {
|
|
3337
|
-
method: "get",
|
|
3338
|
-
params: e,
|
|
3339
|
-
headers: K()
|
|
3340
|
-
})
|
|
3341
|
-
);
|
|
3342
|
-
}
|
|
3343
|
-
function vo(e) {
|
|
3344
|
-
return ae(
|
|
3345
|
-
() => X(`${H}/order/detail`, {
|
|
3346
|
-
method: "get",
|
|
3347
|
-
params: { code: e },
|
|
3348
|
-
headers: K()
|
|
3349
|
-
})
|
|
3350
|
-
);
|
|
3351
|
-
}
|
|
3352
|
-
function mo(e) {
|
|
3353
|
-
return ae(
|
|
3354
|
-
() => X(`${H}/order/approve`, {
|
|
3355
|
-
method: "post",
|
|
3356
|
-
data: { code: e },
|
|
3357
|
-
headers: K()
|
|
3358
|
-
})
|
|
3359
|
-
);
|
|
3360
|
-
}
|
|
3361
|
-
function bo(e) {
|
|
3362
|
-
return ae(
|
|
3363
|
-
() => X(`${H}/order/batchApprove`, {
|
|
3364
|
-
method: "post",
|
|
3365
|
-
data: { codes: e },
|
|
3366
|
-
headers: K()
|
|
3367
|
-
})
|
|
3368
|
-
);
|
|
3369
|
-
}
|
|
3370
|
-
function go(e, t) {
|
|
3371
|
-
return ae(
|
|
3372
|
-
() => X(`${H}/order/reject`, {
|
|
3373
|
-
method: "post",
|
|
3374
|
-
data: { code: e, reason: t },
|
|
3375
|
-
headers: K()
|
|
3376
|
-
})
|
|
3377
|
-
);
|
|
3378
|
-
}
|
|
3379
|
-
function ho(e) {
|
|
3380
|
-
return ae(
|
|
3381
|
-
() => X(`${H}/order/review`, {
|
|
3382
|
-
method: "get",
|
|
3383
|
-
params: { orderCode: e },
|
|
3384
|
-
headers: K()
|
|
3385
|
-
}),
|
|
3386
|
-
{ silent: !0 }
|
|
3387
|
-
);
|
|
3388
|
-
}
|
|
3389
|
-
function po(e, t = !1) {
|
|
3390
|
-
return ae(
|
|
3391
|
-
() => X(`${H}/order/review/start`, {
|
|
3392
|
-
method: "post",
|
|
3393
|
-
data: { orderCode: e, auto: t },
|
|
3394
|
-
headers: K()
|
|
3395
|
-
}),
|
|
3396
|
-
{ silent: !0, rethrow: !0 }
|
|
3397
|
-
);
|
|
3398
|
-
}
|
|
3399
|
-
function yo(e) {
|
|
3400
|
-
return ae(
|
|
3401
|
-
() => X(`${H}/order/review/confirm`, {
|
|
3402
|
-
method: "post",
|
|
3403
|
-
data: { orderCode: e },
|
|
3404
|
-
headers: K()
|
|
3405
|
-
}),
|
|
3406
|
-
{ silent: !0, rethrow: !0 }
|
|
3407
|
-
);
|
|
3408
|
-
}
|
|
3409
|
-
function $o(e) {
|
|
3410
|
-
return ae(
|
|
3411
|
-
() => X(`${H}/order/review/cancel`, {
|
|
3412
|
-
method: "post",
|
|
3413
|
-
data: { orderCode: e },
|
|
3414
|
-
headers: K()
|
|
3415
|
-
}),
|
|
3416
|
-
{ silent: !0, rethrow: !0 }
|
|
3417
|
-
);
|
|
3418
|
-
}
|
|
3419
|
-
function Co(e, t) {
|
|
3420
|
-
const a = new AbortController(), n = new URLSearchParams({ orderCode: e }).toString(), r = (async () => {
|
|
3421
|
-
var o;
|
|
3422
|
-
try {
|
|
3423
|
-
const s = await fetch(ra(`${H}/order/review/stream?${n}`), {
|
|
3424
|
-
method: "GET",
|
|
3425
|
-
credentials: "include",
|
|
3426
|
-
headers: { Accept: "text/event-stream", ...K(), ..._a() },
|
|
3427
|
-
signal: a.signal
|
|
3428
|
-
});
|
|
3429
|
-
if (!s.ok)
|
|
3430
|
-
throw new Error(await kr(s));
|
|
3431
|
-
await Sn(s, t.onEvent);
|
|
3432
|
-
} catch (s) {
|
|
3433
|
-
if (a.signal.aborted)
|
|
3434
|
-
return;
|
|
3435
|
-
(o = t.onError) == null || o.call(
|
|
3436
|
-
t,
|
|
3437
|
-
s instanceof Error && s.message ? s.message : "审核过程流读取失败"
|
|
3438
|
-
);
|
|
3439
|
-
}
|
|
3440
|
-
})();
|
|
3441
|
-
return { abort: () => a.abort(), done: r };
|
|
3442
|
-
}
|
|
3443
|
-
async function kr(e) {
|
|
3444
|
-
let t = `审核过程流连接失败(HTTP ${e.status})`;
|
|
3445
|
-
try {
|
|
3446
|
-
const a = await e.text();
|
|
3447
|
-
if (a) {
|
|
3448
|
-
const n = JSON.parse(a);
|
|
3449
|
-
n.message && (t = n.message);
|
|
3450
|
-
}
|
|
3451
|
-
} catch {
|
|
3452
|
-
}
|
|
3453
|
-
return t;
|
|
3454
|
-
}
|
|
3455
|
-
function xo(e) {
|
|
3456
|
-
return ae(
|
|
3457
|
-
() => X(`${H}/order/retryItem`, {
|
|
3458
|
-
method: "post",
|
|
3459
|
-
data: { itemCode: e },
|
|
3460
|
-
headers: K()
|
|
3461
|
-
})
|
|
3462
|
-
);
|
|
3463
|
-
}
|
|
3464
|
-
function So(e) {
|
|
3465
|
-
return ae(
|
|
3466
|
-
() => X(`${H}/order/task/progress`, {
|
|
3467
|
-
method: "get",
|
|
3468
|
-
params: { code: e },
|
|
3469
|
-
headers: K()
|
|
3470
|
-
}),
|
|
3471
|
-
{ silent: !0 }
|
|
3472
|
-
);
|
|
3473
|
-
}
|
|
3474
|
-
function wo(e) {
|
|
3475
|
-
return ae(
|
|
3476
|
-
() => X(`${H}/task/page`, {
|
|
3477
|
-
method: "get",
|
|
3478
|
-
params: e,
|
|
3479
|
-
headers: K()
|
|
3480
|
-
}),
|
|
3481
|
-
{ silent: !0 }
|
|
3482
|
-
);
|
|
3483
|
-
}
|
|
3484
|
-
function Eo(e) {
|
|
3485
|
-
return ae(
|
|
3486
|
-
() => X(`${H}/task/log/page`, {
|
|
3487
|
-
method: "get",
|
|
3488
|
-
params: e,
|
|
3489
|
-
headers: K()
|
|
3490
|
-
})
|
|
3491
|
-
);
|
|
3492
|
-
}
|
|
3493
|
-
function _o(e) {
|
|
3494
|
-
return ae(
|
|
3495
|
-
() => X(`${H}/task/progress`, {
|
|
3496
|
-
method: "get",
|
|
3497
|
-
params: { scopeId: e },
|
|
3498
|
-
headers: K()
|
|
3499
|
-
}),
|
|
3500
|
-
{ silent: !0 }
|
|
3501
|
-
);
|
|
3502
|
-
}
|
|
3503
|
-
function Po(e) {
|
|
3504
|
-
return ae(
|
|
3505
|
-
() => X(`${H}/version/batch/page`, {
|
|
3506
|
-
method: "get",
|
|
3507
|
-
params: e,
|
|
3508
|
-
headers: K()
|
|
3509
|
-
})
|
|
3510
|
-
);
|
|
3511
|
-
}
|
|
3512
|
-
function Io(e) {
|
|
3513
|
-
return ae(
|
|
3514
|
-
() => X(`${H}/version/batch/detail`, {
|
|
3515
|
-
method: "get",
|
|
3516
|
-
params: { batchCode: e },
|
|
3517
|
-
headers: K()
|
|
3518
|
-
})
|
|
3519
|
-
);
|
|
3520
|
-
}
|
|
3521
|
-
function No(e) {
|
|
3522
|
-
return { EFFECTIVE: "已生效", EXECUTING: "执行中", PARTIAL_FAILED: "生效有失败" }[e || "EFFECTIVE"];
|
|
3523
|
-
}
|
|
3524
|
-
function Oo(e) {
|
|
3525
|
-
return { 1: "待提交", 2: "已提交", 3: "已驳回" }[e] || `状态${e}`;
|
|
3526
|
-
}
|
|
3527
|
-
function To(e) {
|
|
3528
|
-
return {
|
|
3529
|
-
1: "待审批",
|
|
3530
|
-
2: "已驳回",
|
|
3531
|
-
3: "已审批",
|
|
3532
|
-
4: "执行中",
|
|
3533
|
-
5: "已生效",
|
|
3534
|
-
6: "生效有失败",
|
|
3535
|
-
7: "执行失败"
|
|
3536
|
-
}[e] || `状态${e}`;
|
|
3537
|
-
}
|
|
3538
|
-
function Ro(e) {
|
|
3539
|
-
return { 1: "结构", 2: "数据", 3: "混合" }[e] || `类型${e}`;
|
|
3540
|
-
}
|
|
3541
|
-
function ko(e) {
|
|
3542
|
-
return { 1: "对话产出", 2: "文件导入", 3: "未对齐上报", 4: "人工提交", 5: "外部指导" }[e] || `来源${e}`;
|
|
3543
|
-
}
|
|
3544
|
-
const H = "/kb/v1/ontology", K = () => ({ "X-Tenant-Code": mn() }), _a = () => {
|
|
3545
|
-
const e = gn();
|
|
3546
|
-
if (!e)
|
|
3547
|
-
return {};
|
|
3548
|
-
const t = { "X-Domain-Code": e };
|
|
3549
|
-
return bn() === "ANCESTORS" && (t["X-Domain-Scope"] = "ANCESTORS"), t;
|
|
3550
|
-
};
|
|
3551
|
-
async function ae(e, t) {
|
|
3552
|
-
try {
|
|
3553
|
-
return await e();
|
|
3554
|
-
} catch (a) {
|
|
3555
|
-
if (t != null && t.silent || vn("请求失败", a.message || "服务器错误", "error"), t != null && t.rethrow)
|
|
3556
|
-
throw a;
|
|
3557
|
-
return;
|
|
3558
|
-
}
|
|
3559
|
-
}
|
|
3560
|
-
export {
|
|
3561
|
-
Vr as A,
|
|
3562
|
-
Hr as B,
|
|
3563
|
-
jr as C,
|
|
3564
|
-
Ea as D,
|
|
3565
|
-
go as E,
|
|
3566
|
-
Jr as F,
|
|
3567
|
-
Gr as G,
|
|
3568
|
-
Ro as H,
|
|
3569
|
-
ko as I,
|
|
3570
|
-
Yr as J,
|
|
3571
|
-
Qr as K,
|
|
3572
|
-
ao as L,
|
|
3573
|
-
to as M,
|
|
3574
|
-
oo as N,
|
|
3575
|
-
Kr as O,
|
|
3576
|
-
eo as P,
|
|
3577
|
-
ro as Q,
|
|
3578
|
-
xr as R,
|
|
3579
|
-
lo as S,
|
|
3580
|
-
ba as T,
|
|
3581
|
-
io as U,
|
|
3582
|
-
Zr as V,
|
|
3583
|
-
Wr as W,
|
|
3584
|
-
mo as X,
|
|
3585
|
-
sa as Y,
|
|
3586
|
-
Eo as a,
|
|
3587
|
-
_o as b,
|
|
3588
|
-
co as c,
|
|
3589
|
-
So as d,
|
|
3590
|
-
Po as e,
|
|
3591
|
-
Io as f,
|
|
3592
|
-
vo as g,
|
|
3593
|
-
uo as h,
|
|
3594
|
-
fo as i,
|
|
3595
|
-
bo as j,
|
|
3596
|
-
Fr as k,
|
|
3597
|
-
no as l,
|
|
3598
|
-
so as m,
|
|
3599
|
-
Xr as n,
|
|
3600
|
-
To as o,
|
|
3601
|
-
wo as p,
|
|
3602
|
-
qr as q,
|
|
3603
|
-
xo as r,
|
|
3604
|
-
Ur as s,
|
|
3605
|
-
Oo as t,
|
|
3606
|
-
ho as u,
|
|
3607
|
-
No as v,
|
|
3608
|
-
po as w,
|
|
3609
|
-
yo as x,
|
|
3610
|
-
$o as y,
|
|
3611
|
-
Co as z
|
|
3612
|
-
};
|