@synnaxlabs/pluto 0.50.0 → 0.50.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-eavjaVoD.js → Animated-BbeJdao0.js} +2 -2
- package/dist/{Animated-DxBr38YY.js → Animated-C4xrEVd-.js} +3 -3
- package/dist/{Animated-DpzwlYqX.cjs → Animated-Dvm2k_z_.cjs} +1 -1
- package/dist/{Animated-Bm-WM4BW.cjs → Animated-umWjgTzy.cjs} +1 -1
- package/dist/{Button-Cj2hR9EM.cjs → Button-BSek5HG5.cjs} +1 -1
- package/dist/{Button-DulIBpNI.js → Button-DLtxKGH5.js} +4 -4
- package/dist/{Dialog-DJJQBUgw.cjs → Dialog-BpjxXSmw.cjs} +1 -1
- package/dist/{Dialog-CwTHvHHD.js → Dialog-BspO7uo8.js} +1 -1
- package/dist/{Haul-CofQrOeX.js → Haul-DBy-2ds_.js} +1 -1
- package/dist/{Haul-gTF4QDh3.cjs → Haul-WgPKptr9.cjs} +1 -1
- package/dist/{Items-DjAwxhhi.cjs → Items-07R286kW.cjs} +2 -2
- package/dist/{Items-B5aeU-Pt.js → Items-CX11yLMf.js} +7 -5
- package/dist/{Menu-BqfIul2o.cjs → Menu-58O-OOPJ.cjs} +1 -1
- package/dist/{Menu-Bjfeoaln.js → Menu-GBo3ayoP.js} +4 -4
- package/dist/Provider-BA3zQVbv.cjs +1 -0
- package/dist/{Provider-BoQtgQtU.js → Provider-BkxUzTWS.js} +54 -51
- package/dist/Tags-DWsEZD9t.cjs +1 -0
- package/dist/{Tags-C38F7I5z.js → Tags-V7sNuGZv.js} +41 -36
- package/dist/{Text-IFQH97iK.cjs → Text-DW5FpCk9.cjs} +1 -1
- package/dist/{Text-TzKJ38En.js → Text-XeD58Fq8.js} +444 -439
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/{eraser-DZxY0pWe.cjs → eraser-Bocga8Eb.cjs} +1 -1
- package/dist/{eraser-Bd14L_5k.js → eraser-DuAfpO0P.js} +1 -1
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +6 -6
- package/dist/{external-D4rp1QBE.cjs → external-5_uHky7w.cjs} +1 -1
- package/dist/{external-6HkYP0wd.js → external-B-JsNciM.js} +4 -4
- package/dist/{external-BIW55htp.cjs → external-B9omdiDK.cjs} +1 -1
- package/dist/{external-CkwpcNCW.cjs → external-BIbdeWQE.cjs} +1 -1
- package/dist/{external-D7qXEQQM.cjs → external-BRA_zA83.cjs} +1 -1
- package/dist/{external-BWI-FZRf.cjs → external-Bjh6lsVm.cjs} +1 -1
- package/dist/{external-DPow1FDR.cjs → external-BwRkgEyo.cjs} +1 -1
- package/dist/{external-BKkDVUP_.js → external-CLQdSLv0.js} +2 -2
- package/dist/{external-CVzhqlPH.js → external-CdHyPhLI.js} +1 -1
- package/dist/{external-DKc3PiyN.js → external-Ct1k30Nd.js} +3 -3
- package/dist/{external-DlHNhR1y.cjs → external-Ct2A_YCT.cjs} +1 -1
- package/dist/{external-Bl8zTvKt.js → external-DNbIzfVy.js} +43 -42
- package/dist/{external-CUHCzUJE.cjs → external-DT82RBon.cjs} +1 -1
- package/dist/{external-gDa9Z0SY.js → external-DXWEyk9d.js} +2 -2
- package/dist/{external-BU5fnKG8.cjs → external-DojNoICL.cjs} +1 -1
- package/dist/{external-DqaHmzvp.js → external-Dp5OkGYV.js} +5 -5
- package/dist/{external-BoAcV4dI.js → external-DxmgAHkn.js} +3 -3
- package/dist/{external-DAmwuDsu.cjs → external-DyTk_hS7.cjs} +1 -1
- package/dist/{external-B0R_yw6F.cjs → external-PXU0gc_j.cjs} +1 -1
- package/dist/{external-BsdKmL37.js → external-g_vt4Lku.js} +10 -10
- package/dist/{external-DCZMzNZX.js → external-sYHm9OG8.js} +3 -3
- package/dist/{external-DrcMI5oa.js → external-xfkS0zGI.js} +8 -8
- package/dist/{fontString-BtjO8Met.js → fontString-CSWLcJcC.js} +1 -1
- package/dist/{fontString-CeR_vHX_.cjs → fontString-TocVNWmy.cjs} +1 -1
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/{hooks-Ddqh5NVY.js → hooks-BeSuo_di.js} +1 -1
- package/dist/{hooks-Dxvxse16.cjs → hooks-Eb94kuDd.cjs} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +2718 -2713
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/pluto.css +1 -1
- package/dist/{provider-CfFukcDe.js → provider-D0K9E52u.js} +88 -79
- package/dist/{provider-BmDwHwF4.cjs → provider-DksyuJua.cjs} +6 -6
- package/dist/src/flux/list.d.ts.map +1 -1
- package/dist/src/form/useField.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts +1 -0
- package/dist/src/icon/registry.d.ts.map +1 -1
- package/dist/src/list/Frame.d.ts.map +1 -1
- package/dist/src/select/Frame.d.ts.map +1 -1
- package/dist/src/theming/aether/provider.d.ts +63 -0
- package/dist/src/theming/aether/provider.d.ts.map +1 -1
- package/dist/src/theming/base/theme.d.ts +39 -0
- package/dist/src/theming/base/theme.d.ts.map +1 -1
- package/dist/src/theming/css.d.ts.map +1 -1
- package/dist/src/tree/external.d.ts +1 -0
- package/dist/src/tree/external.d.ts.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/theme.css +135 -123
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/{value-C-e017qO.js → value-BmuhX6zs.js} +3 -3
- package/dist/{value-0g5Cxim9.cjs → value-CZfzRi_x.cjs} +1 -1
- package/package.json +7 -7
- package/dist/Provider-CKROy_xK.cjs +0 -1
- package/dist/Tags-B3m_Kzbp.cjs +0 -1
package/dist/theme.css
CHANGED
|
@@ -379,6 +379,9 @@
|
|
|
379
379
|
--pluto-text-color: #050505;
|
|
380
380
|
--pluto-text-color-rgb: 5, 5, 5;
|
|
381
381
|
--pluto-text-on-primary: #fefefe;
|
|
382
|
+
--pluto-primary-text: #3b82f6;
|
|
383
|
+
--pluto-error-text: #ef4444;
|
|
384
|
+
--pluto-warning-text: #f59e0b;
|
|
382
385
|
--pluto-border-color: #e4e4e4;
|
|
383
386
|
--pluto-base-size: 6px;
|
|
384
387
|
--pluto-border-radius: 3px;
|
|
@@ -518,46 +521,46 @@
|
|
|
518
521
|
--pluto-dark-gray-l2-15: #15151526;
|
|
519
522
|
--pluto-dark-gray-l2-10: #15151519;
|
|
520
523
|
--pluto-dark-gray-l2-5: #1515150c;
|
|
521
|
-
--pluto-dark-gray-l3: #
|
|
522
|
-
--pluto-dark-gray-l3-95: #
|
|
523
|
-
--pluto-dark-gray-l3-90: #
|
|
524
|
-
--pluto-dark-gray-l3-85: #
|
|
525
|
-
--pluto-dark-gray-l3-80: #
|
|
526
|
-
--pluto-dark-gray-l3-75: #
|
|
527
|
-
--pluto-dark-gray-l3-70: #
|
|
528
|
-
--pluto-dark-gray-l3-65: #
|
|
529
|
-
--pluto-dark-gray-l3-60: #
|
|
530
|
-
--pluto-dark-gray-l3-55: #
|
|
531
|
-
--pluto-dark-gray-l3-50: #
|
|
532
|
-
--pluto-dark-gray-l3-45: #
|
|
533
|
-
--pluto-dark-gray-l3-40: #
|
|
534
|
-
--pluto-dark-gray-l3-35: #
|
|
535
|
-
--pluto-dark-gray-l3-30: #
|
|
536
|
-
--pluto-dark-gray-l3-25: #
|
|
537
|
-
--pluto-dark-gray-l3-20: #
|
|
538
|
-
--pluto-dark-gray-l3-15: #
|
|
539
|
-
--pluto-dark-gray-l3-10: #
|
|
540
|
-
--pluto-dark-gray-l3-5: #
|
|
541
|
-
--pluto-dark-gray-l4: #
|
|
542
|
-
--pluto-dark-gray-l4-95: #
|
|
543
|
-
--pluto-dark-gray-l4-90: #
|
|
544
|
-
--pluto-dark-gray-l4-85: #
|
|
545
|
-
--pluto-dark-gray-l4-80: #
|
|
546
|
-
--pluto-dark-gray-l4-75: #
|
|
547
|
-
--pluto-dark-gray-l4-70: #
|
|
548
|
-
--pluto-dark-gray-l4-65: #
|
|
549
|
-
--pluto-dark-gray-l4-60: #
|
|
550
|
-
--pluto-dark-gray-l4-55: #
|
|
551
|
-
--pluto-dark-gray-l4-50: #
|
|
552
|
-
--pluto-dark-gray-l4-45: #
|
|
553
|
-
--pluto-dark-gray-l4-40: #
|
|
554
|
-
--pluto-dark-gray-l4-35: #
|
|
555
|
-
--pluto-dark-gray-l4-30: #
|
|
556
|
-
--pluto-dark-gray-l4-25: #
|
|
557
|
-
--pluto-dark-gray-l4-20: #
|
|
558
|
-
--pluto-dark-gray-l4-15: #
|
|
559
|
-
--pluto-dark-gray-l4-10: #
|
|
560
|
-
--pluto-dark-gray-l4-5: #
|
|
524
|
+
--pluto-dark-gray-l3: #202020;
|
|
525
|
+
--pluto-dark-gray-l3-95: #202020f2;
|
|
526
|
+
--pluto-dark-gray-l3-90: #202020e5;
|
|
527
|
+
--pluto-dark-gray-l3-85: #202020d8;
|
|
528
|
+
--pluto-dark-gray-l3-80: #202020cc;
|
|
529
|
+
--pluto-dark-gray-l3-75: #202020bf;
|
|
530
|
+
--pluto-dark-gray-l3-70: #202020b2;
|
|
531
|
+
--pluto-dark-gray-l3-65: #202020a5;
|
|
532
|
+
--pluto-dark-gray-l3-60: #20202099;
|
|
533
|
+
--pluto-dark-gray-l3-55: #2020208c;
|
|
534
|
+
--pluto-dark-gray-l3-50: #2020207f;
|
|
535
|
+
--pluto-dark-gray-l3-45: #20202072;
|
|
536
|
+
--pluto-dark-gray-l3-40: #20202066;
|
|
537
|
+
--pluto-dark-gray-l3-35: #20202059;
|
|
538
|
+
--pluto-dark-gray-l3-30: #2020204c;
|
|
539
|
+
--pluto-dark-gray-l3-25: #2020203f;
|
|
540
|
+
--pluto-dark-gray-l3-20: #20202033;
|
|
541
|
+
--pluto-dark-gray-l3-15: #20202026;
|
|
542
|
+
--pluto-dark-gray-l3-10: #20202019;
|
|
543
|
+
--pluto-dark-gray-l3-5: #2020200c;
|
|
544
|
+
--pluto-dark-gray-l4: #272727;
|
|
545
|
+
--pluto-dark-gray-l4-95: #272727f2;
|
|
546
|
+
--pluto-dark-gray-l4-90: #272727e5;
|
|
547
|
+
--pluto-dark-gray-l4-85: #272727d8;
|
|
548
|
+
--pluto-dark-gray-l4-80: #272727cc;
|
|
549
|
+
--pluto-dark-gray-l4-75: #272727bf;
|
|
550
|
+
--pluto-dark-gray-l4-70: #272727b2;
|
|
551
|
+
--pluto-dark-gray-l4-65: #272727a5;
|
|
552
|
+
--pluto-dark-gray-l4-60: #27272799;
|
|
553
|
+
--pluto-dark-gray-l4-55: #2727278c;
|
|
554
|
+
--pluto-dark-gray-l4-50: #2727277f;
|
|
555
|
+
--pluto-dark-gray-l4-45: #27272772;
|
|
556
|
+
--pluto-dark-gray-l4-40: #27272766;
|
|
557
|
+
--pluto-dark-gray-l4-35: #27272759;
|
|
558
|
+
--pluto-dark-gray-l4-30: #2727274c;
|
|
559
|
+
--pluto-dark-gray-l4-25: #2727273f;
|
|
560
|
+
--pluto-dark-gray-l4-20: #27272733;
|
|
561
|
+
--pluto-dark-gray-l4-15: #27272726;
|
|
562
|
+
--pluto-dark-gray-l4-10: #27272719;
|
|
563
|
+
--pluto-dark-gray-l4-5: #2727270c;
|
|
561
564
|
--pluto-dark-gray-l5: #3b3b3b;
|
|
562
565
|
--pluto-dark-gray-l5-95: #3b3b3bf2;
|
|
563
566
|
--pluto-dark-gray-l5-90: #3b3b3be5;
|
|
@@ -777,7 +780,10 @@
|
|
|
777
780
|
--pluto-dark-text-color: #fafafa;
|
|
778
781
|
--pluto-dark-text-color-rgb: 250, 250, 250;
|
|
779
782
|
--pluto-dark-text-on-primary: #fafafa;
|
|
780
|
-
--pluto-dark-
|
|
783
|
+
--pluto-dark-primary-text: #93c5fd;
|
|
784
|
+
--pluto-dark-error-text: #fca5a5;
|
|
785
|
+
--pluto-dark-warning-text: #fcd34d;
|
|
786
|
+
--pluto-dark-border-color: #272727;
|
|
781
787
|
--pluto-dark-base-size: 6px;
|
|
782
788
|
--pluto-dark-border-radius: 3px;
|
|
783
789
|
--pluto-dark-border-width: 1px;
|
|
@@ -920,46 +926,46 @@
|
|
|
920
926
|
--pluto-gray-l2-15: #15151526;
|
|
921
927
|
--pluto-gray-l2-10: #15151519;
|
|
922
928
|
--pluto-gray-l2-5: #1515150c;
|
|
923
|
-
--pluto-gray-l3: #
|
|
924
|
-
--pluto-gray-l3-95: #
|
|
925
|
-
--pluto-gray-l3-90: #
|
|
926
|
-
--pluto-gray-l3-85: #
|
|
927
|
-
--pluto-gray-l3-80: #
|
|
928
|
-
--pluto-gray-l3-75: #
|
|
929
|
-
--pluto-gray-l3-70: #
|
|
930
|
-
--pluto-gray-l3-65: #
|
|
931
|
-
--pluto-gray-l3-60: #
|
|
932
|
-
--pluto-gray-l3-55: #
|
|
933
|
-
--pluto-gray-l3-50: #
|
|
934
|
-
--pluto-gray-l3-45: #
|
|
935
|
-
--pluto-gray-l3-40: #
|
|
936
|
-
--pluto-gray-l3-35: #
|
|
937
|
-
--pluto-gray-l3-30: #
|
|
938
|
-
--pluto-gray-l3-25: #
|
|
939
|
-
--pluto-gray-l3-20: #
|
|
940
|
-
--pluto-gray-l3-15: #
|
|
941
|
-
--pluto-gray-l3-10: #
|
|
942
|
-
--pluto-gray-l3-5: #
|
|
943
|
-
--pluto-gray-l4: #
|
|
944
|
-
--pluto-gray-l4-95: #
|
|
945
|
-
--pluto-gray-l4-90: #
|
|
946
|
-
--pluto-gray-l4-85: #
|
|
947
|
-
--pluto-gray-l4-80: #
|
|
948
|
-
--pluto-gray-l4-75: #
|
|
949
|
-
--pluto-gray-l4-70: #
|
|
950
|
-
--pluto-gray-l4-65: #
|
|
951
|
-
--pluto-gray-l4-60: #
|
|
952
|
-
--pluto-gray-l4-55: #
|
|
953
|
-
--pluto-gray-l4-50: #
|
|
954
|
-
--pluto-gray-l4-45: #
|
|
955
|
-
--pluto-gray-l4-40: #
|
|
956
|
-
--pluto-gray-l4-35: #
|
|
957
|
-
--pluto-gray-l4-30: #
|
|
958
|
-
--pluto-gray-l4-25: #
|
|
959
|
-
--pluto-gray-l4-20: #
|
|
960
|
-
--pluto-gray-l4-15: #
|
|
961
|
-
--pluto-gray-l4-10: #
|
|
962
|
-
--pluto-gray-l4-5: #
|
|
929
|
+
--pluto-gray-l3: #202020;
|
|
930
|
+
--pluto-gray-l3-95: #202020f2;
|
|
931
|
+
--pluto-gray-l3-90: #202020e5;
|
|
932
|
+
--pluto-gray-l3-85: #202020d8;
|
|
933
|
+
--pluto-gray-l3-80: #202020cc;
|
|
934
|
+
--pluto-gray-l3-75: #202020bf;
|
|
935
|
+
--pluto-gray-l3-70: #202020b2;
|
|
936
|
+
--pluto-gray-l3-65: #202020a5;
|
|
937
|
+
--pluto-gray-l3-60: #20202099;
|
|
938
|
+
--pluto-gray-l3-55: #2020208c;
|
|
939
|
+
--pluto-gray-l3-50: #2020207f;
|
|
940
|
+
--pluto-gray-l3-45: #20202072;
|
|
941
|
+
--pluto-gray-l3-40: #20202066;
|
|
942
|
+
--pluto-gray-l3-35: #20202059;
|
|
943
|
+
--pluto-gray-l3-30: #2020204c;
|
|
944
|
+
--pluto-gray-l3-25: #2020203f;
|
|
945
|
+
--pluto-gray-l3-20: #20202033;
|
|
946
|
+
--pluto-gray-l3-15: #20202026;
|
|
947
|
+
--pluto-gray-l3-10: #20202019;
|
|
948
|
+
--pluto-gray-l3-5: #2020200c;
|
|
949
|
+
--pluto-gray-l4: #272727;
|
|
950
|
+
--pluto-gray-l4-95: #272727f2;
|
|
951
|
+
--pluto-gray-l4-90: #272727e5;
|
|
952
|
+
--pluto-gray-l4-85: #272727d8;
|
|
953
|
+
--pluto-gray-l4-80: #272727cc;
|
|
954
|
+
--pluto-gray-l4-75: #272727bf;
|
|
955
|
+
--pluto-gray-l4-70: #272727b2;
|
|
956
|
+
--pluto-gray-l4-65: #272727a5;
|
|
957
|
+
--pluto-gray-l4-60: #27272799;
|
|
958
|
+
--pluto-gray-l4-55: #2727278c;
|
|
959
|
+
--pluto-gray-l4-50: #2727277f;
|
|
960
|
+
--pluto-gray-l4-45: #27272772;
|
|
961
|
+
--pluto-gray-l4-40: #27272766;
|
|
962
|
+
--pluto-gray-l4-35: #27272759;
|
|
963
|
+
--pluto-gray-l4-30: #2727274c;
|
|
964
|
+
--pluto-gray-l4-25: #2727273f;
|
|
965
|
+
--pluto-gray-l4-20: #27272733;
|
|
966
|
+
--pluto-gray-l4-15: #27272726;
|
|
967
|
+
--pluto-gray-l4-10: #27272719;
|
|
968
|
+
--pluto-gray-l4-5: #2727270c;
|
|
963
969
|
--pluto-gray-l5: #3b3b3b;
|
|
964
970
|
--pluto-gray-l5-95: #3b3b3bf2;
|
|
965
971
|
--pluto-gray-l5-90: #3b3b3be5;
|
|
@@ -1179,7 +1185,10 @@
|
|
|
1179
1185
|
--pluto-text-color: #fafafa;
|
|
1180
1186
|
--pluto-text-color-rgb: 250, 250, 250;
|
|
1181
1187
|
--pluto-text-on-primary: #fafafa;
|
|
1182
|
-
--pluto-
|
|
1188
|
+
--pluto-primary-text: #93c5fd;
|
|
1189
|
+
--pluto-error-text: #fca5a5;
|
|
1190
|
+
--pluto-warning-text: #fcd34d;
|
|
1191
|
+
--pluto-border-color: #272727;
|
|
1183
1192
|
--pluto-base-size: 6px;
|
|
1184
1193
|
--pluto-border-radius: 3px;
|
|
1185
1194
|
--pluto-border-width: 1px;
|
|
@@ -1318,46 +1327,46 @@
|
|
|
1318
1327
|
--pluto-dark-gray-l2-15: #15151526;
|
|
1319
1328
|
--pluto-dark-gray-l2-10: #15151519;
|
|
1320
1329
|
--pluto-dark-gray-l2-5: #1515150c;
|
|
1321
|
-
--pluto-dark-gray-l3: #
|
|
1322
|
-
--pluto-dark-gray-l3-95: #
|
|
1323
|
-
--pluto-dark-gray-l3-90: #
|
|
1324
|
-
--pluto-dark-gray-l3-85: #
|
|
1325
|
-
--pluto-dark-gray-l3-80: #
|
|
1326
|
-
--pluto-dark-gray-l3-75: #
|
|
1327
|
-
--pluto-dark-gray-l3-70: #
|
|
1328
|
-
--pluto-dark-gray-l3-65: #
|
|
1329
|
-
--pluto-dark-gray-l3-60: #
|
|
1330
|
-
--pluto-dark-gray-l3-55: #
|
|
1331
|
-
--pluto-dark-gray-l3-50: #
|
|
1332
|
-
--pluto-dark-gray-l3-45: #
|
|
1333
|
-
--pluto-dark-gray-l3-40: #
|
|
1334
|
-
--pluto-dark-gray-l3-35: #
|
|
1335
|
-
--pluto-dark-gray-l3-30: #
|
|
1336
|
-
--pluto-dark-gray-l3-25: #
|
|
1337
|
-
--pluto-dark-gray-l3-20: #
|
|
1338
|
-
--pluto-dark-gray-l3-15: #
|
|
1339
|
-
--pluto-dark-gray-l3-10: #
|
|
1340
|
-
--pluto-dark-gray-l3-5: #
|
|
1341
|
-
--pluto-dark-gray-l4: #
|
|
1342
|
-
--pluto-dark-gray-l4-95: #
|
|
1343
|
-
--pluto-dark-gray-l4-90: #
|
|
1344
|
-
--pluto-dark-gray-l4-85: #
|
|
1345
|
-
--pluto-dark-gray-l4-80: #
|
|
1346
|
-
--pluto-dark-gray-l4-75: #
|
|
1347
|
-
--pluto-dark-gray-l4-70: #
|
|
1348
|
-
--pluto-dark-gray-l4-65: #
|
|
1349
|
-
--pluto-dark-gray-l4-60: #
|
|
1350
|
-
--pluto-dark-gray-l4-55: #
|
|
1351
|
-
--pluto-dark-gray-l4-50: #
|
|
1352
|
-
--pluto-dark-gray-l4-45: #
|
|
1353
|
-
--pluto-dark-gray-l4-40: #
|
|
1354
|
-
--pluto-dark-gray-l4-35: #
|
|
1355
|
-
--pluto-dark-gray-l4-30: #
|
|
1356
|
-
--pluto-dark-gray-l4-25: #
|
|
1357
|
-
--pluto-dark-gray-l4-20: #
|
|
1358
|
-
--pluto-dark-gray-l4-15: #
|
|
1359
|
-
--pluto-dark-gray-l4-10: #
|
|
1360
|
-
--pluto-dark-gray-l4-5: #
|
|
1330
|
+
--pluto-dark-gray-l3: #202020;
|
|
1331
|
+
--pluto-dark-gray-l3-95: #202020f2;
|
|
1332
|
+
--pluto-dark-gray-l3-90: #202020e5;
|
|
1333
|
+
--pluto-dark-gray-l3-85: #202020d8;
|
|
1334
|
+
--pluto-dark-gray-l3-80: #202020cc;
|
|
1335
|
+
--pluto-dark-gray-l3-75: #202020bf;
|
|
1336
|
+
--pluto-dark-gray-l3-70: #202020b2;
|
|
1337
|
+
--pluto-dark-gray-l3-65: #202020a5;
|
|
1338
|
+
--pluto-dark-gray-l3-60: #20202099;
|
|
1339
|
+
--pluto-dark-gray-l3-55: #2020208c;
|
|
1340
|
+
--pluto-dark-gray-l3-50: #2020207f;
|
|
1341
|
+
--pluto-dark-gray-l3-45: #20202072;
|
|
1342
|
+
--pluto-dark-gray-l3-40: #20202066;
|
|
1343
|
+
--pluto-dark-gray-l3-35: #20202059;
|
|
1344
|
+
--pluto-dark-gray-l3-30: #2020204c;
|
|
1345
|
+
--pluto-dark-gray-l3-25: #2020203f;
|
|
1346
|
+
--pluto-dark-gray-l3-20: #20202033;
|
|
1347
|
+
--pluto-dark-gray-l3-15: #20202026;
|
|
1348
|
+
--pluto-dark-gray-l3-10: #20202019;
|
|
1349
|
+
--pluto-dark-gray-l3-5: #2020200c;
|
|
1350
|
+
--pluto-dark-gray-l4: #272727;
|
|
1351
|
+
--pluto-dark-gray-l4-95: #272727f2;
|
|
1352
|
+
--pluto-dark-gray-l4-90: #272727e5;
|
|
1353
|
+
--pluto-dark-gray-l4-85: #272727d8;
|
|
1354
|
+
--pluto-dark-gray-l4-80: #272727cc;
|
|
1355
|
+
--pluto-dark-gray-l4-75: #272727bf;
|
|
1356
|
+
--pluto-dark-gray-l4-70: #272727b2;
|
|
1357
|
+
--pluto-dark-gray-l4-65: #272727a5;
|
|
1358
|
+
--pluto-dark-gray-l4-60: #27272799;
|
|
1359
|
+
--pluto-dark-gray-l4-55: #2727278c;
|
|
1360
|
+
--pluto-dark-gray-l4-50: #2727277f;
|
|
1361
|
+
--pluto-dark-gray-l4-45: #27272772;
|
|
1362
|
+
--pluto-dark-gray-l4-40: #27272766;
|
|
1363
|
+
--pluto-dark-gray-l4-35: #27272759;
|
|
1364
|
+
--pluto-dark-gray-l4-30: #2727274c;
|
|
1365
|
+
--pluto-dark-gray-l4-25: #2727273f;
|
|
1366
|
+
--pluto-dark-gray-l4-20: #27272733;
|
|
1367
|
+
--pluto-dark-gray-l4-15: #27272726;
|
|
1368
|
+
--pluto-dark-gray-l4-10: #27272719;
|
|
1369
|
+
--pluto-dark-gray-l4-5: #2727270c;
|
|
1361
1370
|
--pluto-dark-gray-l5: #3b3b3b;
|
|
1362
1371
|
--pluto-dark-gray-l5-95: #3b3b3bf2;
|
|
1363
1372
|
--pluto-dark-gray-l5-90: #3b3b3be5;
|
|
@@ -1577,7 +1586,10 @@
|
|
|
1577
1586
|
--pluto-dark-text-color: #fafafa;
|
|
1578
1587
|
--pluto-dark-text-color-rgb: 250, 250, 250;
|
|
1579
1588
|
--pluto-dark-text-on-primary: #fafafa;
|
|
1580
|
-
--pluto-dark-
|
|
1589
|
+
--pluto-dark-primary-text: #93c5fd;
|
|
1590
|
+
--pluto-dark-error-text: #fca5a5;
|
|
1591
|
+
--pluto-dark-warning-text: #fcd34d;
|
|
1592
|
+
--pluto-dark-border-color: #272727;
|
|
1581
1593
|
--pluto-dark-base-size: 6px;
|
|
1582
1594
|
--pluto-dark-border-radius: 3px;
|
|
1583
1595
|
--pluto-dark-border-width: 1px;
|
package/dist/theming.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./Provider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./Provider-BA3zQVbv.cjs");const e=require("./external-DojNoICL.cjs");exports.Theming=e.external;
|
package/dist/theming.js
CHANGED
package/dist/tree.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-Bjh6lsVm.cjs");exports.Tree=e.external;
|
package/dist/tree.js
CHANGED
package/dist/triggers.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-BIbdeWQE.cjs");exports.Triggers=e.external;
|
package/dist/triggers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { q as jn, $ as bs, H as Jr, G as Da, C as pe, s as Na, k as Se, w as B, v as fe, W as tt, x as vs, h as Oe, g as gn, y as ei, z as Ia, L as q, j as ti, p as Ya, u as me, B as pt, U as Ss, D as ws, E as Za, F as Ba } from "./provider-
|
|
1
|
+
import { q as jn, $ as bs, H as Jr, G as Da, C as pe, s as Na, k as Se, w as B, v as fe, W as tt, x as vs, h as Oe, g as gn, y as ei, z as Ia, L as q, j as ti, p as Ya, u as me, B as pt, U as Ss, D as ws, E as Za, F as Ba } from "./provider-D0K9E52u.js";
|
|
2
2
|
import { d as yn, b as ni, h as j, j as Ua, V as xt, t as xs, I as C, R as H, e as Z, Z as g, k as ee, g as E, p as si, o as nt, l as Fa, $ as ri, q as Tt, Q as bn, T as te, O as ii, m as ai, N as Fe, s as $a, F as oi, w as $t, A as f, u as li, r as Ha, E as p, M as ie, S as Ks, v as he, z as qa, _ as vn } from "./css-BkBrZtKZ.js";
|
|
3
3
|
import ja, { z as h } from "zod";
|
|
4
|
-
import { u as Et, G as za, C as X } from "./eraser-
|
|
5
|
-
import { f as ft } from "./fontString-
|
|
4
|
+
import { u as Et, G as za, C as X } from "./eraser-DuAfpO0P.js";
|
|
5
|
+
import { f as ft } from "./fontString-CSWLcJcC.js";
|
|
6
6
|
import { c as Wa, l as Ts, d as Nn } from "./types-B5-Tni3G.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { d as Qs } from "./dimensions-qj2CkPTy.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const g=require("./provider-BmDwHwF4.cjs"),r=require("./css-D3NdC2sx.cjs"),d=require("zod"),Z=require("./eraser-DZxY0pWe.cjs"),Ke=require("./fontString-CeR_vHX_.cjs"),pe=require("./types-C0tUDfsz.cjs");require("react");const Ks=require("./dimensions-C7b02rFi.cjs");class Mr{entries=new Map;setListeners=new Map;deleteListeners=new Map;handleError;equal;constructor(e,t=()=>!1){this.handleError=e,this.equal=t}setOne(e,t,s,i){const o=this.entries.get(t),a=pe.executeSetter(s,o);if(!(a==null||o!=null&&this.equal(a,o,t)))return this.entries.set(t,a),this.notifySet(e,t,a,i),()=>{o===void 0?(this.entries.delete(t),this.notifyDelete(e,t)):(this.entries.set(t,o),this.notifySet(e,t,o,i))}}set(e,t,s,i){const o=[];if(Array.isArray(t))t.forEach(a=>{const l=this.setOne(e,a.key,a,s);l!=null&&o.push(l)});else if(typeof t=="object"&&"key"in t){const a=t,l=this.setOne(e,a.key,a,s);l!=null&&o.push(l)}else{const a=this.setOne(e,t,s,i);a!=null&&o.push(a)}return()=>o.reverse().forEach(a=>a())}get(e){return typeof e=="function"?Array.from(this.entries.values()).filter(e):Array.isArray(e)?e.map(t=>this.entries.get(t)).filter(t=>t!=null):this.entries.get(e)}list(){return Array.from(this.entries.values())}has(e){return Array.isArray(e)?e.every(t=>this.entries.has(t)):this.entries.has(e)}delete(e,t,s){const i=[];return typeof t=="function"?this.entries.forEach((o,a)=>{t(o,a)&&i.push({key:a,value:o})}):r.du.toArray(t).forEach(o=>{const a=this.entries.get(o);i.push({key:o,value:a})}),i.forEach(({key:o})=>{this.entries.delete(o),this.notifyDelete(e,o)}),()=>i.forEach(({key:o,value:a})=>{a!=null&&(this.entries.set(o,a),this.notifySet(e,o,a,s))})}clear(){this.entries.clear()}onSet(e,t,s){return this.setListeners.set(t,{scope:e,key:s}),()=>this.setListeners.delete(t)}onDelete(e,t,s){return this.deleteListeners.set(t,{scope:e,key:s}),()=>this.deleteListeners.delete(t)}notifySet(e,t,s,i){this.setListeners.forEach((o,a)=>{const l=o.key==null||o.key===t,u=o.scope!==e;l&&u&&this.handleError(async()=>await a(s,i),"Failed to notify set listener")})}notifyDelete(e,t){this.deleteListeners.forEach((s,i)=>{const o=s.key==null||s.key===t,a=s.scope!==e;o&&a&&this.handleError(async()=>await i(t),"Failed to notify delete listener")})}scope(e){return{set:(t,s,i)=>this.set(e,t,s,i),get:(t=>this.get(t)),list:()=>this.list(),has:t=>this.has(t),delete:(t,s)=>this.delete(e,t,s),onSet:(t,s)=>this.onSet(e,t,s),onDelete:(t,s)=>this.onDelete(e,t,s)}}}const Zr=(n,e)=>Object.fromEntries(Object.entries(n).map(([t,{equal:s}])=>[t,new Mr(e,s)])),_n=(n,e)=>Object.fromEntries(Object.entries(n).map(([t])=>[t,n[t].scope(e)])),$o=(n,e,t)=>n.set(e,s=>s==null?void 0:{...s,...t}),Fo=(n,e)=>{const t=n.includes("delete"),s=e.includes("delete");return t&&!s?-1:!t&&s?1:0},qo=async({openStreamer:n,storeConfig:e,handleError:t,client:s,store:i})=>{const o=Object.values(e),a=r.bu.unique(o.flatMap(({listeners:f})=>f.map(({channel:p})=>p))),l={};o.forEach(({listeners:f})=>f.forEach(p=>{const{channel:y}=p;l[y]=[...l[y]||[],p]}));const u=await g.jA.HardenedStreamer.open(n,a),c=new g.jA.ObservableStreamer(u),h=f=>{const p=[...f.uniqueNames];p.sort(Fo),t(async()=>{for(const y of p){const S=f.get(y),b=l[y];if(b!=null)for(const{onChange:E,schema:x}of b)await t(async()=>{let A;S.dataType.equals(r.f.JSON)?A=S.parseJSON(x):A=Array.from(S).map(C=>x.parse(C));for(const C of A)await t(()=>E({changed:C,client:s,store:i}),`Failed to handle streamer change for ${y}`,g.$n)},`Failed to parse streamer change for ${y}`)}},`Failed to handle streamer change for ${r.cl.naturalLanguageJoin(p)}`)};return c.onChange(h),c.close.bind(c)};class Dr{store;streamCloser=null;client;constructor({client:e,openStreamer:t,storeConfig:s,handleError:i,handleAsyncError:o}){this.store=Zr(s,i),this.client=e,e!=null&&(t??=e?.openStreamer.bind(e),this.streamCloser=qo({client:e,storeConfig:s,handleError:o,store:_n(this.store,""),openStreamer:t}))}async awaitInitialized(){this.streamCloser!=null&&await this.streamCloser}scopedStore(e){return _n(this.store,e)}async close(){if(this.streamCloser==null)return;await(await this.streamCloser)()}}const Ho=d.z.object({props:g.Gk.nullable(),state:g.Hk.connectivity.connectionStateZ.nullable()}),hs={client:null};let At=class Nr extends g.Composite{static TYPE="synnax.Provider";static stateZ=Ho;schema=Nr.stateZ;afterUpdate(e){if(e.wasSetPreviously(ds)||En(e,hs),this.state.props==null){this.internal.client!=null&&(this.internal.client?.close(),this.internal.client=null),En(e,this.internal);return}this.prevState.props!=null&&r.Vu.equal(this.state.props,this.prevState.props)&&this.internal.client!=null||(this.internal.client=new g.Hk(this.state.props),En(e,this.internal))}};const ds="pluto-client-context",En=(n,e)=>n.set(ds,e),$e=n=>n.get(ds)?.client??null,Yr={[At.TYPE]:At},jo=Object.freeze(Object.defineProperty({__proto__:null,Provider:At,REGISTRY:Yr,ZERO_CONTEXT_VALUE:hs,use:$e},Symbol.toStringTag,{value:"Module"})),zr=d.object({}),kn="flux-context",fs="flux.Provider",Wo=(n,e)=>n.get(kn).scopedStore(e),Vo=n=>{const e=(t,s)=>{if("client"in n)return n.client;const i=$e(t);return s!=null&&s?.client?.key===i?.key?s:new Dr({client:i,storeConfig:n.storeConfig,handleError:g.useErrorHandler(t),handleAsyncError:g.useAsyncErrorHandler(t)})};return class Ur extends g.Composite{static TYPE=fs;static stateZ=zr;schema=Ur.stateZ;afterUpdate(s){const{internal:i}=this;i.store=e(s,i.store),s.wasSetPreviously(kn)||s.set(kn,i.store)}}},Xo=n=>({[fs]:Vo(n)}),ps="pluto-vis-renderer",tn=(n,e)=>{n.set(ps,e,!1)},nn=n=>n.get(ps),gs=n=>n.getOptional(ps),ie=(n,e)=>nn(n)(e),Go="relationships",Ko="resources",Qo={channel:g.wA.RELATIONSHIP_SET_CHANNEL_NAME,schema:g.wA.relationshipZ,onChange:({store:n,changed:e})=>n.relationships.set(g.wA.relationshipToString(e),e)},Jo={channel:g.wA.RELATIONSHIP_DELETE_CHANNEL_NAME,schema:g.wA.relationshipZ,onChange:({store:n,changed:e})=>{n.relationships.delete(g.wA.relationshipToString(e))}},ea={equal:(n,e)=>g.wA.idsEqual(n.from,e.from)&&g.wA.idsEqual(n.to,e.to)&&n.type===e.type,listeners:[Qo,Jo]},ta={channel:g.wA.RESOURCE_SET_CHANNEL_NAME,schema:g.wA.resourceZ,onChange:async({store:n,changed:e})=>{n.resources.set(e.key,t=>t==null?e:{...t,...e})}},na={channel:g.wA.RESOURCE_DELETE_CHANNEL_NAME,schema:g.wA.idZ,onChange:({store:n,changed:e})=>n.resources.delete(e.key)},sa={equal:(n,e)=>r.Vu.equal(n,e),listeners:[ta,na]},ra="policies",ia={channel:g.SA.policy.SET_CHANNEL_NAME,schema:g.SA.policy.policyZ,onChange:({store:n,changed:e})=>n.policies.set(e.key,e)},oa={channel:g.SA.policy.DELETE_CHANNEL_NAME,schema:g.SA.policy.keyZ,onChange:({store:n,changed:e})=>n.policies.delete(e)},aa={listeners:[ia,oa]},Br=(n,e)=>{const t=n.relationships.get(o=>g.wA.matchRelationship(o,{from:{type:"role"},type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:e})),i=n.relationships.get(o=>t.some(a=>g.wA.matchRelationship(o,{from:a.from,type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"policy"}}))).map(o=>o.to.key);return n.policies.get(i)},la=async({client:n,store:e,subject:t})=>{let s=Br(e,t);if(s.length>0)return s;s=await n.access.policies.retrieve({for:t}),e.policies.set(s);for(const i of s)(await n.ontology.retrieveParents([g.SA.policy.ontologyID(i.key)],{types:["role"]})).forEach(a=>{const l={from:a.id,type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:g.SA.policy.ontologyID(i.key)};e.relationships.set(g.wA.relationshipToString(l),l);const u={from:a.id,type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:t};e.relationships.set(g.wA.relationshipToString(u),u)});return s};function ms(n,e,t){n.prototype=e.prototype=t,t.constructor=n}function $r(n,e){var t=Object.create(n.prototype);for(var s in e)t[s]=e[s];return t}function ct(){}var Qe=.7,Pt=1/Qe,Ae="\\s*([+-]?\\d+)\\s*",Je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ca=/^#([0-9a-f]{3,8})$/,ua=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),ha=new RegExp(`^rgb\\(${ee},${ee},${ee}\\)$`),da=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${Je}\\)$`),fa=new RegExp(`^rgba\\(${ee},${ee},${ee},${Je}\\)$`),pa=new RegExp(`^hsl\\(${Je},${ee},${ee}\\)$`),ga=new RegExp(`^hsla\\(${Je},${ee},${ee},${Je}\\)$`),Qs={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ms(ct,Le,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Js,formatHex:Js,formatHex8:ma,formatHsl:ya,formatRgb:er,toString:er});function Js(){return this.rgb().formatHex()}function ma(){return this.rgb().formatHex8()}function ya(){return Fr(this).formatHsl()}function er(){return this.rgb().formatRgb()}function Le(n){var e,t;return n=(n+"").trim().toLowerCase(),(e=ca.exec(n))?(t=e[1].length,e=parseInt(e[1],16),t===6?tr(e):t===3?new B(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?bt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?bt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ua.exec(n))?new B(e[1],e[2],e[3],1):(e=ha.exec(n))?new B(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=da.exec(n))?bt(e[1],e[2],e[3],e[4]):(e=fa.exec(n))?bt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=pa.exec(n))?rr(e[1],e[2]/100,e[3]/100,1):(e=ga.exec(n))?rr(e[1],e[2]/100,e[3]/100,e[4]):Qs.hasOwnProperty(n)?tr(Qs[n]):n==="transparent"?new B(NaN,NaN,NaN,0):null}function tr(n){return new B(n>>16&255,n>>8&255,n&255,1)}function bt(n,e,t,s){return s<=0&&(n=e=t=NaN),new B(n,e,t,s)}function ba(n){return n instanceof ct||(n=Le(n)),n?(n=n.rgb(),new B(n.r,n.g,n.b,n.opacity)):new B}function On(n,e,t,s){return arguments.length===1?ba(n):new B(n,e,t,s??1)}function B(n,e,t,s){this.r=+n,this.g=+e,this.b=+t,this.opacity=+s}ms(B,On,$r(ct,{brighter(n){return n=n==null?Pt:Math.pow(Pt,n),new B(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?Qe:Math.pow(Qe,n),new B(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new B(ge(this.r),ge(this.g),ge(this.b),Lt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nr,formatHex:nr,formatHex8:Sa,formatRgb:sr,toString:sr}));function nr(){return`#${de(this.r)}${de(this.g)}${de(this.b)}`}function Sa(){return`#${de(this.r)}${de(this.g)}${de(this.b)}${de((isNaN(this.opacity)?1:this.opacity)*255)}`}function sr(){const n=Lt(this.opacity);return`${n===1?"rgb(":"rgba("}${ge(this.r)}, ${ge(this.g)}, ${ge(this.b)}${n===1?")":`, ${n})`}`}function Lt(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function ge(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function de(n){return n=ge(n),(n<16?"0":"")+n.toString(16)}function rr(n,e,t,s){return s<=0?n=e=t=NaN:t<=0||t>=1?n=e=NaN:e<=0&&(n=NaN),new J(n,e,t,s)}function Fr(n){if(n instanceof J)return new J(n.h,n.s,n.l,n.opacity);if(n instanceof ct||(n=Le(n)),!n)return new J;if(n instanceof J)return n;n=n.rgb();var e=n.r/255,t=n.g/255,s=n.b/255,i=Math.min(e,t,s),o=Math.max(e,t,s),a=NaN,l=o-i,u=(o+i)/2;return l?(e===o?a=(t-s)/l+(t<s)*6:t===o?a=(s-e)/l+2:a=(e-t)/l+4,l/=u<.5?o+i:2-o-i,a*=60):l=u>0&&u<1?0:a,new J(a,l,u,n.opacity)}function va(n,e,t,s){return arguments.length===1?Fr(n):new J(n,e,t,s??1)}function J(n,e,t,s){this.h=+n,this.s=+e,this.l=+t,this.opacity=+s}ms(J,va,$r(ct,{brighter(n){return n=n==null?Pt:Math.pow(Pt,n),new J(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Qe:Math.pow(Qe,n),new J(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,t=this.l,s=t+(t<.5?t:1-t)*e,i=2*t-s;return new B(Tn(n>=240?n-240:n+120,i,s),Tn(n,i,s),Tn(n<120?n+240:n-120,i,s),this.opacity)},clamp(){return new J(ir(this.h),St(this.s),St(this.l),Lt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=Lt(this.opacity);return`${n===1?"hsl(":"hsla("}${ir(this.h)}, ${St(this.s)*100}%, ${St(this.l)*100}%${n===1?")":`, ${n})`}`}}));function ir(n){return n=(n||0)%360,n<0?n+360:n}function St(n){return Math.max(0,Math.min(1,n||0))}function Tn(n,e,t){return(n<60?e+(t-e)*n/60:n<180?t:n<240?e+(t-e)*(240-n)/60:e)*255}const ys=n=>()=>n;function Ea(n,e){return function(t){return n+t*e}}function Ta(n,e,t){return n=Math.pow(n,t),e=Math.pow(e,t)-n,t=1/t,function(s){return Math.pow(n+s*e,t)}}function wa(n){return(n=+n)==1?qr:function(e,t){return t-e?Ta(e,t,n):ys(isNaN(e)?t:e)}}function qr(n,e){var t=e-n;return t?Ea(n,t):ys(isNaN(n)?e:n)}const In=(function n(e){var t=wa(e);function s(i,o){var a=t((i=On(i)).r,(o=On(o)).r),l=t(i.g,o.g),u=t(i.b,o.b),c=qr(i.opacity,o.opacity);return function(h){return i.r=a(h),i.g=l(h),i.b=u(h),i.opacity=c(h),i+""}}return s.gamma=n,s})(1);function xa(n,e){e||(e=[]);var t=n?Math.min(e.length,n.length):0,s=e.slice(),i;return function(o){for(i=0;i<t;++i)s[i]=n[i]*(1-o)+e[i]*o;return s}}function Ca(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Ra(n,e){var t=e?e.length:0,s=n?Math.min(t,n.length):0,i=new Array(s),o=new Array(t),a;for(a=0;a<s;++a)i[a]=sn(n[a],e[a]);for(;a<t;++a)o[a]=e[a];return function(l){for(a=0;a<s;++a)o[a]=i[a](l);return o}}function Aa(n,e){var t=new Date;return n=+n,e=+e,function(s){return t.setTime(n*(1-s)+e*s),t}}function et(n,e){return n=+n,e=+e,function(t){return n*(1-t)+e*t}}function Pa(n,e){var t={},s={},i;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in n?t[i]=sn(n[i],e[i]):s[i]=e[i];return function(o){for(i in t)s[i]=t[i](o);return s}}var Mn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wn=new RegExp(Mn.source,"g");function La(n){return function(){return n}}function _a(n){return function(e){return n(e)+""}}function Hr(n,e){var t=Mn.lastIndex=wn.lastIndex=0,s,i,o,a=-1,l=[],u=[];for(n=n+"",e=e+"";(s=Mn.exec(n))&&(i=wn.exec(e));)(o=i.index)>t&&(o=e.slice(t,o),l[a]?l[a]+=o:l[++a]=o),(s=s[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,u.push({i:a,x:et(s,i)})),t=wn.lastIndex;return t<e.length&&(o=e.slice(t),l[a]?l[a]+=o:l[++a]=o),l.length<2?u[0]?_a(u[0].x):La(e):(e=u.length,function(c){for(var h=0,f;h<e;++h)l[(f=u[h]).i]=f.x(c);return l.join("")})}function sn(n,e){var t=typeof e,s;return e==null||t==="boolean"?ys(e):(t==="number"?et:t==="string"?(s=Le(e))?(e=s,In):Hr:e instanceof Le?In:e instanceof Date?Aa:Ca(e)?xa:Array.isArray(e)?Ra:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Pa:et)(n,e)}function ka(n,e){return n=+n,e=+e,function(t){return Math.round(n*(1-t)+e*t)}}class le extends r.tl.Observer{cleanup(){}}class Zn extends le{static TYPE="noop-boolean-sink";set(){}}const rn={type:Zn.TYPE,props:{},variant:"sink",valueType:"boolean"};class Dn extends le{static TYPE="noop-numeric-sink";set(){}}const jr={type:Dn.TYPE,props:{},variant:"sink",valueType:"number"};class Nn extends le{static TYPE="noop-boolean-source";value(){return!1}}const bs={type:Nn.TYPE,props:{},variant:"source",valueType:"boolean"};class Yn extends le{static TYPE="noop-numeric-source";value(){return 0}}const Wr={type:Yn.TYPE,props:{},variant:"source",valueType:"number"};class zn extends le{static TYPE="noop-string-sink";set(){}}const Vr={type:zn.TYPE,props:{},variant:"sink",valueType:"string"};class Un extends le{static TYPE="noop-string-source";value(){return""}}const Ss={type:Un.TYPE,props:{},variant:"source",valueType:"string"};class Bn extends le{static TYPE="noop-status-source";value(){return{key:"noop",name:"noop",variant:"disabled",message:"unknown",time:r.d.now()}}}const vs={type:Bn.TYPE,props:{},variant:"source",valueType:"status"};class $n extends le{static TYPE="noop-color-source";value(){return r.Zu.ZERO}}const ut={type:$n.TYPE,props:{},variant:"source",valueType:"color"};class Fn extends le{static TYPE="noop-series";value(){return[r.Iu.ZERO,new r.Ru([])]}}const Xr={type:Fn.TYPE,props:{},variant:"source",valueType:"series"},Oa={[Zn.TYPE]:Zn,[Dn.TYPE]:Dn,[zn.TYPE]:zn,[Nn.TYPE]:Nn,[Yn.TYPE]:Yn,[Bn.TYPE]:Bn,[$n.TYPE]:$n,[Un.TYPE]:Un,[Fn.TYPE]:Fn};class Gr{type="noop";create(e){const t=Oa[e.type];return t==null?null:new t}}const Ia=d.z.instanceof(ArrayBuffer),ht=d.z.object({type:d.z.string(),variant:d.z.enum(["source","sink","source-transformer","sink-transformer"]),valueType:d.z.string(),props:d.z.any(),transfer:d.z.array(Ia).optional()}),ce=ht.extend({variant:d.z.literal("source")}),dt=ht.extend({variant:d.z.literal("sink")}),Kr=ht.extend({variant:d.z.literal("source-transformer")}),Qr=ht.extend({variant:d.z.literal("sink-transformer")}),_t=ce.extend({valueType:d.z.literal("series")}),Es=ce.extend({valueType:d.z.literal("boolean")}),on=dt.extend({valueType:d.z.literal("boolean")}),Ma=Qr.extend({valueType:d.z.literal("boolean")}),Za=Kr.extend({valueType:d.z.literal("boolean")}),Jr=ce.extend({valueType:d.z.literal("number")}),ei=dt.extend({valueType:d.z.literal("number")}),an=ce.extend({valueType:d.z.literal("color")}),Ts=ce.extend({valueType:d.z.literal("status")}),ln=ce.extend({valueType:d.z.literal("string")}),ti=dt.extend({valueType:d.z.literal("string")});let cn=class extends r.tl.BaseObserver{props_=void 0;uProps_=void 0;constructor(e){super(),this.uProps_=e}get props(){if(this.props_==null){const e=this.schema.safeParse(this.uProps_);if(e.success)this.props_=e.data;else throw new g.W(`[BaseTelem] - expected props to be valid, but found the following errors:
|
|
1
|
+
"use strict";const g=require("./provider-DksyuJua.cjs"),r=require("./css-D3NdC2sx.cjs"),d=require("zod"),Z=require("./eraser-Bocga8Eb.cjs"),Ke=require("./fontString-TocVNWmy.cjs"),pe=require("./types-C0tUDfsz.cjs");require("react");const Ks=require("./dimensions-C7b02rFi.cjs");class Mr{entries=new Map;setListeners=new Map;deleteListeners=new Map;handleError;equal;constructor(e,t=()=>!1){this.handleError=e,this.equal=t}setOne(e,t,s,i){const o=this.entries.get(t),a=pe.executeSetter(s,o);if(!(a==null||o!=null&&this.equal(a,o,t)))return this.entries.set(t,a),this.notifySet(e,t,a,i),()=>{o===void 0?(this.entries.delete(t),this.notifyDelete(e,t)):(this.entries.set(t,o),this.notifySet(e,t,o,i))}}set(e,t,s,i){const o=[];if(Array.isArray(t))t.forEach(a=>{const l=this.setOne(e,a.key,a,s);l!=null&&o.push(l)});else if(typeof t=="object"&&"key"in t){const a=t,l=this.setOne(e,a.key,a,s);l!=null&&o.push(l)}else{const a=this.setOne(e,t,s,i);a!=null&&o.push(a)}return()=>o.reverse().forEach(a=>a())}get(e){return typeof e=="function"?Array.from(this.entries.values()).filter(e):Array.isArray(e)?e.map(t=>this.entries.get(t)).filter(t=>t!=null):this.entries.get(e)}list(){return Array.from(this.entries.values())}has(e){return Array.isArray(e)?e.every(t=>this.entries.has(t)):this.entries.has(e)}delete(e,t,s){const i=[];return typeof t=="function"?this.entries.forEach((o,a)=>{t(o,a)&&i.push({key:a,value:o})}):r.du.toArray(t).forEach(o=>{const a=this.entries.get(o);i.push({key:o,value:a})}),i.forEach(({key:o})=>{this.entries.delete(o),this.notifyDelete(e,o)}),()=>i.forEach(({key:o,value:a})=>{a!=null&&(this.entries.set(o,a),this.notifySet(e,o,a,s))})}clear(){this.entries.clear()}onSet(e,t,s){return this.setListeners.set(t,{scope:e,key:s}),()=>this.setListeners.delete(t)}onDelete(e,t,s){return this.deleteListeners.set(t,{scope:e,key:s}),()=>this.deleteListeners.delete(t)}notifySet(e,t,s,i){this.setListeners.forEach((o,a)=>{const l=o.key==null||o.key===t,u=o.scope!==e;l&&u&&this.handleError(async()=>await a(s,i),"Failed to notify set listener")})}notifyDelete(e,t){this.deleteListeners.forEach((s,i)=>{const o=s.key==null||s.key===t,a=s.scope!==e;o&&a&&this.handleError(async()=>await i(t),"Failed to notify delete listener")})}scope(e){return{set:(t,s,i)=>this.set(e,t,s,i),get:(t=>this.get(t)),list:()=>this.list(),has:t=>this.has(t),delete:(t,s)=>this.delete(e,t,s),onSet:(t,s)=>this.onSet(e,t,s),onDelete:(t,s)=>this.onDelete(e,t,s)}}}const Zr=(n,e)=>Object.fromEntries(Object.entries(n).map(([t,{equal:s}])=>[t,new Mr(e,s)])),_n=(n,e)=>Object.fromEntries(Object.entries(n).map(([t])=>[t,n[t].scope(e)])),$o=(n,e,t)=>n.set(e,s=>s==null?void 0:{...s,...t}),Fo=(n,e)=>{const t=n.includes("delete"),s=e.includes("delete");return t&&!s?-1:!t&&s?1:0},qo=async({openStreamer:n,storeConfig:e,handleError:t,client:s,store:i})=>{const o=Object.values(e),a=r.bu.unique(o.flatMap(({listeners:f})=>f.map(({channel:p})=>p))),l={};o.forEach(({listeners:f})=>f.forEach(p=>{const{channel:y}=p;l[y]=[...l[y]||[],p]}));const u=await g.jA.HardenedStreamer.open(n,a),c=new g.jA.ObservableStreamer(u),h=f=>{const p=[...f.uniqueNames];p.sort(Fo),t(async()=>{for(const y of p){const S=f.get(y),b=l[y];if(b!=null)for(const{onChange:E,schema:x}of b)await t(async()=>{let A;S.dataType.equals(r.f.JSON)?A=S.parseJSON(x):A=Array.from(S).map(C=>x.parse(C));for(const C of A)await t(()=>E({changed:C,client:s,store:i}),`Failed to handle streamer change for ${y}`,g.$n)},`Failed to parse streamer change for ${y}`)}},`Failed to handle streamer change for ${r.cl.naturalLanguageJoin(p)}`)};return c.onChange(h),c.close.bind(c)};class Dr{store;streamCloser=null;client;constructor({client:e,openStreamer:t,storeConfig:s,handleError:i,handleAsyncError:o}){this.store=Zr(s,i),this.client=e,e!=null&&(t??=e?.openStreamer.bind(e),this.streamCloser=qo({client:e,storeConfig:s,handleError:o,store:_n(this.store,""),openStreamer:t}))}async awaitInitialized(){this.streamCloser!=null&&await this.streamCloser}scopedStore(e){return _n(this.store,e)}async close(){if(this.streamCloser==null)return;await(await this.streamCloser)()}}const Ho=d.z.object({props:g.Gk.nullable(),state:g.Hk.connectivity.connectionStateZ.nullable()}),hs={client:null};let At=class Nr extends g.Composite{static TYPE="synnax.Provider";static stateZ=Ho;schema=Nr.stateZ;afterUpdate(e){if(e.wasSetPreviously(ds)||En(e,hs),this.state.props==null){this.internal.client!=null&&(this.internal.client?.close(),this.internal.client=null),En(e,this.internal);return}this.prevState.props!=null&&r.Vu.equal(this.state.props,this.prevState.props)&&this.internal.client!=null||(this.internal.client=new g.Hk(this.state.props),En(e,this.internal))}};const ds="pluto-client-context",En=(n,e)=>n.set(ds,e),$e=n=>n.get(ds)?.client??null,Yr={[At.TYPE]:At},jo=Object.freeze(Object.defineProperty({__proto__:null,Provider:At,REGISTRY:Yr,ZERO_CONTEXT_VALUE:hs,use:$e},Symbol.toStringTag,{value:"Module"})),zr=d.object({}),kn="flux-context",fs="flux.Provider",Wo=(n,e)=>n.get(kn).scopedStore(e),Vo=n=>{const e=(t,s)=>{if("client"in n)return n.client;const i=$e(t);return s!=null&&s?.client?.key===i?.key?s:new Dr({client:i,storeConfig:n.storeConfig,handleError:g.useErrorHandler(t),handleAsyncError:g.useAsyncErrorHandler(t)})};return class Ur extends g.Composite{static TYPE=fs;static stateZ=zr;schema=Ur.stateZ;afterUpdate(s){const{internal:i}=this;i.store=e(s,i.store),s.wasSetPreviously(kn)||s.set(kn,i.store)}}},Xo=n=>({[fs]:Vo(n)}),ps="pluto-vis-renderer",tn=(n,e)=>{n.set(ps,e,!1)},nn=n=>n.get(ps),gs=n=>n.getOptional(ps),ie=(n,e)=>nn(n)(e),Go="relationships",Ko="resources",Qo={channel:g.wA.RELATIONSHIP_SET_CHANNEL_NAME,schema:g.wA.relationshipZ,onChange:({store:n,changed:e})=>n.relationships.set(g.wA.relationshipToString(e),e)},Jo={channel:g.wA.RELATIONSHIP_DELETE_CHANNEL_NAME,schema:g.wA.relationshipZ,onChange:({store:n,changed:e})=>{n.relationships.delete(g.wA.relationshipToString(e))}},ea={equal:(n,e)=>g.wA.idsEqual(n.from,e.from)&&g.wA.idsEqual(n.to,e.to)&&n.type===e.type,listeners:[Qo,Jo]},ta={channel:g.wA.RESOURCE_SET_CHANNEL_NAME,schema:g.wA.resourceZ,onChange:async({store:n,changed:e})=>{n.resources.set(e.key,t=>t==null?e:{...t,...e})}},na={channel:g.wA.RESOURCE_DELETE_CHANNEL_NAME,schema:g.wA.idZ,onChange:({store:n,changed:e})=>n.resources.delete(e.key)},sa={equal:(n,e)=>r.Vu.equal(n,e),listeners:[ta,na]},ra="policies",ia={channel:g.SA.policy.SET_CHANNEL_NAME,schema:g.SA.policy.policyZ,onChange:({store:n,changed:e})=>n.policies.set(e.key,e)},oa={channel:g.SA.policy.DELETE_CHANNEL_NAME,schema:g.SA.policy.keyZ,onChange:({store:n,changed:e})=>n.policies.delete(e)},aa={listeners:[ia,oa]},Br=(n,e)=>{const t=n.relationships.get(o=>g.wA.matchRelationship(o,{from:{type:"role"},type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:e})),i=n.relationships.get(o=>t.some(a=>g.wA.matchRelationship(o,{from:a.from,type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:{type:"policy"}}))).map(o=>o.to.key);return n.policies.get(i)},la=async({client:n,store:e,subject:t})=>{let s=Br(e,t);if(s.length>0)return s;s=await n.access.policies.retrieve({for:t}),e.policies.set(s);for(const i of s)(await n.ontology.retrieveParents([g.SA.policy.ontologyID(i.key)],{types:["role"]})).forEach(a=>{const l={from:a.id,type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:g.SA.policy.ontologyID(i.key)};e.relationships.set(g.wA.relationshipToString(l),l);const u={from:a.id,type:g.wA.PARENT_OF_RELATIONSHIP_TYPE,to:t};e.relationships.set(g.wA.relationshipToString(u),u)});return s};function ms(n,e,t){n.prototype=e.prototype=t,t.constructor=n}function $r(n,e){var t=Object.create(n.prototype);for(var s in e)t[s]=e[s];return t}function ct(){}var Qe=.7,Pt=1/Qe,Ae="\\s*([+-]?\\d+)\\s*",Je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ee="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ca=/^#([0-9a-f]{3,8})$/,ua=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),ha=new RegExp(`^rgb\\(${ee},${ee},${ee}\\)$`),da=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${Je}\\)$`),fa=new RegExp(`^rgba\\(${ee},${ee},${ee},${Je}\\)$`),pa=new RegExp(`^hsl\\(${Je},${ee},${ee}\\)$`),ga=new RegExp(`^hsla\\(${Je},${ee},${ee},${Je}\\)$`),Qs={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ms(ct,Le,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Js,formatHex:Js,formatHex8:ma,formatHsl:ya,formatRgb:er,toString:er});function Js(){return this.rgb().formatHex()}function ma(){return this.rgb().formatHex8()}function ya(){return Fr(this).formatHsl()}function er(){return this.rgb().formatRgb()}function Le(n){var e,t;return n=(n+"").trim().toLowerCase(),(e=ca.exec(n))?(t=e[1].length,e=parseInt(e[1],16),t===6?tr(e):t===3?new B(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?bt(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?bt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ua.exec(n))?new B(e[1],e[2],e[3],1):(e=ha.exec(n))?new B(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=da.exec(n))?bt(e[1],e[2],e[3],e[4]):(e=fa.exec(n))?bt(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=pa.exec(n))?rr(e[1],e[2]/100,e[3]/100,1):(e=ga.exec(n))?rr(e[1],e[2]/100,e[3]/100,e[4]):Qs.hasOwnProperty(n)?tr(Qs[n]):n==="transparent"?new B(NaN,NaN,NaN,0):null}function tr(n){return new B(n>>16&255,n>>8&255,n&255,1)}function bt(n,e,t,s){return s<=0&&(n=e=t=NaN),new B(n,e,t,s)}function ba(n){return n instanceof ct||(n=Le(n)),n?(n=n.rgb(),new B(n.r,n.g,n.b,n.opacity)):new B}function On(n,e,t,s){return arguments.length===1?ba(n):new B(n,e,t,s??1)}function B(n,e,t,s){this.r=+n,this.g=+e,this.b=+t,this.opacity=+s}ms(B,On,$r(ct,{brighter(n){return n=n==null?Pt:Math.pow(Pt,n),new B(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?Qe:Math.pow(Qe,n),new B(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new B(ge(this.r),ge(this.g),ge(this.b),Lt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nr,formatHex:nr,formatHex8:Sa,formatRgb:sr,toString:sr}));function nr(){return`#${de(this.r)}${de(this.g)}${de(this.b)}`}function Sa(){return`#${de(this.r)}${de(this.g)}${de(this.b)}${de((isNaN(this.opacity)?1:this.opacity)*255)}`}function sr(){const n=Lt(this.opacity);return`${n===1?"rgb(":"rgba("}${ge(this.r)}, ${ge(this.g)}, ${ge(this.b)}${n===1?")":`, ${n})`}`}function Lt(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function ge(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function de(n){return n=ge(n),(n<16?"0":"")+n.toString(16)}function rr(n,e,t,s){return s<=0?n=e=t=NaN:t<=0||t>=1?n=e=NaN:e<=0&&(n=NaN),new J(n,e,t,s)}function Fr(n){if(n instanceof J)return new J(n.h,n.s,n.l,n.opacity);if(n instanceof ct||(n=Le(n)),!n)return new J;if(n instanceof J)return n;n=n.rgb();var e=n.r/255,t=n.g/255,s=n.b/255,i=Math.min(e,t,s),o=Math.max(e,t,s),a=NaN,l=o-i,u=(o+i)/2;return l?(e===o?a=(t-s)/l+(t<s)*6:t===o?a=(s-e)/l+2:a=(e-t)/l+4,l/=u<.5?o+i:2-o-i,a*=60):l=u>0&&u<1?0:a,new J(a,l,u,n.opacity)}function va(n,e,t,s){return arguments.length===1?Fr(n):new J(n,e,t,s??1)}function J(n,e,t,s){this.h=+n,this.s=+e,this.l=+t,this.opacity=+s}ms(J,va,$r(ct,{brighter(n){return n=n==null?Pt:Math.pow(Pt,n),new J(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Qe:Math.pow(Qe,n),new J(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,t=this.l,s=t+(t<.5?t:1-t)*e,i=2*t-s;return new B(Tn(n>=240?n-240:n+120,i,s),Tn(n,i,s),Tn(n<120?n+240:n-120,i,s),this.opacity)},clamp(){return new J(ir(this.h),St(this.s),St(this.l),Lt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=Lt(this.opacity);return`${n===1?"hsl(":"hsla("}${ir(this.h)}, ${St(this.s)*100}%, ${St(this.l)*100}%${n===1?")":`, ${n})`}`}}));function ir(n){return n=(n||0)%360,n<0?n+360:n}function St(n){return Math.max(0,Math.min(1,n||0))}function Tn(n,e,t){return(n<60?e+(t-e)*n/60:n<180?t:n<240?e+(t-e)*(240-n)/60:e)*255}const ys=n=>()=>n;function Ea(n,e){return function(t){return n+t*e}}function Ta(n,e,t){return n=Math.pow(n,t),e=Math.pow(e,t)-n,t=1/t,function(s){return Math.pow(n+s*e,t)}}function wa(n){return(n=+n)==1?qr:function(e,t){return t-e?Ta(e,t,n):ys(isNaN(e)?t:e)}}function qr(n,e){var t=e-n;return t?Ea(n,t):ys(isNaN(n)?e:n)}const In=(function n(e){var t=wa(e);function s(i,o){var a=t((i=On(i)).r,(o=On(o)).r),l=t(i.g,o.g),u=t(i.b,o.b),c=qr(i.opacity,o.opacity);return function(h){return i.r=a(h),i.g=l(h),i.b=u(h),i.opacity=c(h),i+""}}return s.gamma=n,s})(1);function xa(n,e){e||(e=[]);var t=n?Math.min(e.length,n.length):0,s=e.slice(),i;return function(o){for(i=0;i<t;++i)s[i]=n[i]*(1-o)+e[i]*o;return s}}function Ca(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function Ra(n,e){var t=e?e.length:0,s=n?Math.min(t,n.length):0,i=new Array(s),o=new Array(t),a;for(a=0;a<s;++a)i[a]=sn(n[a],e[a]);for(;a<t;++a)o[a]=e[a];return function(l){for(a=0;a<s;++a)o[a]=i[a](l);return o}}function Aa(n,e){var t=new Date;return n=+n,e=+e,function(s){return t.setTime(n*(1-s)+e*s),t}}function et(n,e){return n=+n,e=+e,function(t){return n*(1-t)+e*t}}function Pa(n,e){var t={},s={},i;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in n?t[i]=sn(n[i],e[i]):s[i]=e[i];return function(o){for(i in t)s[i]=t[i](o);return s}}var Mn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wn=new RegExp(Mn.source,"g");function La(n){return function(){return n}}function _a(n){return function(e){return n(e)+""}}function Hr(n,e){var t=Mn.lastIndex=wn.lastIndex=0,s,i,o,a=-1,l=[],u=[];for(n=n+"",e=e+"";(s=Mn.exec(n))&&(i=wn.exec(e));)(o=i.index)>t&&(o=e.slice(t,o),l[a]?l[a]+=o:l[++a]=o),(s=s[0])===(i=i[0])?l[a]?l[a]+=i:l[++a]=i:(l[++a]=null,u.push({i:a,x:et(s,i)})),t=wn.lastIndex;return t<e.length&&(o=e.slice(t),l[a]?l[a]+=o:l[++a]=o),l.length<2?u[0]?_a(u[0].x):La(e):(e=u.length,function(c){for(var h=0,f;h<e;++h)l[(f=u[h]).i]=f.x(c);return l.join("")})}function sn(n,e){var t=typeof e,s;return e==null||t==="boolean"?ys(e):(t==="number"?et:t==="string"?(s=Le(e))?(e=s,In):Hr:e instanceof Le?In:e instanceof Date?Aa:Ca(e)?xa:Array.isArray(e)?Ra:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Pa:et)(n,e)}function ka(n,e){return n=+n,e=+e,function(t){return Math.round(n*(1-t)+e*t)}}class le extends r.tl.Observer{cleanup(){}}class Zn extends le{static TYPE="noop-boolean-sink";set(){}}const rn={type:Zn.TYPE,props:{},variant:"sink",valueType:"boolean"};class Dn extends le{static TYPE="noop-numeric-sink";set(){}}const jr={type:Dn.TYPE,props:{},variant:"sink",valueType:"number"};class Nn extends le{static TYPE="noop-boolean-source";value(){return!1}}const bs={type:Nn.TYPE,props:{},variant:"source",valueType:"boolean"};class Yn extends le{static TYPE="noop-numeric-source";value(){return 0}}const Wr={type:Yn.TYPE,props:{},variant:"source",valueType:"number"};class zn extends le{static TYPE="noop-string-sink";set(){}}const Vr={type:zn.TYPE,props:{},variant:"sink",valueType:"string"};class Un extends le{static TYPE="noop-string-source";value(){return""}}const Ss={type:Un.TYPE,props:{},variant:"source",valueType:"string"};class Bn extends le{static TYPE="noop-status-source";value(){return{key:"noop",name:"noop",variant:"disabled",message:"unknown",time:r.d.now()}}}const vs={type:Bn.TYPE,props:{},variant:"source",valueType:"status"};class $n extends le{static TYPE="noop-color-source";value(){return r.Zu.ZERO}}const ut={type:$n.TYPE,props:{},variant:"source",valueType:"color"};class Fn extends le{static TYPE="noop-series";value(){return[r.Iu.ZERO,new r.Ru([])]}}const Xr={type:Fn.TYPE,props:{},variant:"source",valueType:"series"},Oa={[Zn.TYPE]:Zn,[Dn.TYPE]:Dn,[zn.TYPE]:zn,[Nn.TYPE]:Nn,[Yn.TYPE]:Yn,[Bn.TYPE]:Bn,[$n.TYPE]:$n,[Un.TYPE]:Un,[Fn.TYPE]:Fn};class Gr{type="noop";create(e){const t=Oa[e.type];return t==null?null:new t}}const Ia=d.z.instanceof(ArrayBuffer),ht=d.z.object({type:d.z.string(),variant:d.z.enum(["source","sink","source-transformer","sink-transformer"]),valueType:d.z.string(),props:d.z.any(),transfer:d.z.array(Ia).optional()}),ce=ht.extend({variant:d.z.literal("source")}),dt=ht.extend({variant:d.z.literal("sink")}),Kr=ht.extend({variant:d.z.literal("source-transformer")}),Qr=ht.extend({variant:d.z.literal("sink-transformer")}),_t=ce.extend({valueType:d.z.literal("series")}),Es=ce.extend({valueType:d.z.literal("boolean")}),on=dt.extend({valueType:d.z.literal("boolean")}),Ma=Qr.extend({valueType:d.z.literal("boolean")}),Za=Kr.extend({valueType:d.z.literal("boolean")}),Jr=ce.extend({valueType:d.z.literal("number")}),ei=dt.extend({valueType:d.z.literal("number")}),an=ce.extend({valueType:d.z.literal("color")}),Ts=ce.extend({valueType:d.z.literal("status")}),ln=ce.extend({valueType:d.z.literal("string")}),ti=dt.extend({valueType:d.z.literal("string")});let cn=class extends r.tl.BaseObserver{props_=void 0;uProps_=void 0;constructor(e){super(),this.uProps_=e}get props(){if(this.props_==null){const e=this.schema.safeParse(this.uProps_);if(e.success)this.props_=e.data;else throw new g.W(`[BaseTelem] - expected props to be valid, but found the following errors:
|
|
2
2
|
${e.error.message}`)}return this.props_}cleanup(){}};class j extends cn{}class un extends cn{}class be extends j{source_=void 0;get source(){if(this.source_==null)throw new g.W("[UnarySourceTransformer] - expected source to exist, but none was found.");return this.source_}value(){return this.transform(this.source.value())}onChange(e){return this.source.onChange(()=>{this.shouldNotify(this.source.value())&&e()})}setSources(e){this.source_=Object.values(e)[0]}shouldNotify(e){return!0}}class ni extends j{sources={};value(){const e=Object.fromEntries(Object.entries(this.sources).map(([t,s])=>[t,s.value()]));return this.transform(e)}setSources(e){this.sources={...this.sources,...e}}}class si extends cn{sinks={};get sink(){const[e]=Object.values(this.sinks);if(e==null)throw new g.W("[UnarySinkTransformer] - expected sink to exist, but none was found.");return e}set(...e){return this.sink.set(...this.transform(...e))}setSinks(e){this.sinks={...this.sinks,...e}}}const ws=d.z.object({from:d.z.string(),to:d.z.string()}),xs=d.z.object({connections:d.z.array(ws),outlet:d.z.string(),segments:d.z.record(d.z.string(),ce)});class Cs{type="pipeline";factory;constructor(e){this.factory=e}create(e){switch(e.type){case kt.TYPE:return new kt(e.props,this.factory);case Ot.TYPE:return new Ot(e.props,this.factory);default:return null}}}class kt extends j{static TYPE="source-pipeline";schema=xs;sources={};get outlet(){const{outlet:e}=this.props,t=this.sources[e];if(t==null)throw new g.W(`[SourcePipeline] - expected source to exist at outlet '${e}', but none was found.`);return t}constructor(e,t){super(e);const{connections:s,segments:i}=this.props;Object.entries(i).forEach(([o,a])=>{const l=t.create(a);l!=null&&(this.sources[o]=l)}),s.forEach(({from:o,to:a})=>{const l=this.sources[o],u=this.sources[a];l==null||u==null||"setSources"in u&&u.setSources({[o]:l})})}value(){return this.outlet.value()}onChange(e){return this.outlet.onChange(e)}cleanup(){Object.values(this.sources).forEach(e=>e.cleanup?.())}}const ri=(n,e)=>({variant:"source",props:e,type:kt.TYPE,valueType:n}),Rs=d.z.object({connections:d.z.array(ws),inlet:d.z.string(),segments:d.z.record(d.z.string(),dt)});class Ot extends un{static TYPE="sink-pipeline";schema=Rs;sinks={};get inlet(){const{inlet:e}=this.props,t=this.sinks[e];if(t==null)throw new g.W(`[SinkPipeline] - expected source to exist at inlet '${e}', but none was found.`);return t}constructor(e,t){super(e);const{connections:s,segments:i}=this.props;Object.entries(i).forEach(([o,a])=>{const l=t.create(a);l!=null&&(this.sinks[o]=l)}),s.forEach(({from:o,to:a})=>{const l=this.sinks[o],u=this.sinks[a];l==null||u==null||"setSinks"in l&&l.setSinks({[a]:u})})}set(...e){return this.inlet.set(...e)}cleanup(){Object.values(this.sinks).forEach(e=>e.cleanup?.())}}const ii=(n,e)=>({variant:"sink",props:e,type:Ot.TYPE,valueType:n}),As=d.z.object({channel:d.z.number().or(d.z.string())});class It extends j{static TYPE="stream-channel-value";schema=As;client;removeStreamHandler=null;leadingBuffer=null;valid=!1;onStatusChange;constructor(e,t,s){super(t),this.client=e,this.onStatusChange=s?.onStatusChange}get testingOnlyLeadingBuffer(){return this.leadingBuffer}get testingOnlyValid(){return this.valid}cleanup(){this.removeStreamHandler?.(),this.valid=!1,this.leadingBuffer?.release(),this.leadingBuffer=null,this.removeStreamHandler=null}value(){return r.pu.isZero(this.props.channel)?NaN:(this.valid||this.read(),this.leadingBuffer==null||this.leadingBuffer.length===0?NaN:this.leadingBuffer.at(-1,!0))}async read(){try{this.valid=!0,this.removeStreamHandler?.();const e=await this.client.retrieveChannel(this.props.channel),t=s=>{const i=s.get(e.key);if(i==null)return;const o=i.series.at(-1);o!=null&&(o.acquire(),this.leadingBuffer?.release(),this.leadingBuffer=o),this.notify()};this.removeStreamHandler=await this.client.stream(t,[e.key]),this.notify()}catch(e){this.valid=!1,this.onStatusChange?.(r.ol.fromException(e,"failed to stream channel value"))}}}const oi=async(n,e,t)=>{const s=await n.retrieveChannel(e),i=g.xA.isCalculated(s);if(!t||s.isIndex)return{key:s.key,dataType:s.dataType,virtual:s.virtual,isCalculated:i};if(s.virtual&&!i)throw new g.$n("cannot use virtual channels as a data source");return{key:s.index,dataType:r.f.TIMESTAMP,virtual:!1,isCalculated:i}},Da=d.z.object({timeRange:r.E.z,channel:d.z.number().or(d.z.string()),useIndexOfChannel:d.z.boolean().default(!1)});class Mt extends j{static TYPE="series-source";client;schema=Da;data=new r.Ru;valid=!1;channel=null;onStatusChange;constructor(e,t,s){super(t),this.client=e,this.onStatusChange=s?.onStatusChange}cleanup(){this.data.release(),this.valid=!1,this.channel=null}value(){const{channel:e,timeRange:t}=this.props;if(t.span.isZero||e===0)return[r.Iu.ZERO,this.data];this.valid||this.read();const{channel:s,data:i}=this;if(s==null)return[r.Iu.ZERO,this.data];let o=i.bounds;return s.dataType.equals(r.f.TIMESTAMP)&&(o=r.Iu.min([o,t.numericBounds])),[o,i]}async read(){try{this.valid=!0;const{timeRange:e,channel:t,useIndexOfChannel:s}=this.props;this.channel=await oi(this.client,t,s);const i=await this.client.read(e,this.channel.key);i.acquire(),this.data=i,this.notify()}catch(e){this.valid=!1,this.onStatusChange?.(r.ol.fromException(e,"failed to read channel data"))}}}const Na=d.z.object({channel:d.z.number().or(d.z.string()),useIndexOfChannel:d.z.boolean().default(!1),timeSpan:r.g.z,keepFor:r.g.z.optional()});class Zt extends j{static TYPE="dynamic-series-source";client;data=new r.Ru([]);now;onStatusChange;channel=null;stopStreaming;valid=!1;schema=Na;constructor(e,t,s,i=()=>r.d.now()){super(t),this.client=e,this.now=i,this.onStatusChange=s?.onStatusChange}value(){const{channel:e,timeSpan:t}=this.props;if(e===0)return[r.Iu.ZERO,this.data];this.valid||this.read();const{data:s,channel:i}=this,o=this.now();if(i!=null&&i.dataType.isVariable)return[r.Iu.ZERO,this.data];const a=s.series.filter(u=>u.timeRange.end.after(o.sub(t))).map(u=>u.bounds),l=r.Iu.max(a);return i!=null&&i.dataType.equals(r.f.TIMESTAMP)&&(l.lower=Math.max(l.lower,l.upper-Number(t.valueOf()))),[l,this.data]}async read(){try{this.valid=!0;const{channel:e,useIndexOfChannel:t,timeSpan:s}=this.props;this.channel=await oi(this.client,e,t);const i=this.now().spanRange(-s);if(!this.channel.virtual||this.channel.isCalculated)try{const a=await this.client.read(i,this.channel.key);a.acquire(),this.data.push(a)}catch(a){if(a instanceof Error&&(a.message.includes("cannot open iterator on virtual channel")||a.message.includes("cannot read from free channel")))console.warn("failed to read calculated channel data",a);else throw a}this.stopStreaming?.();const o=a=>{if(this.channel==null)return;const l=a.get(this.channel.key);l!=null&&(l.acquire(),this.data.push(l),this.notify(),this.gcOutOfRangeData())};this.stopStreaming=await this.client.stream(o,[this.channel.key]),this.notify()}catch(e){this.valid=!1,this.onStatusChange?.(r.ol.fromException(e,"failed to stream channel data"))}}gcOutOfRangeData(){const e=this.now().sub(this.props.keepFor??this.props.timeSpan),t=this.data.series.findIndex(s=>s.timeRange.end.before(e));t!==-1&&(this.data.series.splice(t,1).forEach(s=>s.release()),this.gcOutOfRangeData())}cleanup(){this.stopStreaming?.(),this.stopStreaming=void 0,this.data.release(),this.valid=!1}}const Ya={[Mt.TYPE]:Mt,[Zt.TYPE]:Zt,[It.TYPE]:It};class ai{type="remote";client;constructor(e){this.client=e}create(e,t){const s=Ya[e.type];return s==null?null:new s(this.client,e.props,t)}}const li=n=>({type:Mt.TYPE,props:n,variant:"source",valueType:"series"}),ci=n=>({type:Zt.TYPE,props:n,variant:"source",valueType:"series"}),ui=n=>({type:It.TYPE,props:n,variant:"source",valueType:"number"});class hi{type="static";create(e){switch(e.type){case qn.TYPE:return new qn(e.props);case Dt.TYPE:return new Dt(e.props);case Nt.TYPE:return new Nt(e.props);case Yt.TYPE:return new Yt(e.props);case zt.TYPE:return new zt(e.props);default:return null}}}const Ps=d.z.object({data:d.z.array(r.Cu),offsets:d.z.array(d.z.number()).default([])});class qn extends j{data;schema=Ps;static TYPE="static-series";constructor(e){super(e),this.data=this.props.data.map((t,s)=>new r.q({data:t,dataType:r.f.FLOAT32,timeRange:r.E.ZERO,sampleOffset:this.props.offsets[s]??0}))}value(){return[r.Iu.max(this.data.map(t=>t.bounds)),this.data]}}const di=Ps.extend({rate:r.$.z,yOffset:d.z.number().default(0),scroll:d.z.number().default(0),startPosition:d.z.number().default(0),scrollBounds:d.z.boolean().default(!1)});class Dt extends j{static TYPE="iterative-series";schema=di;position;interval;data;constructor(e){super(e),this.position=this.props.startPosition,this.start(this.props.rate),this.data=this.props.data.map((t,s)=>new r.q({data:t,dataType:r.f.FLOAT32,timeRange:r.E.ZERO,sampleOffset:this.props.offsets[s]??0}))}value(){const e=this.data.map(s=>s.slice(0,this.position));if(this.props.scrollBounds){const s=e[0].data[this.position-this.props.scroll<0?0:this.position-this.props.scroll],i=e[0].data[this.position-1];return[{lower:Number(s),upper:Number(i)},new r.Ru(e)]}return[r.Iu.max(e.map(s=>s.bounds)),new r.Ru(e)]}start(e){this.interval!=null&&clearInterval(this.interval),this.interval=setInterval(()=>{this.notify?.(),this.position++},e.period.milliseconds)}cleanup(){clearInterval(this.interval),this.interval=void 0}}const fi=d.z.number();class Nt extends j{static TYPE="static-numeric";schema=fi;value(){return this.props}}const pi=d.z.string();class Yt extends j{static TYPE="static-string";schema=pi;value(){return this.props}}const gi=r.Zu.crudeZ;class zt extends j{static TYPE="static-color";schema=gi;value(){return r.Zu.construct(this.props)}}const za=n=>({type:qn.TYPE,props:n,variant:"source",valueType:"series"}),Ua=n=>({type:Dt.TYPE,props:n,variant:"source",valueType:"series"}),Ba=n=>({type:Nt.TYPE,props:n,variant:"source",valueType:"number"}),$a=n=>({type:Yt.TYPE,props:n,variant:"source",valueType:"string"}),Fa=n=>({type:zt.TYPE,props:n,variant:"source",valueType:"color"});class mi{type="transformer";create(e){switch(e.type){case _e.TYPE:return new _e(e.props);case ke.TYPE:return new ke(e.props);case Oe.TYPE:return new Oe(e.props);case Ie.TYPE:return new Ie(e.props);case Me.TYPE:return new Me(e.props);case Ut.TYPE:return new Ut(e.props);case Ze.TYPE:return new Ze(e.props);case De.TYPE:return new De(e.props)}return null}}const qa=d.z.object({truthy:d.z.number().default(1),falsy:d.z.number().default(0)}),yi=n=>({props:n,type:_e.TYPE,variant:"sink",valueType:"boolean"});class _e extends si{static TYPE="boolean-numeric-converter-sink";static propsZ=qa;schema=_e.propsZ;transform(...e){return e.map(t=>t?this.props.truthy:this.props.falsy)}}const Ls=d.z.object({trueBound:r.Iu.bounds}),bi=n=>({props:n,type:ke.TYPE,variant:"source",valueType:"boolean"});class ke extends be{static TYPE="boolean-source";static propsZ=Ls;schema=ke.propsZ;curr=null;shouldNotify(e){const t=r.Iu.contains(this.props.trueBound,e)!==this.curr;return this.curr=r.Iu.contains(this.props.trueBound,e),t}transform(e){return this.curr=r.Iu.contains(this.props.trueBound,e),this.curr}}const Si=d.z.object({});class Oe extends ni{static TYPE="mean";static propsZ=Si;schema=Oe.propsZ;transform(e){return Object.values(e).reduce((t,s)=>t+s,0)/Object.keys(e).length}}const Ha=n=>({props:n,type:Oe.TYPE,variant:"source",valueType:"boolean"}),vi=d.z.object({trueVariant:r.ol.variantZ.default("success")});class Ie extends be{static TYPE="boolean-status";static propsZ=vi;schema=Ie.propsZ;transform(e){return e.variant===this.props.trueVariant}}const ja=n=>({props:n,type:Ie.TYPE,variant:"source",valueType:"boolean"}),_s=d.z.object({precision:d.z.number().default(2),prefix:d.z.string().default(""),suffix:d.z.string().default(""),notation:r.Qu.notationZ.default("standard")});class Me extends be{static TYPE="stringify-number";static propsZ=_s;schema=Me.propsZ;transform(e){if(isNaN(e))return"";const{precision:t,prefix:s,suffix:i,notation:o}=this.props;return`${s}${r.Qu.stringifyNumber(e,t,o)}${i}`}}const Ei=n=>({props:n,type:Me.TYPE,variant:"source",valueType:"string"}),ks=d.z.object({windowSize:d.z.number().default(5)});class Ut extends be{static TYPE="rolling-average";static propsZ=Si;schema=ks;values=[];transform(e){return this.props.windowSize<2||isNaN(e)?e:this.values.reduce((t,s)=>t+s,0)/this.values.length}shouldNotify(e){return this.props.windowSize<2?!0:(this.values.length>this.props.windowSize&&(this.values=[]),this.values.push(e),this.values.length===this.props.windowSize)}}const Ti=n=>({props:n,type:Ut.TYPE,variant:"source",valueType:"number"}),wi=d.z.object({gradient:r.Zu.gradientZ});class Ze extends be{static TYPE="color-gradient";static propsZ=wi;schema=Ze.propsZ;transform(e){return r.Zu.fromGradient(this.props.gradient,e)}}const xi=n=>({props:n,type:Ze.TYPE,variant:"source",valueType:"color"}),Ci=d.z.object({scale:r.Tu.transform});class De extends be{static TYPE="scale-number";static propsZ=Ci;schema=De.propsZ;transform(e){if(isNaN(e))return e;const{offset:t,scale:s}=this.props.scale;return e*s+t}}const Ri=n=>({props:n,type:De.TYPE,variant:"source",valueType:"number"}),Os=d.z.enum(["average","decimate"]),Wa=d.z.object({mode:Os,windowSize:d.z.number().default(5)}),Va=n=>({props:n,type:tt.TYPE,variant:"source",valueType:"number"}),Ai=(n,e,t)=>{const s=e.length*t;for(let i=s;i<n.length;i+=t){const o=n.sub(i,i+1);o!==void 0&&e.write(o)}},Xa=(n,e,t)=>{const s=e.length*t;for(let i=s;i<n.length&&!(i+t>n.length);i+=t){const o=Math.min(i+t,n.length);let a=0,l=0;for(let u=i;u<o;u++){const c=n.at(u);c!==void 0&&typeof c=="number"&&(a+=c,l++)}l>0&&e.write(new r.q({data:[a/l],dataType:n.dataType}))}},Ga={decimate:Ai,average:Xa};class tt{static TYPE="series-downsampler";_downsample=null;cache=new r.Ru;props;constructor(e){this.props=e}downsample(e){return this._downsample==null&&(e.series[0].sampleOffset!==0?this._downsample=Ai:this._downsample=Ga[this.props.mode]),this._downsample}transform(e){if(this.props.mode==="decimate"||this.props.windowSize<=1)return e;if(e.series.length===0)return this.cache;for(;this.cache.series.length>0&&!this.cache.series[0].key.startsWith(e.series[0].key);)this.cache.series.shift();return e.series.forEach((t,s)=>{let i=this.cache.series.at(s);if(i==null){const o=Math.ceil(t.capacity/this.props.windowSize);i=r.q.alloc({key:t.key+r.Ou.create(),dataType:t.dataType,capacity:o,alignment:t.alignment,alignmentMultiple:BigInt(this.props.windowSize),sampleOffset:t.sampleOffset,timeRange:t.timeRange}),this.cache.push(i)}else if(!i.key.startsWith(t.key))throw new g.St(`[SeriesDownsampler] - expected series with key ${t.key} to be in cache, but found ${i.key}`);this.downsample(e)(t,i,this.props.windowSize)}),this.cache}}const Ka=n=>({props:n,type:tt.TYPE,variant:"source",valueType:"series"});class Is{factories;type="compound";constructor(e){this.factories=e}add(e){this.factories=[...this.factories.filter(t=>t.type!==e.type),e]}create(e,t){for(const s of this.factories){const i=s.create(e,t);if(i!=null)return i}return null}}const Pi=n=>{const e=[new mi,new hi,new Gr],t=new Is(e);return n!=null&&t.add(new ai(n)),t.add(new Cs(t)),t};let Li=class _i{factory;key;parent;constructor(e,t){this.factory=e,this.key=r.Ou.create(),this.parent=t}child(e,t){const s=new Is([...this.factory.factories,...r.du.toArray(e)]);return s.add(new Cs(s)),new _i(s,t)}create(e,t){const s=this.factory.create(e,t);if(s==null)throw new g.St(`Telemetry service could not find a source for type ${e.type}`);return s}};const ft="pluto-telem-context",hn=n=>n.get(ft),ki=(n,e)=>n.set(ft,e),Oi=(n,e,t)=>{const s=hn(n);if(s!=null&&t!=null&&s.key===t?.parent?.key)return t;const i=s.child(e,s);return n.set(ft,i),i};class Ii{spec;wrapped;prevProv;constructor(e,t,s){this.wrapped=e,this.spec=s,this.prevProv=t}shouldUpdate(e,t){return this.prevProv.key!==e.key||!r.Vu.equal(this.spec,t)}}class or extends Ii{value(){return this.wrapped.value()}cleanup(){this.wrapped.cleanup?.()}onChange(e){return this.wrapped.onChange(e)}}class ar extends Ii{set(...e){this.wrapped.set(...e)}cleanup(){this.wrapped.cleanup?.()}}const $=(n,e,t,s)=>{const i=hn(n);if(t instanceof or){if(!t.shouldUpdate(i,e))return t;t.cleanup?.()}return new or(i.create(e,s),i,e)},Fe=(n,e,t,s)=>{const i=hn(n);if(t instanceof ar){if(!t.shouldUpdate(i,e))return t;t.cleanup?.()}return new ar(i.create(e,s),i,e)},Mi=(n,e)=>n.dataType.isVariable||n.dataType.equals(r.f.UINT8)?n:(e==null&&n.dataType.equals(r.f.TIMESTAMP)&&(e=BigInt(n.data[0])),n.convert(r.f.FLOAT32,e)),Qa=n=>n.isVariable||n.equals(r.f.UINT8)?n:r.f.FLOAT32,Zi=()=>({purgedSeries:0,purgedBytes:r.p.bytes(0)}),Di={instrumentation:g.g.NOOP,staleEntryThreshold:r.g.seconds(20)};class Ja{data=[];props;constructor(e){this.props={...Di,...e}}write(e){e.length!==0&&(e.series.forEach(t=>this.writeOne(Mi(t))),this.checkIntegrity(e))}dirtyRead(e){const t=this.data.filter(({data:a})=>a.timeRange.overlapsWith(e)).map(({data:a})=>a);if(t.length===0)return{series:new r.Ru([]),gaps:[e]};const s=t.map((a,l)=>l===0?r.E.ZERO:new r.E(t[l-1].timeRange.end,a.timeRange.start)).filter(a=>!a.span.isZero&&a.isValid),i=new r.E(e.start,t[0].timeRange.start),o=new r.E(t[t.length-1].timeRange.end,e.end);return i.isValid&&!i.span.isZero&&s.unshift(i),o.isValid&&!o.span.isZero&&s.push(o),{series:new r.Ru(t),gaps:s}}gc(){const{staleEntryThreshold:e}=this.props,t=Zi(),s=this.data.filter(i=>{const o=i.data.refCount>0||r.d.since(i.addedAt).lessThan(e);return o||(t.purgedBytes=t.purgedBytes.add(i.data.byteCapacity)),o});return t.purgedSeries=this.data.length-s.length,this.data=s,t}close(){this.data=[]}writeOne(e){const{instrumentation:{L:t}}=this.props;if(e.length===0)return;const s=r.Iu.buildInsertionPlan(this.data.map(u=>u.data.alignmentBounds),e.alignmentBounds);if(s===null)return t.debug("Found no viable insertion plan",{inserting:e.digest,cacheContents:this.data.map(u=>u.data.digest)});const{removeBefore:i,removeAfter:o,insertInto:a,deleteInBetween:l}=s;e=e.slice(i,e.data.length-o),e.length!==0&&this.data.splice(a,l,{data:e,addedAt:r.d.now()})}checkIntegrity(e){const{instrumentation:{L:t}}=this.props,s=this.data.map(o=>o.data.alignmentBounds);if(s.some((o,a)=>s.some((l,u)=>a===u?!1:r.Iu.overlapsWith(o,l))))throw t.debug("Cache is in an invalid state - bounds overlap!",()=>({write:e.series.map(o=>o.digest),cacheContents:this.data.map(o=>o.data.digest)})),new Error("Invalid state")}}const el=100,tl=1e6,nl=1e4,sl=100,rl=40;class il{props;counter=0;curr;avgRate=0;timeOfLastWrite;totalWrites=0;now=()=>r.d.now();constructor(e){this.props=e,this.curr=null,e.now!=null&&(this.now=e.now),this.timeOfLastWrite=this.now()}get length(){return this.curr?.length??0}get leadingBuffer(){return this.curr}write(e){const t=e.series.flatMap(s=>this._write(s));return{flushed:new r.Ru(t.flatMap(s=>s.flushed.series)),allocated:new r.Ru(t.flatMap(s=>s.allocated.series))}}allocate(e,t,s){this.counter++;const i=this.props.dataType.isVariable,o=this.props.dataType.equals(r.f.TIMESTAMP);return r.q.alloc({capacity:i?e*rl:e,dataType:Qa(this.props.dataType),timeRange:s.range(r.d.MAX),sampleOffset:o?s.valueOf():0,glBufferUsage:"dynamic",alignment:t,key:`dynamic-${this.counter}`})}_write(e){const t=this.nextBufferSize(),s={flushed:new r.Ru([]),allocated:new r.Ru([])};if(this.curr==null)this.curr=this.allocate(t,e.alignment,this.now()),s.allocated.push(this.curr);else if(Math.abs(Number(this.curr.alignment+BigInt(this.curr.length)-e.alignment))>1){const u=this.now();this.curr.timeRange.end=u,s.flushed.push(this.curr),this.curr=this.allocate(t,e.alignment,u),s.allocated.push(this.curr)}const i=Mi(e,this.curr.sampleOffset),o=this.curr.write(i);if(o===e.length)return this.updateAvgRate(e),s;const a=this.now();this.curr.timeRange.end=a,s.flushed.push(this.curr),this.curr=this.allocate(t,e.alignment+BigInt(o),a),s.allocated.push(this.curr);const l=this._write(e.slice(o));return s.flushed.push(l.flushed),s.allocated.push(l.allocated),s}updateAvgRate(e){if(typeof this.props.dynamicBufferSize=="number")return;const t=e.length/this.now().span(this.timeOfLastWrite).seconds;this.totalWrites>0&&isFinite(t)&&t>0&&(this.avgRate=(this.avgRate*(this.totalWrites-1)+t)/this.totalWrites),this.totalWrites++,this.timeOfLastWrite=this.now()}nextBufferSize(){const{dynamicBufferSize:e}=this.props;if(typeof e=="number")return e;if(this.totalWrites<sl)return nl;const t=r.Nu.roundToNearestMagnitude(this.avgRate*e.seconds);return Math.round(Math.max(Math.min(t,tl),el))}close(){this.curr=null}}class ol{channel;closed=!1;ins;static;dynamic;constructor(e){this.channel=e.channel,this.ins=e.instrumentation??g.g.NOOP,this.static=new Ja(e),this.dynamic=new il({dynamicBufferSize:e.dynamicBufferSize,dataType:this.channel.dataType})}writeDynamic(e){if(this.closed)return this.ins.L.warn(`Ignoring attempted dynamic write to a closed cache for channel ${this.channel.name}`),new r.Ru([]);const{flushed:t,allocated:s}=this.dynamic.write(e);return t.length>0&&this.static.write(t),s}get leadingBuffer(){return this.dynamic.leadingBuffer}writeStatic(e){if(this.closed)return this.ins.L.warn(`Ignoring attempted static write to a closed cache for channel ${this.channel.name}`);this.static.write(e)}read(e){return this.closed?(this.ins.L.warn(`Ignoring attempted dirty read from a closed cache for channel ${this.channel.name}`),{series:new r.Ru([]),gaps:[e]}):this.static.dirtyRead(e)}gc(){return this.closed?(this.ins.L.warn(`Ignoring attempted garbage collection on a closed cache for channel ${this.channel.name}`),{purgedSeries:0,purgedBytes:r.p.bytes(0)}):this.static.gc()}close(){this.closed=!0,this.dynamic.close(),this.static.close()}}const al=g.g$1.seconds(60);class ll{props;cache=new Map;gcInterval;constructor(e){this.props={dynamicBufferSize:al,gcInterval:g.g$1.seconds(30),...Di,...e},this.gcInterval=setInterval(()=>this.gc(),this.props.gcInterval.milliseconds)}async populateMissing(e){const{instrumentation:t,channelRetriever:s,dynamicBufferSize:i}=this.props,o=[];for(const l of e)this.cache.has(l)||o.push(l);if(o.length===0)return;(await s.retrieve(o)).forEach(l=>{if(this.cache.has(l.key))return;const u=new ol({channel:l,dynamicBufferSize:i,instrumentation:t.child(`cache-${l.name}-${l.key}`)});this.cache.set(l.key,u)})}get(e){const t=this.cache.get(e);if(t!=null)return t;throw new g.St(`cache entry for ${e} not found`)}gc(){const{instrumentation:{L:e}}=this.props;e.info("starting garbage collection");const t=Zi();this.cache.forEach(s=>{const i=s.gc();t.purgedSeries+=i.purgedSeries,t.purgedBytes=t.purgedBytes.add(i.purgedBytes)}),e.info("garbage collection complete",{purgedSeries:t.purgedSeries,purgedBytes:t.purgedBytes.toString()},!0)}close(){clearInterval(this.gcInterval),this.cache.forEach(e=>e.close()),this.cache.clear()}}class cl{args;debouncedRead;mu=r.al.newMutex({requests:new Set,closed:!1});constructor(e){this.args={...e,instrumentation:e.instrumentation??g.g.NOOP,batchDebounce:e.batchDebounce??r.g.milliseconds(50),overlapThreshold:e.overlapThreshold??r.g.milliseconds(5)};const t=this.args.batchDebounce.milliseconds;this.debouncedRead=r.Fu(()=>void this.batchRead(),t)}async read(e,t){const{cache:s}=this.args;await s.populateMissing([t]);const i=s.get(t),{series:o,gaps:a}=i.read(e);if(a.length===0)return o;const{mu:l}=this;return await new Promise((u,c)=>{l.runExclusive(async()=>{l.closed||l.requests.add({channel:t,gaps:a,resolve:u,reject:c})}),this.debouncedRead()}),i.read(e).series}async batchRead(){const{readRemote:e,cache:t,overlapThreshold:s}=this.args,{mu:i}=this;await i.runExclusive(async()=>{const o=a=>i.requests.forEach(({resolve:l,reject:u})=>a==null?l():u(a));try{if(i.closed)return o();const a=[];i.requests.forEach(({channel:l,gaps:u})=>u.forEach(c=>{const h=a.find(f=>f.gap.equals(c,s));h==null?a.push({gap:c,channels:new Set([l])}):(h.channels.add(l),h.gap=r.E.max(h.gap,c))})),await Promise.all(a.map(async({gap:l,channels:u})=>{const c=await e(l,Array.from(u));u.forEach(h=>t.get(h).writeStatic(c.get(h)))})),o()}catch(a){o(a)}finally{i.requests.clear()}})}async close(){await this.mu.runExclusive(async()=>{this.mu.closed=!0})}}const ul=new Error("request for lock canceled");var hl=function(n,e,t,s){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function l(h){try{c(s.next(h))}catch(f){a(f)}}function u(h){try{c(s.throw(h))}catch(f){a(f)}}function c(h){h.done?o(h.value):i(h.value).then(l,u)}c((s=s.apply(n,e||[])).next())})};class dl{constructor(e,t=ul){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}acquire(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise((s,i)=>{const o={resolve:s,reject:i,weight:e,priority:t},a=Ni(this._queue,l=>t<=l.priority);a===-1&&e<=this._value?this._dispatchItem(o):this._queue.splice(a+1,0,o)})}runExclusive(e){return hl(this,arguments,void 0,function*(t,s=1,i=0){const[o,a]=yield this.acquire(s,i);try{return yield t(o)}finally{a()}})}waitForUnlock(e=1,t=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise(s=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),fl(this._weightedWaiters[e-1],{resolve:s,priority:t})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(this._queue.length===0)for(let e=this._value;e>0;e--){const t=this._weightedWaiters[e-1];t&&(t.forEach(s=>s.resolve()),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let t=this._value;t>0;t--){const s=this._weightedWaiters[t-1];if(!s)continue;const i=s.findIndex(o=>o.priority<=e);(i===-1?s:s.splice(0,i)).forEach((o=>o.resolve()))}}}_couldLockImmediately(e,t){return(this._queue.length===0||this._queue[0].priority<t)&&e<=this._value}}function fl(n,e){const t=Ni(n,s=>e.priority<=s.priority);n.splice(t+1,0,e)}function Ni(n,e){for(let t=n.length-1;t>=0;t--)if(e(n[t]))return t;return-1}var pl=function(n,e,t,s){function i(o){return o instanceof t?o:new t(function(a){a(o)})}return new(t||(t=Promise))(function(o,a){function l(h){try{c(s.next(h))}catch(f){a(f)}}function u(h){try{c(s.throw(h))}catch(f){a(f)}}function c(h){h.done?o(h.value):i(h.value).then(l,u)}c((s=s.apply(n,e||[])).next())})};class gl{constructor(e){this._semaphore=new dl(1,e)}acquire(){return pl(this,arguments,void 0,function*(e=0){const[,t]=yield this._semaphore.acquire(1,e);return t})}runExclusive(e,t=0){return this._semaphore.runExclusive(()=>e(),1,t)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}const ml=r.g.milliseconds(100).milliseconds,yl=r.$.hz(60).valueOf();class bl{props;mu=new gl;listeners=new Map;debouncedUpdateStreamer;streamerRunLoop=null;streamer=null;closed=!1;constructor(e){this.props={instrumentation:g.g.NOOP,...e,streamUpdateDelay:new r.g(e.streamUpdateDelay??r.g.seconds(5))},this.debouncedUpdateStreamer=r.Fu(()=>void this.updateStreamer(),ml)}async stream(e,t){const{cache:s,instrumentation:i}=this.props;return this.closed?()=>{}:(await s.populateMissing(t),await this.mu.runExclusive(async()=>{i.L.debug("adding stream handler",{keys:t}),this.listeners.set(e,{valid:!0,keys:new Set(t)});const o=new Map(t.map(a=>{const l=s.get(a);return[a,new r.Ru(r.du.toArray(l.leadingBuffer))]}));return e(o),this.debouncedUpdateStreamer(),()=>this.removeStreamHandler(e)}))}removeStreamHandler(e){const{instrumentation:t}=this.props;this.mu.runExclusive(()=>{const s=this.listeners.get(e);s!=null&&(s.valid=!1)}),setTimeout(()=>{this.mu.runExclusive(async()=>{if(t.L.debug("removing stream handler"),this.listeners.delete(e))return this.debouncedUpdateStreamer();t.L.warn("attempted to remove non-existent stream handler")})},this.props.streamUpdateDelay.milliseconds)}async updateStreamer(){if(this.closed)return;const{instrumentation:e}=this.props;try{const t=new Set;if(this.listeners.forEach(o=>o.keys.forEach(a=>t.add(a))),t.size===0){e.L.info("no keys to stream, closing streamer"),this.streamer?.close(),this.streamerRunLoop!=null&&await this.streamerRunLoop,this.streamer=null,e.L.info("streamer closed successfully");return}const s=Array.from(t);if(r.wu.primitiveArrays(s,this.streamer?.keys??[])===r.wu.EQUAL){e.L.debug("streamer keys unchanged",{keys:s});return}this.streamer==null&&(e.L.info("creating new streamer",{keys:s}),this.streamer=await this.props.openStreamer({channels:s,throttleRate:yl}),this.streamerRunLoop=this.runStreamer(this.streamer)),e.L.debug("updating streamer",{prev:this.streamer.keys,next:s}),await this.streamer.update(s)}catch(t){throw e.L.error("failed to update streamer",{error:t}),t}}async runStreamer(e){const{cache:t,instrumentation:s}=this.props;try{for await(const i of e){const o=new Map;for(const a of i.keys){const l=i.get(a),c=t.get(a).writeDynamic(l);o.set(a,c)}o.size!==0&&this.listeners.forEach(({valid:a},l)=>a&&l(o))}}catch(i){throw s.L.error("streamer run loop failed",{error:i},!0),i}}async close(){const{instrumentation:e}=this.props;try{this.streamer?.close(),this.streamerRunLoop!=null&&await this.streamerRunLoop}catch(t){e.L.error("failed to close streamer",{error:t})}this.closed=!0}}class Sl{async retrieveChannel(){throw new g.$n("NoopClient does not support retrieving channels")}async read(){return new r.Ru([])}async stream(){return async()=>{}}async close(){}}class vl{ins;cache;reader;streamer;channelRetriever;constructor({instrumentation:e,core:t}){this.ins=e,this.channelRetriever=t.channels.createDebouncedBatchRetriever(10),this.cache=new ll({channelRetriever:this.channelRetriever,instrumentation:this.ins.child("cache")}),this.reader=new cl({cache:this.cache,readRemote:t.read.bind(t),instrumentation:this.ins.child("reader")}),this.streamer=new bl({cache:this.cache,openStreamer:async s=>g.jA.HardenedStreamer.open(t.openStreamer.bind(t),s),instrumentation:this.ins.child("streamer")})}async retrieveChannel(e){const t=await this.channelRetriever.retrieve([e]);if(t.length===0)throw new g.at(`channel ${e} not found`);return t[0]}async read(e,t){return await this.reader.read(e,t)}async stream(e,t){return await this.streamer.stream(e,t)}async close(){this.ins.L.info("closing client"),await this.streamer.close(),await this.reader.close(),this.cache.close()}}const Ms=d.z.object({}),dn="telem.Provider",Yi=n=>{class e extends g.Composite{static TYPE=dn;static stateZ=Ms;schema=e.stateZ;prevCore=null;client=null;afterUpdate(s){const{internal:i}=this,o=$e(s),a=g.useErrorHandler(s);if(i.instrumentation=Z.useInstrumentation(s,"telem").child("provider"),!(o!==this.prevCore||!s.wasSetPreviously(ft)))return;this.prevCore=o,this.client!=null&&a(async()=>{if(this.client==null)throw new Error("no client to close");await this.client.close()},"failed to close client"),this.client=o==null?new Sl:new vl({core:o,instrumentation:i.instrumentation});const u=n(this.client),c=new Li(u);ki(s,c)}}return e},zi=Yi(Pi),Ui={[dn]:zi},El=Object.freeze(Object.defineProperty({__proto__:null,AbstractSink:un,AbstractSource:j,Base:cn,BooleanStatus:Ie,CONTEXT_KEY:ft,ChannelData:Mt,ColorGradient:Ze,CompoundFactory:Is,Context:Li,FixedColorSource:zt,FixedNumber:Nt,FixedString:Yt,IterativeSeries:Dt,Mean:Oe,MultiSourceTransformer:ni,NoopFactory:Gr,PROVIDER_TYPE:dn,PipelineFactory:Cs,Provider:zi,REGISTRY:Ui,RemoteFactory:ai,RollingAverage:Ut,ScaleNumber:De,SeriesDownsampler:tt,SetPoint:_e,SinkPipeline:Ot,SourcePipeline:kt,StaticFactory:hi,StreamChannelData:Zt,StreamChannelValue:It,StringifyNumber:Me,TransformerFactory:mi,UnarySinkTransformer:si,UnarySourceTransformer:be,WithinBounds:ke,booleanSinkSpecZ:on,booleanSinkTransformerSpecZ:Ma,booleanSourceSpecZ:Es,booleanSourceTransformerSpecZ:Za,booleanStatus:ja,booleanStatusProps:vi,channelData:li,colorGradient:xi,colorGradientProps:wi,colorSourceSpecZ:an,connectionZ:ws,createFactory:Pi,createProvider:Yi,downsampleMode:Va,downsampleModeProps:Wa,downsampleModeZ:Os,fixedArray:za,fixedColor:Fa,fixedColorSourcePropsZ:gi,fixedNumber:Ba,fixedNumberPropsZ:fi,fixedSeriesPropsZ:Ps,fixedString:$a,fixedStringPropsZ:pi,iterativeArray:Ua,iterativeSeriesPropsZ:di,mean:Ha,noopBooleanSinkSpec:rn,noopBooleanSourceSpec:bs,noopColorSourceSpec:ut,noopNumericSinkSpec:jr,noopNumericSourceSpec:Wr,noopSeriesSourceSpec:Xr,noopStatusSourceSpec:vs,noopStringSinkSpec:Vr,noopStringSourceSpec:Ss,numberSinkSpecZ:ei,numberSourceSpecZ:Jr,providerStateZ:Ms,rollingAverage:Ti,rollingAverageProps:ks,scaleNumber:Ri,scaleNumberProps:Ci,seriesDownsampler:Ka,seriesSourceSpecZ:_t,setContext:ki,setpoint:yi,sinkPipeline:ii,sinkPipelinePropsZ:Rs,sinkSpecZ:dt,sinkTransformerSpecZ:Qr,sourcePipeline:ri,sourcePipelinePropsZ:xs,sourceSpecZ:ce,sourceTransformerSpecZ:Kr,specZ:ht,statusSourceSpecZ:Ts,streamChannelData:ci,streamChannelValue:ui,streamChannelValuePropsZ:As,stringSinkSpecZ:ti,stringSourceSpecZ:ln,stringifyNumber:Ei,stringifyNumberProps:_s,useChildContext:Oi,useContext:hn,useSink:Fe,useSource:$,withinBounds:bi,withinBoundsProps:Ls},Symbol.toStringTag,{value:"Module"})),lr=`#version 300 es
|
|
3
3
|
precision lowp float;
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synnaxlabs/pluto",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@fontsource-variable/inter": "^5.2.8",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"proxy-memoize": "2.0.3",
|
|
20
20
|
"react": "^19.2.3",
|
|
21
21
|
"react-color": "^2.19.3",
|
|
22
|
-
"react-icons": "
|
|
22
|
+
"react-icons": "5.5.0",
|
|
23
23
|
"zod": "^4.1.13",
|
|
24
24
|
"@synnaxlabs/alamos": "^0.50.0",
|
|
25
25
|
"@synnaxlabs/client": "^0.50.0",
|
|
26
|
-
"@synnaxlabs/media": "0.50.0",
|
|
27
26
|
"@synnaxlabs/freighter": "0.50.0",
|
|
28
|
-
"@synnaxlabs/x": "^0.50.0"
|
|
27
|
+
"@synnaxlabs/x": "^0.50.0",
|
|
28
|
+
"@synnaxlabs/media": "0.50.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@juggle/resize-observer": "^3.4.0",
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"jsdom": "^27.3.0",
|
|
46
46
|
"madge": "^8.0.0",
|
|
47
47
|
"react-dom": "^19.2.3",
|
|
48
|
-
"typescript": "
|
|
48
|
+
"typescript": "5.9.3",
|
|
49
49
|
"vite": "^7.2.7",
|
|
50
50
|
"vitest": "^3.2.4",
|
|
51
51
|
"@synnaxlabs/tsconfig": "^0.50.0",
|
|
52
|
-
"eslint-config-synnaxlabs": "^0.50.0",
|
|
53
52
|
"@synnaxlabs/vite-plugin": "^0.50.0",
|
|
54
|
-
"stylelint-config-synnaxlabs": "^0.50.0"
|
|
53
|
+
"stylelint-config-synnaxlabs": "^0.50.0",
|
|
54
|
+
"eslint-config-synnaxlabs": "^0.50.0"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist"
|