@guardian/interactive-component-library 0.1.0-alpha.41 → 0.1.0-alpha.43
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.
|
@@ -12,7 +12,7 @@ const group = "_group_b5io0_5";
|
|
|
12
12
|
const rotated = "_rotated_b5io0_10";
|
|
13
13
|
const path$4 = "_path_b5io0_14";
|
|
14
14
|
const active = "_active_b5io0_18";
|
|
15
|
-
const defaultStyles$
|
|
15
|
+
const defaultStyles$x = {
|
|
16
16
|
svg: svg$9,
|
|
17
17
|
group,
|
|
18
18
|
rotated,
|
|
@@ -52,13 +52,13 @@ function Chevron({
|
|
|
52
52
|
styles: styles2
|
|
53
53
|
}) {
|
|
54
54
|
const defaultStylesCopy = {
|
|
55
|
-
...defaultStyles$
|
|
55
|
+
...defaultStyles$x
|
|
56
56
|
};
|
|
57
57
|
if (active2) {
|
|
58
|
-
defaultStylesCopy.path = mergeStyles(defaultStyles$
|
|
58
|
+
defaultStylesCopy.path = mergeStyles(defaultStyles$x.path, defaultStyles$x.active);
|
|
59
59
|
}
|
|
60
60
|
if (direction === DIRECTION.up) {
|
|
61
|
-
defaultStylesCopy.group = mergeStyles(defaultStyles$
|
|
61
|
+
defaultStylesCopy.group = mergeStyles(defaultStyles$x.group, defaultStyles$x.rotated);
|
|
62
62
|
}
|
|
63
63
|
styles2 = mergeStyles(defaultStylesCopy, styles2);
|
|
64
64
|
return size === SIZE.small ? jsx(SmallChevron, {
|
|
@@ -112,7 +112,7 @@ const container$7 = "_container_jzalm_1";
|
|
|
112
112
|
const dot = "_dot_jzalm_6";
|
|
113
113
|
const circle$2 = "_circle_jzalm_13";
|
|
114
114
|
const text$2 = "_text_jzalm_17";
|
|
115
|
-
const defaultStyles$
|
|
115
|
+
const defaultStyles$w = {
|
|
116
116
|
container: container$7,
|
|
117
117
|
dot,
|
|
118
118
|
circle: circle$2,
|
|
@@ -129,10 +129,10 @@ const LegendItem = ({
|
|
|
129
129
|
abbreviation
|
|
130
130
|
}) => {
|
|
131
131
|
const defaultStylesCopy = {
|
|
132
|
-
...defaultStyles$
|
|
132
|
+
...defaultStyles$w
|
|
133
133
|
};
|
|
134
134
|
if (dotType === DOT_TYPE.round) {
|
|
135
|
-
defaultStylesCopy.dot = mergeStyles(defaultStyles$
|
|
135
|
+
defaultStylesCopy.dot = mergeStyles(defaultStyles$w.dot, defaultStyles$w.circle);
|
|
136
136
|
}
|
|
137
137
|
styles2 = mergeStyles(defaultStylesCopy, styles2);
|
|
138
138
|
return jsxs("div", {
|
|
@@ -149,7 +149,7 @@ const bar$2 = "_bar_1jxh9_1";
|
|
|
149
149
|
const label$1 = "_label_1jxh9_5";
|
|
150
150
|
const labelStroke = "_labelStroke_1jxh9_11";
|
|
151
151
|
const backgroundRect = "_backgroundRect_1jxh9_17";
|
|
152
|
-
const defaultStyles$
|
|
152
|
+
const defaultStyles$v = {
|
|
153
153
|
bar: bar$2,
|
|
154
154
|
label: label$1,
|
|
155
155
|
labelStroke,
|
|
@@ -218,7 +218,7 @@ function StackedBar({
|
|
|
218
218
|
const rectElements = useRef([]);
|
|
219
219
|
const textElements = useRef([]);
|
|
220
220
|
styles2 = mergeStyles({
|
|
221
|
-
...defaultStyles$
|
|
221
|
+
...defaultStyles$v
|
|
222
222
|
}, styles2);
|
|
223
223
|
const svgHeight = labelType === LabelType.hanging && !hideLabels ? height + 20 : height;
|
|
224
224
|
const cleanBorderAbbr = (abbrText) => abbrText.split("-")[0];
|
|
@@ -309,7 +309,7 @@ function StackedBar({
|
|
|
309
309
|
const svg$8 = "_svg_1cajk_6";
|
|
310
310
|
const previous = "_previous_1cajk_12";
|
|
311
311
|
const next = "_next_1cajk_16";
|
|
312
|
-
const defaultStyles$
|
|
312
|
+
const defaultStyles$u = {
|
|
313
313
|
svg: svg$8,
|
|
314
314
|
previous,
|
|
315
315
|
next
|
|
@@ -320,7 +320,7 @@ const GradientIcon = (props) => {
|
|
|
320
320
|
next: next2,
|
|
321
321
|
styles: styles2
|
|
322
322
|
} = props;
|
|
323
|
-
styles2 = mergeStyles(defaultStyles$
|
|
323
|
+
styles2 = mergeStyles(defaultStyles$u, styles2);
|
|
324
324
|
const gradientId = useId();
|
|
325
325
|
return jsxs("svg", {
|
|
326
326
|
class: styles2.svg,
|
|
@@ -351,7 +351,7 @@ const GradientIcon = (props) => {
|
|
|
351
351
|
};
|
|
352
352
|
const unit = "_unit_mo5d9_1";
|
|
353
353
|
const container$6 = "_container_mo5d9_6";
|
|
354
|
-
const defaultStyles$
|
|
354
|
+
const defaultStyles$t = {
|
|
355
355
|
unit,
|
|
356
356
|
container: container$6
|
|
357
357
|
};
|
|
@@ -408,7 +408,7 @@ const Waffle = ({
|
|
|
408
408
|
const unitWidth = width / columns;
|
|
409
409
|
const unitHeight = unitWidth;
|
|
410
410
|
const height = numberOfRows * unitHeight;
|
|
411
|
-
styles2 = mergeStyles(defaultStyles$
|
|
411
|
+
styles2 = mergeStyles(defaultStyles$t, styles2);
|
|
412
412
|
return jsx("div", {
|
|
413
413
|
ref: containerRef,
|
|
414
414
|
className: styles2.container,
|
|
@@ -451,7 +451,7 @@ const Waffle = ({
|
|
|
451
451
|
};
|
|
452
452
|
const button$7 = "_button_oqopj_1";
|
|
453
453
|
const svg$7 = "_svg_oqopj_15";
|
|
454
|
-
const defaultStyles$
|
|
454
|
+
const defaultStyles$s = {
|
|
455
455
|
button: button$7,
|
|
456
456
|
svg: svg$7
|
|
457
457
|
};
|
|
@@ -460,7 +460,7 @@ const InfoButton = forwardRef(({
|
|
|
460
460
|
styles: styles2
|
|
461
461
|
}, ref) => {
|
|
462
462
|
styles2 = mergeStyles({
|
|
463
|
-
...defaultStyles$
|
|
463
|
+
...defaultStyles$s
|
|
464
464
|
}, styles2);
|
|
465
465
|
return jsx("button", {
|
|
466
466
|
ref,
|
|
@@ -479,7 +479,7 @@ const InfoButton = forwardRef(({
|
|
|
479
479
|
const svg$6 = "_svg_1v49v_1";
|
|
480
480
|
const circle$1 = "_circle_1v49v_5";
|
|
481
481
|
const pulse = "_pulse_1v49v_9";
|
|
482
|
-
const defaultStyles$
|
|
482
|
+
const defaultStyles$r = {
|
|
483
483
|
svg: svg$6,
|
|
484
484
|
circle: circle$1,
|
|
485
485
|
pulse
|
|
@@ -489,7 +489,7 @@ const CircleIcon = ({
|
|
|
489
489
|
pulse: pulse2 = false,
|
|
490
490
|
styles: styles2
|
|
491
491
|
}) => {
|
|
492
|
-
styles2 = mergeStyles(defaultStyles$
|
|
492
|
+
styles2 = mergeStyles(defaultStyles$r, styles2);
|
|
493
493
|
return jsx("svg", {
|
|
494
494
|
style: styles2.svg,
|
|
495
495
|
fill: "none",
|
|
@@ -509,7 +509,7 @@ const CircleIcon = ({
|
|
|
509
509
|
});
|
|
510
510
|
};
|
|
511
511
|
const dateStampText = "_dateStampText_wczs5_1";
|
|
512
|
-
const defaultStyles$
|
|
512
|
+
const defaultStyles$q = {
|
|
513
513
|
dateStampText
|
|
514
514
|
};
|
|
515
515
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -885,7 +885,7 @@ const RelativeTimeSentence = ({
|
|
|
885
885
|
styles: styles2
|
|
886
886
|
}) => {
|
|
887
887
|
styles2 = mergeStyles({
|
|
888
|
-
...defaultStyles$
|
|
888
|
+
...defaultStyles$q
|
|
889
889
|
}, styles2);
|
|
890
890
|
let timeSince = dayjs(timeStamp).fromNow();
|
|
891
891
|
return jsx("span", {
|
|
@@ -895,7 +895,7 @@ const RelativeTimeSentence = ({
|
|
|
895
895
|
};
|
|
896
896
|
const pageContainer = "_pageContainer_1s0yq_9";
|
|
897
897
|
const sideBorders = "_sideBorders_1s0yq_42";
|
|
898
|
-
const defaultStyles$
|
|
898
|
+
const defaultStyles$p = {
|
|
899
899
|
pageContainer,
|
|
900
900
|
sideBorders
|
|
901
901
|
};
|
|
@@ -907,7 +907,7 @@ function Container({
|
|
|
907
907
|
const {
|
|
908
908
|
pageContainer: pageContainer2,
|
|
909
909
|
sideBorders: sideBordersStyle
|
|
910
|
-
} = mergeStyles(defaultStyles$
|
|
910
|
+
} = mergeStyles(defaultStyles$p, styles2);
|
|
911
911
|
return jsx("div", {
|
|
912
912
|
className: [pageContainer2, sideBorders2 && sideBordersStyle].join(" "),
|
|
913
913
|
children
|
|
@@ -916,7 +916,7 @@ function Container({
|
|
|
916
916
|
const wrapper$1 = "_wrapper_5oj1x_9";
|
|
917
917
|
const bar$1 = "_bar_5oj1x_14";
|
|
918
918
|
const zero$1 = "_zero_5oj1x_19";
|
|
919
|
-
const defaultStyles$
|
|
919
|
+
const defaultStyles$o = {
|
|
920
920
|
wrapper: wrapper$1,
|
|
921
921
|
bar: bar$1,
|
|
922
922
|
zero: zero$1
|
|
@@ -937,7 +937,7 @@ function ChangeBar({
|
|
|
937
937
|
let thisColor = ` bg-color--${party}`;
|
|
938
938
|
let zeroStyles = ` height: ${height};`;
|
|
939
939
|
styles2 = mergeStyles({
|
|
940
|
-
...defaultStyles$
|
|
940
|
+
...defaultStyles$o
|
|
941
941
|
}, styles2);
|
|
942
942
|
return jsxs("div", {
|
|
943
943
|
className: styles2.wrapper,
|
|
@@ -955,7 +955,7 @@ const svg$5 = "_svg_886i1_9";
|
|
|
955
955
|
const dividingLineColor = "_dividingLineColor_886i1_16";
|
|
956
956
|
const square = "_square_886i1_20";
|
|
957
957
|
const corner = "_corner_886i1_24";
|
|
958
|
-
const defaultStyles$
|
|
958
|
+
const defaultStyles$n = {
|
|
959
959
|
svg: svg$5,
|
|
960
960
|
dividingLineColor,
|
|
961
961
|
square,
|
|
@@ -968,7 +968,7 @@ const SquareCutCornerIcon = ({
|
|
|
968
968
|
styles: styles2
|
|
969
969
|
}) => {
|
|
970
970
|
styles2 = mergeStyles({
|
|
971
|
-
...defaultStyles$
|
|
971
|
+
...defaultStyles$n
|
|
972
972
|
}, styles2);
|
|
973
973
|
let cornerSize = squareSize * 0.625;
|
|
974
974
|
let cornerMargin = squareSize < 100 ? squareSize / 6 : 10;
|
|
@@ -1006,7 +1006,7 @@ const stackedGridRotateItems0 = "_stackedGridRotateItems0_6whof_11";
|
|
|
1006
1006
|
const stackedGridRotateItems90 = "_stackedGridRotateItems90_6whof_17";
|
|
1007
1007
|
const stackedGridRotateItems180 = "_stackedGridRotateItems180_6whof_23";
|
|
1008
1008
|
const stackedGridRotateItems270 = "_stackedGridRotateItems270_6whof_29";
|
|
1009
|
-
const defaultStyles$
|
|
1009
|
+
const defaultStyles$m = {
|
|
1010
1010
|
stackedGridContainer,
|
|
1011
1011
|
stackedGridRotateItems0,
|
|
1012
1012
|
stackedGridRotateItems90,
|
|
@@ -1037,7 +1037,7 @@ const StackedGrid = ({
|
|
|
1037
1037
|
}) => {
|
|
1038
1038
|
let containerFlip = getContainerFlip(fromBottom, fromLeft);
|
|
1039
1039
|
let itemRotateClass = getItemRotate(fromBottom, fromLeft);
|
|
1040
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1040
|
+
styles2 = mergeStyles(defaultStyles$m, styles2);
|
|
1041
1041
|
return jsx("div", {
|
|
1042
1042
|
style: {
|
|
1043
1043
|
transform: containerFlip
|
|
@@ -1048,7 +1048,7 @@ const StackedGrid = ({
|
|
|
1048
1048
|
};
|
|
1049
1049
|
const svg$4 = "_svg_l2fsl_9";
|
|
1050
1050
|
const squareFill = "_squareFill_l2fsl_16";
|
|
1051
|
-
const defaultStyles$
|
|
1051
|
+
const defaultStyles$l = {
|
|
1052
1052
|
svg: svg$4,
|
|
1053
1053
|
squareFill
|
|
1054
1054
|
};
|
|
@@ -1058,7 +1058,7 @@ const SquareIcon = ({
|
|
|
1058
1058
|
styles: styles2
|
|
1059
1059
|
}) => {
|
|
1060
1060
|
styles2 = mergeStyles({
|
|
1061
|
-
...defaultStyles$
|
|
1061
|
+
...defaultStyles$l
|
|
1062
1062
|
}, styles2);
|
|
1063
1063
|
return jsx("svg", {
|
|
1064
1064
|
width: size,
|
|
@@ -1076,7 +1076,7 @@ const SquareIcon = ({
|
|
|
1076
1076
|
};
|
|
1077
1077
|
const button$6 = "_button_1kqfn_1";
|
|
1078
1078
|
const icon$2 = "_icon_1kqfn_6";
|
|
1079
|
-
const defaultStyles$
|
|
1079
|
+
const defaultStyles$k = {
|
|
1080
1080
|
button: button$6,
|
|
1081
1081
|
icon: icon$2
|
|
1082
1082
|
};
|
|
@@ -1086,7 +1086,7 @@ function ArrowButton({
|
|
|
1086
1086
|
styles: styles2,
|
|
1087
1087
|
onClick
|
|
1088
1088
|
}) {
|
|
1089
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1089
|
+
styles2 = mergeStyles(defaultStyles$k, styles2);
|
|
1090
1090
|
return jsx("button", {
|
|
1091
1091
|
className: styles2.button,
|
|
1092
1092
|
disabled: disabled2,
|
|
@@ -1112,7 +1112,7 @@ function ArrowButton({
|
|
|
1112
1112
|
}
|
|
1113
1113
|
const button$5 = "_button_s6ell_1";
|
|
1114
1114
|
const buttonInner$1 = "_buttonInner_s6ell_6";
|
|
1115
|
-
const defaultStyles$
|
|
1115
|
+
const defaultStyles$j = {
|
|
1116
1116
|
button: button$5,
|
|
1117
1117
|
buttonInner: buttonInner$1
|
|
1118
1118
|
};
|
|
@@ -1122,7 +1122,7 @@ function Button({
|
|
|
1122
1122
|
styles: styles2,
|
|
1123
1123
|
children
|
|
1124
1124
|
}) {
|
|
1125
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1125
|
+
styles2 = mergeStyles(defaultStyles$j, styles2);
|
|
1126
1126
|
return jsx("button", {
|
|
1127
1127
|
className: styles2.button,
|
|
1128
1128
|
"data-type": type,
|
|
@@ -1137,7 +1137,7 @@ const button$4 = "_button_1bibm_1";
|
|
|
1137
1137
|
const buttonBorder = "_buttonBorder_1bibm_14";
|
|
1138
1138
|
const svg$3 = "_svg_1bibm_22";
|
|
1139
1139
|
const path$3 = "_path_1bibm_29";
|
|
1140
|
-
const defaultStyles$
|
|
1140
|
+
const defaultStyles$i = {
|
|
1141
1141
|
button: button$4,
|
|
1142
1142
|
buttonBorder,
|
|
1143
1143
|
svg: svg$3,
|
|
@@ -1148,7 +1148,7 @@ function CloseButton({
|
|
|
1148
1148
|
onClick,
|
|
1149
1149
|
styles: styles2
|
|
1150
1150
|
}) {
|
|
1151
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1151
|
+
styles2 = mergeStyles(defaultStyles$i, styles2);
|
|
1152
1152
|
return jsx("button", {
|
|
1153
1153
|
className: [styles2.button, border && styles2.buttonBorder].join(" "),
|
|
1154
1154
|
onClick,
|
|
@@ -1169,7 +1169,7 @@ function CloseButton({
|
|
|
1169
1169
|
}
|
|
1170
1170
|
const container$5 = "_container_tq3ke_1";
|
|
1171
1171
|
const slot = "_slot_tq3ke_5";
|
|
1172
|
-
const defaultStyles$
|
|
1172
|
+
const defaultStyles$h = {
|
|
1173
1173
|
container: container$5,
|
|
1174
1174
|
slot
|
|
1175
1175
|
};
|
|
@@ -1180,7 +1180,7 @@ function AdSlot({
|
|
|
1180
1180
|
}) {
|
|
1181
1181
|
var _a, _b, _c;
|
|
1182
1182
|
const slotId = `dfp-ad--${name2}`;
|
|
1183
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1183
|
+
styles2 = mergeStyles(defaultStyles$h, styles2);
|
|
1184
1184
|
const mobileSizes = (_a = sizeMapping.mobile) == null ? void 0 : _a.map((size) => size.join(",")).join("|");
|
|
1185
1185
|
const tabletSizes = (_b = sizeMapping.tablet) == null ? void 0 : _b.map((size) => size.join(",")).join("|");
|
|
1186
1186
|
const desktopSizes = (_c = sizeMapping.desktop) == null ? void 0 : _c.map((size) => size.join(",")).join("|");
|
|
@@ -1338,7 +1338,7 @@ const stickyHeader = "_stickyHeader_fhbur_42";
|
|
|
1338
1338
|
const headerCellButton = "_headerCellButton_fhbur_49";
|
|
1339
1339
|
const bodyRow = "_bodyRow_fhbur_58";
|
|
1340
1340
|
const bodyCell = "_bodyCell_fhbur_62";
|
|
1341
|
-
const defaultStyles$
|
|
1341
|
+
const defaultStyles$g = {
|
|
1342
1342
|
table,
|
|
1343
1343
|
hideHeader,
|
|
1344
1344
|
hideHeaderNoBorder,
|
|
@@ -1381,7 +1381,7 @@ function Table({
|
|
|
1381
1381
|
};
|
|
1382
1382
|
});
|
|
1383
1383
|
};
|
|
1384
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1384
|
+
styles2 = mergeStyles(defaultStyles$g, styles2);
|
|
1385
1385
|
return jsxs("table", {
|
|
1386
1386
|
className: styles2.table,
|
|
1387
1387
|
cellSpacing: 0,
|
|
@@ -1458,7 +1458,7 @@ const y1Label = "_y1Label_nmjjj_29";
|
|
|
1458
1458
|
const y2Label = "_y2Label_nmjjj_33";
|
|
1459
1459
|
const axis$1 = "_axis_nmjjj_37";
|
|
1460
1460
|
const axisLabel = "_axisLabel_nmjjj_42";
|
|
1461
|
-
const defaultStyles$
|
|
1461
|
+
const defaultStyles$f = {
|
|
1462
1462
|
slopeChartContainer,
|
|
1463
1463
|
svg: svg$2,
|
|
1464
1464
|
line: line$1,
|
|
@@ -1508,7 +1508,7 @@ const SlopeChart = ({
|
|
|
1508
1508
|
return positionLabels(labels);
|
|
1509
1509
|
}, [lines, y2Label2, yScale]);
|
|
1510
1510
|
styles2 = mergeStyles({
|
|
1511
|
-
...defaultStyles$
|
|
1511
|
+
...defaultStyles$f
|
|
1512
1512
|
}, styles2);
|
|
1513
1513
|
const chart = jsx("svg", {
|
|
1514
1514
|
class: styles2.svg,
|
|
@@ -1608,7 +1608,7 @@ function pointInsideRect(point, rect) {
|
|
|
1608
1608
|
return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
|
|
1609
1609
|
}
|
|
1610
1610
|
const tooltip = "_tooltip_11t5d_1";
|
|
1611
|
-
const defaultStyles$
|
|
1611
|
+
const defaultStyles$e = {
|
|
1612
1612
|
tooltip
|
|
1613
1613
|
};
|
|
1614
1614
|
function Tooltip({
|
|
@@ -1627,7 +1627,7 @@ function Tooltip({
|
|
|
1627
1627
|
});
|
|
1628
1628
|
const [displayElement, setDisplayElement] = useState(null);
|
|
1629
1629
|
const tooltipRef = useRef();
|
|
1630
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1630
|
+
styles2 = mergeStyles(defaultStyles$e, styles2);
|
|
1631
1631
|
useEffect(() => {
|
|
1632
1632
|
setDisplayElement(document.querySelector("body"));
|
|
1633
1633
|
return () => {
|
|
@@ -1737,7 +1737,7 @@ function tooltipPositionForRect({
|
|
|
1737
1737
|
}
|
|
1738
1738
|
const text$1 = "_text_1b8t2_1";
|
|
1739
1739
|
const container$4 = "_container_1b8t2_10";
|
|
1740
|
-
const defaultStyles$
|
|
1740
|
+
const defaultStyles$d = {
|
|
1741
1741
|
text: text$1,
|
|
1742
1742
|
container: container$4
|
|
1743
1743
|
};
|
|
@@ -1748,7 +1748,7 @@ const ControlChange = ({
|
|
|
1748
1748
|
styles: styles2
|
|
1749
1749
|
}) => {
|
|
1750
1750
|
styles2 = mergeStyles({
|
|
1751
|
-
...defaultStyles$
|
|
1751
|
+
...defaultStyles$d
|
|
1752
1752
|
}, styles2);
|
|
1753
1753
|
let hasChanged = next2 !== previous2;
|
|
1754
1754
|
return jsxs("div", {
|
|
@@ -1773,7 +1773,7 @@ const ControlChange = ({
|
|
|
1773
1773
|
const wrapper = "_wrapper_8vo05_1";
|
|
1774
1774
|
const line = "_line_8vo05_5";
|
|
1775
1775
|
const halfLineText = "_halfLineText_8vo05_15";
|
|
1776
|
-
const defaultStyles$
|
|
1776
|
+
const defaultStyles$c = {
|
|
1777
1777
|
wrapper,
|
|
1778
1778
|
line,
|
|
1779
1779
|
halfLineText
|
|
@@ -1783,7 +1783,7 @@ const FirstPastThePostWaffle = ({
|
|
|
1783
1783
|
children,
|
|
1784
1784
|
lineOverHang
|
|
1785
1785
|
}) => {
|
|
1786
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1786
|
+
styles2 = mergeStyles(defaultStyles$c, styles2);
|
|
1787
1787
|
return jsxs("div", {
|
|
1788
1788
|
class: styles2.wrapper,
|
|
1789
1789
|
children: [jsx("p", {
|
|
@@ -1809,7 +1809,7 @@ const secondaryNumber = "_secondaryNumber_49z3u_69";
|
|
|
1809
1809
|
const displayRow = "_displayRow_49z3u_76";
|
|
1810
1810
|
const displayColumn = "_displayColumn_49z3u_82";
|
|
1811
1811
|
const topRow = "_topRow_49z3u_86";
|
|
1812
|
-
const defaultStyles$
|
|
1812
|
+
const defaultStyles$b = {
|
|
1813
1813
|
toplineResult,
|
|
1814
1814
|
primaryname,
|
|
1815
1815
|
secondaryname,
|
|
@@ -1837,7 +1837,7 @@ const ToplineResult = forwardRef(({
|
|
|
1837
1837
|
infoButtonRef
|
|
1838
1838
|
}, ref) => {
|
|
1839
1839
|
styles2 = mergeStyles({
|
|
1840
|
-
...defaultStyles$
|
|
1840
|
+
...defaultStyles$b
|
|
1841
1841
|
}, styles2);
|
|
1842
1842
|
const displayStyle = displayRow2 ? styles2.displayRow : styles2.displayColumn;
|
|
1843
1843
|
return jsxs("div", {
|
|
@@ -1877,12 +1877,12 @@ const ToplineResult = forwardRef(({
|
|
|
1877
1877
|
})]
|
|
1878
1878
|
});
|
|
1879
1879
|
});
|
|
1880
|
-
const borderTop = "
|
|
1881
|
-
const section = "
|
|
1882
|
-
const fullWidth = "
|
|
1883
|
-
const header = "
|
|
1884
|
-
const content = "
|
|
1885
|
-
const defaultStyles$
|
|
1880
|
+
const borderTop = "_borderTop_1xpz0_9";
|
|
1881
|
+
const section = "_section_1xpz0_39";
|
|
1882
|
+
const fullWidth = "_fullWidth_1xpz0_39";
|
|
1883
|
+
const header = "_header_1xpz0_150";
|
|
1884
|
+
const content = "_content_1xpz0_187";
|
|
1885
|
+
const defaultStyles$a = {
|
|
1886
1886
|
borderTop,
|
|
1887
1887
|
section,
|
|
1888
1888
|
fullWidth,
|
|
@@ -1894,6 +1894,7 @@ const SectionLayout = {
|
|
|
1894
1894
|
fullWidth: "fullWidth"
|
|
1895
1895
|
};
|
|
1896
1896
|
const PageSection = forwardRef(({
|
|
1897
|
+
id: id2,
|
|
1897
1898
|
children,
|
|
1898
1899
|
layout = SectionLayout.default,
|
|
1899
1900
|
styles: styles2,
|
|
@@ -1901,7 +1902,7 @@ const PageSection = forwardRef(({
|
|
|
1901
1902
|
backgroundColor = "transparent"
|
|
1902
1903
|
}, ref) => {
|
|
1903
1904
|
styles2 = mergeStyles({
|
|
1904
|
-
...defaultStyles$
|
|
1905
|
+
...defaultStyles$a
|
|
1905
1906
|
}, styles2);
|
|
1906
1907
|
const [minHeight, setMinHeight] = useState("auto");
|
|
1907
1908
|
const headerRef = useRef();
|
|
@@ -1910,13 +1911,16 @@ const PageSection = forwardRef(({
|
|
|
1910
1911
|
setMinHeight(headerElement.offsetHeight);
|
|
1911
1912
|
}, [children]);
|
|
1912
1913
|
return jsxs("section", {
|
|
1914
|
+
id: id2,
|
|
1913
1915
|
ref,
|
|
1914
|
-
className: [styles2.section, styles2[layout]
|
|
1916
|
+
className: [styles2.section, styles2[layout]].join(" "),
|
|
1915
1917
|
style: {
|
|
1916
1918
|
"--background-color": backgroundColor,
|
|
1917
1919
|
minHeight
|
|
1918
1920
|
},
|
|
1919
|
-
children: [jsx("div", {
|
|
1921
|
+
children: [borderTop2 && jsx("div", {
|
|
1922
|
+
className: styles2.borderTop
|
|
1923
|
+
}), jsx("div", {
|
|
1920
1924
|
className: [styles2.header, styles2[layout]].join(" "),
|
|
1921
1925
|
ref: headerRef,
|
|
1922
1926
|
children: children.header
|
|
@@ -1929,7 +1933,7 @@ const PageSection = forwardRef(({
|
|
|
1929
1933
|
const text = "_text_lo5h3_1";
|
|
1930
1934
|
const axis = "_axis_lo5h3_6";
|
|
1931
1935
|
const bar = "_bar_lo5h3_10";
|
|
1932
|
-
const defaultStyles$
|
|
1936
|
+
const defaultStyles$9 = {
|
|
1933
1937
|
text,
|
|
1934
1938
|
axis,
|
|
1935
1939
|
bar
|
|
@@ -1944,7 +1948,7 @@ const ColumnChart = ({
|
|
|
1944
1948
|
columnPadding,
|
|
1945
1949
|
styles: styles2
|
|
1946
1950
|
}) => {
|
|
1947
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1951
|
+
styles2 = mergeStyles(defaultStyles$9, styles2);
|
|
1948
1952
|
const yScale = scaleLinear$1([maxValue, minValue], [0, chartHeight]);
|
|
1949
1953
|
const totalColumnWidth = Number(columnWidth) + Number(columnPadding.left) + Number(columnPadding.right);
|
|
1950
1954
|
let marginBottom = minValue < 0 ? 0 : 40;
|
|
@@ -1987,7 +1991,7 @@ const subtitle = "_subtitle_hbk39_29";
|
|
|
1987
1991
|
const small = "_small_hbk39_39";
|
|
1988
1992
|
const blurb = "_blurb_hbk39_49";
|
|
1989
1993
|
const footnote = "_footnote_hbk39_57";
|
|
1990
|
-
const defaultStyles$
|
|
1994
|
+
const defaultStyles$8 = {
|
|
1991
1995
|
container: container$3,
|
|
1992
1996
|
img,
|
|
1993
1997
|
title: title$2,
|
|
@@ -2011,7 +2015,7 @@ const PartyProfile = ({
|
|
|
2011
2015
|
styles: styles2
|
|
2012
2016
|
}) => {
|
|
2013
2017
|
styles2 = mergeStyles({
|
|
2014
|
-
...defaultStyles$
|
|
2018
|
+
...defaultStyles$8
|
|
2015
2019
|
}, styles2);
|
|
2016
2020
|
return jsxs("div", {
|
|
2017
2021
|
class: styles2.container,
|
|
@@ -2036,7 +2040,7 @@ const PartyProfile = ({
|
|
|
2036
2040
|
};
|
|
2037
2041
|
const container$2 = "_container_azu4a_1";
|
|
2038
2042
|
const paragraph = "_paragraph_azu4a_12";
|
|
2039
|
-
const defaultStyles$
|
|
2043
|
+
const defaultStyles$7 = {
|
|
2040
2044
|
container: container$2,
|
|
2041
2045
|
paragraph
|
|
2042
2046
|
};
|
|
@@ -2049,7 +2053,7 @@ function ResultSummary({
|
|
|
2049
2053
|
styles: styles2
|
|
2050
2054
|
}) {
|
|
2051
2055
|
styles2 = mergeStyles({
|
|
2052
|
-
...defaultStyles$
|
|
2056
|
+
...defaultStyles$7
|
|
2053
2057
|
}, styles2);
|
|
2054
2058
|
return jsxs("div", {
|
|
2055
2059
|
class: styles2.container,
|
|
@@ -2067,7 +2071,7 @@ function ResultSummary({
|
|
|
2067
2071
|
}
|
|
2068
2072
|
const svg$1 = "_svg_1dms8_1";
|
|
2069
2073
|
const path$2 = "_path_1dms8_8";
|
|
2070
|
-
const styles$
|
|
2074
|
+
const styles$6 = {
|
|
2071
2075
|
svg: svg$1,
|
|
2072
2076
|
path: path$2
|
|
2073
2077
|
};
|
|
@@ -2075,9 +2079,9 @@ function SearchIcon() {
|
|
|
2075
2079
|
return jsx("svg", {
|
|
2076
2080
|
viewBox: "0 0 20 20",
|
|
2077
2081
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2078
|
-
className: styles$
|
|
2082
|
+
className: styles$6.svg,
|
|
2079
2083
|
children: jsx("path", {
|
|
2080
|
-
className: styles$
|
|
2084
|
+
className: styles$6.path,
|
|
2081
2085
|
"fill-rule": "evenodd",
|
|
2082
2086
|
"clip-rule": "evenodd",
|
|
2083
2087
|
d: "M7.273 0c4.022 0 7.25 3.295 7.25 7.273a7.226 7.226 0 01-7.25 7.25C3.25 14.523 0 11.295 0 7.273 0 3.295 3.25 0 7.273 0zm0 1.84A5.403 5.403 0 001.84 7.274c0 3 2.409 5.454 5.432 5.454 3 0 5.454-2.454 5.454-5.454 0-3.023-2.454-5.432-5.454-5.432zM20 18.16l-5.432-5.432h-.932l-.909.91v.931L18.16 20 20 18.159z"
|
|
@@ -2093,7 +2097,7 @@ const suggestion = "_suggestion_1kj0x_42";
|
|
|
2093
2097
|
const disabled = "_disabled_1kj0x_68";
|
|
2094
2098
|
const selected$1 = "_selected_1kj0x_73";
|
|
2095
2099
|
const highlighted = "_highlighted_1kj0x_77";
|
|
2096
|
-
const defaultStyles$
|
|
2100
|
+
const defaultStyles$6 = {
|
|
2097
2101
|
searchContainer,
|
|
2098
2102
|
input,
|
|
2099
2103
|
searchIcon,
|
|
@@ -2112,10 +2116,11 @@ function SearchInput({
|
|
|
2112
2116
|
onSubmit,
|
|
2113
2117
|
onSelect,
|
|
2114
2118
|
onClear,
|
|
2119
|
+
onFocus,
|
|
2115
2120
|
styles: styles2
|
|
2116
2121
|
}) {
|
|
2117
2122
|
var _a, _b, _c;
|
|
2118
|
-
styles2 = mergeStyles(defaultStyles$
|
|
2123
|
+
styles2 = mergeStyles(defaultStyles$6, styles2);
|
|
2119
2124
|
const inputRef = useRef(null);
|
|
2120
2125
|
const [selectedIndex, setSelectedIndex] = useState(-1);
|
|
2121
2126
|
const [suggestions2, setSuggestions] = useState();
|
|
@@ -2184,6 +2189,7 @@ function SearchInput({
|
|
|
2184
2189
|
onFocus: (e) => {
|
|
2185
2190
|
e.target.select();
|
|
2186
2191
|
setShowSuggestions(true);
|
|
2192
|
+
onFocus && onFocus(e);
|
|
2187
2193
|
},
|
|
2188
2194
|
className: styles2.input
|
|
2189
2195
|
}), jsx("div", {
|
|
@@ -2246,7 +2252,7 @@ const refreshIndicator = "_refreshIndicator_3z0ji_9";
|
|
|
2246
2252
|
const icon$1 = "_icon_3z0ji_17";
|
|
2247
2253
|
const liveText = "_liveText_3z0ji_26";
|
|
2248
2254
|
const refreshText = "_refreshText_3z0ji_27";
|
|
2249
|
-
const defaultStyles$
|
|
2255
|
+
const defaultStyles$5 = {
|
|
2250
2256
|
refreshIndicator,
|
|
2251
2257
|
icon: icon$1,
|
|
2252
2258
|
liveText,
|
|
@@ -2256,7 +2262,7 @@ function RefreshIndicator({
|
|
|
2256
2262
|
text: text2,
|
|
2257
2263
|
styles: styles2
|
|
2258
2264
|
}) {
|
|
2259
|
-
styles2 = mergeStyles(defaultStyles$
|
|
2265
|
+
styles2 = mergeStyles(defaultStyles$5, styles2);
|
|
2260
2266
|
return jsxs("div", {
|
|
2261
2267
|
className: styles2.refreshIndicator,
|
|
2262
2268
|
children: [jsx("span", {
|
|
@@ -2274,7 +2280,7 @@ function RefreshIndicator({
|
|
|
2274
2280
|
});
|
|
2275
2281
|
}
|
|
2276
2282
|
const grid = "_grid_xps7m_9";
|
|
2277
|
-
const defaultStyles$
|
|
2283
|
+
const defaultStyles$4 = {
|
|
2278
2284
|
grid
|
|
2279
2285
|
};
|
|
2280
2286
|
const GridType = {
|
|
@@ -2288,7 +2294,7 @@ function ResponsiveGrid({
|
|
|
2288
2294
|
styles: styles2
|
|
2289
2295
|
}) {
|
|
2290
2296
|
styles2 = mergeStyles({
|
|
2291
|
-
...defaultStyles$
|
|
2297
|
+
...defaultStyles$4
|
|
2292
2298
|
}, styles2);
|
|
2293
2299
|
return jsx("div", {
|
|
2294
2300
|
className: styles2.grid,
|
|
@@ -2374,7 +2380,7 @@ const enter = "_enter_48fp9_25";
|
|
|
2374
2380
|
const exitDone = "_exitDone_48fp9_26";
|
|
2375
2381
|
const enterActive = "_enterActive_48fp9_37";
|
|
2376
2382
|
const exitActive = "_exitActive_48fp9_48";
|
|
2377
|
-
const
|
|
2383
|
+
const defaultStyles$3 = {
|
|
2378
2384
|
transitionContainer,
|
|
2379
2385
|
blur,
|
|
2380
2386
|
modalBox,
|
|
@@ -2386,9 +2392,11 @@ const styles$6 = {
|
|
|
2386
2392
|
function Modal({
|
|
2387
2393
|
visible = false,
|
|
2388
2394
|
blurBackground = true,
|
|
2395
|
+
styles: styles2,
|
|
2389
2396
|
children,
|
|
2390
2397
|
onClickOutside
|
|
2391
2398
|
}) {
|
|
2399
|
+
styles2 = mergeStyles(defaultStyles$3, styles2);
|
|
2392
2400
|
const modalBoxRef = useRef();
|
|
2393
2401
|
const onClick = useCallback((event) => {
|
|
2394
2402
|
if (!modalBoxRef.current.contains(event.target)) {
|
|
@@ -2413,13 +2421,13 @@ function Modal({
|
|
|
2413
2421
|
return createPortal(jsx(d, {
|
|
2414
2422
|
in: visible,
|
|
2415
2423
|
duration: 300,
|
|
2416
|
-
classNames:
|
|
2424
|
+
classNames: styles2,
|
|
2417
2425
|
children: jsx("div", {
|
|
2418
|
-
className: [
|
|
2426
|
+
className: [styles2.transitionContainer, blurBackground && styles2.blur, visible && styles2.visible].join(" "),
|
|
2419
2427
|
onClick,
|
|
2420
2428
|
children: jsx("div", {
|
|
2421
2429
|
ref: modalBoxRef,
|
|
2422
|
-
class:
|
|
2430
|
+
class: styles2.modalBox,
|
|
2423
2431
|
children
|
|
2424
2432
|
})
|
|
2425
2433
|
})
|
|
@@ -5923,7 +5931,7 @@ let Map$2 = class Map2 {
|
|
|
5923
5931
|
if (event.type === "wheel" && !event[this._zoomBypassKey]) {
|
|
5924
5932
|
return filterEvent(true);
|
|
5925
5933
|
}
|
|
5926
|
-
if ("targetTouches" in event) {
|
|
5934
|
+
if ("targetTouches" in event && this.collaborativeGesturesEnabled) {
|
|
5927
5935
|
if (event.targetTouches.length < 2) {
|
|
5928
5936
|
return false;
|
|
5929
5937
|
}
|
|
@@ -5942,6 +5950,8 @@ let Map$2 = class Map2 {
|
|
|
5942
5950
|
this._viewport.addEventListener("touchmove", (event) => {
|
|
5943
5951
|
if (event.targetTouches.length < 2) {
|
|
5944
5952
|
this._filterEventCallback(true);
|
|
5953
|
+
} else {
|
|
5954
|
+
event.stopImmediatePropagation();
|
|
5945
5955
|
}
|
|
5946
5956
|
});
|
|
5947
5957
|
}
|
|
@@ -6275,6 +6285,7 @@ const styles$3 = {
|
|
|
6275
6285
|
const mobileHelpText = "Use two fingers to zoom";
|
|
6276
6286
|
const Map$1 = forwardRef(({
|
|
6277
6287
|
config,
|
|
6288
|
+
inModalState = false,
|
|
6278
6289
|
onLoad,
|
|
6279
6290
|
children
|
|
6280
6291
|
}, ref) => {
|
|
@@ -6290,6 +6301,7 @@ const Map$1 = forwardRef(({
|
|
|
6290
6301
|
view: new View(config.view),
|
|
6291
6302
|
target: targetRef.current
|
|
6292
6303
|
});
|
|
6304
|
+
map2.collaborativeGesturesEnabled = !inModalState;
|
|
6293
6305
|
map2.addLayers(layers);
|
|
6294
6306
|
setMap(map2);
|
|
6295
6307
|
if (ref)
|
|
@@ -6328,6 +6340,11 @@ const Map$1 = forwardRef(({
|
|
|
6328
6340
|
map.setLayers(layers);
|
|
6329
6341
|
}
|
|
6330
6342
|
}, [map, layers]);
|
|
6343
|
+
useEffect(() => {
|
|
6344
|
+
if (!map)
|
|
6345
|
+
return;
|
|
6346
|
+
map.collaborativeGesturesEnabled = !inModalState;
|
|
6347
|
+
}, [inModalState]);
|
|
6331
6348
|
return jsx("figure", {
|
|
6332
6349
|
ref: targetRef,
|
|
6333
6350
|
className: styles$3.mapContainer,
|
|
@@ -6468,11 +6485,11 @@ class FeatureRenderer {
|
|
|
6468
6485
|
} = this.style;
|
|
6469
6486
|
if (stroke) {
|
|
6470
6487
|
context.lineWidth = stroke.width * pixelRatio / transform.k;
|
|
6471
|
-
context.strokeStyle = stroke.
|
|
6488
|
+
context.strokeStyle = stroke.getRgba();
|
|
6472
6489
|
context.stroke();
|
|
6473
6490
|
}
|
|
6474
6491
|
if (fill) {
|
|
6475
|
-
context.fillStyle = fill.
|
|
6492
|
+
context.fillStyle = fill.getRgba();
|
|
6476
6493
|
context.fill();
|
|
6477
6494
|
}
|
|
6478
6495
|
}
|
|
@@ -6605,15 +6622,63 @@ class Style {
|
|
|
6605
6622
|
this.text = options == null ? void 0 : options.text;
|
|
6606
6623
|
}
|
|
6607
6624
|
}
|
|
6625
|
+
function memoise(fn) {
|
|
6626
|
+
let called = false;
|
|
6627
|
+
let lastResult;
|
|
6628
|
+
let lastArgs;
|
|
6629
|
+
let lastThis;
|
|
6630
|
+
return function() {
|
|
6631
|
+
const nextArgs = Array.prototype.slice.call(arguments);
|
|
6632
|
+
if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {
|
|
6633
|
+
called = true;
|
|
6634
|
+
lastThis = this;
|
|
6635
|
+
lastArgs = nextArgs;
|
|
6636
|
+
lastResult = fn.apply(this, arguments);
|
|
6637
|
+
}
|
|
6638
|
+
return lastResult;
|
|
6639
|
+
};
|
|
6640
|
+
}
|
|
6641
|
+
function toRgba(color2, opacity = 1) {
|
|
6642
|
+
color2 = color2.replace(/\s+/g, "").toLowerCase();
|
|
6643
|
+
if (color2.startsWith("#")) {
|
|
6644
|
+
color2 = color2.replace(/^#/, "");
|
|
6645
|
+
if (color2.length === 3) {
|
|
6646
|
+
color2 = color2.split("").map((char) => char + char).join("");
|
|
6647
|
+
}
|
|
6648
|
+
let r = parseInt(color2.substring(0, 2), 16);
|
|
6649
|
+
let g = parseInt(color2.substring(2, 4), 16);
|
|
6650
|
+
let b = parseInt(color2.substring(4, 6), 16);
|
|
6651
|
+
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
6652
|
+
}
|
|
6653
|
+
let rgbaMatch = color2.match(/^rgba?\((\d+),(\d+),(\d+)(?:,(\d+(\.\d+)?))?\)$/);
|
|
6654
|
+
if (rgbaMatch) {
|
|
6655
|
+
let r = parseInt(rgbaMatch[1], 10);
|
|
6656
|
+
let g = parseInt(rgbaMatch[2], 10);
|
|
6657
|
+
let b = parseInt(rgbaMatch[3], 10);
|
|
6658
|
+
let a = rgbaMatch[4] !== void 0 ? parseFloat(rgbaMatch[4]) : opacity;
|
|
6659
|
+
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
|
6660
|
+
}
|
|
6661
|
+
throw new Error("Unsupported color format");
|
|
6662
|
+
}
|
|
6608
6663
|
class Stroke {
|
|
6609
6664
|
constructor(options) {
|
|
6610
6665
|
this.color = (options == null ? void 0 : options.color) || "#121212";
|
|
6611
6666
|
this.width = (options == null ? void 0 : options.width) || 0.5;
|
|
6667
|
+
this.opacity = (options == null ? void 0 : options.opacity) || 1;
|
|
6668
|
+
this._getRgba = memoise(toRgba);
|
|
6669
|
+
}
|
|
6670
|
+
getRgba() {
|
|
6671
|
+
return this._getRgba(this.color, this.opacity);
|
|
6612
6672
|
}
|
|
6613
6673
|
}
|
|
6614
6674
|
class Fill {
|
|
6615
6675
|
constructor(options) {
|
|
6616
6676
|
this.color = (options == null ? void 0 : options.color) || "#CCC";
|
|
6677
|
+
this.opacity = (options == null ? void 0 : options.opacity) || 1;
|
|
6678
|
+
this._getRgba = memoise(toRgba);
|
|
6679
|
+
}
|
|
6680
|
+
getRgba() {
|
|
6681
|
+
return this._getRgba(this.color, this.opacity);
|
|
6617
6682
|
}
|
|
6618
6683
|
}
|
|
6619
6684
|
class Text {
|
|
@@ -7106,9 +7171,9 @@ function interpolateFeatures(currentFeatures, newFeatures, {
|
|
|
7106
7171
|
return features;
|
|
7107
7172
|
};
|
|
7108
7173
|
}
|
|
7109
|
-
function interpolateStyles(firstStyle, secondStyle, interpolateColors) {
|
|
7110
|
-
const fillInterpolator = interpolateFill(firstStyle.fill, secondStyle.fill, interpolateColors);
|
|
7111
|
-
const strokeInterpolator = interpolateStroke(firstStyle.stroke, secondStyle.stroke, interpolateColors);
|
|
7174
|
+
function interpolateStyles(firstStyle, secondStyle, interpolateColors, interpolateNumbers) {
|
|
7175
|
+
const fillInterpolator = interpolateFill(firstStyle.fill, secondStyle.fill, interpolateColors, interpolateNumbers);
|
|
7176
|
+
const strokeInterpolator = interpolateStroke(firstStyle.stroke, secondStyle.stroke, interpolateColors, interpolateNumbers);
|
|
7112
7177
|
return (t) => {
|
|
7113
7178
|
return new Style({
|
|
7114
7179
|
fill: fillInterpolator(t),
|
|
@@ -7116,25 +7181,24 @@ function interpolateStyles(firstStyle, secondStyle, interpolateColors) {
|
|
|
7116
7181
|
});
|
|
7117
7182
|
};
|
|
7118
7183
|
}
|
|
7119
|
-
function interpolateFill(fillA, fillB, interpolateColors) {
|
|
7120
|
-
const colorInterpolator = interpolateColors((fillA == null ? void 0 : fillA.color)
|
|
7184
|
+
function interpolateFill(fillA, fillB, interpolateColors, interpolateNumbers) {
|
|
7185
|
+
const colorInterpolator = interpolateColors((fillA == null ? void 0 : fillA.color) ?? "transparent", (fillB == null ? void 0 : fillB.color) ?? "transparent");
|
|
7186
|
+
const opacityInterpolator = interpolateNumbers((fillA == null ? void 0 : fillA.opacity) ?? 1, (fillB == null ? void 0 : fillB.opacity) ?? 1);
|
|
7121
7187
|
return (t) => {
|
|
7122
7188
|
return new Fill({
|
|
7123
|
-
color: colorInterpolator(t)
|
|
7189
|
+
color: colorInterpolator(t),
|
|
7190
|
+
opacity: opacityInterpolator(t)
|
|
7124
7191
|
});
|
|
7125
7192
|
};
|
|
7126
7193
|
}
|
|
7127
|
-
function interpolateStroke(strokeA, strokeB, interpolateColors) {
|
|
7128
|
-
const colorInterpolator = interpolateColors((strokeA == null ? void 0 : strokeA.color)
|
|
7129
|
-
const
|
|
7130
|
-
|
|
7131
|
-
const widthB = (strokeB == null ? void 0 : strokeB.width) || 0;
|
|
7132
|
-
const diff = widthB - widthA;
|
|
7133
|
-
return widthA + diff * t;
|
|
7134
|
-
};
|
|
7194
|
+
function interpolateStroke(strokeA, strokeB, interpolateColors, interpolateNumbers) {
|
|
7195
|
+
const colorInterpolator = interpolateColors((strokeA == null ? void 0 : strokeA.color) ?? "transparent", (strokeB == null ? void 0 : strokeB.color) ?? "transparent");
|
|
7196
|
+
const opacityInterpolator = interpolateNumbers((strokeA == null ? void 0 : strokeA.opacity) ?? 1, (strokeB == null ? void 0 : strokeB.opacity) ?? 1);
|
|
7197
|
+
const widthInterpolator = interpolateNumbers((strokeA == null ? void 0 : strokeA.width) ?? 1, (strokeB == null ? void 0 : strokeB.width) ?? 1);
|
|
7135
7198
|
return (t) => {
|
|
7136
7199
|
return new Stroke({
|
|
7137
7200
|
color: colorInterpolator(t),
|
|
7201
|
+
opacity: opacityInterpolator(t),
|
|
7138
7202
|
width: widthInterpolator(t)
|
|
7139
7203
|
});
|
|
7140
7204
|
};
|
|
@@ -7200,22 +7264,6 @@ class Feature {
|
|
|
7200
7264
|
});
|
|
7201
7265
|
}
|
|
7202
7266
|
}
|
|
7203
|
-
function memoise(fn) {
|
|
7204
|
-
let called = false;
|
|
7205
|
-
let lastResult;
|
|
7206
|
-
let lastArgs;
|
|
7207
|
-
let lastThis;
|
|
7208
|
-
return function() {
|
|
7209
|
-
const nextArgs = Array.prototype.slice.call(arguments);
|
|
7210
|
-
if (!called || this !== lastThis || !arrayEquals(nextArgs, lastArgs)) {
|
|
7211
|
-
called = true;
|
|
7212
|
-
lastThis = this;
|
|
7213
|
-
lastArgs = nextArgs;
|
|
7214
|
-
lastResult = fn.apply(this, arguments);
|
|
7215
|
-
}
|
|
7216
|
-
return lastResult;
|
|
7217
|
-
};
|
|
7218
|
-
}
|
|
7219
7267
|
class LineString {
|
|
7220
7268
|
constructor({
|
|
7221
7269
|
type = "LineString",
|