@selfdecode/sd-component-library 4.0.143 → 4.0.145
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/lib/components/links/link/interfaces.d.ts +1 -0
- package/lib/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library102.js +2 -2
- package/lib/sd-component-library104.js +4 -4
- package/lib/sd-component-library106.js +4 -4
- package/lib/sd-component-library111.js +1 -1
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +1 -1
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library126.js +1 -1
- package/lib/sd-component-library127.js +1 -1
- package/lib/sd-component-library133.js +3 -3
- package/lib/sd-component-library134.js +1 -1
- package/lib/sd-component-library136.js +2 -2
- package/lib/sd-component-library168.js +1 -1
- package/lib/sd-component-library171.js +1 -1
- package/lib/sd-component-library172.js +4 -4
- package/lib/sd-component-library197.js +3 -3
- package/lib/sd-component-library200.js +2 -60
- package/lib/sd-component-library200.js.map +1 -1
- package/lib/sd-component-library201.js +30 -2
- package/lib/sd-component-library201.js.map +1 -1
- package/lib/sd-component-library202.js +590 -21
- package/lib/sd-component-library202.js.map +1 -1
- package/lib/sd-component-library203.js +56 -595
- package/lib/sd-component-library203.js.map +1 -1
- package/lib/sd-component-library207.js +18 -21
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +64 -3
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +23 -3
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +39 -17
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +19 -62
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +3 -23
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +3 -40
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +128 -13
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +13 -3
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +14 -3
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +3 -129
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +3 -13
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +3 -65
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +52 -3
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library221.js +46 -3
- package/lib/sd-component-library221.js.map +1 -1
- package/lib/sd-component-library222.js +54 -41
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +3 -46
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library230.js +1 -1
- package/lib/sd-component-library231.js +1 -1
- package/lib/sd-component-library233.js +64 -129
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library235.js +36 -40
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +12 -7
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +21 -21
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +109 -20
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +45 -46
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library240.js +23 -74
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +53 -2
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +20 -63
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +20 -43
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +47 -12
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +41 -21
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +22 -104
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +2 -47
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +74 -23
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +25 -49
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +3 -325
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +24 -5
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +3 -41
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +324 -26
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library254.js +5 -29
- package/lib/sd-component-library254.js.map +1 -1
- package/lib/sd-component-library255.js +2 -3
- package/lib/sd-component-library255.js.map +1 -1
- package/lib/sd-component-library256.js +2 -24
- package/lib/sd-component-library256.js.map +1 -1
- package/lib/sd-component-library257.js +129 -3
- package/lib/sd-component-library257.js.map +1 -1
- package/lib/sd-component-library258.js +43 -21
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +8 -22
- package/lib/sd-component-library259.js.map +1 -1
- package/lib/sd-component-library260.js +25 -30
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +21 -50
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library262.js +30 -134
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +119 -59
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +38 -63
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +74 -9
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +72 -47
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +25 -85
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +19 -90
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +120 -25
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +117 -16
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +10 -125
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +39 -111
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +9 -10
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library274.js +49 -48
- package/lib/sd-component-library274.js.map +1 -1
- package/lib/sd-component-library275.js +90 -2
- package/lib/sd-component-library275.js.map +1 -1
- package/lib/sd-component-library276.js +92 -2
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library279.js +70 -10
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library280.js +101 -69
- package/lib/sd-component-library280.js.map +1 -1
- package/lib/sd-component-library281.js +95 -91
- package/lib/sd-component-library281.js.map +1 -1
- package/lib/sd-component-library282.js +10 -106
- package/lib/sd-component-library282.js.map +1 -1
- package/lib/sd-component-library296.js +88 -20
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +50 -34
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +4 -92
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +25 -51
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +4 -5
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library301.js +35 -4
- package/lib/sd-component-library301.js.map +1 -1
- package/lib/sd-component-library303.js +1 -1
- package/lib/sd-component-library315.js +1 -1
- package/lib/sd-component-library317.js +6 -90
- package/lib/sd-component-library317.js.map +1 -1
- package/lib/sd-component-library318.js +90 -6
- package/lib/sd-component-library318.js.map +1 -1
- package/lib/sd-component-library48.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library51.js +3 -3
- package/lib/sd-component-library52.js +2 -2
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library62.js +3 -3
- package/lib/sd-component-library63.js +1 -1
- package/lib/sd-component-library64.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library72.js +3 -3
- package/lib/sd-component-library74.js +2 -2
- package/lib/sd-component-library75.js +3 -3
- package/lib/sd-component-library76.js +1 -1
- package/lib/sd-component-library77.js +1 -1
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library81.js +9 -7
- package/lib/sd-component-library81.js.map +1 -1
- package/lib/sd-component-library89.js +3 -3
- package/lib/sd-component-library92.js +3 -3
- package/lib/sd-component-library94.js +5 -5
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library280.js","sources":["../src/components/inputs/date-inputs/base-date-range-input/
|
|
1
|
+
{"version":3,"file":"sd-component-library280.js","sources":["../src/components/inputs/date-inputs/base-date-range-input/partials/base-date-range-input-mobile/base-date-range-input-mobile.tsx"],"sourcesContent":["import React from \"react\";\nimport { DateRangePicker } from \"react-date-range\";\n\nimport { Box } from \"rebass\";\n\nimport { OutsideClickBox } from \"../../../../../boxes\";\nimport { PrimaryTextButton } from \"../../../../../buttons\";\nimport { FrFrContainer } from \"../../../../../containers\";\nimport { ResponsiveTextV2 } from \"../../../../../texts/responsive-text-v2\";\nimport { getCalendarProps } from \"../../utils\";\nimport { ApplyButton } from \"../apply-button\";\nimport { SelectedRangeText } from \"../selected-range-text\";\nimport { BaseDateRangeInputMobileProps as Props } from \"./interfaces\";\n\nexport const BaseDateRangeInputMobile = React.forwardRef<HTMLDivElement, Props>(\n (props, ref) => {\n const { zIndex, customOptionSelected, handleCancel, getStaticRanges } =\n props;\n\n const onClickOutside = (event?: React.MouseEvent<HTMLDivElement>) => {\n event?.preventDefault();\n handleCancel();\n };\n\n return (\n <Box\n sx={{\n position: \"fixed\",\n top: 0,\n left: 0,\n width: \"100vw\",\n height: \"100vh\",\n overflowY: \"auto\",\n py: \"30px\",\n bg: \"#434A5499\",\n }}\n data-testid=\"calendar-wrapper\"\n >\n <OutsideClickBox\n onClickOutside={onClickOutside}\n sx={{\n borderStyle: \"solid\",\n borderWidth: \"1px\",\n borderColor: \"cl_lightGrey\",\n minWidth: \"352px\",\n width: \"max-content\",\n backgroundColor: \"#fff\",\n m: \"auto\",\n borderRadius: \"4px\",\n zIndex,\n \".rdrDateRangePickerWrapper\": {\n width: \"100%\",\n flexDirection: \"column\",\n },\n \".rdrDefinedRangesWrapper\": {\n width: \"100%\",\n },\n \".rdrCalendarWrapper\": {\n display: customOptionSelected ? \"inline-flex\" : \"none\",\n },\n \".rdrInputRanges\": {\n display: \"none\",\n },\n \".rdrStaticRanges:before\": {\n fontSize: \"16px\",\n fontFamily: \"proxima-nova\",\n color: \"#9BA2B4\",\n fontWeight: \"300\",\n p: \"10px 20px\",\n },\n \".rdrStaticRange\": {\n fontSize: \"16px\",\n fontFamily: \"proxima-nova\",\n color: \"#434A54\",\n borderBottomWidth: \"0\",\n },\n }}\n >\n <ResponsiveTextV2 fontSizeWeight={[12, \"semi-bold\"]} ref={ref}>\n <DateRangePicker\n {...getCalendarProps(props)}\n direction=\"vertical\"\n staticRanges={getStaticRanges(true)}\n />\n </ResponsiveTextV2>\n\n <SelectedRangeText {...props} isMobile />\n\n <FrFrContainer p=\"10px 20px\">\n <PrimaryTextButton\n onClick={handleCancel}\n height=\"42px\"\n color=\"cl_darkGrey\"\n padding=\"0\"\n >\n Cancel\n </PrimaryTextButton>\n\n <ApplyButton {...props} />\n </FrFrContainer>\n </OutsideClickBox>\n </Box>\n );\n }\n);\n"],"names":["BaseDateRangeInputMobile","React","props","ref","zIndex","customOptionSelected","handleCancel","getStaticRanges","onClickOutside","event","jsx","Box","jsxs","OutsideClickBox","ResponsiveTextV2","DateRangePicker","getCalendarProps","SelectedRangeText","FrFrContainer","PrimaryTextButton","ApplyButton"],"mappings":";;;;;;;;;;;AAcO,MAAMA,IAA2BC,EAAM;AAAA,EA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GACnD,UAAAO,gBAAAA,EAAA;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACE,GAAGC,EAAiBd,CAAK;AAAA,kBAC1B,WAAU;AAAA,kBACV,cAAcK,EAAgB,EAAI;AAAA,gBAAA;AAAA,cAAA,GAEtC;AAAA,cAECG,gBAAAA,EAAA,IAAAO,GAAA,EAAmB,GAAGf,GAAO,UAAQ,GAAC,CAAA;AAAA,cAEvCU,gBAAAA,EAAAA,KAACM,GAAc,EAAA,GAAE,aACf,UAAA;AAAA,gBAAAR,gBAAAA,EAAA;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACC,SAASb;AAAA,oBACT,QAAO;AAAA,oBACP,OAAM;AAAA,oBACN,SAAQ;AAAA,oBACT,UAAA;AAAA,kBAAA;AAAA,gBAED;AAAA,gBAEAI,gBAAAA,EAAAA,IAACU,GAAa,EAAA,GAAGlB,GAAO;AAAA,cAAA,GAC1B;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
|
@@ -1,105 +1,109 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { j as e } from "./sd-component-library197.js";
|
|
2
|
+
import { DateRangePicker as p } from "react-date-range";
|
|
3
|
+
import { Box as l } from "rebass";
|
|
4
|
+
import { getCalendarProps as x } from "./sd-component-library279.js";
|
|
5
|
+
import { TenSb as m } from "./sd-component-library153.js";
|
|
6
|
+
import { PrimaryTextButton as s } from "./sd-component-library22.js";
|
|
7
|
+
import { SelectedRangeText as c } from "./sd-component-library315.js";
|
|
8
|
+
import { ApplyButton as f } from "./sd-component-library316.js";
|
|
9
|
+
import { GridContainerV2 as g } from "./sd-component-library38.js";
|
|
10
|
+
const B = (r) => {
|
|
11
|
+
const {
|
|
12
|
+
selectedRange: o,
|
|
13
|
+
zIndex: n,
|
|
14
|
+
getStaticRanges: i,
|
|
15
|
+
handleCancel: a,
|
|
16
|
+
quickSelectionLabel: d,
|
|
17
|
+
alignCalendar: t
|
|
18
|
+
} = r;
|
|
19
|
+
return /* @__PURE__ */ e.jsxs(
|
|
20
|
+
l,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
overflowX: "auto",
|
|
24
|
+
borderStyle: "solid",
|
|
25
|
+
borderWidth: "1px",
|
|
26
|
+
minWidth: "max-content",
|
|
27
|
+
borderColor: "cl_lightGrey",
|
|
28
|
+
position: "absolute",
|
|
29
|
+
maxWidth: "max-content",
|
|
30
|
+
width: "max-content",
|
|
31
|
+
top: 0,
|
|
32
|
+
left: t === "left" ? "0" : t === "right" ? "unset" : void 0,
|
|
33
|
+
right: t === "right" ? "0" : t === "left" ? "unset" : void 0,
|
|
34
|
+
margin: "auto",
|
|
35
|
+
backgroundColor: "#fff",
|
|
36
|
+
zIndex: n,
|
|
37
|
+
".rdrDateRangePickerWrapper": {
|
|
38
|
+
width: "unset",
|
|
39
|
+
flexDirection: "row"
|
|
29
40
|
},
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
41
|
+
".rdrDefinedRangesWrapper": {
|
|
42
|
+
width: "226px"
|
|
43
|
+
},
|
|
44
|
+
".rdrCalendarWrapper": {
|
|
45
|
+
display: "inline-flex"
|
|
46
|
+
},
|
|
47
|
+
".rdrInputRanges": {
|
|
48
|
+
display: "none"
|
|
49
|
+
},
|
|
50
|
+
".rdrStaticRanges:before": {
|
|
51
|
+
content: d,
|
|
52
|
+
fontSize: "14px",
|
|
53
|
+
fontFamily: "proxima-nova",
|
|
54
|
+
color: "#9BA2B4",
|
|
55
|
+
fontWeight: "300",
|
|
56
|
+
p: "10px 20px"
|
|
57
|
+
},
|
|
58
|
+
".rdrStaticRange": {
|
|
59
|
+
fontSize: "14px",
|
|
60
|
+
fontFamily: "proxima-nova",
|
|
61
|
+
color: "#434A54",
|
|
62
|
+
borderBottomWidth: "1px"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"data-testid": "calendar-wrapper",
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(
|
|
68
|
+
p,
|
|
69
|
+
{
|
|
70
|
+
...x(r),
|
|
71
|
+
direction: "horizontal",
|
|
72
|
+
staticRanges: i()
|
|
73
|
+
}
|
|
74
|
+
) }),
|
|
75
|
+
/* @__PURE__ */ e.jsxs(
|
|
76
|
+
g,
|
|
33
77
|
{
|
|
34
|
-
onClickOutside: p,
|
|
35
78
|
sx: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
m: "auto",
|
|
43
|
-
borderRadius: "4px",
|
|
44
|
-
zIndex: n,
|
|
45
|
-
".rdrDateRangePickerWrapper": {
|
|
46
|
-
width: "100%",
|
|
47
|
-
flexDirection: "column"
|
|
48
|
-
},
|
|
49
|
-
".rdrDefinedRangesWrapper": {
|
|
50
|
-
width: "100%"
|
|
51
|
-
},
|
|
52
|
-
".rdrCalendarWrapper": {
|
|
53
|
-
display: a ? "inline-flex" : "none"
|
|
54
|
-
},
|
|
55
|
-
".rdrInputRanges": {
|
|
56
|
-
display: "none"
|
|
57
|
-
},
|
|
58
|
-
".rdrStaticRanges:before": {
|
|
59
|
-
fontSize: "16px",
|
|
60
|
-
fontFamily: "proxima-nova",
|
|
61
|
-
color: "#9BA2B4",
|
|
62
|
-
fontWeight: "300",
|
|
63
|
-
p: "10px 20px"
|
|
64
|
-
},
|
|
65
|
-
".rdrStaticRange": {
|
|
66
|
-
fontSize: "16px",
|
|
67
|
-
fontFamily: "proxima-nova",
|
|
68
|
-
color: "#434A54",
|
|
69
|
-
borderBottomWidth: "0"
|
|
70
|
-
}
|
|
79
|
+
gridTemplateColumns: "max-content 1fr max-content",
|
|
80
|
+
gap: "30px",
|
|
81
|
+
p: "10px",
|
|
82
|
+
borderTopWidth: "1px",
|
|
83
|
+
borderTopStyle: "solid",
|
|
84
|
+
borderTopColor: "#CCD0DB"
|
|
71
85
|
},
|
|
72
86
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ e.jsx(
|
|
74
88
|
s,
|
|
75
89
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
90
|
+
onClick: a,
|
|
91
|
+
height: "42px",
|
|
92
|
+
color: "cl_darkGrey",
|
|
93
|
+
padding: "0 0 0 10px",
|
|
94
|
+
children: "Cancel"
|
|
79
95
|
}
|
|
80
|
-
)
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */ r.jsx(
|
|
84
|
-
u,
|
|
85
|
-
{
|
|
86
|
-
onClick: o,
|
|
87
|
-
height: "42px",
|
|
88
|
-
color: "cl_darkGrey",
|
|
89
|
-
padding: "0",
|
|
90
|
-
children: "Cancel"
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
/* @__PURE__ */ r.jsx(R, { ...e })
|
|
94
|
-
] })
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ e.jsx(c, { selectedRange: o }),
|
|
98
|
+
/* @__PURE__ */ e.jsx(f, { ...r })
|
|
95
99
|
]
|
|
96
100
|
}
|
|
97
101
|
)
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
};
|
|
102
106
|
export {
|
|
103
|
-
|
|
107
|
+
B as BaseDateRangeInputDesktop
|
|
104
108
|
};
|
|
105
109
|
//# sourceMappingURL=sd-component-library281.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library281.js","sources":["../src/components/inputs/date-inputs/base-date-range-input/partials/base-date-range-input-
|
|
1
|
+
{"version":3,"file":"sd-component-library281.js","sources":["../src/components/inputs/date-inputs/base-date-range-input/partials/base-date-range-input-desktop/base-date-range-input-desktop.tsx"],"sourcesContent":["import React from \"react\";\nimport { DateRangePicker } from \"react-date-range\";\n\nimport { Box } from \"rebass\";\n\nimport { PrimaryTextButton } from \"../../../../../buttons\";\nimport { Grid } from \"../../../../../containers\";\nimport { TenSb } from \"../../../../../texts/ten-sb\";\nimport { getCalendarProps } from \"../../utils\";\nimport { ApplyButton } from \"../apply-button\";\nimport { SelectedRangeText } from \"../selected-range-text\";\nimport { BaseDateRangeInputDesktopProps as Props } from \"./interfaces\";\n\nexport const BaseDateRangeInputDesktop: React.FC<Props> = (props) => {\n const {\n selectedRange,\n zIndex,\n getStaticRanges,\n handleCancel,\n quickSelectionLabel,\n alignCalendar,\n } = props;\n return (\n <Box\n sx={{\n overflowX: \"auto\",\n borderStyle: \"solid\",\n borderWidth: \"1px\",\n minWidth: \"max-content\",\n borderColor: \"cl_lightGrey\",\n position: \"absolute\",\n maxWidth: \"max-content\",\n width: \"max-content\",\n top: 0,\n left:\n alignCalendar === \"left\"\n ? \"0\"\n : alignCalendar === \"right\"\n ? \"unset\"\n : undefined,\n right:\n alignCalendar === \"right\"\n ? \"0\"\n : alignCalendar === \"left\"\n ? \"unset\"\n : undefined,\n margin: \"auto\",\n backgroundColor: \"#fff\",\n zIndex,\n \".rdrDateRangePickerWrapper\": {\n width: \"unset\",\n flexDirection: \"row\",\n },\n \".rdrDefinedRangesWrapper\": {\n width: \"226px\",\n },\n \".rdrCalendarWrapper\": {\n display: \"inline-flex\",\n },\n \".rdrInputRanges\": {\n display: \"none\",\n },\n \".rdrStaticRanges:before\": {\n content: quickSelectionLabel,\n fontSize: \"14px\",\n fontFamily: \"proxima-nova\",\n color: \"#9BA2B4\",\n fontWeight: \"300\",\n p: \"10px 20px\",\n },\n \".rdrStaticRange\": {\n fontSize: \"14px\",\n fontFamily: \"proxima-nova\",\n color: \"#434A54\",\n borderBottomWidth: \"1px\",\n },\n }}\n data-testid=\"calendar-wrapper\"\n >\n <TenSb>\n <DateRangePicker\n {...getCalendarProps(props)}\n direction=\"horizontal\"\n staticRanges={getStaticRanges()}\n />\n </TenSb>\n\n <Grid\n sx={{\n gridTemplateColumns: \"max-content 1fr max-content\",\n gap: \"30px\",\n p: \"10px\",\n borderTopWidth: \"1px\",\n borderTopStyle: \"solid\",\n borderTopColor: \"#CCD0DB\",\n }}\n >\n <PrimaryTextButton\n onClick={handleCancel}\n height=\"42px\"\n color=\"cl_darkGrey\"\n padding=\"0 0 0 10px\"\n >\n Cancel\n </PrimaryTextButton>\n\n <SelectedRangeText selectedRange={selectedRange} />\n\n <ApplyButton {...props} />\n </Grid>\n </Box>\n );\n};\n"],"names":["BaseDateRangeInputDesktop","props","selectedRange","zIndex","getStaticRanges","handleCancel","quickSelectionLabel","alignCalendar","jsxs","Box","jsx","TenSb","DateRangePicker","getCalendarProps","Grid","PrimaryTextButton","SelectedRangeText","ApplyButton"],"mappings":";;;;;;;;;AAaa,MAAAA,IAA6C,CAACC,MAAU;AAC7D,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,QAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,eAAAC;AAAA,EACE,IAAAN;AAEF,SAAAO,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,WAAW;AAAA,QACX,aAAa;AAAA,QACb,aAAa;AAAA,QACb,UAAU;AAAA,QACV,aAAa;AAAA,QACb,UAAU;AAAA,QACV,UAAU;AAAA,QACV,OAAO;AAAA,QACP,KAA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AAA,cAED;AAAA,cAEAK,gBAAAA,MAACM,KAAkB,eAAAd,GAA8B;AAAA,cAEjDQ,gBAAAA,EAAAA,IAACO,GAAa,EAAA,GAAGhB,GAAO;AAAA,YAAA;AAAA,UAAA;AAAA,QAC1B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,109 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const B = (r) => {
|
|
11
|
-
const {
|
|
12
|
-
selectedRange: o,
|
|
13
|
-
zIndex: n,
|
|
14
|
-
getStaticRanges: i,
|
|
15
|
-
handleCancel: a,
|
|
16
|
-
quickSelectionLabel: d,
|
|
17
|
-
alignCalendar: t
|
|
18
|
-
} = r;
|
|
19
|
-
return /* @__PURE__ */ e.jsxs(
|
|
20
|
-
l,
|
|
21
|
-
{
|
|
22
|
-
sx: {
|
|
23
|
-
overflowX: "auto",
|
|
24
|
-
borderStyle: "solid",
|
|
25
|
-
borderWidth: "1px",
|
|
26
|
-
minWidth: "max-content",
|
|
27
|
-
borderColor: "cl_lightGrey",
|
|
28
|
-
position: "absolute",
|
|
29
|
-
maxWidth: "max-content",
|
|
30
|
-
width: "max-content",
|
|
31
|
-
top: 0,
|
|
32
|
-
left: t === "left" ? "0" : t === "right" ? "unset" : void 0,
|
|
33
|
-
right: t === "right" ? "0" : t === "left" ? "unset" : void 0,
|
|
34
|
-
margin: "auto",
|
|
35
|
-
backgroundColor: "#fff",
|
|
36
|
-
zIndex: n,
|
|
37
|
-
".rdrDateRangePickerWrapper": {
|
|
38
|
-
width: "unset",
|
|
39
|
-
flexDirection: "row"
|
|
40
|
-
},
|
|
41
|
-
".rdrDefinedRangesWrapper": {
|
|
42
|
-
width: "226px"
|
|
43
|
-
},
|
|
44
|
-
".rdrCalendarWrapper": {
|
|
45
|
-
display: "inline-flex"
|
|
46
|
-
},
|
|
47
|
-
".rdrInputRanges": {
|
|
48
|
-
display: "none"
|
|
49
|
-
},
|
|
50
|
-
".rdrStaticRanges:before": {
|
|
51
|
-
content: d,
|
|
52
|
-
fontSize: "14px",
|
|
53
|
-
fontFamily: "proxima-nova",
|
|
54
|
-
color: "#9BA2B4",
|
|
55
|
-
fontWeight: "300",
|
|
56
|
-
p: "10px 20px"
|
|
57
|
-
},
|
|
58
|
-
".rdrStaticRange": {
|
|
59
|
-
fontSize: "14px",
|
|
60
|
-
fontFamily: "proxima-nova",
|
|
61
|
-
color: "#434A54",
|
|
62
|
-
borderBottomWidth: "1px"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"data-testid": "calendar-wrapper",
|
|
66
|
-
children: [
|
|
67
|
-
/* @__PURE__ */ e.jsx(m, { children: /* @__PURE__ */ e.jsx(
|
|
68
|
-
p,
|
|
69
|
-
{
|
|
70
|
-
...x(r),
|
|
71
|
-
direction: "horizontal",
|
|
72
|
-
staticRanges: i()
|
|
73
|
-
}
|
|
74
|
-
) }),
|
|
75
|
-
/* @__PURE__ */ e.jsxs(
|
|
76
|
-
g,
|
|
77
|
-
{
|
|
78
|
-
sx: {
|
|
79
|
-
gridTemplateColumns: "max-content 1fr max-content",
|
|
80
|
-
gap: "30px",
|
|
81
|
-
p: "10px",
|
|
82
|
-
borderTopWidth: "1px",
|
|
83
|
-
borderTopStyle: "solid",
|
|
84
|
-
borderTopColor: "#CCD0DB"
|
|
85
|
-
},
|
|
86
|
-
children: [
|
|
87
|
-
/* @__PURE__ */ e.jsx(
|
|
88
|
-
s,
|
|
89
|
-
{
|
|
90
|
-
onClick: a,
|
|
91
|
-
height: "42px",
|
|
92
|
-
color: "cl_darkGrey",
|
|
93
|
-
padding: "0 0 0 10px",
|
|
94
|
-
children: "Cancel"
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
/* @__PURE__ */ e.jsx(c, { selectedRange: o }),
|
|
98
|
-
/* @__PURE__ */ e.jsx(f, { ...r })
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
)
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
};
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const a = (t) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 18.2, height: 20, viewBox: "0 0 18.2 20", ...t }, /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("style", null, `
|
|
3
|
+
.calendar{
|
|
4
|
+
fill:none;
|
|
5
|
+
stroke-linecap:round;
|
|
6
|
+
stroke-linejoin:round;
|
|
7
|
+
stroke-width:2px;
|
|
8
|
+
}
|
|
9
|
+
`)), /* @__PURE__ */ e.createElement("g", { transform: "translate(-3.5 -2)" }, /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M6.3,6H18.9a1.8,1.8,0,0,1,1.8,1.8V20.4a1.8,1.8,0,0,1-1.8,1.8H6.3a1.8,1.8,0,0,1-1.8-1.8V7.8A1.8,1.8,0,0,1,6.3,6Z", transform: "translate(0 -1.2)" }), /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M24,3V6.6", transform: "translate(-7.8 0)" }), /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M12,3V6.6", transform: "translate(-3 0)" }), /* @__PURE__ */ e.createElement("path", { className: "calendar", stroke: "current", d: "M4.5,15H20.7", transform: "translate(0 -4.8)" })));
|
|
106
10
|
export {
|
|
107
|
-
|
|
11
|
+
a as ReactComponent
|
|
108
12
|
};
|
|
109
13
|
//# sourceMappingURL=sd-component-library282.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library282.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"sd-component-library282.js","sources":["../src/components/icons/calendar-icon/calendar.svg"],"sourcesContent":["export default \"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy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,cAAc,OAAO,EAAE,OAAO,8BAA8B,OAAO,MAAM,QAAQ,IAAI,SAAS,eAAe,GAAGD,KAAyB,gBAAAC,EAAM,cAAc,QAAQ,MAAsB,gBAAAA,EAAM,cAAc,SAAS,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAAiJ,CAAC,GAAmB,gBAAAA,EAAM,cAAc,KAAK,EAAE,WAAW,wBAAwC,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,mHAAmH,WAAW,oBAAqB,CAAA,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,aAAa,WAAW,oBAAmB,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,aAAa,WAAW,kBAAmB,CAAA,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,WAAW,YAAY,QAAQ,WAAW,GAAG,gBAAgB,WAAW,oBAAmB,CAAE,CAAC,CAAC;"}
|
|
@@ -1,28 +1,96 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library197.js";
|
|
2
|
+
import { useState as S, useCallback as B } from "react";
|
|
3
|
+
import { Box as Y } from "rebass";
|
|
4
|
+
import { labelPaddingX as c, labelWidth as W } from "./sd-component-library227.js";
|
|
5
|
+
import { getCoordinateForArc as $ } from "./sd-component-library91.js";
|
|
6
|
+
import { ResponsiveTextV2 as z } from "./sd-component-library150.js";
|
|
7
|
+
const D = (j) => {
|
|
4
8
|
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
label: d,
|
|
10
|
+
color: p,
|
|
11
|
+
alpha: e,
|
|
12
|
+
radius: r,
|
|
13
|
+
horizontal: v,
|
|
14
|
+
pointerLength: m,
|
|
15
|
+
round: y,
|
|
16
|
+
pointY: i
|
|
17
|
+
} = j, [h, C] = S(0), [f, R] = S(0), T = B((t) => {
|
|
18
|
+
if (t) {
|
|
19
|
+
const { height: o, y: l } = t.getBoundingClientRect();
|
|
20
|
+
C(o), R(l);
|
|
21
|
+
}
|
|
22
|
+
}, []);
|
|
23
|
+
let { x: b, y: g } = $(
|
|
24
|
+
r + m,
|
|
25
|
+
e,
|
|
26
|
+
r
|
|
27
|
+
);
|
|
28
|
+
const s = e === 180, n = e < 180, u = e > 180;
|
|
29
|
+
if (v) {
|
|
30
|
+
const { x: t, y: o } = $(
|
|
31
|
+
r,
|
|
32
|
+
e,
|
|
33
|
+
r
|
|
34
|
+
);
|
|
35
|
+
b = t + m * (n ? -1 : 1), g = o;
|
|
36
|
+
}
|
|
37
|
+
if (!d)
|
|
38
|
+
return null;
|
|
39
|
+
let x = y || s ? `${c}px` : void 0;
|
|
40
|
+
if (!x && i) {
|
|
41
|
+
const t = f - h, o = f;
|
|
42
|
+
x = [
|
|
43
|
+
n || i > t,
|
|
44
|
+
u || i > t,
|
|
45
|
+
u || i < o,
|
|
46
|
+
n || i < o
|
|
47
|
+
].map((l) => l ? `${c}px` : "0").join(" ");
|
|
48
|
+
}
|
|
49
|
+
return /* @__PURE__ */ a.jsx(
|
|
50
|
+
Y,
|
|
19
51
|
{
|
|
20
|
-
|
|
21
|
-
|
|
52
|
+
sx: {
|
|
53
|
+
position: "absolute",
|
|
54
|
+
left: `${b}px`,
|
|
55
|
+
top: `${g}px`
|
|
56
|
+
},
|
|
57
|
+
children: /* @__PURE__ */ a.jsx(
|
|
58
|
+
Y,
|
|
59
|
+
{
|
|
60
|
+
sx: {
|
|
61
|
+
boxSizing: "content-box",
|
|
62
|
+
position: "relative",
|
|
63
|
+
top: `calc(-${h}px)`,
|
|
64
|
+
left: s ? "-50%" : n ? "-100%" : void 0,
|
|
65
|
+
py: "7px",
|
|
66
|
+
px: `${c}px`,
|
|
67
|
+
borderColor: p,
|
|
68
|
+
borderWidth: "2px",
|
|
69
|
+
borderStyle: "solid",
|
|
70
|
+
borderRadius: x,
|
|
71
|
+
bg: "cl_white",
|
|
72
|
+
"& > div": {
|
|
73
|
+
maxWidth: s ? void 0 : `${W}px`
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
ref: T,
|
|
77
|
+
children: /* @__PURE__ */ a.jsx(
|
|
78
|
+
z,
|
|
79
|
+
{
|
|
80
|
+
fontSizeWeight: [[12, "semi-bold"]],
|
|
81
|
+
width: "max-content",
|
|
82
|
+
color: p !== "#CCD0DB" ? p : "cl_darkGrey",
|
|
83
|
+
textTransform: "uppercase",
|
|
84
|
+
letterSpacing: "1.8px",
|
|
85
|
+
children: d
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
)
|
|
22
90
|
}
|
|
23
91
|
);
|
|
24
92
|
};
|
|
25
93
|
export {
|
|
26
|
-
|
|
94
|
+
D as MatchedRangeLabelBox
|
|
27
95
|
};
|
|
28
96
|
//# sourceMappingURL=sd-component-library296.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library296.js","sources":["../src/components/meters/outline-meter
|
|
1
|
+
{"version":3,"file":"sd-component-library296.js","sources":["../src/components/meters/common-outline-meter-partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React, { useCallback, useState } from \"react\";\n\nimport { Box } from \"rebass\";\n\nimport { ResponsiveTextV2 } from \"../../../texts/responsive-text-v2\";\nimport { labelPaddingX, labelWidth } from \"../../outline-meter/contants\";\nimport { getCoordinateForArc } from \"../../outline-meter/utils\";\nimport { MatchedRangeLabelBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const {\n label,\n color,\n alpha,\n radius,\n horizontal,\n pointerLength,\n round,\n pointY,\n } = props;\n\n const [textHeight, setTextHeight] = useState(0);\n const [textY, setTextY] = useState(0);\n\n const ref = useCallback((node: HTMLElement) => {\n if (node) {\n const { height, y } = node.getBoundingClientRect();\n setTextHeight(height);\n setTextY(y);\n }\n }, []);\n\n let { x: pointerEndX, y: pointerEndY } = getCoordinateForArc(\n radius + pointerLength,\n alpha,\n radius\n );\n\n const isOnTop = alpha === 180;\n const isOnLeft = alpha < 180;\n const isOnRight = alpha > 180;\n\n if (horizontal) {\n const { x: pointerStartX, y: pointerStartY } = getCoordinateForArc(\n radius,\n alpha,\n radius\n );\n\n pointerEndX = pointerStartX + pointerLength * (isOnLeft ? -1 : 1);\n pointerEndY = pointerStartY;\n }\n\n if (!label) return null;\n\n let borderRadius = round || isOnTop ? `${labelPaddingX}px` : undefined;\n if (!borderRadius && pointY) {\n const textTopY = textY - textHeight;\n const textBottomY = textY;\n\n borderRadius = [\n isOnLeft || pointY > textTopY,\n isOnRight || pointY > textTopY,\n isOnRight || pointY < textBottomY,\n isOnLeft || pointY < textBottomY,\n ]\n .map((flag) => (flag ? `${labelPaddingX}px` : \"0\"))\n .join(\" \");\n }\n\n return (\n <Box\n sx={{\n position: \"absolute\",\n left: `${pointerEndX}px`,\n top: `${pointerEndY}px`,\n }}\n >\n <Box\n sx={{\n boxSizing: \"content-box\",\n position: \"relative\",\n top: `calc(-${textHeight}px)`,\n left: isOnTop ? \"-50%\" : isOnLeft ? \"-100%\" : undefined,\n py: \"7px\",\n px: `${labelPaddingX}px`,\n borderColor: color,\n borderWidth: \"2px\",\n borderStyle: \"solid\",\n borderRadius,\n bg: \"cl_white\",\n \"& > div\": {\n maxWidth: isOnTop ? undefined : `${labelWidth}px`,\n },\n }}\n ref={ref}\n >\n <ResponsiveTextV2\n fontSizeWeight={[[12, \"semi-bold\"]]}\n width=\"max-content\"\n color={color !== \"#CCD0DB\" ? color : \"cl_darkGrey\"}\n textTransform=\"uppercase\"\n letterSpacing=\"1.8px\"\n >\n {label}\n </ResponsiveTextV2>\n </Box>\n </Box>\n );\n};\n"],"names":["MatchedRangeLabelBox","props","label","color","alpha","radius","horizontal","pointerLength","round","pointY","textHeight","setTextHeight","useState","textY","setTextY","ref","useCallback","node","height","y","pointerEndX","pointerEndY","getCoordinateForArc","isOnTop","isOnLeft","isOnRight","pointerStartX","pointerStartY","borderRadius","labelPaddingX","textTopY","textBottomY","flag","jsx","Box","labelWidth","ResponsiveTextV2"],"mappings":";;;;;;AASa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,eAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAR,GAEE,CAACS,GAAYC,CAAa,IAAIC,EAAS,CAAC,GACxC,CAACC,GAAOC,CAAQ,IAAIF,EAAS,CAAC,GAE9BG,IAAMC,EAAY,CAACC,MAAsB;AAC7C,QAAIA,GAAM;AACR,YAAM,EAAE,QAAAC,GAAQ,GAAAC,EAAE,IAAIF,EAAK,sBAAsB;AACjD,MAAAN,EAAcO,CAAM,GACpBJ,EAASK,CAAC;AAAA,IACZ;AAAA,EACF,GAAG,CAAE,CAAA;AAEL,MAAI,EAAE,GAAGC,GAAa,GAAGC,EAAgB,IAAAC;AAAA,IACvCjB,IAASE;AAAA,IACTH;AAAA,IACAC;AAAA,EAAA;AAGF,QAAMkB,IAAUnB,MAAU,KACpBoB,IAAWpB,IAAQ,KACnBqB,IAAYrB,IAAQ;AAE1B,MAAIE,GAAY;AACd,UAAM,EAAE,GAAGoB,GAAe,GAAGC,EAAkB,IAAAL;AAAA,MAC7CjB;AAAA,MACAD;AAAA,MACAC;AAAA,IAAA;AAGY,IAAAe,IAAAM,IAAgBnB,KAAiBiB,IAAW,KAAK,IACjDH,IAAAM;AAAA,EAChB;AAEA,MAAI,CAACzB;AAAc,WAAA;AAEnB,MAAI0B,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