@guardian/interactive-component-library 0.1.0-alpha.21 → 0.1.0-alpha.23
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.
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
const rotated = "_rotated_b5io0_10";
|
|
9
9
|
const path$4 = "_path_b5io0_14";
|
|
10
10
|
const active = "_active_b5io0_18";
|
|
11
|
-
const defaultStyles$
|
|
11
|
+
const defaultStyles$v = {
|
|
12
12
|
svg: svg$9,
|
|
13
13
|
group,
|
|
14
14
|
rotated,
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
styles: styles2
|
|
49
49
|
}) {
|
|
50
50
|
const defaultStylesCopy = {
|
|
51
|
-
...defaultStyles$
|
|
51
|
+
...defaultStyles$v
|
|
52
52
|
};
|
|
53
53
|
if (active2) {
|
|
54
|
-
defaultStylesCopy.path = mergeStyles(defaultStyles$
|
|
54
|
+
defaultStylesCopy.path = mergeStyles(defaultStyles$v.path, defaultStyles$v.active);
|
|
55
55
|
}
|
|
56
56
|
if (direction === DIRECTION.up) {
|
|
57
|
-
defaultStylesCopy.group = mergeStyles(defaultStyles$
|
|
57
|
+
defaultStylesCopy.group = mergeStyles(defaultStyles$v.group, defaultStyles$v.rotated);
|
|
58
58
|
}
|
|
59
59
|
styles2 = mergeStyles(defaultStylesCopy, styles2);
|
|
60
60
|
return size === SIZE.small ? jsxRuntime.jsx(SmallChevron, {
|
|
@@ -104,12 +104,12 @@
|
|
|
104
104
|
})
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
const container$
|
|
107
|
+
const container$7 = "_container_jzalm_1";
|
|
108
108
|
const dot = "_dot_jzalm_6";
|
|
109
109
|
const circle$2 = "_circle_jzalm_13";
|
|
110
110
|
const text$3 = "_text_jzalm_17";
|
|
111
|
-
const defaultStyles$
|
|
112
|
-
container: container$
|
|
111
|
+
const defaultStyles$u = {
|
|
112
|
+
container: container$7,
|
|
113
113
|
dot,
|
|
114
114
|
circle: circle$2,
|
|
115
115
|
text: text$3
|
|
@@ -125,10 +125,10 @@
|
|
|
125
125
|
abbreviation
|
|
126
126
|
}) => {
|
|
127
127
|
const defaultStylesCopy = {
|
|
128
|
-
...defaultStyles$
|
|
128
|
+
...defaultStyles$u
|
|
129
129
|
};
|
|
130
130
|
if (dotType === DOT_TYPE.round) {
|
|
131
|
-
defaultStylesCopy.dot = mergeStyles(defaultStyles$
|
|
131
|
+
defaultStylesCopy.dot = mergeStyles(defaultStyles$u.dot, defaultStyles$u.circle);
|
|
132
132
|
}
|
|
133
133
|
styles2 = mergeStyles(defaultStylesCopy, styles2);
|
|
134
134
|
return jsxRuntime.jsxs("div", {
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
const bar$2 = "_bar_bf839_1";
|
|
145
145
|
const label$1 = "_label_bf839_5";
|
|
146
146
|
const backgroundRect = "_backgroundRect_bf839_11";
|
|
147
|
-
const defaultStyles$
|
|
147
|
+
const defaultStyles$t = {
|
|
148
148
|
bar: bar$2,
|
|
149
149
|
label: label$1,
|
|
150
150
|
backgroundRect
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
const rectElements = hooks.useRef([]);
|
|
201
201
|
const textElements = hooks.useRef([]);
|
|
202
202
|
styles2 = mergeStyles({
|
|
203
|
-
...defaultStyles$
|
|
203
|
+
...defaultStyles$t
|
|
204
204
|
}, styles2);
|
|
205
205
|
const svgHeight = labelType === LabelType.hanging && !hideLabels ? height + 20 : height;
|
|
206
206
|
const renderLabel = (config, i) => jsxRuntime.jsx("text", {
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
const svg$8 = "_svg_1cajk_6";
|
|
341
341
|
const previous = "_previous_1cajk_12";
|
|
342
342
|
const next = "_next_1cajk_16";
|
|
343
|
-
const defaultStyles$
|
|
343
|
+
const defaultStyles$s = {
|
|
344
344
|
svg: svg$8,
|
|
345
345
|
previous,
|
|
346
346
|
next
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
next: next2,
|
|
352
352
|
styles: styles2
|
|
353
353
|
} = props;
|
|
354
|
-
styles2 = mergeStyles(defaultStyles$
|
|
354
|
+
styles2 = mergeStyles(defaultStyles$s, styles2);
|
|
355
355
|
const gradientId = `gv-gradient-def-${previous2}-${next2}`;
|
|
356
356
|
const gradients = useGradients();
|
|
357
357
|
hooks.useEffect(() => {
|
|
@@ -418,20 +418,135 @@
|
|
|
418
418
|
})
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
|
+
const unit = "_unit_mo5d9_1";
|
|
422
|
+
const container$6 = "_container_mo5d9_6";
|
|
423
|
+
const defaultStyles$r = {
|
|
424
|
+
unit,
|
|
425
|
+
container: container$6
|
|
426
|
+
};
|
|
427
|
+
function useWindowSize() {
|
|
428
|
+
const [windowSize, setWindowSize] = hooks.useState(() => {
|
|
429
|
+
if (typeof window === "undefined")
|
|
430
|
+
return {
|
|
431
|
+
width: 0,
|
|
432
|
+
height: 0
|
|
433
|
+
};
|
|
434
|
+
return {
|
|
435
|
+
width: window.innerWidth,
|
|
436
|
+
height: window.innerHeight
|
|
437
|
+
};
|
|
438
|
+
});
|
|
439
|
+
hooks.useEffect(() => {
|
|
440
|
+
if (typeof window === "undefined")
|
|
441
|
+
return;
|
|
442
|
+
function handleResize() {
|
|
443
|
+
setWindowSize({
|
|
444
|
+
width: window.innerWidth,
|
|
445
|
+
height: window.innerHeight
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
window.addEventListener("resize", handleResize);
|
|
449
|
+
return () => {
|
|
450
|
+
window.removeEventListener("resize", handleResize);
|
|
451
|
+
};
|
|
452
|
+
}, []);
|
|
453
|
+
return windowSize;
|
|
454
|
+
}
|
|
455
|
+
function useContainerSize(containerRef) {
|
|
456
|
+
const windowSize = useWindowSize();
|
|
457
|
+
const [containerSize, setContainerSize] = hooks.useState();
|
|
458
|
+
hooks.useLayoutEffect(() => {
|
|
459
|
+
const container2 = containerRef.current;
|
|
460
|
+
if (!container2)
|
|
461
|
+
return;
|
|
462
|
+
setContainerSize({
|
|
463
|
+
width: container2.clientWidth,
|
|
464
|
+
height: container2.clientHeight
|
|
465
|
+
});
|
|
466
|
+
}, [containerRef, windowSize]);
|
|
467
|
+
return containerSize;
|
|
468
|
+
}
|
|
469
|
+
const WaffleType = {
|
|
470
|
+
circle: "circle",
|
|
471
|
+
square: "square"
|
|
472
|
+
};
|
|
473
|
+
const WaffleUnit = ({
|
|
474
|
+
type,
|
|
475
|
+
attributes
|
|
476
|
+
}) => type === WaffleType.square ? jsxRuntime.jsx("rect", {
|
|
477
|
+
...attributes
|
|
478
|
+
}) : jsxRuntime.jsx("circle", {
|
|
479
|
+
...attributes
|
|
480
|
+
});
|
|
481
|
+
const Waffle = ({
|
|
482
|
+
units,
|
|
483
|
+
numberOfRows,
|
|
484
|
+
type = WaffleType.circle,
|
|
485
|
+
idAccessor,
|
|
486
|
+
onMouseOver,
|
|
487
|
+
styles: styles2
|
|
488
|
+
}) => {
|
|
489
|
+
const containerRef = hooks.useRef();
|
|
490
|
+
const containerSize = useContainerSize(containerRef);
|
|
491
|
+
const width = containerSize ? containerSize.width : 0;
|
|
492
|
+
const total = units.length;
|
|
493
|
+
const columns = Math.ceil(total / numberOfRows);
|
|
494
|
+
const unitWidth = width / columns;
|
|
495
|
+
const unitHeight = unitWidth;
|
|
496
|
+
const height = numberOfRows * unitHeight;
|
|
497
|
+
styles2 = mergeStyles(defaultStyles$r, styles2);
|
|
498
|
+
return jsxRuntime.jsx("div", {
|
|
499
|
+
ref: containerRef,
|
|
500
|
+
className: styles2.container,
|
|
501
|
+
children: containerSize && jsxRuntime.jsx("svg", {
|
|
502
|
+
viewBox: `0 0 ${width} ${height}`,
|
|
503
|
+
class: styles2.svg,
|
|
504
|
+
children: jsxRuntime.jsx("g", {
|
|
505
|
+
children: units.map((unit2, j) => {
|
|
506
|
+
let attributes;
|
|
507
|
+
if (type === WaffleType.square) {
|
|
508
|
+
attributes = {
|
|
509
|
+
id: unit2[idAccessor] || `w-${j}`,
|
|
510
|
+
onMouseOver: (e) => onMouseOver(unit2, e),
|
|
511
|
+
class: `${styles2.unit} ${unit2.class}`,
|
|
512
|
+
height: unitHeight,
|
|
513
|
+
width: unitWidth,
|
|
514
|
+
x: unitWidth * Math.floor(j / numberOfRows),
|
|
515
|
+
y: unitHeight * (j % numberOfRows)
|
|
516
|
+
};
|
|
517
|
+
} else {
|
|
518
|
+
attributes = {
|
|
519
|
+
id: unit2[idAccessor] || `w-${j}`,
|
|
520
|
+
onMouseOver: (e) => onMouseOver(unit2, e),
|
|
521
|
+
class: `${styles2.unit} ${unit2.class}`,
|
|
522
|
+
r: unitWidth / 2,
|
|
523
|
+
transform: `translate(${unitWidth * Math.floor(j / numberOfRows) + unitWidth / 2}, ${unitHeight * (j % numberOfRows) + unitHeight / 2})`
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
return jsxRuntime.jsx(WaffleUnit, {
|
|
527
|
+
type,
|
|
528
|
+
attributes
|
|
529
|
+
}, `wu-${j}`);
|
|
530
|
+
})
|
|
531
|
+
})
|
|
532
|
+
})
|
|
533
|
+
});
|
|
534
|
+
};
|
|
421
535
|
const button$5 = "_button_oqopj_1";
|
|
422
536
|
const svg$7 = "_svg_oqopj_15";
|
|
423
|
-
const defaultStyles$
|
|
537
|
+
const defaultStyles$q = {
|
|
424
538
|
button: button$5,
|
|
425
539
|
svg: svg$7
|
|
426
540
|
};
|
|
427
|
-
const InfoButton = ({
|
|
541
|
+
const InfoButton = compat.forwardRef(({
|
|
428
542
|
onClick,
|
|
429
543
|
styles: styles2
|
|
430
|
-
}) => {
|
|
544
|
+
}, ref) => {
|
|
431
545
|
styles2 = mergeStyles({
|
|
432
|
-
...defaultStyles$
|
|
546
|
+
...defaultStyles$q
|
|
433
547
|
}, styles2);
|
|
434
548
|
return jsxRuntime.jsx("button", {
|
|
549
|
+
ref,
|
|
435
550
|
class: styles2.button,
|
|
436
551
|
onClick,
|
|
437
552
|
children: jsxRuntime.jsx("svg", {
|
|
@@ -443,11 +558,11 @@
|
|
|
443
558
|
})
|
|
444
559
|
})
|
|
445
560
|
});
|
|
446
|
-
};
|
|
561
|
+
});
|
|
447
562
|
const svg$6 = "_svg_1v49v_1";
|
|
448
563
|
const circle$1 = "_circle_1v49v_5";
|
|
449
564
|
const pulse = "_pulse_1v49v_9";
|
|
450
|
-
const defaultStyles$
|
|
565
|
+
const defaultStyles$p = {
|
|
451
566
|
svg: svg$6,
|
|
452
567
|
circle: circle$1,
|
|
453
568
|
pulse
|
|
@@ -457,7 +572,7 @@
|
|
|
457
572
|
pulse: pulse2 = false,
|
|
458
573
|
styles: styles2
|
|
459
574
|
}) => {
|
|
460
|
-
styles2 = mergeStyles(defaultStyles$
|
|
575
|
+
styles2 = mergeStyles(defaultStyles$p, styles2);
|
|
461
576
|
return jsxRuntime.jsx("svg", {
|
|
462
577
|
style: styles2.svg,
|
|
463
578
|
fill: "none",
|
|
@@ -477,7 +592,7 @@
|
|
|
477
592
|
});
|
|
478
593
|
};
|
|
479
594
|
const text$2 = "_text_1okyv_1";
|
|
480
|
-
const defaultStyles$
|
|
595
|
+
const defaultStyles$o = {
|
|
481
596
|
text: text$2
|
|
482
597
|
};
|
|
483
598
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
@@ -827,7 +942,7 @@
|
|
|
827
942
|
styles: styles2
|
|
828
943
|
}) => {
|
|
829
944
|
styles2 = mergeStyles({
|
|
830
|
-
...defaultStyles$
|
|
945
|
+
...defaultStyles$o
|
|
831
946
|
}, styles2);
|
|
832
947
|
let timeSince = dayjs(timeStamp).fromNow();
|
|
833
948
|
return jsxRuntime.jsx("span", {
|
|
@@ -837,7 +952,7 @@
|
|
|
837
952
|
};
|
|
838
953
|
const pageContainer = "_pageContainer_1s0yq_9";
|
|
839
954
|
const sideBorders = "_sideBorders_1s0yq_42";
|
|
840
|
-
const defaultStyles$
|
|
955
|
+
const defaultStyles$n = {
|
|
841
956
|
pageContainer,
|
|
842
957
|
sideBorders
|
|
843
958
|
};
|
|
@@ -849,17 +964,17 @@
|
|
|
849
964
|
const {
|
|
850
965
|
pageContainer: pageContainer2,
|
|
851
966
|
sideBorders: sideBordersStyle
|
|
852
|
-
} = mergeStyles(defaultStyles$
|
|
967
|
+
} = mergeStyles(defaultStyles$n, styles2);
|
|
853
968
|
return jsxRuntime.jsx("div", {
|
|
854
969
|
className: [pageContainer2, sideBorders2 && sideBordersStyle].join(" "),
|
|
855
970
|
children
|
|
856
971
|
});
|
|
857
972
|
}
|
|
858
|
-
const wrapper = "_wrapper_5oj1x_9";
|
|
973
|
+
const wrapper$1 = "_wrapper_5oj1x_9";
|
|
859
974
|
const bar$1 = "_bar_5oj1x_14";
|
|
860
975
|
const zero = "_zero_5oj1x_19";
|
|
861
|
-
const defaultStyles$
|
|
862
|
-
wrapper,
|
|
976
|
+
const defaultStyles$m = {
|
|
977
|
+
wrapper: wrapper$1,
|
|
863
978
|
bar: bar$1,
|
|
864
979
|
zero
|
|
865
980
|
};
|
|
@@ -879,7 +994,7 @@
|
|
|
879
994
|
let thisColor = ` bg-color--${party}`;
|
|
880
995
|
let zeroStyles = ` height: ${height};`;
|
|
881
996
|
styles2 = mergeStyles({
|
|
882
|
-
...defaultStyles$
|
|
997
|
+
...defaultStyles$m
|
|
883
998
|
}, styles2);
|
|
884
999
|
return jsxRuntime.jsxs("div", {
|
|
885
1000
|
className: styles2.wrapper,
|
|
@@ -897,7 +1012,7 @@
|
|
|
897
1012
|
const dividingLineColor = "_dividingLineColor_886i1_16";
|
|
898
1013
|
const square = "_square_886i1_20";
|
|
899
1014
|
const corner = "_corner_886i1_24";
|
|
900
|
-
const defaultStyles$
|
|
1015
|
+
const defaultStyles$l = {
|
|
901
1016
|
svg: svg$5,
|
|
902
1017
|
dividingLineColor,
|
|
903
1018
|
square,
|
|
@@ -910,7 +1025,7 @@
|
|
|
910
1025
|
styles: styles2
|
|
911
1026
|
}) => {
|
|
912
1027
|
styles2 = mergeStyles({
|
|
913
|
-
...defaultStyles$
|
|
1028
|
+
...defaultStyles$l
|
|
914
1029
|
}, styles2);
|
|
915
1030
|
let cornerSize = squareSize * 0.625;
|
|
916
1031
|
let cornerMargin = squareSize < 100 ? squareSize / 6 : 10;
|
|
@@ -948,7 +1063,7 @@
|
|
|
948
1063
|
const stackedGridRotateItems90 = "_stackedGridRotateItems90_6whof_17";
|
|
949
1064
|
const stackedGridRotateItems180 = "_stackedGridRotateItems180_6whof_23";
|
|
950
1065
|
const stackedGridRotateItems270 = "_stackedGridRotateItems270_6whof_29";
|
|
951
|
-
const defaultStyles$
|
|
1066
|
+
const defaultStyles$k = {
|
|
952
1067
|
stackedGridContainer,
|
|
953
1068
|
stackedGridRotateItems0,
|
|
954
1069
|
stackedGridRotateItems90,
|
|
@@ -979,7 +1094,7 @@
|
|
|
979
1094
|
}) => {
|
|
980
1095
|
let containerFlip = getContainerFlip(fromBottom, fromLeft);
|
|
981
1096
|
let itemRotateClass = getItemRotate(fromBottom, fromLeft);
|
|
982
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1097
|
+
styles2 = mergeStyles(defaultStyles$k, styles2);
|
|
983
1098
|
return jsxRuntime.jsx("div", {
|
|
984
1099
|
style: {
|
|
985
1100
|
transform: containerFlip
|
|
@@ -990,7 +1105,7 @@
|
|
|
990
1105
|
};
|
|
991
1106
|
const svg$4 = "_svg_l2fsl_9";
|
|
992
1107
|
const squareFill = "_squareFill_l2fsl_16";
|
|
993
|
-
const defaultStyles$
|
|
1108
|
+
const defaultStyles$j = {
|
|
994
1109
|
svg: svg$4,
|
|
995
1110
|
squareFill
|
|
996
1111
|
};
|
|
@@ -1000,7 +1115,7 @@
|
|
|
1000
1115
|
styles: styles2
|
|
1001
1116
|
}) => {
|
|
1002
1117
|
styles2 = mergeStyles({
|
|
1003
|
-
...defaultStyles$
|
|
1118
|
+
...defaultStyles$j
|
|
1004
1119
|
}, styles2);
|
|
1005
1120
|
return jsxRuntime.jsx("svg", {
|
|
1006
1121
|
width: size,
|
|
@@ -1018,7 +1133,7 @@
|
|
|
1018
1133
|
};
|
|
1019
1134
|
const button$4 = "_button_1fees_1";
|
|
1020
1135
|
const icon$2 = "_icon_1fees_6";
|
|
1021
|
-
const defaultStyles$
|
|
1136
|
+
const defaultStyles$i = {
|
|
1022
1137
|
button: button$4,
|
|
1023
1138
|
icon: icon$2
|
|
1024
1139
|
};
|
|
@@ -1028,7 +1143,7 @@
|
|
|
1028
1143
|
styles: styles2,
|
|
1029
1144
|
onClick
|
|
1030
1145
|
}) {
|
|
1031
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1146
|
+
styles2 = mergeStyles(defaultStyles$i, styles2);
|
|
1032
1147
|
return jsxRuntime.jsx("button", {
|
|
1033
1148
|
className: styles2.button,
|
|
1034
1149
|
disabled,
|
|
@@ -1054,7 +1169,7 @@
|
|
|
1054
1169
|
}
|
|
1055
1170
|
const button$3 = "_button_3521c_1";
|
|
1056
1171
|
const buttonInner$1 = "_buttonInner_3521c_6";
|
|
1057
|
-
const defaultStyles$
|
|
1172
|
+
const defaultStyles$h = {
|
|
1058
1173
|
button: button$3,
|
|
1059
1174
|
buttonInner: buttonInner$1
|
|
1060
1175
|
};
|
|
@@ -1064,7 +1179,7 @@
|
|
|
1064
1179
|
styles: styles2,
|
|
1065
1180
|
children
|
|
1066
1181
|
}) {
|
|
1067
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1182
|
+
styles2 = mergeStyles(defaultStyles$h, styles2);
|
|
1068
1183
|
return jsxRuntime.jsx("button", {
|
|
1069
1184
|
className: styles2.button,
|
|
1070
1185
|
"data-type": type,
|
|
@@ -1079,7 +1194,7 @@
|
|
|
1079
1194
|
const buttonBorder = "_buttonBorder_125im_11";
|
|
1080
1195
|
const svg$3 = "_svg_125im_19";
|
|
1081
1196
|
const path$3 = "_path_125im_25";
|
|
1082
|
-
const defaultStyles$
|
|
1197
|
+
const defaultStyles$g = {
|
|
1083
1198
|
button: button$2,
|
|
1084
1199
|
buttonBorder,
|
|
1085
1200
|
svg: svg$3,
|
|
@@ -1090,7 +1205,7 @@
|
|
|
1090
1205
|
onClick,
|
|
1091
1206
|
styles: styles2
|
|
1092
1207
|
}) {
|
|
1093
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1208
|
+
styles2 = mergeStyles(defaultStyles$g, styles2);
|
|
1094
1209
|
return jsxRuntime.jsx("button", {
|
|
1095
1210
|
className: [styles2.button, border && styles2.buttonBorder].join(" "),
|
|
1096
1211
|
onClick,
|
|
@@ -1108,10 +1223,10 @@
|
|
|
1108
1223
|
})
|
|
1109
1224
|
});
|
|
1110
1225
|
}
|
|
1111
|
-
const container$
|
|
1226
|
+
const container$5 = "_container_tq3ke_1";
|
|
1112
1227
|
const slot = "_slot_tq3ke_5";
|
|
1113
|
-
const defaultStyles$
|
|
1114
|
-
container: container$
|
|
1228
|
+
const defaultStyles$f = {
|
|
1229
|
+
container: container$5,
|
|
1115
1230
|
slot
|
|
1116
1231
|
};
|
|
1117
1232
|
function AdSlot({
|
|
@@ -1121,7 +1236,7 @@
|
|
|
1121
1236
|
}) {
|
|
1122
1237
|
var _a, _b, _c;
|
|
1123
1238
|
const slotId = `dfp-ad--${name2}`;
|
|
1124
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1239
|
+
styles2 = mergeStyles(defaultStyles$f, styles2);
|
|
1125
1240
|
const mobileSizes = (_a = sizeMapping.mobile) == null ? void 0 : _a.map((size) => size.join(",")).join("|");
|
|
1126
1241
|
const tabletSizes = (_b = sizeMapping.tablet) == null ? void 0 : _b.map((size) => size.join(",")).join("|");
|
|
1127
1242
|
const desktopSizes = (_c = sizeMapping.desktop) == null ? void 0 : _c.map((size) => size.join(",")).join("|");
|
|
@@ -1266,7 +1381,7 @@
|
|
|
1266
1381
|
const headerCellButton = "_headerCellButton_1dg64_40";
|
|
1267
1382
|
const bodyRow = "_bodyRow_1dg64_49";
|
|
1268
1383
|
const bodyCell = "_bodyCell_1dg64_54";
|
|
1269
|
-
const defaultStyles$
|
|
1384
|
+
const defaultStyles$e = {
|
|
1270
1385
|
table,
|
|
1271
1386
|
hideHeader,
|
|
1272
1387
|
hideHeaderNoBorder,
|
|
@@ -1307,7 +1422,7 @@
|
|
|
1307
1422
|
};
|
|
1308
1423
|
});
|
|
1309
1424
|
};
|
|
1310
|
-
styles2 = mergeStyles(defaultStyles$
|
|
1425
|
+
styles2 = mergeStyles(defaultStyles$e, styles2);
|
|
1311
1426
|
return jsxRuntime.jsxs("table", {
|
|
1312
1427
|
className: styles2.table,
|
|
1313
1428
|
cellSpacing: 0,
|
|
@@ -1369,47 +1484,19 @@
|
|
|
1369
1484
|
})]
|
|
1370
1485
|
});
|
|
1371
1486
|
}
|
|
1372
|
-
function useWindowSize() {
|
|
1373
|
-
const [windowSize, setWindowSize] = hooks.useState(() => {
|
|
1374
|
-
if (typeof window === "undefined")
|
|
1375
|
-
return {
|
|
1376
|
-
width: 0,
|
|
1377
|
-
height: 0
|
|
1378
|
-
};
|
|
1379
|
-
return {
|
|
1380
|
-
width: window.innerWidth,
|
|
1381
|
-
height: window.innerHeight
|
|
1382
|
-
};
|
|
1383
|
-
});
|
|
1384
|
-
hooks.useEffect(() => {
|
|
1385
|
-
if (typeof window === "undefined")
|
|
1386
|
-
return;
|
|
1387
|
-
function handleResize() {
|
|
1388
|
-
setWindowSize({
|
|
1389
|
-
width: window.innerWidth,
|
|
1390
|
-
height: window.innerHeight
|
|
1391
|
-
});
|
|
1392
|
-
}
|
|
1393
|
-
window.addEventListener("resize", handleResize);
|
|
1394
|
-
return () => {
|
|
1395
|
-
window.removeEventListener("resize", handleResize);
|
|
1396
|
-
};
|
|
1397
|
-
}, []);
|
|
1398
|
-
return windowSize;
|
|
1399
|
-
}
|
|
1400
1487
|
const slopeChartContainer = "_slopeChartContainer_gj7pr_1";
|
|
1401
1488
|
const svg$2 = "_svg_gj7pr_5";
|
|
1402
|
-
const line = "_line_gj7pr_9";
|
|
1489
|
+
const line$1 = "_line_gj7pr_9";
|
|
1403
1490
|
const circle = "_circle_gj7pr_14";
|
|
1404
1491
|
const label = "_label_gj7pr_18";
|
|
1405
1492
|
const y1Label = "_y1Label_gj7pr_24";
|
|
1406
1493
|
const y2Label = "_y2Label_gj7pr_28";
|
|
1407
1494
|
const axis$1 = "_axis_gj7pr_32";
|
|
1408
1495
|
const axisLabel = "_axisLabel_gj7pr_37";
|
|
1409
|
-
const defaultStyles$
|
|
1496
|
+
const defaultStyles$d = {
|
|
1410
1497
|
slopeChartContainer,
|
|
1411
1498
|
svg: svg$2,
|
|
1412
|
-
line,
|
|
1499
|
+
line: line$1,
|
|
1413
1500
|
circle,
|
|
1414
1501
|
label,
|
|
1415
1502
|
y1Label,
|
|
@@ -1458,7 +1545,7 @@
|
|
|
1458
1545
|
return positionLabels(labels);
|
|
1459
1546
|
}, [lines, y2Label2, yScale]);
|
|
1460
1547
|
styles2 = mergeStyles({
|
|
1461
|
-
...defaultStyles$
|
|
1548
|
+
...defaultStyles$d
|
|
1462
1549
|
}, styles2);
|
|
1463
1550
|
const chart = jsxRuntime.jsx("svg", {
|
|
1464
1551
|
class: styles2.svg,
|
|
@@ -1538,161 +1625,27 @@
|
|
|
1538
1625
|
children: show && chart
|
|
1539
1626
|
});
|
|
1540
1627
|
};
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
}) => {
|
|
1550
|
-
const rect = currentTarget.getBoundingClientRect();
|
|
1551
|
-
const x = clientX - rect.left;
|
|
1552
|
-
const y = clientY - rect.top;
|
|
1553
|
-
requestAnimationFrame(() => {
|
|
1554
|
-
setTargetRect(rect);
|
|
1555
|
-
setPosition({
|
|
1556
|
-
x,
|
|
1557
|
-
y
|
|
1558
|
-
});
|
|
1559
|
-
setHoverActive(true);
|
|
1560
|
-
});
|
|
1561
|
-
};
|
|
1562
|
-
const onMouseOut = () => {
|
|
1563
|
-
requestAnimationFrame(() => {
|
|
1564
|
-
setHoverActive(false);
|
|
1565
|
-
});
|
|
1566
|
-
};
|
|
1567
|
-
hooks.useEffect(() => {
|
|
1568
|
-
setTargetRect(targetElement.getBoundingClientRect());
|
|
1569
|
-
if (trackPosition) {
|
|
1570
|
-
targetElement.addEventListener("mousemove", onMouseMove);
|
|
1571
|
-
targetElement.addEventListener("mouseout", onMouseOut);
|
|
1572
|
-
}
|
|
1573
|
-
return () => {
|
|
1574
|
-
if (trackPosition) {
|
|
1575
|
-
targetElement.removeEventListener("mousemove", onMouseMove);
|
|
1576
|
-
targetElement.removeEventListener("mouseout", onMouseOut);
|
|
1577
|
-
}
|
|
1578
|
-
};
|
|
1579
|
-
}, [targetElement, trackPosition]);
|
|
1580
|
-
return {
|
|
1581
|
-
targetRect,
|
|
1582
|
-
positionInTarget: position,
|
|
1583
|
-
hoverActive
|
|
1584
|
-
};
|
|
1585
|
-
};
|
|
1586
|
-
function n(n2) {
|
|
1587
|
-
return (r) => {
|
|
1588
|
-
n2.forEach((n3) => {
|
|
1589
|
-
"function" == typeof n3 ? n3(r) : null != n3 && (n3.current = r);
|
|
1590
|
-
});
|
|
1591
|
-
};
|
|
1592
|
-
}
|
|
1593
|
-
var T, c;
|
|
1594
|
-
!function(e) {
|
|
1595
|
-
e.APPEAR = "appear", e.APPEAR_ACTIVE = "appearActive", e.APPEAR_DONE = "appearDone", e.ENTER = "enter", e.ENTER_ACTIVE = "enterActive", e.ENTER_DONE = "enterDone", e.EXIT = "exit", e.EXIT_ACTIVE = "exitActive", e.EXIT_DONE = "exitDone";
|
|
1596
|
-
}(T || (T = {})), function(e) {
|
|
1597
|
-
e.ENTER = "onEnter", e.ENTERING = "onEntering", e.ENTERED = "onEntered", e.EXIT = "onExit", e.EXITING = "onExiting", e.EXITED = "onExited";
|
|
1598
|
-
}(c || (c = {}));
|
|
1599
|
-
const s = { [T.APPEAR]: [c.ENTER, T.APPEAR_ACTIVE], [T.APPEAR_ACTIVE]: [c.ENTERING, T.APPEAR_DONE, true], [T.APPEAR_DONE]: [c.ENTERED], [T.ENTER]: [c.ENTER, T.ENTER_ACTIVE], [T.ENTER_ACTIVE]: [c.ENTERING, T.ENTER_DONE, true], [T.ENTER_DONE]: [c.ENTERED], [T.EXIT]: [c.EXIT, T.EXIT_ACTIVE], [T.EXIT_ACTIVE]: [c.EXITING, T.EXIT_DONE, true], [T.EXIT_DONE]: [c.EXITED] };
|
|
1600
|
-
var u = (r) => {
|
|
1601
|
-
const { children: c2, in: u2 = false, appear: A = false, enter: N2 = true, exit: l = true, duration: I = 500, alwaysMounted: p2 = false, addEndListener: R2 } = r, P2 = hooks.useRef(), _2 = hooks.useRef();
|
|
1602
|
-
let d2 = false;
|
|
1603
|
-
const [f, D] = hooks.useState(() => (d2 = true, u2 ? A ? T.APPEAR : T.APPEAR_DONE : T.EXIT_DONE));
|
|
1604
|
-
hooks.useEffect(() => {
|
|
1605
|
-
var e;
|
|
1606
|
-
const { setTimeout: E, clearTimeout: t } = window, [n2, o, i] = s[f];
|
|
1607
|
-
return null == (e = r[n2]) || e.call(r, P2.current), o && (i ? R2 ? R2(P2.current, () => D(o)) : _2.current = E(D, I, o) : D(o)), () => {
|
|
1608
|
-
t(_2.current);
|
|
1609
|
-
};
|
|
1610
|
-
}, [f, I]), hooks.useLayoutEffect(() => {
|
|
1611
|
-
d2 || D(u2 ? N2 ? T.ENTER : T.ENTER_DONE : l ? T.EXIT : T.EXIT_DONE);
|
|
1612
|
-
}, [u2]);
|
|
1613
|
-
const X = hooks.useMemo(() => {
|
|
1614
|
-
const e = {};
|
|
1615
|
-
return Object.values(T).forEach((r2) => {
|
|
1616
|
-
e[r2] = f === r2;
|
|
1617
|
-
}), e;
|
|
1618
|
-
}, [f]);
|
|
1619
|
-
if (!p2 && f === T.EXIT_DONE)
|
|
1620
|
-
return null;
|
|
1621
|
-
const O = c2(X, f);
|
|
1622
|
-
return preact.cloneElement(O, { ref: n([P2, O.ref]) });
|
|
1623
|
-
};
|
|
1624
|
-
function N(e, r) {
|
|
1625
|
-
if (null == e)
|
|
1626
|
-
return {};
|
|
1627
|
-
var E, t, n2 = {}, o = Object.keys(e);
|
|
1628
|
-
for (t = 0; t < o.length; t++)
|
|
1629
|
-
r.indexOf(E = o[t]) >= 0 || (n2[E] = e[E]);
|
|
1630
|
-
return n2;
|
|
1628
|
+
function rectsIntersect(rect1, rect2) {
|
|
1629
|
+
if (rect1.width === 0 || rect1.height === 0 || rect2.width === 0 || rect2.height === 0) {
|
|
1630
|
+
return false;
|
|
1631
|
+
}
|
|
1632
|
+
if (rect1.x + rect1.width <= rect2.x || rect2.x + rect2.width <= rect1.x || rect1.y + rect1.height <= rect2.y || rect2.y + rect2.height <= rect1.y) {
|
|
1633
|
+
return false;
|
|
1634
|
+
}
|
|
1635
|
+
return true;
|
|
1631
1636
|
}
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
const { children: t, classNames: n2 } = E, o = N(E, p);
|
|
1635
|
-
return preact.createElement(u, o, (r, E2) => {
|
|
1636
|
-
const { className: o2 } = t.props, i = hooks.useMemo(() => P(o2, ((e, r2) => {
|
|
1637
|
-
const E3 = _(e, r2);
|
|
1638
|
-
switch (e) {
|
|
1639
|
-
case T.APPEAR_ACTIVE:
|
|
1640
|
-
return P(_(T.APPEAR, r2), E3);
|
|
1641
|
-
case T.ENTER_ACTIVE:
|
|
1642
|
-
return P(_(T.ENTER, r2), E3);
|
|
1643
|
-
case T.EXIT_ACTIVE:
|
|
1644
|
-
return P(_(T.EXIT, r2), E3);
|
|
1645
|
-
default:
|
|
1646
|
-
return E3;
|
|
1647
|
-
}
|
|
1648
|
-
})(E2, n2)), [o2, n2, E2]);
|
|
1649
|
-
return preact.cloneElement(t, { className: i });
|
|
1650
|
-
});
|
|
1651
|
-
};
|
|
1652
|
-
const transitionContainer$1 = "_transitionContainer_1gzlr_1";
|
|
1653
|
-
const modalBox$1 = "_modalBox_1gzlr_13";
|
|
1654
|
-
const enter$1 = "_enter_1gzlr_21";
|
|
1655
|
-
const exitDone$1 = "_exitDone_1gzlr_22";
|
|
1656
|
-
const enterActive$1 = "_enterActive_1gzlr_31";
|
|
1657
|
-
const exit$1 = "_exit_1gzlr_22";
|
|
1658
|
-
const styles$6 = {
|
|
1659
|
-
transitionContainer: transitionContainer$1,
|
|
1660
|
-
modalBox: modalBox$1,
|
|
1661
|
-
enter: enter$1,
|
|
1662
|
-
exitDone: exitDone$1,
|
|
1663
|
-
enterActive: enterActive$1,
|
|
1664
|
-
exit: exit$1
|
|
1665
|
-
};
|
|
1666
|
-
function Modal$1({
|
|
1667
|
-
visible = false,
|
|
1668
|
-
children
|
|
1669
|
-
}) {
|
|
1670
|
-
return jsxRuntime.jsx(d, {
|
|
1671
|
-
in: visible,
|
|
1672
|
-
duration: 300,
|
|
1673
|
-
classNames: styles$6,
|
|
1674
|
-
alwaysMounted: true,
|
|
1675
|
-
children: jsxRuntime.jsx("div", {
|
|
1676
|
-
class: styles$6.transitionContainer,
|
|
1677
|
-
children: jsxRuntime.jsx("div", {
|
|
1678
|
-
class: styles$6.modalBox,
|
|
1679
|
-
children
|
|
1680
|
-
})
|
|
1681
|
-
})
|
|
1682
|
-
});
|
|
1637
|
+
function pointInsideRect(point, rect) {
|
|
1638
|
+
return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
|
|
1683
1639
|
}
|
|
1684
1640
|
const tooltip = "_tooltip_11t5d_1";
|
|
1685
|
-
const defaultStyles$
|
|
1641
|
+
const defaultStyles$c = {
|
|
1686
1642
|
tooltip
|
|
1687
1643
|
};
|
|
1688
|
-
const TooltipType = {
|
|
1689
|
-
float: "float",
|
|
1690
|
-
modal: "modal"
|
|
1691
|
-
};
|
|
1692
1644
|
function Tooltip({
|
|
1693
1645
|
for: targetElement,
|
|
1694
|
-
|
|
1695
|
-
|
|
1646
|
+
touchRect,
|
|
1647
|
+
positionInTarget,
|
|
1648
|
+
show = true,
|
|
1696
1649
|
styles: styles2,
|
|
1697
1650
|
children
|
|
1698
1651
|
}) {
|
|
@@ -1703,29 +1656,19 @@
|
|
|
1703
1656
|
y: 0
|
|
1704
1657
|
});
|
|
1705
1658
|
const [displayElement, setDisplayElement] = hooks.useState(null);
|
|
1706
|
-
const
|
|
1707
|
-
|
|
1708
|
-
targetRect,
|
|
1709
|
-
positionInTarget,
|
|
1710
|
-
hoverActive
|
|
1711
|
-
} = useTooltipTarget(targetElement, trackPosition);
|
|
1712
|
-
const tooltipRef = hooks.useRef(null);
|
|
1713
|
-
styles2 = mergeStyles(defaultStyles$b, styles2);
|
|
1659
|
+
const tooltipRef = hooks.useRef();
|
|
1660
|
+
styles2 = mergeStyles(defaultStyles$c, styles2);
|
|
1714
1661
|
hooks.useEffect(() => {
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
|
-
} else {
|
|
1721
|
-
throw new Error("renderIn prop needs to be a selector or ref (from useRef)");
|
|
1722
|
-
}
|
|
1723
|
-
setDisplayElement(element);
|
|
1724
|
-
}, [refOrSelector]);
|
|
1662
|
+
setDisplayElement(document.querySelector("body"));
|
|
1663
|
+
return () => {
|
|
1664
|
+
setDisplayElement(null);
|
|
1665
|
+
};
|
|
1666
|
+
}, []);
|
|
1725
1667
|
hooks.useLayoutEffect(() => {
|
|
1726
1668
|
if (!tooltipRef.current)
|
|
1727
1669
|
return;
|
|
1728
|
-
|
|
1670
|
+
const targetRect = targetElement.getBoundingClientRect();
|
|
1671
|
+
if (positionInTarget) {
|
|
1729
1672
|
const newPosition = tooltipPositionForPoint({
|
|
1730
1673
|
targetRect,
|
|
1731
1674
|
positionInTarget,
|
|
@@ -1733,35 +1676,32 @@
|
|
|
1733
1676
|
displayElement
|
|
1734
1677
|
});
|
|
1735
1678
|
setTooltipPosition(newPosition);
|
|
1736
|
-
} else if (!
|
|
1679
|
+
} else if (!positionInTarget) {
|
|
1737
1680
|
const newPosition = tooltipPositionForRect({
|
|
1738
1681
|
targetRect,
|
|
1682
|
+
touchRect,
|
|
1739
1683
|
tooltip: tooltipRef.current,
|
|
1740
1684
|
displayElement
|
|
1741
1685
|
});
|
|
1742
1686
|
setTooltipPosition(newPosition);
|
|
1743
1687
|
}
|
|
1744
|
-
}, [
|
|
1688
|
+
}, [targetElement, positionInTarget, displayElement, tooltipRef, touchRect]);
|
|
1745
1689
|
if (!displayElement)
|
|
1746
1690
|
return;
|
|
1747
|
-
const
|
|
1748
|
-
|
|
1749
|
-
display: displayTooltip ? "block" : "none",
|
|
1691
|
+
const fixedStyle = {
|
|
1692
|
+
display: show ? "block" : "none",
|
|
1750
1693
|
position: "fixed",
|
|
1751
1694
|
left: tooltipPosition.x,
|
|
1752
1695
|
top: tooltipPosition.y,
|
|
1753
1696
|
zIndex: 100
|
|
1754
1697
|
};
|
|
1755
|
-
const tooltip2 = jsxRuntime.
|
|
1698
|
+
const tooltip2 = jsxRuntime.jsx("div", {
|
|
1756
1699
|
ref: tooltipRef,
|
|
1757
1700
|
className: styles2.tooltip,
|
|
1758
1701
|
style: fixedStyle,
|
|
1759
|
-
children
|
|
1702
|
+
children
|
|
1760
1703
|
});
|
|
1761
|
-
return compat.createPortal(
|
|
1762
|
-
visible: hoverActive,
|
|
1763
|
-
children: tooltip2
|
|
1764
|
-
}) : tooltip2, displayElement);
|
|
1704
|
+
return compat.createPortal(tooltip2, displayElement);
|
|
1765
1705
|
}
|
|
1766
1706
|
function tooltipPositionForPoint({
|
|
1767
1707
|
targetRect,
|
|
@@ -1782,10 +1722,19 @@
|
|
|
1782
1722
|
if (newPosition.y + tooltipHeight > displayElementRect.bottom) {
|
|
1783
1723
|
newPosition.y -= tooltipHeight;
|
|
1784
1724
|
}
|
|
1725
|
+
if (newPosition.x <= displayElementRect.left) {
|
|
1726
|
+
newPosition.x = displayElementRect.left + displayElementRect.width / 2 - tooltipWidth / 2;
|
|
1727
|
+
}
|
|
1785
1728
|
return newPosition;
|
|
1786
1729
|
}
|
|
1787
1730
|
function tooltipPositionForRect({
|
|
1788
1731
|
targetRect,
|
|
1732
|
+
touchRect = {
|
|
1733
|
+
x: 0,
|
|
1734
|
+
y: 0,
|
|
1735
|
+
width: 0,
|
|
1736
|
+
height: 0
|
|
1737
|
+
},
|
|
1789
1738
|
tooltip: tooltip2,
|
|
1790
1739
|
displayElement
|
|
1791
1740
|
}) {
|
|
@@ -1795,6 +1744,15 @@
|
|
|
1795
1744
|
};
|
|
1796
1745
|
const tooltipWidth = tooltip2.offsetWidth;
|
|
1797
1746
|
const tooltipHeight = tooltip2.offsetHeight;
|
|
1747
|
+
const tooltipRect = {
|
|
1748
|
+
...newPosition,
|
|
1749
|
+
width: tooltipWidth,
|
|
1750
|
+
height: tooltipHeight
|
|
1751
|
+
};
|
|
1752
|
+
if (rectsIntersect(tooltipRect, touchRect)) {
|
|
1753
|
+
newPosition.x = touchRect.x + touchRect.width / 2;
|
|
1754
|
+
newPosition.y = touchRect.y - tooltipHeight;
|
|
1755
|
+
}
|
|
1798
1756
|
const displayElementRect = displayElement.getBoundingClientRect();
|
|
1799
1757
|
if (newPosition.x + tooltipWidth > displayElementRect.right) {
|
|
1800
1758
|
newPosition.x = targetRect.left - tooltipWidth;
|
|
@@ -1802,13 +1760,16 @@
|
|
|
1802
1760
|
if (newPosition.y - tooltipHeight < displayElementRect.top) {
|
|
1803
1761
|
newPosition.y = targetRect.bottom;
|
|
1804
1762
|
}
|
|
1763
|
+
if (newPosition.x <= displayElementRect.left) {
|
|
1764
|
+
newPosition.x = displayElementRect.left + displayElementRect.width / 2 - tooltipWidth / 2;
|
|
1765
|
+
}
|
|
1805
1766
|
return newPosition;
|
|
1806
1767
|
}
|
|
1807
1768
|
const text$1 = "_text_1b8t2_1";
|
|
1808
|
-
const container$
|
|
1809
|
-
const defaultStyles$
|
|
1769
|
+
const container$4 = "_container_1b8t2_10";
|
|
1770
|
+
const defaultStyles$b = {
|
|
1810
1771
|
text: text$1,
|
|
1811
|
-
container: container$
|
|
1772
|
+
container: container$4
|
|
1812
1773
|
};
|
|
1813
1774
|
const ControlChange = ({
|
|
1814
1775
|
previous: previous2,
|
|
@@ -1817,7 +1778,7 @@
|
|
|
1817
1778
|
styles: styles2
|
|
1818
1779
|
}) => {
|
|
1819
1780
|
styles2 = mergeStyles({
|
|
1820
|
-
...defaultStyles$
|
|
1781
|
+
...defaultStyles$b
|
|
1821
1782
|
}, styles2);
|
|
1822
1783
|
let hasChanged = next2 !== previous2;
|
|
1823
1784
|
return jsxRuntime.jsx("div", {
|
|
@@ -1841,6 +1802,34 @@
|
|
|
1841
1802
|
})
|
|
1842
1803
|
});
|
|
1843
1804
|
};
|
|
1805
|
+
const wrapper = "_wrapper_8vo05_1";
|
|
1806
|
+
const line = "_line_8vo05_5";
|
|
1807
|
+
const halfLineText = "_halfLineText_8vo05_15";
|
|
1808
|
+
const defaultStyles$a = {
|
|
1809
|
+
wrapper,
|
|
1810
|
+
line,
|
|
1811
|
+
halfLineText
|
|
1812
|
+
};
|
|
1813
|
+
const FirstPastThePostWaffle = ({
|
|
1814
|
+
styles: styles2,
|
|
1815
|
+
children,
|
|
1816
|
+
lineOverHang
|
|
1817
|
+
}) => {
|
|
1818
|
+
styles2 = mergeStyles(defaultStyles$a, styles2);
|
|
1819
|
+
return jsxRuntime.jsxs("div", {
|
|
1820
|
+
class: styles2.wrapper,
|
|
1821
|
+
children: [jsxRuntime.jsx("p", {
|
|
1822
|
+
style: {
|
|
1823
|
+
height: lineOverHang + 20
|
|
1824
|
+
},
|
|
1825
|
+
class: styles2.halfLineText,
|
|
1826
|
+
children: children.halfLineText
|
|
1827
|
+
}), jsxRuntime.jsx("div", {
|
|
1828
|
+
class: styles2.line,
|
|
1829
|
+
children: " "
|
|
1830
|
+
}), children.waffle]
|
|
1831
|
+
});
|
|
1832
|
+
};
|
|
1844
1833
|
const toplineResult = "_toplineResult_49z3u_9";
|
|
1845
1834
|
const primaryname = "_primaryname_49z3u_14";
|
|
1846
1835
|
const secondaryname = "_secondaryname_49z3u_29";
|
|
@@ -1865,7 +1854,7 @@
|
|
|
1865
1854
|
displayColumn,
|
|
1866
1855
|
topRow
|
|
1867
1856
|
};
|
|
1868
|
-
const ToplineResult = ({
|
|
1857
|
+
const ToplineResult = compat.forwardRef(({
|
|
1869
1858
|
name: name2,
|
|
1870
1859
|
secondaryName,
|
|
1871
1860
|
mainNumber: mainNumber2,
|
|
@@ -1876,8 +1865,9 @@
|
|
|
1876
1865
|
abbreviation,
|
|
1877
1866
|
onMouseOver,
|
|
1878
1867
|
onInfoPress,
|
|
1879
|
-
showInfoButton = false
|
|
1880
|
-
|
|
1868
|
+
showInfoButton = false,
|
|
1869
|
+
infoButtonRef
|
|
1870
|
+
}, ref) => {
|
|
1881
1871
|
styles2 = mergeStyles({
|
|
1882
1872
|
...defaultStyles$9
|
|
1883
1873
|
}, styles2);
|
|
@@ -1885,6 +1875,7 @@
|
|
|
1885
1875
|
return !secondaryName ? jsxRuntime.jsxs("div", {
|
|
1886
1876
|
class: styles2.toplineResult,
|
|
1887
1877
|
onMouseOver,
|
|
1878
|
+
ref,
|
|
1888
1879
|
children: [jsxRuntime.jsxs("div", {
|
|
1889
1880
|
class: styles2.topRow,
|
|
1890
1881
|
children: [jsxRuntime.jsx("span", {
|
|
@@ -1893,7 +1884,8 @@
|
|
|
1893
1884
|
}), " ", showInfoButton && jsxRuntime.jsx("span", {
|
|
1894
1885
|
class: styles2.infoButton,
|
|
1895
1886
|
children: jsxRuntime.jsx(InfoButton, {
|
|
1896
|
-
onClick: onInfoPress
|
|
1887
|
+
onClick: onInfoPress,
|
|
1888
|
+
ref: infoButtonRef
|
|
1897
1889
|
})
|
|
1898
1890
|
})]
|
|
1899
1891
|
}), jsxRuntime.jsxs("div", {
|
|
@@ -1912,6 +1904,7 @@
|
|
|
1912
1904
|
}) : jsxRuntime.jsxs("div", {
|
|
1913
1905
|
class: styles2.toplineResult,
|
|
1914
1906
|
onMouseOver,
|
|
1907
|
+
ref,
|
|
1915
1908
|
children: [jsxRuntime.jsxs("div", {
|
|
1916
1909
|
class: styles2.topRow,
|
|
1917
1910
|
children: [jsxRuntime.jsx("span", {
|
|
@@ -1943,7 +1936,7 @@
|
|
|
1943
1936
|
})]
|
|
1944
1937
|
})]
|
|
1945
1938
|
});
|
|
1946
|
-
};
|
|
1939
|
+
});
|
|
1947
1940
|
const section = "_section_12aiu_9";
|
|
1948
1941
|
const borderTop = "_borderTop_12aiu_52";
|
|
1949
1942
|
const header = "_header_12aiu_56";
|
|
@@ -1963,14 +1956,22 @@
|
|
|
1963
1956
|
styles2 = mergeStyles({
|
|
1964
1957
|
...defaultStyles$8
|
|
1965
1958
|
}, styles2);
|
|
1959
|
+
const [minHeight, setMinHeight] = hooks.useState("auto");
|
|
1960
|
+
const headerRef = hooks.useRef();
|
|
1961
|
+
hooks.useLayoutEffect(() => {
|
|
1962
|
+
const headerElement = headerRef.current;
|
|
1963
|
+
setMinHeight(headerElement.offsetHeight);
|
|
1964
|
+
}, [children]);
|
|
1966
1965
|
return jsxRuntime.jsxs("section", {
|
|
1967
1966
|
ref,
|
|
1968
1967
|
className: [styles2.section, borderTop2 && styles2.borderTop].join(" "),
|
|
1969
1968
|
style: {
|
|
1970
|
-
"--background-color": backgroundColor
|
|
1969
|
+
"--background-color": backgroundColor,
|
|
1970
|
+
minHeight
|
|
1971
1971
|
},
|
|
1972
1972
|
children: [jsxRuntime.jsx("div", {
|
|
1973
1973
|
className: styles2.header,
|
|
1974
|
+
ref: headerRef,
|
|
1974
1975
|
children: children.header
|
|
1975
1976
|
}), jsxRuntime.jsx("div", {
|
|
1976
1977
|
className: styles2.content,
|
|
@@ -2032,7 +2033,7 @@
|
|
|
2032
2033
|
})]
|
|
2033
2034
|
});
|
|
2034
2035
|
};
|
|
2035
|
-
const container$
|
|
2036
|
+
const container$3 = "_container_1snyq_1";
|
|
2036
2037
|
const img = "_img_1snyq_7";
|
|
2037
2038
|
const title$2 = "_title_1snyq_15";
|
|
2038
2039
|
const subtitle = "_subtitle_1snyq_31";
|
|
@@ -2040,7 +2041,7 @@
|
|
|
2040
2041
|
const blurb = "_blurb_1snyq_51";
|
|
2041
2042
|
const footnote = "_footnote_1snyq_59";
|
|
2042
2043
|
const defaultStyles$6 = {
|
|
2043
|
-
container: container$
|
|
2044
|
+
container: container$3,
|
|
2044
2045
|
img,
|
|
2045
2046
|
title: title$2,
|
|
2046
2047
|
subtitle,
|
|
@@ -2480,24 +2481,10 @@
|
|
|
2480
2481
|
})
|
|
2481
2482
|
});
|
|
2482
2483
|
}
|
|
2483
|
-
|
|
2484
|
-
const windowSize = useWindowSize();
|
|
2485
|
-
const [containerSize, setContainerSize] = hooks.useState();
|
|
2486
|
-
hooks.useLayoutEffect(() => {
|
|
2487
|
-
const container2 = containerRef.current;
|
|
2488
|
-
if (!container2)
|
|
2489
|
-
return;
|
|
2490
|
-
setContainerSize({
|
|
2491
|
-
width: container2.clientWidth,
|
|
2492
|
-
height: container2.clientHeight
|
|
2493
|
-
});
|
|
2494
|
-
}, [containerRef, windowSize]);
|
|
2495
|
-
return containerSize;
|
|
2496
|
-
}
|
|
2497
|
-
const container$1 = "_container_cyrny_1";
|
|
2484
|
+
const container$2 = "_container_cyrny_1";
|
|
2498
2485
|
const svg$1 = "_svg_cyrny_6";
|
|
2499
2486
|
const styles$5 = {
|
|
2500
|
-
container: container$
|
|
2487
|
+
container: container$2,
|
|
2501
2488
|
svg: svg$1
|
|
2502
2489
|
};
|
|
2503
2490
|
function dynamicPropValue(prop, d2, index2) {
|
|
@@ -2763,10 +2750,10 @@
|
|
|
2763
2750
|
})
|
|
2764
2751
|
});
|
|
2765
2752
|
});
|
|
2766
|
-
const container = "_container_azu4a_1";
|
|
2753
|
+
const container$1 = "_container_azu4a_1";
|
|
2767
2754
|
const paragraph = "_paragraph_azu4a_12";
|
|
2768
2755
|
const defaultStyles$4 = {
|
|
2769
|
-
container,
|
|
2756
|
+
container: container$1,
|
|
2770
2757
|
paragraph
|
|
2771
2758
|
};
|
|
2772
2759
|
function ResultSummary({
|
|
@@ -3010,6 +2997,72 @@
|
|
|
3010
2997
|
})
|
|
3011
2998
|
});
|
|
3012
2999
|
}
|
|
3000
|
+
function n(n2) {
|
|
3001
|
+
return (r) => {
|
|
3002
|
+
n2.forEach((n3) => {
|
|
3003
|
+
"function" == typeof n3 ? n3(r) : null != n3 && (n3.current = r);
|
|
3004
|
+
});
|
|
3005
|
+
};
|
|
3006
|
+
}
|
|
3007
|
+
var T, c;
|
|
3008
|
+
!function(e) {
|
|
3009
|
+
e.APPEAR = "appear", e.APPEAR_ACTIVE = "appearActive", e.APPEAR_DONE = "appearDone", e.ENTER = "enter", e.ENTER_ACTIVE = "enterActive", e.ENTER_DONE = "enterDone", e.EXIT = "exit", e.EXIT_ACTIVE = "exitActive", e.EXIT_DONE = "exitDone";
|
|
3010
|
+
}(T || (T = {})), function(e) {
|
|
3011
|
+
e.ENTER = "onEnter", e.ENTERING = "onEntering", e.ENTERED = "onEntered", e.EXIT = "onExit", e.EXITING = "onExiting", e.EXITED = "onExited";
|
|
3012
|
+
}(c || (c = {}));
|
|
3013
|
+
const s = { [T.APPEAR]: [c.ENTER, T.APPEAR_ACTIVE], [T.APPEAR_ACTIVE]: [c.ENTERING, T.APPEAR_DONE, true], [T.APPEAR_DONE]: [c.ENTERED], [T.ENTER]: [c.ENTER, T.ENTER_ACTIVE], [T.ENTER_ACTIVE]: [c.ENTERING, T.ENTER_DONE, true], [T.ENTER_DONE]: [c.ENTERED], [T.EXIT]: [c.EXIT, T.EXIT_ACTIVE], [T.EXIT_ACTIVE]: [c.EXITING, T.EXIT_DONE, true], [T.EXIT_DONE]: [c.EXITED] };
|
|
3014
|
+
var u = (r) => {
|
|
3015
|
+
const { children: c2, in: u2 = false, appear: A = false, enter: N2 = true, exit: l = true, duration: I = 500, alwaysMounted: p2 = false, addEndListener: R2 } = r, P2 = hooks.useRef(), _2 = hooks.useRef();
|
|
3016
|
+
let d2 = false;
|
|
3017
|
+
const [f, D] = hooks.useState(() => (d2 = true, u2 ? A ? T.APPEAR : T.APPEAR_DONE : T.EXIT_DONE));
|
|
3018
|
+
hooks.useEffect(() => {
|
|
3019
|
+
var e;
|
|
3020
|
+
const { setTimeout: E, clearTimeout: t } = window, [n2, o, i] = s[f];
|
|
3021
|
+
return null == (e = r[n2]) || e.call(r, P2.current), o && (i ? R2 ? R2(P2.current, () => D(o)) : _2.current = E(D, I, o) : D(o)), () => {
|
|
3022
|
+
t(_2.current);
|
|
3023
|
+
};
|
|
3024
|
+
}, [f, I]), hooks.useLayoutEffect(() => {
|
|
3025
|
+
d2 || D(u2 ? N2 ? T.ENTER : T.ENTER_DONE : l ? T.EXIT : T.EXIT_DONE);
|
|
3026
|
+
}, [u2]);
|
|
3027
|
+
const X = hooks.useMemo(() => {
|
|
3028
|
+
const e = {};
|
|
3029
|
+
return Object.values(T).forEach((r2) => {
|
|
3030
|
+
e[r2] = f === r2;
|
|
3031
|
+
}), e;
|
|
3032
|
+
}, [f]);
|
|
3033
|
+
if (!p2 && f === T.EXIT_DONE)
|
|
3034
|
+
return null;
|
|
3035
|
+
const O = c2(X, f);
|
|
3036
|
+
return preact.cloneElement(O, { ref: n([P2, O.ref]) });
|
|
3037
|
+
};
|
|
3038
|
+
function N(e, r) {
|
|
3039
|
+
if (null == e)
|
|
3040
|
+
return {};
|
|
3041
|
+
var E, t, n2 = {}, o = Object.keys(e);
|
|
3042
|
+
for (t = 0; t < o.length; t++)
|
|
3043
|
+
r.indexOf(E = o[t]) >= 0 || (n2[E] = e[E]);
|
|
3044
|
+
return n2;
|
|
3045
|
+
}
|
|
3046
|
+
const p = ["children", "classNames"], R = { [T.APPEAR]: "-appear", [T.APPEAR_ACTIVE]: "-appear-active", [T.APPEAR_DONE]: "-appear-done", [T.ENTER]: "-enter", [T.ENTER_ACTIVE]: "-enter-active", [T.ENTER_DONE]: "-enter-done", [T.EXIT]: "-exit", [T.EXIT_ACTIVE]: "-exit-active", [T.EXIT_DONE]: "-exit-done" }, P = (...e) => e.filter((e2) => !!e2).join(" "), _ = (e, r) => "string" == typeof r ? `${r}${R[e]}` : r[e];
|
|
3047
|
+
var d = (E) => {
|
|
3048
|
+
const { children: t, classNames: n2 } = E, o = N(E, p);
|
|
3049
|
+
return preact.createElement(u, o, (r, E2) => {
|
|
3050
|
+
const { className: o2 } = t.props, i = hooks.useMemo(() => P(o2, ((e, r2) => {
|
|
3051
|
+
const E3 = _(e, r2);
|
|
3052
|
+
switch (e) {
|
|
3053
|
+
case T.APPEAR_ACTIVE:
|
|
3054
|
+
return P(_(T.APPEAR, r2), E3);
|
|
3055
|
+
case T.ENTER_ACTIVE:
|
|
3056
|
+
return P(_(T.ENTER, r2), E3);
|
|
3057
|
+
case T.EXIT_ACTIVE:
|
|
3058
|
+
return P(_(T.EXIT, r2), E3);
|
|
3059
|
+
default:
|
|
3060
|
+
return E3;
|
|
3061
|
+
}
|
|
3062
|
+
})(E2, n2)), [o2, n2, E2]);
|
|
3063
|
+
return preact.cloneElement(t, { className: i });
|
|
3064
|
+
});
|
|
3065
|
+
};
|
|
3013
3066
|
const transitionContainer = "_transitionContainer_wws3j_1";
|
|
3014
3067
|
const modalBox = "_modalBox_wws3j_13";
|
|
3015
3068
|
const enter = "_enter_wws3j_21";
|
|
@@ -3054,18 +3107,20 @@
|
|
|
3054
3107
|
})
|
|
3055
3108
|
}), document.body);
|
|
3056
3109
|
}
|
|
3057
|
-
const
|
|
3058
|
-
const
|
|
3059
|
-
const
|
|
3060
|
-
const
|
|
3061
|
-
const
|
|
3062
|
-
const
|
|
3063
|
-
const
|
|
3064
|
-
const
|
|
3065
|
-
const
|
|
3066
|
-
const
|
|
3067
|
-
const
|
|
3110
|
+
const container = "_container_iozsb_1";
|
|
3111
|
+
const button$1 = "_button_iozsb_6";
|
|
3112
|
+
const icon = "_icon_iozsb_22";
|
|
3113
|
+
const title$1 = "_title_iozsb_27";
|
|
3114
|
+
const popout = "_popout_iozsb_34";
|
|
3115
|
+
const hint = "_hint_iozsb_51";
|
|
3116
|
+
const option = "_option_iozsb_58";
|
|
3117
|
+
const optionIcon = "_optionIcon_iozsb_79";
|
|
3118
|
+
const optionTitle = "_optionTitle_iozsb_84";
|
|
3119
|
+
const optionDescription = "_optionDescription_iozsb_92";
|
|
3120
|
+
const checkmark = "_checkmark_iozsb_99";
|
|
3121
|
+
const checkmarkPath = "_checkmarkPath_iozsb_105";
|
|
3068
3122
|
const styles$2 = {
|
|
3123
|
+
container,
|
|
3069
3124
|
button: button$1,
|
|
3070
3125
|
icon,
|
|
3071
3126
|
title: title$1,
|
|
@@ -3096,6 +3151,7 @@
|
|
|
3096
3151
|
return selectedOption.icon;
|
|
3097
3152
|
}, [options, selectedIndex]);
|
|
3098
3153
|
return jsxRuntime.jsxs("div", {
|
|
3154
|
+
className: styles$2.container,
|
|
3099
3155
|
children: [jsxRuntime.jsxs("button", {
|
|
3100
3156
|
className: styles$2.button,
|
|
3101
3157
|
onClick: () => setExpanded((current) => !current),
|
|
@@ -3438,6 +3494,122 @@
|
|
|
3438
3494
|
})]
|
|
3439
3495
|
});
|
|
3440
3496
|
}
|
|
3497
|
+
function useTouchOrHover() {
|
|
3498
|
+
const ref = hooks.useRef();
|
|
3499
|
+
const [position, setPosition] = hooks.useState();
|
|
3500
|
+
const [isActive, setIsActive] = hooks.useState(false);
|
|
3501
|
+
const [touchRect, setTouchRect] = hooks.useState();
|
|
3502
|
+
hooks.useEffect(() => {
|
|
3503
|
+
const element = ref.current;
|
|
3504
|
+
let touchCancelled = false;
|
|
3505
|
+
const touchStarted = (event) => {
|
|
3506
|
+
if (event.touches.length > 1)
|
|
3507
|
+
return;
|
|
3508
|
+
touchCancelled = false;
|
|
3509
|
+
const touch = event.touches[0];
|
|
3510
|
+
const {
|
|
3511
|
+
clientX,
|
|
3512
|
+
clientY
|
|
3513
|
+
} = touch;
|
|
3514
|
+
const rect = element.getBoundingClientRect();
|
|
3515
|
+
const point = {
|
|
3516
|
+
x: clientX - rect.left,
|
|
3517
|
+
y: clientY - rect.top
|
|
3518
|
+
};
|
|
3519
|
+
setPosition(point);
|
|
3520
|
+
const touchRect2 = {
|
|
3521
|
+
x: clientX - touch.radiusX,
|
|
3522
|
+
y: clientY - touch.radiusY,
|
|
3523
|
+
width: touch.radiusX * 2,
|
|
3524
|
+
height: touch.radiusY * 2
|
|
3525
|
+
};
|
|
3526
|
+
setTouchRect(touchRect2);
|
|
3527
|
+
setIsActive(true);
|
|
3528
|
+
event.stopPropagation();
|
|
3529
|
+
};
|
|
3530
|
+
const touchMoved = (event) => {
|
|
3531
|
+
if (touchCancelled || event.targetTouches.length !== 1)
|
|
3532
|
+
return;
|
|
3533
|
+
const touch = event.targetTouches[0];
|
|
3534
|
+
const {
|
|
3535
|
+
clientX,
|
|
3536
|
+
clientY
|
|
3537
|
+
} = touch;
|
|
3538
|
+
const rect = element.getBoundingClientRect();
|
|
3539
|
+
const point = {
|
|
3540
|
+
x: clientX - rect.left,
|
|
3541
|
+
y: clientY - rect.top
|
|
3542
|
+
};
|
|
3543
|
+
if (!event.cancelable || !pointInsideRect(point, rect)) {
|
|
3544
|
+
setIsActive(false);
|
|
3545
|
+
touchCancelled = true;
|
|
3546
|
+
} else {
|
|
3547
|
+
setPosition(point);
|
|
3548
|
+
setIsActive(true);
|
|
3549
|
+
}
|
|
3550
|
+
};
|
|
3551
|
+
const touchEnded = (event) => {
|
|
3552
|
+
if (event.cancelable) {
|
|
3553
|
+
event.preventDefault();
|
|
3554
|
+
}
|
|
3555
|
+
setIsActive(false);
|
|
3556
|
+
setPosition(null);
|
|
3557
|
+
};
|
|
3558
|
+
const mouseOver = (event) => {
|
|
3559
|
+
const {
|
|
3560
|
+
clientX,
|
|
3561
|
+
clientY
|
|
3562
|
+
} = event;
|
|
3563
|
+
const rect = element.getBoundingClientRect();
|
|
3564
|
+
const x = clientX - rect.left;
|
|
3565
|
+
const y = clientY - rect.top;
|
|
3566
|
+
setPosition({
|
|
3567
|
+
x,
|
|
3568
|
+
y
|
|
3569
|
+
});
|
|
3570
|
+
setIsActive(true);
|
|
3571
|
+
};
|
|
3572
|
+
const mouseMoved = (event) => {
|
|
3573
|
+
const {
|
|
3574
|
+
clientX,
|
|
3575
|
+
clientY
|
|
3576
|
+
} = event;
|
|
3577
|
+
const rect = element.getBoundingClientRect();
|
|
3578
|
+
const x = clientX - rect.left;
|
|
3579
|
+
const y = clientY - rect.top;
|
|
3580
|
+
setPosition({
|
|
3581
|
+
x,
|
|
3582
|
+
y
|
|
3583
|
+
});
|
|
3584
|
+
};
|
|
3585
|
+
const mouseOut = () => {
|
|
3586
|
+
setIsActive(false);
|
|
3587
|
+
setPosition(null);
|
|
3588
|
+
};
|
|
3589
|
+
element.addEventListener("touchstart", touchStarted);
|
|
3590
|
+
element.addEventListener("touchmove", touchMoved);
|
|
3591
|
+
element.addEventListener("touchend", touchEnded);
|
|
3592
|
+
element.addEventListener("touchcancel", touchEnded);
|
|
3593
|
+
element.addEventListener("mouseover", mouseOver);
|
|
3594
|
+
element.addEventListener("mousemove", mouseMoved);
|
|
3595
|
+
element.addEventListener("mouseout", mouseOut);
|
|
3596
|
+
return () => {
|
|
3597
|
+
element.removeEventListener("touchstart", touchStarted);
|
|
3598
|
+
element.removeEventListener("touchmove", touchMoved);
|
|
3599
|
+
element.removeEventListener("touchend", mouseOut);
|
|
3600
|
+
element.removeEventListener("touchcancel", mouseOut);
|
|
3601
|
+
element.removeEventListener("mouseover", touchStarted);
|
|
3602
|
+
element.removeEventListener("mousemove", mouseMoved);
|
|
3603
|
+
element.removeEventListener("mouseout", mouseOut);
|
|
3604
|
+
};
|
|
3605
|
+
}, []);
|
|
3606
|
+
return {
|
|
3607
|
+
touchOrHoverRef: ref,
|
|
3608
|
+
touchOrHoverIsActive: isActive,
|
|
3609
|
+
touchRect,
|
|
3610
|
+
positionInTarget: position
|
|
3611
|
+
};
|
|
3612
|
+
}
|
|
3441
3613
|
exports2.AdSlot = AdSlot;
|
|
3442
3614
|
exports2.ArrowButton = ArrowButton;
|
|
3443
3615
|
exports2.Button = Button;
|
|
@@ -3450,6 +3622,7 @@
|
|
|
3450
3622
|
exports2.Container = Container;
|
|
3451
3623
|
exports2.ControlChange = ControlChange;
|
|
3452
3624
|
exports2.Dropdown = Dropdown;
|
|
3625
|
+
exports2.FirstPastThePostWaffle = FirstPastThePostWaffle;
|
|
3453
3626
|
exports2.GradientIcon = GradientIcon;
|
|
3454
3627
|
exports2.GridType = GridType;
|
|
3455
3628
|
exports2.InfoButton = InfoButton;
|
|
@@ -3475,8 +3648,12 @@
|
|
|
3475
3648
|
exports2.Table = Table;
|
|
3476
3649
|
exports2.Ticker = Ticker;
|
|
3477
3650
|
exports2.Tooltip = Tooltip;
|
|
3478
|
-
exports2.TooltipType = TooltipType;
|
|
3479
3651
|
exports2.ToplineResult = ToplineResult;
|
|
3652
|
+
exports2.Waffle = Waffle;
|
|
3653
|
+
exports2.WaffleType = WaffleType;
|
|
3654
|
+
exports2.useContainerSize = useContainerSize;
|
|
3655
|
+
exports2.useTouchOrHover = useTouchOrHover;
|
|
3656
|
+
exports2.useWindowSize = useWindowSize;
|
|
3480
3657
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
3481
3658
|
});
|
|
3482
3659
|
//# sourceMappingURL=interactive-component-library.umd.cjs.map
|