@liduchuan/atlas-loop 0.1.0 → 0.1.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.
@@ -3,6 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta name="theme-color" content="#fafafa" />
6
7
  <title>__ATLAS_HTML_TITLE__</title>
7
8
  <style>/* this gets exported as style.css and can be used for the default theming */
8
9
  /* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
@@ -630,297 +631,532 @@ svg.react-flow__connectionline {
630
631
  fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
631
632
  }
632
633
 
634
+ :root {
635
+ --bg-canvas: #fafafa;
636
+ --bg-surface: #ffffff;
637
+ --bg-subtle: #f4f4f5;
638
+ --bg-hover: #e4e4e7;
639
+ --bg-active: #18181b;
640
+ --text-primary: #09090b;
641
+ --text-secondary: #52525b;
642
+ --text-muted: #71717a;
643
+ --text-inverse: #fafafa;
644
+ --border-subtle: #e4e4e7;
645
+ --border-strong: #d4d4d8;
646
+ --border-focus: #18181b;
647
+ --accent-warn-bg: #fafaf9;
648
+ --accent-warn-border: #d6d3d1;
649
+ --accent-warn-text: #78716c;
650
+ --accent-ok-dot: #15803d;
651
+ --accent-warn-dot: #b45309;
652
+ --shadow-xs: 0 1px 2px rgba(9, 9, 11, 0.04);
653
+ --shadow-sm: 0 2px 8px rgba(9, 9, 11, 0.06);
654
+ --shadow-md: 0 12px 32px rgba(9, 9, 11, 0.12);
655
+ --radius-sm: 6px;
656
+ --radius-md: 8px;
657
+ --radius-lg: 10px;
658
+ }
659
+
660
+ *,
661
+ *::before,
662
+ *::after {
663
+ box-sizing: border-box;
664
+ }
665
+
666
+ @media (pointer: fine) {
667
+ html {
668
+ overscroll-behavior: none;
669
+ }
670
+ }
633
671
 
634
- * { box-sizing: border-box; }
635
- html, body, #root {
672
+ html,
673
+ body,
674
+ #root {
636
675
  margin: 0;
637
676
  padding: 0;
638
- width: 100vw;
639
- height: 100vh;
677
+ width: 100%;
678
+ height: 100%;
640
679
  overflow: hidden;
641
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
642
- color: #0f172a;
643
- background: #f8fafc;
680
+ font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
681
+ font-size: 13px;
682
+ line-height: 1.5;
683
+ color: var(--text-primary);
684
+ background-color: var(--bg-canvas);
685
+ -webkit-font-smoothing: antialiased;
686
+ }
687
+
688
+ .sr-only {
689
+ position: absolute;
690
+ width: 1px;
691
+ height: 1px;
692
+ padding: 0;
693
+ margin: -1px;
694
+ overflow: hidden;
695
+ clip: rect(0, 0, 0, 0);
696
+ white-space: nowrap;
697
+ border: 0;
698
+ }
699
+
700
+ .atlas-skip-link {
701
+ position: absolute;
702
+ top: -48px;
703
+ left: 12px;
704
+ z-index: 999;
705
+ padding: 6px 12px;
706
+ background: var(--bg-active);
707
+ color: var(--text-inverse);
708
+ border-radius: var(--radius-sm);
709
+ text-decoration: none;
710
+ font-weight: 500;
711
+ }
712
+
713
+ .atlas-skip-link:focus-visible {
714
+ top: 12px;
715
+ }
716
+
717
+ button,
718
+ a,
719
+ input {
720
+ font-family: inherit;
721
+ touch-action: manipulation;
722
+ -webkit-tap-highlight-color: transparent;
644
723
  }
724
+
725
+ button:focus-visible,
726
+ a:focus-visible,
727
+ input:focus-visible {
728
+ outline: 2px solid var(--border-focus);
729
+ outline-offset: 2px;
730
+ }
731
+
645
732
  .atlas-shell-root {
646
733
  display: flex;
647
734
  flex-direction: column;
648
- width: 100vw;
649
- height: 100vh;
735
+ width: 100%;
736
+ height: 100%;
737
+ padding-top: env(safe-area-inset-top);
738
+ padding-bottom: env(safe-area-inset-bottom);
739
+ padding-left: env(safe-area-inset-left);
740
+ padding-right: env(safe-area-inset-right);
650
741
  }
742
+
743
+ /* Top Header */
651
744
  .atlas-topbar {
652
745
  display: flex;
653
746
  justify-content: space-between;
654
- align-items: flex-start;
747
+ align-items: center;
655
748
  gap: 16px;
656
- padding: 12px 20px;
657
- background: #ffffff;
658
- border-bottom: 1px solid #e2e8f0;
749
+ padding: 10px 20px;
750
+ background: var(--bg-surface);
751
+ border-bottom: 1px solid var(--border-subtle);
659
752
  flex-shrink: 0;
660
753
  }
754
+
755
+ .atlas-topbar-left {
756
+ min-width: 0;
757
+ flex: 1;
758
+ }
759
+
661
760
  .atlas-top-badges {
662
761
  display: flex;
663
762
  align-items: center;
664
- gap: 8px;
665
- margin-bottom: 4px;
763
+ gap: 6px;
764
+ margin-bottom: 2px;
666
765
  flex-wrap: wrap;
667
766
  }
767
+
668
768
  .atlas-parent-link {
669
- font-size: 12px;
670
- font-weight: 600;
671
- color: #2563eb;
672
- background: #eff6ff;
673
- border: 1px solid #bfdbfe;
674
- padding: 2px 8px;
675
- border-radius: 999px;
769
+ display: inline-flex;
770
+ align-items: center;
771
+ gap: 4px;
772
+ font-size: 11.5px;
773
+ font-weight: 500;
774
+ color: var(--text-primary);
775
+ background: var(--bg-subtle);
776
+ border: 1px solid var(--border-subtle);
777
+ padding: 1px 8px;
778
+ border-radius: var(--radius-sm);
676
779
  text-decoration: none;
780
+ transition: background-color 140ms ease, border-color 140ms ease;
677
781
  }
678
- .atlas-parent-link:hover { background: #dbeafe; }
679
- .atlas-subject-badge {
680
- font-size: 11.5px;
681
- font-weight: 600;
682
- color: #475569;
683
- background: #f1f5f9;
684
- padding: 2px 8px;
685
- border-radius: 999px;
782
+
783
+ .atlas-parent-link:hover {
784
+ background: var(--bg-hover);
785
+ border-color: var(--border-strong);
686
786
  }
787
+
788
+ .atlas-subject-badge,
687
789
  .atlas-level-badge {
688
- font-size: 11.5px;
689
- font-weight: 600;
690
- color: #0f766e;
691
- background: #ccfbf1;
692
- padding: 2px 8px;
693
- border-radius: 999px;
790
+ font-size: 11px;
791
+ font-weight: 500;
792
+ color: var(--text-secondary);
793
+ background: var(--bg-subtle);
794
+ border: 1px solid var(--border-subtle);
795
+ padding: 1px 7px;
796
+ border-radius: var(--radius-sm);
797
+ font-variant-numeric: tabular-nums;
798
+ }
799
+
800
+ .atlas-title-row {
801
+ display: flex;
802
+ align-items: baseline;
803
+ gap: 10px;
804
+ flex-wrap: wrap;
805
+ min-width: 0;
694
806
  }
807
+
695
808
  .atlas-main-title {
696
809
  margin: 0;
697
- font-size: 18px;
698
- font-weight: 700;
699
- line-height: 1.3;
810
+ font-size: 15px;
811
+ font-weight: 600;
812
+ letter-spacing: -0.01em;
813
+ line-height: 1.35;
814
+ text-wrap: balance;
700
815
  }
816
+
701
817
  .atlas-subtitle {
702
- margin: 2px 0 0 0;
703
- font-size: 12.5px;
704
- color: #64748b;
818
+ margin: 0;
819
+ font-size: 12px;
820
+ color: var(--text-muted);
821
+ text-wrap: pretty;
705
822
  }
823
+
706
824
  .atlas-topbar-right {
707
825
  display: flex;
708
826
  align-items: center;
709
827
  gap: 8px;
710
828
  flex-shrink: 0;
711
829
  }
830
+
712
831
  .atlas-model-pill {
713
- font-size: 12px;
714
- font-weight: 600;
715
- color: #1e293b;
716
- background: #f1f5f9;
717
- border: 1px solid #cbd5e1;
718
- padding: 5px 10px;
719
- border-radius: 8px;
832
+ font-size: 11.5px;
833
+ font-weight: 500;
834
+ color: var(--text-secondary);
835
+ background: var(--bg-subtle);
836
+ border: 1px solid var(--border-subtle);
837
+ padding: 4px 9px;
838
+ border-radius: var(--radius-sm);
839
+ font-variant-numeric: tabular-nums;
720
840
  }
841
+
721
842
  .atlas-scope-btn {
722
- font-size: 12px;
723
- font-weight: 600;
724
- color: #b45309;
725
- background: #fef3c7;
726
- border: 1px solid #fde68a;
727
- padding: 5px 10px;
728
- border-radius: 8px;
843
+ font-size: 11.5px;
844
+ font-weight: 500;
845
+ color: var(--text-primary);
846
+ background: var(--bg-surface);
847
+ border: 1px solid var(--border-strong);
848
+ padding: 4px 9px;
849
+ border-radius: var(--radius-sm);
729
850
  cursor: pointer;
851
+ font-variant-numeric: tabular-nums;
852
+ transition: background-color 140ms ease, border-color 140ms ease;
730
853
  }
854
+
855
+ .atlas-scope-btn:hover {
856
+ background: var(--bg-subtle);
857
+ }
858
+
859
+ /* Toolbar */
731
860
  .atlas-toolbar-row {
732
861
  display: flex;
733
862
  justify-content: space-between;
734
863
  align-items: center;
735
864
  gap: 12px;
736
- padding: 8px 20px;
737
- background: #f8fafc;
738
- border-bottom: 1px solid #e2e8f0;
865
+ padding: 7px 20px;
866
+ background: var(--bg-surface);
867
+ border-bottom: 1px solid var(--border-subtle);
739
868
  flex-shrink: 0;
740
869
  flex-wrap: wrap;
741
870
  }
871
+
742
872
  .atlas-streams-bar {
743
873
  display: flex;
744
874
  align-items: center;
745
875
  gap: 6px;
746
876
  flex-wrap: wrap;
877
+ min-width: 0;
747
878
  }
879
+
748
880
  .atlas-stream-pill-group {
749
881
  display: inline-flex;
750
882
  align-items: center;
883
+ border: 1px solid var(--border-subtle);
884
+ border-radius: var(--radius-sm);
885
+ background: var(--bg-surface);
886
+ overflow: hidden;
887
+ }
888
+
889
+ .atlas-stream-pill-group.active {
890
+ border-color: var(--bg-active);
751
891
  }
892
+
752
893
  .atlas-stream-pill {
753
- font-size: 12.5px;
894
+ font-size: 12px;
754
895
  font-weight: 500;
755
- padding: 5px 11px;
756
- border-radius: 999px;
757
- border: 1px solid #cbd5e1;
758
- background: #ffffff;
759
- color: #334155;
896
+ padding: 4px 10px;
897
+ border: 1px solid var(--border-subtle);
898
+ border-radius: var(--radius-sm);
899
+ background: var(--bg-surface);
900
+ color: var(--text-secondary);
760
901
  cursor: pointer;
902
+ transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
903
+ }
904
+
905
+ .atlas-stream-pill-group .atlas-stream-pill {
906
+ border: none;
907
+ border-radius: 0;
908
+ }
909
+
910
+ .atlas-stream-pill:hover {
911
+ background: var(--bg-subtle);
912
+ color: var(--text-primary);
761
913
  }
914
+
762
915
  .atlas-stream-pill.active {
763
- background: #0f172a;
764
- color: #ffffff;
765
- border-color: #0f172a;
916
+ background: var(--bg-active);
917
+ color: var(--text-inverse);
918
+ border-color: var(--bg-active);
766
919
  }
920
+
767
921
  .atlas-stream-help-btn {
768
- margin-left: -4px;
769
- width: 22px;
770
- height: 22px;
771
- border-radius: 50%;
772
- border: 1px solid #93c5fd;
773
- background: #eff6ff;
774
- color: #1d4ed8;
775
- font-weight: 700;
776
- font-size: 12px;
922
+ width: 24px;
923
+ height: 26px;
924
+ border: none;
925
+ border-left: 1px solid var(--border-subtle);
926
+ background: var(--bg-subtle);
927
+ color: var(--text-secondary);
928
+ font-weight: 600;
929
+ font-size: 11.5px;
777
930
  cursor: pointer;
931
+ display: inline-flex;
932
+ align-items: center;
933
+ justify-content: center;
934
+ transition: background-color 140ms ease, color 140ms ease;
935
+ }
936
+
937
+ .atlas-stream-help-btn:hover {
938
+ background: var(--bg-hover);
939
+ color: var(--text-primary);
778
940
  }
941
+
779
942
  .atlas-controls-group {
780
943
  display: flex;
781
944
  align-items: center;
782
- gap: 10px;
945
+ gap: 8px;
783
946
  flex-wrap: wrap;
784
947
  }
948
+
785
949
  .atlas-search-box {
786
950
  position: relative;
787
951
  }
952
+
953
+ .atlas-search-field {
954
+ display: flex;
955
+ align-items: center;
956
+ gap: 6px;
957
+ padding: 0 9px;
958
+ height: 28px;
959
+ border: 1px solid var(--border-subtle);
960
+ border-radius: var(--radius-sm);
961
+ background: var(--bg-canvas);
962
+ transition: border-color 140ms ease, background-color 140ms ease;
963
+ }
964
+
965
+ .atlas-search-field:focus-within {
966
+ background: var(--bg-surface);
967
+ border-color: var(--border-focus);
968
+ }
969
+
970
+ .atlas-search-icon {
971
+ color: var(--text-muted);
972
+ flex-shrink: 0;
973
+ }
974
+
788
975
  .atlas-search-input {
789
- width: 250px;
790
- padding: 6px 10px;
791
- font-size: 12.5px;
792
- border: 1px solid #cbd5e1;
793
- border-radius: 8px;
794
- background: #ffffff;
976
+ width: 210px;
977
+ border: none;
978
+ background: transparent;
979
+ font-size: 12px;
980
+ color: var(--text-primary);
981
+ padding: 0;
982
+ }
983
+
984
+ .atlas-search-input:focus {
795
985
  outline: none;
796
986
  }
797
- .atlas-search-input:focus { border-color: #2563eb; }
987
+
988
+ .atlas-search-input::placeholder {
989
+ color: var(--text-muted);
990
+ }
991
+
798
992
  .atlas-search-dropdown {
799
993
  position: absolute;
800
994
  top: calc(100% + 4px);
801
- left: 0;
995
+ right: 0;
802
996
  width: 320px;
803
997
  max-height: 300px;
804
998
  overflow-y: auto;
805
- background: #ffffff;
806
- border: 1px solid #cbd5e1;
807
- border-radius: 10px;
808
- box-shadow: 0 10px 25px rgba(15, 23, 42, 0.14);
809
- z-index: 50;
999
+ overscroll-behavior: contain;
1000
+ background: var(--bg-surface);
1001
+ border: 1px solid var(--border-strong);
1002
+ border-radius: var(--radius-md);
1003
+ box-shadow: var(--shadow-md);
1004
+ z-index: 60;
810
1005
  padding: 4px;
811
1006
  }
1007
+
812
1008
  .atlas-search-item {
813
1009
  display: block;
814
1010
  width: 100%;
815
1011
  text-align: left;
816
- padding: 7px 9px;
1012
+ padding: 6px 8px;
817
1013
  border: none;
818
1014
  background: transparent;
819
- border-radius: 6px;
1015
+ border-radius: var(--radius-sm);
820
1016
  cursor: pointer;
1017
+ transition: background-color 120ms ease;
1018
+ }
1019
+
1020
+ .atlas-search-item:hover {
1021
+ background: var(--bg-subtle);
821
1022
  }
822
- .atlas-search-item:hover { background: #f1f5f9; }
1023
+
823
1024
  .atlas-search-item-title {
824
- font-size: 12.5px;
1025
+ font-size: 12px;
825
1026
  font-weight: 600;
826
- color: #0f172a;
1027
+ color: var(--text-primary);
827
1028
  display: flex;
828
1029
  align-items: center;
829
1030
  gap: 6px;
1031
+ min-width: 0;
830
1032
  }
1033
+
831
1034
  .atlas-search-item-sub {
832
- font-size: 11.5px;
833
- color: #64748b;
1035
+ font-size: 11px;
1036
+ color: var(--text-muted);
834
1037
  margin-top: 2px;
1038
+ overflow: hidden;
1039
+ text-overflow: ellipsis;
1040
+ white-space: nowrap;
835
1041
  }
1042
+
836
1043
  .atlas-search-empty {
837
1044
  padding: 10px;
838
1045
  font-size: 12px;
839
- color: #64748b;
1046
+ color: var(--text-muted);
840
1047
  }
1048
+
841
1049
  .atlas-canvas-btns {
842
- display: flex;
1050
+ display: inline-flex;
843
1051
  align-items: center;
844
- gap: 6px;
1052
+ gap: 4px;
845
1053
  flex-wrap: wrap;
846
1054
  }
1055
+
847
1056
  .atlas-ctrl-btn {
848
- padding: 5px 10px;
1057
+ display: inline-flex;
1058
+ align-items: center;
1059
+ gap: 5px;
1060
+ height: 28px;
1061
+ padding: 0 9px;
849
1062
  font-size: 12px;
850
- font-weight: 600;
851
- background: #ffffff;
852
- color: #1e293b;
853
- border: 1px solid #cbd5e1;
854
- border-radius: 7px;
1063
+ font-weight: 500;
1064
+ background: var(--bg-surface);
1065
+ color: var(--text-secondary);
1066
+ border: 1px solid var(--border-subtle);
1067
+ border-radius: var(--radius-sm);
855
1068
  cursor: pointer;
1069
+ transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
856
1070
  }
857
- .atlas-ctrl-btn:hover { background: #f1f5f9; }
858
- .atlas-ctrl-btn.locked {
859
- background: #fef2f2;
860
- color: #b91c1c;
861
- border-color: #fca5a5;
1071
+
1072
+ .atlas-ctrl-btn:hover {
1073
+ background: var(--bg-subtle);
1074
+ color: var(--text-primary);
1075
+ border-color: var(--border-strong);
862
1076
  }
1077
+
1078
+ .atlas-ctrl-btn.locked,
863
1079
  .atlas-ctrl-btn.active {
864
- background: #e0f2fe;
865
- border-color: #7dd3fc;
866
- color: #0369a1;
867
- }
868
- .atlas-ctrl-btn.reset-btn {
869
- background: #f8fafc;
870
- border-color: #94a3b8;
1080
+ background: var(--bg-active);
1081
+ color: var(--text-inverse);
1082
+ border-color: var(--bg-active);
871
1083
  }
1084
+
1085
+ /* Recommended Learning Path */
872
1086
  .atlas-reading-bar {
873
1087
  display: flex;
874
1088
  align-items: center;
875
1089
  gap: 8px;
876
1090
  padding: 6px 20px;
877
- background: #ffffff;
878
- border-bottom: 1px solid #e2e8f0;
1091
+ background: var(--bg-canvas);
1092
+ border-bottom: 1px solid var(--border-subtle);
879
1093
  overflow-x: auto;
880
1094
  flex-shrink: 0;
881
1095
  }
1096
+
882
1097
  .atlas-reading-label {
883
- font-size: 12px;
884
- font-weight: 600;
885
- color: #475569;
1098
+ font-size: 11.5px;
1099
+ font-weight: 500;
1100
+ color: var(--text-muted);
886
1101
  white-space: nowrap;
887
1102
  }
1103
+
888
1104
  .atlas-reading-steps {
889
1105
  display: flex;
890
1106
  align-items: center;
891
- gap: 6px;
1107
+ gap: 4px;
892
1108
  }
1109
+
893
1110
  .atlas-step-chip {
894
1111
  display: inline-flex;
895
1112
  align-items: center;
896
1113
  gap: 5px;
897
- font-size: 12px;
898
- padding: 3px 9px;
899
- border-radius: 999px;
900
- border: 1px solid #e2e8f0;
901
- background: #f8fafc;
902
- color: #334155;
1114
+ font-size: 11.5px;
1115
+ font-weight: 500;
1116
+ padding: 2px 8px;
1117
+ border-radius: var(--radius-sm);
1118
+ border: 1px solid transparent;
1119
+ background: transparent;
1120
+ color: var(--text-secondary);
903
1121
  cursor: pointer;
904
1122
  white-space: nowrap;
1123
+ font-variant-numeric: tabular-nums;
1124
+ transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
1125
+ }
1126
+
1127
+ .atlas-step-chip:hover {
1128
+ background: var(--bg-surface);
1129
+ border-color: var(--border-subtle);
1130
+ color: var(--text-primary);
905
1131
  }
1132
+
906
1133
  .atlas-step-chip.active {
907
- border-color: #2563eb;
908
- background: #eff6ff;
909
- color: #1d4ed8;
1134
+ background: var(--bg-surface);
1135
+ border-color: var(--border-focus);
1136
+ color: var(--text-primary);
910
1137
  font-weight: 600;
911
1138
  }
1139
+
912
1140
  .atlas-step-num {
913
1141
  display: inline-flex;
914
1142
  align-items: center;
915
1143
  justify-content: center;
916
- width: 16px;
1144
+ min-width: 16px;
917
1145
  height: 16px;
918
- border-radius: 50%;
919
- background: #cbd5e1;
920
- color: #0f172a;
1146
+ padding: 0 4px;
1147
+ border-radius: 4px;
1148
+ background: var(--bg-subtle);
1149
+ color: var(--text-secondary);
921
1150
  font-size: 10.5px;
922
- font-weight: 700;
1151
+ font-weight: 600;
1152
+ }
1153
+
1154
+ .atlas-step-chip.active .atlas-step-num {
1155
+ background: var(--bg-active);
1156
+ color: var(--text-inverse);
923
1157
  }
1158
+
1159
+ /* Workspace & Canvas */
924
1160
  .atlas-main-workspace {
925
1161
  flex: 1;
926
1162
  min-height: 0;
@@ -928,187 +1164,281 @@ html, body, #root {
928
1164
  position: relative;
929
1165
  width: 100%;
930
1166
  }
1167
+
931
1168
  .atlas-canvas-container {
932
1169
  flex: 1;
933
1170
  height: 100%;
934
1171
  min-height: 400px;
935
1172
  position: relative;
1173
+ background: var(--bg-canvas);
1174
+ }
1175
+
1176
+ /* Node Card — Restrained Architectural Style */
1177
+ .react-flow__node-atlasNode {
1178
+ border-radius: var(--radius-lg) !important;
1179
+ box-shadow: none !important;
1180
+ }
1181
+
1182
+ .react-flow__node-atlasNode:focus,
1183
+ .react-flow__node-atlasNode:focus-visible {
1184
+ outline: none !important;
1185
+ }
1186
+
1187
+ .react-flow__node-atlasNode:focus-visible .atlas-node {
1188
+ outline: 2px solid var(--border-focus);
1189
+ outline-offset: 2px;
936
1190
  }
1191
+
937
1192
  .atlas-node {
938
- border: 1px solid #cbd5e1;
939
- border-radius: 11px;
940
- padding: 10px 12px;
941
- box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
1193
+ background: var(--bg-surface);
1194
+ border: 1px solid var(--border-subtle);
1195
+ border-radius: var(--radius-lg);
1196
+ padding: 11px 13px;
1197
+ box-shadow: var(--shadow-xs);
942
1198
  display: flex;
943
1199
  flex-direction: column;
944
1200
  gap: 6px;
945
- cursor: pointer;
946
1201
  position: relative;
1202
+ transition: border-color 140ms ease, box-shadow 140ms ease;
947
1203
  }
1204
+
1205
+ .atlas-node:hover {
1206
+ border-color: var(--border-strong);
1207
+ box-shadow: var(--shadow-sm);
1208
+ }
1209
+
948
1210
  .atlas-node-sub {
1211
+ background: var(--bg-canvas);
949
1212
  border-style: dashed;
1213
+ border-color: var(--border-strong);
950
1214
  }
1215
+
951
1216
  .atlas-node-selected {
952
- outline: 2.5px solid #2563eb;
953
- box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
1217
+ border-color: var(--border-focus) !important;
1218
+ box-shadow: 0 0 0 1px var(--border-focus), var(--shadow-sm) !important;
954
1219
  }
1220
+
955
1221
  .atlas-handle {
956
- width: 8px !important;
957
- height: 8px !important;
958
- background: #64748b !important;
1222
+ width: 6px !important;
1223
+ height: 6px !important;
1224
+ background: var(--border-strong) !important;
1225
+ border: 1px solid var(--bg-surface) !important;
959
1226
  }
1227
+
960
1228
  .atlas-node-header {
961
1229
  display: flex;
962
1230
  justify-content: space-between;
963
1231
  align-items: center;
964
1232
  gap: 6px;
965
1233
  }
1234
+
966
1235
  .atlas-node-badges {
967
1236
  display: flex;
968
1237
  align-items: center;
969
- gap: 4px;
1238
+ gap: 5px;
970
1239
  flex-wrap: wrap;
1240
+ min-width: 0;
971
1241
  }
1242
+
972
1243
  .atlas-role-badge {
1244
+ display: inline-flex;
1245
+ align-items: center;
1246
+ gap: 5px;
973
1247
  font-size: 10.5px;
974
- font-weight: 700;
975
- padding: 2px 6px;
976
- border-radius: 5px;
1248
+ font-weight: 500;
1249
+ color: var(--text-secondary);
1250
+ background: var(--bg-subtle);
1251
+ border: 1px solid var(--border-subtle);
1252
+ padding: 1px 6px;
1253
+ border-radius: 4px;
1254
+ }
1255
+
1256
+ .atlas-role-dot {
1257
+ width: 6px;
1258
+ height: 6px;
1259
+ border-radius: 50%;
1260
+ flex-shrink: 0;
977
1261
  }
1262
+
978
1263
  .atlas-sub-pill {
979
1264
  font-size: 10px;
980
- font-weight: 600;
1265
+ font-weight: 500;
981
1266
  padding: 1px 5px;
982
1267
  border-radius: 4px;
983
- background: #e0f2fe;
984
- color: #0369a1;
1268
+ background: var(--bg-subtle);
1269
+ color: var(--text-muted);
985
1270
  }
1271
+
986
1272
  .atlas-unverified-pill {
987
1273
  font-size: 10px;
988
- font-weight: 700;
1274
+ font-weight: 500;
989
1275
  padding: 1px 5px;
990
1276
  border-radius: 4px;
991
- background: #fef3c7;
992
- color: #b45309;
993
- border: 1px dashed #f59e0b;
1277
+ background: var(--accent-warn-bg);
1278
+ color: var(--accent-warn-text);
1279
+ border: 1px dashed var(--accent-warn-border);
994
1280
  }
1281
+
995
1282
  .atlas-help-wrap {
996
1283
  position: relative;
997
1284
  flex-shrink: 0;
998
1285
  }
1286
+
999
1287
  .atlas-help-btn {
1000
- width: 22px;
1001
- height: 22px;
1288
+ width: 20px;
1289
+ height: 20px;
1002
1290
  border-radius: 50%;
1003
- border: 1.5px solid #2563eb;
1004
- background: #eff6ff;
1005
- color: #1d4ed8;
1006
- font-size: 12.5px;
1007
- font-weight: 800;
1291
+ border: 1px solid var(--border-strong);
1292
+ background: var(--bg-surface);
1293
+ color: var(--text-secondary);
1294
+ font-size: 11.5px;
1295
+ font-weight: 600;
1008
1296
  line-height: 1;
1009
1297
  display: inline-flex;
1010
1298
  align-items: center;
1011
1299
  justify-content: center;
1012
1300
  cursor: pointer;
1301
+ transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
1013
1302
  }
1303
+
1014
1304
  .atlas-help-btn:hover {
1015
- background: #2563eb;
1016
- color: #ffffff;
1305
+ background: var(--bg-active);
1306
+ border-color: var(--bg-active);
1307
+ color: var(--text-inverse);
1017
1308
  }
1309
+
1018
1310
  .atlas-help-tooltip {
1019
1311
  position: absolute;
1020
- bottom: calc(100% + 8px);
1312
+ bottom: calc(100% + 7px);
1021
1313
  right: 0;
1022
- width: 230px;
1314
+ width: 224px;
1023
1315
  padding: 7px 9px;
1024
- background: #0f172a;
1025
- color: #f8fafc;
1026
- font-size: 11.5px;
1027
- line-height: 1.4;
1028
- border-radius: 8px;
1029
- box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
1316
+ background: var(--bg-active);
1317
+ color: var(--text-inverse);
1318
+ font-size: 11px;
1319
+ line-height: 1.45;
1320
+ border-radius: var(--radius-sm);
1321
+ box-shadow: var(--shadow-md);
1030
1322
  z-index: 100;
1031
1323
  pointer-events: none;
1324
+ text-wrap: pretty;
1325
+ }
1326
+
1327
+ .atlas-node-body {
1328
+ display: block;
1329
+ width: 100%;
1330
+ padding: 0;
1331
+ margin: 0;
1332
+ text-align: left;
1333
+ color: inherit;
1334
+ min-width: 0;
1032
1335
  }
1336
+
1033
1337
  .atlas-node-title {
1034
- font-size: 13.5px;
1035
- font-weight: 700;
1036
- color: #0f172a;
1037
- line-height: 1.35;
1338
+ font-size: 13px;
1339
+ font-weight: 600;
1340
+ color: var(--text-primary);
1341
+ line-height: 1.38;
1342
+ overflow-wrap: break-word;
1343
+ text-wrap: balance;
1038
1344
  }
1345
+
1039
1346
  .atlas-node-summary {
1347
+ margin-top: 3px;
1040
1348
  font-size: 11.5px;
1041
- color: #475569;
1349
+ color: var(--text-muted);
1042
1350
  line-height: 1.45;
1043
1351
  display: -webkit-box;
1044
1352
  -webkit-line-clamp: 2;
1045
1353
  -webkit-box-orient: vertical;
1046
1354
  overflow: hidden;
1355
+ overflow-wrap: break-word;
1047
1356
  }
1357
+
1048
1358
  .atlas-node-footer {
1049
1359
  display: flex;
1050
1360
  justify-content: space-between;
1051
1361
  align-items: center;
1052
1362
  margin-top: 2px;
1053
- padding-top: 5px;
1054
- border-top: 1px solid rgba(148, 163, 184, 0.25);
1363
+ padding-top: 6px;
1364
+ border-top: 1px solid var(--border-subtle);
1055
1365
  }
1366
+
1056
1367
  .atlas-expand-btn {
1057
1368
  font-size: 11px;
1058
- font-weight: 600;
1059
- padding: 2px 8px;
1060
- border-radius: 5px;
1061
- border: 1px solid #94a3b8;
1062
- background: #ffffff;
1063
- color: #1e293b;
1369
+ font-weight: 500;
1370
+ padding: 2px 7px;
1371
+ border-radius: 4px;
1372
+ border: 1px solid var(--border-subtle);
1373
+ background: var(--bg-subtle);
1374
+ color: var(--text-secondary);
1064
1375
  cursor: pointer;
1376
+ font-variant-numeric: tabular-nums;
1377
+ transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
1065
1378
  }
1379
+
1380
+ .atlas-expand-btn:hover {
1381
+ background: var(--bg-hover);
1382
+ color: var(--text-primary);
1383
+ }
1384
+
1066
1385
  .atlas-expand-btn.active {
1067
- background: #0ea5e9;
1068
- border-color: #0ea5e9;
1069
- color: #ffffff;
1386
+ background: var(--bg-active);
1387
+ border-color: var(--bg-active);
1388
+ color: var(--text-inverse);
1070
1389
  }
1390
+
1071
1391
  .atlas-anchor-count {
1072
1392
  font-size: 10.5px;
1073
- font-weight: 600;
1074
- color: #64748b;
1393
+ font-weight: 500;
1394
+ color: var(--text-muted);
1395
+ font-variant-numeric: tabular-nums;
1075
1396
  }
1397
+
1398
+ /* Legend */
1076
1399
  .atlas-legend-card {
1077
1400
  position: absolute;
1078
- top: 14px;
1079
- left: 14px;
1401
+ top: 12px;
1402
+ left: 12px;
1080
1403
  background: rgba(255, 255, 255, 0.96);
1081
- border: 1px solid #cbd5e1;
1082
- border-radius: 10px;
1404
+ border: 1px solid var(--border-subtle);
1405
+ border-radius: var(--radius-md);
1083
1406
  padding: 10px 12px;
1084
- box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
1407
+ box-shadow: var(--shadow-sm);
1085
1408
  z-index: 20;
1086
1409
  display: flex;
1087
1410
  flex-direction: column;
1088
- gap: 6px;
1411
+ gap: 5px;
1089
1412
  }
1413
+
1090
1414
  .atlas-legend-row {
1091
1415
  display: flex;
1092
1416
  align-items: center;
1093
1417
  gap: 8px;
1094
- font-size: 12px;
1095
- color: #1e293b;
1418
+ font-size: 11.5px;
1419
+ color: var(--text-secondary);
1096
1420
  }
1421
+
1097
1422
  .atlas-legend-swatch {
1098
- width: 12px;
1099
- height: 12px;
1100
- border-radius: 3px;
1423
+ width: 7px;
1424
+ height: 7px;
1425
+ border-radius: 50%;
1101
1426
  }
1427
+
1428
+ /* Right Inspector Drawer */
1102
1429
  .atlas-inspector {
1103
- width: 390px;
1430
+ width: 380px;
1104
1431
  max-width: 44vw;
1105
1432
  height: 100%;
1106
1433
  overflow-y: auto;
1107
- background: #ffffff;
1108
- border-left: 1px solid #e2e8f0;
1434
+ overflow-x: hidden;
1435
+ overscroll-behavior: contain;
1436
+ background: var(--bg-surface);
1437
+ border-left: 1px solid var(--border-subtle);
1109
1438
  padding: 16px 18px;
1110
1439
  flex-shrink: 0;
1111
1440
  }
1441
+
1112
1442
  .atlas-inspector-head {
1113
1443
  display: flex;
1114
1444
  justify-content: space-between;
@@ -1116,208 +1446,298 @@ html, body, #root {
1116
1446
  gap: 10px;
1117
1447
  margin-bottom: 10px;
1118
1448
  }
1449
+
1450
+ .atlas-inspector-head-text {
1451
+ min-width: 0;
1452
+ }
1453
+
1119
1454
  .atlas-inspector-parent {
1120
- font-size: 11.5px;
1121
- color: #64748b;
1455
+ font-size: 11px;
1456
+ color: var(--text-muted);
1122
1457
  margin-bottom: 2px;
1123
1458
  }
1459
+
1124
1460
  .atlas-inspector-title {
1125
1461
  margin: 0;
1126
- font-size: 16px;
1127
- font-weight: 700;
1462
+ font-size: 15px;
1463
+ font-weight: 600;
1464
+ line-height: 1.35;
1465
+ text-wrap: balance;
1466
+ overflow-wrap: break-word;
1128
1467
  }
1468
+
1129
1469
  .atlas-icon-close {
1130
1470
  padding: 4px 8px;
1131
- font-size: 12px;
1132
- border: 1px solid #cbd5e1;
1133
- border-radius: 6px;
1134
- background: #f8fafc;
1471
+ font-size: 11.5px;
1472
+ font-weight: 500;
1473
+ color: var(--text-secondary);
1474
+ border: 1px solid var(--border-subtle);
1475
+ border-radius: var(--radius-sm);
1476
+ background: var(--bg-surface);
1135
1477
  cursor: pointer;
1478
+ flex-shrink: 0;
1479
+ transition: background-color 140ms ease, color 140ms ease;
1480
+ }
1481
+
1482
+ .atlas-icon-close:hover {
1483
+ background: var(--bg-subtle);
1484
+ color: var(--text-primary);
1136
1485
  }
1486
+
1137
1487
  .atlas-conf-badge {
1138
- display: inline-block;
1488
+ display: inline-flex;
1489
+ align-items: center;
1490
+ gap: 5px;
1139
1491
  font-size: 11px;
1140
- font-weight: 700;
1141
- padding: 2px 8px;
1142
- border-radius: 999px;
1492
+ font-weight: 500;
1493
+ padding: 2px 7px;
1494
+ border-radius: 4px;
1495
+ background: var(--bg-subtle);
1496
+ color: var(--text-secondary);
1497
+ border: 1px solid var(--border-subtle);
1143
1498
  }
1144
- .atlas-conf-badge.ok { background: #dcfce7; color: #15803d; }
1145
- .atlas-conf-badge.warn { background: #fef3c7; color: #b45309; }
1499
+
1146
1500
  .atlas-unverified-note {
1147
1501
  margin: 6px 0 0 0;
1148
1502
  font-size: 12px;
1149
- color: #b45309;
1150
- background: #fffbeb;
1151
- padding: 6px 8px;
1152
- border-radius: 6px;
1503
+ color: var(--text-secondary);
1504
+ background: var(--bg-subtle);
1505
+ border-left: 2px solid var(--accent-warn-dot);
1506
+ padding: 6px 9px;
1507
+ border-radius: 0 4px 4px 0;
1153
1508
  }
1509
+
1154
1510
  .atlas-sec {
1155
1511
  margin-top: 14px;
1156
1512
  padding-top: 12px;
1157
- border-top: 1px solid #f1f5f9;
1513
+ border-top: 1px solid var(--border-subtle);
1158
1514
  }
1515
+
1159
1516
  .atlas-sec h4 {
1160
- margin: 0 0 6px 0;
1161
- font-size: 12.5px;
1162
- color: #475569;
1517
+ margin: 0 0 5px 0;
1518
+ font-size: 11.5px;
1519
+ font-weight: 600;
1520
+ color: var(--text-muted);
1521
+ letter-spacing: 0.01em;
1163
1522
  }
1164
- .atlas-sec p, .atlas-kv {
1523
+
1524
+ .atlas-sec p,
1525
+ .atlas-kv {
1165
1526
  margin: 0;
1166
- font-size: 13px;
1167
- line-height: 1.55;
1168
- color: #1e293b;
1527
+ font-size: 12.5px;
1528
+ line-height: 1.58;
1529
+ color: var(--text-primary);
1530
+ overflow-wrap: break-word;
1531
+ text-wrap: pretty;
1532
+ }
1533
+
1534
+ .atlas-kv + .atlas-kv {
1535
+ margin-top: 6px;
1169
1536
  }
1170
- .atlas-kv + .atlas-kv { margin-top: 6px; }
1537
+
1171
1538
  .atlas-watchout-box {
1172
- background: #fffbeb;
1173
- border: 1px solid #fde68a;
1174
- border-radius: 8px;
1175
- padding: 10px 12px;
1539
+ background: var(--bg-canvas);
1540
+ border: 1px solid var(--border-subtle);
1541
+ border-radius: var(--radius-sm);
1542
+ padding: 9px 11px;
1176
1543
  }
1544
+
1177
1545
  .atlas-anchor-list {
1178
1546
  display: flex;
1179
1547
  flex-direction: column;
1180
1548
  gap: 8px;
1181
1549
  }
1550
+
1182
1551
  .atlas-anchor-card {
1183
- border: 1px solid #e2e8f0;
1184
- border-radius: 8px;
1552
+ border: 1px solid var(--border-subtle);
1553
+ border-radius: var(--radius-sm);
1185
1554
  padding: 9px 10px;
1186
- background: #f8fafc;
1555
+ background: var(--bg-canvas);
1556
+ min-width: 0;
1187
1557
  }
1558
+
1188
1559
  .atlas-anchor-label {
1189
- font-size: 12px;
1190
- font-weight: 700;
1560
+ font-size: 11.5px;
1561
+ font-weight: 600;
1562
+ color: var(--text-primary);
1191
1563
  margin-bottom: 4px;
1192
1564
  }
1565
+
1193
1566
  .atlas-anchor-editor code {
1194
1567
  display: block;
1195
1568
  font-size: 11.5px;
1196
- color: #0f172a;
1569
+ color: var(--text-secondary);
1197
1570
  word-break: break-all;
1198
1571
  margin-bottom: 6px;
1572
+ font-variant-numeric: tabular-nums;
1199
1573
  }
1574
+
1200
1575
  .atlas-editor-btn {
1201
- display: inline-block;
1202
- padding: 5px 10px;
1203
- font-size: 12px;
1204
- font-weight: 600;
1205
- background: #2563eb;
1206
- color: #ffffff;
1207
- border-radius: 6px;
1576
+ display: inline-flex;
1577
+ align-items: center;
1578
+ padding: 4px 9px;
1579
+ font-size: 11.5px;
1580
+ font-weight: 500;
1581
+ background: var(--bg-active);
1582
+ color: var(--text-inverse);
1583
+ border-radius: var(--radius-sm);
1208
1584
  text-decoration: none;
1585
+ transition: opacity 140ms ease;
1586
+ }
1587
+
1588
+ .atlas-editor-btn:hover {
1589
+ opacity: 0.88;
1209
1590
  }
1591
+
1210
1592
  .atlas-editor-hint {
1211
1593
  margin-top: 5px;
1212
1594
  font-size: 11px;
1213
- color: #64748b;
1595
+ color: var(--text-muted);
1214
1596
  }
1597
+
1215
1598
  .atlas-anchor-snippet pre {
1216
1599
  margin: 4px 0 6px 0;
1217
- padding: 8px;
1218
- background: #0f172a;
1219
- color: #f8fafc;
1220
- border-radius: 6px;
1600
+ padding: 8px 10px;
1601
+ background: var(--bg-surface);
1602
+ color: var(--text-primary);
1603
+ border: 1px solid var(--border-subtle);
1604
+ border-radius: var(--radius-sm);
1221
1605
  font-size: 11.5px;
1222
1606
  overflow-x: auto;
1223
1607
  white-space: pre-wrap;
1608
+ word-break: break-word;
1224
1609
  }
1610
+
1225
1611
  .atlas-ext-link {
1226
1612
  font-size: 12px;
1227
- color: #2563eb;
1613
+ color: var(--text-primary);
1614
+ text-decoration: underline;
1615
+ text-underline-offset: 2px;
1228
1616
  word-break: break-all;
1229
1617
  }
1618
+
1230
1619
  .atlas-source-cite {
1231
1620
  font-size: 12px;
1232
- color: #334155;
1621
+ color: var(--text-secondary);
1233
1622
  }
1623
+
1234
1624
  .atlas-open-dive-btn {
1235
1625
  width: 100%;
1236
- padding: 9px 12px;
1237
- font-size: 13px;
1238
- font-weight: 700;
1239
- color: #1d4ed8;
1240
- background: #eff6ff;
1241
- border: 1.5px solid #93c5fd;
1242
- border-radius: 8px;
1626
+ padding: 8px 12px;
1627
+ font-size: 12px;
1628
+ font-weight: 500;
1629
+ color: var(--text-primary);
1630
+ background: var(--bg-subtle);
1631
+ border: 1px solid var(--border-strong);
1632
+ border-radius: var(--radius-sm);
1243
1633
  cursor: pointer;
1634
+ transition: background-color 140ms ease, border-color 140ms ease;
1244
1635
  }
1636
+
1637
+ .atlas-open-dive-btn:hover {
1638
+ background: var(--bg-hover);
1639
+ }
1640
+
1641
+ /* Modal */
1245
1642
  .atlas-modal-backdrop {
1246
1643
  position: fixed;
1247
1644
  inset: 0;
1248
- background: rgba(15, 23, 42, 0.45);
1645
+ background: rgba(9, 9, 11, 0.36);
1249
1646
  display: flex;
1250
1647
  align-items: center;
1251
1648
  justify-content: center;
1252
1649
  z-index: 200;
1253
1650
  padding: 24px;
1254
1651
  }
1652
+
1255
1653
  .atlas-modal {
1256
- width: 680px;
1654
+ width: 660px;
1257
1655
  max-width: 92vw;
1258
- max-height: 84vh;
1259
- background: #ffffff;
1260
- border-radius: 14px;
1261
- box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
1656
+ max-height: 82vh;
1657
+ background: var(--bg-surface);
1658
+ border: 1px solid var(--border-subtle);
1659
+ border-radius: var(--radius-lg);
1660
+ box-shadow: var(--shadow-md);
1262
1661
  display: flex;
1263
1662
  flex-direction: column;
1264
1663
  overflow: hidden;
1265
1664
  }
1665
+
1266
1666
  .atlas-modal-header {
1267
1667
  display: flex;
1268
1668
  justify-content: space-between;
1269
1669
  align-items: flex-start;
1270
- padding: 16px 20px;
1271
- border-bottom: 1px solid #e2e8f0;
1670
+ gap: 12px;
1671
+ padding: 14px 18px;
1672
+ border-bottom: 1px solid var(--border-subtle);
1272
1673
  }
1674
+
1273
1675
  .atlas-modal-kicker {
1274
- font-size: 11.5px;
1275
- font-weight: 700;
1276
- color: #2563eb;
1676
+ font-size: 11px;
1677
+ font-weight: 500;
1678
+ color: var(--text-muted);
1277
1679
  margin-bottom: 2px;
1278
1680
  }
1681
+
1279
1682
  .atlas-modal-title {
1280
1683
  margin: 0;
1281
- font-size: 17px;
1282
- font-weight: 700;
1684
+ font-size: 15px;
1685
+ font-weight: 600;
1686
+ text-wrap: balance;
1283
1687
  }
1688
+
1284
1689
  .atlas-modal-tabs {
1285
1690
  display: flex;
1286
- gap: 8px;
1287
- padding: 10px 20px;
1288
- background: #f8fafc;
1289
- border-bottom: 1px solid #e2e8f0;
1691
+ gap: 6px;
1692
+ padding: 8px 18px;
1693
+ background: var(--bg-canvas);
1694
+ border-bottom: 1px solid var(--border-subtle);
1290
1695
  }
1696
+
1291
1697
  .atlas-tab-btn {
1292
- padding: 6px 12px;
1293
- font-size: 12.5px;
1294
- font-weight: 600;
1295
- border-radius: 7px;
1296
- border: 1px solid #cbd5e1;
1297
- background: #ffffff;
1298
- color: #475569;
1698
+ padding: 5px 11px;
1699
+ font-size: 12px;
1700
+ font-weight: 500;
1701
+ border-radius: var(--radius-sm);
1702
+ border: 1px solid transparent;
1703
+ background: transparent;
1704
+ color: var(--text-secondary);
1299
1705
  cursor: pointer;
1706
+ font-variant-numeric: tabular-nums;
1707
+ transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
1708
+ }
1709
+
1710
+ .atlas-tab-btn:hover {
1711
+ color: var(--text-primary);
1712
+ background: var(--bg-subtle);
1300
1713
  }
1714
+
1301
1715
  .atlas-tab-btn.active {
1302
- background: #1d4ed8;
1303
- border-color: #1d4ed8;
1304
- color: #ffffff;
1716
+ background: var(--bg-surface);
1717
+ border-color: var(--border-strong);
1718
+ color: var(--text-primary);
1719
+ box-shadow: var(--shadow-xs);
1305
1720
  }
1721
+
1306
1722
  .atlas-modal-body {
1307
- padding: 16px 20px;
1723
+ padding: 16px 18px;
1308
1724
  overflow-y: auto;
1725
+ overscroll-behavior: contain;
1309
1726
  }
1727
+
1310
1728
  .atlas-prompt-list {
1311
1729
  display: flex;
1312
1730
  flex-direction: column;
1313
1731
  gap: 12px;
1314
1732
  }
1733
+
1315
1734
  .atlas-prompt-card {
1316
- border: 1px solid #cbd5e1;
1317
- border-radius: 10px;
1735
+ border: 1px solid var(--border-subtle);
1736
+ border-radius: var(--radius-md);
1318
1737
  padding: 12px 14px;
1319
- background: #f8fafc;
1738
+ background: var(--bg-canvas);
1320
1739
  }
1740
+
1321
1741
  .atlas-prompt-card-head {
1322
1742
  display: flex;
1323
1743
  justify-content: space-between;
@@ -1325,61 +1745,167 @@ html, body, #root {
1325
1745
  gap: 10px;
1326
1746
  margin-bottom: 8px;
1327
1747
  }
1748
+
1328
1749
  .atlas-prompt-pre {
1329
1750
  margin: 0;
1330
1751
  padding: 10px 12px;
1331
- background: #ffffff;
1332
- border: 1px solid #e2e8f0;
1333
- border-radius: 8px;
1334
- font-size: 12.5px;
1335
- line-height: 1.55;
1752
+ background: var(--bg-surface);
1753
+ border: 1px solid var(--border-subtle);
1754
+ border-radius: var(--radius-sm);
1755
+ font-size: 12px;
1756
+ line-height: 1.58;
1336
1757
  white-space: pre-wrap;
1337
1758
  word-break: break-word;
1338
- color: #0f172a;
1759
+ color: var(--text-primary);
1339
1760
  }
1761
+
1340
1762
  .atlas-copy-btn {
1341
- padding: 5px 11px;
1342
- font-size: 12px;
1343
- font-weight: 600;
1344
- border-radius: 6px;
1345
- border: 1px solid #2563eb;
1346
- background: #2563eb;
1347
- color: #ffffff;
1763
+ padding: 4px 10px;
1764
+ font-size: 11.5px;
1765
+ font-weight: 500;
1766
+ border-radius: var(--radius-sm);
1767
+ border: 1px solid var(--bg-active);
1768
+ background: var(--bg-active);
1769
+ color: var(--text-inverse);
1348
1770
  cursor: pointer;
1349
1771
  white-space: nowrap;
1772
+ transition: opacity 140ms ease, background-color 140ms ease, border-color 140ms ease;
1350
1773
  }
1774
+
1775
+ .atlas-copy-btn:hover {
1776
+ opacity: 0.88;
1777
+ }
1778
+
1351
1779
  .atlas-copy-btn.small {
1352
1780
  padding: 3px 8px;
1353
1781
  font-size: 11px;
1782
+ background: var(--bg-surface);
1783
+ color: var(--text-primary);
1784
+ border-color: var(--border-strong);
1354
1785
  }
1786
+
1355
1787
  .atlas-copy-btn.copied {
1356
- background: #16a34a;
1357
- border-color: #16a34a;
1788
+ background: var(--accent-ok-dot);
1789
+ border-color: var(--accent-ok-dot);
1790
+ color: var(--text-inverse);
1358
1791
  }
1792
+
1359
1793
  .atlas-hint-p {
1360
1794
  margin: 0 0 10px 0;
1361
- font-size: 12.5px;
1362
- color: #475569;
1795
+ font-size: 12px;
1796
+ color: var(--text-secondary);
1797
+ }
1798
+
1799
+ /* React Flow Overrides for Clean Restraint */
1800
+ .react-flow__edge-textbg {
1801
+ rx: 4;
1802
+ ry: 4;
1803
+ }
1804
+
1805
+ .react-flow__minimap {
1806
+ background-color: var(--bg-surface) !important;
1807
+ border: 1px solid var(--border-subtle) !important;
1808
+ border-radius: var(--radius-md) !important;
1809
+ box-shadow: var(--shadow-xs) !important;
1810
+ }
1811
+
1812
+ @media (prefers-reduced-motion: reduce) {
1813
+ *,
1814
+ *::before,
1815
+ *::after {
1816
+ animation-duration: 0.01ms !important;
1817
+ animation-iteration-count: 1 !important;
1818
+ transition-duration: 0.01ms !important;
1819
+ scroll-behavior: auto !important;
1820
+ }
1363
1821
  }
1364
1822
  </style>
1365
1823
  </head>
1366
1824
  <body>
1367
1825
  <div id="root"></div>
1368
1826
  <script id="atlas-data-json" type="application/json">__ATLAS_DATA_JSON__</script>
1369
- <script>(()=>{var fK=Object.create;var{getPrototypeOf:$K,defineProperty:RF,getOwnPropertyNames:FK}=Object;var lK=Object.prototype.hasOwnProperty;function UK(u){return this[u]}var _K,QK,If=(u,f,$)=>{var F=u!=null&&typeof u==="object";if(F){var l=f?_K??=new WeakMap:QK??=new WeakMap,U=l.get(u);if(U)return U}$=u!=null?fK($K(u)):{};let _=f||!u||!u.__esModule?RF($,"default",{value:u,enumerable:!0}):$;for(let Q of FK(u))if(!lK.call(_,Q))RF(_,Q,{get:UK.bind(u,Q),enumerable:!0});if(F)l.set(u,_);return _};var o=(u,f)=>()=>(f||u((f={exports:{}}).exports,f),f.exports);var kF=o((_u)=>{var z4=Symbol.for("react.element"),JK=Symbol.for("react.portal"),qK=Symbol.for("react.fragment"),TK=Symbol.for("react.strict_mode"),AK=Symbol.for("react.profiler"),WK=Symbol.for("react.provider"),KK=Symbol.for("react.context"),wK=Symbol.for("react.forward_ref"),BK=Symbol.for("react.suspense"),LK=Symbol.for("react.memo"),GK=Symbol.for("react.lazy"),MF=Symbol.iterator;function HK(u){if(u===null||typeof u!=="object")return null;return u=MF&&u[MF]||u["@@iterator"],typeof u==="function"?u:null}var XF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},DF=Object.assign,OF={};function M1(u,f,$){this.props=u,this.context=f,this.refs=OF,this.updater=$||XF}M1.prototype.isReactComponent={};M1.prototype.setState=function(u,f){if(typeof u!=="object"&&typeof u!=="function"&&u!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,f,"setState")};M1.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function SF(){}SF.prototype=M1.prototype;function A5(u,f,$){this.props=u,this.context=f,this.refs=OF,this.updater=$||XF}var W5=A5.prototype=new SF;W5.constructor=A5;DF(W5,M1.prototype);W5.isPureReactComponent=!0;var EF=Array.isArray,jF=Object.prototype.hasOwnProperty,K5={current:null},NF={key:!0,ref:!0,__self:!0,__source:!0};function IF(u,f,$){var F,l={},U=null,_=null;if(f!=null)for(F in f.ref!==void 0&&(_=f.ref),f.key!==void 0&&(U=""+f.key),f)jF.call(f,F)&&!NF.hasOwnProperty(F)&&(l[F]=f[F]);var Q=arguments.length-2;if(Q===1)l.children=$;else if(1<Q){for(var J=Array(Q),q=0;q<Q;q++)J[q]=arguments[q+2];l.children=J}if(u&&u.defaultProps)for(F in Q=u.defaultProps,Q)l[F]===void 0&&(l[F]=Q[F]);return{$$typeof:z4,type:u,key:U,ref:_,props:l,_owner:K5.current}}function zK(u,f){return{$$typeof:z4,type:u.type,key:f,ref:u.ref,props:u.props,_owner:u._owner}}function w5(u){return typeof u==="object"&&u!==null&&u.$$typeof===z4}function ZK(u){var f={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,function($){return f[$]})}var VF=/\/+/g;function T5(u,f){return typeof u==="object"&&u!==null&&u.key!=null?ZK(""+u.key):f.toString(36)}function h3(u,f,$,F,l){var U=typeof u;if(U==="undefined"||U==="boolean")u=null;var _=!1;if(u===null)_=!0;else switch(U){case"string":case"number":_=!0;break;case"object":switch(u.$$typeof){case z4:case JK:_=!0}}if(_)return _=u,l=l(_),u=F===""?"."+T5(_,0):F,EF(l)?($="",u!=null&&($=u.replace(VF,"$&/")+"/"),h3(l,f,$,"",function(q){return q})):l!=null&&(w5(l)&&(l=zK(l,$+(!l.key||_&&_.key===l.key?"":(""+l.key).replace(VF,"$&/")+"/")+u)),f.push(l)),1;if(_=0,F=F===""?".":F+":",EF(u))for(var Q=0;Q<u.length;Q++){U=u[Q];var J=F+T5(U,Q);_+=h3(U,f,$,J,l)}else if(J=HK(u),typeof J==="function")for(u=J.call(u),Q=0;!(U=u.next()).done;)U=U.value,J=F+T5(U,Q++),_+=h3(U,f,$,J,l);else if(U==="object")throw f=String(u),Error("Objects are not valid as a React child (found: "+(f==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":f)+"). If you meant to render a collection of children, use an array instead.");return _}function C3(u,f,$){if(u==null)return u;var F=[],l=0;return h3(u,F,"","",function(U){return f.call($,U,l++)}),F}function YK(u){if(u._status===-1){var f=u._result;f=f(),f.then(function($){if(u._status===0||u._status===-1)u._status=1,u._result=$},function($){if(u._status===0||u._status===-1)u._status=2,u._result=$}),u._status===-1&&(u._status=0,u._result=f)}if(u._status===1)return u._result.default;throw u._result}var cu={current:null},v3={transition:null},RK={ReactCurrentDispatcher:cu,ReactCurrentBatchConfig:v3,ReactCurrentOwner:K5};function yF(){throw Error("act(...) is not supported in production builds of React.")}_u.Children={map:C3,forEach:function(u,f,$){C3(u,function(){f.apply(this,arguments)},$)},count:function(u){var f=0;return C3(u,function(){f++}),f},toArray:function(u){return C3(u,function(f){return f})||[]},only:function(u){if(!w5(u))throw Error("React.Children.only expected to receive a single React element child.");return u}};_u.Component=M1;_u.Fragment=qK;_u.Profiler=AK;_u.PureComponent=A5;_u.StrictMode=TK;_u.Suspense=BK;_u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RK;_u.act=yF;_u.cloneElement=function(u,f,$){if(u===null||u===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+u+".");var F=DF({},u.props),l=u.key,U=u.ref,_=u._owner;if(f!=null){if(f.ref!==void 0&&(U=f.ref,_=K5.current),f.key!==void 0&&(l=""+f.key),u.type&&u.type.defaultProps)var Q=u.type.defaultProps;for(J in f)jF.call(f,J)&&!NF.hasOwnProperty(J)&&(F[J]=f[J]===void 0&&Q!==void 0?Q[J]:f[J])}var J=arguments.length-2;if(J===1)F.children=$;else if(1<J){Q=Array(J);for(var q=0;q<J;q++)Q[q]=arguments[q+2];F.children=Q}return{$$typeof:z4,type:u.type,key:l,ref:U,props:F,_owner:_}};_u.createContext=function(u){return u={$$typeof:KK,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},u.Provider={$$typeof:WK,_context:u},u.Consumer=u};_u.createElement=IF;_u.createFactory=function(u){var f=IF.bind(null,u);return f.type=u,f};_u.createRef=function(){return{current:null}};_u.forwardRef=function(u){return{$$typeof:wK,render:u}};_u.isValidElement=w5;_u.lazy=function(u){return{$$typeof:GK,_payload:{_status:-1,_result:u},_init:YK}};_u.memo=function(u,f){return{$$typeof:LK,type:u,compare:f===void 0?null:f}};_u.startTransition=function(u){var f=v3.transition;v3.transition={};try{u()}finally{v3.transition=f}};_u.unstable_act=yF;_u.useCallback=function(u,f){return cu.current.useCallback(u,f)};_u.useContext=function(u){return cu.current.useContext(u)};_u.useDebugValue=function(){};_u.useDeferredValue=function(u){return cu.current.useDeferredValue(u)};_u.useEffect=function(u,f){return cu.current.useEffect(u,f)};_u.useId=function(){return cu.current.useId()};_u.useImperativeHandle=function(u,f,$){return cu.current.useImperativeHandle(u,f,$)};_u.useInsertionEffect=function(u,f){return cu.current.useInsertionEffect(u,f)};_u.useLayoutEffect=function(u,f){return cu.current.useLayoutEffect(u,f)};_u.useMemo=function(u,f){return cu.current.useMemo(u,f)};_u.useReducer=function(u,f,$){return cu.current.useReducer(u,f,$)};_u.useRef=function(u){return cu.current.useRef(u)};_u.useState=function(u){return cu.current.useState(u)};_u.useSyncExternalStore=function(u,f,$){return cu.current.useSyncExternalStore(u,f,$)};_u.useTransition=function(){return cu.current.useTransition()};_u.version="18.3.1"});var W0=o((tV,PF)=>{PF.exports=kF()});var mF=o((Au)=>{function L5(u,f){var $=u.length;u.push(f);u:for(;0<$;){var F=$-1>>>1,l=u[F];if(0<x3(l,f))u[F]=f,u[$]=l,$=F;else break u}}function zf(u){return u.length===0?null:u[0]}function b3(u){if(u.length===0)return null;var f=u[0],$=u.pop();if($!==f){u[0]=$;u:for(var F=0,l=u.length,U=l>>>1;F<U;){var _=2*(F+1)-1,Q=u[_],J=_+1,q=u[J];if(0>x3(Q,$))J<l&&0>x3(q,Q)?(u[F]=q,u[J]=$,F=J):(u[F]=Q,u[_]=$,F=_);else if(J<l&&0>x3(q,$))u[F]=q,u[J]=$,F=J;else break u}}return f}function x3(u,f){var $=u.sortIndex-f.sortIndex;return $!==0?$:u.id-f.id}if(typeof performance==="object"&&typeof performance.now==="function")G5=performance,Au.unstable_now=function(){return G5.now()};else c3=Date,H5=c3.now(),Au.unstable_now=function(){return c3.now()-H5};var G5,c3,H5,yf=[],K0=[],MK=1,_f=null,Pu=3,i3=!1,i0=!1,Y4=!1,CF=typeof setTimeout==="function"?setTimeout:null,hF=typeof clearTimeout==="function"?clearTimeout:null,rF=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z5(u){for(var f=zf(K0);f!==null;){if(f.callback===null)b3(K0);else if(f.startTime<=u)b3(K0),f.sortIndex=f.expirationTime,L5(yf,f);else break;f=zf(K0)}}function Y5(u){if(Y4=!1,z5(u),!i0)if(zf(yf)!==null)i0=!0,M5(R5);else{var f=zf(K0);f!==null&&E5(Y5,f.startTime-u)}}function R5(u,f){i0=!1,Y4&&(Y4=!1,hF(R4),R4=-1),i3=!0;var $=Pu;try{z5(f);for(_f=zf(yf);_f!==null&&(!(_f.expirationTime>f)||u&&!cF());){var F=_f.callback;if(typeof F==="function"){_f.callback=null,Pu=_f.priorityLevel;var l=F(_f.expirationTime<=f);f=Au.unstable_now(),typeof l==="function"?_f.callback=l:_f===zf(yf)&&b3(yf),z5(f)}else b3(yf);_f=zf(yf)}if(_f!==null)var U=!0;else{var _=zf(K0);_!==null&&E5(Y5,_.startTime-f),U=!1}return U}finally{_f=null,Pu=$,i3=!1}}var g3=!1,m3=null,R4=-1,vF=5,xF=-1;function cF(){return Au.unstable_now()-xF<vF?!1:!0}function B5(){if(m3!==null){var u=Au.unstable_now();xF=u;var f=!0;try{f=m3(!0,u)}finally{f?Z4():(g3=!1,m3=null)}}else g3=!1}var Z4;if(typeof rF==="function")Z4=function(){rF(B5)};else if(typeof MessageChannel<"u")p3=new MessageChannel,Z5=p3.port2,p3.port1.onmessage=B5,Z4=function(){Z5.postMessage(null)};else Z4=function(){CF(B5,0)};var p3,Z5;function M5(u){m3=u,g3||(g3=!0,Z4())}function E5(u,f){R4=CF(function(){u(Au.unstable_now())},f)}Au.unstable_IdlePriority=5;Au.unstable_ImmediatePriority=1;Au.unstable_LowPriority=4;Au.unstable_NormalPriority=3;Au.unstable_Profiling=null;Au.unstable_UserBlockingPriority=2;Au.unstable_cancelCallback=function(u){u.callback=null};Au.unstable_continueExecution=function(){i0||i3||(i0=!0,M5(R5))};Au.unstable_forceFrameRate=function(u){0>u||125<u?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):vF=0<u?Math.floor(1000/u):5};Au.unstable_getCurrentPriorityLevel=function(){return Pu};Au.unstable_getFirstCallbackNode=function(){return zf(yf)};Au.unstable_next=function(u){switch(Pu){case 1:case 2:case 3:var f=3;break;default:f=Pu}var $=Pu;Pu=f;try{return u()}finally{Pu=$}};Au.unstable_pauseExecution=function(){};Au.unstable_requestPaint=function(){};Au.unstable_runWithPriority=function(u,f){switch(u){case 1:case 2:case 3:case 4:case 5:break;default:u=3}var $=Pu;Pu=u;try{return f()}finally{Pu=$}};Au.unstable_scheduleCallback=function(u,f,$){var F=Au.unstable_now();switch(typeof $==="object"&&$!==null?($=$.delay,$=typeof $==="number"&&0<$?F+$:F):$=F,u){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5000}return l=$+l,u={id:MK++,callback:f,priorityLevel:u,startTime:$,expirationTime:l,sortIndex:-1},$>F?(u.sortIndex=$,L5(K0,u),zf(yf)===null&&u===zf(K0)&&(Y4?(hF(R4),R4=-1):Y4=!0,E5(Y5,$-F))):(u.sortIndex=l,L5(yf,u),i0||i3||(i0=!0,M5(R5))),u};Au.unstable_shouldYield=cF;Au.unstable_wrapCallback=function(u){var f=Pu;return function(){var $=Pu;Pu=f;try{return u.apply(this,arguments)}finally{Pu=$}}}});var bF=o((dV,pF)=>{pF.exports=mF()});var g_=o((Ff)=>{var EK=W0(),ff=bF();function p(u){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+u,$=1;$<arguments.length;$++)f+="&args[]="+encodeURIComponent(arguments[$]);return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nl=new Set,s4={};function U1(u,f){b1(u,f),b1(u+"Capture",f)}function b1(u,f){s4[u]=f;for(u=0;u<f.length;u++)nl.add(f[u])}var u0=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g5=Object.prototype.hasOwnProperty,VK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,iF={},gF={};function XK(u){if(g5.call(gF,u))return!0;if(g5.call(iF,u))return!1;if(VK.test(u))return gF[u]=!0;return iF[u]=!0,!1}function DK(u,f,$,F){if($!==null&&$.type===0)return!1;switch(typeof f){case"function":case"symbol":return!0;case"boolean":if(F)return!1;if($!==null)return!$.acceptsBooleans;return u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-";default:return!1}}function OK(u,f,$,F){if(f===null||typeof f>"u"||DK(u,f,$,F))return!0;if(F)return!1;if($!==null)switch($.type){case 3:return!f;case 4:return f===!1;case 5:return isNaN(f);case 6:return isNaN(f)||1>f}return!1}function bu(u,f,$,F,l,U,_){this.acceptsBooleans=f===2||f===3||f===4,this.attributeName=F,this.attributeNamespace=l,this.mustUseProperty=$,this.propertyName=u,this.type=f,this.sanitizeURL=U,this.removeEmptyString=_}var ku={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){ku[u]=new bu(u,0,!1,u,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var f=u[0];ku[f]=new bu(f,1,!1,u[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(u){ku[u]=new bu(u,2,!1,u.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){ku[u]=new bu(u,2,!1,u,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(u){ku[u]=new bu(u,3,!1,u.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(u){ku[u]=new bu(u,3,!0,u,null,!1,!1)});["capture","download"].forEach(function(u){ku[u]=new bu(u,4,!1,u,null,!1,!1)});["cols","rows","size","span"].forEach(function(u){ku[u]=new bu(u,6,!1,u,null,!1,!1)});["rowSpan","start"].forEach(function(u){ku[u]=new bu(u,5,!1,u.toLowerCase(),null,!1,!1)});var x9=/[\-:]([a-z])/g;function c9(u){return u[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(u){var f=u.replace(x9,c9);ku[f]=new bu(f,1,!1,u,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var f=u.replace(x9,c9);ku[f]=new bu(f,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(u){var f=u.replace(x9,c9);ku[f]=new bu(f,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(u){ku[u]=new bu(u,1,!1,u.toLowerCase(),null,!1,!1)});ku.xlinkHref=new bu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(u){ku[u]=new bu(u,1,!1,u.toLowerCase(),null,!0,!0)});function m9(u,f,$,F){var l=ku.hasOwnProperty(f)?ku[f]:null;if(l!==null?l.type!==0:F||!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")OK(f,$,l,F)&&($=null),F||l===null?XK(f)&&($===null?u.removeAttribute(f):u.setAttribute(f,""+$)):l.mustUseProperty?u[l.propertyName]=$===null?l.type===3?!1:"":$:(f=l.attributeName,F=l.attributeNamespace,$===null?u.removeAttribute(f):(l=l.type,$=l===3||l===4&&$===!0?"":""+$,F?u.setAttributeNS(F,f,$):u.setAttribute(f,$)))}var l0=EK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s3=Symbol.for("react.element"),X1=Symbol.for("react.portal"),D1=Symbol.for("react.fragment"),p9=Symbol.for("react.strict_mode"),s5=Symbol.for("react.profiler"),dl=Symbol.for("react.provider"),al=Symbol.for("react.context"),b9=Symbol.for("react.forward_ref"),t5=Symbol.for("react.suspense"),n5=Symbol.for("react.suspense_list"),i9=Symbol.for("react.memo"),B0=Symbol.for("react.lazy"),ol=Symbol.for("react.offscreen"),sF=Symbol.iterator;function M4(u){if(u===null||typeof u!=="object")return null;return u=sF&&u[sF]||u["@@iterator"],typeof u==="function"?u:null}var Zu=Object.assign,V5;function j4(u){if(V5===void 0)try{throw Error()}catch($){var f=$.stack.trim().match(/\n( *(at )?)/);V5=f&&f[1]||""}return`
1370
- `+V5+u}var X5=!1;function D5(u,f){if(!u||X5)return"";X5=!0;var $=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(q){var F=q}Reflect.construct(u,[],f)}else{try{f.call()}catch(q){F=q}u.call(f.prototype)}else{try{throw Error()}catch(q){F=q}u()}}catch(q){if(q&&F&&typeof q.stack==="string"){for(var l=q.stack.split(`
1371
- `),U=F.stack.split(`
1372
- `),_=l.length-1,Q=U.length-1;1<=_&&0<=Q&&l[_]!==U[Q];)Q--;for(;1<=_&&0<=Q;_--,Q--)if(l[_]!==U[Q]){if(_!==1||Q!==1)do if(_--,Q--,0>Q||l[_]!==U[Q]){var J=`
1373
- `+l[_].replace(" at new "," at ");return u.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",u.displayName)),J}while(1<=_&&0<=Q);break}}}finally{X5=!1,Error.prepareStackTrace=$}return(u=u?u.displayName||u.name:"")?j4(u):""}function SK(u){switch(u.tag){case 5:return j4(u.type);case 16:return j4("Lazy");case 13:return j4("Suspense");case 19:return j4("SuspenseList");case 0:case 2:case 15:return u=D5(u.type,!1),u;case 11:return u=D5(u.type.render,!1),u;case 1:return u=D5(u.type,!0),u;default:return""}}function d5(u){if(u==null)return null;if(typeof u==="function")return u.displayName||u.name||null;if(typeof u==="string")return u;switch(u){case D1:return"Fragment";case X1:return"Portal";case s5:return"Profiler";case p9:return"StrictMode";case t5:return"Suspense";case n5:return"SuspenseList"}if(typeof u==="object")switch(u.$$typeof){case al:return(u.displayName||"Context")+".Consumer";case dl:return(u._context.displayName||"Context")+".Provider";case b9:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case i9:return f=u.displayName||null,f!==null?f:d5(u.type)||"Memo";case B0:f=u._payload,u=u._init;try{return d5(u(f))}catch($){}}return null}function jK(u){var f=u.type;switch(u.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=f.render,u=u.displayName||u.name||"",f.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return d5(f);case 8:return f===p9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof f==="function")return f.displayName||f.name||null;if(typeof f==="string")return f}return null}function S0(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function el(u){var f=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function NK(u){var f=el(u)?"checked":"value",$=Object.getOwnPropertyDescriptor(u.constructor.prototype,f),F=""+u[f];if(!u.hasOwnProperty(f)&&typeof $<"u"&&typeof $.get==="function"&&typeof $.set==="function"){var{get:l,set:U}=$;return Object.defineProperty(u,f,{configurable:!0,get:function(){return l.call(this)},set:function(_){F=""+_,U.call(this,_)}}),Object.defineProperty(u,f,{enumerable:$.enumerable}),{getValue:function(){return F},setValue:function(_){F=""+_},stopTracking:function(){u._valueTracker=null,delete u[f]}}}}function t3(u){u._valueTracker||(u._valueTracker=NK(u))}function uU(u){if(!u)return!1;var f=u._valueTracker;if(!f)return!0;var $=f.getValue(),F="";return u&&(F=el(u)?u.checked?"true":"false":u.value),u=F,u!==$?(f.setValue(u),!0):!1}function z8(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch(f){return u.body}}function a5(u,f){var $=f.checked;return Zu({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:$!=null?$:u._wrapperState.initialChecked})}function tF(u,f){var $=f.defaultValue==null?"":f.defaultValue,F=f.checked!=null?f.checked:f.defaultChecked;$=S0(f.value!=null?f.value:$),u._wrapperState={initialChecked:F,initialValue:$,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function fU(u,f){f=f.checked,f!=null&&m9(u,"checked",f,!1)}function o5(u,f){fU(u,f);var $=S0(f.value),F=f.type;if($!=null)if(F==="number"){if($===0&&u.value===""||u.value!=$)u.value=""+$}else u.value!==""+$&&(u.value=""+$);else if(F==="submit"||F==="reset"){u.removeAttribute("value");return}f.hasOwnProperty("value")?e5(u,f.type,$):f.hasOwnProperty("defaultValue")&&e5(u,f.type,S0(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(u.defaultChecked=!!f.defaultChecked)}function nF(u,f,$){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var F=f.type;if(!(F!=="submit"&&F!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+u._wrapperState.initialValue,$||f===u.value||(u.value=f),u.defaultValue=f}$=u.name,$!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,$!==""&&(u.name=$)}function e5(u,f,$){if(f!=="number"||z8(u.ownerDocument)!==u)$==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+$&&(u.defaultValue=""+$)}var N4=Array.isArray;function h1(u,f,$,F){if(u=u.options,f){f={};for(var l=0;l<$.length;l++)f["$"+$[l]]=!0;for($=0;$<u.length;$++)l=f.hasOwnProperty("$"+u[$].value),u[$].selected!==l&&(u[$].selected=l),l&&F&&(u[$].defaultSelected=!0)}else{$=""+S0($),f=null;for(l=0;l<u.length;l++){if(u[l].value===$){u[l].selected=!0,F&&(u[l].defaultSelected=!0);return}f!==null||u[l].disabled||(f=u[l])}f!==null&&(f.selected=!0)}}function u9(u,f){if(f.dangerouslySetInnerHTML!=null)throw Error(p(91));return Zu({},f,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function dF(u,f){var $=f.value;if($==null){if($=f.children,f=f.defaultValue,$!=null){if(f!=null)throw Error(p(92));if(N4($)){if(1<$.length)throw Error(p(93));$=$[0]}f=$}f==null&&(f=""),$=f}u._wrapperState={initialValue:S0($)}}function $U(u,f){var $=S0(f.value),F=S0(f.defaultValue);$!=null&&($=""+$,$!==u.value&&(u.value=$),f.defaultValue==null&&u.defaultValue!==$&&(u.defaultValue=$)),F!=null&&(u.defaultValue=""+F)}function aF(u){var f=u.textContent;f===u._wrapperState.initialValue&&f!==""&&f!==null&&(u.value=f)}function FU(u){switch(u){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function f9(u,f){return u==null||u==="http://www.w3.org/1999/xhtml"?FU(f):u==="http://www.w3.org/2000/svg"&&f==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var n3,lU=function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(f,$,F,l){MSApp.execUnsafeLocalFunction(function(){return u(f,$,F,l)})}:u}(function(u,f){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=f;else{n3=n3||document.createElement("div"),n3.innerHTML="<svg>"+f.valueOf().toString()+"</svg>";for(f=n3.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;f.firstChild;)u.appendChild(f.firstChild)}});function t4(u,f){if(f){var $=u.firstChild;if($&&$===u.lastChild&&$.nodeType===3){$.nodeValue=f;return}}u.textContent=f}var h4={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},IK=["Webkit","ms","Moz","O"];Object.keys(h4).forEach(function(u){IK.forEach(function(f){f=f+u.charAt(0).toUpperCase()+u.substring(1),h4[f]=h4[u]})});function UU(u,f,$){return f==null||typeof f==="boolean"||f===""?"":$||typeof f!=="number"||f===0||h4.hasOwnProperty(u)&&h4[u]?(""+f).trim():f+"px"}function _U(u,f){u=u.style;for(var $ in f)if(f.hasOwnProperty($)){var F=$.indexOf("--")===0,l=UU($,f[$],F);$==="float"&&($="cssFloat"),F?u.setProperty($,l):u[$]=l}}var yK=Zu({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $9(u,f){if(f){if(yK[u]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(p(137,u));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(p(60));if(typeof f.dangerouslySetInnerHTML!=="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(p(61))}if(f.style!=null&&typeof f.style!=="object")throw Error(p(62))}}function F9(u,f){if(u.indexOf("-")===-1)return typeof f.is==="string";switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var l9=null;function g9(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var U9=null,v1=null,x1=null;function oF(u){if(u=W3(u)){if(typeof U9!=="function")throw Error(p(280));var f=u.stateNode;f&&(f=s8(f),U9(u.stateNode,u.type,f))}}function QU(u){v1?x1?x1.push(u):x1=[u]:v1=u}function JU(){if(v1){var u=v1,f=x1;if(x1=v1=null,oF(u),f)for(u=0;u<f.length;u++)oF(f[u])}}function qU(u,f){return u(f)}function TU(){}var O5=!1;function AU(u,f,$){if(O5)return u(f,$);O5=!0;try{return qU(u,f,$)}finally{if(O5=!1,v1!==null||x1!==null)TU(),JU()}}function n4(u,f){var $=u.stateNode;if($===null)return null;var F=s8($);if(F===null)return null;$=F[f];u:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(F=!F.disabled)||(u=u.type,F=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!F;break u;default:u=!1}if(u)return null;if($&&typeof $!=="function")throw Error(p(231,f,typeof $));return $}var _9=!1;if(u0)try{g0={},Object.defineProperty(g0,"passive",{get:function(){_9=!0}}),window.addEventListener("test",g0,g0),window.removeEventListener("test",g0,g0)}catch(u){_9=!1}var g0;function kK(u,f,$,F,l,U,_,Q,J){var q=Array.prototype.slice.call(arguments,3);try{f.apply($,q)}catch(T){this.onError(T)}}var v4=!1,Z8=null,Y8=!1,Q9=null,PK={onError:function(u){v4=!0,Z8=u}};function rK(u,f,$,F,l,U,_,Q,J){v4=!1,Z8=null,kK.apply(PK,arguments)}function CK(u,f,$,F,l,U,_,Q,J){if(rK.apply(this,arguments),v4){if(v4){var q=Z8;v4=!1,Z8=null}else throw Error(p(198));Y8||(Y8=!0,Q9=q)}}function _1(u){var f=u,$=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,(f.flags&4098)!==0&&($=f.return),u=f.return;while(u)}return f.tag===3?$:null}function WU(u){if(u.tag===13){var f=u.memoizedState;if(f===null&&(u=u.alternate,u!==null&&(f=u.memoizedState)),f!==null)return f.dehydrated}return null}function eF(u){if(_1(u)!==u)throw Error(p(188))}function hK(u){var f=u.alternate;if(!f){if(f=_1(u),f===null)throw Error(p(188));return f!==u?null:u}for(var $=u,F=f;;){var l=$.return;if(l===null)break;var U=l.alternate;if(U===null){if(F=l.return,F!==null){$=F;continue}break}if(l.child===U.child){for(U=l.child;U;){if(U===$)return eF(l),u;if(U===F)return eF(l),f;U=U.sibling}throw Error(p(188))}if($.return!==F.return)$=l,F=U;else{for(var _=!1,Q=l.child;Q;){if(Q===$){_=!0,$=l,F=U;break}if(Q===F){_=!0,F=l,$=U;break}Q=Q.sibling}if(!_){for(Q=U.child;Q;){if(Q===$){_=!0,$=U,F=l;break}if(Q===F){_=!0,F=U,$=l;break}Q=Q.sibling}if(!_)throw Error(p(189))}}if($.alternate!==F)throw Error(p(190))}if($.tag!==3)throw Error(p(188));return $.stateNode.current===$?u:f}function KU(u){return u=hK(u),u!==null?wU(u):null}function wU(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var f=wU(u);if(f!==null)return f;u=u.sibling}return null}var{unstable_scheduleCallback:BU,unstable_cancelCallback:ul,unstable_shouldYield:vK,unstable_requestPaint:xK,unstable_now:Mu,unstable_getCurrentPriorityLevel:cK,unstable_ImmediatePriority:s9,unstable_UserBlockingPriority:LU,unstable_NormalPriority:R8,unstable_LowPriority:mK,unstable_IdlePriority:GU}=ff,p8=null,Cf=null;function pK(u){if(Cf&&typeof Cf.onCommitFiberRoot==="function")try{Cf.onCommitFiberRoot(p8,u,void 0,(u.current.flags&128)===128)}catch(f){}}var Ef=Math.clz32?Math.clz32:gK,bK=Math.log,iK=Math.LN2;function gK(u){return u>>>=0,u===0?32:31-(bK(u)/iK|0)|0}var d3=64,a3=4194304;function I4(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function M8(u,f){var $=u.pendingLanes;if($===0)return 0;var F=0,l=u.suspendedLanes,U=u.pingedLanes,_=$&268435455;if(_!==0){var Q=_&~l;Q!==0?F=I4(Q):(U&=_,U!==0&&(F=I4(U)))}else _=$&~l,_!==0?F=I4(_):U!==0&&(F=I4(U));if(F===0)return 0;if(f!==0&&f!==F&&(f&l)===0&&(l=F&-F,U=f&-f,l>=U||l===16&&(U&4194240)!==0))return f;if((F&4)!==0&&(F|=$&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=F;0<f;)$=31-Ef(f),l=1<<$,F|=u[$],f&=~l;return F}function sK(u,f){switch(u){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5000;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tK(u,f){for(var{suspendedLanes:$,pingedLanes:F,expirationTimes:l,pendingLanes:U}=u;0<U;){var _=31-Ef(U),Q=1<<_,J=l[_];if(J===-1){if((Q&$)===0||(Q&F)!==0)l[_]=sK(Q,f)}else J<=f&&(u.expiredLanes|=Q);U&=~Q}}function J9(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function HU(){var u=d3;return d3<<=1,(d3&4194240)===0&&(d3=64),u}function S5(u){for(var f=[],$=0;31>$;$++)f.push(u);return f}function T3(u,f,$){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-Ef(f),u[f]=$}function nK(u,f){var $=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var F=u.eventTimes;for(u=u.expirationTimes;0<$;){var l=31-Ef($),U=1<<l;f[l]=0,F[l]=-1,u[l]=-1,$&=~U}}function t9(u,f){var $=u.entangledLanes|=f;for(u=u.entanglements;$;){var F=31-Ef($),l=1<<F;l&f|u[F]&f&&(u[F]|=f),$&=~l}}var Tu=0;function zU(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var ZU,n9,YU,RU,MU,q9=!1,o3=[],Y0=null,R0=null,M0=null,d4=new Map,a4=new Map,G0=[],dK="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fl(u,f){switch(u){case"focusin":case"focusout":Y0=null;break;case"dragenter":case"dragleave":R0=null;break;case"mouseover":case"mouseout":M0=null;break;case"pointerover":case"pointerout":d4.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":a4.delete(f.pointerId)}}function E4(u,f,$,F,l,U){if(u===null||u.nativeEvent!==U)return u={blockedOn:f,domEventName:$,eventSystemFlags:F,nativeEvent:U,targetContainers:[l]},f!==null&&(f=W3(f),f!==null&&n9(f)),u;return u.eventSystemFlags|=F,f=u.targetContainers,l!==null&&f.indexOf(l)===-1&&f.push(l),u}function aK(u,f,$,F,l){switch(f){case"focusin":return Y0=E4(Y0,u,f,$,F,l),!0;case"dragenter":return R0=E4(R0,u,f,$,F,l),!0;case"mouseover":return M0=E4(M0,u,f,$,F,l),!0;case"pointerover":var U=l.pointerId;return d4.set(U,E4(d4.get(U)||null,u,f,$,F,l)),!0;case"gotpointercapture":return U=l.pointerId,a4.set(U,E4(a4.get(U)||null,u,f,$,F,l)),!0}return!1}function EU(u){var f=n0(u.target);if(f!==null){var $=_1(f);if($!==null){if(f=$.tag,f===13){if(f=WU($),f!==null){u.blockedOn=f,MU(u.priority,function(){YU($)});return}}else if(f===3&&$.stateNode.current.memoizedState.isDehydrated){u.blockedOn=$.tag===3?$.stateNode.containerInfo:null;return}}}u.blockedOn=null}function J8(u){if(u.blockedOn!==null)return!1;for(var f=u.targetContainers;0<f.length;){var $=T9(u.domEventName,u.eventSystemFlags,f[0],u.nativeEvent);if($===null){$=u.nativeEvent;var F=new $.constructor($.type,$);l9=F,$.target.dispatchEvent(F),l9=null}else return f=W3($),f!==null&&n9(f),u.blockedOn=$,!1;f.shift()}return!0}function $l(u,f,$){J8(u)&&$.delete(f)}function oK(){q9=!1,Y0!==null&&J8(Y0)&&(Y0=null),R0!==null&&J8(R0)&&(R0=null),M0!==null&&J8(M0)&&(M0=null),d4.forEach($l),a4.forEach($l)}function V4(u,f){u.blockedOn===f&&(u.blockedOn=null,q9||(q9=!0,ff.unstable_scheduleCallback(ff.unstable_NormalPriority,oK)))}function o4(u){function f(l){return V4(l,u)}if(0<o3.length){V4(o3[0],u);for(var $=1;$<o3.length;$++){var F=o3[$];F.blockedOn===u&&(F.blockedOn=null)}}Y0!==null&&V4(Y0,u),R0!==null&&V4(R0,u),M0!==null&&V4(M0,u),d4.forEach(f),a4.forEach(f);for($=0;$<G0.length;$++)F=G0[$],F.blockedOn===u&&(F.blockedOn=null);for(;0<G0.length&&($=G0[0],$.blockedOn===null);)EU($),$.blockedOn===null&&G0.shift()}var c1=l0.ReactCurrentBatchConfig,E8=!0;function eK(u,f,$,F){var l=Tu,U=c1.transition;c1.transition=null;try{Tu=1,d9(u,f,$,F)}finally{Tu=l,c1.transition=U}}function uw(u,f,$,F){var l=Tu,U=c1.transition;c1.transition=null;try{Tu=4,d9(u,f,$,F)}finally{Tu=l,c1.transition=U}}function d9(u,f,$,F){if(E8){var l=T9(u,f,$,F);if(l===null)P5(u,f,F,V8,$),fl(u,F);else if(aK(l,u,f,$,F))F.stopPropagation();else if(fl(u,F),f&4&&-1<dK.indexOf(u)){for(;l!==null;){var U=W3(l);if(U!==null&&ZU(U),U=T9(u,f,$,F),U===null&&P5(u,f,F,V8,$),U===l)break;l=U}l!==null&&F.stopPropagation()}else P5(u,f,F,null,$)}}var V8=null;function T9(u,f,$,F){if(V8=null,u=g9(F),u=n0(u),u!==null)if(f=_1(u),f===null)u=null;else if($=f.tag,$===13){if(u=WU(f),u!==null)return u;u=null}else if($===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null);return V8=u,null}function VU(u){switch(u){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cK()){case s9:return 1;case LU:return 4;case R8:case mK:return 16;case GU:return 536870912;default:return 16}default:return 16}}var z0=null,a9=null,q8=null;function XU(){if(q8)return q8;var u,f=a9,$=f.length,F,l="value"in z0?z0.value:z0.textContent,U=l.length;for(u=0;u<$&&f[u]===l[u];u++);var _=$-u;for(F=1;F<=_&&f[$-F]===l[U-F];F++);return q8=l.slice(u,1<F?1-F:void 0)}function T8(u){var f=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&f===13&&(u=13)):u=f,u===10&&(u=13),32<=u||u===13?u:0}function e3(){return!0}function Fl(){return!1}function $f(u){function f($,F,l,U,_){this._reactName=$,this._targetInst=l,this.type=F,this.nativeEvent=U,this.target=_,this.currentTarget=null;for(var Q in u)u.hasOwnProperty(Q)&&($=u[Q],this[Q]=$?$(U):U[Q]);return this.isDefaultPrevented=(U.defaultPrevented!=null?U.defaultPrevented:U.returnValue===!1)?e3:Fl,this.isPropagationStopped=Fl,this}return Zu(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var $=this.nativeEvent;$&&($.preventDefault?$.preventDefault():typeof $.returnValue!=="unknown"&&($.returnValue=!1),this.isDefaultPrevented=e3)},stopPropagation:function(){var $=this.nativeEvent;$&&($.stopPropagation?$.stopPropagation():typeof $.cancelBubble!=="unknown"&&($.cancelBubble=!0),this.isPropagationStopped=e3)},persist:function(){},isPersistent:e3}),f}var a1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},o9=$f(a1),A3=Zu({},a1,{view:0,detail:0}),fw=$f(A3),j5,N5,X4,b8=Zu({},A3,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:e9,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){if("movementX"in u)return u.movementX;return u!==X4&&(X4&&u.type==="mousemove"?(j5=u.screenX-X4.screenX,N5=u.screenY-X4.screenY):N5=j5=0,X4=u),j5},movementY:function(u){return"movementY"in u?u.movementY:N5}}),ll=$f(b8),$w=Zu({},b8,{dataTransfer:0}),Fw=$f($w),lw=Zu({},A3,{relatedTarget:0}),I5=$f(lw),Uw=Zu({},a1,{animationName:0,elapsedTime:0,pseudoElement:0}),_w=$f(Uw),Qw=Zu({},a1,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),Jw=$f(Qw),qw=Zu({},a1,{data:0}),Ul=$f(qw),Tw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Aw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kw(u){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(u):(u=Ww[u])?!!f[u]:!1}function e9(){return Kw}var ww=Zu({},A3,{key:function(u){if(u.key){var f=Tw[u.key]||u.key;if(f!=="Unidentified")return f}return u.type==="keypress"?(u=T8(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?Aw[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:e9,charCode:function(u){return u.type==="keypress"?T8(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?T8(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),Bw=$f(ww),Lw=Zu({},b8,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_l=$f(Lw),Gw=Zu({},A3,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:e9}),Hw=$f(Gw),zw=Zu({},a1,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zw=$f(zw),Yw=Zu({},b8,{deltaX:function(u){return"deltaX"in u?u.deltaX:("wheelDeltaX"in u)?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:("wheelDeltaY"in u)?-u.wheelDeltaY:("wheelDelta"in u)?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),Rw=$f(Yw),Mw=[9,13,27,32],u7=u0&&"CompositionEvent"in window,x4=null;u0&&"documentMode"in document&&(x4=document.documentMode);var Ew=u0&&"TextEvent"in window&&!x4,DU=u0&&(!u7||x4&&8<x4&&11>=x4),Ql=String.fromCharCode(32),Jl=!1;function OU(u,f){switch(u){case"keyup":return Mw.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SU(u){return u=u.detail,typeof u==="object"&&"data"in u?u.data:null}var O1=!1;function Vw(u,f){switch(u){case"compositionend":return SU(f);case"keypress":if(f.which!==32)return null;return Jl=!0,Ql;case"textInput":return u=f.data,u===Ql&&Jl?null:u;default:return null}}function Xw(u,f){if(O1)return u==="compositionend"||!u7&&OU(u,f)?(u=XU(),q8=a9=z0=null,O1=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return DU&&f.locale!=="ko"?null:f.data;default:return null}}var Dw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ql(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f==="input"?!!Dw[u.type]:f==="textarea"?!0:!1}function jU(u,f,$,F){QU(F),f=X8(f,"onChange"),0<f.length&&($=new o9("onChange","change",null,$,F),u.push({event:$,listeners:f}))}var c4=null,e4=null;function Ow(u){cU(u,0)}function i8(u){var f=N1(u);if(uU(f))return u}function Sw(u,f){if(u==="change")return f}var NU=!1;if(u0){if(u0){if(k4="oninput"in document,!k4)A8=document.createElement("div"),A8.setAttribute("oninput","return;"),k4=typeof A8.oninput==="function";y4=k4}else y4=!1;NU=y4&&(!document.documentMode||9<document.documentMode)}var y4,k4,A8;function Tl(){c4&&(c4.detachEvent("onpropertychange",IU),e4=c4=null)}function IU(u){if(u.propertyName==="value"&&i8(e4)){var f=[];jU(f,e4,u,g9(u)),AU(Ow,f)}}function jw(u,f,$){u==="focusin"?(Tl(),c4=f,e4=$,c4.attachEvent("onpropertychange",IU)):u==="focusout"&&Tl()}function Nw(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return i8(e4)}function Iw(u,f){if(u==="click")return i8(f)}function yw(u,f){if(u==="input"||u==="change")return i8(f)}function kw(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var Xf=typeof Object.is==="function"?Object.is:kw;function u3(u,f){if(Xf(u,f))return!0;if(typeof u!=="object"||u===null||typeof f!=="object"||f===null)return!1;var $=Object.keys(u),F=Object.keys(f);if($.length!==F.length)return!1;for(F=0;F<$.length;F++){var l=$[F];if(!g5.call(f,l)||!Xf(u[l],f[l]))return!1}return!0}function Al(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function Wl(u,f){var $=Al(u);u=0;for(var F;$;){if($.nodeType===3){if(F=u+$.textContent.length,u<=f&&F>=f)return{node:$,offset:f-u};u=F}u:{for(;$;){if($.nextSibling){$=$.nextSibling;break u}$=$.parentNode}$=void 0}$=Al($)}}function yU(u,f){return u&&f?u===f?!0:u&&u.nodeType===3?!1:f&&f.nodeType===3?yU(u,f.parentNode):("contains"in u)?u.contains(f):u.compareDocumentPosition?!!(u.compareDocumentPosition(f)&16):!1:!1}function kU(){for(var u=window,f=z8();f instanceof u.HTMLIFrameElement;){try{var $=typeof f.contentWindow.location.href==="string"}catch(F){$=!1}if($)u=f.contentWindow;else break;f=z8(u.document)}return f}function f7(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f&&(f==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||f==="textarea"||u.contentEditable==="true")}function Pw(u){var f=kU(),$=u.focusedElem,F=u.selectionRange;if(f!==$&&$&&$.ownerDocument&&yU($.ownerDocument.documentElement,$)){if(F!==null&&f7($)){if(f=F.start,u=F.end,u===void 0&&(u=f),"selectionStart"in $)$.selectionStart=f,$.selectionEnd=Math.min(u,$.value.length);else if(u=(f=$.ownerDocument||document)&&f.defaultView||window,u.getSelection){u=u.getSelection();var l=$.textContent.length,U=Math.min(F.start,l);F=F.end===void 0?U:Math.min(F.end,l),!u.extend&&U>F&&(l=F,F=U,U=l),l=Wl($,U);var _=Wl($,F);l&&_&&(u.rangeCount!==1||u.anchorNode!==l.node||u.anchorOffset!==l.offset||u.focusNode!==_.node||u.focusOffset!==_.offset)&&(f=f.createRange(),f.setStart(l.node,l.offset),u.removeAllRanges(),U>F?(u.addRange(f),u.extend(_.node,_.offset)):(f.setEnd(_.node,_.offset),u.addRange(f)))}}f=[];for(u=$;u=u.parentNode;)u.nodeType===1&&f.push({element:u,left:u.scrollLeft,top:u.scrollTop});typeof $.focus==="function"&&$.focus();for($=0;$<f.length;$++)u=f[$],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var rw=u0&&"documentMode"in document&&11>=document.documentMode,S1=null,A9=null,m4=null,W9=!1;function Kl(u,f,$){var F=$.window===$?$.document:$.nodeType===9?$:$.ownerDocument;W9||S1==null||S1!==z8(F)||(F=S1,("selectionStart"in F)&&f7(F)?F={start:F.selectionStart,end:F.selectionEnd}:(F=(F.ownerDocument&&F.ownerDocument.defaultView||window).getSelection(),F={anchorNode:F.anchorNode,anchorOffset:F.anchorOffset,focusNode:F.focusNode,focusOffset:F.focusOffset}),m4&&u3(m4,F)||(m4=F,F=X8(A9,"onSelect"),0<F.length&&(f=new o9("onSelect","select",null,f,$),u.push({event:f,listeners:F}),f.target=S1)))}function u8(u,f){var $={};return $[u.toLowerCase()]=f.toLowerCase(),$["Webkit"+u]="webkit"+f,$["Moz"+u]="moz"+f,$}var j1={animationend:u8("Animation","AnimationEnd"),animationiteration:u8("Animation","AnimationIteration"),animationstart:u8("Animation","AnimationStart"),transitionend:u8("Transition","TransitionEnd")},y5={},PU={};u0&&(PU=document.createElement("div").style,("AnimationEvent"in window)||(delete j1.animationend.animation,delete j1.animationiteration.animation,delete j1.animationstart.animation),("TransitionEvent"in window)||delete j1.transitionend.transition);function g8(u){if(y5[u])return y5[u];if(!j1[u])return u;var f=j1[u],$;for($ in f)if(f.hasOwnProperty($)&&$ in PU)return y5[u]=f[$];return u}var rU=g8("animationend"),CU=g8("animationiteration"),hU=g8("animationstart"),vU=g8("transitionend"),xU=new Map,wl="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function N0(u,f){xU.set(u,f),U1(f,[u])}for(P4=0;P4<wl.length;P4++)r4=wl[P4],K9=r4.toLowerCase(),w9=r4[0].toUpperCase()+r4.slice(1),N0(K9,"on"+w9);var r4,K9,w9,P4;N0(rU,"onAnimationEnd");N0(CU,"onAnimationIteration");N0(hU,"onAnimationStart");N0("dblclick","onDoubleClick");N0("focusin","onFocus");N0("focusout","onBlur");N0(vU,"onTransitionEnd");b1("onMouseEnter",["mouseout","mouseover"]);b1("onMouseLeave",["mouseout","mouseover"]);b1("onPointerEnter",["pointerout","pointerover"]);b1("onPointerLeave",["pointerout","pointerover"]);U1("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));U1("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));U1("onBeforeInput",["compositionend","keypress","textInput","paste"]);U1("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));U1("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));U1("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var C4="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cw=new Set("cancel close invalid load scroll toggle".split(" ").concat(C4));function Bl(u,f,$){var F=u.type||"unknown-event";u.currentTarget=$,CK(F,f,void 0,u),u.currentTarget=null}function cU(u,f){f=(f&4)!==0;for(var $=0;$<u.length;$++){var F=u[$],l=F.event;F=F.listeners;u:{var U=void 0;if(f)for(var _=F.length-1;0<=_;_--){var Q=F[_],J=Q.instance,q=Q.currentTarget;if(Q=Q.listener,J!==U&&l.isPropagationStopped())break u;Bl(l,Q,q),U=J}else for(_=0;_<F.length;_++){if(Q=F[_],J=Q.instance,q=Q.currentTarget,Q=Q.listener,J!==U&&l.isPropagationStopped())break u;Bl(l,Q,q),U=J}}}if(Y8)throw u=Q9,Y8=!1,Q9=null,u}function Ku(u,f){var $=f[z9];$===void 0&&($=f[z9]=new Set);var F=u+"__bubble";$.has(F)||(mU(f,u,2,!1),$.add(F))}function k5(u,f,$){var F=0;f&&(F|=4),mU($,u,F,f)}var f8="_reactListening"+Math.random().toString(36).slice(2);function f3(u){if(!u[f8]){u[f8]=!0,nl.forEach(function($){$!=="selectionchange"&&(Cw.has($)||k5($,!1,u),k5($,!0,u))});var f=u.nodeType===9?u:u.ownerDocument;f===null||f[f8]||(f[f8]=!0,k5("selectionchange",!1,f))}}function mU(u,f,$,F){switch(VU(f)){case 1:var l=eK;break;case 4:l=uw;break;default:l=d9}$=l.bind(null,f,$,u),l=void 0,!_9||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(l=!0),F?l!==void 0?u.addEventListener(f,$,{capture:!0,passive:l}):u.addEventListener(f,$,!0):l!==void 0?u.addEventListener(f,$,{passive:l}):u.addEventListener(f,$,!1)}function P5(u,f,$,F,l){var U=F;if((f&1)===0&&(f&2)===0&&F!==null)u:for(;;){if(F===null)return;var _=F.tag;if(_===3||_===4){var Q=F.stateNode.containerInfo;if(Q===l||Q.nodeType===8&&Q.parentNode===l)break;if(_===4)for(_=F.return;_!==null;){var J=_.tag;if(J===3||J===4){if(J=_.stateNode.containerInfo,J===l||J.nodeType===8&&J.parentNode===l)return}_=_.return}for(;Q!==null;){if(_=n0(Q),_===null)return;if(J=_.tag,J===5||J===6){F=U=_;continue u}Q=Q.parentNode}}F=F.return}AU(function(){var q=U,T=g9($),W=[];u:{var A=xU.get(u);if(A!==void 0){var K=o9,L=u;switch(u){case"keypress":if(T8($)===0)break u;case"keydown":case"keyup":K=Bw;break;case"focusin":L="focus",K=I5;break;case"focusout":L="blur",K=I5;break;case"beforeblur":case"afterblur":K=I5;break;case"click":if($.button===2)break u;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=ll;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Fw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Hw;break;case rU:case CU:case hU:K=_w;break;case vU:K=Zw;break;case"scroll":K=fw;break;case"wheel":K=Rw;break;case"copy":case"cut":case"paste":K=Jw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=_l}var z=(f&4)!==0,Z=!z&&u==="scroll",B=z?A!==null?A+"Capture":null:A;z=[];for(var G=q,w;G!==null;){w=G;var H=w.stateNode;if(w.tag===5&&H!==null&&(w=H,B!==null&&(H=n4(G,B),H!=null&&z.push($3(G,H,w)))),Z)break;G=G.return}0<z.length&&(A=new K(A,L,null,$,T),W.push({event:A,listeners:z}))}}if((f&7)===0){u:{if(A=u==="mouseover"||u==="pointerover",K=u==="mouseout"||u==="pointerout",A&&$!==l9&&(L=$.relatedTarget||$.fromElement)&&(n0(L)||L[f0]))break u;if(K||A){if(A=T.window===T?T:(A=T.ownerDocument)?A.defaultView||A.parentWindow:window,K){if(L=$.relatedTarget||$.toElement,K=q,L=L?n0(L):null,L!==null&&(Z=_1(L),L!==Z||L.tag!==5&&L.tag!==6))L=null}else K=null,L=q;if(K!==L){if(z=ll,H="onMouseLeave",B="onMouseEnter",G="mouse",u==="pointerout"||u==="pointerover")z=_l,H="onPointerLeave",B="onPointerEnter",G="pointer";if(Z=K==null?A:N1(K),w=L==null?A:N1(L),A=new z(H,G+"leave",K,$,T),A.target=Z,A.relatedTarget=w,H=null,n0(T)===q&&(z=new z(B,G+"enter",L,$,T),z.target=w,z.relatedTarget=Z,H=z),Z=H,K&&L)f:{z=K,B=L,G=0;for(w=z;w;w=E1(w))G++;w=0;for(H=B;H;H=E1(H))w++;for(;0<G-w;)z=E1(z),G--;for(;0<w-G;)B=E1(B),w--;for(;G--;){if(z===B||B!==null&&z===B.alternate)break f;z=E1(z),B=E1(B)}z=null}else z=null;K!==null&&Ll(W,A,K,z,!1),L!==null&&Z!==null&&Ll(W,Z,L,z,!0)}}}u:{if(A=q?N1(q):window,K=A.nodeName&&A.nodeName.toLowerCase(),K==="select"||K==="input"&&A.type==="file")var M=Sw;else if(ql(A))if(NU)M=yw;else{M=Nw;var R=jw}else(K=A.nodeName)&&K.toLowerCase()==="input"&&(A.type==="checkbox"||A.type==="radio")&&(M=Iw);if(M&&(M=M(u,q))){jU(W,M,$,T);break u}R&&R(u,A,q),u==="focusout"&&(R=A._wrapperState)&&R.controlled&&A.type==="number"&&e5(A,"number",A.value)}switch(R=q?N1(q):window,u){case"focusin":if(ql(R)||R.contentEditable==="true")S1=R,A9=q,m4=null;break;case"focusout":m4=A9=S1=null;break;case"mousedown":W9=!0;break;case"contextmenu":case"mouseup":case"dragend":W9=!1,Kl(W,$,T);break;case"selectionchange":if(rw)break;case"keydown":case"keyup":Kl(W,$,T)}var E;if(u7)u:{switch(u){case"compositionstart":var V="onCompositionStart";break u;case"compositionend":V="onCompositionEnd";break u;case"compositionupdate":V="onCompositionUpdate";break u}V=void 0}else O1?OU(u,$)&&(V="onCompositionEnd"):u==="keydown"&&$.keyCode===229&&(V="onCompositionStart");if(V&&(DU&&$.locale!=="ko"&&(O1||V!=="onCompositionStart"?V==="onCompositionEnd"&&O1&&(E=XU()):(z0=T,a9=("value"in z0)?z0.value:z0.textContent,O1=!0)),R=X8(q,V),0<R.length&&(V=new Ul(V,u,null,$,T),W.push({event:V,listeners:R}),E?V.data=E:(E=SU($),E!==null&&(V.data=E)))),E=Ew?Vw(u,$):Xw(u,$))q=X8(q,"onBeforeInput"),0<q.length&&(T=new Ul("onBeforeInput","beforeinput",null,$,T),W.push({event:T,listeners:q}),T.data=E)}cU(W,f)})}function $3(u,f,$){return{instance:u,listener:f,currentTarget:$}}function X8(u,f){for(var $=f+"Capture",F=[];u!==null;){var l=u,U=l.stateNode;l.tag===5&&U!==null&&(l=U,U=n4(u,$),U!=null&&F.unshift($3(u,U,l)),U=n4(u,f),U!=null&&F.push($3(u,U,l))),u=u.return}return F}function E1(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u?u:null}function Ll(u,f,$,F,l){for(var U=f._reactName,_=[];$!==null&&$!==F;){var Q=$,J=Q.alternate,q=Q.stateNode;if(J!==null&&J===F)break;Q.tag===5&&q!==null&&(Q=q,l?(J=n4($,U),J!=null&&_.unshift($3($,J,Q))):l||(J=n4($,U),J!=null&&_.push($3($,J,Q)))),$=$.return}_.length!==0&&u.push({event:f,listeners:_})}var hw=/\r\n?/g,vw=/\u0000|\uFFFD/g;function Gl(u){return(typeof u==="string"?u:""+u).replace(hw,`
1374
- `).replace(vw,"")}function $8(u,f,$){if(f=Gl(f),Gl(u)!==f&&$)throw Error(p(425))}function D8(){}var B9=null,L9=null;function G9(u,f){return u==="textarea"||u==="noscript"||typeof f.children==="string"||typeof f.children==="number"||typeof f.dangerouslySetInnerHTML==="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var H9=typeof setTimeout==="function"?setTimeout:void 0,xw=typeof clearTimeout==="function"?clearTimeout:void 0,Hl=typeof Promise==="function"?Promise:void 0,cw=typeof queueMicrotask==="function"?queueMicrotask:typeof Hl<"u"?function(u){return Hl.resolve(null).then(u).catch(mw)}:H9;function mw(u){setTimeout(function(){throw u})}function r5(u,f){var $=f,F=0;do{var l=$.nextSibling;if(u.removeChild($),l&&l.nodeType===8)if($=l.data,$==="/$"){if(F===0){u.removeChild(l),o4(f);return}F--}else $!=="$"&&$!=="$?"&&$!=="$!"||F++;$=l}while($);o4(f)}function E0(u){for(;u!=null;u=u.nextSibling){var f=u.nodeType;if(f===1||f===3)break;if(f===8){if(f=u.data,f==="$"||f==="$!"||f==="$?")break;if(f==="/$")return null}}return u}function zl(u){u=u.previousSibling;for(var f=0;u;){if(u.nodeType===8){var $=u.data;if($==="$"||$==="$!"||$==="$?"){if(f===0)return u;f--}else $==="/$"&&f++}u=u.previousSibling}return null}var o1=Math.random().toString(36).slice(2),rf="__reactFiber$"+o1,F3="__reactProps$"+o1,f0="__reactContainer$"+o1,z9="__reactEvents$"+o1,pw="__reactListeners$"+o1,bw="__reactHandles$"+o1;function n0(u){var f=u[rf];if(f)return f;for(var $=u.parentNode;$;){if(f=$[f0]||$[rf]){if($=f.alternate,f.child!==null||$!==null&&$.child!==null)for(u=zl(u);u!==null;){if($=u[rf])return $;u=zl(u)}return f}u=$,$=u.parentNode}return null}function W3(u){return u=u[rf]||u[f0],!u||u.tag!==5&&u.tag!==6&&u.tag!==13&&u.tag!==3?null:u}function N1(u){if(u.tag===5||u.tag===6)return u.stateNode;throw Error(p(33))}function s8(u){return u[F3]||null}var Z9=[],I1=-1;function I0(u){return{current:u}}function wu(u){0>I1||(u.current=Z9[I1],Z9[I1]=null,I1--)}function Wu(u,f){I1++,Z9[I1]=u.current,u.current=f}var j0={},vu=I0(j0),su=I0(!1),u1=j0;function i1(u,f){var $=u.type.contextTypes;if(!$)return j0;var F=u.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===f)return F.__reactInternalMemoizedMaskedChildContext;var l={},U;for(U in $)l[U]=f[U];return F&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=f,u.__reactInternalMemoizedMaskedChildContext=l),l}function tu(u){return u=u.childContextTypes,u!==null&&u!==void 0}function O8(){wu(su),wu(vu)}function Zl(u,f,$){if(vu.current!==j0)throw Error(p(168));Wu(vu,f),Wu(su,$)}function pU(u,f,$){var F=u.stateNode;if(f=f.childContextTypes,typeof F.getChildContext!=="function")return $;F=F.getChildContext();for(var l in F)if(!(l in f))throw Error(p(108,jK(u)||"Unknown",l));return Zu({},$,F)}function S8(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||j0,u1=vu.current,Wu(vu,u),Wu(su,su.current),!0}function Yl(u,f,$){var F=u.stateNode;if(!F)throw Error(p(169));$?(u=pU(u,f,u1),F.__reactInternalMemoizedMergedChildContext=u,wu(su),wu(vu),Wu(vu,u)):wu(su),Wu(su,$)}var df=null,t8=!1,C5=!1;function bU(u){df===null?df=[u]:df.push(u)}function iw(u){t8=!0,bU(u)}function y0(){if(!C5&&df!==null){C5=!0;var u=0,f=Tu;try{var $=df;for(Tu=1;u<$.length;u++){var F=$[u];do F=F(!0);while(F!==null)}df=null,t8=!1}catch(l){throw df!==null&&(df=df.slice(u+1)),BU(s9,y0),l}finally{Tu=f,C5=!1}}return null}var y1=[],k1=0,j8=null,N8=0,Qf=[],Jf=0,f1=null,af=1,of="";function s0(u,f){y1[k1++]=N8,y1[k1++]=j8,j8=u,N8=f}function iU(u,f,$){Qf[Jf++]=af,Qf[Jf++]=of,Qf[Jf++]=f1,f1=u;var F=af;u=of;var l=32-Ef(F)-1;F&=~(1<<l),$+=1;var U=32-Ef(f)+l;if(30<U){var _=l-l%5;U=(F&(1<<_)-1).toString(32),F>>=_,l-=_,af=1<<32-Ef(f)+l|$<<l|F,of=U+u}else af=1<<U|$<<l|F,of=u}function $7(u){u.return!==null&&(s0(u,1),iU(u,1,0))}function F7(u){for(;u===j8;)j8=y1[--k1],y1[k1]=null,N8=y1[--k1],y1[k1]=null;for(;u===f1;)f1=Qf[--Jf],Qf[Jf]=null,of=Qf[--Jf],Qf[Jf]=null,af=Qf[--Jf],Qf[Jf]=null}var uf=null,eu=null,Lu=!1,Mf=null;function gU(u,f){var $=qf(5,null,null,0);$.elementType="DELETED",$.stateNode=f,$.return=u,f=u.deletions,f===null?(u.deletions=[$],u.flags|=16):f.push($)}function Rl(u,f){switch(u.tag){case 5:var $=u.type;return f=f.nodeType!==1||$.toLowerCase()!==f.nodeName.toLowerCase()?null:f,f!==null?(u.stateNode=f,uf=u,eu=E0(f.firstChild),!0):!1;case 6:return f=u.pendingProps===""||f.nodeType!==3?null:f,f!==null?(u.stateNode=f,uf=u,eu=null,!0):!1;case 13:return f=f.nodeType!==8?null:f,f!==null?($=f1!==null?{id:af,overflow:of}:null,u.memoizedState={dehydrated:f,treeContext:$,retryLane:1073741824},$=qf(18,null,null,0),$.stateNode=f,$.return=u,u.child=$,uf=u,eu=null,!0):!1;default:return!1}}function Y9(u){return(u.mode&1)!==0&&(u.flags&128)===0}function R9(u){if(Lu){var f=eu;if(f){var $=f;if(!Rl(u,f)){if(Y9(u))throw Error(p(418));f=E0($.nextSibling);var F=uf;f&&Rl(u,f)?gU(F,$):(u.flags=u.flags&-4097|2,Lu=!1,uf=u)}}else{if(Y9(u))throw Error(p(418));u.flags=u.flags&-4097|2,Lu=!1,uf=u}}}function Ml(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;uf=u}function F8(u){if(u!==uf)return!1;if(!Lu)return Ml(u),Lu=!0,!1;var f;if((f=u.tag!==3)&&!(f=u.tag!==5)&&(f=u.type,f=f!=="head"&&f!=="body"&&!G9(u.type,u.memoizedProps)),f&&(f=eu)){if(Y9(u))throw sU(),Error(p(418));for(;f;)gU(u,f),f=E0(f.nextSibling)}if(Ml(u),u.tag===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(p(317));u:{u=u.nextSibling;for(f=0;u;){if(u.nodeType===8){var $=u.data;if($==="/$"){if(f===0){eu=E0(u.nextSibling);break u}f--}else $!=="$"&&$!=="$!"&&$!=="$?"||f++}u=u.nextSibling}eu=null}}else eu=uf?E0(u.stateNode.nextSibling):null;return!0}function sU(){for(var u=eu;u;)u=E0(u.nextSibling)}function g1(){eu=uf=null,Lu=!1}function l7(u){Mf===null?Mf=[u]:Mf.push(u)}var gw=l0.ReactCurrentBatchConfig;function D4(u,f,$){if(u=$.ref,u!==null&&typeof u!=="function"&&typeof u!=="object"){if($._owner){if($=$._owner,$){if($.tag!==1)throw Error(p(309));var F=$.stateNode}if(!F)throw Error(p(147,u));var l=F,U=""+u;if(f!==null&&f.ref!==null&&typeof f.ref==="function"&&f.ref._stringRef===U)return f.ref;return f=function(_){var Q=l.refs;_===null?delete Q[U]:Q[U]=_},f._stringRef=U,f}if(typeof u!=="string")throw Error(p(284));if(!$._owner)throw Error(p(290,u))}return u}function l8(u,f){throw u=Object.prototype.toString.call(f),Error(p(31,u==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":u))}function El(u){var f=u._init;return f(u._payload)}function tU(u){function f(B,G){if(u){var w=B.deletions;w===null?(B.deletions=[G],B.flags|=16):w.push(G)}}function $(B,G){if(!u)return null;for(;G!==null;)f(B,G),G=G.sibling;return null}function F(B,G){for(B=new Map;G!==null;)G.key!==null?B.set(G.key,G):B.set(G.index,G),G=G.sibling;return B}function l(B,G){return B=O0(B,G),B.index=0,B.sibling=null,B}function U(B,G,w){if(B.index=w,!u)return B.flags|=1048576,G;if(w=B.alternate,w!==null)return w=w.index,w<G?(B.flags|=2,G):w;return B.flags|=2,G}function _(B){return u&&B.alternate===null&&(B.flags|=2),B}function Q(B,G,w,H){if(G===null||G.tag!==6)return G=b5(w,B.mode,H),G.return=B,G;return G=l(G,w),G.return=B,G}function J(B,G,w,H){var M=w.type;if(M===D1)return T(B,G,w.props.children,H,w.key);if(G!==null&&(G.elementType===M||typeof M==="object"&&M!==null&&M.$$typeof===B0&&El(M)===G.type))return H=l(G,w.props),H.ref=D4(B,G,w),H.return=B,H;return H=H8(w.type,w.key,w.props,null,B.mode,H),H.ref=D4(B,G,w),H.return=B,H}function q(B,G,w,H){if(G===null||G.tag!==4||G.stateNode.containerInfo!==w.containerInfo||G.stateNode.implementation!==w.implementation)return G=i5(w,B.mode,H),G.return=B,G;return G=l(G,w.children||[]),G.return=B,G}function T(B,G,w,H,M){if(G===null||G.tag!==7)return G=e0(w,B.mode,H,M),G.return=B,G;return G=l(G,w),G.return=B,G}function W(B,G,w){if(typeof G==="string"&&G!==""||typeof G==="number")return G=b5(""+G,B.mode,w),G.return=B,G;if(typeof G==="object"&&G!==null){switch(G.$$typeof){case s3:return w=H8(G.type,G.key,G.props,null,B.mode,w),w.ref=D4(B,null,G),w.return=B,w;case X1:return G=i5(G,B.mode,w),G.return=B,G;case B0:var H=G._init;return W(B,H(G._payload),w)}if(N4(G)||M4(G))return G=e0(G,B.mode,w,null),G.return=B,G;l8(B,G)}return null}function A(B,G,w,H){var M=G!==null?G.key:null;if(typeof w==="string"&&w!==""||typeof w==="number")return M!==null?null:Q(B,G,""+w,H);if(typeof w==="object"&&w!==null){switch(w.$$typeof){case s3:return w.key===M?J(B,G,w,H):null;case X1:return w.key===M?q(B,G,w,H):null;case B0:return M=w._init,A(B,G,M(w._payload),H)}if(N4(w)||M4(w))return M!==null?null:T(B,G,w,H,null);l8(B,w)}return null}function K(B,G,w,H,M){if(typeof H==="string"&&H!==""||typeof H==="number")return B=B.get(w)||null,Q(G,B,""+H,M);if(typeof H==="object"&&H!==null){switch(H.$$typeof){case s3:return B=B.get(H.key===null?w:H.key)||null,J(G,B,H,M);case X1:return B=B.get(H.key===null?w:H.key)||null,q(G,B,H,M);case B0:var R=H._init;return K(B,G,w,R(H._payload),M)}if(N4(H)||M4(H))return B=B.get(w)||null,T(G,B,H,M,null);l8(G,H)}return null}function L(B,G,w,H){for(var M=null,R=null,E=G,V=G=0,D=null;E!==null&&V<w.length;V++){E.index>V?(D=E,E=null):D=E.sibling;var r=A(B,E,w[V],H);if(r===null){E===null&&(E=D);break}u&&E&&r.alternate===null&&f(B,E),G=U(r,G,V),R===null?M=r:R.sibling=r,R=r,E=D}if(V===w.length)return $(B,E),Lu&&s0(B,V),M;if(E===null){for(;V<w.length;V++)E=W(B,w[V],H),E!==null&&(G=U(E,G,V),R===null?M=E:R.sibling=E,R=E);return Lu&&s0(B,V),M}for(E=F(B,E);V<w.length;V++)D=K(E,B,V,w[V],H),D!==null&&(u&&D.alternate!==null&&E.delete(D.key===null?V:D.key),G=U(D,G,V),R===null?M=D:R.sibling=D,R=D);return u&&E.forEach(function(C){return f(B,C)}),Lu&&s0(B,V),M}function z(B,G,w,H){var M=M4(w);if(typeof M!=="function")throw Error(p(150));if(w=M.call(w),w==null)throw Error(p(151));for(var R=M=null,E=G,V=G=0,D=null,r=w.next();E!==null&&!r.done;V++,r=w.next()){E.index>V?(D=E,E=null):D=E.sibling;var C=A(B,E,r.value,H);if(C===null){E===null&&(E=D);break}u&&E&&C.alternate===null&&f(B,E),G=U(C,G,V),R===null?M=C:R.sibling=C,R=C,E=D}if(r.done)return $(B,E),Lu&&s0(B,V),M;if(E===null){for(;!r.done;V++,r=w.next())r=W(B,r.value,H),r!==null&&(G=U(r,G,V),R===null?M=r:R.sibling=r,R=r);return Lu&&s0(B,V),M}for(E=F(B,E);!r.done;V++,r=w.next())r=K(E,B,V,r.value,H),r!==null&&(u&&r.alternate!==null&&E.delete(r.key===null?V:r.key),G=U(r,G,V),R===null?M=r:R.sibling=r,R=r);return u&&E.forEach(function(m){return f(B,m)}),Lu&&s0(B,V),M}function Z(B,G,w,H){if(typeof w==="object"&&w!==null&&w.type===D1&&w.key===null&&(w=w.props.children),typeof w==="object"&&w!==null){switch(w.$$typeof){case s3:u:{for(var M=w.key,R=G;R!==null;){if(R.key===M){if(M=w.type,M===D1){if(R.tag===7){$(B,R.sibling),G=l(R,w.props.children),G.return=B,B=G;break u}}else if(R.elementType===M||typeof M==="object"&&M!==null&&M.$$typeof===B0&&El(M)===R.type){$(B,R.sibling),G=l(R,w.props),G.ref=D4(B,R,w),G.return=B,B=G;break u}$(B,R);break}else f(B,R);R=R.sibling}w.type===D1?(G=e0(w.props.children,B.mode,H,w.key),G.return=B,B=G):(H=H8(w.type,w.key,w.props,null,B.mode,H),H.ref=D4(B,G,w),H.return=B,B=H)}return _(B);case X1:u:{for(R=w.key;G!==null;){if(G.key===R)if(G.tag===4&&G.stateNode.containerInfo===w.containerInfo&&G.stateNode.implementation===w.implementation){$(B,G.sibling),G=l(G,w.children||[]),G.return=B,B=G;break u}else{$(B,G);break}else f(B,G);G=G.sibling}G=i5(w,B.mode,H),G.return=B,B=G}return _(B);case B0:return R=w._init,Z(B,G,R(w._payload),H)}if(N4(w))return L(B,G,w,H);if(M4(w))return z(B,G,w,H);l8(B,w)}return typeof w==="string"&&w!==""||typeof w==="number"?(w=""+w,G!==null&&G.tag===6?($(B,G.sibling),G=l(G,w),G.return=B,B=G):($(B,G),G=b5(w,B.mode,H),G.return=B,B=G),_(B)):$(B,G)}return Z}var s1=tU(!0),nU=tU(!1),I8=I0(null),y8=null,P1=null,U7=null;function _7(){U7=P1=y8=null}function Q7(u){var f=I8.current;wu(I8),u._currentValue=f}function M9(u,f,$){for(;u!==null;){var F=u.alternate;if((u.childLanes&f)!==f?(u.childLanes|=f,F!==null&&(F.childLanes|=f)):F!==null&&(F.childLanes&f)!==f&&(F.childLanes|=f),u===$)break;u=u.return}}function m1(u,f){y8=u,U7=P1=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&f)!==0&&(gu=!0),u.firstContext=null)}function Af(u){var f=u._currentValue;if(U7!==u)if(u={context:u,memoizedValue:f,next:null},P1===null){if(y8===null)throw Error(p(308));P1=u,y8.dependencies={lanes:0,firstContext:u}}else P1=P1.next=u;return f}var d0=null;function J7(u){d0===null?d0=[u]:d0.push(u)}function dU(u,f,$,F){var l=f.interleaved;return l===null?($.next=$,J7(f)):($.next=l.next,l.next=$),f.interleaved=$,$0(u,F)}function $0(u,f){u.lanes|=f;var $=u.alternate;$!==null&&($.lanes|=f),$=u;for(u=u.return;u!==null;)u.childLanes|=f,$=u.alternate,$!==null&&($.childLanes|=f),$=u,u=u.return;return $.tag===3?$.stateNode:null}var L0=!1;function q7(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aU(u,f){u=u.updateQueue,f.updateQueue===u&&(f.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function ef(u,f){return{eventTime:u,lane:f,tag:0,payload:null,callback:null,next:null}}function V0(u,f,$){var F=u.updateQueue;if(F===null)return null;if(F=F.shared,(Ju&2)!==0){var l=F.pending;return l===null?f.next=f:(f.next=l.next,l.next=f),F.pending=f,$0(u,$)}return l=F.interleaved,l===null?(f.next=f,J7(F)):(f.next=l.next,l.next=f),F.interleaved=f,$0(u,$)}function W8(u,f,$){if(f=f.updateQueue,f!==null&&(f=f.shared,($&4194240)!==0)){var F=f.lanes;F&=u.pendingLanes,$|=F,f.lanes=$,t9(u,$)}}function Vl(u,f){var{updateQueue:$,alternate:F}=u;if(F!==null&&(F=F.updateQueue,$===F)){var l=null,U=null;if($=$.firstBaseUpdate,$!==null){do{var _={eventTime:$.eventTime,lane:$.lane,tag:$.tag,payload:$.payload,callback:$.callback,next:null};U===null?l=U=_:U=U.next=_,$=$.next}while($!==null);U===null?l=U=f:U=U.next=f}else l=U=f;$={baseState:F.baseState,firstBaseUpdate:l,lastBaseUpdate:U,shared:F.shared,effects:F.effects},u.updateQueue=$;return}u=$.lastBaseUpdate,u===null?$.firstBaseUpdate=f:u.next=f,$.lastBaseUpdate=f}function k8(u,f,$,F){var l=u.updateQueue;L0=!1;var{firstBaseUpdate:U,lastBaseUpdate:_}=l,Q=l.shared.pending;if(Q!==null){l.shared.pending=null;var J=Q,q=J.next;J.next=null,_===null?U=q:_.next=q,_=J;var T=u.alternate;T!==null&&(T=T.updateQueue,Q=T.lastBaseUpdate,Q!==_&&(Q===null?T.firstBaseUpdate=q:Q.next=q,T.lastBaseUpdate=J))}if(U!==null){var W=l.baseState;_=0,T=q=J=null,Q=U;do{var{lane:A,eventTime:K}=Q;if((F&A)===A){T!==null&&(T=T.next={eventTime:K,lane:0,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null});u:{var L=u,z=Q;switch(A=f,K=$,z.tag){case 1:if(L=z.payload,typeof L==="function"){W=L.call(K,W,A);break u}W=L;break u;case 3:L.flags=L.flags&-65537|128;case 0:if(L=z.payload,A=typeof L==="function"?L.call(K,W,A):L,A===null||A===void 0)break u;W=Zu({},W,A);break u;case 2:L0=!0}}Q.callback!==null&&Q.lane!==0&&(u.flags|=64,A=l.effects,A===null?l.effects=[Q]:A.push(Q))}else K={eventTime:K,lane:A,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},T===null?(q=T=K,J=W):T=T.next=K,_|=A;if(Q=Q.next,Q===null)if(Q=l.shared.pending,Q===null)break;else A=Q,Q=A.next,A.next=null,l.lastBaseUpdate=A,l.shared.pending=null}while(1);if(T===null&&(J=W),l.baseState=J,l.firstBaseUpdate=q,l.lastBaseUpdate=T,f=l.shared.interleaved,f!==null){l=f;do _|=l.lane,l=l.next;while(l!==f)}else U===null&&(l.shared.lanes=0);F1|=_,u.lanes=_,u.memoizedState=W}}function Xl(u,f,$){if(u=f.effects,f.effects=null,u!==null)for(f=0;f<u.length;f++){var F=u[f],l=F.callback;if(l!==null){if(F.callback=null,F=$,typeof l!=="function")throw Error(p(191,l));l.call(F)}}}var K3={},hf=I0(K3),l3=I0(K3),U3=I0(K3);function a0(u){if(u===K3)throw Error(p(174));return u}function T7(u,f){switch(Wu(U3,f),Wu(l3,u),Wu(hf,K3),u=f.nodeType,u){case 9:case 11:f=(f=f.documentElement)?f.namespaceURI:f9(null,"");break;default:u=u===8?f.parentNode:f,f=u.namespaceURI||null,u=u.tagName,f=f9(f,u)}wu(hf),Wu(hf,f)}function t1(){wu(hf),wu(l3),wu(U3)}function oU(u){a0(U3.current);var f=a0(hf.current),$=f9(f,u.type);f!==$&&(Wu(l3,u),Wu(hf,$))}function A7(u){l3.current===u&&(wu(hf),wu(l3))}var Hu=I0(0);function P8(u){for(var f=u;f!==null;){if(f.tag===13){var $=f.memoizedState;if($!==null&&($=$.dehydrated,$===null||$.data==="$?"||$.data==="$!"))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var h5=[];function W7(){for(var u=0;u<h5.length;u++)h5[u]._workInProgressVersionPrimary=null;h5.length=0}var{ReactCurrentDispatcher:K8,ReactCurrentBatchConfig:v5}=l0,$1=0,zu=null,Xu=null,Ou=null,r8=!1,p4=!1,_3=0,sw=0;function ru(){throw Error(p(321))}function K7(u,f){if(f===null)return!1;for(var $=0;$<f.length&&$<u.length;$++)if(!Xf(u[$],f[$]))return!1;return!0}function w7(u,f,$,F,l,U){if($1=U,zu=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,K8.current=u===null||u.memoizedState===null?aw:ow,u=$(F,l),p4){U=0;do{if(p4=!1,_3=0,25<=U)throw Error(p(301));U+=1,Ou=Xu=null,f.updateQueue=null,K8.current=ew,u=$(F,l)}while(p4)}if(K8.current=C8,f=Xu!==null&&Xu.next!==null,$1=0,Ou=Xu=zu=null,r8=!1,f)throw Error(p(300));return u}function B7(){var u=_3!==0;return _3=0,u}function Pf(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ou===null?zu.memoizedState=Ou=u:Ou=Ou.next=u,Ou}function Wf(){if(Xu===null){var u=zu.alternate;u=u!==null?u.memoizedState:null}else u=Xu.next;var f=Ou===null?zu.memoizedState:Ou.next;if(f!==null)Ou=f,Xu=u;else{if(u===null)throw Error(p(310));Xu=u,u={memoizedState:Xu.memoizedState,baseState:Xu.baseState,baseQueue:Xu.baseQueue,queue:Xu.queue,next:null},Ou===null?zu.memoizedState=Ou=u:Ou=Ou.next=u}return Ou}function Q3(u,f){return typeof f==="function"?f(u):f}function x5(u){var f=Wf(),$=f.queue;if($===null)throw Error(p(311));$.lastRenderedReducer=u;var F=Xu,l=F.baseQueue,U=$.pending;if(U!==null){if(l!==null){var _=l.next;l.next=U.next,U.next=_}F.baseQueue=l=U,$.pending=null}if(l!==null){U=l.next,F=F.baseState;var Q=_=null,J=null,q=U;do{var T=q.lane;if(($1&T)===T)J!==null&&(J=J.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),F=q.hasEagerState?q.eagerState:u(F,q.action);else{var W={lane:T,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};J===null?(Q=J=W,_=F):J=J.next=W,zu.lanes|=T,F1|=T}q=q.next}while(q!==null&&q!==U);J===null?_=F:J.next=Q,Xf(F,f.memoizedState)||(gu=!0),f.memoizedState=F,f.baseState=_,f.baseQueue=J,$.lastRenderedState=F}if(u=$.interleaved,u!==null){l=u;do U=l.lane,zu.lanes|=U,F1|=U,l=l.next;while(l!==u)}else l===null&&($.lanes=0);return[f.memoizedState,$.dispatch]}function c5(u){var f=Wf(),$=f.queue;if($===null)throw Error(p(311));$.lastRenderedReducer=u;var{dispatch:F,pending:l}=$,U=f.memoizedState;if(l!==null){$.pending=null;var _=l=l.next;do U=u(U,_.action),_=_.next;while(_!==l);Xf(U,f.memoizedState)||(gu=!0),f.memoizedState=U,f.baseQueue===null&&(f.baseState=U),$.lastRenderedState=U}return[U,F]}function eU(){}function u_(u,f){var $=zu,F=Wf(),l=f(),U=!Xf(F.memoizedState,l);if(U&&(F.memoizedState=l,gu=!0),F=F.queue,L7(F_.bind(null,$,F,u),[u]),F.getSnapshot!==f||U||Ou!==null&&Ou.memoizedState.tag&1){if($.flags|=2048,J3(9,$_.bind(null,$,F,l,f),void 0,null),Su===null)throw Error(p(349));($1&30)!==0||f_($,f,l)}return l}function f_(u,f,$){u.flags|=16384,u={getSnapshot:f,value:$},f=zu.updateQueue,f===null?(f={lastEffect:null,stores:null},zu.updateQueue=f,f.stores=[u]):($=f.stores,$===null?f.stores=[u]:$.push(u))}function $_(u,f,$,F){f.value=$,f.getSnapshot=F,l_(f)&&U_(u)}function F_(u,f,$){return $(function(){l_(f)&&U_(u)})}function l_(u){var f=u.getSnapshot;u=u.value;try{var $=f();return!Xf(u,$)}catch(F){return!0}}function U_(u){var f=$0(u,1);f!==null&&Vf(f,u,1,-1)}function Dl(u){var f=Pf();return typeof u==="function"&&(u=u()),f.memoizedState=f.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Q3,lastRenderedState:u},f.queue=u,u=u.dispatch=dw.bind(null,zu,u),[f.memoizedState,u]}function J3(u,f,$,F){return u={tag:u,create:f,destroy:$,deps:F,next:null},f=zu.updateQueue,f===null?(f={lastEffect:null,stores:null},zu.updateQueue=f,f.lastEffect=u.next=u):($=f.lastEffect,$===null?f.lastEffect=u.next=u:(F=$.next,$.next=u,u.next=F,f.lastEffect=u)),u}function __(){return Wf().memoizedState}function w8(u,f,$,F){var l=Pf();zu.flags|=u,l.memoizedState=J3(1|f,$,void 0,F===void 0?null:F)}function n8(u,f,$,F){var l=Wf();F=F===void 0?null:F;var U=void 0;if(Xu!==null){var _=Xu.memoizedState;if(U=_.destroy,F!==null&&K7(F,_.deps)){l.memoizedState=J3(f,$,U,F);return}}zu.flags|=u,l.memoizedState=J3(1|f,$,U,F)}function Ol(u,f){return w8(8390656,8,u,f)}function L7(u,f){return n8(2048,8,u,f)}function Q_(u,f){return n8(4,2,u,f)}function J_(u,f){return n8(4,4,u,f)}function q_(u,f){if(typeof f==="function")return u=u(),f(u),function(){f(null)};if(f!==null&&f!==void 0)return u=u(),f.current=u,function(){f.current=null}}function T_(u,f,$){return $=$!==null&&$!==void 0?$.concat([u]):null,n8(4,4,q_.bind(null,f,u),$)}function G7(){}function A_(u,f){var $=Wf();f=f===void 0?null:f;var F=$.memoizedState;if(F!==null&&f!==null&&K7(f,F[1]))return F[0];return $.memoizedState=[u,f],u}function W_(u,f){var $=Wf();f=f===void 0?null:f;var F=$.memoizedState;if(F!==null&&f!==null&&K7(f,F[1]))return F[0];return u=u(),$.memoizedState=[u,f],u}function K_(u,f,$){if(($1&21)===0)return u.baseState&&(u.baseState=!1,gu=!0),u.memoizedState=$;return Xf($,f)||($=HU(),zu.lanes|=$,F1|=$,u.baseState=!0),f}function tw(u,f){var $=Tu;Tu=$!==0&&4>$?$:4,u(!0);var F=v5.transition;v5.transition={};try{u(!1),f()}finally{Tu=$,v5.transition=F}}function w_(){return Wf().memoizedState}function nw(u,f,$){var F=D0(u);if($={lane:F,action:$,hasEagerState:!1,eagerState:null,next:null},B_(u))L_(f,$);else if($=dU(u,f,$,F),$!==null){var l=pu();Vf($,u,F,l),G_($,f,F)}}function dw(u,f,$){var F=D0(u),l={lane:F,action:$,hasEagerState:!1,eagerState:null,next:null};if(B_(u))L_(f,l);else{var U=u.alternate;if(u.lanes===0&&(U===null||U.lanes===0)&&(U=f.lastRenderedReducer,U!==null))try{var _=f.lastRenderedState,Q=U(_,$);if(l.hasEagerState=!0,l.eagerState=Q,Xf(Q,_)){var J=f.interleaved;J===null?(l.next=l,J7(f)):(l.next=J.next,J.next=l),f.interleaved=l;return}}catch(q){}finally{}$=dU(u,f,l,F),$!==null&&(l=pu(),Vf($,u,F,l),G_($,f,F))}}function B_(u){var f=u.alternate;return u===zu||f!==null&&f===zu}function L_(u,f){p4=r8=!0;var $=u.pending;$===null?f.next=f:(f.next=$.next,$.next=f),u.pending=f}function G_(u,f,$){if(($&4194240)!==0){var F=f.lanes;F&=u.pendingLanes,$|=F,f.lanes=$,t9(u,$)}}var C8={readContext:Af,useCallback:ru,useContext:ru,useEffect:ru,useImperativeHandle:ru,useInsertionEffect:ru,useLayoutEffect:ru,useMemo:ru,useReducer:ru,useRef:ru,useState:ru,useDebugValue:ru,useDeferredValue:ru,useTransition:ru,useMutableSource:ru,useSyncExternalStore:ru,useId:ru,unstable_isNewReconciler:!1},aw={readContext:Af,useCallback:function(u,f){return Pf().memoizedState=[u,f===void 0?null:f],u},useContext:Af,useEffect:Ol,useImperativeHandle:function(u,f,$){return $=$!==null&&$!==void 0?$.concat([u]):null,w8(4194308,4,q_.bind(null,f,u),$)},useLayoutEffect:function(u,f){return w8(4194308,4,u,f)},useInsertionEffect:function(u,f){return w8(4,2,u,f)},useMemo:function(u,f){var $=Pf();return f=f===void 0?null:f,u=u(),$.memoizedState=[u,f],u},useReducer:function(u,f,$){var F=Pf();return f=$!==void 0?$(f):f,F.memoizedState=F.baseState=f,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:f},F.queue=u,u=u.dispatch=nw.bind(null,zu,u),[F.memoizedState,u]},useRef:function(u){var f=Pf();return u={current:u},f.memoizedState=u},useState:Dl,useDebugValue:G7,useDeferredValue:function(u){return Pf().memoizedState=u},useTransition:function(){var u=Dl(!1),f=u[0];return u=tw.bind(null,u[1]),Pf().memoizedState=u,[f,u]},useMutableSource:function(){},useSyncExternalStore:function(u,f,$){var F=zu,l=Pf();if(Lu){if($===void 0)throw Error(p(407));$=$()}else{if($=f(),Su===null)throw Error(p(349));($1&30)!==0||f_(F,f,$)}l.memoizedState=$;var U={value:$,getSnapshot:f};return l.queue=U,Ol(F_.bind(null,F,U,u),[u]),F.flags|=2048,J3(9,$_.bind(null,F,U,$,f),void 0,null),$},useId:function(){var u=Pf(),f=Su.identifierPrefix;if(Lu){var $=of,F=af;$=(F&~(1<<32-Ef(F)-1)).toString(32)+$,f=":"+f+"R"+$,$=_3++,0<$&&(f+="H"+$.toString(32)),f+=":"}else $=sw++,f=":"+f+"r"+$.toString(32)+":";return u.memoizedState=f},unstable_isNewReconciler:!1},ow={readContext:Af,useCallback:A_,useContext:Af,useEffect:L7,useImperativeHandle:T_,useInsertionEffect:Q_,useLayoutEffect:J_,useMemo:W_,useReducer:x5,useRef:__,useState:function(){return x5(Q3)},useDebugValue:G7,useDeferredValue:function(u){var f=Wf();return K_(f,Xu.memoizedState,u)},useTransition:function(){var u=x5(Q3)[0],f=Wf().memoizedState;return[u,f]},useMutableSource:eU,useSyncExternalStore:u_,useId:w_,unstable_isNewReconciler:!1},ew={readContext:Af,useCallback:A_,useContext:Af,useEffect:L7,useImperativeHandle:T_,useInsertionEffect:Q_,useLayoutEffect:J_,useMemo:W_,useReducer:c5,useRef:__,useState:function(){return c5(Q3)},useDebugValue:G7,useDeferredValue:function(u){var f=Wf();return Xu===null?f.memoizedState=u:K_(f,Xu.memoizedState,u)},useTransition:function(){var u=c5(Q3)[0],f=Wf().memoizedState;return[u,f]},useMutableSource:eU,useSyncExternalStore:u_,useId:w_,unstable_isNewReconciler:!1};function Yf(u,f){if(u&&u.defaultProps){f=Zu({},f),u=u.defaultProps;for(var $ in u)f[$]===void 0&&(f[$]=u[$]);return f}return f}function E9(u,f,$,F){f=u.memoizedState,$=$(F,f),$=$===null||$===void 0?f:Zu({},f,$),u.memoizedState=$,u.lanes===0&&(u.updateQueue.baseState=$)}var d8={isMounted:function(u){return(u=u._reactInternals)?_1(u)===u:!1},enqueueSetState:function(u,f,$){u=u._reactInternals;var F=pu(),l=D0(u),U=ef(F,l);U.payload=f,$!==void 0&&$!==null&&(U.callback=$),f=V0(u,U,l),f!==null&&(Vf(f,u,l,F),W8(f,u,l))},enqueueReplaceState:function(u,f,$){u=u._reactInternals;var F=pu(),l=D0(u),U=ef(F,l);U.tag=1,U.payload=f,$!==void 0&&$!==null&&(U.callback=$),f=V0(u,U,l),f!==null&&(Vf(f,u,l,F),W8(f,u,l))},enqueueForceUpdate:function(u,f){u=u._reactInternals;var $=pu(),F=D0(u),l=ef($,F);l.tag=2,f!==void 0&&f!==null&&(l.callback=f),f=V0(u,l,F),f!==null&&(Vf(f,u,F,$),W8(f,u,F))}};function Sl(u,f,$,F,l,U,_){return u=u.stateNode,typeof u.shouldComponentUpdate==="function"?u.shouldComponentUpdate(F,U,_):f.prototype&&f.prototype.isPureReactComponent?!u3($,F)||!u3(l,U):!0}function H_(u,f,$){var F=!1,l=j0,U=f.contextType;return typeof U==="object"&&U!==null?U=Af(U):(l=tu(f)?u1:vu.current,F=f.contextTypes,U=(F=F!==null&&F!==void 0)?i1(u,l):j0),f=new f($,U),u.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=d8,u.stateNode=f,f._reactInternals=u,F&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=l,u.__reactInternalMemoizedMaskedChildContext=U),f}function jl(u,f,$,F){u=f.state,typeof f.componentWillReceiveProps==="function"&&f.componentWillReceiveProps($,F),typeof f.UNSAFE_componentWillReceiveProps==="function"&&f.UNSAFE_componentWillReceiveProps($,F),f.state!==u&&d8.enqueueReplaceState(f,f.state,null)}function V9(u,f,$,F){var l=u.stateNode;l.props=$,l.state=u.memoizedState,l.refs={},q7(u);var U=f.contextType;typeof U==="object"&&U!==null?l.context=Af(U):(U=tu(f)?u1:vu.current,l.context=i1(u,U)),l.state=u.memoizedState,U=f.getDerivedStateFromProps,typeof U==="function"&&(E9(u,f,U,$),l.state=u.memoizedState),typeof f.getDerivedStateFromProps==="function"||typeof l.getSnapshotBeforeUpdate==="function"||typeof l.UNSAFE_componentWillMount!=="function"&&typeof l.componentWillMount!=="function"||(f=l.state,typeof l.componentWillMount==="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount==="function"&&l.UNSAFE_componentWillMount(),f!==l.state&&d8.enqueueReplaceState(l,l.state,null),k8(u,$,l,F),l.state=u.memoizedState),typeof l.componentDidMount==="function"&&(u.flags|=4194308)}function n1(u,f){try{var $="",F=f;do $+=SK(F),F=F.return;while(F);var l=$}catch(U){l=`
1375
- Error generating stack: `+U.message+`
1376
- `+U.stack}return{value:u,source:f,stack:l,digest:null}}function m5(u,f,$){return{value:u,source:null,stack:$!=null?$:null,digest:f!=null?f:null}}function X9(u,f){try{console.error(f.value)}catch($){setTimeout(function(){throw $})}}var uB=typeof WeakMap==="function"?WeakMap:Map;function z_(u,f,$){$=ef(-1,$),$.tag=3,$.payload={element:null};var F=f.value;return $.callback=function(){v8||(v8=!0,r9=F),X9(u,f)},$}function Z_(u,f,$){$=ef(-1,$),$.tag=3;var F=u.type.getDerivedStateFromError;if(typeof F==="function"){var l=f.value;$.payload=function(){return F(l)},$.callback=function(){X9(u,f)}}var U=u.stateNode;return U!==null&&typeof U.componentDidCatch==="function"&&($.callback=function(){X9(u,f),typeof F!=="function"&&(X0===null?X0=new Set([this]):X0.add(this));var _=f.stack;this.componentDidCatch(f.value,{componentStack:_!==null?_:""})}),$}function Nl(u,f,$){var F=u.pingCache;if(F===null){F=u.pingCache=new uB;var l=new Set;F.set(f,l)}else l=F.get(f),l===void 0&&(l=new Set,F.set(f,l));l.has($)||(l.add($),u=wB.bind(null,u,f,$),f.then(u,u))}function Il(u){do{var f;if(f=u.tag===13)f=u.memoizedState,f=f!==null?f.dehydrated!==null?!0:!1:!0;if(f)return u;u=u.return}while(u!==null);return null}function yl(u,f,$,F,l){if((u.mode&1)===0)return u===f?u.flags|=65536:(u.flags|=128,$.flags|=131072,$.flags&=-52805,$.tag===1&&($.alternate===null?$.tag=17:(f=ef(-1,1),f.tag=2,V0($,f,1))),$.lanes|=1),u;return u.flags|=65536,u.lanes=l,u}var fB=l0.ReactCurrentOwner,gu=!1;function mu(u,f,$,F){f.child=u===null?nU(f,null,$,F):s1(f,u.child,$,F)}function kl(u,f,$,F,l){$=$.render;var U=f.ref;if(m1(f,l),F=w7(u,f,$,F,U,l),$=B7(),u!==null&&!gu)return f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~l,F0(u,f,l);return Lu&&$&&$7(f),f.flags|=1,mu(u,f,F,l),f.child}function Pl(u,f,$,F,l){if(u===null){var U=$.type;if(typeof U==="function"&&!V7(U)&&U.defaultProps===void 0&&$.compare===null&&$.defaultProps===void 0)return f.tag=15,f.type=U,Y_(u,f,U,F,l);return u=H8($.type,null,F,f,f.mode,l),u.ref=f.ref,u.return=f,f.child=u}if(U=u.child,(u.lanes&l)===0){var _=U.memoizedProps;if($=$.compare,$=$!==null?$:u3,$(_,F)&&u.ref===f.ref)return F0(u,f,l)}return f.flags|=1,u=O0(U,F),u.ref=f.ref,u.return=f,f.child=u}function Y_(u,f,$,F,l){if(u!==null){var U=u.memoizedProps;if(u3(U,F)&&u.ref===f.ref)if(gu=!1,f.pendingProps=F=U,(u.lanes&l)!==0)(u.flags&131072)!==0&&(gu=!0);else return f.lanes=u.lanes,F0(u,f,l)}return D9(u,f,$,F,l)}function R_(u,f,$){var F=f.pendingProps,l=F.children,U=u!==null?u.memoizedState:null;if(F.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wu(C1,ou),ou|=$;else{if(($&1073741824)===0)return u=U!==null?U.baseLanes|$:$,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:u,cachePool:null,transitions:null},f.updateQueue=null,Wu(C1,ou),ou|=u,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},F=U!==null?U.baseLanes:$,Wu(C1,ou),ou|=F}else U!==null?(F=U.baseLanes|$,f.memoizedState=null):F=$,Wu(C1,ou),ou|=F;return mu(u,f,l,$),f.child}function M_(u,f){var $=f.ref;if(u===null&&$!==null||u!==null&&u.ref!==$)f.flags|=512,f.flags|=2097152}function D9(u,f,$,F,l){var U=tu($)?u1:vu.current;if(U=i1(f,U),m1(f,l),$=w7(u,f,$,F,U,l),F=B7(),u!==null&&!gu)return f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~l,F0(u,f,l);return Lu&&F&&$7(f),f.flags|=1,mu(u,f,$,l),f.child}function rl(u,f,$,F,l){if(tu($)){var U=!0;S8(f)}else U=!1;if(m1(f,l),f.stateNode===null)B8(u,f),H_(f,$,F),V9(f,$,F,l),F=!0;else if(u===null){var{stateNode:_,memoizedProps:Q}=f;_.props=Q;var J=_.context,q=$.contextType;typeof q==="object"&&q!==null?q=Af(q):(q=tu($)?u1:vu.current,q=i1(f,q));var T=$.getDerivedStateFromProps,W=typeof T==="function"||typeof _.getSnapshotBeforeUpdate==="function";W||typeof _.UNSAFE_componentWillReceiveProps!=="function"&&typeof _.componentWillReceiveProps!=="function"||(Q!==F||J!==q)&&jl(f,_,F,q),L0=!1;var A=f.memoizedState;_.state=A,k8(f,F,_,l),J=f.memoizedState,Q!==F||A!==J||su.current||L0?(typeof T==="function"&&(E9(f,$,T,F),J=f.memoizedState),(Q=L0||Sl(f,$,Q,F,A,J,q))?(W||typeof _.UNSAFE_componentWillMount!=="function"&&typeof _.componentWillMount!=="function"||(typeof _.componentWillMount==="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount==="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount==="function"&&(f.flags|=4194308)):(typeof _.componentDidMount==="function"&&(f.flags|=4194308),f.memoizedProps=F,f.memoizedState=J),_.props=F,_.state=J,_.context=q,F=Q):(typeof _.componentDidMount==="function"&&(f.flags|=4194308),F=!1)}else{_=f.stateNode,aU(u,f),Q=f.memoizedProps,q=f.type===f.elementType?Q:Yf(f.type,Q),_.props=q,W=f.pendingProps,A=_.context,J=$.contextType,typeof J==="object"&&J!==null?J=Af(J):(J=tu($)?u1:vu.current,J=i1(f,J));var K=$.getDerivedStateFromProps;(T=typeof K==="function"||typeof _.getSnapshotBeforeUpdate==="function")||typeof _.UNSAFE_componentWillReceiveProps!=="function"&&typeof _.componentWillReceiveProps!=="function"||(Q!==W||A!==J)&&jl(f,_,F,J),L0=!1,A=f.memoizedState,_.state=A,k8(f,F,_,l);var L=f.memoizedState;Q!==W||A!==L||su.current||L0?(typeof K==="function"&&(E9(f,$,K,F),L=f.memoizedState),(q=L0||Sl(f,$,q,F,A,L,J)||!1)?(T||typeof _.UNSAFE_componentWillUpdate!=="function"&&typeof _.componentWillUpdate!=="function"||(typeof _.componentWillUpdate==="function"&&_.componentWillUpdate(F,L,J),typeof _.UNSAFE_componentWillUpdate==="function"&&_.UNSAFE_componentWillUpdate(F,L,J)),typeof _.componentDidUpdate==="function"&&(f.flags|=4),typeof _.getSnapshotBeforeUpdate==="function"&&(f.flags|=1024)):(typeof _.componentDidUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=4),typeof _.getSnapshotBeforeUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=1024),f.memoizedProps=F,f.memoizedState=L),_.props=F,_.state=L,_.context=J,F=q):(typeof _.componentDidUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=4),typeof _.getSnapshotBeforeUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=1024),F=!1)}return O9(u,f,$,F,U,l)}function O9(u,f,$,F,l,U){M_(u,f);var _=(f.flags&128)!==0;if(!F&&!_)return l&&Yl(f,$,!1),F0(u,f,U);F=f.stateNode,fB.current=f;var Q=_&&typeof $.getDerivedStateFromError!=="function"?null:F.render();return f.flags|=1,u!==null&&_?(f.child=s1(f,u.child,null,U),f.child=s1(f,null,Q,U)):mu(u,f,Q,U),f.memoizedState=F.state,l&&Yl(f,$,!0),f.child}function E_(u){var f=u.stateNode;f.pendingContext?Zl(u,f.pendingContext,f.pendingContext!==f.context):f.context&&Zl(u,f.context,!1),T7(u,f.containerInfo)}function Cl(u,f,$,F,l){return g1(),l7(l),f.flags|=256,mu(u,f,$,F),f.child}var S9={dehydrated:null,treeContext:null,retryLane:0};function j9(u){return{baseLanes:u,cachePool:null,transitions:null}}function V_(u,f,$){var F=f.pendingProps,l=Hu.current,U=!1,_=(f.flags&128)!==0,Q;if((Q=_)||(Q=u!==null&&u.memoizedState===null?!1:(l&2)!==0),Q)U=!0,f.flags&=-129;else if(u===null||u.memoizedState!==null)l|=1;if(Wu(Hu,l&1),u===null){if(R9(f),u=f.memoizedState,u!==null&&(u=u.dehydrated,u!==null))return(f.mode&1)===0?f.lanes=1:u.data==="$!"?f.lanes=8:f.lanes=1073741824,null;return _=F.children,u=F.fallback,U?(F=f.mode,U=f.child,_={mode:"hidden",children:_},(F&1)===0&&U!==null?(U.childLanes=0,U.pendingProps=_):U=e8(_,F,0,null),u=e0(u,F,$,null),U.return=f,u.return=f,U.sibling=u,f.child=U,f.child.memoizedState=j9($),f.memoizedState=S9,u):H7(f,_)}if(l=u.memoizedState,l!==null&&(Q=l.dehydrated,Q!==null))return $B(u,f,_,F,Q,l,$);if(U){U=F.fallback,_=f.mode,l=u.child,Q=l.sibling;var J={mode:"hidden",children:F.children};return(_&1)===0&&f.child!==l?(F=f.child,F.childLanes=0,F.pendingProps=J,f.deletions=null):(F=O0(l,J),F.subtreeFlags=l.subtreeFlags&14680064),Q!==null?U=O0(Q,U):(U=e0(U,_,$,null),U.flags|=2),U.return=f,F.return=f,F.sibling=U,f.child=F,F=U,U=f.child,_=u.child.memoizedState,_=_===null?j9($):{baseLanes:_.baseLanes|$,cachePool:null,transitions:_.transitions},U.memoizedState=_,U.childLanes=u.childLanes&~$,f.memoizedState=S9,F}return U=u.child,u=U.sibling,F=O0(U,{mode:"visible",children:F.children}),(f.mode&1)===0&&(F.lanes=$),F.return=f,F.sibling=null,u!==null&&($=f.deletions,$===null?(f.deletions=[u],f.flags|=16):$.push(u)),f.child=F,f.memoizedState=null,F}function H7(u,f){return f=e8({mode:"visible",children:f},u.mode,0,null),f.return=u,u.child=f}function U8(u,f,$,F){return F!==null&&l7(F),s1(f,u.child,null,$),u=H7(f,f.pendingProps.children),u.flags|=2,f.memoizedState=null,u}function $B(u,f,$,F,l,U,_){if($){if(f.flags&256)return f.flags&=-257,F=m5(Error(p(422))),U8(u,f,_,F);if(f.memoizedState!==null)return f.child=u.child,f.flags|=128,null;return U=F.fallback,l=f.mode,F=e8({mode:"visible",children:F.children},l,0,null),U=e0(U,l,_,null),U.flags|=2,F.return=f,U.return=f,F.sibling=U,f.child=F,(f.mode&1)!==0&&s1(f,u.child,null,_),f.child.memoizedState=j9(_),f.memoizedState=S9,U}if((f.mode&1)===0)return U8(u,f,_,null);if(l.data==="$!"){if(F=l.nextSibling&&l.nextSibling.dataset,F)var Q=F.dgst;return F=Q,U=Error(p(419)),F=m5(U,F,void 0),U8(u,f,_,F)}if(Q=(_&u.childLanes)!==0,gu||Q){if(F=Su,F!==null){switch(_&-_){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(F.suspendedLanes|_))!==0?0:l,l!==0&&l!==U.retryLane&&(U.retryLane=l,$0(u,l),Vf(F,u,l,-1))}return E7(),F=m5(Error(p(421))),U8(u,f,_,F)}if(l.data==="$?")return f.flags|=128,f.child=u.child,f=BB.bind(null,u),l._reactRetry=f,null;return u=U.treeContext,eu=E0(l.nextSibling),uf=f,Lu=!0,Mf=null,u!==null&&(Qf[Jf++]=af,Qf[Jf++]=of,Qf[Jf++]=f1,af=u.id,of=u.overflow,f1=f),f=H7(f,F.children),f.flags|=4096,f}function hl(u,f,$){u.lanes|=f;var F=u.alternate;F!==null&&(F.lanes|=f),M9(u.return,f,$)}function p5(u,f,$,F,l){var U=u.memoizedState;U===null?u.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:F,tail:$,tailMode:l}:(U.isBackwards=f,U.rendering=null,U.renderingStartTime=0,U.last=F,U.tail=$,U.tailMode=l)}function X_(u,f,$){var F=f.pendingProps,l=F.revealOrder,U=F.tail;if(mu(u,f,F.children,$),F=Hu.current,(F&2)!==0)F=F&1|2,f.flags|=128;else{if(u!==null&&(u.flags&128)!==0)u:for(u=f.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&hl(u,$,f);else if(u.tag===19)hl(u,$,f);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===f)break u;for(;u.sibling===null;){if(u.return===null||u.return===f)break u;u=u.return}u.sibling.return=u.return,u=u.sibling}F&=1}if(Wu(Hu,F),(f.mode&1)===0)f.memoizedState=null;else switch(l){case"forwards":$=f.child;for(l=null;$!==null;)u=$.alternate,u!==null&&P8(u)===null&&(l=$),$=$.sibling;$=l,$===null?(l=f.child,f.child=null):(l=$.sibling,$.sibling=null),p5(f,!1,l,$,U);break;case"backwards":$=null,l=f.child;for(f.child=null;l!==null;){if(u=l.alternate,u!==null&&P8(u)===null){f.child=l;break}u=l.sibling,l.sibling=$,$=l,l=u}p5(f,!0,$,null,U);break;case"together":p5(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function B8(u,f){(f.mode&1)===0&&u!==null&&(u.alternate=null,f.alternate=null,f.flags|=2)}function F0(u,f,$){if(u!==null&&(f.dependencies=u.dependencies),F1|=f.lanes,($&f.childLanes)===0)return null;if(u!==null&&f.child!==u.child)throw Error(p(153));if(f.child!==null){u=f.child,$=O0(u,u.pendingProps),f.child=$;for($.return=f;u.sibling!==null;)u=u.sibling,$=$.sibling=O0(u,u.pendingProps),$.return=f;$.sibling=null}return f.child}function FB(u,f,$){switch(f.tag){case 3:E_(f),g1();break;case 5:oU(f);break;case 1:tu(f.type)&&S8(f);break;case 4:T7(f,f.stateNode.containerInfo);break;case 10:var F=f.type._context,l=f.memoizedProps.value;Wu(I8,F._currentValue),F._currentValue=l;break;case 13:if(F=f.memoizedState,F!==null){if(F.dehydrated!==null)return Wu(Hu,Hu.current&1),f.flags|=128,null;if(($&f.child.childLanes)!==0)return V_(u,f,$);return Wu(Hu,Hu.current&1),u=F0(u,f,$),u!==null?u.sibling:null}Wu(Hu,Hu.current&1);break;case 19:if(F=($&f.childLanes)!==0,(u.flags&128)!==0){if(F)return X_(u,f,$);f.flags|=128}if(l=f.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Wu(Hu,Hu.current),F)break;else return null;case 22:case 23:return f.lanes=0,R_(u,f,$)}return F0(u,f,$)}var D_,N9,O_,S_;D_=function(u,f){for(var $=f.child;$!==null;){if($.tag===5||$.tag===6)u.appendChild($.stateNode);else if($.tag!==4&&$.child!==null){$.child.return=$,$=$.child;continue}if($===f)break;for(;$.sibling===null;){if($.return===null||$.return===f)return;$=$.return}$.sibling.return=$.return,$=$.sibling}};N9=function(){};O_=function(u,f,$,F){var l=u.memoizedProps;if(l!==F){u=f.stateNode,a0(hf.current);var U=null;switch($){case"input":l=a5(u,l),F=a5(u,F),U=[];break;case"select":l=Zu({},l,{value:void 0}),F=Zu({},F,{value:void 0}),U=[];break;case"textarea":l=u9(u,l),F=u9(u,F),U=[];break;default:typeof l.onClick!=="function"&&typeof F.onClick==="function"&&(u.onclick=D8)}$9($,F);var _;$=null;for(q in l)if(!F.hasOwnProperty(q)&&l.hasOwnProperty(q)&&l[q]!=null)if(q==="style"){var Q=l[q];for(_ in Q)Q.hasOwnProperty(_)&&($||($={}),$[_]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(s4.hasOwnProperty(q)?U||(U=[]):(U=U||[]).push(q,null));for(q in F){var J=F[q];if(Q=l!=null?l[q]:void 0,F.hasOwnProperty(q)&&J!==Q&&(J!=null||Q!=null))if(q==="style")if(Q){for(_ in Q)!Q.hasOwnProperty(_)||J&&J.hasOwnProperty(_)||($||($={}),$[_]="");for(_ in J)J.hasOwnProperty(_)&&Q[_]!==J[_]&&($||($={}),$[_]=J[_])}else $||(U||(U=[]),U.push(q,$)),$=J;else q==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,Q=Q?Q.__html:void 0,J!=null&&Q!==J&&(U=U||[]).push(q,J)):q==="children"?typeof J!=="string"&&typeof J!=="number"||(U=U||[]).push(q,""+J):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(s4.hasOwnProperty(q)?(J!=null&&q==="onScroll"&&Ku("scroll",u),U||Q===J||(U=[])):(U=U||[]).push(q,J))}$&&(U=U||[]).push("style",$);var q=U;if(f.updateQueue=q)f.flags|=4}};S_=function(u,f,$,F){$!==F&&(f.flags|=4)};function O4(u,f){if(!Lu)switch(u.tailMode){case"hidden":f=u.tail;for(var $=null;f!==null;)f.alternate!==null&&($=f),f=f.sibling;$===null?u.tail=null:$.sibling=null;break;case"collapsed":$=u.tail;for(var F=null;$!==null;)$.alternate!==null&&(F=$),$=$.sibling;F===null?f||u.tail===null?u.tail=null:u.tail.sibling=null:F.sibling=null}}function Cu(u){var f=u.alternate!==null&&u.alternate.child===u.child,$=0,F=0;if(f)for(var l=u.child;l!==null;)$|=l.lanes|l.childLanes,F|=l.subtreeFlags&14680064,F|=l.flags&14680064,l.return=u,l=l.sibling;else for(l=u.child;l!==null;)$|=l.lanes|l.childLanes,F|=l.subtreeFlags,F|=l.flags,l.return=u,l=l.sibling;return u.subtreeFlags|=F,u.childLanes=$,f}function lB(u,f,$){var F=f.pendingProps;switch(F7(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Cu(f),null;case 1:return tu(f.type)&&O8(),Cu(f),null;case 3:if(F=f.stateNode,t1(),wu(su),wu(vu),W7(),F.pendingContext&&(F.context=F.pendingContext,F.pendingContext=null),u===null||u.child===null)F8(f)?f.flags|=4:u===null||u.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,Mf!==null&&(v9(Mf),Mf=null));return N9(u,f),Cu(f),null;case 5:A7(f);var l=a0(U3.current);if($=f.type,u!==null&&f.stateNode!=null)O_(u,f,$,F,l),u.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!F){if(f.stateNode===null)throw Error(p(166));return Cu(f),null}if(u=a0(hf.current),F8(f)){F=f.stateNode,$=f.type;var U=f.memoizedProps;switch(F[rf]=f,F[F3]=U,u=(f.mode&1)!==0,$){case"dialog":Ku("cancel",F),Ku("close",F);break;case"iframe":case"object":case"embed":Ku("load",F);break;case"video":case"audio":for(l=0;l<C4.length;l++)Ku(C4[l],F);break;case"source":Ku("error",F);break;case"img":case"image":case"link":Ku("error",F),Ku("load",F);break;case"details":Ku("toggle",F);break;case"input":tF(F,U),Ku("invalid",F);break;case"select":F._wrapperState={wasMultiple:!!U.multiple},Ku("invalid",F);break;case"textarea":dF(F,U),Ku("invalid",F)}$9($,U),l=null;for(var _ in U)if(U.hasOwnProperty(_)){var Q=U[_];_==="children"?typeof Q==="string"?F.textContent!==Q&&(U.suppressHydrationWarning!==!0&&$8(F.textContent,Q,u),l=["children",Q]):typeof Q==="number"&&F.textContent!==""+Q&&(U.suppressHydrationWarning!==!0&&$8(F.textContent,Q,u),l=["children",""+Q]):s4.hasOwnProperty(_)&&Q!=null&&_==="onScroll"&&Ku("scroll",F)}switch($){case"input":t3(F),nF(F,U,!0);break;case"textarea":t3(F),aF(F);break;case"select":case"option":break;default:typeof U.onClick==="function"&&(F.onclick=D8)}F=l,f.updateQueue=F,F!==null&&(f.flags|=4)}else{_=l.nodeType===9?l:l.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=FU($)),u==="http://www.w3.org/1999/xhtml"?$==="script"?(u=_.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):typeof F.is==="string"?u=_.createElement($,{is:F.is}):(u=_.createElement($),$==="select"&&(_=u,F.multiple?_.multiple=!0:F.size&&(_.size=F.size))):u=_.createElementNS(u,$),u[rf]=f,u[F3]=F,D_(u,f,!1,!1),f.stateNode=u;u:{switch(_=F9($,F),$){case"dialog":Ku("cancel",u),Ku("close",u),l=F;break;case"iframe":case"object":case"embed":Ku("load",u),l=F;break;case"video":case"audio":for(l=0;l<C4.length;l++)Ku(C4[l],u);l=F;break;case"source":Ku("error",u),l=F;break;case"img":case"image":case"link":Ku("error",u),Ku("load",u),l=F;break;case"details":Ku("toggle",u),l=F;break;case"input":tF(u,F),l=a5(u,F),Ku("invalid",u);break;case"option":l=F;break;case"select":u._wrapperState={wasMultiple:!!F.multiple},l=Zu({},F,{value:void 0}),Ku("invalid",u);break;case"textarea":dF(u,F),l=u9(u,F),Ku("invalid",u);break;default:l=F}$9($,l),Q=l;for(U in Q)if(Q.hasOwnProperty(U)){var J=Q[U];U==="style"?_U(u,J):U==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&lU(u,J)):U==="children"?typeof J==="string"?($!=="textarea"||J!=="")&&t4(u,J):typeof J==="number"&&t4(u,""+J):U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&U!=="autoFocus"&&(s4.hasOwnProperty(U)?J!=null&&U==="onScroll"&&Ku("scroll",u):J!=null&&m9(u,U,J,_))}switch($){case"input":t3(u),nF(u,F,!1);break;case"textarea":t3(u),aF(u);break;case"option":F.value!=null&&u.setAttribute("value",""+S0(F.value));break;case"select":u.multiple=!!F.multiple,U=F.value,U!=null?h1(u,!!F.multiple,U,!1):F.defaultValue!=null&&h1(u,!!F.multiple,F.defaultValue,!0);break;default:typeof l.onClick==="function"&&(u.onclick=D8)}switch($){case"button":case"input":case"select":case"textarea":F=!!F.autoFocus;break u;case"img":F=!0;break u;default:F=!1}}F&&(f.flags|=4)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return Cu(f),null;case 6:if(u&&f.stateNode!=null)S_(u,f,u.memoizedProps,F);else{if(typeof F!=="string"&&f.stateNode===null)throw Error(p(166));if($=a0(U3.current),a0(hf.current),F8(f)){if(F=f.stateNode,$=f.memoizedProps,F[rf]=f,U=F.nodeValue!==$){if(u=uf,u!==null)switch(u.tag){case 3:$8(F.nodeValue,$,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&$8(F.nodeValue,$,(u.mode&1)!==0)}}U&&(f.flags|=4)}else F=($.nodeType===9?$:$.ownerDocument).createTextNode(F),F[rf]=f,f.stateNode=F}return Cu(f),null;case 13:if(wu(Hu),F=f.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(Lu&&eu!==null&&(f.mode&1)!==0&&(f.flags&128)===0)sU(),g1(),f.flags|=98560,U=!1;else if(U=F8(f),F!==null&&F.dehydrated!==null){if(u===null){if(!U)throw Error(p(318));if(U=f.memoizedState,U=U!==null?U.dehydrated:null,!U)throw Error(p(317));U[rf]=f}else g1(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Cu(f),U=!1}else Mf!==null&&(v9(Mf),Mf=null),U=!0;if(!U)return f.flags&65536?f:null}if((f.flags&128)!==0)return f.lanes=$,f;return F=F!==null,F!==(u!==null&&u.memoizedState!==null)&&F&&(f.child.flags|=8192,(f.mode&1)!==0&&(u===null||(Hu.current&1)!==0?Du===0&&(Du=3):E7())),f.updateQueue!==null&&(f.flags|=4),Cu(f),null;case 4:return t1(),N9(u,f),u===null&&f3(f.stateNode.containerInfo),Cu(f),null;case 10:return Q7(f.type._context),Cu(f),null;case 17:return tu(f.type)&&O8(),Cu(f),null;case 19:if(wu(Hu),U=f.memoizedState,U===null)return Cu(f),null;if(F=(f.flags&128)!==0,_=U.rendering,_===null)if(F)O4(U,!1);else{if(Du!==0||u!==null&&(u.flags&128)!==0)for(u=f.child;u!==null;){if(_=P8(u),_!==null){f.flags|=128,O4(U,!1),F=_.updateQueue,F!==null&&(f.updateQueue=F,f.flags|=4),f.subtreeFlags=0,F=$;for($=f.child;$!==null;)U=$,u=F,U.flags&=14680066,_=U.alternate,_===null?(U.childLanes=0,U.lanes=u,U.child=null,U.subtreeFlags=0,U.memoizedProps=null,U.memoizedState=null,U.updateQueue=null,U.dependencies=null,U.stateNode=null):(U.childLanes=_.childLanes,U.lanes=_.lanes,U.child=_.child,U.subtreeFlags=0,U.deletions=null,U.memoizedProps=_.memoizedProps,U.memoizedState=_.memoizedState,U.updateQueue=_.updateQueue,U.type=_.type,u=_.dependencies,U.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),$=$.sibling;return Wu(Hu,Hu.current&1|2),f.child}u=u.sibling}U.tail!==null&&Mu()>d1&&(f.flags|=128,F=!0,O4(U,!1),f.lanes=4194304)}else{if(!F)if(u=P8(_),u!==null){if(f.flags|=128,F=!0,$=u.updateQueue,$!==null&&(f.updateQueue=$,f.flags|=4),O4(U,!0),U.tail===null&&U.tailMode==="hidden"&&!_.alternate&&!Lu)return Cu(f),null}else 2*Mu()-U.renderingStartTime>d1&&$!==1073741824&&(f.flags|=128,F=!0,O4(U,!1),f.lanes=4194304);U.isBackwards?(_.sibling=f.child,f.child=_):($=U.last,$!==null?$.sibling=_:f.child=_,U.last=_)}if(U.tail!==null)return f=U.tail,U.rendering=f,U.tail=f.sibling,U.renderingStartTime=Mu(),f.sibling=null,$=Hu.current,Wu(Hu,F?$&1|2:$&1),f;return Cu(f),null;case 22:case 23:return M7(),F=f.memoizedState!==null,u!==null&&u.memoizedState!==null!==F&&(f.flags|=8192),F&&(f.mode&1)!==0?(ou&1073741824)!==0&&(Cu(f),f.subtreeFlags&6&&(f.flags|=8192)):Cu(f),null;case 24:return null;case 25:return null}throw Error(p(156,f.tag))}function UB(u,f){switch(F7(f),f.tag){case 1:return tu(f.type)&&O8(),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return t1(),wu(su),wu(vu),W7(),u=f.flags,(u&65536)!==0&&(u&128)===0?(f.flags=u&-65537|128,f):null;case 5:return A7(f),null;case 13:if(wu(Hu),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(p(340));g1()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return wu(Hu),null;case 4:return t1(),null;case 10:return Q7(f.type._context),null;case 22:case 23:return M7(),null;case 24:return null;default:return null}}var _8=!1,hu=!1,_B=typeof WeakSet==="function"?WeakSet:Set,t=null;function r1(u,f){var $=u.ref;if($!==null)if(typeof $==="function")try{$(null)}catch(F){Yu(u,f,F)}else $.current=null}function I9(u,f,$){try{$()}catch(F){Yu(u,f,F)}}var vl=!1;function QB(u,f){if(B9=E8,u=kU(),f7(u)){if("selectionStart"in u)var $={start:u.selectionStart,end:u.selectionEnd};else u:{$=($=u.ownerDocument)&&$.defaultView||window;var F=$.getSelection&&$.getSelection();if(F&&F.rangeCount!==0){$=F.anchorNode;var{anchorOffset:l,focusNode:U}=F;F=F.focusOffset;try{$.nodeType,U.nodeType}catch(H){$=null;break u}var _=0,Q=-1,J=-1,q=0,T=0,W=u,A=null;f:for(;;){for(var K;;){if(W!==$||l!==0&&W.nodeType!==3||(Q=_+l),W!==U||F!==0&&W.nodeType!==3||(J=_+F),W.nodeType===3&&(_+=W.nodeValue.length),(K=W.firstChild)===null)break;A=W,W=K}for(;;){if(W===u)break f;if(A===$&&++q===l&&(Q=_),A===U&&++T===F&&(J=_),(K=W.nextSibling)!==null)break;W=A,A=W.parentNode}W=K}$=Q===-1||J===-1?null:{start:Q,end:J}}else $=null}$=$||{start:0,end:0}}else $=null;L9={focusedElem:u,selectionRange:$},E8=!1;for(t=f;t!==null;)if(f=t,u=f.child,(f.subtreeFlags&1028)!==0&&u!==null)u.return=f,t=u;else for(;t!==null;){f=t;try{var L=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(L!==null){var{memoizedProps:z,memoizedState:Z}=L,B=f.stateNode,G=B.getSnapshotBeforeUpdate(f.elementType===f.type?z:Yf(f.type,z),Z);B.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var w=f.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163))}}catch(H){Yu(f,f.return,H)}if(u=f.sibling,u!==null){u.return=f.return,t=u;break}t=f.return}return L=vl,vl=!1,L}function b4(u,f,$){var F=f.updateQueue;if(F=F!==null?F.lastEffect:null,F!==null){var l=F=F.next;do{if((l.tag&u)===u){var U=l.destroy;l.destroy=void 0,U!==void 0&&I9(f,$,U)}l=l.next}while(l!==F)}}function a8(u,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var $=f=f.next;do{if(($.tag&u)===u){var F=$.create;$.destroy=F()}$=$.next}while($!==f)}}function y9(u){var f=u.ref;if(f!==null){var $=u.stateNode;switch(u.tag){case 5:u=$;break;default:u=$}typeof f==="function"?f(u):f.current=u}}function j_(u){var f=u.alternate;f!==null&&(u.alternate=null,j_(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&(delete f[rf],delete f[F3],delete f[z9],delete f[pw],delete f[bw])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function N_(u){return u.tag===5||u.tag===3||u.tag===4}function xl(u){u:for(;;){for(;u.sibling===null;){if(u.return===null||N_(u.return))return null;u=u.return}u.sibling.return=u.return;for(u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2)continue u;if(u.child===null||u.tag===4)continue u;else u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function k9(u,f,$){var F=u.tag;if(F===5||F===6)u=u.stateNode,f?$.nodeType===8?$.parentNode.insertBefore(u,f):$.insertBefore(u,f):($.nodeType===8?(f=$.parentNode,f.insertBefore(u,$)):(f=$,f.appendChild(u)),$=$._reactRootContainer,$!==null&&$!==void 0||f.onclick!==null||(f.onclick=D8));else if(F!==4&&(u=u.child,u!==null))for(k9(u,f,$),u=u.sibling;u!==null;)k9(u,f,$),u=u.sibling}function P9(u,f,$){var F=u.tag;if(F===5||F===6)u=u.stateNode,f?$.insertBefore(u,f):$.appendChild(u);else if(F!==4&&(u=u.child,u!==null))for(P9(u,f,$),u=u.sibling;u!==null;)P9(u,f,$),u=u.sibling}var Iu=null,Rf=!1;function w0(u,f,$){for($=$.child;$!==null;)I_(u,f,$),$=$.sibling}function I_(u,f,$){if(Cf&&typeof Cf.onCommitFiberUnmount==="function")try{Cf.onCommitFiberUnmount(p8,$)}catch(Q){}switch($.tag){case 5:hu||r1($,f);case 6:var F=Iu,l=Rf;Iu=null,w0(u,f,$),Iu=F,Rf=l,Iu!==null&&(Rf?(u=Iu,$=$.stateNode,u.nodeType===8?u.parentNode.removeChild($):u.removeChild($)):Iu.removeChild($.stateNode));break;case 18:Iu!==null&&(Rf?(u=Iu,$=$.stateNode,u.nodeType===8?r5(u.parentNode,$):u.nodeType===1&&r5(u,$),o4(u)):r5(Iu,$.stateNode));break;case 4:F=Iu,l=Rf,Iu=$.stateNode.containerInfo,Rf=!0,w0(u,f,$),Iu=F,Rf=l;break;case 0:case 11:case 14:case 15:if(!hu&&(F=$.updateQueue,F!==null&&(F=F.lastEffect,F!==null))){l=F=F.next;do{var U=l,_=U.destroy;U=U.tag,_!==void 0&&((U&2)!==0?I9($,f,_):(U&4)!==0&&I9($,f,_)),l=l.next}while(l!==F)}w0(u,f,$);break;case 1:if(!hu&&(r1($,f),F=$.stateNode,typeof F.componentWillUnmount==="function"))try{F.props=$.memoizedProps,F.state=$.memoizedState,F.componentWillUnmount()}catch(Q){Yu($,f,Q)}w0(u,f,$);break;case 21:w0(u,f,$);break;case 22:$.mode&1?(hu=(F=hu)||$.memoizedState!==null,w0(u,f,$),hu=F):w0(u,f,$);break;default:w0(u,f,$)}}function cl(u){var f=u.updateQueue;if(f!==null){u.updateQueue=null;var $=u.stateNode;$===null&&($=u.stateNode=new _B),f.forEach(function(F){var l=LB.bind(null,u,F);$.has(F)||($.add(F),F.then(l,l))})}}function Zf(u,f){var $=f.deletions;if($!==null)for(var F=0;F<$.length;F++){var l=$[F];try{var U=u,_=f,Q=_;u:for(;Q!==null;){switch(Q.tag){case 5:Iu=Q.stateNode,Rf=!1;break u;case 3:Iu=Q.stateNode.containerInfo,Rf=!0;break u;case 4:Iu=Q.stateNode.containerInfo,Rf=!0;break u}Q=Q.return}if(Iu===null)throw Error(p(160));I_(U,_,l),Iu=null,Rf=!1;var J=l.alternate;J!==null&&(J.return=null),l.return=null}catch(q){Yu(l,f,q)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)y_(f,u),f=f.sibling}function y_(u,f){var{alternate:$,flags:F}=u;switch(u.tag){case 0:case 11:case 14:case 15:if(Zf(f,u),kf(u),F&4){try{b4(3,u,u.return),a8(3,u)}catch(z){Yu(u,u.return,z)}try{b4(5,u,u.return)}catch(z){Yu(u,u.return,z)}}break;case 1:Zf(f,u),kf(u),F&512&&$!==null&&r1($,$.return);break;case 5:if(Zf(f,u),kf(u),F&512&&$!==null&&r1($,$.return),u.flags&32){var l=u.stateNode;try{t4(l,"")}catch(z){Yu(u,u.return,z)}}if(F&4&&(l=u.stateNode,l!=null)){var U=u.memoizedProps,_=$!==null?$.memoizedProps:U,Q=u.type,J=u.updateQueue;if(u.updateQueue=null,J!==null)try{Q==="input"&&U.type==="radio"&&U.name!=null&&fU(l,U),F9(Q,_);var q=F9(Q,U);for(_=0;_<J.length;_+=2){var T=J[_],W=J[_+1];T==="style"?_U(l,W):T==="dangerouslySetInnerHTML"?lU(l,W):T==="children"?t4(l,W):m9(l,T,W,q)}switch(Q){case"input":o5(l,U);break;case"textarea":$U(l,U);break;case"select":var A=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!U.multiple;var K=U.value;K!=null?h1(l,!!U.multiple,K,!1):A!==!!U.multiple&&(U.defaultValue!=null?h1(l,!!U.multiple,U.defaultValue,!0):h1(l,!!U.multiple,U.multiple?[]:"",!1))}l[F3]=U}catch(z){Yu(u,u.return,z)}}break;case 6:if(Zf(f,u),kf(u),F&4){if(u.stateNode===null)throw Error(p(162));l=u.stateNode,U=u.memoizedProps;try{l.nodeValue=U}catch(z){Yu(u,u.return,z)}}break;case 3:if(Zf(f,u),kf(u),F&4&&$!==null&&$.memoizedState.isDehydrated)try{o4(f.containerInfo)}catch(z){Yu(u,u.return,z)}break;case 4:Zf(f,u),kf(u);break;case 13:Zf(f,u),kf(u),l=u.child,l.flags&8192&&(U=l.memoizedState!==null,l.stateNode.isHidden=U,!U||l.alternate!==null&&l.alternate.memoizedState!==null||(Y7=Mu())),F&4&&cl(u);break;case 22:if(T=$!==null&&$.memoizedState!==null,u.mode&1?(hu=(q=hu)||T,Zf(f,u),hu=q):Zf(f,u),kf(u),F&8192){if(q=u.memoizedState!==null,(u.stateNode.isHidden=q)&&!T&&(u.mode&1)!==0)for(t=u,T=u.child;T!==null;){for(W=t=T;t!==null;){switch(A=t,K=A.child,A.tag){case 0:case 11:case 14:case 15:b4(4,A,A.return);break;case 1:r1(A,A.return);var L=A.stateNode;if(typeof L.componentWillUnmount==="function"){F=A,$=A.return;try{f=F,L.props=f.memoizedProps,L.state=f.memoizedState,L.componentWillUnmount()}catch(z){Yu(F,$,z)}}break;case 5:r1(A,A.return);break;case 22:if(A.memoizedState!==null){pl(W);continue}}K!==null?(K.return=A,t=K):pl(W)}T=T.sibling}u:for(T=null,W=u;;){if(W.tag===5){if(T===null){T=W;try{l=W.stateNode,q?(U=l.style,typeof U.setProperty==="function"?U.setProperty("display","none","important"):U.display="none"):(Q=W.stateNode,J=W.memoizedProps.style,_=J!==void 0&&J!==null&&J.hasOwnProperty("display")?J.display:null,Q.style.display=UU("display",_))}catch(z){Yu(u,u.return,z)}}}else if(W.tag===6){if(T===null)try{W.stateNode.nodeValue=q?"":W.memoizedProps}catch(z){Yu(u,u.return,z)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===u)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===u)break u;for(;W.sibling===null;){if(W.return===null||W.return===u)break u;T===W&&(T=null),W=W.return}T===W&&(T=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Zf(f,u),kf(u),F&4&&cl(u);break;case 21:break;default:Zf(f,u),kf(u)}}function kf(u){var f=u.flags;if(f&2){try{u:{for(var $=u.return;$!==null;){if(N_($)){var F=$;break u}$=$.return}throw Error(p(160))}switch(F.tag){case 5:var l=F.stateNode;F.flags&32&&(t4(l,""),F.flags&=-33);var U=xl(u);P9(u,U,l);break;case 3:case 4:var _=F.stateNode.containerInfo,Q=xl(u);k9(u,Q,_);break;default:throw Error(p(161))}}catch(J){Yu(u,u.return,J)}u.flags&=-3}f&4096&&(u.flags&=-4097)}function JB(u,f,$){t=u,k_(u,f,$)}function k_(u,f,$){for(var F=(u.mode&1)!==0;t!==null;){var l=t,U=l.child;if(l.tag===22&&F){var _=l.memoizedState!==null||_8;if(!_){var Q=l.alternate,J=Q!==null&&Q.memoizedState!==null||hu;Q=_8;var q=hu;if(_8=_,(hu=J)&&!q)for(t=l;t!==null;)_=t,J=_.child,_.tag===22&&_.memoizedState!==null?bl(l):J!==null?(J.return=_,t=J):bl(l);for(;U!==null;)t=U,k_(U,f,$),U=U.sibling;t=l,_8=Q,hu=q}ml(u,f,$)}else(l.subtreeFlags&8772)!==0&&U!==null?(U.return=l,t=U):ml(u,f,$)}}function ml(u){for(;t!==null;){var f=t;if((f.flags&8772)!==0){var $=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:hu||a8(5,f);break;case 1:var F=f.stateNode;if(f.flags&4&&!hu)if($===null)F.componentDidMount();else{var l=f.elementType===f.type?$.memoizedProps:Yf(f.type,$.memoizedProps);F.componentDidUpdate(l,$.memoizedState,F.__reactInternalSnapshotBeforeUpdate)}var U=f.updateQueue;U!==null&&Xl(f,U,F);break;case 3:var _=f.updateQueue;if(_!==null){if($=null,f.child!==null)switch(f.child.tag){case 5:$=f.child.stateNode;break;case 1:$=f.child.stateNode}Xl(f,_,$)}break;case 5:var Q=f.stateNode;if($===null&&f.flags&4){$=Q;var J=f.memoizedProps;switch(f.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&$.focus();break;case"img":J.src&&($.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(f.memoizedState===null){var q=f.alternate;if(q!==null){var T=q.memoizedState;if(T!==null){var W=T.dehydrated;W!==null&&o4(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(p(163))}hu||f.flags&512&&y9(f)}catch(A){Yu(f,f.return,A)}}if(f===u){t=null;break}if($=f.sibling,$!==null){$.return=f.return,t=$;break}t=f.return}}function pl(u){for(;t!==null;){var f=t;if(f===u){t=null;break}var $=f.sibling;if($!==null){$.return=f.return,t=$;break}t=f.return}}function bl(u){for(;t!==null;){var f=t;try{switch(f.tag){case 0:case 11:case 15:var $=f.return;try{a8(4,f)}catch(J){Yu(f,$,J)}break;case 1:var F=f.stateNode;if(typeof F.componentDidMount==="function"){var l=f.return;try{F.componentDidMount()}catch(J){Yu(f,l,J)}}var U=f.return;try{y9(f)}catch(J){Yu(f,U,J)}break;case 5:var _=f.return;try{y9(f)}catch(J){Yu(f,_,J)}}}catch(J){Yu(f,f.return,J)}if(f===u){t=null;break}var Q=f.sibling;if(Q!==null){Q.return=f.return,t=Q;break}t=f.return}}var qB=Math.ceil,h8=l0.ReactCurrentDispatcher,z7=l0.ReactCurrentOwner,Tf=l0.ReactCurrentBatchConfig,Ju=0,Su=null,Vu=null,yu=0,ou=0,C1=I0(0),Du=0,q3=null,F1=0,o8=0,Z7=0,i4=null,iu=null,Y7=0,d1=1/0,nf=null,v8=!1,r9=null,X0=null,Q8=!1,Z0=null,x8=0,g4=0,C9=null,L8=-1,G8=0;function pu(){return(Ju&6)!==0?Mu():L8!==-1?L8:L8=Mu()}function D0(u){if((u.mode&1)===0)return 1;if((Ju&2)!==0&&yu!==0)return yu&-yu;if(gw.transition!==null)return G8===0&&(G8=HU()),G8;if(u=Tu,u!==0)return u;return u=window.event,u=u===void 0?16:VU(u.type),u}function Vf(u,f,$,F){if(50<g4)throw g4=0,C9=null,Error(p(185));if(T3(u,$,F),(Ju&2)===0||u!==Su)u===Su&&((Ju&2)===0&&(o8|=$),Du===4&&H0(u,yu)),nu(u,F),$===1&&Ju===0&&(f.mode&1)===0&&(d1=Mu()+500,t8&&y0())}function nu(u,f){var $=u.callbackNode;tK(u,f);var F=M8(u,u===Su?yu:0);if(F===0)$!==null&&ul($),u.callbackNode=null,u.callbackPriority=0;else if(f=F&-F,u.callbackPriority!==f){if($!=null&&ul($),f===1)u.tag===0?iw(il.bind(null,u)):bU(il.bind(null,u)),cw(function(){(Ju&6)===0&&y0()}),$=null;else{switch(zU(F)){case 1:$=s9;break;case 4:$=LU;break;case 16:$=R8;break;case 536870912:$=GU;break;default:$=R8}$=m_($,P_.bind(null,u))}u.callbackPriority=f,u.callbackNode=$}}function P_(u,f){if(L8=-1,G8=0,(Ju&6)!==0)throw Error(p(327));var $=u.callbackNode;if(p1()&&u.callbackNode!==$)return null;var F=M8(u,u===Su?yu:0);if(F===0)return null;if((F&30)!==0||(F&u.expiredLanes)!==0||f)f=c8(u,F);else{f=F;var l=Ju;Ju|=2;var U=C_();if(Su!==u||yu!==f)nf=null,d1=Mu()+500,o0(u,f);do try{WB();break}catch(Q){r_(u,Q)}while(1);_7(),h8.current=U,Ju=l,Vu!==null?f=0:(Su=null,yu=0,f=Du)}if(f!==0){if(f===2&&(l=J9(u),l!==0&&(F=l,f=h9(u,l))),f===1)throw $=q3,o0(u,0),H0(u,F),nu(u,Mu()),$;if(f===6)H0(u,F);else{if(l=u.current.alternate,(F&30)===0&&!TB(l)&&(f=c8(u,F),f===2&&(U=J9(u),U!==0&&(F=U,f=h9(u,U))),f===1))throw $=q3,o0(u,0),H0(u,F),nu(u,Mu()),$;switch(u.finishedWork=l,u.finishedLanes=F,f){case 0:case 1:throw Error(p(345));case 2:t0(u,iu,nf);break;case 3:if(H0(u,F),(F&130023424)===F&&(f=Y7+500-Mu(),10<f)){if(M8(u,0)!==0)break;if(l=u.suspendedLanes,(l&F)!==F){pu(),u.pingedLanes|=u.suspendedLanes&l;break}u.timeoutHandle=H9(t0.bind(null,u,iu,nf),f);break}t0(u,iu,nf);break;case 4:if(H0(u,F),(F&4194240)===F)break;f=u.eventTimes;for(l=-1;0<F;){var _=31-Ef(F);U=1<<_,_=f[_],_>l&&(l=_),F&=~U}if(F=l,F=Mu()-F,F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3000>F?3000:4320>F?4320:1960*qB(F/1960))-F,10<F){u.timeoutHandle=H9(t0.bind(null,u,iu,nf),F);break}t0(u,iu,nf);break;case 5:t0(u,iu,nf);break;default:throw Error(p(329))}}}return nu(u,Mu()),u.callbackNode===$?P_.bind(null,u):null}function h9(u,f){var $=i4;return u.current.memoizedState.isDehydrated&&(o0(u,f).flags|=256),u=c8(u,f),u!==2&&(f=iu,iu=$,f!==null&&v9(f)),u}function v9(u){iu===null?iu=u:iu.push.apply(iu,u)}function TB(u){for(var f=u;;){if(f.flags&16384){var $=f.updateQueue;if($!==null&&($=$.stores,$!==null))for(var F=0;F<$.length;F++){var l=$[F],U=l.getSnapshot;l=l.value;try{if(!Xf(U(),l))return!1}catch(_){return!1}}}if($=f.child,f.subtreeFlags&16384&&$!==null)$.return=f,f=$;else{if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function H0(u,f){f&=~Z7,f&=~o8,u.suspendedLanes|=f,u.pingedLanes&=~f;for(u=u.expirationTimes;0<f;){var $=31-Ef(f),F=1<<$;u[$]=-1,f&=~F}}function il(u){if((Ju&6)!==0)throw Error(p(327));p1();var f=M8(u,0);if((f&1)===0)return nu(u,Mu()),null;var $=c8(u,f);if(u.tag!==0&&$===2){var F=J9(u);F!==0&&(f=F,$=h9(u,F))}if($===1)throw $=q3,o0(u,0),H0(u,f),nu(u,Mu()),$;if($===6)throw Error(p(345));return u.finishedWork=u.current.alternate,u.finishedLanes=f,t0(u,iu,nf),nu(u,Mu()),null}function R7(u,f){var $=Ju;Ju|=1;try{return u(f)}finally{Ju=$,Ju===0&&(d1=Mu()+500,t8&&y0())}}function l1(u){Z0!==null&&Z0.tag===0&&(Ju&6)===0&&p1();var f=Ju;Ju|=1;var $=Tf.transition,F=Tu;try{if(Tf.transition=null,Tu=1,u)return u()}finally{Tu=F,Tf.transition=$,Ju=f,(Ju&6)===0&&y0()}}function M7(){ou=C1.current,wu(C1)}function o0(u,f){u.finishedWork=null,u.finishedLanes=0;var $=u.timeoutHandle;if($!==-1&&(u.timeoutHandle=-1,xw($)),Vu!==null)for($=Vu.return;$!==null;){var F=$;switch(F7(F),F.tag){case 1:F=F.type.childContextTypes,F!==null&&F!==void 0&&O8();break;case 3:t1(),wu(su),wu(vu),W7();break;case 5:A7(F);break;case 4:t1();break;case 13:wu(Hu);break;case 19:wu(Hu);break;case 10:Q7(F.type._context);break;case 22:case 23:M7()}$=$.return}if(Su=u,Vu=u=O0(u.current,null),yu=ou=f,Du=0,q3=null,Z7=o8=F1=0,iu=i4=null,d0!==null){for(f=0;f<d0.length;f++)if($=d0[f],F=$.interleaved,F!==null){$.interleaved=null;var l=F.next,U=$.pending;if(U!==null){var _=U.next;U.next=l,F.next=_}$.pending=F}d0=null}return u}function r_(u,f){do{var $=Vu;try{if(_7(),K8.current=C8,r8){for(var F=zu.memoizedState;F!==null;){var l=F.queue;l!==null&&(l.pending=null),F=F.next}r8=!1}if($1=0,Ou=Xu=zu=null,p4=!1,_3=0,z7.current=null,$===null||$.return===null){Du=1,q3=f,Vu=null;break}u:{var U=u,_=$.return,Q=$,J=f;if(f=yu,Q.flags|=32768,J!==null&&typeof J==="object"&&typeof J.then==="function"){var q=J,T=Q,W=T.tag;if((T.mode&1)===0&&(W===0||W===11||W===15)){var A=T.alternate;A?(T.updateQueue=A.updateQueue,T.memoizedState=A.memoizedState,T.lanes=A.lanes):(T.updateQueue=null,T.memoizedState=null)}var K=Il(_);if(K!==null){K.flags&=-257,yl(K,_,Q,U,f),K.mode&1&&Nl(U,q,f),f=K,J=q;var L=f.updateQueue;if(L===null){var z=new Set;z.add(J),f.updateQueue=z}else L.add(J);break u}else{if((f&1)===0){Nl(U,q,f),E7();break u}J=Error(p(426))}}else if(Lu&&Q.mode&1){var Z=Il(_);if(Z!==null){(Z.flags&65536)===0&&(Z.flags|=256),yl(Z,_,Q,U,f),l7(n1(J,Q));break u}}U=J=n1(J,Q),Du!==4&&(Du=2),i4===null?i4=[U]:i4.push(U),U=_;do{switch(U.tag){case 3:U.flags|=65536,f&=-f,U.lanes|=f;var B=z_(U,J,f);Vl(U,B);break u;case 1:Q=J;var{type:G,stateNode:w}=U;if((U.flags&128)===0&&(typeof G.getDerivedStateFromError==="function"||w!==null&&typeof w.componentDidCatch==="function"&&(X0===null||!X0.has(w)))){U.flags|=65536,f&=-f,U.lanes|=f;var H=Z_(U,Q,f);Vl(U,H);break u}}U=U.return}while(U!==null)}v_($)}catch(M){f=M,Vu===$&&$!==null&&(Vu=$=$.return);continue}break}while(1)}function C_(){var u=h8.current;return h8.current=C8,u===null?C8:u}function E7(){if(Du===0||Du===3||Du===2)Du=4;Su===null||(F1&268435455)===0&&(o8&268435455)===0||H0(Su,yu)}function c8(u,f){var $=Ju;Ju|=2;var F=C_();if(Su!==u||yu!==f)nf=null,o0(u,f);do try{AB();break}catch(l){r_(u,l)}while(1);if(_7(),Ju=$,h8.current=F,Vu!==null)throw Error(p(261));return Su=null,yu=0,Du}function AB(){for(;Vu!==null;)h_(Vu)}function WB(){for(;Vu!==null&&!vK();)h_(Vu)}function h_(u){var f=c_(u.alternate,u,ou);u.memoizedProps=u.pendingProps,f===null?v_(u):Vu=f,z7.current=null}function v_(u){var f=u;do{var $=f.alternate;if(u=f.return,(f.flags&32768)===0){if($=lB($,f,ou),$!==null){Vu=$;return}}else{if($=UB($,f),$!==null){$.flags&=32767,Vu=$;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{Du=6,Vu=null;return}}if(f=f.sibling,f!==null){Vu=f;return}Vu=f=u}while(f!==null);Du===0&&(Du=5)}function t0(u,f,$){var F=Tu,l=Tf.transition;try{Tf.transition=null,Tu=1,KB(u,f,$,F)}finally{Tf.transition=l,Tu=F}return null}function KB(u,f,$,F){do p1();while(Z0!==null);if((Ju&6)!==0)throw Error(p(327));$=u.finishedWork;var l=u.finishedLanes;if($===null)return null;if(u.finishedWork=null,u.finishedLanes=0,$===u.current)throw Error(p(177));u.callbackNode=null,u.callbackPriority=0;var U=$.lanes|$.childLanes;if(nK(u,U),u===Su&&(Vu=Su=null,yu=0),($.subtreeFlags&2064)===0&&($.flags&2064)===0||Q8||(Q8=!0,m_(R8,function(){return p1(),null})),U=($.flags&15990)!==0,($.subtreeFlags&15990)!==0||U){U=Tf.transition,Tf.transition=null;var _=Tu;Tu=1;var Q=Ju;Ju|=4,z7.current=null,QB(u,$),y_($,u),Pw(L9),E8=!!B9,L9=B9=null,u.current=$,JB($,u,l),xK(),Ju=Q,Tu=_,Tf.transition=U}else u.current=$;if(Q8&&(Q8=!1,Z0=u,x8=l),U=u.pendingLanes,U===0&&(X0=null),pK($.stateNode,F),nu(u,Mu()),f!==null)for(F=u.onRecoverableError,$=0;$<f.length;$++)l=f[$],F(l.value,{componentStack:l.stack,digest:l.digest});if(v8)throw v8=!1,u=r9,r9=null,u;return(x8&1)!==0&&u.tag!==0&&p1(),U=u.pendingLanes,(U&1)!==0?u===C9?g4++:(g4=0,C9=u):g4=0,y0(),null}function p1(){if(Z0!==null){var u=zU(x8),f=Tf.transition,$=Tu;try{if(Tf.transition=null,Tu=16>u?16:u,Z0===null)var F=!1;else{if(u=Z0,Z0=null,x8=0,(Ju&6)!==0)throw Error(p(331));var l=Ju;Ju|=4;for(t=u.current;t!==null;){var U=t,_=U.child;if((t.flags&16)!==0){var Q=U.deletions;if(Q!==null){for(var J=0;J<Q.length;J++){var q=Q[J];for(t=q;t!==null;){var T=t;switch(T.tag){case 0:case 11:case 15:b4(8,T,U)}var W=T.child;if(W!==null)W.return=T,t=W;else for(;t!==null;){T=t;var{sibling:A,return:K}=T;if(j_(T),T===q){t=null;break}if(A!==null){A.return=K,t=A;break}t=K}}}var L=U.alternate;if(L!==null){var z=L.child;if(z!==null){L.child=null;do{var Z=z.sibling;z.sibling=null,z=Z}while(z!==null)}}t=U}}if((U.subtreeFlags&2064)!==0&&_!==null)_.return=U,t=_;else u:for(;t!==null;){if(U=t,(U.flags&2048)!==0)switch(U.tag){case 0:case 11:case 15:b4(9,U,U.return)}var B=U.sibling;if(B!==null){B.return=U.return,t=B;break u}t=U.return}}var G=u.current;for(t=G;t!==null;){_=t;var w=_.child;if((_.subtreeFlags&2064)!==0&&w!==null)w.return=_,t=w;else u:for(_=G;t!==null;){if(Q=t,(Q.flags&2048)!==0)try{switch(Q.tag){case 0:case 11:case 15:a8(9,Q)}}catch(M){Yu(Q,Q.return,M)}if(Q===_){t=null;break u}var H=Q.sibling;if(H!==null){H.return=Q.return,t=H;break u}t=Q.return}}if(Ju=l,y0(),Cf&&typeof Cf.onPostCommitFiberRoot==="function")try{Cf.onPostCommitFiberRoot(p8,u)}catch(M){}F=!0}return F}finally{Tu=$,Tf.transition=f}}return!1}function gl(u,f,$){f=n1($,f),f=z_(u,f,1),u=V0(u,f,1),f=pu(),u!==null&&(T3(u,1,f),nu(u,f))}function Yu(u,f,$){if(u.tag===3)gl(u,u,$);else for(;f!==null;){if(f.tag===3){gl(f,u,$);break}else if(f.tag===1){var F=f.stateNode;if(typeof f.type.getDerivedStateFromError==="function"||typeof F.componentDidCatch==="function"&&(X0===null||!X0.has(F))){u=n1($,u),u=Z_(f,u,1),f=V0(f,u,1),u=pu(),f!==null&&(T3(f,1,u),nu(f,u));break}}f=f.return}}function wB(u,f,$){var F=u.pingCache;F!==null&&F.delete(f),f=pu(),u.pingedLanes|=u.suspendedLanes&$,Su===u&&(yu&$)===$&&(Du===4||Du===3&&(yu&130023424)===yu&&500>Mu()-Y7?o0(u,0):Z7|=$),nu(u,f)}function x_(u,f){f===0&&((u.mode&1)===0?f=1:(f=a3,a3<<=1,(a3&130023424)===0&&(a3=4194304)));var $=pu();u=$0(u,f),u!==null&&(T3(u,f,$),nu(u,$))}function BB(u){var f=u.memoizedState,$=0;f!==null&&($=f.retryLane),x_(u,$)}function LB(u,f){var $=0;switch(u.tag){case 13:var{stateNode:F,memoizedState:l}=u;l!==null&&($=l.retryLane);break;case 19:F=u.stateNode;break;default:throw Error(p(314))}F!==null&&F.delete(f),x_(u,$)}var c_;c_=function(u,f,$){if(u!==null)if(u.memoizedProps!==f.pendingProps||su.current)gu=!0;else{if((u.lanes&$)===0&&(f.flags&128)===0)return gu=!1,FB(u,f,$);gu=(u.flags&131072)!==0?!0:!1}else gu=!1,Lu&&(f.flags&1048576)!==0&&iU(f,N8,f.index);switch(f.lanes=0,f.tag){case 2:var F=f.type;B8(u,f),u=f.pendingProps;var l=i1(f,vu.current);m1(f,$),l=w7(null,f,F,u,l,$);var U=B7();return f.flags|=1,typeof l==="object"&&l!==null&&typeof l.render==="function"&&l.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,tu(F)?(U=!0,S8(f)):U=!1,f.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,q7(f),l.updater=d8,f.stateNode=l,l._reactInternals=f,V9(f,F,u,$),f=O9(null,f,F,!0,U,$)):(f.tag=0,Lu&&U&&$7(f),mu(null,f,l,$),f=f.child),f;case 16:F=f.elementType;u:{switch(B8(u,f),u=f.pendingProps,l=F._init,F=l(F._payload),f.type=F,l=f.tag=HB(F),u=Yf(F,u),l){case 0:f=D9(null,f,F,u,$);break u;case 1:f=rl(null,f,F,u,$);break u;case 11:f=kl(null,f,F,u,$);break u;case 14:f=Pl(null,f,F,Yf(F.type,u),$);break u}throw Error(p(306,F,""))}return f;case 0:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),D9(u,f,F,l,$);case 1:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),rl(u,f,F,l,$);case 3:u:{if(E_(f),u===null)throw Error(p(387));F=f.pendingProps,U=f.memoizedState,l=U.element,aU(u,f),k8(f,F,null,$);var _=f.memoizedState;if(F=_.element,U.isDehydrated)if(U={element:F,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},f.updateQueue.baseState=U,f.memoizedState=U,f.flags&256){l=n1(Error(p(423)),f),f=Cl(u,f,F,$,l);break u}else if(F!==l){l=n1(Error(p(424)),f),f=Cl(u,f,F,$,l);break u}else for(eu=E0(f.stateNode.containerInfo.firstChild),uf=f,Lu=!0,Mf=null,$=nU(f,null,F,$),f.child=$;$;)$.flags=$.flags&-3|4096,$=$.sibling;else{if(g1(),F===l){f=F0(u,f,$);break u}mu(u,f,F,$)}f=f.child}return f;case 5:return oU(f),u===null&&R9(f),F=f.type,l=f.pendingProps,U=u!==null?u.memoizedProps:null,_=l.children,G9(F,l)?_=null:U!==null&&G9(F,U)&&(f.flags|=32),M_(u,f),mu(u,f,_,$),f.child;case 6:return u===null&&R9(f),null;case 13:return V_(u,f,$);case 4:return T7(f,f.stateNode.containerInfo),F=f.pendingProps,u===null?f.child=s1(f,null,F,$):mu(u,f,F,$),f.child;case 11:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),kl(u,f,F,l,$);case 7:return mu(u,f,f.pendingProps,$),f.child;case 8:return mu(u,f,f.pendingProps.children,$),f.child;case 12:return mu(u,f,f.pendingProps.children,$),f.child;case 10:u:{if(F=f.type._context,l=f.pendingProps,U=f.memoizedProps,_=l.value,Wu(I8,F._currentValue),F._currentValue=_,U!==null)if(Xf(U.value,_)){if(U.children===l.children&&!su.current){f=F0(u,f,$);break u}}else for(U=f.child,U!==null&&(U.return=f);U!==null;){var Q=U.dependencies;if(Q!==null){_=U.child;for(var J=Q.firstContext;J!==null;){if(J.context===F){if(U.tag===1){J=ef(-1,$&-$),J.tag=2;var q=U.updateQueue;if(q!==null){q=q.shared;var T=q.pending;T===null?J.next=J:(J.next=T.next,T.next=J),q.pending=J}}U.lanes|=$,J=U.alternate,J!==null&&(J.lanes|=$),M9(U.return,$,f),Q.lanes|=$;break}J=J.next}}else if(U.tag===10)_=U.type===f.type?null:U.child;else if(U.tag===18){if(_=U.return,_===null)throw Error(p(341));_.lanes|=$,Q=_.alternate,Q!==null&&(Q.lanes|=$),M9(_,$,f),_=U.sibling}else _=U.child;if(_!==null)_.return=U;else for(_=U;_!==null;){if(_===f){_=null;break}if(U=_.sibling,U!==null){U.return=_.return,_=U;break}_=_.return}U=_}mu(u,f,l.children,$),f=f.child}return f;case 9:return l=f.type,F=f.pendingProps.children,m1(f,$),l=Af(l),F=F(l),f.flags|=1,mu(u,f,F,$),f.child;case 14:return F=f.type,l=Yf(F,f.pendingProps),l=Yf(F.type,l),Pl(u,f,F,l,$);case 15:return Y_(u,f,f.type,f.pendingProps,$);case 17:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),B8(u,f),f.tag=1,tu(F)?(u=!0,S8(f)):u=!1,m1(f,$),H_(f,F,l),V9(f,F,l,$),O9(null,f,F,!0,u,$);case 19:return X_(u,f,$);case 22:return R_(u,f,$)}throw Error(p(156,f.tag))};function m_(u,f){return BU(u,f)}function GB(u,f,$,F){this.tag=u,this.key=$,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=F,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qf(u,f,$,F){return new GB(u,f,$,F)}function V7(u){return u=u.prototype,!(!u||!u.isReactComponent)}function HB(u){if(typeof u==="function")return V7(u)?1:0;if(u!==void 0&&u!==null){if(u=u.$$typeof,u===b9)return 11;if(u===i9)return 14}return 2}function O0(u,f){var $=u.alternate;return $===null?($=qf(u.tag,f,u.key,u.mode),$.elementType=u.elementType,$.type=u.type,$.stateNode=u.stateNode,$.alternate=u,u.alternate=$):($.pendingProps=f,$.type=u.type,$.flags=0,$.subtreeFlags=0,$.deletions=null),$.flags=u.flags&14680064,$.childLanes=u.childLanes,$.lanes=u.lanes,$.child=u.child,$.memoizedProps=u.memoizedProps,$.memoizedState=u.memoizedState,$.updateQueue=u.updateQueue,f=u.dependencies,$.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},$.sibling=u.sibling,$.index=u.index,$.ref=u.ref,$}function H8(u,f,$,F,l,U){var _=2;if(F=u,typeof u==="function")V7(u)&&(_=1);else if(typeof u==="string")_=5;else u:switch(u){case D1:return e0($.children,l,U,f);case p9:_=8,l|=8;break;case s5:return u=qf(12,$,f,l|2),u.elementType=s5,u.lanes=U,u;case t5:return u=qf(13,$,f,l),u.elementType=t5,u.lanes=U,u;case n5:return u=qf(19,$,f,l),u.elementType=n5,u.lanes=U,u;case ol:return e8($,l,U,f);default:if(typeof u==="object"&&u!==null)switch(u.$$typeof){case dl:_=10;break u;case al:_=9;break u;case b9:_=11;break u;case i9:_=14;break u;case B0:_=16,F=null;break u}throw Error(p(130,u==null?u:typeof u,""))}return f=qf(_,$,f,l),f.elementType=u,f.type=F,f.lanes=U,f}function e0(u,f,$,F){return u=qf(7,u,F,f),u.lanes=$,u}function e8(u,f,$,F){return u=qf(22,u,F,f),u.elementType=ol,u.lanes=$,u.stateNode={isHidden:!1},u}function b5(u,f,$){return u=qf(6,u,null,f),u.lanes=$,u}function i5(u,f,$){return f=qf(4,u.children!==null?u.children:[],u.key,f),f.lanes=$,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function zB(u,f,$,F,l){this.tag=f,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=S5(0),this.expirationTimes=S5(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=S5(0),this.identifierPrefix=F,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function X7(u,f,$,F,l,U,_,Q,J){return u=new zB(u,f,$,Q,J),f===1?(f=1,U===!0&&(f|=8)):f=0,U=qf(3,null,null,f),u.current=U,U.stateNode=u,U.memoizedState={element:F,isDehydrated:$,cache:null,transitions:null,pendingSuspenseBoundaries:null},q7(U),u}function ZB(u,f,$){var F=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:X1,key:F==null?null:""+F,children:u,containerInfo:f,implementation:$}}function p_(u){if(!u)return j0;u=u._reactInternals;u:{if(_1(u)!==u||u.tag!==1)throw Error(p(170));var f=u;do{switch(f.tag){case 3:f=f.stateNode.context;break u;case 1:if(tu(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break u}}f=f.return}while(f!==null);throw Error(p(171))}if(u.tag===1){var $=u.type;if(tu($))return pU(u,$,f)}return f}function b_(u,f,$,F,l,U,_,Q,J){return u=X7($,F,!0,u,l,U,_,Q,J),u.context=p_(null),$=u.current,F=pu(),l=D0($),U=ef(F,l),U.callback=f!==void 0&&f!==null?f:null,V0($,U,l),u.current.lanes=l,T3(u,l,F),nu(u,F),u}function u6(u,f,$,F){var l=f.current,U=pu(),_=D0(l);return $=p_($),f.context===null?f.context=$:f.pendingContext=$,f=ef(U,_),f.payload={element:u},F=F===void 0?null:F,F!==null&&(f.callback=F),u=V0(l,f,_),u!==null&&(Vf(u,l,_,U),W8(u,l,_)),_}function m8(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return u.child.stateNode;default:return u.child.stateNode}}function sl(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var $=u.retryLane;u.retryLane=$!==0&&$<f?$:f}}function D7(u,f){sl(u,f),(u=u.alternate)&&sl(u,f)}function YB(){return null}var i_=typeof reportError==="function"?reportError:function(u){console.error(u)};function O7(u){this._internalRoot=u}f6.prototype.render=O7.prototype.render=function(u){var f=this._internalRoot;if(f===null)throw Error(p(409));u6(u,f,null,null)};f6.prototype.unmount=O7.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var f=u.containerInfo;l1(function(){u6(null,u,null,null)}),f[f0]=null}};function f6(u){this._internalRoot=u}f6.prototype.unstable_scheduleHydration=function(u){if(u){var f=RU();u={blockedOn:null,target:u,priority:f};for(var $=0;$<G0.length&&f!==0&&f<G0[$].priority;$++);G0.splice($,0,u),$===0&&EU(u)}};function S7(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function $6(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function tl(){}function RB(u,f,$,F,l){if(l){if(typeof F==="function"){var U=F;F=function(){var q=m8(_);U.call(q)}}var _=b_(f,F,u,0,null,!1,!1,"",tl);return u._reactRootContainer=_,u[f0]=_.current,f3(u.nodeType===8?u.parentNode:u),l1(),_}for(;l=u.lastChild;)u.removeChild(l);if(typeof F==="function"){var Q=F;F=function(){var q=m8(J);Q.call(q)}}var J=X7(u,0,!1,null,null,!1,!1,"",tl);return u._reactRootContainer=J,u[f0]=J.current,f3(u.nodeType===8?u.parentNode:u),l1(function(){u6(f,J,$,F)}),J}function F6(u,f,$,F,l){var U=$._reactRootContainer;if(U){var _=U;if(typeof l==="function"){var Q=l;l=function(){var J=m8(_);Q.call(J)}}u6(f,_,u,l)}else _=RB($,f,u,l,F);return m8(_)}ZU=function(u){switch(u.tag){case 3:var f=u.stateNode;if(f.current.memoizedState.isDehydrated){var $=I4(f.pendingLanes);$!==0&&(t9(f,$|1),nu(f,Mu()),(Ju&6)===0&&(d1=Mu()+500,y0()))}break;case 13:l1(function(){var F=$0(u,1);if(F!==null){var l=pu();Vf(F,u,1,l)}}),D7(u,1)}};n9=function(u){if(u.tag===13){var f=$0(u,134217728);if(f!==null){var $=pu();Vf(f,u,134217728,$)}D7(u,134217728)}};YU=function(u){if(u.tag===13){var f=D0(u),$=$0(u,f);if($!==null){var F=pu();Vf($,u,f,F)}D7(u,f)}};RU=function(){return Tu};MU=function(u,f){var $=Tu;try{return Tu=u,f()}finally{Tu=$}};U9=function(u,f,$){switch(f){case"input":if(o5(u,$),f=$.name,$.type==="radio"&&f!=null){for($=u;$.parentNode;)$=$.parentNode;$=$.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]');for(f=0;f<$.length;f++){var F=$[f];if(F!==u&&F.form===u.form){var l=s8(F);if(!l)throw Error(p(90));uU(F),o5(F,l)}}}break;case"textarea":$U(u,$);break;case"select":f=$.value,f!=null&&h1(u,!!$.multiple,f,!1)}};qU=R7;TU=l1;var MB={usingClientEntryPoint:!1,Events:[W3,N1,s8,QU,JU,R7]},S4={findFiberByHostInstance:n0,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EB={bundleType:S4.bundleType,version:S4.version,rendererPackageName:S4.rendererPackageName,rendererConfig:S4.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l0.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=KU(u),u===null?null:u.stateNode},findFiberByHostInstance:S4.findFiberByHostInstance||YB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){if(V1=__REACT_DEVTOOLS_GLOBAL_HOOK__,!V1.isDisabled&&V1.supportsFiber)try{p8=V1.inject(EB),Cf=V1}catch(u){}}var V1;Ff.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MB;Ff.createPortal=function(u,f){var $=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S7(f))throw Error(p(200));return ZB(u,f,null,$)};Ff.createRoot=function(u,f){if(!S7(u))throw Error(p(299));var $=!1,F="",l=i_;return f!==null&&f!==void 0&&(f.unstable_strictMode===!0&&($=!0),f.identifierPrefix!==void 0&&(F=f.identifierPrefix),f.onRecoverableError!==void 0&&(l=f.onRecoverableError)),f=X7(u,1,!1,null,null,$,!1,F,l),u[f0]=f.current,f3(u.nodeType===8?u.parentNode:u),new O7(f)};Ff.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var f=u._reactInternals;if(f===void 0){if(typeof u.render==="function")throw Error(p(188));throw u=Object.keys(u).join(","),Error(p(268,u))}return u=KU(f),u=u===null?null:u.stateNode,u};Ff.flushSync=function(u){return l1(u)};Ff.hydrate=function(u,f,$){if(!$6(f))throw Error(p(200));return F6(null,u,f,!0,$)};Ff.hydrateRoot=function(u,f,$){if(!S7(u))throw Error(p(405));var F=$!=null&&$.hydratedSources||null,l=!1,U="",_=i_;if($!==null&&$!==void 0&&($.unstable_strictMode===!0&&(l=!0),$.identifierPrefix!==void 0&&(U=$.identifierPrefix),$.onRecoverableError!==void 0&&(_=$.onRecoverableError)),f=b_(f,null,u,1,$!=null?$:null,l,!1,U,_),u[f0]=f.current,f3(u),F)for(u=0;u<F.length;u++)$=F[u],l=$._getVersion,l=l($._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[$,l]:f.mutableSourceEagerHydrationData.push($,l);return new f6(f)};Ff.render=function(u,f,$){if(!$6(f))throw Error(p(200));return F6(null,u,f,!1,$)};Ff.unmountComponentAtNode=function(u){if(!$6(u))throw Error(p(40));return u._reactRootContainer?(l1(function(){F6(null,null,u,!1,function(){u._reactRootContainer=null,u[f0]=null})}),!0):!1};Ff.unstable_batchedUpdates=R7;Ff.unstable_renderSubtreeIntoContainer=function(u,f,$,F){if(!$6($))throw Error(p(200));if(u==null||u._reactInternals===void 0)throw Error(p(38));return F6(u,f,$,!1,F)};Ff.version="18.3.1-next-f1338f8080-20240426"});var j7=o((oV,t_)=>{function s_(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s_)}catch(u){console.error(u)}}s_(),t_.exports=g_()});var d_=o((N7)=>{var n_=j7();N7.createRoot=n_.createRoot,N7.hydrateRoot=n_.hydrateRoot;var VB});var o_=o((l6)=>{var XB=W0(),DB=Symbol.for("react.element"),OB=Symbol.for("react.fragment"),SB=Object.prototype.hasOwnProperty,jB=XB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,NB={key:!0,ref:!0,__self:!0,__source:!0};function a_(u,f,$){var F,l={},U=null,_=null;$!==void 0&&(U=""+$),f.key!==void 0&&(U=""+f.key),f.ref!==void 0&&(_=f.ref);for(F in f)SB.call(f,F)&&!NB.hasOwnProperty(F)&&(l[F]=f[F]);if(u&&u.defaultProps)for(F in f=u.defaultProps,f)l[F]===void 0&&(l[F]=f[F]);return{$$typeof:DB,type:u,key:U,ref:_,props:l,_owner:jB.current}}l6.Fragment=OB;l6.jsx=a_;l6.jsxs=a_});var U6=o((fX,e_)=>{e_.exports=o_()});var aQ=o((dQ)=>{var L4=W0();function tz(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var nz=typeof Object.is==="function"?Object.is:tz,dz=L4.useState,az=L4.useEffect,oz=L4.useLayoutEffect,ez=L4.useDebugValue;function uZ(u,f){var $=f(),F=dz({inst:{value:$,getSnapshot:f}}),l=F[0].inst,U=F[1];return oz(function(){l.value=$,l.getSnapshot=f,m$(l)&&U({inst:l})},[u,$,f]),az(function(){return m$(l)&&U({inst:l}),u(function(){m$(l)&&U({inst:l})})},[u]),ez($),$}function m$(u){var f=u.getSnapshot;u=u.value;try{var $=f();return!nz(u,$)}catch(F){return!0}}function fZ(u,f){return f()}var $Z=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fZ:uZ;dQ.useSyncExternalStore=L4.useSyncExternalStore!==void 0?L4.useSyncExternalStore:$Z});var eQ=o((aX,oQ)=>{oQ.exports=aQ()});var fJ=o((uJ)=>{var g6=W0(),FZ=eQ();function lZ(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var UZ=typeof Object.is==="function"?Object.is:lZ,_Z=FZ.useSyncExternalStore,QZ=g6.useRef,JZ=g6.useEffect,qZ=g6.useMemo,TZ=g6.useDebugValue;uJ.useSyncExternalStoreWithSelector=function(u,f,$,F,l){var U=QZ(null);if(U.current===null){var _={hasValue:!1,value:null};U.current=_}else _=U.current;U=qZ(function(){function J(K){if(!q){if(q=!0,T=K,K=F(K),l!==void 0&&_.hasValue){var L=_.value;if(l(L,K))return W=L}return W=K}if(L=W,UZ(T,K))return L;var z=F(K);if(l!==void 0&&l(L,z))return T=K,L;return T=K,W=z}var q=!1,T,W,A=$===void 0?null:$;return[function(){return J(f())},A===null?void 0:function(){return J(A())}]},[f,$,F,l]);var Q=_Z(u,U[0],U[1]);return JZ(function(){_.hasValue=!0,_.value=Q},[Q]),TZ(Q),Q}});var FJ=o((eX,$J)=>{$J.exports=fJ()});var u5=o((MD,Dq)=>{var SR="\x00",Y1="\x00",Mq="\x01";class Xq{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{return};_defaultEdgeLabelFn=()=>{return};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(u){if(u)this._isDirected=Object.hasOwn(u,"directed")?u.directed:!0,this._isMultigraph=Object.hasOwn(u,"multigraph")?u.multigraph:!1,this._isCompound=Object.hasOwn(u,"compound")?u.compound:!1;if(this._isCompound)this._parent={},this._children={},this._children[Y1]={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(u){return this._label=u,this}graph(){return this._label}setDefaultNodeLabel(u){if(this._defaultNodeLabelFn=u,typeof u!=="function")this._defaultNodeLabelFn=()=>u;return this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var u=this;return this.nodes().filter((f)=>Object.keys(u._in[f]).length===0)}sinks(){var u=this;return this.nodes().filter((f)=>Object.keys(u._out[f]).length===0)}setNodes(u,f){var $=arguments,F=this;return u.forEach(function(l){if($.length>1)F.setNode(l,f);else F.setNode(l)}),this}setNode(u,f){if(Object.hasOwn(this._nodes,u)){if(arguments.length>1)this._nodes[u]=f;return this}if(this._nodes[u]=arguments.length>1?f:this._defaultNodeLabelFn(u),this._isCompound)this._parent[u]=Y1,this._children[u]={},this._children[Y1][u]=!0;return this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this}node(u){return this._nodes[u]}hasNode(u){return Object.hasOwn(this._nodes,u)}removeNode(u){var f=this;if(Object.hasOwn(this._nodes,u)){var $=(F)=>f.removeEdge(f._edgeObjs[F]);if(delete this._nodes[u],this._isCompound)this._removeFromParentsChildList(u),delete this._parent[u],this.children(u).forEach(function(F){f.setParent(F)}),delete this._children[u];Object.keys(this._in[u]).forEach($),delete this._in[u],delete this._preds[u],Object.keys(this._out[u]).forEach($),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this}setParent(u,f){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(f===void 0)f=Y1;else{f+="";for(var $=f;$!==void 0;$=this.parent($))if($===u)throw Error("Setting "+f+" as parent of "+u+" would create a cycle");this.setNode(f)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=f,this._children[f][u]=!0,this}_removeFromParentsChildList(u){delete this._children[this._parent[u]][u]}parent(u){if(this._isCompound){var f=this._parent[u];if(f!==Y1)return f}}children(u=Y1){if(this._isCompound){var f=this._children[u];if(f)return Object.keys(f)}else if(u===Y1)return this.nodes();else if(this.hasNode(u))return[]}predecessors(u){var f=this._preds[u];if(f)return Object.keys(f)}successors(u){var f=this._sucs[u];if(f)return Object.keys(f)}neighbors(u){var f=this.predecessors(u);if(f){let F=new Set(f);for(var $ of this.successors(u))F.add($);return Array.from(F.values())}}isLeaf(u){var f;if(this.isDirected())f=this.successors(u);else f=this.neighbors(u);return f.length===0}filterNodes(u){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var $=this;Object.entries(this._nodes).forEach(function([U,_]){if(u(U))f.setNode(U,_)}),Object.values(this._edgeObjs).forEach(function(U){if(f.hasNode(U.v)&&f.hasNode(U.w))f.setEdge(U,$.edge(U))});var F={};function l(U){var _=$.parent(U);if(_===void 0||f.hasNode(_))return F[U]=_,_;else if(_ in F)return F[_];else return l(_)}if(this._isCompound)f.nodes().forEach((U)=>f.setParent(U,l(U)));return f}setDefaultEdgeLabel(u){if(this._defaultEdgeLabelFn=u,typeof u!=="function")this._defaultEdgeLabelFn=()=>u;return this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(u,f){var $=this,F=arguments;return u.reduce(function(l,U){if(F.length>1)$.setEdge(l,U,f);else $.setEdge(l,U);return U}),this}setEdge(){var u,f,$,F,l=!1,U=arguments[0];if(typeof U==="object"&&U!==null&&"v"in U){if(u=U.v,f=U.w,$=U.name,arguments.length===2)F=arguments[1],l=!0}else if(u=U,f=arguments[1],$=arguments[3],arguments.length>2)F=arguments[2],l=!0;if(u=""+u,f=""+f,$!==void 0)$=""+$;var _=P3(this._isDirected,u,f,$);if(Object.hasOwn(this._edgeLabels,_)){if(l)this._edgeLabels[_]=F;return this}if($!==void 0&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(f),this._edgeLabels[_]=l?F:this._defaultEdgeLabelFn(u,f,$);var Q=jR(this._isDirected,u,f,$);return u=Q.v,f=Q.w,Object.freeze(Q),this._edgeObjs[_]=Q,Eq(this._preds[f],u),Eq(this._sucs[u],f),this._in[f][_]=Q,this._out[u][_]=Q,this._edgeCount++,this}edge(u,f,$){var F=arguments.length===1?n$(this._isDirected,arguments[0]):P3(this._isDirected,u,f,$);return this._edgeLabels[F]}edgeAsObj(){let u=this.edge(...arguments);if(typeof u!=="object")return{label:u};return u}hasEdge(u,f,$){var F=arguments.length===1?n$(this._isDirected,arguments[0]):P3(this._isDirected,u,f,$);return Object.hasOwn(this._edgeLabels,F)}removeEdge(u,f,$){var F=arguments.length===1?n$(this._isDirected,arguments[0]):P3(this._isDirected,u,f,$),l=this._edgeObjs[F];if(l)u=l.v,f=l.w,delete this._edgeLabels[F],delete this._edgeObjs[F],Vq(this._preds[f],u),Vq(this._sucs[u],f),delete this._in[f][F],delete this._out[u][F],this._edgeCount--;return this}inEdges(u,f){var $=this._in[u];if($){var F=Object.values($);if(!f)return F;return F.filter((l)=>l.v===f)}}outEdges(u,f){var $=this._out[u];if($){var F=Object.values($);if(!f)return F;return F.filter((l)=>l.w===f)}}nodeEdges(u,f){var $=this.inEdges(u,f);if($)return $.concat(this.outEdges(u,f))}}function Eq(u,f){if(u[f])u[f]++;else u[f]=1}function Vq(u,f){if(!--u[f])delete u[f]}function P3(u,f,$,F){var l=""+f,U=""+$;if(!u&&l>U){var _=l;l=U,U=_}return l+Mq+U+Mq+(F===void 0?SR:F)}function jR(u,f,$,F){var l=""+f,U=""+$;if(!u&&l>U){var _=l;l=U,U=_}var Q={v:l,w:U};if(F)Q.name=F;return Q}function n$(u,f){return P3(u,f.v,f.w,f.name)}Dq.exports=Xq});var Sq=o((ED,Oq)=>{Oq.exports="2.2.4"});var Nq=o((VD,jq)=>{jq.exports={Graph:u5(),version:Sq()}});var yq=o((XD,Iq)=>{var NR=u5();Iq.exports={write:IR,read:PR};function IR(u){var f={options:{directed:u.isDirected(),multigraph:u.isMultigraph(),compound:u.isCompound()},nodes:yR(u),edges:kR(u)};if(u.graph()!==void 0)f.value=structuredClone(u.graph());return f}function yR(u){return u.nodes().map(function(f){var $=u.node(f),F=u.parent(f),l={v:f};if($!==void 0)l.value=$;if(F!==void 0)l.parent=F;return l})}function kR(u){return u.edges().map(function(f){var $=u.edge(f),F={v:f.v,w:f.w};if(f.name!==void 0)F.name=f.name;if($!==void 0)F.value=$;return F})}function PR(u){var f=new NR(u.options).setGraph(u.value);return u.nodes.forEach(function($){if(f.setNode($.v,$.value),$.parent)f.setParent($.v,$.parent)}),u.edges.forEach(function($){f.setEdge({v:$.v,w:$.w,name:$.name},$.value)}),f}});var Pq=o((DD,kq)=>{kq.exports=rR;function rR(u){var f={},$=[],F;function l(U){if(Object.hasOwn(f,U))return;f[U]=!0,F.push(U),u.successors(U).forEach(l),u.predecessors(U).forEach(l)}return u.nodes().forEach(function(U){if(F=[],l(U),F.length)$.push(F)}),$}});var d$=o((OD,Cq)=>{class rq{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(u){return u.key})}has(u){return Object.hasOwn(this._keyIndices,u)}priority(u){var f=this._keyIndices[u];if(f!==void 0)return this._arr[f].priority}min(){if(this.size()===0)throw Error("Queue underflow");return this._arr[0].key}add(u,f){var $=this._keyIndices;if(u=String(u),!Object.hasOwn($,u)){var F=this._arr,l=F.length;return $[u]=l,F.push({key:u,priority:f}),this._decrease(l),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key}decrease(u,f){var $=this._keyIndices[u];if(f>this._arr[$].priority)throw Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[$].priority+" New: "+f);this._arr[$].priority=f,this._decrease($)}_heapify(u){var f=this._arr,$=2*u,F=$+1,l=u;if($<f.length){if(l=f[$].priority<f[l].priority?$:l,F<f.length)l=f[F].priority<f[l].priority?F:l;if(l!==u)this._swap(u,l),this._heapify(l)}}_decrease(u){var f=this._arr,$=f[u].priority,F;while(u!==0){if(F=u>>1,f[F].priority<$)break;this._swap(u,F),u=F}}_swap(u,f){var $=this._arr,F=this._keyIndices,l=$[u],U=$[f];$[u]=U,$[f]=l,F[U.key]=u,F[l.key]=f}}Cq.exports=rq});var a$=o((SD,hq)=>{var CR=d$();hq.exports=vR;var hR=()=>1;function vR(u,f,$,F){return xR(u,String(f),$||hR,F||function(l){return u.outEdges(l)})}function xR(u,f,$,F){var l={},U=new CR,_,Q,J=function(q){var T=q.v!==_?q.v:q.w,W=l[T],A=$(q),K=Q.distance+A;if(A<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+q+" Weight: "+A);if(K<W.distance)W.distance=K,W.predecessor=_,U.decrease(T,K)};u.nodes().forEach(function(q){var T=q===f?0:Number.POSITIVE_INFINITY;l[q]={distance:T},U.add(q,T)});while(U.size()>0){if(_=U.removeMin(),Q=l[_],Q.distance===Number.POSITIVE_INFINITY)break;F(_).forEach(J)}return l}});var xq=o((jD,vq)=>{var cR=a$();vq.exports=mR;function mR(u,f,$){return u.nodes().reduce(function(F,l){return F[l]=cR(u,l,f,$),F},{})}});var o$=o((ND,cq)=>{cq.exports=pR;function pR(u){var f=0,$=[],F={},l=[];function U(_){var Q=F[_]={onStack:!0,lowlink:f,index:f++};if($.push(_),u.successors(_).forEach(function(T){if(!Object.hasOwn(F,T))U(T),Q.lowlink=Math.min(Q.lowlink,F[T].lowlink);else if(F[T].onStack)Q.lowlink=Math.min(Q.lowlink,F[T].index)}),Q.lowlink===Q.index){var J=[],q;do q=$.pop(),F[q].onStack=!1,J.push(q);while(_!==q);l.push(J)}}return u.nodes().forEach(function(_){if(!Object.hasOwn(F,_))U(_)}),l}});var pq=o((ID,mq)=>{var bR=o$();mq.exports=iR;function iR(u){return bR(u).filter(function(f){return f.length>1||f.length===1&&u.hasEdge(f[0],f[0])})}});var iq=o((yD,bq)=>{bq.exports=sR;var gR=()=>1;function sR(u,f,$){return tR(u,f||gR,$||function(F){return u.outEdges(F)})}function tR(u,f,$){var F={},l=u.nodes();return l.forEach(function(U){F[U]={},F[U][U]={distance:0},l.forEach(function(_){if(U!==_)F[U][_]={distance:Number.POSITIVE_INFINITY}}),$(U).forEach(function(_){var Q=_.v===U?_.w:_.v,J=f(_);F[U][Q]={distance:J,predecessor:U}})}),l.forEach(function(U){var _=F[U];l.forEach(function(Q){var J=F[Q];l.forEach(function(q){var T=J[U],W=_[q],A=J[q],K=T.distance+W.distance;if(K<A.distance)A.distance=K,A.predecessor=W.predecessor})})}),F}});var e$=o((kD,sq)=>{function gq(u){var f={},$={},F=[];function l(U){if(Object.hasOwn($,U))throw new f5;if(!Object.hasOwn(f,U))$[U]=!0,f[U]=!0,u.predecessors(U).forEach(l),delete $[U],F.push(U)}if(u.sinks().forEach(l),Object.keys(f).length!==u.nodeCount())throw new f5;return F}class f5 extends Error{constructor(){super(...arguments)}}sq.exports=gq;gq.CycleException=f5});var dq=o((PD,nq)=>{var tq=e$();nq.exports=nR;function nR(u){try{tq(u)}catch(f){if(f instanceof tq.CycleException)return!1;throw f}return!0}});var uF=o((rD,oq)=>{oq.exports=dR;function dR(u,f,$){if(!Array.isArray(f))f=[f];var F=u.isDirected()?(Q)=>u.successors(Q):(Q)=>u.neighbors(Q),l=$==="post"?aR:oR,U=[],_={};return f.forEach((Q)=>{if(!u.hasNode(Q))throw Error("Graph does not have node: "+Q);l(Q,F,_,U)}),U}function aR(u,f,$,F){var l=[[u,!1]];while(l.length>0){var U=l.pop();if(U[1])F.push(U[0]);else if(!Object.hasOwn($,U[0]))$[U[0]]=!0,l.push([U[0],!0]),aq(f(U[0]),(_)=>l.push([_,!1]))}}function oR(u,f,$,F){var l=[u];while(l.length>0){var U=l.pop();if(!Object.hasOwn($,U))$[U]=!0,F.push(U),aq(f(U),(_)=>l.push(_))}}function aq(u,f){var $=u.length;while($--)f(u[$],$,u);return u}});var uT=o((CD,eq)=>{var eR=uF();eq.exports=uM;function uM(u,f){return eR(u,f,"post")}});var $T=o((hD,fT)=>{var fM=uF();fT.exports=$M;function $M(u,f){return fM(u,f,"pre")}});var lT=o((vD,FT)=>{var FM=u5(),lM=d$();FT.exports=UM;function UM(u,f){var $=new FM,F={},l=new lM,U;function _(J){var q=J.v===U?J.w:J.v,T=l.priority(q);if(T!==void 0){var W=f(J);if(W<T)F[q]=U,l.decrease(q,W)}}if(u.nodeCount()===0)return $;u.nodes().forEach(function(J){l.add(J,Number.POSITIVE_INFINITY),$.setNode(J)}),l.decrease(u.nodes()[0],0);var Q=!1;while(l.size()>0){if(U=l.removeMin(),Object.hasOwn(F,U))$.setEdge(U,F[U]);else if(Q)throw Error("Input graph is not connected: "+u);else Q=!0;u.nodeEdges(U).forEach(_)}return $}});var _T=o((xD,UT)=>{UT.exports={components:Pq(),dijkstra:a$(),dijkstraAll:xq(),findCycles:pq(),floydWarshall:iq(),isAcyclic:dq(),postorder:uT(),preorder:$T(),prim:lT(),tarjan:o$(),topsort:e$()}});var Lf=o((cD,JT)=>{var QT=Nq();JT.exports={Graph:QT.Graph,json:yq(),alg:_T(),version:QT.version}});var WT=o((mD,AT)=>{class TT{constructor(){let u={};u._next=u._prev=u,this._sentinel=u}dequeue(){let u=this._sentinel,f=u._prev;if(f!==u)return qT(f),f}enqueue(u){let f=this._sentinel;if(u._prev&&u._next)qT(u);u._next=f._next,f._next._prev=u,f._next=u,u._prev=f}toString(){let u=[],f=this._sentinel,$=f._prev;while($!==f)u.push(JSON.stringify($,_M)),$=$._prev;return"["+u.join(", ")+"]"}}function qT(u){u._prev._next=u._next,u._next._prev=u._prev,delete u._next,delete u._prev}function _M(u,f){if(u!=="_next"&&u!=="_prev")return f}AT.exports=TT});var wT=o((pD,KT)=>{var QM=Lf().Graph,JM=WT();KT.exports=TM;var qM=()=>1;function TM(u,f){if(u.nodeCount()<=1)return[];let $=WM(u,f||qM);return AM($.graph,$.buckets,$.zeroIdx).flatMap((l)=>u.outEdges(l.v,l.w))}function AM(u,f,$){let F=[],l=f[f.length-1],U=f[0],_;while(u.nodeCount()){while(_=U.dequeue())fF(u,f,$,_);while(_=l.dequeue())fF(u,f,$,_);if(u.nodeCount()){for(let Q=f.length-2;Q>0;--Q)if(_=f[Q].dequeue(),_){F=F.concat(fF(u,f,$,_,!0));break}}}return F}function fF(u,f,$,F,l){let U=l?[]:void 0;return u.inEdges(F.v).forEach((_)=>{let Q=u.edge(_),J=u.node(_.v);if(l)U.push({v:_.v,w:_.w});J.out-=Q,$F(f,$,J)}),u.outEdges(F.v).forEach((_)=>{let Q=u.edge(_),J=_.w,q=u.node(J);q.in-=Q,$F(f,$,q)}),u.removeNode(F.v),U}function WM(u,f){let $=new QM,F=0,l=0;u.nodes().forEach((Q)=>{$.setNode(Q,{v:Q,in:0,out:0})}),u.edges().forEach((Q)=>{let J=$.edge(Q.v,Q.w)||0,q=f(Q),T=J+q;$.setEdge(Q.v,Q.w,T),l=Math.max(l,$.node(Q.v).out+=q),F=Math.max(F,$.node(Q.w).in+=q)});let U=KM(l+F+3).map(()=>new JM),_=F+1;return $.nodes().forEach((Q)=>{$F(U,_,$.node(Q))}),{graph:$,buckets:U,zeroIdx:_}}function $F(u,f,$){if(!$.out)u[0].enqueue($);else if(!$.in)u[u.length-1].enqueue($);else u[$.out-$.in+f].enqueue($)}function KM(u){let f=[];for(let $=0;$<u;$++)f.push($);return f}});var Eu=o((bD,YT)=>{var BT=Lf().Graph;YT.exports={addBorderNode:RM,addDummyNode:LT,applyWithChunking:$5,asNonCompoundGraph:BM,buildLayerMatrix:zM,intersectRect:HM,mapValues:SM,maxRank:HT,normalizeRanks:ZM,notime:XM,partition:EM,pick:OM,predecessorWeights:GM,range:ZT,removeEmptyRanks:YM,simplify:wM,successorWeights:LM,time:VM,uniqueId:zT,zipObject:FF};function LT(u,f,$,F){var l=F;while(u.hasNode(l))l=zT(F);return $.dummy=f,u.setNode(l,$),l}function wM(u){let f=new BT().setGraph(u.graph());return u.nodes().forEach(($)=>f.setNode($,u.node($))),u.edges().forEach(($)=>{let F=f.edge($.v,$.w)||{weight:0,minlen:1},l=u.edge($);f.setEdge($.v,$.w,{weight:F.weight+l.weight,minlen:Math.max(F.minlen,l.minlen)})}),f}function BM(u){let f=new BT({multigraph:u.isMultigraph()}).setGraph(u.graph());return u.nodes().forEach(($)=>{if(!u.children($).length)f.setNode($,u.node($))}),u.edges().forEach(($)=>{f.setEdge($,u.edge($))}),f}function LM(u){let f=u.nodes().map(($)=>{let F={};return u.outEdges($).forEach((l)=>{F[l.w]=(F[l.w]||0)+u.edge(l).weight}),F});return FF(u.nodes(),f)}function GM(u){let f=u.nodes().map(($)=>{let F={};return u.inEdges($).forEach((l)=>{F[l.v]=(F[l.v]||0)+u.edge(l).weight}),F});return FF(u.nodes(),f)}function HM(u,f){let{x:$,y:F}=u,l=f.x-$,U=f.y-F,_=u.width/2,Q=u.height/2;if(!l&&!U)throw Error("Not possible to find intersection inside of the rectangle");let J,q;if(Math.abs(U)*_>Math.abs(l)*Q){if(U<0)Q=-Q;J=Q*l/U,q=Q}else{if(l<0)_=-_;J=_,q=_*U/l}return{x:$+J,y:F+q}}function zM(u){let f=ZT(HT(u)+1).map(()=>[]);return u.nodes().forEach(($)=>{let F=u.node($),l=F.rank;if(l!==void 0)f[l][F.order]=$}),f}function ZM(u){let f=u.nodes().map((F)=>{let l=u.node(F).rank;if(l===void 0)return Number.MAX_VALUE;return l}),$=$5(Math.min,f);u.nodes().forEach((F)=>{let l=u.node(F);if(Object.hasOwn(l,"rank"))l.rank-=$})}function YM(u){let f=u.nodes().map((_)=>u.node(_).rank),$=$5(Math.min,f),F=[];u.nodes().forEach((_)=>{let Q=u.node(_).rank-$;if(!F[Q])F[Q]=[];F[Q].push(_)});let l=0,U=u.graph().nodeRankFactor;Array.from(F).forEach((_,Q)=>{if(_===void 0&&Q%U!==0)--l;else if(_!==void 0&&l)_.forEach((J)=>u.node(J).rank+=l)})}function RM(u,f,$,F){let l={width:0,height:0};if(arguments.length>=4)l.rank=$,l.order=F;return LT(u,"border",l,f)}function MM(u,f=GT){let $=[];for(let F=0;F<u.length;F+=f){let l=u.slice(F,F+f);$.push(l)}return $}var GT=65535;function $5(u,f){if(f.length>GT){let $=MM(f);return u.apply(null,$.map((F)=>u.apply(null,F)))}else return u.apply(null,f)}function HT(u){let $=u.nodes().map((F)=>{let l=u.node(F).rank;if(l===void 0)return Number.MIN_VALUE;return l});return $5(Math.max,$)}function EM(u,f){let $={lhs:[],rhs:[]};return u.forEach((F)=>{if(f(F))$.lhs.push(F);else $.rhs.push(F)}),$}function VM(u,f){let $=Date.now();try{return f()}finally{console.log(u+" time: "+(Date.now()-$)+"ms")}}function XM(u,f){return f()}var DM=0;function zT(u){var f=++DM;return u+(""+f)}function ZT(u,f,$=1){if(f==null)f=u,u=0;let F=(U)=>U<f;if($<0)F=(U)=>f<U;let l=[];for(let U=u;F(U);U+=$)l.push(U);return l}function OM(u,f){let $={};for(let F of f)if(u[F]!==void 0)$[F]=u[F];return $}function SM(u,f){let $=f;if(typeof f==="string")$=(F)=>F[f];return Object.entries(u).reduce((F,[l,U])=>{return F[l]=$(U,l),F},{})}function FF(u,f){return u.reduce(($,F,l)=>{return $[F]=f[l],$},{})}});var MT=o((iD,RT)=>{var jM=wT(),NM=Eu().uniqueId;RT.exports={run:IM,undo:kM};function IM(u){(u.graph().acyclicer==="greedy"?jM(u,$(u)):yM(u)).forEach((F)=>{let l=u.edge(F);u.removeEdge(F),l.forwardName=F.name,l.reversed=!0,u.setEdge(F.w,F.v,l,NM("rev"))});function $(F){return(l)=>{return F.edge(l).weight}}}function yM(u){let f=[],$={},F={};function l(U){if(Object.hasOwn(F,U))return;F[U]=!0,$[U]=!0,u.outEdges(U).forEach((_)=>{if(Object.hasOwn($,_.w))f.push(_);else l(_.w)}),delete $[U]}return u.nodes().forEach(l),f}function kM(u){u.edges().forEach((f)=>{let $=u.edge(f);if($.reversed){u.removeEdge(f);let F=$.forwardName;delete $.reversed,delete $.forwardName,u.setEdge(f.w,f.v,$,F)}})}});var VT=o((gD,ET)=>{var PM=Eu();ET.exports={run:rM,undo:hM};function rM(u){u.graph().dummyChains=[],u.edges().forEach((f)=>CM(u,f))}function CM(u,f){let $=f.v,F=u.node($).rank,l=f.w,U=u.node(l).rank,_=f.name,Q=u.edge(f),J=Q.labelRank;if(U===F+1)return;u.removeEdge(f);let q,T,W;for(W=0,++F;F<U;++W,++F){if(Q.points=[],T={width:0,height:0,edgeLabel:Q,edgeObj:f,rank:F},q=PM.addDummyNode(u,"edge",T,"_d"),F===J)T.width=Q.width,T.height=Q.height,T.dummy="edge-label",T.labelpos=Q.labelpos;if(u.setEdge($,q,{weight:Q.weight},_),W===0)u.graph().dummyChains.push(q);$=q}u.setEdge($,l,{weight:Q.weight},_)}function hM(u){u.graph().dummyChains.forEach((f)=>{let $=u.node(f),F=$.edgeLabel,l;u.setEdge($.edgeObj,F);while($.dummy){if(l=u.successors(f)[0],u.removeNode(f),F.points.push({x:$.x,y:$.y}),$.dummy==="edge-label")F.x=$.x,F.y=$.y,F.width=$.width,F.height=$.height;f=l,$=u.node(f)}})}});var r3=o((sD,XT)=>{var{applyWithChunking:vM}=Eu();XT.exports={longestPath:xM,slack:cM};function xM(u){var f={};function $(F){var l=u.node(F);if(Object.hasOwn(f,F))return l.rank;f[F]=!0;let U=u.outEdges(F).map((Q)=>{if(Q==null)return Number.POSITIVE_INFINITY;return $(Q.w)-u.edge(Q).minlen});var _=vM(Math.min,U);if(_===Number.POSITIVE_INFINITY)_=0;return l.rank=_}u.sources().forEach($)}function cM(u,f){return u.node(f.w).rank-u.node(f.v).rank-u.edge(f).minlen}});var lF=o((tD,DT)=>{var mM=Lf().Graph,F5=r3().slack;DT.exports=pM;function pM(u){var f=new mM({directed:!1}),$=u.nodes()[0],F=u.nodeCount();f.setNode($,{});var l,U;while(bM(f,u)<F)l=iM(f,u),U=f.hasNode(l.v)?F5(u,l):-F5(u,l),gM(f,u,U);return f}function bM(u,f){function $(F){f.nodeEdges(F).forEach((l)=>{var U=l.v,_=F===U?l.w:U;if(!u.hasNode(_)&&!F5(f,l))u.setNode(_,{}),u.setEdge(F,_,{}),$(_)})}return u.nodes().forEach($),u.nodeCount()}function iM(u,f){return f.edges().reduce((F,l)=>{let U=Number.POSITIVE_INFINITY;if(u.hasNode(l.v)!==u.hasNode(l.w))U=F5(f,l);if(U<F[0])return[U,l];return F},[Number.POSITIVE_INFINITY,null])[1]}function gM(u,f,$){u.nodes().forEach((F)=>f.node(F).rank+=$)}});var rT=o((nD,PT)=>{var sM=lF(),OT=r3().slack,tM=r3().longestPath,nM=Lf().alg.preorder,dM=Lf().alg.postorder,aM=Eu().simplify;PT.exports=R1;R1.initLowLimValues=_F;R1.initCutValues=UF;R1.calcCutValue=jT;R1.leaveEdge=IT;R1.enterEdge=yT;R1.exchangeEdges=kT;function R1(u){u=aM(u),tM(u);var f=sM(u);_F(f),UF(f,u);var $,F;while($=IT(f))F=yT(f,u,$),kT(f,u,$,F)}function UF(u,f){var $=dM(u,u.nodes());$=$.slice(0,$.length-1),$.forEach((F)=>oM(u,f,F))}function oM(u,f,$){var F=u.node($),l=F.parent;u.edge($,l).cutvalue=jT(u,f,$)}function jT(u,f,$){var F=u.node($),l=F.parent,U=!0,_=f.edge($,l),Q=0;if(!_)U=!1,_=f.edge(l,$);return Q=_.weight,f.nodeEdges($).forEach((J)=>{var q=J.v===$,T=q?J.w:J.v;if(T!==l){var W=q===U,A=f.edge(J).weight;if(Q+=W?A:-A,uE(u,$,T)){var K=u.edge($,T).cutvalue;Q+=W?-K:K}}}),Q}function _F(u,f){if(arguments.length<2)f=u.nodes()[0];NT(u,{},1,f)}function NT(u,f,$,F,l){var U=$,_=u.node(F);if(f[F]=!0,u.neighbors(F).forEach((Q)=>{if(!Object.hasOwn(f,Q))$=NT(u,f,$,Q,F)}),_.low=U,_.lim=$++,l)_.parent=l;else delete _.parent;return $}function IT(u){return u.edges().find((f)=>u.edge(f).cutvalue<0)}function yT(u,f,$){var{v:F,w:l}=$;if(!f.hasEdge(F,l))F=$.w,l=$.v;var U=u.node(F),_=u.node(l),Q=U,J=!1;if(U.lim>_.lim)Q=_,J=!0;var q=f.edges().filter((T)=>{return J===ST(u,u.node(T.v),Q)&&J!==ST(u,u.node(T.w),Q)});return q.reduce((T,W)=>{if(OT(f,W)<OT(f,T))return W;return T})}function kT(u,f,$,F){var{v:l,w:U}=$;u.removeEdge(l,U),u.setEdge(F.v,F.w,{}),_F(u),UF(u,f),eM(u,f)}function eM(u,f){var $=u.nodes().find((l)=>!f.node(l).parent),F=nM(u,$);F=F.slice(1),F.forEach((l)=>{var U=u.node(l).parent,_=f.edge(l,U),Q=!1;if(!_)_=f.edge(U,l),Q=!0;f.node(l).rank=f.node(U).rank+(Q?_.minlen:-_.minlen)})}function uE(u,f,$){return u.hasEdge(f,$)}function ST(u,f,$){return $.low<=f.lim&&f.lim<=$.lim}});var xT=o((dD,vT)=>{var fE=r3(),hT=fE.longestPath,$E=lF(),FE=rT();vT.exports=lE;function lE(u){var f=u.graph().ranker;if(f instanceof Function)return f(u);switch(u.graph().ranker){case"network-simplex":CT(u);break;case"tight-tree":_E(u);break;case"longest-path":UE(u);break;case"none":break;default:CT(u)}}var UE=hT;function _E(u){hT(u),$E(u)}function CT(u){FE(u)}});var mT=o((aD,cT)=>{cT.exports=QE;function QE(u){let f=qE(u);u.graph().dummyChains.forEach(($)=>{let F=u.node($),l=F.edgeObj,U=JE(u,f,l.v,l.w),_=U.path,Q=U.lca,J=0,q=_[J],T=!0;while($!==l.w){if(F=u.node($),T){while((q=_[J])!==Q&&u.node(q).maxRank<F.rank)J++;if(q===Q)T=!1}if(!T){while(J<_.length-1&&u.node(q=_[J+1]).minRank<=F.rank)J++;q=_[J]}u.setParent($,q),$=u.successors($)[0]}})}function JE(u,f,$,F){let l=[],U=[],_=Math.min(f[$].low,f[F].low),Q=Math.max(f[$].lim,f[F].lim),J,q;J=$;do J=u.parent(J),l.push(J);while(J&&(f[J].low>_||Q>f[J].lim));q=J,J=F;while((J=u.parent(J))!==q)U.push(J);return{path:l.concat(U.reverse()),lca:q}}function qE(u){let f={},$=0;function F(l){let U=$;u.children(l).forEach(F),f[l]={low:U,lim:$++}}return u.children().forEach(F),f}});var iT=o((oD,bT)=>{var l5=Eu();bT.exports={run:TE,cleanup:KE};function TE(u){let f=l5.addDummyNode(u,"root",{},"_root"),$=AE(u),F=Object.values($),l=l5.applyWithChunking(Math.max,F)-1,U=2*l+1;u.graph().nestingRoot=f,u.edges().forEach((Q)=>u.edge(Q).minlen*=U);let _=WE(u)+1;u.children().forEach((Q)=>pT(u,f,U,_,l,$,Q)),u.graph().nodeRankFactor=U}function pT(u,f,$,F,l,U,_){let Q=u.children(_);if(!Q.length){if(_!==f)u.setEdge(f,_,{weight:0,minlen:$});return}let J=l5.addBorderNode(u,"_bt"),q=l5.addBorderNode(u,"_bb"),T=u.node(_);if(u.setParent(J,_),T.borderTop=J,u.setParent(q,_),T.borderBottom=q,Q.forEach((W)=>{pT(u,f,$,F,l,U,W);let A=u.node(W),K=A.borderTop?A.borderTop:W,L=A.borderBottom?A.borderBottom:W,z=A.borderTop?F:2*F,Z=K!==L?1:l-U[_]+1;u.setEdge(J,K,{weight:z,minlen:Z,nestingEdge:!0}),u.setEdge(L,q,{weight:z,minlen:Z,nestingEdge:!0})}),!u.parent(_))u.setEdge(f,J,{weight:0,minlen:l+U[_]})}function AE(u){var f={};function $(F,l){var U=u.children(F);if(U&&U.length)U.forEach((_)=>$(_,l+1));f[F]=l}return u.children().forEach((F)=>$(F,1)),f}function WE(u){return u.edges().reduce((f,$)=>f+u.edge($).weight,0)}function KE(u){var f=u.graph();u.removeNode(f.nestingRoot),delete f.nestingRoot,u.edges().forEach(($)=>{var F=u.edge($);if(F.nestingEdge)u.removeEdge($)})}});var tT=o((eD,sT)=>{var wE=Eu();sT.exports=BE;function BE(u){function f($){let F=u.children($),l=u.node($);if(F.length)F.forEach(f);if(Object.hasOwn(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(let U=l.minRank,_=l.maxRank+1;U<_;++U)gT(u,"borderLeft","_bl",$,l,U),gT(u,"borderRight","_br",$,l,U)}}u.children().forEach(f)}function gT(u,f,$,F,l,U){let _={width:0,height:0,rank:U,borderType:f},Q=l[f][U-1],J=wE.addDummyNode(u,"border",_,$);if(l[f][U]=J,u.setParent(J,F),Q)u.setEdge(Q,J,{weight:1})}});var oT=o((uO,aT)=>{aT.exports={adjust:LE,undo:GE};function LE(u){let f=u.graph().rankdir.toLowerCase();if(f==="lr"||f==="rl")dT(u)}function GE(u){let f=u.graph().rankdir.toLowerCase();if(f==="bt"||f==="rl")HE(u);if(f==="lr"||f==="rl")zE(u),dT(u)}function dT(u){u.nodes().forEach((f)=>nT(u.node(f))),u.edges().forEach((f)=>nT(u.edge(f)))}function nT(u){let f=u.width;u.width=u.height,u.height=f}function HE(u){u.nodes().forEach((f)=>QF(u.node(f))),u.edges().forEach((f)=>{let $=u.edge(f);if($.points.forEach(QF),Object.hasOwn($,"y"))QF($)})}function QF(u){u.y=-u.y}function zE(u){u.nodes().forEach((f)=>JF(u.node(f))),u.edges().forEach((f)=>{let $=u.edge(f);if($.points.forEach(JF),Object.hasOwn($,"x"))JF($)})}function JF(u){let f=u.x;u.x=u.y,u.y=f}});var fA=o((fO,uA)=>{var eT=Eu();uA.exports=ZE;function ZE(u){let f={},$=u.nodes().filter((J)=>!u.children(J).length),F=$.map((J)=>u.node(J).rank),l=eT.applyWithChunking(Math.max,F),U=eT.range(l+1).map(()=>[]);function _(J){if(f[J])return;f[J]=!0;let q=u.node(J);U[q.rank].push(J),u.successors(J).forEach(_)}return $.sort((J,q)=>u.node(J).rank-u.node(q).rank).forEach(_),U}});var FA=o(($O,$A)=>{var YE=Eu().zipObject;$A.exports=RE;function RE(u,f){let $=0;for(let F=1;F<f.length;++F)$+=ME(u,f[F-1],f[F]);return $}function ME(u,f,$){let F=YE($,$.map((q,T)=>T)),l=f.flatMap((q)=>{return u.outEdges(q).map((T)=>{return{pos:F[T.w],weight:u.edge(T).weight}}).sort((T,W)=>T.pos-W.pos)}),U=1;while(U<$.length)U<<=1;let _=2*U-1;U-=1;let Q=Array(_).fill(0),J=0;return l.forEach((q)=>{let T=q.pos+U;Q[T]+=q.weight;let W=0;while(T>0){if(T%2)W+=Q[T+1];T=T-1>>1,Q[T]+=q.weight}J+=q.weight*W}),J}});var UA=o((FO,lA)=>{lA.exports=EE;function EE(u,f=[]){return f.map(($)=>{let F=u.inEdges($);if(!F.length)return{v:$};else{let l=F.reduce((U,_)=>{let Q=u.edge(_),J=u.node(_.v);return{sum:U.sum+Q.weight*J.order,weight:U.weight+Q.weight}},{sum:0,weight:0});return{v:$,barycenter:l.sum/l.weight,weight:l.weight}}})}});var QA=o((lO,_A)=>{var VE=Eu();_A.exports=XE;function XE(u,f){let $={};u.forEach((l,U)=>{let _=$[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:U};if(l.barycenter!==void 0)_.barycenter=l.barycenter,_.weight=l.weight}),f.edges().forEach((l)=>{let U=$[l.v],_=$[l.w];if(U!==void 0&&_!==void 0)_.indegree++,U.out.push($[l.w])});let F=Object.values($).filter((l)=>!l.indegree);return DE(F)}function DE(u){let f=[];function $(l){return(U)=>{if(U.merged)return;if(U.barycenter===void 0||l.barycenter===void 0||U.barycenter>=l.barycenter)OE(l,U)}}function F(l){return(U)=>{if(U.in.push(l),--U.indegree===0)u.push(U)}}while(u.length){let l=u.pop();f.push(l),l.in.reverse().forEach($(l)),l.out.forEach(F(l))}return f.filter((l)=>!l.merged).map((l)=>{return VE.pick(l,["vs","i","barycenter","weight"])})}function OE(u,f){let $=0,F=0;if(u.weight)$+=u.barycenter*u.weight,F+=u.weight;if(f.weight)$+=f.barycenter*f.weight,F+=f.weight;u.vs=f.vs.concat(u.vs),u.barycenter=$/F,u.weight=F,u.i=Math.min(f.i,u.i),f.merged=!0}});var TA=o((UO,qA)=>{var SE=Eu();qA.exports=jE;function jE(u,f){let $=SE.partition(u,(T)=>{return Object.hasOwn(T,"barycenter")}),F=$.lhs,l=$.rhs.sort((T,W)=>W.i-T.i),U=[],_=0,Q=0,J=0;F.sort(NE(!!f)),J=JA(U,l,J),F.forEach((T)=>{J+=T.vs.length,U.push(T.vs),_+=T.barycenter*T.weight,Q+=T.weight,J=JA(U,l,J)});let q={vs:U.flat(!0)};if(Q)q.barycenter=_/Q,q.weight=Q;return q}function JA(u,f,$){let F;while(f.length&&(F=f[f.length-1]).i<=$)f.pop(),u.push(F.vs),$++;return $}function NE(u){return(f,$)=>{if(f.barycenter<$.barycenter)return-1;else if(f.barycenter>$.barycenter)return 1;return!u?f.i-$.i:$.i-f.i}}});var KA=o((_O,WA)=>{var IE=UA(),yE=QA(),kE=TA();WA.exports=AA;function AA(u,f,$,F){let l=u.children(f),U=u.node(f),_=U?U.borderLeft:void 0,Q=U?U.borderRight:void 0,J={};if(_)l=l.filter((A)=>A!==_&&A!==Q);let q=IE(u,l);q.forEach((A)=>{if(u.children(A.v).length){let K=AA(u,A.v,$,F);if(J[A.v]=K,Object.hasOwn(K,"barycenter"))rE(A,K)}});let T=yE(q,$);PE(T,J);let W=kE(T,F);if(_){if(W.vs=[_,W.vs,Q].flat(!0),u.predecessors(_).length){let A=u.node(u.predecessors(_)[0]),K=u.node(u.predecessors(Q)[0]);if(!Object.hasOwn(W,"barycenter"))W.barycenter=0,W.weight=0;W.barycenter=(W.barycenter*W.weight+A.order+K.order)/(W.weight+2),W.weight+=2}}return W}function PE(u,f){u.forEach(($)=>{$.vs=$.vs.flatMap((F)=>{if(f[F])return f[F].vs;return F})})}function rE(u,f){if(u.barycenter!==void 0)u.barycenter=(u.barycenter*u.weight+f.barycenter*f.weight)/(u.weight+f.weight),u.weight+=f.weight;else u.barycenter=f.barycenter,u.weight=f.weight}});var BA=o((QO,wA)=>{var CE=Lf().Graph,hE=Eu();wA.exports=vE;function vE(u,f,$,F){if(!F)F=u.nodes();let l=xE(u),U=new CE({compound:!0}).setGraph({root:l}).setDefaultNodeLabel((_)=>u.node(_));return F.forEach((_)=>{let Q=u.node(_),J=u.parent(_);if(Q.rank===f||Q.minRank<=f&&f<=Q.maxRank){if(U.setNode(_),U.setParent(_,J||l),u[$](_).forEach((q)=>{let T=q.v===_?q.w:q.v,W=U.edge(T,_),A=W!==void 0?W.weight:0;U.setEdge(T,_,{weight:u.edge(q).weight+A})}),Object.hasOwn(Q,"minRank"))U.setNode(_,{borderLeft:Q.borderLeft[f],borderRight:Q.borderRight[f]})}}),U}function xE(u){var f;while(u.hasNode(f=hE.uniqueId("_root")));return f}});var GA=o((JO,LA)=>{LA.exports=cE;function cE(u,f,$){let F={},l;$.forEach((U)=>{let _=u.parent(U),Q,J;while(_){if(Q=u.parent(_),Q)J=F[Q],F[Q]=_;else J=l,l=_;if(J&&J!==_){f.setEdge(J,_);return}_=Q}})}});var RA=o((qO,YA)=>{var mE=fA(),pE=FA(),bE=KA(),iE=BA(),gE=GA(),sE=Lf().Graph,U5=Eu();YA.exports=ZA;function ZA(u,f){if(f&&typeof f.customOrder==="function"){f.customOrder(u,ZA);return}let $=U5.maxRank(u),F=HA(u,U5.range(1,$+1),"inEdges"),l=HA(u,U5.range($-1,-1,-1),"outEdges"),U=mE(u);if(zA(u,U),f&&f.disableOptimalOrderHeuristic)return;let _=Number.POSITIVE_INFINITY,Q;for(let J=0,q=0;q<4;++J,++q){tE(J%2?F:l,J%4>=2),U=U5.buildLayerMatrix(u);let T=pE(u,U);if(T<_)q=0,Q=Object.assign({},U),_=T}zA(u,Q)}function HA(u,f,$){let F=new Map,l=(U,_)=>{if(!F.has(U))F.set(U,[]);F.get(U).push(_)};for(let U of u.nodes()){let _=u.node(U);if(typeof _.rank==="number")l(_.rank,U);if(typeof _.minRank==="number"&&typeof _.maxRank==="number"){for(let Q=_.minRank;Q<=_.maxRank;Q++)if(Q!==_.rank)l(Q,U)}}return f.map(function(U){return iE(u,U,$,F.get(U)||[])})}function tE(u,f){let $=new sE;u.forEach(function(F){let l=F.graph().root,U=bE(F,l,$,f);U.vs.forEach((_,Q)=>F.node(_).order=Q),gE(F,$,U.vs)})}function zA(u,f){Object.values(f).forEach(($)=>$.forEach((F,l)=>u.node(F).order=l))}});var IA=o((TO,NA)=>{var nE=Lf().Graph,A0=Eu();NA.exports={positionX:oE,findType1Conflicts:MA,findType2Conflicts:EA,addConflict:qF,hasConflict:VA,verticalAlignment:XA,horizontalCompaction:DA,alignCoordinates:SA,findSmallestWidthAlignment:OA,balance:jA};function MA(u,f){let $={};function F(l,U){let _=0,Q=0,J=l.length,q=U[U.length-1];return U.forEach((T,W)=>{let A=dE(u,T),K=A?u.node(A).order:J;if(A||T===q)U.slice(Q,W+1).forEach((L)=>{u.predecessors(L).forEach((z)=>{let Z=u.node(z),B=Z.order;if((B<_||K<B)&&!(Z.dummy&&u.node(L).dummy))qF($,z,L)})}),Q=W+1,_=K}),U}return f.length&&f.reduce(F),$}function EA(u,f){let $={};function F(U,_,Q,J,q){let T;A0.range(_,Q).forEach((W)=>{if(T=U[W],u.node(T).dummy)u.predecessors(T).forEach((A)=>{let K=u.node(A);if(K.dummy&&(K.order<J||K.order>q))qF($,A,T)})})}function l(U,_){let Q=-1,J,q=0;return _.forEach((T,W)=>{if(u.node(T).dummy==="border"){let A=u.predecessors(T);if(A.length)J=u.node(A[0]).order,F(_,q,W,Q,J),q=W,Q=J}F(_,q,_.length,J,U.length)}),_}return f.length&&f.reduce(l),$}function dE(u,f){if(u.node(f).dummy)return u.predecessors(f).find(($)=>u.node($).dummy)}function qF(u,f,$){if(f>$){let l=f;f=$,$=l}let F=u[f];if(!F)u[f]=F={};F[$]=!0}function VA(u,f,$){if(f>$){let F=f;f=$,$=F}return!!u[f]&&Object.hasOwn(u[f],$)}function XA(u,f,$,F){let l={},U={},_={};return f.forEach((Q)=>{Q.forEach((J,q)=>{l[J]=J,U[J]=J,_[J]=q})}),f.forEach((Q)=>{let J=-1;Q.forEach((q)=>{let T=F(q);if(T.length){T=T.sort((A,K)=>_[A]-_[K]);let W=(T.length-1)/2;for(let A=Math.floor(W),K=Math.ceil(W);A<=K;++A){let L=T[A];if(U[q]===q&&J<_[L]&&!VA($,q,L))U[L]=q,U[q]=l[q]=l[L],J=_[L]}}})}),{root:l,align:U}}function DA(u,f,$,F,l){let U={},_=aE(u,f,$,l),Q=l?"borderLeft":"borderRight";function J(W,A){let K=_.nodes(),L=K.pop(),z={};while(L){if(z[L])W(L);else z[L]=!0,K.push(L),K=K.concat(A(L));L=K.pop()}}function q(W){U[W]=_.inEdges(W).reduce((A,K)=>{return Math.max(A,U[K.v]+_.edge(K))},0)}function T(W){let A=_.outEdges(W).reduce((L,z)=>{return Math.min(L,U[z.w]-_.edge(z))},Number.POSITIVE_INFINITY),K=u.node(W);if(A!==Number.POSITIVE_INFINITY&&K.borderType!==Q)U[W]=Math.max(U[W],A)}return J(q,_.predecessors.bind(_)),J(T,_.successors.bind(_)),Object.keys(F).forEach((W)=>U[W]=U[$[W]]),U}function aE(u,f,$,F){let l=new nE,U=u.graph(),_=eE(U.nodesep,U.edgesep,F);return f.forEach((Q)=>{let J;Q.forEach((q)=>{let T=$[q];if(l.setNode(T),J){var W=$[J],A=l.edge(W,T);l.setEdge(W,T,Math.max(_(u,q,J),A||0))}J=q})}),l}function OA(u,f){return Object.values(f).reduce(($,F)=>{let{NEGATIVE_INFINITY:l,POSITIVE_INFINITY:U}=Number;Object.entries(F).forEach(([Q,J])=>{let q=uV(u,Q)/2;l=Math.max(J+q,l),U=Math.min(J-q,U)});let _=l-U;if(_<$[0])$=[_,F];return $},[Number.POSITIVE_INFINITY,null])[1]}function SA(u,f){let $=Object.values(f),F=A0.applyWithChunking(Math.min,$),l=A0.applyWithChunking(Math.max,$);["u","d"].forEach((U)=>{["l","r"].forEach((_)=>{let Q=U+_,J=u[Q];if(J===f)return;let q=Object.values(J),T=F-A0.applyWithChunking(Math.min,q);if(_!=="l")T=l-A0.applyWithChunking(Math.max,q);if(T)u[Q]=A0.mapValues(J,(W)=>W+T)})})}function jA(u,f){return A0.mapValues(u.ul,($,F)=>{if(f)return u[f.toLowerCase()][F];else{let l=Object.values(u).map((U)=>U[F]).sort((U,_)=>U-_);return(l[1]+l[2])/2}})}function oE(u){let f=A0.buildLayerMatrix(u),$=Object.assign(MA(u,f),EA(u,f)),F={},l;["u","d"].forEach((_)=>{l=_==="u"?f:Object.values(f).reverse(),["l","r"].forEach((Q)=>{if(Q==="r")l=l.map((W)=>{return Object.values(W).reverse()});let J=(_==="u"?u.predecessors:u.successors).bind(u),q=XA(u,l,$,J),T=DA(u,l,q.root,q.align,Q==="r");if(Q==="r")T=A0.mapValues(T,(W)=>-W);F[_+Q]=T})});let U=OA(u,F);return SA(F,U),jA(F,u.graph().align)}function eE(u,f,$){return(F,l,U)=>{let _=F.node(l),Q=F.node(U),J=0,q;if(J+=_.width/2,Object.hasOwn(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":q=-_.width/2;break;case"r":q=_.width/2;break}if(q)J+=$?q:-q;if(q=0,J+=(_.dummy?f:u)/2,J+=(Q.dummy?f:u)/2,J+=Q.width/2,Object.hasOwn(Q,"labelpos"))switch(Q.labelpos.toLowerCase()){case"l":q=Q.width/2;break;case"r":q=-Q.width/2;break}if(q)J+=$?q:-q;return q=0,J}}function uV(u,f){return u.node(f).width}});var PA=o((AO,kA)=>{var yA=Eu(),fV=IA().positionX;kA.exports=$V;function $V(u){u=yA.asNonCompoundGraph(u),FV(u),Object.entries(fV(u)).forEach(([f,$])=>u.node(f).x=$)}function FV(u){let f=yA.buildLayerMatrix(u),$=u.graph().ranksep,F=0;f.forEach((l)=>{let U=l.reduce((_,Q)=>{let J=u.node(Q).height;if(_>J)return _;else return J},0);l.forEach((_)=>u.node(_).y=F+U/2),F+=U+$})}});var mA=o((WO,cA)=>{var rA=MT(),CA=VT(),lV=xT(),UV=Eu().normalizeRanks,_V=mT(),QV=Eu().removeEmptyRanks,hA=iT(),JV=tT(),vA=oT(),qV=RA(),TV=PA(),Gf=Eu(),AV=Lf().Graph;cA.exports=WV;function WV(u,f){let $=f&&f.debugTiming?Gf.time:Gf.notime;$("layout",()=>{let F=$(" buildLayoutGraph",()=>RV(u));$(" runLayout",()=>KV(F,$,f)),$(" updateInputGraph",()=>wV(u,F))})}function KV(u,f,$){f(" makeSpaceForEdgeLabels",()=>MV(u)),f(" removeSelfEdges",()=>IV(u)),f(" acyclic",()=>rA.run(u)),f(" nestingGraph.run",()=>hA.run(u)),f(" rank",()=>lV(Gf.asNonCompoundGraph(u))),f(" injectEdgeLabelProxies",()=>EV(u)),f(" removeEmptyRanks",()=>QV(u)),f(" nestingGraph.cleanup",()=>hA.cleanup(u)),f(" normalizeRanks",()=>UV(u)),f(" assignRankMinMax",()=>VV(u)),f(" removeEdgeLabelProxies",()=>XV(u)),f(" normalize.run",()=>CA.run(u)),f(" parentDummyChains",()=>_V(u)),f(" addBorderSegments",()=>JV(u)),f(" order",()=>qV(u,$)),f(" insertSelfEdges",()=>yV(u)),f(" adjustCoordinateSystem",()=>vA.adjust(u)),f(" position",()=>TV(u)),f(" positionSelfEdges",()=>kV(u)),f(" removeBorderNodes",()=>NV(u)),f(" normalize.undo",()=>CA.undo(u)),f(" fixupEdgeLabelCoords",()=>SV(u)),f(" undoCoordinateSystem",()=>vA.undo(u)),f(" translateGraph",()=>DV(u)),f(" assignNodeIntersects",()=>OV(u)),f(" reversePoints",()=>jV(u)),f(" acyclic.undo",()=>rA.undo(u))}function wV(u,f){u.nodes().forEach(($)=>{let F=u.node($),l=f.node($);if(F){if(F.x=l.x,F.y=l.y,F.rank=l.rank,f.children($).length)F.width=l.width,F.height=l.height}}),u.edges().forEach(($)=>{let F=u.edge($),l=f.edge($);if(F.points=l.points,Object.hasOwn(l,"x"))F.x=l.x,F.y=l.y}),u.graph().width=f.graph().width,u.graph().height=f.graph().height}var BV=["nodesep","edgesep","ranksep","marginx","marginy"],LV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},GV=["acyclicer","ranker","rankdir","align"],HV=["width","height","rank"],xA={width:0,height:0},zV=["minlen","weight","width","height","labeloffset"],ZV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},YV=["labelpos"];function RV(u){let f=new AV({multigraph:!0,compound:!0}),$=AF(u.graph());return f.setGraph(Object.assign({},LV,TF($,BV),Gf.pick($,GV))),u.nodes().forEach((F)=>{let l=AF(u.node(F)),U=TF(l,HV);Object.keys(xA).forEach((_)=>{if(U[_]===void 0)U[_]=xA[_]}),f.setNode(F,U),f.setParent(F,u.parent(F))}),u.edges().forEach((F)=>{let l=AF(u.edge(F));f.setEdge(F,Object.assign({},ZV,TF(l,zV),Gf.pick(l,YV)))}),f}function MV(u){let f=u.graph();f.ranksep/=2,u.edges().forEach(($)=>{let F=u.edge($);if(F.minlen*=2,F.labelpos.toLowerCase()!=="c")if(f.rankdir==="TB"||f.rankdir==="BT")F.width+=F.labeloffset;else F.height+=F.labeloffset})}function EV(u){u.edges().forEach((f)=>{let $=u.edge(f);if($.width&&$.height){let F=u.node(f.v),U={rank:(u.node(f.w).rank-F.rank)/2+F.rank,e:f};Gf.addDummyNode(u,"edge-proxy",U,"_ep")}})}function VV(u){let f=0;u.nodes().forEach(($)=>{let F=u.node($);if(F.borderTop)F.minRank=u.node(F.borderTop).rank,F.maxRank=u.node(F.borderBottom).rank,f=Math.max(f,F.maxRank)}),u.graph().maxRank=f}function XV(u){u.nodes().forEach((f)=>{let $=u.node(f);if($.dummy==="edge-proxy")u.edge($.e).labelRank=$.rank,u.removeNode(f)})}function DV(u){let f=Number.POSITIVE_INFINITY,$=0,F=Number.POSITIVE_INFINITY,l=0,U=u.graph(),_=U.marginx||0,Q=U.marginy||0;function J(q){let{x:T,y:W,width:A,height:K}=q;f=Math.min(f,T-A/2),$=Math.max($,T+A/2),F=Math.min(F,W-K/2),l=Math.max(l,W+K/2)}u.nodes().forEach((q)=>J(u.node(q))),u.edges().forEach((q)=>{let T=u.edge(q);if(Object.hasOwn(T,"x"))J(T)}),f-=_,F-=Q,u.nodes().forEach((q)=>{let T=u.node(q);T.x-=f,T.y-=F}),u.edges().forEach((q)=>{let T=u.edge(q);if(T.points.forEach((W)=>{W.x-=f,W.y-=F}),Object.hasOwn(T,"x"))T.x-=f;if(Object.hasOwn(T,"y"))T.y-=F}),U.width=$-f+_,U.height=l-F+Q}function OV(u){u.edges().forEach((f)=>{let $=u.edge(f),F=u.node(f.v),l=u.node(f.w),U,_;if(!$.points)$.points=[],U=l,_=F;else U=$.points[0],_=$.points[$.points.length-1];$.points.unshift(Gf.intersectRect(F,U)),$.points.push(Gf.intersectRect(l,_))})}function SV(u){u.edges().forEach((f)=>{let $=u.edge(f);if(Object.hasOwn($,"x")){if($.labelpos==="l"||$.labelpos==="r")$.width-=$.labeloffset;switch($.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}}})}function jV(u){u.edges().forEach((f)=>{let $=u.edge(f);if($.reversed)$.points.reverse()})}function NV(u){u.nodes().forEach((f)=>{if(u.children(f).length){let $=u.node(f),F=u.node($.borderTop),l=u.node($.borderBottom),U=u.node($.borderLeft[$.borderLeft.length-1]),_=u.node($.borderRight[$.borderRight.length-1]);$.width=Math.abs(_.x-U.x),$.height=Math.abs(l.y-F.y),$.x=U.x+$.width/2,$.y=F.y+$.height/2}}),u.nodes().forEach((f)=>{if(u.node(f).dummy==="border")u.removeNode(f)})}function IV(u){u.edges().forEach((f)=>{if(f.v===f.w){var $=u.node(f.v);if(!$.selfEdges)$.selfEdges=[];$.selfEdges.push({e:f,label:u.edge(f)}),u.removeEdge(f)}})}function yV(u){var f=Gf.buildLayerMatrix(u);f.forEach(($)=>{var F=0;$.forEach((l,U)=>{var _=u.node(l);_.order=U+F,(_.selfEdges||[]).forEach((Q)=>{Gf.addDummyNode(u,"selfedge",{width:Q.label.width,height:Q.label.height,rank:_.rank,order:U+ ++F,e:Q.e,label:Q.label},"_se")}),delete _.selfEdges})})}function kV(u){u.nodes().forEach((f)=>{var $=u.node(f);if($.dummy==="selfedge"){var F=u.node($.e.v),l=F.x+F.width/2,U=F.y,_=$.x-l,Q=F.height/2;u.setEdge($.e,$.label),u.removeNode(f),$.label.points=[{x:l+2*_/3,y:U-Q},{x:l+5*_/6,y:U-Q},{x:l+_,y:U},{x:l+5*_/6,y:U+Q},{x:l+2*_/3,y:U+Q}],$.label.x=$.x,$.label.y=$.y}})}function TF(u,f){return Gf.mapValues(Gf.pick(u,f),Number)}function AF(u){var f={};if(u)Object.entries(u).forEach(([$,F])=>{if(typeof $==="string")$=$.toLowerCase();f[$]=F});return f}});var bA=o((KO,pA)=>{var PV=Eu(),rV=Lf().Graph;pA.exports={debugOrdering:CV};function CV(u){let f=PV.buildLayerMatrix(u),$=new rV({compound:!0,multigraph:!0}).setGraph({});return u.nodes().forEach((F)=>{$.setNode(F,{label:F}),$.setParent(F,"layer"+u.node(F).rank)}),u.edges().forEach((F)=>$.setEdge(F.v,F.w,{},F.name)),f.forEach((F,l)=>{let U="layer"+l;$.setNode(U,{rank:"same"}),F.reduce((_,Q)=>{return $.setEdge(_,Q,{style:"invis"}),Q})}),$}});var gA=o((wO,iA)=>{iA.exports="1.1.8"});var tA=o((BO,sA)=>{sA.exports={graphlib:Lf(),layout:mA(),debug:bA(),util:{time:Eu().time,notime:Eu().notime},version:gA()}});var Qu=If(W0(),1),aA=If(d_(),1);var y=If(U6(),1),I=If(W0(),1);function Ru(u){if(typeof u==="string"||typeof u==="number")return""+u;let f="";if(Array.isArray(u)){for(let $=0,F;$<u.length;$++)if((F=Ru(u[$]))!=="")f+=(f&&" ")+F}else for(let $ in u)if(u[$])f+=(f&&" ")+$;return f}var IB={value:()=>{}};function Q1(){for(var u=0,f=arguments.length,$={},F;u<f;++u){if(!(F=arguments[u]+"")||F in $||/[\s.]/.test(F))throw Error("illegal type: "+F);$[F]=[]}return new _6($)}function _6(u){this._=u}function yB(u,f){return u.trim().split(/^|\s+/).map(function($){var F="",l=$.indexOf(".");if(l>=0)F=$.slice(l+1),$=$.slice(0,l);if($&&!f.hasOwnProperty($))throw Error("unknown type: "+$);return{type:$,name:F}})}_6.prototype=Q1.prototype={constructor:_6,on:function(u,f){var $=this._,F=yB(u+"",$),l,U=-1,_=F.length;if(arguments.length<2){while(++U<_)if((l=(u=F[U]).type)&&(l=kB($[l],u.name)))return l;return}if(f!=null&&typeof f!=="function")throw Error("invalid callback: "+f);while(++U<_)if(l=(u=F[U]).type)$[l]=u2($[l],u.name,f);else if(f==null)for(l in $)$[l]=u2($[l],u.name,null);return this},copy:function(){var u={},f=this._;for(var $ in f)u[$]=f[$].slice();return new _6(u)},call:function(u,f){if((l=arguments.length-2)>0)for(var $=Array(l),F=0,l,U;F<l;++F)$[F]=arguments[F+2];if(!this._.hasOwnProperty(u))throw Error("unknown type: "+u);for(U=this._[u],F=0,l=U.length;F<l;++F)U[F].value.apply(f,$)},apply:function(u,f,$){if(!this._.hasOwnProperty(u))throw Error("unknown type: "+u);for(var F=this._[u],l=0,U=F.length;l<U;++l)F[l].value.apply(f,$)}};function kB(u,f){for(var $=0,F=u.length,l;$<F;++$)if((l=u[$]).name===f)return l.value}function u2(u,f,$){for(var F=0,l=u.length;F<l;++F)if(u[F].name===f){u[F]=IB,u=u.slice(0,F).concat(u.slice(F+1));break}if($!=null)u.push({name:f,value:$});return u}var I7="http://www.w3.org/1999/xhtml",f2={svg:"http://www.w3.org/2000/svg",xhtml:I7,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function w3(u){var f=u+="",$=f.indexOf(":");if($>=0&&(f=u.slice(0,$))!=="xmlns")u=u.slice($+1);return f2.hasOwnProperty(f)?{space:f2[f],local:u}:u}function PB(u){return function(){var f=this.ownerDocument,$=this.namespaceURI;return $===I7&&f.documentElement.namespaceURI===I7?f.createElement(u):f.createElementNS($,u)}}function rB(u){return function(){return this.ownerDocument.createElementNS(u.space,u.local)}}function $2(u){var f=w3(u);return(f.local?rB:PB)(f)}function CB(){}function J6(u){return u==null?CB:function(){return this.querySelector(u)}}function hB(u){if(typeof u!=="function")u=J6(u);for(var f=this._groups,$=f.length,F=Array($),l=0;l<$;++l)for(var U=f[l],_=U.length,Q=F[l]=Array(_),J,q,T=0;T<_;++T)if((J=U[T])&&(q=u.call(J,J.__data__,T,U))){if("__data__"in J)q.__data__=J.__data__;Q[T]=q}return new lf(F,this._parents)}function vB(u){return u==null?[]:Array.isArray(u)?u:Array.from(u)}function xB(){return[]}function k7(u){return u==null?xB:function(){return this.querySelectorAll(u)}}function cB(u){return function(){return vB(u.apply(this,arguments))}}function mB(u){if(typeof u==="function")u=cB(u);else u=k7(u);for(var f=this._groups,$=f.length,F=[],l=[],U=0;U<$;++U)for(var _=f[U],Q=_.length,J,q=0;q<Q;++q)if(J=_[q])F.push(u.call(J,J.__data__,q,_)),l.push(J);return new lf(F,l)}function P7(u){return function(){return this.matches(u)}}function F2(u){return function(f){return f.matches(u)}}var pB=Array.prototype.find;function bB(u){return function(){return pB.call(this.children,u)}}function iB(){return this.firstElementChild}function gB(u){return this.select(u==null?iB:bB(typeof u==="function"?u:F2(u)))}var sB=Array.prototype.filter;function tB(){return Array.from(this.children)}function nB(u){return function(){return sB.call(this.children,u)}}function dB(u){return this.selectAll(u==null?tB:nB(typeof u==="function"?u:F2(u)))}function aB(u){if(typeof u!=="function")u=P7(u);for(var f=this._groups,$=f.length,F=Array($),l=0;l<$;++l)for(var U=f[l],_=U.length,Q=F[l]=[],J,q=0;q<_;++q)if((J=U[q])&&u.call(J,J.__data__,q,U))Q.push(J);return new lf(F,this._parents)}function l2(u){return Array(u.length)}function oB(){return new lf(this._enter||this._groups.map(l2),this._parents)}function Q6(u,f){this.ownerDocument=u.ownerDocument,this.namespaceURI=u.namespaceURI,this._next=null,this._parent=u,this.__data__=f}Q6.prototype={constructor:Q6,appendChild:function(u){return this._parent.insertBefore(u,this._next)},insertBefore:function(u,f){return this._parent.insertBefore(u,f)},querySelector:function(u){return this._parent.querySelector(u)},querySelectorAll:function(u){return this._parent.querySelectorAll(u)}};function eB(u){return function(){return u}}function uL(u,f,$,F,l,U){var _=0,Q,J=f.length,q=U.length;for(;_<q;++_)if(Q=f[_])Q.__data__=U[_],F[_]=Q;else $[_]=new Q6(u,U[_]);for(;_<J;++_)if(Q=f[_])l[_]=Q}function fL(u,f,$,F,l,U,_){var Q,J,q=new Map,T=f.length,W=U.length,A=Array(T),K;for(Q=0;Q<T;++Q)if(J=f[Q])if(A[Q]=K=_.call(J,J.__data__,Q,f)+"",q.has(K))l[Q]=J;else q.set(K,J);for(Q=0;Q<W;++Q)if(K=_.call(u,U[Q],Q,U)+"",J=q.get(K))F[Q]=J,J.__data__=U[Q],q.delete(K);else $[Q]=new Q6(u,U[Q]);for(Q=0;Q<T;++Q)if((J=f[Q])&&q.get(A[Q])===J)l[Q]=J}function $L(u){return u.__data__}function FL(u,f){if(!arguments.length)return Array.from(this,$L);var $=f?fL:uL,F=this._parents,l=this._groups;if(typeof u!=="function")u=eB(u);for(var U=l.length,_=Array(U),Q=Array(U),J=Array(U),q=0;q<U;++q){var T=F[q],W=l[q],A=W.length,K=lL(u.call(T,T&&T.__data__,q,F)),L=K.length,z=Q[q]=Array(L),Z=_[q]=Array(L),B=J[q]=Array(A);$(T,W,z,Z,B,K,f);for(var G=0,w=0,H,M;G<L;++G)if(H=z[G]){if(G>=w)w=G+1;while(!(M=Z[w])&&++w<L);H._next=M||null}}return _=new lf(_,F),_._enter=Q,_._exit=J,_}function lL(u){return typeof u==="object"&&"length"in u?u:Array.from(u)}function UL(){return new lf(this._exit||this._groups.map(l2),this._parents)}function _L(u,f,$){var F=this.enter(),l=this,U=this.exit();if(typeof u==="function"){if(F=u(F),F)F=F.selection()}else F=F.append(u+"");if(f!=null){if(l=f(l),l)l=l.selection()}if($==null)U.remove();else $(U);return F&&l?F.merge(l).order():l}function QL(u){var f=u.selection?u.selection():u;for(var $=this._groups,F=f._groups,l=$.length,U=F.length,_=Math.min(l,U),Q=Array(l),J=0;J<_;++J)for(var q=$[J],T=F[J],W=q.length,A=Q[J]=Array(W),K,L=0;L<W;++L)if(K=q[L]||T[L])A[L]=K;for(;J<l;++J)Q[J]=$[J];return new lf(Q,this._parents)}function JL(){for(var u=this._groups,f=-1,$=u.length;++f<$;)for(var F=u[f],l=F.length-1,U=F[l],_;--l>=0;)if(_=F[l]){if(U&&_.compareDocumentPosition(U)^4)U.parentNode.insertBefore(_,U);U=_}return this}function qL(u){if(!u)u=TL;function f(W,A){return W&&A?u(W.__data__,A.__data__):!W-!A}for(var $=this._groups,F=$.length,l=Array(F),U=0;U<F;++U){for(var _=$[U],Q=_.length,J=l[U]=Array(Q),q,T=0;T<Q;++T)if(q=_[T])J[T]=q;J.sort(f)}return new lf(l,this._parents).order()}function TL(u,f){return u<f?-1:u>f?1:u>=f?0:NaN}function AL(){var u=arguments[0];return arguments[0]=this,u.apply(null,arguments),this}function WL(){return Array.from(this)}function KL(){for(var u=this._groups,f=0,$=u.length;f<$;++f)for(var F=u[f],l=0,U=F.length;l<U;++l){var _=F[l];if(_)return _}return null}function wL(){let u=0;for(let f of this)++u;return u}function BL(){return!this.node()}function LL(u){for(var f=this._groups,$=0,F=f.length;$<F;++$)for(var l=f[$],U=0,_=l.length,Q;U<_;++U)if(Q=l[U])u.call(Q,Q.__data__,U,l);return this}function GL(u){return function(){this.removeAttribute(u)}}function HL(u){return function(){this.removeAttributeNS(u.space,u.local)}}function zL(u,f){return function(){this.setAttribute(u,f)}}function ZL(u,f){return function(){this.setAttributeNS(u.space,u.local,f)}}function YL(u,f){return function(){var $=f.apply(this,arguments);if($==null)this.removeAttribute(u);else this.setAttribute(u,$)}}function RL(u,f){return function(){var $=f.apply(this,arguments);if($==null)this.removeAttributeNS(u.space,u.local);else this.setAttributeNS(u.space,u.local,$)}}function ML(u,f){var $=w3(u);if(arguments.length<2){var F=this.node();return $.local?F.getAttributeNS($.space,$.local):F.getAttribute($)}return this.each((f==null?$.local?HL:GL:typeof f==="function"?$.local?RL:YL:$.local?ZL:zL)($,f))}function U2(u){return u.ownerDocument&&u.ownerDocument.defaultView||u.document&&u||u.defaultView}function EL(u){return function(){this.style.removeProperty(u)}}function VL(u,f,$){return function(){this.style.setProperty(u,f,$)}}function XL(u,f,$){return function(){var F=f.apply(this,arguments);if(F==null)this.style.removeProperty(u);else this.style.setProperty(u,F,$)}}function DL(u,f,$){return arguments.length>1?this.each((f==null?EL:typeof f==="function"?XL:VL)(u,f,$==null?"":$)):J1(this.node(),u)}function J1(u,f){return u.style.getPropertyValue(f)||U2(u).getComputedStyle(u,null).getPropertyValue(f)}function OL(u){return function(){delete this[u]}}function SL(u,f){return function(){this[u]=f}}function jL(u,f){return function(){var $=f.apply(this,arguments);if($==null)delete this[u];else this[u]=$}}function NL(u,f){return arguments.length>1?this.each((f==null?OL:typeof f==="function"?jL:SL)(u,f)):this.node()[u]}function _2(u){return u.trim().split(/^|\s+/)}function r7(u){return u.classList||new Q2(u)}function Q2(u){this._node=u,this._names=_2(u.getAttribute("class")||"")}Q2.prototype={add:function(u){var f=this._names.indexOf(u);if(f<0)this._names.push(u),this._node.setAttribute("class",this._names.join(" "))},remove:function(u){var f=this._names.indexOf(u);if(f>=0)this._names.splice(f,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(u){return this._names.indexOf(u)>=0}};function J2(u,f){var $=r7(u),F=-1,l=f.length;while(++F<l)$.add(f[F])}function q2(u,f){var $=r7(u),F=-1,l=f.length;while(++F<l)$.remove(f[F])}function IL(u){return function(){J2(this,u)}}function yL(u){return function(){q2(this,u)}}function kL(u,f){return function(){(f.apply(this,arguments)?J2:q2)(this,u)}}function PL(u,f){var $=_2(u+"");if(arguments.length<2){var F=r7(this.node()),l=-1,U=$.length;while(++l<U)if(!F.contains($[l]))return!1;return!0}return this.each((typeof f==="function"?kL:f?IL:yL)($,f))}function rL(){this.textContent=""}function CL(u){return function(){this.textContent=u}}function hL(u){return function(){var f=u.apply(this,arguments);this.textContent=f==null?"":f}}function vL(u){return arguments.length?this.each(u==null?rL:(typeof u==="function"?hL:CL)(u)):this.node().textContent}function xL(){this.innerHTML=""}function cL(u){return function(){this.innerHTML=u}}function mL(u){return function(){var f=u.apply(this,arguments);this.innerHTML=f==null?"":f}}function pL(u){return arguments.length?this.each(u==null?xL:(typeof u==="function"?mL:cL)(u)):this.node().innerHTML}function bL(){if(this.nextSibling)this.parentNode.appendChild(this)}function iL(){return this.each(bL)}function gL(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function sL(){return this.each(gL)}function tL(u){var f=typeof u==="function"?u:$2(u);return this.select(function(){return this.appendChild(f.apply(this,arguments))})}function nL(){return null}function dL(u,f){var $=typeof u==="function"?u:$2(u),F=f==null?nL:typeof f==="function"?f:J6(f);return this.select(function(){return this.insertBefore($.apply(this,arguments),F.apply(this,arguments)||null)})}function aL(){var u=this.parentNode;if(u)u.removeChild(this)}function oL(){return this.each(aL)}function eL(){var u=this.cloneNode(!1),f=this.parentNode;return f?f.insertBefore(u,this.nextSibling):u}function uG(){var u=this.cloneNode(!0),f=this.parentNode;return f?f.insertBefore(u,this.nextSibling):u}function fG(u){return this.select(u?uG:eL)}function $G(u){return arguments.length?this.property("__data__",u):this.node().__data__}function FG(u){return function(f){u.call(this,f,this.__data__)}}function lG(u){return u.trim().split(/^|\s+/).map(function(f){var $="",F=f.indexOf(".");if(F>=0)$=f.slice(F+1),f=f.slice(0,F);return{type:f,name:$}})}function UG(u){return function(){var f=this.__on;if(!f)return;for(var $=0,F=-1,l=f.length,U;$<l;++$)if(U=f[$],(!u.type||U.type===u.type)&&U.name===u.name)this.removeEventListener(U.type,U.listener,U.options);else f[++F]=U;if(++F)f.length=F;else delete this.__on}}function _G(u,f,$){return function(){var F=this.__on,l,U=FG(f);if(F){for(var _=0,Q=F.length;_<Q;++_)if((l=F[_]).type===u.type&&l.name===u.name){this.removeEventListener(l.type,l.listener,l.options),this.addEventListener(l.type,l.listener=U,l.options=$),l.value=f;return}}if(this.addEventListener(u.type,U,$),l={type:u.type,name:u.name,value:f,listener:U,options:$},!F)this.__on=[l];else F.push(l)}}function QG(u,f,$){var F=lG(u+""),l,U=F.length,_;if(arguments.length<2){var Q=this.node().__on;if(Q){for(var J=0,q=Q.length,T;J<q;++J)for(l=0,T=Q[J];l<U;++l)if((_=F[l]).type===T.type&&_.name===T.name)return T.value}return}Q=f?_G:UG;for(l=0;l<U;++l)this.each(Q(F[l],f,$));return this}function T2(u,f,$){var F=U2(u),l=F.CustomEvent;if(typeof l==="function")l=new l(f,$);else if(l=F.document.createEvent("Event"),$)l.initEvent(f,$.bubbles,$.cancelable),l.detail=$.detail;else l.initEvent(f,!1,!1);u.dispatchEvent(l)}function JG(u,f){return function(){return T2(this,u,f)}}function qG(u,f){return function(){return T2(this,u,f.apply(this,arguments))}}function TG(u,f){return this.each((typeof f==="function"?qG:JG)(u,f))}function*AG(){for(var u=this._groups,f=0,$=u.length;f<$;++f)for(var F=u[f],l=0,U=F.length,_;l<U;++l)if(_=F[l])yield _}var A2=[null];function lf(u,f){this._groups=u,this._parents=f}function q1(){return new lf([[document.documentElement]],A2)}function WG(){return this}lf.prototype=q1.prototype={constructor:lf,select:hB,selectAll:mB,selectChild:gB,selectChildren:dB,filter:aB,data:FL,enter:oB,exit:UL,join:_L,merge:QL,selection:WG,order:JL,sort:qL,call:AL,nodes:WL,node:KL,size:wL,empty:BL,each:LL,attr:ML,style:DL,property:NL,classed:PL,text:vL,html:pL,raise:iL,lower:sL,append:tL,insert:dL,remove:oL,clone:fG,datum:$G,on:QG,dispatch:TG,[Symbol.iterator]:AG};function xu(u){return typeof u==="string"?new lf([[document.querySelector(u)]],[document.documentElement]):new lf([[u]],A2)}var KG=0;function wG(){return new y7}function y7(){this._="@"+(++KG).toString(36)}y7.prototype=wG.prototype={constructor:y7,get:function(u){var f=this._;while(!(f in u))if(!(u=u.parentNode))return;return u[f]},set:function(u,f){return u[this._]=f},remove:function(u){return this._ in u&&delete u[this._]},toString:function(){return this._}};function BG(u){let f;while(f=u.sourceEvent)u=f;return u}function du(u,f){if(u=BG(u),f===void 0)f=u.currentTarget;if(f){var $=f.ownerSVGElement||f;if($.createSVGPoint){var F=$.createSVGPoint();return F.x=u.clientX,F.y=u.clientY,F=F.matrixTransform(f.getScreenCTM().inverse()),[F.x,F.y]}if(f.getBoundingClientRect){var l=f.getBoundingClientRect();return[u.clientX-l.left-f.clientLeft,u.clientY-l.top-f.clientTop]}}return[u.pageX,u.pageY]}var LG={passive:!1},B3={capture:!0,passive:!1};function C7(u){u.stopImmediatePropagation()}function e1(u){u.preventDefault(),u.stopImmediatePropagation()}function v7(u){var f=u.document.documentElement,$=xu(u).on("dragstart.drag",e1,B3);if("onselectstart"in f)$.on("selectstart.drag",e1,B3);else f.__noselect=f.style.MozUserSelect,f.style.MozUserSelect="none"}function x7(u,f){var $=u.document.documentElement,F=xu(u).on("dragstart.drag",null);if(f)F.on("click.drag",e1,B3),setTimeout(function(){F.on("click.drag",null)},0);if("onselectstart"in $)F.on("selectstart.drag",null);else $.style.MozUserSelect=$.__noselect,delete $.__noselect}var q6=(u)=>()=>u;function h7(u,{sourceEvent:f,subject:$,target:F,identifier:l,active:U,x:_,y:Q,dx:J,dy:q,dispatch:T}){Object.defineProperties(this,{type:{value:u,enumerable:!0,configurable:!0},sourceEvent:{value:f,enumerable:!0,configurable:!0},subject:{value:$,enumerable:!0,configurable:!0},target:{value:F,enumerable:!0,configurable:!0},identifier:{value:l,enumerable:!0,configurable:!0},active:{value:U,enumerable:!0,configurable:!0},x:{value:_,enumerable:!0,configurable:!0},y:{value:Q,enumerable:!0,configurable:!0},dx:{value:J,enumerable:!0,configurable:!0},dy:{value:q,enumerable:!0,configurable:!0},_:{value:T}})}h7.prototype.on=function(){var u=this._.on.apply(this._,arguments);return u===this._?this:u};function GG(u){return!u.ctrlKey&&!u.button}function HG(){return this.parentNode}function zG(u,f){return f==null?{x:u.x,y:u.y}:f}function ZG(){return navigator.maxTouchPoints||"ontouchstart"in this}function c7(){var u=GG,f=HG,$=zG,F=ZG,l={},U=Q1("start","drag","end"),_=0,Q,J,q,T,W=0;function A(H){H.on("mousedown.drag",K).filter(F).on("touchstart.drag",Z).on("touchmove.drag",B,LG).on("touchend.drag touchcancel.drag",G).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function K(H,M){if(T||!u.call(this,H,M))return;var R=w(this,f.call(this,H,M),H,M,"mouse");if(!R)return;xu(H.view).on("mousemove.drag",L,B3).on("mouseup.drag",z,B3),v7(H.view),C7(H),q=!1,Q=H.clientX,J=H.clientY,R("start",H)}function L(H){if(e1(H),!q){var M=H.clientX-Q,R=H.clientY-J;q=M*M+R*R>W}l.mouse("drag",H)}function z(H){xu(H.view).on("mousemove.drag mouseup.drag",null),x7(H.view,q),e1(H),l.mouse("end",H)}function Z(H,M){if(!u.call(this,H,M))return;var R=H.changedTouches,E=f.call(this,H,M),V=R.length,D,r;for(D=0;D<V;++D)if(r=w(this,E,H,M,R[D].identifier,R[D]))C7(H),r("start",H,R[D])}function B(H){var M=H.changedTouches,R=M.length,E,V;for(E=0;E<R;++E)if(V=l[M[E].identifier])e1(H),V("drag",H,M[E])}function G(H){var M=H.changedTouches,R=M.length,E,V;if(T)clearTimeout(T);T=setTimeout(function(){T=null},500);for(E=0;E<R;++E)if(V=l[M[E].identifier])C7(H),V("end",H,M[E])}function w(H,M,R,E,V,D){var r=U.copy(),C=du(D||R,M),m,v,Y;if((Y=$.call(H,new h7("beforestart",{sourceEvent:R,target:A,identifier:V,active:_,x:C[0],y:C[1],dx:0,dy:0,dispatch:r}),E))==null)return;return m=Y.x-C[0]||0,v=Y.y-C[1]||0,function X(O,j,k){var P=C,c;switch(O){case"start":l[V]=X,c=_++;break;case"end":delete l[V],--_;case"drag":C=du(k||j,M),c=_;break}r.call(O,H,new h7(O,{sourceEvent:j,subject:Y,target:A,identifier:V,active:c,x:C[0]+m,y:C[1]+v,dx:C[0]-P[0],dy:C[1]-P[1],dispatch:r}),E)}}return A.filter=function(H){return arguments.length?(u=typeof H==="function"?H:q6(!!H),A):u},A.container=function(H){return arguments.length?(f=typeof H==="function"?H:q6(H),A):f},A.subject=function(H){return arguments.length?($=typeof H==="function"?H:q6(H),A):$},A.touchable=function(H){return arguments.length?(F=typeof H==="function"?H:q6(!!H),A):F},A.on=function(){var H=U.on.apply(U,arguments);return H===U?A:H},A.clickDistance=function(H){return arguments.length?(W=(H=+H)*H,A):Math.sqrt(W)},A}function F4(u,f,$){u.prototype=f.prototype=$,$.constructor=u}function H3(u,f){var $=Object.create(u.prototype);for(var F in f)$[F]=f[F];return $}function k0(){}var K1=0.7,$4=1/K1,u4="\\s*([+-]?\\d+)\\s*",L3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",YG=/^#([0-9a-f]{3,8})$/,RG=new RegExp(`^rgb\\(${u4},${u4},${u4}\\)$`),MG=new RegExp(`^rgb\\(${vf},${vf},${vf}\\)$`),EG=new RegExp(`^rgba\\(${u4},${u4},${u4},${L3}\\)$`),VG=new RegExp(`^rgba\\(${vf},${vf},${vf},${L3}\\)$`),XG=new RegExp(`^hsl\\(${L3},${vf},${vf}\\)$`),DG=new RegExp(`^hsla\\(${L3},${vf},${vf},${L3}\\)$`),W2={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};F4(k0,_0,{copy(u){return Object.assign(new this.constructor,this,u)},displayable(){return this.rgb().displayable()},hex:K2,formatHex:K2,formatHex8:OG,formatHsl:SG,formatRgb:w2,toString:w2});function K2(){return this.rgb().formatHex()}function OG(){return this.rgb().formatHex8()}function SG(){return M2(this).formatHsl()}function w2(){return this.rgb().formatRgb()}function _0(u){var f,$;return u=(u+"").trim().toLowerCase(),(f=YG.exec(u))?($=f[1].length,f=parseInt(f[1],16),$===6?B2(f):$===3?new ju(f>>8&15|f>>4&240,f>>4&15|f&240,(f&15)<<4|f&15,1):$===8?T6(f>>24&255,f>>16&255,f>>8&255,(f&255)/255):$===4?T6(f>>12&15|f>>8&240,f>>8&15|f>>4&240,f>>4&15|f&240,((f&15)<<4|f&15)/255):null):(f=RG.exec(u))?new ju(f[1],f[2],f[3],1):(f=MG.exec(u))?new ju(f[1]*255/100,f[2]*255/100,f[3]*255/100,1):(f=EG.exec(u))?T6(f[1],f[2],f[3],f[4]):(f=VG.exec(u))?T6(f[1]*255/100,f[2]*255/100,f[3]*255/100,f[4]):(f=XG.exec(u))?H2(f[1],f[2]/100,f[3]/100,1):(f=DG.exec(u))?H2(f[1],f[2]/100,f[3]/100,f[4]):W2.hasOwnProperty(u)?B2(W2[u]):u==="transparent"?new ju(NaN,NaN,NaN,0):null}function B2(u){return new ju(u>>16&255,u>>8&255,u&255,1)}function T6(u,f,$,F){if(F<=0)u=f=$=NaN;return new ju(u,f,$,F)}function s7(u){if(!(u instanceof k0))u=_0(u);if(!u)return new ju;return u=u.rgb(),new ju(u.r,u.g,u.b,u.opacity)}function z3(u,f,$,F){return arguments.length===1?s7(u):new ju(u,f,$,F==null?1:F)}function ju(u,f,$,F){this.r=+u,this.g=+f,this.b=+$,this.opacity=+F}F4(ju,z3,H3(k0,{brighter(u){return u=u==null?$4:Math.pow($4,u),new ju(this.r*u,this.g*u,this.b*u,this.opacity)},darker(u){return u=u==null?K1:Math.pow(K1,u),new ju(this.r*u,this.g*u,this.b*u,this.opacity)},rgb(){return this},clamp(){return new ju(A1(this.r),A1(this.g),A1(this.b),W6(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:L2,formatHex:L2,formatHex8:jG,formatRgb:G2,toString:G2}));function L2(){return`#${T1(this.r)}${T1(this.g)}${T1(this.b)}`}function jG(){return`#${T1(this.r)}${T1(this.g)}${T1(this.b)}${T1((isNaN(this.opacity)?1:this.opacity)*255)}`}function G2(){let u=W6(this.opacity);return`${u===1?"rgb(":"rgba("}${A1(this.r)}, ${A1(this.g)}, ${A1(this.b)}${u===1?")":`, ${u})`}`}function W6(u){return isNaN(u)?1:Math.max(0,Math.min(1,u))}function A1(u){return Math.max(0,Math.min(255,Math.round(u)||0))}function T1(u){return u=A1(u),(u<16?"0":"")+u.toString(16)}function H2(u,f,$,F){if(F<=0)u=f=$=NaN;else if($<=0||$>=1)u=f=NaN;else if(f<=0)u=NaN;return new Df(u,f,$,F)}function M2(u){if(u instanceof Df)return new Df(u.h,u.s,u.l,u.opacity);if(!(u instanceof k0))u=_0(u);if(!u)return new Df;if(u instanceof Df)return u;u=u.rgb();var f=u.r/255,$=u.g/255,F=u.b/255,l=Math.min(f,$,F),U=Math.max(f,$,F),_=NaN,Q=U-l,J=(U+l)/2;if(Q){if(f===U)_=($-F)/Q+($<F)*6;else if($===U)_=(F-f)/Q+2;else _=(f-$)/Q+4;Q/=J<0.5?U+l:2-U-l,_*=60}else Q=J>0&&J<1?0:_;return new Df(_,Q,J,u.opacity)}function w6(u,f,$,F){return arguments.length===1?M2(u):new Df(u,f,$,F==null?1:F)}function Df(u,f,$,F){this.h=+u,this.s=+f,this.l=+$,this.opacity=+F}F4(Df,w6,H3(k0,{brighter(u){return u=u==null?$4:Math.pow($4,u),new Df(this.h,this.s,this.l*u,this.opacity)},darker(u){return u=u==null?K1:Math.pow(K1,u),new Df(this.h,this.s,this.l*u,this.opacity)},rgb(){var u=this.h%360+(this.h<0)*360,f=isNaN(u)||isNaN(this.s)?0:this.s,$=this.l,F=$+($<0.5?$:1-$)*f,l=2*$-F;return new ju(m7(u>=240?u-240:u+120,l,F),m7(u,l,F),m7(u<120?u+240:u-120,l,F),this.opacity)},clamp(){return new Df(z2(this.h),A6(this.s),A6(this.l),W6(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(){let u=W6(this.opacity);return`${u===1?"hsl(":"hsla("}${z2(this.h)}, ${A6(this.s)*100}%, ${A6(this.l)*100}%${u===1?")":`, ${u})`}`}}));function z2(u){return u=(u||0)%360,u<0?u+360:u}function A6(u){return Math.max(0,Math.min(1,u||0))}function m7(u,f,$){return(u<60?f+($-f)*u/60:u<180?$:u<240?f+($-f)*(240-u)/60:f)*255}var E2=Math.PI/180,V2=180/Math.PI,K6=18,X2=0.96422,D2=1,O2=0.82521,S2=0.13793103448275862,f4=0.20689655172413793,j2=3*f4*f4,NG=f4*f4*f4;function N2(u){if(u instanceof xf)return new xf(u.l,u.a,u.b,u.opacity);if(u instanceof U0)return y2(u);if(!(u instanceof ju))u=s7(u);var f=g7(u.r),$=g7(u.g),F=g7(u.b),l=p7((0.2225045*f+0.7168786*$+0.0606169*F)/D2),U,_;if(f===$&&$===F)U=_=l;else U=p7((0.4360747*f+0.3850649*$+0.1430804*F)/X2),_=p7((0.0139322*f+0.0971045*$+0.7141733*F)/O2);return new xf(116*l-16,500*(U-l),200*(l-_),u.opacity)}function I2(u,f,$,F){return arguments.length===1?N2(u):new xf(u,f,$,F==null?1:F)}function xf(u,f,$,F){this.l=+u,this.a=+f,this.b=+$,this.opacity=+F}F4(xf,I2,H3(k0,{brighter(u){return new xf(this.l+K6*(u==null?1:u),this.a,this.b,this.opacity)},darker(u){return new xf(this.l-K6*(u==null?1:u),this.a,this.b,this.opacity)},rgb(){var u=(this.l+16)/116,f=isNaN(this.a)?u:u+this.a/500,$=isNaN(this.b)?u:u-this.b/200;return f=X2*b7(f),u=D2*b7(u),$=O2*b7($),new ju(i7(3.1338561*f-1.6168667*u-0.4906146*$),i7(-0.9787684*f+1.9161415*u+0.033454*$),i7(0.0719453*f-0.2289914*u+1.4052427*$),this.opacity)}}));function p7(u){return u>NG?Math.pow(u,0.3333333333333333):u/j2+S2}function b7(u){return u>f4?u*u*u:j2*(u-S2)}function i7(u){return 255*(u<=0.0031308?12.92*u:1.055*Math.pow(u,0.4166666666666667)-0.055)}function g7(u){return(u/=255)<=0.04045?u/12.92:Math.pow((u+0.055)/1.055,2.4)}function IG(u){if(u instanceof U0)return new U0(u.h,u.c,u.l,u.opacity);if(!(u instanceof xf))u=N2(u);if(u.a===0&&u.b===0)return new U0(NaN,0<u.l&&u.l<100?0:NaN,u.l,u.opacity);var f=Math.atan2(u.b,u.a)*V2;return new U0(f<0?f+360:f,Math.sqrt(u.a*u.a+u.b*u.b),u.l,u.opacity)}function B6(u,f,$,F){return arguments.length===1?IG(u):new U0(u,f,$,F==null?1:F)}function U0(u,f,$,F){this.h=+u,this.c=+f,this.l=+$,this.opacity=+F}function y2(u){if(isNaN(u.h))return new xf(u.l,0,0,u.opacity);var f=u.h*E2;return new xf(u.l,Math.cos(f)*u.c,Math.sin(f)*u.c,u.opacity)}F4(U0,B6,H3(k0,{brighter(u){return new U0(this.h,this.c,this.l+K6*(u==null?1:u),this.opacity)},darker(u){return new U0(this.h,this.c,this.l-K6*(u==null?1:u),this.opacity)},rgb(){return y2(this).rgb()}}));var k2=-0.14861,t7=1.78277,n7=-0.29227,L6=-0.90649,G3=1.97294,Z2=G3*L6,Y2=G3*t7,R2=t7*n7-L6*k2;function yG(u){if(u instanceof W1)return new W1(u.h,u.s,u.l,u.opacity);if(!(u instanceof ju))u=s7(u);var f=u.r/255,$=u.g/255,F=u.b/255,l=(R2*F+Z2*f-Y2*$)/(R2+Z2-Y2),U=F-l,_=(G3*($-l)-n7*U)/L6,Q=Math.sqrt(_*_+U*U)/(G3*l*(1-l)),J=Q?Math.atan2(_,U)*V2-120:NaN;return new W1(J<0?J+360:J,Q,l,u.opacity)}function G6(u,f,$,F){return arguments.length===1?yG(u):new W1(u,f,$,F==null?1:F)}function W1(u,f,$,F){this.h=+u,this.s=+f,this.l=+$,this.opacity=+F}F4(W1,G6,H3(k0,{brighter(u){return u=u==null?$4:Math.pow($4,u),new W1(this.h,this.s,this.l*u,this.opacity)},darker(u){return u=u==null?K1:Math.pow(K1,u),new W1(this.h,this.s,this.l*u,this.opacity)},rgb(){var u=isNaN(this.h)?0:(this.h+120)*E2,f=+this.l,$=isNaN(this.s)?0:this.s*f*(1-f),F=Math.cos(u),l=Math.sin(u);return new ju(255*(f+$*(k2*F+t7*l)),255*(f+$*(n7*F+L6*l)),255*(f+$*(G3*F)),this.opacity)}}));function C2(u,f,$,F,l){var U=u*u,_=U*u;return((1-3*u+3*U-_)*f+(4-6*U+3*_)*$+(1+3*u+3*U-3*_)*F+_*l)/6}function kG(u){var f=u.length-1;return function($){var F=$<=0?$=0:$>=1?($=1,f-1):Math.floor($*f),l=u[F],U=u[F+1],_=F>0?u[F-1]:2*l-U,Q=F<f-1?u[F+2]:2*U-l;return C2(($-F/f)*f,_,l,U,Q)}}function PG(u){var f=u.length;return function($){var F=Math.floor((($%=1)<0?++$:$)*f),l=u[(F+f-1)%f],U=u[F%f],_=u[(F+1)%f],Q=u[(F+2)%f];return C2(($-F/f)*f,l,U,_,Q)}}var z6=(u)=>()=>u;function h2(u,f){return function($){return u+$*f}}function rG(u,f,$){return u=Math.pow(u,$),f=Math.pow(f,$)-u,$=1/$,function(F){return Math.pow(u+F*f,$)}}function e7(u,f){var $=f-u;return $?h2(u,$>180||$<-180?$-360*Math.round($/360):$):z6(isNaN(u)?f:u)}function CG(u){return(u=+u)===1?au:function(f,$){return $-f?rG(f,$,u):z6(isNaN(f)?$:f)}}function au(u,f){var $=f-u;return $?h2(u,$):z6(isNaN(u)?f:u)}var Z3=function u(f){var $=CG(f);function F(l,U){var _=$((l=z3(l)).r,(U=z3(U)).r),Q=$(l.g,U.g),J=$(l.b,U.b),q=au(l.opacity,U.opacity);return function(T){return l.r=_(T),l.g=Q(T),l.b=J(T),l.opacity=q(T),l+""}}return F.gamma=u,F}(1);function v2(u){return function(f){var $=f.length,F=Array($),l=Array($),U=Array($),_,Q;for(_=0;_<$;++_)Q=z3(f[_]),F[_]=Q.r||0,l[_]=Q.g||0,U[_]=Q.b||0;return F=u(F),l=u(l),U=u(U),Q.opacity=1,function(J){return Q.r=F(J),Q.g=l(J),Q.b=U(J),Q+""}}}var TX=v2(kG),AX=v2(PG);function hG(u,f){if(!f)f=[];var $=u?Math.min(f.length,u.length):0,F=f.slice(),l;return function(U){for(l=0;l<$;++l)F[l]=u[l]*(1-U)+f[l]*U;return F}}function vG(u){return ArrayBuffer.isView(u)&&!(u instanceof DataView)}function xG(u,f){var $=f?f.length:0,F=u?Math.min($,u.length):0,l=Array(F),U=Array($),_;for(_=0;_<F;++_)l[_]=l4(u[_],f[_]);for(;_<$;++_)U[_]=f[_];return function(Q){for(_=0;_<F;++_)U[_]=l[_](Q);return U}}function cG(u,f){var $=new Date;return u=+u,f=+f,function(F){return $.setTime(u*(1-F)+f*F),$}}function Of(u,f){return u=+u,f=+f,function($){return u*(1-$)+f*$}}function mG(u,f){var $={},F={},l;if(u===null||typeof u!=="object")u={};if(f===null||typeof f!=="object")f={};for(l in f)if(l in u)$[l]=l4(u[l],f[l]);else F[l]=f[l];return function(U){for(l in $)F[l]=$[l](U);return F}}var a7=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,d7=new RegExp(a7.source,"g");function pG(u){return function(){return u}}function bG(u){return function(f){return u(f)+""}}function u$(u,f){var $=a7.lastIndex=d7.lastIndex=0,F,l,U,_=-1,Q=[],J=[];u=u+"",f=f+"";while((F=a7.exec(u))&&(l=d7.exec(f))){if((U=l.index)>$)if(U=f.slice($,U),Q[_])Q[_]+=U;else Q[++_]=U;if((F=F[0])===(l=l[0]))if(Q[_])Q[_]+=l;else Q[++_]=l;else Q[++_]=null,J.push({i:_,x:Of(F,l)});$=d7.lastIndex}if($<f.length)if(U=f.slice($),Q[_])Q[_]+=U;else Q[++_]=U;return Q.length<2?J[0]?bG(J[0].x):pG(f):(f=J.length,function(q){for(var T=0,W;T<f;++T)Q[(W=J[T]).i]=W.x(q);return Q.join("")})}function l4(u,f){var $=typeof f,F;return f==null||$==="boolean"?z6(f):($==="number"?Of:$==="string"?(F=_0(f))?(f=F,Z3):u$:f instanceof _0?Z3:f instanceof Date?cG:vG(f)?hG:Array.isArray(f)?xG:typeof f.valueOf!=="function"&&typeof f.toString!=="function"||isNaN(f)?mG:Of)(u,f)}var P2=180/Math.PI,o7={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function x2(u,f,$,F,l,U){var _,Q,J;if(_=Math.sqrt(u*u+f*f))u/=_,f/=_;if(J=u*$+f*F)$-=u*J,F-=f*J;if(Q=Math.sqrt($*$+F*F))$/=Q,F/=Q,J/=Q;if(u*F<f*$)u=-u,f=-f,J=-J,_=-_;return{translateX:l,translateY:U,rotate:Math.atan2(f,u)*P2,skewX:Math.atan(J)*P2,scaleX:_,scaleY:Q}}var H6;function iG(u){let f=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(u+"");return f.isIdentity?o7:x2(f.a,f.b,f.c,f.d,f.e,f.f)}function gG(u){if(u==null)return o7;if(!H6)H6=document.createElementNS("http://www.w3.org/2000/svg","g");if(H6.setAttribute("transform",u),!(u=H6.transform.baseVal.consolidate()))return o7;return u=u.matrix,x2(u.a,u.b,u.c,u.d,u.e,u.f)}function c2(u,f,$,F){function l(q){return q.length?q.pop()+" ":""}function U(q,T,W,A,K,L){if(q!==W||T!==A){var z=K.push("translate(",null,f,null,$);L.push({i:z-4,x:Of(q,W)},{i:z-2,x:Of(T,A)})}else if(W||A)K.push("translate("+W+f+A+$)}function _(q,T,W,A){if(q!==T){if(q-T>180)T+=360;else if(T-q>180)q+=360;A.push({i:W.push(l(W)+"rotate(",null,F)-2,x:Of(q,T)})}else if(T)W.push(l(W)+"rotate("+T+F)}function Q(q,T,W,A){if(q!==T)A.push({i:W.push(l(W)+"skewX(",null,F)-2,x:Of(q,T)});else if(T)W.push(l(W)+"skewX("+T+F)}function J(q,T,W,A,K,L){if(q!==W||T!==A){var z=K.push(l(K)+"scale(",null,",",null,")");L.push({i:z-4,x:Of(q,W)},{i:z-2,x:Of(T,A)})}else if(W!==1||A!==1)K.push(l(K)+"scale("+W+","+A+")")}return function(q,T){var W=[],A=[];return q=u(q),T=u(T),U(q.translateX,q.translateY,T.translateX,T.translateY,W,A),_(q.rotate,T.rotate,W,A),Q(q.skewX,T.skewX,W,A),J(q.scaleX,q.scaleY,T.scaleX,T.scaleY,W,A),q=T=null,function(K){var L=-1,z=A.length,Z;while(++L<z)W[(Z=A[L]).i]=Z.x(K);return W.join("")}}}var m2=c2(iG,"px, ","px)","deg)"),p2=c2(gG,", ",")",")"),sG=0.000000000001;function r2(u){return((u=Math.exp(u))+1/u)/2}function tG(u){return((u=Math.exp(u))-1/u)/2}function nG(u){return((u=Math.exp(2*u))-1)/(u+1)}var U4=function u(f,$,F){function l(U,_){var Q=U[0],J=U[1],q=U[2],T=_[0],W=_[1],A=_[2],K=T-Q,L=W-J,z=K*K+L*L,Z,B;if(z<sG)B=Math.log(A/q)/f,Z=function(E){return[Q+E*K,J+E*L,q*Math.exp(f*E*B)]};else{var G=Math.sqrt(z),w=(A*A-q*q+F*z)/(2*q*$*G),H=(A*A-q*q-F*z)/(2*A*$*G),M=Math.log(Math.sqrt(w*w+1)-w),R=Math.log(Math.sqrt(H*H+1)-H);B=(R-M)/f,Z=function(E){var V=E*B,D=r2(M),r=q/($*G)*(D*nG(f*V+M)-tG(M));return[Q+r*K,J+r*L,q*D/r2(f*V+M)]}}return Z.duration=Math.abs(B)*1000*f/Math.SQRT2,Z}return l.rho=function(U){var _=Math.max(0.001,+U),Q=_*_,J=Q*Q;return u(_,Q,J)},l}(Math.SQRT2,2,4);function b2(u){return function(f,$){var F=u((f=w6(f)).h,($=w6($)).h),l=au(f.s,$.s),U=au(f.l,$.l),_=au(f.opacity,$.opacity);return function(Q){return f.h=F(Q),f.s=l(Q),f.l=U(Q),f.opacity=_(Q),f+""}}}var WX=b2(e7),KX=b2(au);function i2(u){return function(f,$){var F=u((f=B6(f)).h,($=B6($)).h),l=au(f.c,$.c),U=au(f.l,$.l),_=au(f.opacity,$.opacity);return function(Q){return f.h=F(Q),f.c=l(Q),f.l=U(Q),f.opacity=_(Q),f+""}}}var wX=i2(e7),BX=i2(au);function g2(u){return function f($){$=+$;function F(l,U){var _=u((l=G6(l)).h,(U=G6(U)).h),Q=au(l.s,U.s),J=au(l.l,U.l),q=au(l.opacity,U.opacity);return function(T){return l.h=_(T),l.s=Q(T),l.l=J(Math.pow(T,$)),l.opacity=q(T),l+""}}return F.gamma=f,F}(1)}var LX=g2(e7),GX=g2(au);var _4=0,R3=0,Y3=0,t2=1000,Z6,M3,Y6=0,w1=0,M6=0,E3=typeof performance==="object"&&performance.now?performance:Date,n2=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(u){setTimeout(u,17)};function E6(){return w1||(n2(dG),w1=E3.now()+M6)}function dG(){w1=0}function R6(){this._call=this._time=this._next=null}R6.prototype=$$.prototype={constructor:R6,restart:function(u,f,$){if(typeof u!=="function")throw TypeError("callback is not a function");if($=($==null?E6():+$)+(f==null?0:+f),!this._next&&M3!==this){if(M3)M3._next=this;else Z6=this;M3=this}this._call=u,this._time=$,f$()},stop:function(){if(this._call)this._call=null,this._time=1/0,f$()}};function $$(u,f,$){var F=new R6;return F.restart(u,f,$),F}function aG(){E6(),++_4;var u=Z6,f;while(u){if((f=w1-u._time)>=0)u._call.call(void 0,f);u=u._next}--_4}function s2(){w1=(Y6=E3.now())+M6,_4=R3=0;try{aG()}finally{_4=0,eG(),w1=0}}function oG(){var u=E3.now(),f=u-Y6;if(f>t2)M6-=f,Y6=u}function eG(){var u,f=Z6,$,F=1/0;while(f)if(f._call){if(F>f._time)F=f._time;u=f,f=f._next}else $=f._next,f._next=null,f=u?u._next=$:Z6=$;M3=u,f$(F)}function f$(u){if(_4)return;if(R3)R3=clearTimeout(R3);var f=u-w1;if(f>24){if(u<1/0)R3=setTimeout(s2,Math.ceil(u-E3.now()-M6)+1);if(Y3)Y3=clearInterval(Y3)}else{if(!Y3)Y6=E3.now(),Y3=setInterval(oG,t2);_4=1,n2(s2)}}function F$(u,f,$){var F=new R6;return f=f==null?0:+f,F.restart((l)=>{F.stop(),u(l+f)},f,$),F}function a2(u){return((u*=2)<=1?u*u*u:(u-=2)*u*u+2)/2}var l$=3,ZX=function u(f){f=+f;function $(F){return Math.pow(F,f)}return $.exponent=u,$}(l$),YX=function u(f){f=+f;function $(F){return 1-Math.pow(1-F,f)}return $.exponent=u,$}(l$),RX=function u(f){f=+f;function $(F){return((F*=2)<=1?Math.pow(F,f):2-Math.pow(2-F,f))/2}return $.exponent=u,$}(l$),uH=Math.PI,MX=uH/2;function V6(u){return(Math.pow(2,-10*u)-0.0009765625)*1.0009775171065494}var d2=0.36363636363636365;var EX=1/d2/d2;var U$=1.70158,VX=function u(f){f=+f;function $(F){return(F=+F)*F*(f*(F-1)+F)}return $.overshoot=u,$}(U$),XX=function u(f){f=+f;function $(F){return--F*F*((F+1)*f+F)+1}return $.overshoot=u,$}(U$),DX=function u(f){f=+f;function $(F){return((F*=2)<1?F*F*((f+1)*F-f):(F-=2)*F*((f+1)*F+f)+2)/2}return $.overshoot=u,$}(U$),Q4=2*Math.PI,_$=1,Q$=0.3,OX=function u(f,$){var F=Math.asin(1/(f=Math.max(1,f)))*($/=Q4);function l(U){return f*V6(- --U)*Math.sin((F-U)/$)}return l.amplitude=function(U){return u(U,$*Q4)},l.period=function(U){return u(f,U)},l}(_$,Q$),SX=function u(f,$){var F=Math.asin(1/(f=Math.max(1,f)))*($/=Q4);function l(U){return 1-f*V6(U=+U)*Math.sin((U+F)/$)}return l.amplitude=function(U){return u(U,$*Q4)},l.period=function(U){return u(f,U)},l}(_$,Q$),jX=function u(f,$){var F=Math.asin(1/(f=Math.max(1,f)))*($/=Q4);function l(U){return((U=U*2-1)<0?f*V6(-U)*Math.sin((F-U)/$):2-f*V6(U)*Math.sin((F+U)/$))/2}return l.amplitude=function(U){return u(U,$*Q4)},l.period=function(U){return u(f,U)},l}(_$,Q$);var fH=Q1("start","end","cancel","interrupt"),$H=[],uQ=0,o2=1,J$=2,X6=3,e2=4,q$=5,D6=6;function O6(u,f,$,F,l,U){var _=u.__transition;if(!_)u.__transition={};else if($ in _)return;FH(u,$,{name:f,index:F,group:l,on:fH,tween:$H,time:U.time,delay:U.delay,duration:U.duration,ease:U.ease,timer:null,state:uQ})}function T$(u,f){var $=Sf(u,f);if($.state>uQ)throw Error("too late; already scheduled");return $}function cf(u,f){var $=Sf(u,f);if($.state>X6)throw Error("too late; already running");return $}function Sf(u,f){var $=u.__transition;if(!$||!($=$[f]))throw Error("transition not found");return $}function FH(u,f,$){var F=u.__transition,l;F[f]=$,$.timer=$$(U,0,$.time);function U(q){if($.state=o2,$.timer.restart(_,$.delay,$.time),$.delay<=q)_(q-$.delay)}function _(q){var T,W,A,K;if($.state!==o2)return J();for(T in F){if(K=F[T],K.name!==$.name)continue;if(K.state===X6)return F$(_);if(K.state===e2)K.state=D6,K.timer.stop(),K.on.call("interrupt",u,u.__data__,K.index,K.group),delete F[T];else if(+T<f)K.state=D6,K.timer.stop(),K.on.call("cancel",u,u.__data__,K.index,K.group),delete F[T]}if(F$(function(){if($.state===X6)$.state=e2,$.timer.restart(Q,$.delay,$.time),Q(q)}),$.state=J$,$.on.call("start",u,u.__data__,$.index,$.group),$.state!==J$)return;$.state=X6,l=Array(A=$.tween.length);for(T=0,W=-1;T<A;++T)if(K=$.tween[T].value.call(u,u.__data__,$.index,$.group))l[++W]=K;l.length=W+1}function Q(q){var T=q<$.duration?$.ease.call(null,q/$.duration):($.timer.restart(J),$.state=q$,1),W=-1,A=l.length;while(++W<A)l[W].call(u,T);if($.state===q$)$.on.call("end",u,u.__data__,$.index,$.group),J()}function J(){$.state=D6,$.timer.stop(),delete F[f];for(var q in F)return;delete u.__transition}}function V3(u,f){var $=u.__transition,F,l,U=!0,_;if(!$)return;f=f==null?null:f+"";for(_ in $){if((F=$[_]).name!==f){U=!1;continue}l=F.state>J$&&F.state<q$,F.state=D6,F.timer.stop(),F.on.call(l?"interrupt":"cancel",u,u.__data__,F.index,F.group),delete $[_]}if(U)delete u.__transition}function lH(u){return this.each(function(){V3(this,u)})}function UH(u,f){var $,F;return function(){var l=cf(this,u),U=l.tween;if(U!==$){F=$=U;for(var _=0,Q=F.length;_<Q;++_)if(F[_].name===f){F=F.slice(),F.splice(_,1);break}}l.tween=F}}function _H(u,f,$){var F,l;if(typeof $!=="function")throw Error();return function(){var U=cf(this,u),_=U.tween;if(_!==F){l=(F=_).slice();for(var Q={name:f,value:$},J=0,q=l.length;J<q;++J)if(l[J].name===f){l[J]=Q;break}if(J===q)l.push(Q)}U.tween=l}}function QH(u,f){var $=this._id;if(u+="",arguments.length<2){var F=Sf(this.node(),$).tween;for(var l=0,U=F.length,_;l<U;++l)if((_=F[l]).name===u)return _.value;return null}return this.each((f==null?UH:_H)($,u,f))}function A$(u,f,$){var F=u._id;return u.each(function(){var l=cf(this,F);(l.value||(l.value={}))[f]=$.apply(this,arguments)}),function(l){return Sf(l,F).value[f]}}function fQ(u,f){var $;return(typeof f==="number"?Of:f instanceof _0?Z3:($=_0(f))?(f=$,Z3):u$)(u,f)}function JH(u){return function(){this.removeAttribute(u)}}function qH(u){return function(){this.removeAttributeNS(u.space,u.local)}}function TH(u,f,$){var F,l=$+"",U;return function(){var _=this.getAttribute(u);return _===l?null:_===F?U:U=f(F=_,$)}}function AH(u,f,$){var F,l=$+"",U;return function(){var _=this.getAttributeNS(u.space,u.local);return _===l?null:_===F?U:U=f(F=_,$)}}function WH(u,f,$){var F,l,U;return function(){var _,Q=$(this),J;if(Q==null)return void this.removeAttribute(u);return _=this.getAttribute(u),J=Q+"",_===J?null:_===F&&J===l?U:(l=J,U=f(F=_,Q))}}function KH(u,f,$){var F,l,U;return function(){var _,Q=$(this),J;if(Q==null)return void this.removeAttributeNS(u.space,u.local);return _=this.getAttributeNS(u.space,u.local),J=Q+"",_===J?null:_===F&&J===l?U:(l=J,U=f(F=_,Q))}}function wH(u,f){var $=w3(u),F=$==="transform"?p2:fQ;return this.attrTween(u,typeof f==="function"?($.local?KH:WH)($,F,A$(this,"attr."+u,f)):f==null?($.local?qH:JH)($):($.local?AH:TH)($,F,f))}function BH(u,f){return function($){this.setAttribute(u,f.call(this,$))}}function LH(u,f){return function($){this.setAttributeNS(u.space,u.local,f.call(this,$))}}function GH(u,f){var $,F;function l(){var U=f.apply(this,arguments);if(U!==F)$=(F=U)&&LH(u,U);return $}return l._value=f,l}function HH(u,f){var $,F;function l(){var U=f.apply(this,arguments);if(U!==F)$=(F=U)&&BH(u,U);return $}return l._value=f,l}function zH(u,f){var $="attr."+u;if(arguments.length<2)return($=this.tween($))&&$._value;if(f==null)return this.tween($,null);if(typeof f!=="function")throw Error();var F=w3(u);return this.tween($,(F.local?GH:HH)(F,f))}function ZH(u,f){return function(){T$(this,u).delay=+f.apply(this,arguments)}}function YH(u,f){return f=+f,function(){T$(this,u).delay=f}}function RH(u){var f=this._id;return arguments.length?this.each((typeof u==="function"?ZH:YH)(f,u)):Sf(this.node(),f).delay}function MH(u,f){return function(){cf(this,u).duration=+f.apply(this,arguments)}}function EH(u,f){return f=+f,function(){cf(this,u).duration=f}}function VH(u){var f=this._id;return arguments.length?this.each((typeof u==="function"?MH:EH)(f,u)):Sf(this.node(),f).duration}function XH(u,f){if(typeof f!=="function")throw Error();return function(){cf(this,u).ease=f}}function DH(u){var f=this._id;return arguments.length?this.each(XH(f,u)):Sf(this.node(),f).ease}function OH(u,f){return function(){var $=f.apply(this,arguments);if(typeof $!=="function")throw Error();cf(this,u).ease=$}}function SH(u){if(typeof u!=="function")throw Error();return this.each(OH(this._id,u))}function jH(u){if(typeof u!=="function")u=P7(u);for(var f=this._groups,$=f.length,F=Array($),l=0;l<$;++l)for(var U=f[l],_=U.length,Q=F[l]=[],J,q=0;q<_;++q)if((J=U[q])&&u.call(J,J.__data__,q,U))Q.push(J);return new J0(F,this._parents,this._name,this._id)}function NH(u){if(u._id!==this._id)throw Error();for(var f=this._groups,$=u._groups,F=f.length,l=$.length,U=Math.min(F,l),_=Array(F),Q=0;Q<U;++Q)for(var J=f[Q],q=$[Q],T=J.length,W=_[Q]=Array(T),A,K=0;K<T;++K)if(A=J[K]||q[K])W[K]=A;for(;Q<F;++Q)_[Q]=f[Q];return new J0(_,this._parents,this._name,this._id)}function IH(u){return(u+"").trim().split(/^|\s+/).every(function(f){var $=f.indexOf(".");if($>=0)f=f.slice(0,$);return!f||f==="start"})}function yH(u,f,$){var F,l,U=IH(f)?T$:cf;return function(){var _=U(this,u),Q=_.on;if(Q!==F)(l=(F=Q).copy()).on(f,$);_.on=l}}function kH(u,f){var $=this._id;return arguments.length<2?Sf(this.node(),$).on.on(u):this.each(yH($,u,f))}function PH(u){return function(){var f=this.parentNode;for(var $ in this.__transition)if(+$!==u)return;if(f)f.removeChild(this)}}function rH(){return this.on("end.remove",PH(this._id))}function CH(u){var f=this._name,$=this._id;if(typeof u!=="function")u=J6(u);for(var F=this._groups,l=F.length,U=Array(l),_=0;_<l;++_)for(var Q=F[_],J=Q.length,q=U[_]=Array(J),T,W,A=0;A<J;++A)if((T=Q[A])&&(W=u.call(T,T.__data__,A,Q))){if("__data__"in T)W.__data__=T.__data__;q[A]=W,O6(q[A],f,$,A,q,Sf(T,$))}return new J0(U,this._parents,f,$)}function hH(u){var f=this._name,$=this._id;if(typeof u!=="function")u=k7(u);for(var F=this._groups,l=F.length,U=[],_=[],Q=0;Q<l;++Q)for(var J=F[Q],q=J.length,T,W=0;W<q;++W)if(T=J[W]){for(var A=u.call(T,T.__data__,W,J),K,L=Sf(T,$),z=0,Z=A.length;z<Z;++z)if(K=A[z])O6(K,f,$,z,A,L);U.push(A),_.push(T)}return new J0(U,_,f,$)}var vH=q1.prototype.constructor;function xH(){return new vH(this._groups,this._parents)}function cH(u,f){var $,F,l;return function(){var U=J1(this,u),_=(this.style.removeProperty(u),J1(this,u));return U===_?null:U===$&&_===F?l:l=f($=U,F=_)}}function $Q(u){return function(){this.style.removeProperty(u)}}function mH(u,f,$){var F,l=$+"",U;return function(){var _=J1(this,u);return _===l?null:_===F?U:U=f(F=_,$)}}function pH(u,f,$){var F,l,U;return function(){var _=J1(this,u),Q=$(this),J=Q+"";if(Q==null)J=Q=(this.style.removeProperty(u),J1(this,u));return _===J?null:_===F&&J===l?U:(l=J,U=f(F=_,Q))}}function bH(u,f){var $,F,l,U="style."+f,_="end."+U,Q;return function(){var J=cf(this,u),q=J.on,T=J.value[U]==null?Q||(Q=$Q(f)):void 0;if(q!==$||l!==T)(F=($=q).copy()).on(_,l=T);J.on=F}}function iH(u,f,$){var F=(u+="")==="transform"?m2:fQ;return f==null?this.styleTween(u,cH(u,F)).on("end.style."+u,$Q(u)):typeof f==="function"?this.styleTween(u,pH(u,F,A$(this,"style."+u,f))).each(bH(this._id,u)):this.styleTween(u,mH(u,F,f),$).on("end.style."+u,null)}function gH(u,f,$){return function(F){this.style.setProperty(u,f.call(this,F),$)}}function sH(u,f,$){var F,l;function U(){var _=f.apply(this,arguments);if(_!==l)F=(l=_)&&gH(u,_,$);return F}return U._value=f,U}function tH(u,f,$){var F="style."+(u+="");if(arguments.length<2)return(F=this.tween(F))&&F._value;if(f==null)return this.tween(F,null);if(typeof f!=="function")throw Error();return this.tween(F,sH(u,f,$==null?"":$))}function nH(u){return function(){this.textContent=u}}function dH(u){return function(){var f=u(this);this.textContent=f==null?"":f}}function aH(u){return this.tween("text",typeof u==="function"?dH(A$(this,"text",u)):nH(u==null?"":u+""))}function oH(u){return function(f){this.textContent=u.call(this,f)}}function eH(u){var f,$;function F(){var l=u.apply(this,arguments);if(l!==$)f=($=l)&&oH(l);return f}return F._value=u,F}function uz(u){var f="text";if(arguments.length<1)return(f=this.tween(f))&&f._value;if(u==null)return this.tween(f,null);if(typeof u!=="function")throw Error();return this.tween(f,eH(u))}function fz(){var u=this._name,f=this._id,$=FQ();for(var F=this._groups,l=F.length,U=0;U<l;++U)for(var _=F[U],Q=_.length,J,q=0;q<Q;++q)if(J=_[q]){var T=Sf(J,f);O6(J,u,$,q,_,{time:T.time+T.delay+T.duration,delay:0,duration:T.duration,ease:T.ease})}return new J0(F,this._parents,u,$)}function $z(){var u,f,$=this,F=$._id,l=$.size();return new Promise(function(U,_){var Q={value:_},J={value:function(){if(--l===0)U()}};if($.each(function(){var q=cf(this,F),T=q.on;if(T!==u)f=(u=T).copy(),f._.cancel.push(Q),f._.interrupt.push(Q),f._.end.push(J);q.on=f}),l===0)U()})}var Fz=0;function J0(u,f,$,F){this._groups=u,this._parents=f,this._name=$,this._id=F}function lz(u){return q1().transition(u)}function FQ(){return++Fz}var Q0=q1.prototype;J0.prototype=lz.prototype={constructor:J0,select:CH,selectAll:hH,selectChild:Q0.selectChild,selectChildren:Q0.selectChildren,filter:jH,merge:NH,selection:xH,transition:fz,call:Q0.call,nodes:Q0.nodes,node:Q0.node,size:Q0.size,empty:Q0.empty,each:Q0.each,on:kH,attr:wH,attrTween:zH,style:iH,styleTween:tH,text:aH,textTween:uz,remove:rH,tween:QH,delay:RH,duration:VH,ease:DH,easeVarying:SH,end:$z,[Symbol.iterator]:Q0[Symbol.iterator]};var Uz={time:null,delay:0,duration:250,ease:a2};function _z(u,f){var $;while(!($=u.__transition)||!($=$[f]))if(!(u=u.parentNode))throw Error(`transition ${f} not found`);return $}function Qz(u){var f,$;if(u instanceof J0)f=u._id,u=u._name;else f=FQ(),($=Uz).time=E6(),u=u==null?null:u+"";for(var F=this._groups,l=F.length,U=0;U<l;++U)for(var _=F[U],Q=_.length,J,q=0;q<Q;++q)if(J=_[q])O6(J,u,f,q,_,$||_z(J,f));return new J0(F,this._parents,u,f)}q1.prototype.interrupt=lH;q1.prototype.transition=Qz;var S6=(u)=>()=>u;function Jz(u,{sourceEvent:f,target:$,transform:F,dispatch:l}){Object.defineProperties(this,{type:{value:u,enumerable:!0,configurable:!0},sourceEvent:{value:f,enumerable:!0,configurable:!0},target:{value:$,enumerable:!0,configurable:!0},transform:{value:F,enumerable:!0,configurable:!0},_:{value:l}})}function q0(u,f,$){this.k=u,this.x=f,this.y=$}q0.prototype={constructor:q0,scale:function(u){return u===1?this:new q0(this.k*u,this.x,this.y)},translate:function(u,f){return u===0&f===0?this:new q0(this.k,this.x+this.k*u,this.y+this.k*f)},apply:function(u){return[u[0]*this.k+this.x,u[1]*this.k+this.y]},applyX:function(u){return u*this.k+this.x},applyY:function(u){return u*this.k+this.y},invert:function(u){return[(u[0]-this.x)/this.k,(u[1]-this.y)/this.k]},invertX:function(u){return(u-this.x)/this.k},invertY:function(u){return(u-this.y)/this.k},rescaleX:function(u){return u.copy().domain(u.range().map(this.invertX,this).map(u.invert,u))},rescaleY:function(u){return u.copy().domain(u.range().map(this.invertY,this).map(u.invert,u))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var D3=new q0(1,0,0);K$.prototype=q0.prototype;function K$(u){while(!u.__zoom)if(!(u=u.parentNode))return D3;return u.__zoom}function W$(u){u.stopImmediatePropagation()}function X3(u){u.preventDefault(),u.stopImmediatePropagation()}function qz(u){return(!u.ctrlKey||u.type==="wheel")&&!u.button}function Tz(){var u=this;if(u instanceof SVGElement){if(u=u.ownerSVGElement||u,u.hasAttribute("viewBox"))return u=u.viewBox.baseVal,[[u.x,u.y],[u.x+u.width,u.y+u.height]];return[[0,0],[u.width.baseVal.value,u.height.baseVal.value]]}return[[0,0],[u.clientWidth,u.clientHeight]]}function lQ(){return this.__zoom||D3}function Az(u){return-u.deltaY*(u.deltaMode===1?0.05:u.deltaMode?1:0.002)*(u.ctrlKey?10:1)}function Wz(){return navigator.maxTouchPoints||"ontouchstart"in this}function Kz(u,f,$){var F=u.invertX(f[0][0])-$[0][0],l=u.invertX(f[1][0])-$[1][0],U=u.invertY(f[0][1])-$[0][1],_=u.invertY(f[1][1])-$[1][1];return u.translate(l>F?(F+l)/2:Math.min(0,F)||Math.max(0,l),_>U?(U+_)/2:Math.min(0,U)||Math.max(0,_))}function w$(){var u=qz,f=Tz,$=Kz,F=Az,l=Wz,U=[0,1/0],_=[[-1/0,-1/0],[1/0,1/0]],Q=250,J=U4,q=Q1("start","zoom","end"),T,W,A,K=500,L=150,z=0,Z=10;function B(Y){Y.property("__zoom",lQ).on("wheel.zoom",V,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",r).filter(l).on("touchstart.zoom",C).on("touchmove.zoom",m).on("touchend.zoom touchcancel.zoom",v).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}B.transform=function(Y,X,O,j){var k=Y.selection?Y.selection():Y;if(k.property("__zoom",lQ),Y!==k)M(Y,X,O,j);else k.interrupt().each(function(){R(this,arguments).event(j).start().zoom(null,typeof X==="function"?X.apply(this,arguments):X).end()})},B.scaleBy=function(Y,X,O,j){B.scaleTo(Y,function(){var k=this.__zoom.k,P=typeof X==="function"?X.apply(this,arguments):X;return k*P},O,j)},B.scaleTo=function(Y,X,O,j){B.transform(Y,function(){var k=f.apply(this,arguments),P=this.__zoom,c=O==null?H(k):typeof O==="function"?O.apply(this,arguments):O,x=P.invert(c),g=typeof X==="function"?X.apply(this,arguments):X;return $(w(G(P,g),c,x),k,_)},O,j)},B.translateBy=function(Y,X,O,j){B.transform(Y,function(){return $(this.__zoom.translate(typeof X==="function"?X.apply(this,arguments):X,typeof O==="function"?O.apply(this,arguments):O),f.apply(this,arguments),_)},null,j)},B.translateTo=function(Y,X,O,j,k){B.transform(Y,function(){var P=f.apply(this,arguments),c=this.__zoom,x=j==null?H(P):typeof j==="function"?j.apply(this,arguments):j;return $(D3.translate(x[0],x[1]).scale(c.k).translate(typeof X==="function"?-X.apply(this,arguments):-X,typeof O==="function"?-O.apply(this,arguments):-O),P,_)},j,k)};function G(Y,X){return X=Math.max(U[0],Math.min(U[1],X)),X===Y.k?Y:new q0(X,Y.x,Y.y)}function w(Y,X,O){var j=X[0]-O[0]*Y.k,k=X[1]-O[1]*Y.k;return j===Y.x&&k===Y.y?Y:new q0(Y.k,j,k)}function H(Y){return[(+Y[0][0]+ +Y[1][0])/2,(+Y[0][1]+ +Y[1][1])/2]}function M(Y,X,O,j){Y.on("start.zoom",function(){R(this,arguments).event(j).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(j).end()}).tween("zoom",function(){var k=this,P=arguments,c=R(k,P).event(j),x=f.apply(k,P),g=O==null?H(x):typeof O==="function"?O.apply(k,P):O,$u=Math.max(x[1][0]-x[0][0],x[1][1]-x[0][1]),i=k.__zoom,fu=typeof X==="function"?X.apply(k,P):X,Fu=J(i.invert(g).concat($u/i.k),fu.invert(g).concat($u/fu.k));return function(uu){if(uu===1)uu=fu;else{var h=Fu(uu),n=$u/h[2];uu=new q0(n,g[0]-h[0]*n,g[1]-h[1]*n)}c.zoom(null,uu)}})}function R(Y,X,O){return!O&&Y.__zooming||new E(Y,X)}function E(Y,X){this.that=Y,this.args=X,this.active=0,this.sourceEvent=null,this.extent=f.apply(Y,X),this.taps=0}E.prototype={event:function(Y){if(Y)this.sourceEvent=Y;return this},start:function(){if(++this.active===1)this.that.__zooming=this,this.emit("start");return this},zoom:function(Y,X){if(this.mouse&&Y!=="mouse")this.mouse[1]=X.invert(this.mouse[0]);if(this.touch0&&Y!=="touch")this.touch0[1]=X.invert(this.touch0[0]);if(this.touch1&&Y!=="touch")this.touch1[1]=X.invert(this.touch1[0]);return this.that.__zoom=X,this.emit("zoom"),this},end:function(){if(--this.active===0)delete this.that.__zooming,this.emit("end");return this},emit:function(Y){var X=xu(this.that).datum();q.call(Y,this.that,new Jz(Y,{sourceEvent:this.sourceEvent,target:B,transform:this.that.__zoom,dispatch:q}),X)}};function V(Y,...X){if(!u.apply(this,arguments))return;var O=R(this,X).event(Y),j=this.__zoom,k=Math.max(U[0],Math.min(U[1],j.k*Math.pow(2,F.apply(this,arguments)))),P=du(Y);if(O.wheel){if(O.mouse[0][0]!==P[0]||O.mouse[0][1]!==P[1])O.mouse[1]=j.invert(O.mouse[0]=P);clearTimeout(O.wheel)}else if(j.k===k)return;else O.mouse=[P,j.invert(P)],V3(this),O.start();X3(Y),O.wheel=setTimeout(c,L),O.zoom("mouse",$(w(G(j,k),O.mouse[0],O.mouse[1]),O.extent,_));function c(){O.wheel=null,O.end()}}function D(Y,...X){if(A||!u.apply(this,arguments))return;var O=Y.currentTarget,j=R(this,X,!0).event(Y),k=xu(Y.view).on("mousemove.zoom",g,!0).on("mouseup.zoom",$u,!0),P=du(Y,O),c=Y.clientX,x=Y.clientY;v7(Y.view),W$(Y),j.mouse=[P,this.__zoom.invert(P)],V3(this),j.start();function g(i){if(X3(i),!j.moved){var fu=i.clientX-c,Fu=i.clientY-x;j.moved=fu*fu+Fu*Fu>z}j.event(i).zoom("mouse",$(w(j.that.__zoom,j.mouse[0]=du(i,O),j.mouse[1]),j.extent,_))}function $u(i){k.on("mousemove.zoom mouseup.zoom",null),x7(i.view,j.moved),X3(i),j.event(i).end()}}function r(Y,...X){if(!u.apply(this,arguments))return;var O=this.__zoom,j=du(Y.changedTouches?Y.changedTouches[0]:Y,this),k=O.invert(j),P=O.k*(Y.shiftKey?0.5:2),c=$(w(G(O,P),j,k),f.apply(this,X),_);if(X3(Y),Q>0)xu(this).transition().duration(Q).call(M,c,j,Y);else xu(this).call(B.transform,c,j,Y)}function C(Y,...X){if(!u.apply(this,arguments))return;var O=Y.touches,j=O.length,k=R(this,X,Y.changedTouches.length===j).event(Y),P,c,x,g;W$(Y);for(c=0;c<j;++c)if(x=O[c],g=du(x,this),g=[g,this.__zoom.invert(g),x.identifier],!k.touch0)k.touch0=g,P=!0,k.taps=1+!!T;else if(!k.touch1&&k.touch0[2]!==g[2])k.touch1=g,k.taps=0;if(T)T=clearTimeout(T);if(P){if(k.taps<2)W=g[0],T=setTimeout(function(){T=null},K);V3(this),k.start()}}function m(Y,...X){if(!this.__zooming)return;var O=R(this,X).event(Y),j=Y.changedTouches,k=j.length,P,c,x,g;X3(Y);for(P=0;P<k;++P)if(c=j[P],x=du(c,this),O.touch0&&O.touch0[2]===c.identifier)O.touch0[0]=x;else if(O.touch1&&O.touch1[2]===c.identifier)O.touch1[0]=x;if(c=O.that.__zoom,O.touch1){var $u=O.touch0[0],i=O.touch0[1],fu=O.touch1[0],Fu=O.touch1[1],uu=(uu=fu[0]-$u[0])*uu+(uu=fu[1]-$u[1])*uu,h=(h=Fu[0]-i[0])*h+(h=Fu[1]-i[1])*h;c=G(c,Math.sqrt(uu/h)),x=[($u[0]+fu[0])/2,($u[1]+fu[1])/2],g=[(i[0]+Fu[0])/2,(i[1]+Fu[1])/2]}else if(O.touch0)x=O.touch0[0],g=O.touch0[1];else return;O.zoom("touch",$(w(c,x,g),O.extent,_))}function v(Y,...X){if(!this.__zooming)return;var O=R(this,X).event(Y),j=Y.changedTouches,k=j.length,P,c;if(W$(Y),A)clearTimeout(A);A=setTimeout(function(){A=null},K);for(P=0;P<k;++P)if(c=j[P],O.touch0&&O.touch0[2]===c.identifier)delete O.touch0;else if(O.touch1&&O.touch1[2]===c.identifier)delete O.touch1;if(O.touch1&&!O.touch0)O.touch0=O.touch1,delete O.touch1;if(O.touch0)O.touch0[1]=this.__zoom.invert(O.touch0[0]);else if(O.end(),O.taps===2){if(c=du(c,this),Math.hypot(W[0]-c[0],W[1]-c[1])<Z){var x=xu(this).on("dblclick.zoom");if(x)x.apply(this,arguments)}}}return B.wheelDelta=function(Y){return arguments.length?(F=typeof Y==="function"?Y:S6(+Y),B):F},B.filter=function(Y){return arguments.length?(u=typeof Y==="function"?Y:S6(!!Y),B):u},B.touchable=function(Y){return arguments.length?(l=typeof Y==="function"?Y:S6(!!Y),B):l},B.extent=function(Y){return arguments.length?(f=typeof Y==="function"?Y:S6([[+Y[0][0],+Y[0][1]],[+Y[1][0],+Y[1][1]]]),B):f},B.scaleExtent=function(Y){return arguments.length?(U[0]=+Y[0],U[1]=+Y[1],B):[U[0],U[1]]},B.translateExtent=function(Y){return arguments.length?(_[0][0]=+Y[0][0],_[1][0]=+Y[1][0],_[0][1]=+Y[0][1],_[1][1]=+Y[1][1],B):[[_[0][0],_[0][1]],[_[1][0],_[1][1]]]},B.constrain=function(Y){return arguments.length?($=Y,B):$},B.duration=function(Y){return arguments.length?(Q=+Y,B):Q},B.interpolate=function(Y){return arguments.length?(J=Y,B):J},B.on=function(){var Y=q.on.apply(q,arguments);return Y===q?B:Y},B.clickDistance=function(Y){return arguments.length?(z=(Y=+Y)*Y,B):Math.sqrt(z)},B.tapDistance=function(Y){return arguments.length?(Z=+Y,B):Z},B}var Uf={error001:(u="react")=>`Seems like you have not used ${u==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${u}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:(u)=>`Node type "${u}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:(u)=>`The old edge with id=${u} does not exist.`,error009:(u)=>`Marker type "${u}" doesn't exist.`,error008:(u,{id:f,sourceHandle:$,targetHandle:F})=>`Couldn't create edge for ${u} handle id: "${u==="source"?$:F}", edge id: ${f}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:(u)=>`Edge type "${u}" not found. Using fallback type "default".`,error012:(u)=>`Node with id "${u}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(u="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${u}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:(u)=>`Edge with id "${u}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},T4=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],z$=["Enter"," ","Escape"],Z$={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:u,x:f,y:$})=>`Moved selected node ${u}. New position, x: ${f}, y: ${$}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},h0;(function(u){u.Strict="strict",u.Loose="loose"})(h0||(h0={}));var T0;(function(u){u.Free="free",u.Vertical="vertical",u.Horizontal="horizontal"})(T0||(T0={}));var B1;(function(u){u.Partial="partial",u.Full="full"})(B1||(B1={}));var Y$={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},mf;(function(u){u.Bezier="default",u.Straight="straight",u.Step="step",u.SmoothStep="smoothstep",u.SimpleBezier="simplebezier"})(mf||(mf={}));var pf;(function(u){u.Arrow="arrow",u.ArrowClosed="arrowclosed"})(pf||(pf={}));var a;(function(u){u.Left="left",u.Top="top",u.Right="right",u.Bottom="bottom"})(a||(a={}));var UQ={[a.Left]:a.Right,[a.Right]:a.Left,[a.Top]:a.Bottom,[a.Bottom]:a.Top},R$=(u)=>!!u&&typeof u==="object"&&("id"in u)&&("source"in u)&&("target"in u),zQ=(u)=>!!u&&typeof u==="object"&&("id"in u)&&("position"in u)&&!("source"in u)&&!("target"in u),M$=(u)=>!!u&&typeof u==="object"&&("id"in u)&&("internals"in u)&&!("source"in u)&&!("target"in u);var S3=(u,f=[0,0])=>{let{width:$,height:F}=Bf(u),l=u.origin??f,U=$*l[0],_=F*l[1];return{x:u.position.x-U,y:u.position.y-_}},E$=(u,f={nodeOrigin:[0,0]})=>{if(u.length===0)return{x:0,y:0,width:0,height:0};let $=!1,F=u.reduce((l,U)=>{let _=typeof U==="string",Q=!f.nodeLookup&&!_?U:void 0;if(f.nodeLookup)Q=_?f.nodeLookup.get(U):!M$(U)?f.nodeLookup.get(U.id):U;if(!Q)return l;return $=!0,P6(l,I6(Q,f.nodeOrigin))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return $?r6(F):{x:0,y:0,width:0,height:0}},A4=(u,f={})=>{let $={x:1/0,y:1/0,x2:-1/0,y2:-1/0},F=!1;return u.forEach((l)=>{if(f.filter===void 0||f.filter(l))$=P6($,I6(l)),F=!0}),F?r6($):{x:0,y:0,width:0,height:0}},y6=(u,f,[$,F,l]=[0,0,1],U=!1,_=!1)=>{let Q=(f.x-$)/l,J=(f.y-F)/l,q=f.width/l,T=f.height/l,W=[];for(let A of u.values()){let{measured:K,selectable:L=!0,hidden:z=!1}=A;if(_&&!L||z)continue;let Z=K.width??A.width??A.initialWidth??0,B=K.height??A.height??A.initialHeight??0,{x:G,y:w}=A.internals.positionAbsolute,H=EQ(Q,J,q,T,G,w,Z,B),M=Z*B,R=U&&H>0;if(!A.internals.handleBounds||R||H>=M||A.dragging)W.push(A)}return W},ZQ=(u,f)=>{let $=new Set;return u.forEach((F)=>{$.add(F.id)}),f.filter((F)=>$.has(F.source)||$.has(F.target))};function wz(u,f){let $=new Map,F=f?.nodes?new Set(f.nodes.map((l)=>l.id)):null;return u.forEach((l)=>{let U;if(f?.includeHiddenNodes){let{width:_,height:Q}=Bf(l);U=_>0&&Q>0}else U=Boolean(l.measured.width&&l.measured.height&&!l.hidden);if(U&&(!F||F.has(l.id)))$.set(l.id,l)}),$}async function YQ({nodes:u,width:f,height:$,panZoom:F,minZoom:l,maxZoom:U},_){if(u.size===0)return!0;let Q=wz(u,_),J=A4(Q),q=N3(J,f,$,_?.minZoom??l,_?.maxZoom??U,_?.padding??0.1);return await F.setViewport(q,{duration:_?.duration,ease:_?.ease,interpolate:_?.interpolate}),!0}function V$({nodeId:u,nextPosition:f,nodeLookup:$,nodeOrigin:F=[0,0],nodeExtent:l,onError:U}){let _=$.get(u),Q=_.parentId?$.get(_.parentId):void 0,{x:J,y:q}=Q?Q.internals.positionAbsolute:{x:0,y:0},T=_.origin??F,W=_.extent||l;if(_.extent==="parent"&&!_.expandParent)if(!Q)U?.("005",Uf.error005());else{let{width:K,height:L}=Bf(Q);if(K&&L)W=[[J,q],[J+K,q+L]]}else if(Q&&H1(_.extent))W=[[_.extent[0][0]+J,_.extent[0][1]+q],[_.extent[1][0]+J,_.extent[1][1]+q]];let A=H1(W)?L1(f,W,_.measured):f;if(_.measured.width===void 0||_.measured.height===void 0)U?.("015",Uf.error015());return{position:{x:A.x-J+(_.measured.width??0)*T[0],y:A.y-q+(_.measured.height??0)*T[1]},positionAbsolute:A}}async function RQ({nodesToRemove:u=[],edgesToRemove:f=[],nodes:$,edges:F,onBeforeDelete:l}){let U=new Set(u.map((A)=>A.id)),_=[];for(let A of $){if(A.deletable===!1)continue;let K=U.has(A.id),L=!K&&A.parentId&&_.find((z)=>z.id===A.parentId);if(K||L)_.push(A)}let Q=new Set(f.map((A)=>A.id)),J=F.filter((A)=>A.deletable!==!1),T=ZQ(_,J);for(let A of J)if(Q.has(A.id)&&!T.find((L)=>L.id===A.id))T.push(A);if(!l)return{edges:T,nodes:_};let W=await l({nodes:_,edges:T});if(typeof W==="boolean")return W?{edges:T,nodes:_}:{edges:[],nodes:[]};return W}var q4=(u,f=0,$=1)=>Math.min(Math.max(u,f),$),L1=(u={x:0,y:0},f,$)=>({x:q4(u.x,f[0][0],f[1][0]-($?.width??0)),y:q4(u.y,f[0][1],f[1][1]-($?.height??0))});function MQ(u,f,$){let{width:F,height:l}=Bf($),{x:U,y:_}=$.internals.positionAbsolute;return L1(u,[[U,_],[U+F,_+l]],f)}var _Q=(u,f,$)=>{if(u<f)return q4(Math.abs(u-f),1,f)/f;else if(u>$)return-q4(Math.abs(u-$),1,f)/f;return 0},k6=(u,f,$=15,F=40)=>{let l=_Q(u.x,F,f.width-F)*$,U=_Q(u.y,F,f.height-F)*$;return[l,U]},P6=(u,f)=>({x:Math.min(u.x,f.x),y:Math.min(u.y,f.y),x2:Math.max(u.x2,f.x2),y2:Math.max(u.y2,f.y2)}),H$=({x:u,y:f,width:$,height:F})=>({x:u,y:f,x2:u+$,y2:f+F}),r6=({x:u,y:f,x2:$,y2:F})=>({x:u,y:f,width:$-u,height:F-f}),W4=(u,f=[0,0])=>{let{x:$,y:F}=M$(u)?u.internals.positionAbsolute:S3(u,f);return{x:$,y:F,width:u.measured?.width??u.width??u.initialWidth??0,height:u.measured?.height??u.height??u.initialHeight??0}},I6=(u,f=[0,0])=>{let{x:$,y:F}=M$(u)?u.internals.positionAbsolute:S3(u,f);return{x:$,y:F,x2:$+(u.measured?.width??u.width??u.initialWidth??0),y2:F+(u.measured?.height??u.height??u.initialHeight??0)}},X$=(u,f)=>r6(P6(H$(u),H$(f))),EQ=(u,f,$,F,l,U,_,Q)=>{let J=Math.max(0,Math.min(u+$,l+_)-Math.max(u,l)),q=Math.max(0,Math.min(f+F,U+Q)-Math.max(f,U));return Math.ceil(J*q)},j3=(u,f)=>EQ(u.x,u.y,u.width,u.height,f.x,f.y,f.width,f.height),D$=(u)=>Kf(u.width)&&Kf(u.height)&&Kf(u.x)&&Kf(u.y),Kf=(u)=>!isNaN(u)&&isFinite(u),O$=(u,f)=>($,F)=>{},K4=(u,f=[1,1])=>{return{x:f[0]*Math.round(u.x/f[0]),y:f[1]*Math.round(u.y/f[1])}},w4=({x:u,y:f},[$,F,l],U=!1,_=[1,1])=>{let Q={x:(u-$)/l,y:(f-F)/l};return U?K4(Q,_):Q},G1=({x:u,y:f},[$,F,l])=>{return{x:u*l+$,y:f*l+F}};function J4(u,f){if(typeof u==="number")return Math.floor((f-f/(1+u))*0.5);if(typeof u==="string"&&u.endsWith("px")){let $=parseFloat(u);if(!Number.isNaN($))return Math.floor($)}if(typeof u==="string"&&u.endsWith("%")){let $=parseFloat(u);if(!Number.isNaN($))return Math.floor(f*$*0.01)}return console.error(`The padding value "${u}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Bz(u,f,$){if(typeof u==="string"||typeof u==="number"){let F=J4(u,$),l=J4(u,f);return{top:F,right:l,bottom:F,left:l,x:l*2,y:F*2}}if(typeof u==="object"){let F=J4(u.top??u.y??0,$),l=J4(u.bottom??u.y??0,$),U=J4(u.left??u.x??0,f),_=J4(u.right??u.x??0,f);return{top:F,right:_,bottom:l,left:U,x:U+_,y:F+l}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Lz(u,f,$,F,l,U){let{x:_,y:Q}=G1(u,[f,$,F]),{x:J,y:q}=G1({x:u.x+u.width,y:u.y+u.height},[f,$,F]),T=l-J,W=U-q;return{left:Math.floor(_),top:Math.floor(Q),right:Math.floor(T),bottom:Math.floor(W)}}var N3=(u,f,$,F,l,U)=>{let _=Bz(U,f,$),Q=(f-_.x)/u.width,J=($-_.y)/u.height,q=Math.min(Q,J),T=q4(q,F,l),W=u.x+u.width/2,A=u.y+u.height/2,K=f/2-W*T,L=$/2-A*T,z=Lz(u,K,L,T,f,$),Z={left:Math.min(z.left-_.left,0),top:Math.min(z.top-_.top,0),right:Math.min(z.right-_.right,0),bottom:Math.min(z.bottom-_.bottom,0)};return{x:K-Z.left+Z.right,y:L-Z.top+Z.bottom,zoom:T}},B4=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function H1(u){return u!==void 0&&u!==null&&u!=="parent"}function Bf(u){return{width:u.measured?.width??u.width??u.initialWidth??0,height:u.measured?.height??u.height??u.initialHeight??0}}function S$(u){return(u.measured?.width??u.width??u.initialWidth)!==void 0&&(u.measured?.height??u.height??u.initialHeight)!==void 0}function j$(u,f={width:0,height:0},$,F,l){let U={...u},_=F.get($);if(_){let Q=_.origin||l;U.x+=_.internals.positionAbsolute.x-(f.width??0)*Q[0],U.y+=_.internals.positionAbsolute.y-(f.height??0)*Q[1]}return U}function N$(u,f){if(u.size!==f.size)return!1;for(let $ of u)if(!f.has($))return!1;return!0}function VQ(){let u,f;return{promise:new Promise((F,l)=>{u=F,f=l}),resolve:u,reject:f}}function XQ(u){return{...Z$,...u||{}}}function Gz(u){if(typeof document>"u")return!0;let f=document.querySelector(`.${u}-flow__pane`);if(!f||!f.isConnected)return!0;let $=getComputedStyle(f);if($.display==="none")return!0;if($.visibility==="hidden"||$.visibility==="collapse")return!0;if($.opacity==="0")return!0;if($.width==="0"&&$.height==="0")return!0;let F=f.getBoundingClientRect();if(F.width===0&&F.height===0)return!0;let l=document.querySelector(`.${u}-flow__attribution`);if(!l||!l.isConnected)return!1;let U=getComputedStyle(l);if(U.display==="none")return!1;if(U.visibility==="hidden"||U.visibility==="collapse")return!1;if(U.opacity==="0")return!1;let _=l.getBoundingClientRect();if(_.width===0&&_.height===0)return!1;return!0}var QQ=!1;function DQ(u){return}function I$(u){return u===null?null:u?"valid":"invalid"}function O3(u,{snapGrid:f=[0,0],snapToGrid:$=!1,transform:F,containerBounds:l}){let{x:U,y:_}=wf(u),Q=w4({x:U-(l?.left??0),y:_-(l?.top??0)},F),{x:J,y:q}=$?K4(Q,f):Q;return{xSnapped:J,ySnapped:q,...Q}}var C6=(u)=>({width:u.offsetWidth,height:u.offsetHeight}),y$=(u)=>u?.getRootNode?.()||window?.document,Hz=["INPUT","SELECT","TEXTAREA"];function k$(u){let f=u.composedPath?.()?.[0]||u.target;if(f?.nodeType!==1)return!1;return Hz.includes(f.nodeName)||f.hasAttribute("contenteditable")||!!f.closest(".nokey")}var P$=(u)=>("clientX"in u),wf=(u,f)=>{let $=P$(u),F=$?u.clientX:u.touches?.[0].clientX,l=$?u.clientY:u.touches?.[0].clientY;return{x:F-(f?.left??0),y:l-(f?.top??0)}},JQ=(u,f,$,F,l)=>{let U=f.querySelectorAll(`.${u}`);if(!U||!U.length)return null;return Array.from(U).map((_)=>{let Q=_.getBoundingClientRect();return{id:_.getAttribute("data-handleid"),type:u,nodeId:l,position:_.getAttribute("data-handlepos"),x:(Q.left-$.left)/F,y:(Q.top-$.top)/F,...C6(_)}})};function h6({sourceX:u,sourceY:f,targetX:$,targetY:F,sourceControlX:l,sourceControlY:U,targetControlX:_,targetControlY:Q}){let J=u*0.125+l*0.375+_*0.375+$*0.125,q=f*0.125+U*0.375+Q*0.375+F*0.125,T=Math.abs(J-u),W=Math.abs(q-f);return[J,q,T,W]}function j6(u,f){if(u>=0)return 0.5*u;return f*25*Math.sqrt(-u)}function qQ({pos:u,x1:f,y1:$,x2:F,y2:l,c:U}){switch(u){case a.Left:return[f-j6(f-F,U),$];case a.Right:return[f+j6(F-f,U),$];case a.Top:return[f,$-j6($-l,U)];case a.Bottom:return[f,$+j6(l-$,U)]}}function v6({sourceX:u,sourceY:f,sourcePosition:$=a.Bottom,targetX:F,targetY:l,targetPosition:U=a.Top,curvature:_=0.25}){let[Q,J]=qQ({pos:$,x1:u,y1:f,x2:F,y2:l,c:_}),[q,T]=qQ({pos:U,x1:F,y1:l,x2:u,y2:f,c:_}),[W,A,K,L]=h6({sourceX:u,sourceY:f,targetX:F,targetY:l,sourceControlX:Q,sourceControlY:J,targetControlX:q,targetControlY:T});return[`M${u},${f} C${Q},${J} ${q},${T} ${F},${l}`,W,A,K,L]}function r$({sourceX:u,sourceY:f,targetX:$,targetY:F}){let l=Math.abs($-u)/2,U=$<u?$+l:$-l,_=Math.abs(F-f)/2,Q=F<f?F+_:F-_;return[U,Q,l,_]}function OQ({sourceNode:u,targetNode:f,selected:$=!1,zIndex:F=0,elevateOnSelect:l=!1,zIndexMode:U="basic"}){if(U==="manual")return F;let _=l&&$?F+1000:F,Q=Math.max(u.parentId||l&&u.selected?u.internals.z:0,f.parentId||l&&f.selected?f.internals.z:0);return _+Q}function SQ({sourceNode:u,targetNode:f,width:$,height:F,transform:l}){let U=P6(I6(u),I6(f));if(U.x===U.x2)U.x2+=1;if(U.y===U.y2)U.y2+=1;let _={x:-l[0]/l[2],y:-l[1]/l[2],width:$/l[2],height:F/l[2]};return j3(_,r6(U))>0}var zz=({source:u,sourceHandle:f,target:$,targetHandle:F})=>`xy-edge__${u}${f||""}-${$}${F||""}`,Zz=(u,f)=>{return f.some(($)=>$.source===u.source&&$.target===u.target&&($.sourceHandle===u.sourceHandle||!$.sourceHandle&&!u.sourceHandle)&&($.targetHandle===u.targetHandle||!$.targetHandle&&!u.targetHandle))},jQ=(u,f,$={})=>{if(!u.source||!u.target)return $.onError?.("006",Uf.error006()),f;let F=$.getEdgeId||zz,l;if(R$(u))l={...u};else l={...u,id:F(u)};if(Zz(l,f))return f;if(l.sourceHandle===null)delete l.sourceHandle;if(l.targetHandle===null)delete l.targetHandle;return f.concat(l)};function x6({sourceX:u,sourceY:f,targetX:$,targetY:F}){let[l,U,_,Q]=r$({sourceX:u,sourceY:f,targetX:$,targetY:F});return[`M ${u},${f}L ${$},${F}`,l,U,_,Q]}var TQ={[a.Left]:{x:-1,y:0},[a.Right]:{x:1,y:0},[a.Top]:{x:0,y:-1},[a.Bottom]:{x:0,y:1}},Yz=({source:u,sourcePosition:f=a.Bottom,target:$})=>{if(f===a.Left||f===a.Right)return u.x<$.x?{x:1,y:0}:{x:-1,y:0};return u.y<$.y?{x:0,y:1}:{x:0,y:-1}},AQ=(u,f)=>Math.sqrt(Math.pow(f.x-u.x,2)+Math.pow(f.y-u.y,2)),Rz=(u,f,$)=>u.x===f.x&&f.x===$.x&&(f.y-u.y)*($.y-f.y)>=0||u.y===f.y&&f.y===$.y&&(f.x-u.x)*($.x-f.x)>=0;function Mz({source:u,sourcePosition:f=a.Bottom,target:$,targetPosition:F=a.Top,center:l,offset:U,stepPosition:_}){let Q=TQ[f],J=TQ[F],q={x:u.x+Q.x*U,y:u.y+Q.y*U},T={x:$.x+J.x*U,y:$.y+J.y*U},W=Yz({source:q,sourcePosition:f,target:T}),A=W.x!==0?"x":"y",K=W[A],L=[],z,Z,B={x:0,y:0},G={x:0,y:0},[,,w,H]=r$({sourceX:u.x,sourceY:u.y,targetX:$.x,targetY:$.y});if(Q[A]*J[A]===-1){if(A==="x")z=l.x??q.x+(T.x-q.x)*_,Z=l.y??(q.y+T.y)/2;else z=l.x??(q.x+T.x)/2,Z=l.y??q.y+(T.y-q.y)*_;let V=[{x:z,y:q.y},{x:z,y:T.y}],D=[{x:q.x,y:Z},{x:T.x,y:Z}];if(Q[A]===K)L=A==="x"?V:D;else L=A==="x"?D:V}else{let V=[{x:q.x,y:T.y}],D=[{x:T.x,y:q.y}];if(A==="x")L=Q.x===K?D:V;else L=Q.y===K?V:D;if(f===F){let Y=Math.abs(u[A]-$[A]);if(Y<=U){let X=Math.min(U-1,U-Y);if(Q[A]===K)B[A]=(q[A]>u[A]?-1:1)*X;else G[A]=(T[A]>$[A]?-1:1)*X}}if(f!==F){let Y=A==="x"?"y":"x",X=Q[A]===J[Y],O=q[Y]>T[Y],j=q[Y]<T[Y];if(Q[A]===1&&(!X&&O||X&&j)||Q[A]!==1&&(!X&&j||X&&O))L=A==="x"?V:D}let r={x:q.x+B.x,y:q.y+B.y},C={x:T.x+G.x,y:T.y+G.y},m=Math.max(Math.abs(r.x-L[0].x),Math.abs(C.x-L[0].x)),v=Math.max(Math.abs(r.y-L[0].y),Math.abs(C.y-L[0].y));if(m>=v)z=(r.x+C.x)/2,Z=L[0].y;else z=L[0].x,Z=(r.y+C.y)/2}let M={x:q.x+B.x,y:q.y+B.y},R={x:T.x+G.x,y:T.y+G.y},E=[];for(let V of[u,M,...L,R,$]){let[D,r]=E.slice(-2);if(r&&Rz(D,r,V))E.pop();E.push(V)}return[E,z,Z,w,H]}function Ez(u,f,$,F){let l=Math.min(AQ(u,f)/2,AQ(f,$)/2,F),{x:U,y:_}=f;if(u.x===U&&U===$.x||u.y===_&&_===$.y)return`L${U} ${_}`;if(u.y===_){let q=u.x<$.x?-1:1,T=u.y<$.y?1:-1;return`L ${U+l*q},${_}Q ${U},${_} ${U},${_+l*T}`}let Q=u.x<$.x?1:-1,J=u.y<$.y?-1:1;return`L ${U},${_+l*J}Q ${U},${_} ${U+l*Q},${_}`}function I3({sourceX:u,sourceY:f,sourcePosition:$=a.Bottom,targetX:F,targetY:l,targetPosition:U=a.Top,borderRadius:_=5,centerX:Q,centerY:J,offset:q=20,stepPosition:T=0.5}){let[W,A,K,L,z]=Mz({source:{x:u,y:f},sourcePosition:$,target:{x:F,y:l},targetPosition:U,center:{x:Q,y:J},offset:q,stepPosition:T}),Z=`M${W[0].x} ${W[0].y}`;for(let B=1;B<W.length-1;B++)Z+=Ez(W[B-1],W[B],W[B+1],_);return Z+=`L${W[W.length-1].x} ${W[W.length-1].y}`,[Z,A,K,L,z]}function WQ(u){return u&&!!(u.internals.handleBounds||u.handles?.length)&&!!(u.measured.width||u.width||u.initialWidth)}function NQ(u){let{sourceNode:f,targetNode:$}=u;if(!WQ(f)||!WQ($))return null;let F=f.internals.handleBounds||KQ(f.handles),l=$.internals.handleBounds||KQ($.handles),U=wQ(F?.source??[],u.sourceHandle),_=wQ(u.connectionMode===h0.Strict?l?.target??[]:(l?.target??[]).concat(l?.source??[]),u.targetHandle);if(!U||!_)return u.onError?.("008",Uf.error008(!U?"source":"target",{id:u.id,sourceHandle:u.sourceHandle,targetHandle:u.targetHandle})),null;let Q=U?.position||a.Bottom,J=_?.position||a.Top,q=v0(f,U,Q),T=v0($,_,J);return{sourceX:q.x,sourceY:q.y,targetX:T.x,targetY:T.y,sourcePosition:Q,targetPosition:J}}function KQ(u){if(!u)return null;let f=[],$=[];for(let F of u)if(F.width=F.width??1,F.height=F.height??1,F.type==="source")f.push(F);else if(F.type==="target")$.push(F);return{source:f,target:$}}function v0(u,f,$=a.Left,F=!1){let l=(f?.x??0)+u.internals.positionAbsolute.x,U=(f?.y??0)+u.internals.positionAbsolute.y,{width:_,height:Q}=f??Bf(u);if(F)return{x:l+_/2,y:U+Q/2};switch(f?.position??$){case a.Top:return{x:l+_/2,y:U};case a.Right:return{x:l+_,y:U+Q/2};case a.Bottom:return{x:l+_/2,y:U+Q};case a.Left:return{x:l,y:U+Q/2}}}function wQ(u,f){if(!u)return null;return(!f?u[0]:u.find(($)=>$.id===f))||null}function c6(u,f){if(!u)return"";if(typeof u==="string")return u;return`${f?`${f}__`:""}${Object.keys(u).sort().map((F)=>`${F}=${u[F]}`).join("&")}`}function IQ(u,{id:f,defaultColor:$,defaultMarkerStart:F,defaultMarkerEnd:l}){let U=new Set;return u.reduce((_,Q)=>{return[Q.markerStart||F,Q.markerEnd||l].forEach((J)=>{if(J&&typeof J==="object"){let q=c6(J,f);if(!U.has(q))_.push({id:q,color:J.color||$,...J}),U.add(q)}}),_},[]).sort((_,Q)=>_.id.localeCompare(Q.id))}var yQ=1000,Vz=10,C$={nodeOrigin:[0,0],nodeExtent:T4,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Xz={...C$,checkEquality:!0};function h$(u,f){let $={...u};for(let F in f)if(f[F]!==void 0)$[F]=f[F];return $}function kQ(u,f,$){let F=h$(C$,$);for(let l of u.values())if(l.parentId)x$(l,u,f,F);else{let U=S3(l,F.nodeOrigin),_=H1(l.extent)?l.extent:F.nodeExtent,Q=L1(U,_,Bf(l));l.internals.positionAbsolute=Q}}function Dz(u,f){if(!u.handles)return!u.measured?void 0:f?.internals.handleBounds;let $=[],F=[];for(let l of u.handles){let U={id:l.id,width:l.width??1,height:l.height??1,nodeId:u.id,x:l.x,y:l.y,position:l.position,type:l.type};if(l.type==="source")$.push(U);else if(l.type==="target")F.push(U)}return{source:$,target:F}}function v$(u){return u==="manual"}function m6(u,f,$,F={}){let l=h$(Xz,F),U={i:0},_=new Map(f),Q=l?.elevateNodesOnSelect&&!v$(l.zIndexMode)?yQ:0,J=u.length>0,q=!1;f.clear(),$.clear();for(let T of u){let W=_.get(T.id);if(l.checkEquality&&T===W?.internals.userNode)f.set(T.id,W);else{let A=S3(T,l.nodeOrigin),K=H1(T.extent)?T.extent:l.nodeExtent,L=L1(A,K,Bf(T));W={...l.defaults,...T,measured:{width:T.measured?.width,height:T.measured?.height},internals:{positionAbsolute:L,handleBounds:Dz(T,W),z:PQ(T,Q,l.zIndexMode),userNode:T}},f.set(T.id,W)}if((W.measured===void 0||W.measured.width===void 0||W.measured.height===void 0)&&!W.hidden)J=!1;if(T.parentId)x$(W,f,$,F,U);q||=T.selected??!1}return{nodesInitialized:J,hasSelectedNodes:q}}function Oz(u,f){if(!u.parentId)return;let $=f.get(u.parentId);if($)$.set(u.id,u);else f.set(u.parentId,new Map([[u.id,u]]))}function x$(u,f,$,F,l){let{elevateNodesOnSelect:U,nodeOrigin:_,nodeExtent:Q,zIndexMode:J}=h$(C$,F),q=u.parentId,T=f.get(q);if(!T){console.warn(`Parent node ${q} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}if(Oz(u,$),l&&!T.parentId&&T.internals.rootParentIndex===void 0&&J==="auto")T.internals.rootParentIndex=++l.i,T.internals.z=T.internals.z+l.i*Vz;if(l&&T.internals.rootParentIndex!==void 0)l.i=T.internals.rootParentIndex;let W=U&&!v$(J)?yQ:0,{x:A,y:K,z:L}=Sz(u,T,_,Q,W,J),{positionAbsolute:z}=u.internals,Z=A!==z.x||K!==z.y;if(Z||L!==u.internals.z)f.set(u.id,{...u,internals:{...u.internals,positionAbsolute:Z?{x:A,y:K}:z,z:L}})}function PQ(u,f,$){let F=Kf(u.zIndex)?u.zIndex:0;if(v$($))return F;return F+(u.selected?f:0)}function Sz(u,f,$,F,l,U){let{x:_,y:Q}=f.internals.positionAbsolute,J=Bf(u),q=S3(u,$),T=H1(u.extent)?L1(q,u.extent,J):q,W=L1({x:_+T.x,y:Q+T.y},F,J);if(u.extent==="parent")W=MQ(W,J,f);let A=PQ(u,l,U),K=f.internals.z??0;return{x:W.x,y:W.y,z:K>=A?K+1:A}}function p6(u,f,$,F=[0,0]){let l=[],U=new Map;for(let _ of u){let Q=f.get(_.parentId);if(!Q)continue;let J=U.get(_.parentId)?.expandedRect??W4(Q),q=X$(J,_.rect);U.set(_.parentId,{expandedRect:q,parent:Q})}if(U.size>0)U.forEach(({expandedRect:_,parent:Q},J)=>{let q=Q.internals.positionAbsolute,T=Bf(Q),W=Q.origin??F,A=_.x<q.x?Math.round(Math.abs(q.x-_.x)):0,K=_.y<q.y?Math.round(Math.abs(q.y-_.y)):0,L=Math.max(T.width,Math.round(_.width)),z=Math.max(T.height,Math.round(_.height)),Z=(L-T.width)*W[0],B=(z-T.height)*W[1];if(A>0||K>0||Z||B)l.push({id:J,type:"position",position:{x:Q.position.x-A+Z,y:Q.position.y-K+B}}),$.get(J)?.forEach((G)=>{if(!u.some((w)=>w.id===G.id))l.push({id:G.id,type:"position",position:{x:G.position.x+A,y:G.position.y+K}})});if(T.width<_.width||T.height<_.height||A||K)l.push({id:J,type:"dimensions",setAttributes:!0,dimensions:{width:L+(A?W[0]*A-Z:0),height:z+(K?W[1]*K-B:0)}})});return l}function rQ(u,f,$,F,l,U,_){let Q=F?.querySelector(".xyflow__viewport"),J=!1;if(!Q)return{changes:[],updatedInternals:J};let q=[],T=window.getComputedStyle(Q),{m22:W}=new window.DOMMatrixReadOnly(T.transform),A=[];for(let K of u.values()){let L=f.get(K.id);if(!L)continue;if(L.hidden){f.set(L.id,{...L,internals:{...L.internals,handleBounds:void 0}}),J=!0;continue}let z=C6(K.nodeElement),Z=L.measured.width!==z.width||L.measured.height!==z.height;if(!!(z.width&&z.height&&(Z||!L.internals.handleBounds||K.force))){let G=K.nodeElement.getBoundingClientRect(),w=H1(L.extent)?L.extent:U,{positionAbsolute:H}=L.internals;if(L.parentId&&L.extent==="parent"){let R=f.get(L.parentId);if(R)H=MQ(H,z,R)}else if(w)H=L1(H,w,z);let M={...L,measured:z,internals:{...L.internals,positionAbsolute:H,handleBounds:{source:JQ("source",K.nodeElement,G,W,L.id),target:JQ("target",K.nodeElement,G,W,L.id)}}};if(f.set(L.id,M),L.parentId)x$(M,f,$,{nodeOrigin:l,zIndexMode:_});if(J=!0,Z){if(q.push({id:L.id,type:"dimensions",dimensions:z}),L.expandParent&&L.parentId)A.push({id:L.id,parentId:L.parentId,rect:W4(M,l)})}}}if(A.length>0){let K=p6(A,f,$,l);q.push(...K)}return{changes:q,updatedInternals:J}}async function CQ({delta:u,panZoom:f,transform:$,translateExtent:F,width:l,height:U}){if(!f||!u.x&&!u.y)return!1;let _=await f.setViewportConstrained({x:$[0]+u.x,y:$[1]+u.y,zoom:$[2]},[[0,0],[l,U]],F);return!!_&&(_.x!==$[0]||_.y!==$[1]||_.k!==$[2])}function BQ(u,f,$,F,l,U){let _=l,Q=F.get(_)||new Map;F.set(_,Q.set($,f)),_=`${l}-${u}`;let J=F.get(_)||new Map;if(F.set(_,J.set($,f)),U){_=`${l}-${u}-${U}`;let q=F.get(_)||new Map;F.set(_,q.set($,f))}}function c$(u,f,$){u.clear(),f.clear();for(let F of $){let{source:l,target:U,sourceHandle:_=null,targetHandle:Q=null}=F,J={edgeId:F.id,source:l,target:U,sourceHandle:_,targetHandle:Q},q=`${l}-${_}--${U}-${Q}`,T=`${U}-${Q}--${l}-${_}`;BQ("source",J,T,u,l,_),BQ("target",J,q,u,U,Q),f.set(F.id,F)}}function hQ(u,f){if(!u.parentId)return!1;let $=f.get(u.parentId);if(!$)return!1;if($.selected)return!0;return hQ($,f)}function LQ(u,f,$){let F=u;do{if(F?.matches?.(f))return!0;if(F===$)return!1;F=F?.parentElement}while(F);return!1}function jz(u,f,$,F,l){let U=new Map;for(let[_,Q]of u)if((l?Q.id===F:Q.selected||Q.id===F)&&(l||!Q.parentId||!hQ(Q,u))&&(Q.draggable||f&&typeof Q.draggable>"u")){let q=u.get(_);if(q)U.set(_,{id:_,position:q.position||{x:0,y:0},distance:{x:$.x-q.internals.positionAbsolute.x,y:$.y-q.internals.positionAbsolute.y},extent:q.extent,parentId:q.parentId,origin:q.origin,expandParent:q.expandParent,internals:{positionAbsolute:q.internals.positionAbsolute||{x:0,y:0}},measured:{width:q.measured.width??0,height:q.measured.height??0}})}return U}function B$({nodeId:u,dragItems:f,nodeLookup:$,dragging:F=!0}){let l=[];for(let[_,Q]of f){let J=$.get(_)?.internals.userNode;if(J)l.push({...J,position:Q.position,dragging:F})}if(!u)return[l[0],l];let U=$.get(u)?.internals.userNode;return[!U?l[0]:{...U,position:f.get(u)?.position||U.position,dragging:F},l]}function Nz({dragItems:u,snapGrid:f,x:$,y:F}){let l=u.values().next().value;if(!l)return null;let U={x:$-l.distance.x,y:F-l.distance.y},_=K4(U,f);return{x:_.x-U.x,y:_.y-U.y}}function vQ({onNodeMouseDown:u,getStoreItems:f,onDragStart:$,onDrag:F,onDragStop:l}){let U={x:null,y:null},_=0,Q=new Map,J=!1,q={x:0,y:0},T=null,W=!1,A=null,K=!1,L=!1,z=null;function Z({noDragClassName:G,handleSelector:w,domNode:H,isSelectable:M,nodeId:R,nodeClickDistance:E=0}){A=xu(H);function V({x:m,y:v}){let{nodeLookup:Y,nodeExtent:X,snapGrid:O,snapToGrid:j,nodeOrigin:k,onNodeDrag:P,onSelectionDrag:c,onError:x,updateNodePositions:g}=f();U={x:m,y:v};let $u=!1,i=Q.size>1,fu=i&&X?H$(A4(Q)):null,Fu=i&&j?Nz({dragItems:Q,snapGrid:O,x:m,y:v}):null;for(let[uu,h]of Q){if(!Y.has(uu))continue;let n={x:m-h.distance.x,y:v-h.distance.y};if(j)n=Fu?{x:Math.round(n.x+Fu.x),y:Math.round(n.y+Fu.y)}:K4(n,O);let N=null;if(i&&X&&!h.extent&&fu){let{positionAbsolute:d}=h.internals,e=d.x-fu.x+X[0][0],lu=d.x+h.measured.width-fu.x2+X[1][0],Uu=d.y-fu.y+X[0][1],Nu=d.y+h.measured.height-fu.y2+X[1][1];N=[[e,Uu],[lu,Nu]]}let{position:b,positionAbsolute:s}=V$({nodeId:uu,nextPosition:n,nodeLookup:Y,nodeExtent:N?N:X,nodeOrigin:k,onError:x});$u=$u||h.position.x!==b.x||h.position.y!==b.y,h.position=b,h.internals.positionAbsolute=s}if(L=L||$u,!$u)return;if(g(Q,!0),z&&(F||P||!R&&c)){let[uu,h]=B$({nodeId:R,dragItems:Q,nodeLookup:Y});if(F?.(z,Q,uu,h),P?.(z,uu,h),!R)c?.(z,h)}}async function D(){if(!T)return;let{transform:m,panBy:v,autoPanSpeed:Y,autoPanOnNodeDrag:X}=f();if(!X){J=!1,cancelAnimationFrame(_);return}let[O,j]=k6(q,T,Y);if(O!==0||j!==0){if(U.x=(U.x??0)-O/m[2],U.y=(U.y??0)-j/m[2],await v({x:O,y:j}))V(U)}_=requestAnimationFrame(D)}function r(m){let{nodeLookup:v,multiSelectionActive:Y,nodesDraggable:X,transform:O,snapGrid:j,snapToGrid:k,selectNodesOnDrag:P,onNodeDragStart:c,onSelectionDragStart:x,unselectNodesAndEdges:g}=f();W=!0;let $u=!!R&&!Y&&!v.get(R)?.selected;if((!P||!M)&&!Y&&R){if(!v.get(R)?.selected)g()}if(M&&P&&R)u?.(R);let i=O3(m.sourceEvent,{transform:O,snapGrid:j,snapToGrid:k,containerBounds:T});if(U=i,Q=jz(v,X,i,R,$u),Q.size>0&&($||c||!R&&x)){let[fu,Fu]=B$({nodeId:R,dragItems:Q,nodeLookup:v});if($?.(m.sourceEvent,Q,fu,Fu),c?.(m.sourceEvent,fu,Fu),!R)x?.(m.sourceEvent,Fu)}}let C=c7().clickDistance(E).on("start",(m)=>{let{domNode:v,nodeDragThreshold:Y,transform:X,snapGrid:O,snapToGrid:j}=f();if(T=v?.getBoundingClientRect()||null,K=!1,L=!1,z=m.sourceEvent,Y===0)r(m);U=O3(m.sourceEvent,{transform:X,snapGrid:O,snapToGrid:j,containerBounds:T}),q=wf(m.sourceEvent,T)}).on("drag",(m)=>{let{autoPanOnNodeDrag:v,transform:Y,snapGrid:X,snapToGrid:O,nodeDragThreshold:j,nodeLookup:k}=f(),P=O3(m.sourceEvent,{transform:Y,snapGrid:X,snapToGrid:O,containerBounds:T});if(z=m.sourceEvent,m.sourceEvent.type==="touchmove"&&m.sourceEvent.touches.length>1||R&&!k.has(R))K=!0;if(K)return;if(!J&&v&&W)J=!0,D();if(!W){let c=wf(m.sourceEvent,T),x=c.x-q.x,g=c.y-q.y;if(Math.sqrt(x*x+g*g)>j)r(m)}if((U.x!==P.xSnapped||U.y!==P.ySnapped)&&Q&&W)q=wf(m.sourceEvent,T),V(P)}).on("end",(m)=>{if(!W||K){if(K&&Q.size>0)f().updateNodePositions(Q,!1);return}if(J=!1,W=!1,cancelAnimationFrame(_),Q.size>0){let{nodeLookup:v,updateNodePositions:Y,onNodeDragStop:X,onSelectionDragStop:O}=f();if(L)Y(Q,!1),L=!1;if(l||X||!R&&O){let[j,k]=B$({nodeId:R,dragItems:Q,nodeLookup:v,dragging:!1});if(l?.(m.sourceEvent,Q,j,k),X?.(m.sourceEvent,j,k),!R)O?.(m.sourceEvent,k)}}}).filter((m)=>{let v=m.target;return!m.button&&(!G||!LQ(v,`.${G}`,H))&&(!w||LQ(v,w,H))});A.call(C)}function B(){A?.on(".drag",null)}return{update:Z,destroy:B}}function Iz(u,f,$){let F=[],l={x:u.x-$,y:u.y-$,width:$*2,height:$*2};for(let U of f.values())if(j3(l,W4(U))>0)F.push(U);return F}var yz=250;function kz(u,f,$,F){let l=[],U=1/0,_=Iz(u,$,f+yz);for(let Q of _){let J=[...Q.internals.handleBounds?.source??[],...Q.internals.handleBounds?.target??[]];for(let q of J){if(F.nodeId===q.nodeId&&F.type===q.type&&F.id===q.id)continue;let{x:T,y:W}=v0(Q,q,q.position,!0),A=Math.sqrt(Math.pow(T-u.x,2)+Math.pow(W-u.y,2));if(A>f)continue;if(A<U)l=[{...q,x:T,y:W}],U=A;else if(A===U)l.push({...q,x:T,y:W})}}if(!l.length)return null;if(l.length>1){let Q=F.type==="source"?"target":"source";return l.find((J)=>J.type===Q)??l[0]}return l[0]}function xQ(u,f,$,F,l,U=!1){let _=F.get(u);if(!_)return null;let Q=l==="strict"?_.internals.handleBounds?.[f]:[..._.internals.handleBounds?.source??[],..._.internals.handleBounds?.target??[]],J=($?Q?.find((q)=>q.id===$):Q?.[0])??null;return J&&U?{...J,...v0(_,J,J.position,!0)}:J}function cQ(u,f){if(u)return u;else if(f?.classList.contains("target"))return"target";else if(f?.classList.contains("source"))return"source";return null}function Pz(u,f){let $=null;if(f)$=!0;else if(u&&!f)$=!1;return $}var mQ=()=>!0;function rz(u,{connectionMode:f,connectionRadius:$,handleId:F,nodeId:l,edgeUpdaterType:U,isTarget:_,domNode:Q,nodeLookup:J,lib:q,autoPanOnConnect:T,flowId:W,panBy:A,cancelConnection:K,onConnectStart:L,onConnect:z,onConnectEnd:Z,isValidConnection:B=mQ,onReconnectEnd:G,updateConnection:w,getTransform:H,getFromHandle:M,autoPanSpeed:R,dragThreshold:E=1,handleDomNode:V}){let D=y$(u.target),r=0,C,{x:m,y:v}=wf(u),Y=cQ(U,V),X=Q?.getBoundingClientRect(),O=!1;if(!X||!Y)return;let j=xQ(l,Y,F,J,f);if(!j)return;let k=wf(u,X),P=!1,c=null,x=!1,g=null;function $u(){if(!T||!X)return;let[b,s]=k6(k,X,R);A({x:b,y:s}),r=requestAnimationFrame($u)}let i={...j,nodeId:l,type:Y,position:j.position},fu=J.get(l),uu={inProgress:!0,isValid:null,from:v0(fu,i,a.Left,!0),fromHandle:i,fromPosition:i.position,fromNode:fu,to:k,toHandle:null,toPosition:UQ[i.position],toNode:null,pointer:k};function h(){O=!0,w(uu),L?.(u,{nodeId:l,handleId:F,handleType:Y})}if(E===0)h();function n(b){if(!O){let{x:Nu,y:bf}=wf(b),jf=Nu-m,Nf=bf-v;if(!(jf*jf+Nf*Nf>E*E))return;h()}if(!M()||!i){N(b);return}let s=H();if(k=wf(b,X),C=kz(w4(k,s,!1,[1,1]),$,J,i),!P)$u(),P=!0;let d=pQ(b,{handle:C,connectionMode:f,fromNodeId:l,fromHandleId:F,fromType:_?"target":"source",isValidConnection:B,doc:D,lib:q,flowId:W,nodeLookup:J});g=d.handleDomNode,c=d.connection,x=Pz(!!C,d.isValid);let e=J.get(l),lu=e?v0(e,i,a.Left,!0):uu.from,Uu={...uu,from:lu,isValid:x,to:d.toHandle&&x?G1({x:d.toHandle.x,y:d.toHandle.y},s):k,toHandle:d.toHandle,toPosition:x&&d.toHandle?d.toHandle.position:UQ[i.position],toNode:d.toHandle?J.get(d.toHandle.nodeId):null,pointer:k};w(Uu),uu=Uu}function N(b){if("touches"in b&&b.touches.length>0)return;if(O){if((C||g)&&c&&x)z?.(c);let{inProgress:s,...d}=uu,e={...d,toPosition:uu.toHandle?uu.toPosition:null};if(Z?.(b,e),U)G?.(b,e)}K(),cancelAnimationFrame(r),P=!1,x=!1,c=null,g=null,D.removeEventListener("mousemove",n),D.removeEventListener("mouseup",N),D.removeEventListener("touchmove",n),D.removeEventListener("touchend",N)}D.addEventListener("mousemove",n),D.addEventListener("mouseup",N),D.addEventListener("touchmove",n),D.addEventListener("touchend",N)}function pQ(u,{handle:f,connectionMode:$,fromNodeId:F,fromHandleId:l,fromType:U,doc:_,lib:Q,flowId:J,isValidConnection:q=mQ,nodeLookup:T}){let W=U==="target",A=f?_.querySelector(`.${Q}-flow__handle[data-id="${J}-${f?.nodeId}-${f?.id}-${f?.type}"]`):null,{x:K,y:L}=wf(u),z=_.elementFromPoint(K,L),Z=z?.classList.contains(`${Q}-flow__handle`)?z:A,B={handleDomNode:Z,isValid:!1,connection:null,toHandle:null};if(Z){let G=cQ(void 0,Z),w=Z.getAttribute("data-nodeid"),H=Z.getAttribute("data-handleid"),M=Z.classList.contains("connectable"),R=Z.classList.contains("connectableend");if(!w||!G)return B;let E={source:W?w:F,sourceHandle:W?H:l,target:W?F:w,targetHandle:W?l:H};B.connection=E;let D=M&&R&&($===h0.Strict?W&&G==="source"||!W&&G==="target":w!==F||H!==l);B.isValid=D&&q(E),B.toHandle=xQ(w,G,H,T,$,!0)}return B}var b6={onPointerDown:rz,isValid:pQ};function bQ({domNode:u,panZoom:f,getTransform:$,getViewScale:F}){let l=xu(u);function U({translateExtent:Q,width:J,height:q,zoomStep:T=1,pannable:W=!0,zoomable:A=!0,inversePan:K=!1}){let L=(w)=>{if(w.sourceEvent.type!=="wheel"||!f)return;let H=$(),M=w.sourceEvent.ctrlKey&&B4()?10:1,R=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?0.05:w.sourceEvent.deltaMode?1:0.002)*T,E=H[2]*Math.pow(2,R*M);f.scaleTo(E)},z=[0,0],Z=(w)=>{if(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")z=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY]},B=(w)=>{let H=$();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!f)return;let M=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],R=[M[0]-z[0],M[1]-z[1]];z=M;let E=F()*Math.max(H[2],Math.log(H[2]))*(K?-1:1),V={x:H[0]-R[0]*E,y:H[1]-R[1]*E},D=[[0,0],[J,q]];f.setViewportConstrained({x:V.x,y:V.y,zoom:H[2]},D,Q)},G=w$().on("start",Z).on("zoom",W?B:null).on("zoom.wheel",A?L:null);l.call(G,{})}function _(){l.on("zoom",null)}return{update:U,destroy:_,pointer:du}}var i6=(u)=>({x:u.x,y:u.y,zoom:u.k}),L$=({x:u,y:f,zoom:$})=>D3.translate(u,f).scale($),C0=(u,f)=>u.target.closest(`.${f}`),iQ=(u,f)=>f===2&&Array.isArray(u)&&u.includes(2),Cz=(u)=>((u*=2)<=1?u*u*u:(u-=2)*u*u+2)/2,G$=(u,f=0,$=Cz,F=()=>{})=>{let l=typeof f==="number"&&f>0;if(!l)F();return l?u.transition().duration(f).ease($).on("end",F):u},gQ=(u)=>{let f=u.ctrlKey&&B4()?10:1;return-u.deltaY*(u.deltaMode===1?0.05:u.deltaMode?1:0.002)*f};function hz({zoomPanValues:u,noWheelClassName:f,d3Selection:$,d3Zoom:F,panOnScrollMode:l,panOnScrollSpeed:U,zoomOnPinch:_,onPanZoomStart:Q,onPanZoom:J,onPanZoomEnd:q}){return(T)=>{if(C0(T,f)){if(T.ctrlKey)T.preventDefault();return!1}T.preventDefault(),T.stopImmediatePropagation();let W=$.property("__zoom").k||1;if(T.ctrlKey&&_){let Z=du(T),B=gQ(T),G=W*Math.pow(2,B);F.scaleTo($,G,Z,T);return}let A=T.deltaMode===1?20:1,K=l===T0.Vertical?0:T.deltaX*A,L=l===T0.Horizontal?0:T.deltaY*A;if(!B4()&&T.shiftKey&&l!==T0.Vertical)K=T.deltaY*A,L=0;F.translateBy($,-(K/W)*U,-(L/W)*U,{internal:!0});let z=i6($.property("__zoom"));if(clearTimeout(u.panScrollTimeout),!u.isPanScrolling)u.isPanScrolling=!0,Q?.(T,z);else J?.(T,z);u.panScrollTimeout=setTimeout(()=>{q?.(T,z),u.isPanScrolling=!1},150)}}function vz({noWheelClassName:u,preventScrolling:f,d3ZoomHandler:$}){return function(F,l){let U=F.type==="wheel",_=!f&&U&&!F.ctrlKey,Q=C0(F,u);if(F.ctrlKey&&U&&Q)F.preventDefault();if(_||Q)return null;F.preventDefault(),$.call(this,F,l)}}function xz({zoomPanValues:u,onDraggingChange:f,onPanZoomStart:$}){return(F)=>{if(F.sourceEvent?.internal)return;let l=i6(F.transform);if(u.mouseButton=F.sourceEvent?.button||0,u.isZoomingOrPanning=!0,u.prevViewport=l,F.sourceEvent?.type==="mousedown")f(!0);if($)$?.(F.sourceEvent,l)}}function cz({zoomPanValues:u,panOnDrag:f,onPaneContextMenu:$,onTransformChange:F,onPanZoom:l}){return(U)=>{if(u.usedRightMouseButton=!!($&&iQ(f,u.mouseButton??0)),!U.sourceEvent?.sync)F([U.transform.x,U.transform.y,U.transform.k]);if(l&&!U.sourceEvent?.internal)l?.(U.sourceEvent,i6(U.transform))}}function mz({zoomPanValues:u,panOnDrag:f,panOnScroll:$,onDraggingChange:F,onPanZoomEnd:l,onPaneContextMenu:U}){return(_)=>{if(_.sourceEvent?.internal)return;if(u.isZoomingOrPanning=!1,U&&iQ(f,u.mouseButton??0)&&!u.usedRightMouseButton&&_.sourceEvent)U(_.sourceEvent);if(u.usedRightMouseButton=!1,F(!1),l){let Q=i6(_.transform);u.prevViewport=Q,clearTimeout(u.timerId),u.timerId=setTimeout(()=>{l?.(_.sourceEvent,Q)},$?150:0)}}}function pz({panActivationKeyPressed:u,zoomActivationKeyPressed:f,zoomOnScroll:$,zoomOnPinch:F,panOnDrag:l,panOnScroll:U,zoomOnDoubleClick:_,userSelectionActive:Q,noWheelClassName:J,noPanClassName:q,lib:T,connectionInProgress:W}){return(A)=>{let K=f||$,L=F&&A.ctrlKey,z=A.type==="wheel";if(A.button===1&&A.type==="mousedown"&&(C0(A,`${T}-flow__node`)||C0(A,`${T}-flow__edge`)||C0(A,`${T}-flow__selection`)||C0(A,`${T}-flow__nodesselection`)))return!0;if(!l&&!K&&!U&&!_&&!F)return!1;if(Q)return!1;if(W&&!z)return!1;if(C0(A,J)&&z)return!1;if(C0(A,q)&&(!z||U&&z&&!f))return!1;if(!F&&A.ctrlKey&&z)return!1;if(!F&&A.type==="touchstart"&&A.touches?.length>1)return A.preventDefault(),!1;if(!K&&!U&&!L&&z)return!1;if(!l&&(A.type==="mousedown"||A.type==="touchstart"))return!1;if(Array.isArray(l)&&!l.includes(A.button)&&A.type==="mousedown")return!1;let Z=Array.isArray(l)&&l.includes(A.button)||!A.button||A.button<=1;return(!A.ctrlKey||z||u)&&Z}}function sQ({domNode:u,minZoom:f,maxZoom:$,translateExtent:F,viewport:l,onPanZoom:U,onPanZoomStart:_,onPanZoomEnd:Q,onDraggingChange:J}){let q={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},T=u.getBoundingClientRect(),W=[[0,0],[T.width,T.height]],A=typeof ResizeObserver<"u"?new ResizeObserver((v)=>{let Y=v[0];if(Y?.contentRect)W=[[0,0],[Y.contentRect.width,Y.contentRect.height]]}):null;A?.observe(u);let K=w$().extent(()=>W).scaleExtent([f,$]).translateExtent(F),L=xu(u).call(K);H({x:l.x,y:l.y,zoom:q4(l.zoom,f,$)},[[0,0],[T.width,T.height]],F);let z=L.on("wheel.zoom"),Z=L.on("dblclick.zoom");K.wheelDelta(gQ);async function B(v,Y){if(L)return new Promise((X)=>{K?.interpolate(Y?.interpolate==="linear"?l4:U4).transform(G$(L,Y?.duration,Y?.ease,()=>X(!0)),v)});return!1}function G({noWheelClassName:v,noPanClassName:Y,onPaneContextMenu:X,userSelectionActive:O,panOnScroll:j,panOnDrag:k,panOnScrollMode:P,panOnScrollSpeed:c,preventScrolling:x,zoomOnPinch:g,zoomOnScroll:$u,zoomOnDoubleClick:i,panActivationKeyPressed:fu=!1,zoomActivationKeyPressed:Fu,lib:uu,onTransformChange:h,connectionInProgress:n,paneClickDistance:N,selectionOnDrag:b}){if(O&&!q.isZoomingOrPanning)K.on("zoom",null);let s=j&&!Fu&&!O;K.clickDistance(b?1/0:!Kf(N)||N<0?0:N);let d=s?hz({zoomPanValues:q,noWheelClassName:v,d3Selection:L,d3Zoom:K,panOnScrollMode:P,panOnScrollSpeed:c,zoomOnPinch:g,onPanZoomStart:_,onPanZoom:U,onPanZoomEnd:Q}):vz({noWheelClassName:v,preventScrolling:x,d3ZoomHandler:z});L.on("wheel.zoom",d,{passive:!1});let e=xz({zoomPanValues:q,onDraggingChange:J,onPanZoomStart:_});K.on("start",e);let lu=cz({zoomPanValues:q,panOnDrag:k,onPaneContextMenu:!!X,onPanZoom:U,onTransformChange:h});K.on("zoom",lu);let Uu=mz({zoomPanValues:q,panOnDrag:k,panOnScroll:j,onPaneContextMenu:X,onPanZoomEnd:Q,onDraggingChange:J});K.on("end",Uu);let Nu=pz({panActivationKeyPressed:fu,zoomActivationKeyPressed:Fu,panOnDrag:k,zoomOnScroll:$u,panOnScroll:j,zoomOnDoubleClick:i,zoomOnPinch:g,userSelectionActive:O,noPanClassName:Y,noWheelClassName:v,lib:uu,connectionInProgress:n});if(K.filter(Nu),i)L.on("dblclick.zoom",Z);else L.on("dblclick.zoom",null)}function w(){K.on("zoom",null),A?.disconnect()}async function H(v,Y,X){let O=L$(v),j=K?.constrain()(O,Y,X);if(j)await B(j);return j}async function M(v,Y){let X=L$(v);return await B(X,Y),X}function R(v){if(L){let Y=L$(v),X=L.property("__zoom");if(X.k!==v.zoom||X.x!==v.x||X.y!==v.y)K?.transform(L,Y,null,{sync:!0})}}function E(){let v=L?K$(L.node()):{x:0,y:0,k:1};return{x:v.x,y:v.y,zoom:v.k}}async function V(v,Y){if(L)return new Promise((X)=>{K?.interpolate(Y?.interpolate==="linear"?l4:U4).scaleTo(G$(L,Y?.duration,Y?.ease,()=>X(!0)),v)});return!1}async function D(v,Y){if(L)return new Promise((X)=>{K?.interpolate(Y?.interpolate==="linear"?l4:U4).scaleBy(G$(L,Y?.duration,Y?.ease,()=>X(!0)),v)});return!1}function r(v){K?.scaleExtent(v)}function C(v){K?.translateExtent(v)}function m(v){let Y=!Kf(v)||v<0?0:v;K?.clickDistance(Y)}return{update:G,destroy:w,setViewport:M,setViewportConstrained:H,getViewport:E,scaleTo:V,scaleBy:D,setScaleExtent:r,setTranslateExtent:C,syncViewport:R,setClickDistance:m}}var x0;(function(u){u.Line="line",u.Handle="handle"})(x0||(x0={}));function bz({width:u,prevWidth:f,height:$,prevHeight:F,affectsX:l,affectsY:U}){let _=u-f,Q=$-F,J=[_>0?1:_<0?-1:0,Q>0?1:Q<0?-1:0];if(_&&l)J[0]=J[0]*-1;if(Q&&U)J[1]=J[1]*-1;return J}function GQ(u){let f=u.includes("right")||u.includes("left"),$=u.includes("bottom")||u.includes("top"),F=u.includes("left"),l=u.includes("top");return{isHorizontal:f,isVertical:$,affectsX:F,affectsY:l}}function P0(u,f){return Math.max(0,f-u)}function r0(u,f){return Math.max(0,u-f)}function N6(u,f,$){return Math.max(0,f-u,u-$)}function HQ(u,f){return u?!f:f}function iz(u,f,$,F,l,U,_,Q){let{affectsX:J,affectsY:q}=f,{isHorizontal:T,isVertical:W}=f,A=T&&W,{xSnapped:K,ySnapped:L}=$,{minWidth:z,maxWidth:Z,minHeight:B,maxHeight:G}=F,{x:w,y:H,width:M,height:R,aspectRatio:E}=u,V=Math.floor(T?K-u.pointerX:0),D=Math.floor(W?L-u.pointerY:0),r=M+(J?-V:V),C=R+(q?-D:D),m=-U[0]*M,v=-U[1]*R,Y=N6(r,z,Z),X=N6(C,B,G);if(_){let k=0,P=0;if(J&&V<0)k=P0(w+V+m,_[0][0]);else if(!J&&V>0)k=r0(w+r+m,_[1][0]);if(q&&D<0)P=P0(H+D+v,_[0][1]);else if(!q&&D>0)P=r0(H+C+v,_[1][1]);Y=Math.max(Y,k),X=Math.max(X,P)}if(Q){let k=0,P=0;if(J&&V>0)k=r0(w+V,Q[0][0]);else if(!J&&V<0)k=P0(w+r,Q[1][0]);if(q&&D>0)P=r0(H+D,Q[0][1]);else if(!q&&D<0)P=P0(H+C,Q[1][1]);Y=Math.max(Y,k),X=Math.max(X,P)}if(l){if(T){let k=N6(r/E,B,G)*E;if(Y=Math.max(Y,k),_){let P=0;if(!J&&!q||J&&!q&&A)P=r0(H+v+r/E,_[1][1])*E;else P=P0(H+v+(J?V:-V)/E,_[0][1])*E;Y=Math.max(Y,P)}if(Q){let P=0;if(!J&&!q||J&&!q&&A)P=P0(H+r/E,Q[1][1])*E;else P=r0(H+(J?V:-V)/E,Q[0][1])*E;Y=Math.max(Y,P)}}if(W){let k=N6(C*E,z,Z)/E;if(X=Math.max(X,k),_){let P=0;if(!J&&!q||q&&!J&&A)P=r0(w+C*E+m,_[1][0])/E;else P=P0(w+(q?D:-D)*E+m,_[0][0])/E;X=Math.max(X,P)}if(Q){let P=0;if(!J&&!q||q&&!J&&A)P=P0(w+C*E,Q[1][0])/E;else P=r0(w+(q?D:-D)*E,Q[0][0])/E;X=Math.max(X,P)}}}if(D=D+(D<0?X:-X),V=V+(V<0?Y:-Y),l)if(A)if(r>C*E)D=(HQ(J,q)?-V:V)/E;else V=(HQ(J,q)?-D:D)*E;else if(T)D=V/E,q=J;else V=D*E,J=q;let O=J?w+V:w,j=q?H+D:H;return{width:M+(J?-V:V),height:R+(q?-D:D),x:U[0]*V*(!J?1:-1)+O,y:U[1]*D*(!q?1:-1)+j}}var tQ={width:0,height:0,x:0,y:0},gz={...tQ,pointerX:0,pointerY:0,aspectRatio:1};function sz(u,f,$){let F=f.position.x+u.position.x,l=f.position.y+u.position.y,U=u.measured.width??0,_=u.measured.height??0,Q=$[0]*U,J=$[1]*_;return[[F-Q,l-J],[F+U-Q,l+_-J]]}function nQ({domNode:u,nodeId:f,getStoreItems:$,onChange:F,onEnd:l}){let U=xu(u),_={controlDirection:GQ("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function Q({controlPosition:q,boundaries:T,keepAspectRatio:W,resizeDirection:A,onResizeStart:K,onResize:L,onResizeEnd:z,shouldResize:Z}){let B={...tQ},G={...gz};_={boundaries:T,resizeDirection:A,keepAspectRatio:W,controlDirection:GQ(q)};let w=void 0,H=null,M=[],R=void 0,E=void 0,V=void 0,D=c7().on("start",(r)=>{let{nodeLookup:C,transform:m,snapGrid:v,snapToGrid:Y,nodeOrigin:X,paneDomNode:O}=$();if(w=C.get(f),!w)return;H=O?.getBoundingClientRect()??null;let{xSnapped:j,ySnapped:k}=O3(r.sourceEvent,{transform:m,snapGrid:v,snapToGrid:Y,containerBounds:H});if(B={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},G={...B,pointerX:j,pointerY:k,aspectRatio:B.width/B.height},R=void 0,E=H1(w.extent)?w.extent:void 0,w.parentId&&(w.extent==="parent"||w.expandParent))R=C.get(w.parentId);if(R&&w.extent==="parent")E=[[0,0],[R.measured.width,R.measured.height]];M=[],V=void 0;for(let[P,c]of C)if(c.parentId===f){if(M.push({id:P,position:{...c.position},extent:c.extent}),c.extent==="parent"||c.expandParent){let x=sz(c,w,c.origin??X);if(V)V=[[Math.min(x[0][0],V[0][0]),Math.min(x[0][1],V[0][1])],[Math.max(x[1][0],V[1][0]),Math.max(x[1][1],V[1][1])]];else V=x}}K?.(r,{...B})}).on("drag",(r)=>{let{transform:C,snapGrid:m,snapToGrid:v,nodeOrigin:Y}=$(),X=O3(r.sourceEvent,{transform:C,snapGrid:m,snapToGrid:v,containerBounds:H}),O=[];if(!w)return;let{x:j,y:k,width:P,height:c}=B,x={},g=w.origin??Y,{width:$u,height:i,x:fu,y:Fu}=iz(G,_.controlDirection,X,_.boundaries,_.keepAspectRatio,g,E,V),uu=$u!==P,h=i!==c,n=fu!==j&&uu,N=Fu!==k&&h;if(!n&&!N&&!uu&&!h)return;let b={prevValues:{...B},startX:G.x,startY:G.y,childNodes:M.map((lu)=>({...lu,position:{...lu.position}}))};if(n||N||g[0]===1||g[1]===1){if(x.x=n?fu:B.x,x.y=N?Fu:B.y,B.x=x.x,B.y=x.y,M.length>0){let lu=fu-j,Uu=Fu-k;for(let Nu of M)Nu.position={x:Nu.position.x-lu+g[0]*($u-P),y:Nu.position.y-Uu+g[1]*(i-c)},O.push(Nu)}}if(uu||h)x.width=uu&&(!_.resizeDirection||_.resizeDirection==="horizontal")?$u:B.width,x.height=h&&(!_.resizeDirection||_.resizeDirection==="vertical")?i:B.height,B.width=x.width,B.height=x.height;if(R&&w.expandParent){let lu=g[0]*(x.width??0);if(x.x&&x.x<lu)B.x=lu,G.x=G.x-(x.x-lu);let Uu=g[1]*(x.height??0);if(x.y&&x.y<Uu)B.y=Uu,G.y=G.y-(x.y-Uu)}let s=bz({width:B.width,prevWidth:P,height:B.height,prevHeight:c,affectsX:_.controlDirection.affectsX,affectsY:_.controlDirection.affectsY}),d={...B,direction:s};if(Z?.(r,d)===!1){B=b.prevValues,G.x=b.startX,G.y=b.startY,M.forEach((lu,Uu)=>{lu.position=b.childNodes[Uu].position});return}L?.(r,d),F(x,O)}).on("end",(r)=>{z?.(r,{...B}),l?.({...B})});U.call(D)}function J(){U.on(".drag",null)}return{update:Q,destroy:J}}var QJ=If(W0(),1),JJ=If(FJ(),1);var lJ=(u)=>{let f,$=new Set,F=(T,W)=>{let A=typeof T==="function"?T(f):T;if(!Object.is(A,f)){let K=f;f=(W!=null?W:typeof A!=="object"||A===null)?A:Object.assign({},f,A),$.forEach((L)=>L(f,K))}},l=()=>f,J={setState:F,getState:l,getInitialState:()=>q,subscribe:(T)=>{return $.add(T),()=>$.delete(T)},destroy:()=>{if((({MODE:"production"})?({MODE:"production"}).MODE:void 0)!=="production")console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");$.clear()}},q=f=u(F,l,J);return J},UJ=(u)=>u?lJ(u):lJ;var{useDebugValue:AZ}=QJ.default,{useSyncExternalStoreWithSelector:WZ}=JJ.default,KZ=(u)=>u;function p$(u,f=KZ,$){let F=WZ(u.subscribe,u.getState,u.getServerState||u.getInitialState,f,$);return AZ(F),F}var _J=(u,f)=>{let $=UJ(u),F=(l,U=f)=>p$($,l,U);return Object.assign(F,$),F},qJ=(u,f)=>u?_J(u,f):_J;function Gu(u,f){if(Object.is(u,f))return!0;if(typeof u!=="object"||u===null||typeof f!=="object"||f===null)return!1;if(u instanceof Map&&f instanceof Map){if(u.size!==f.size)return!1;for(let[F,l]of u)if(!Object.is(l,f.get(F)))return!1;return!0}if(u instanceof Set&&f instanceof Set){if(u.size!==f.size)return!1;for(let F of u)if(!f.has(F))return!1;return!0}let $=Object.keys(u);if($.length!==Object.keys(f).length)return!1;for(let F of $)if(!Object.prototype.hasOwnProperty.call(f,F)||!Object.is(u[F],f[F]))return!1;return!0}var wZ=If(j7(),1),d6=I.createContext(null),BZ=d6.Provider,rJ=Uf.error001("react");function qu(u,f){let $=I.useContext(d6);if($===null)throw Error(rJ);return p$($,u,f)}function Bu(){let u=I.useContext(d6);if(u===null)throw Error(rJ);return I.useMemo(()=>({getState:u.getState,setState:u.setState,subscribe:u.subscribe}),[u])}var TJ={display:"none"},LZ={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},CJ="react-flow__node-desc",hJ="react-flow__edge-desc",GZ="react-flow__aria-live",HZ=(u)=>u.ariaLiveMessage,zZ=(u)=>u.ariaLabelConfig;function ZZ({rfId:u}){let f=qu(HZ);return y.jsx("div",{id:`${GZ}-${u}`,"aria-live":"assertive","aria-atomic":"true",style:LZ,children:f})}function YZ({rfId:u,disableKeyboardA11y:f}){let $=qu(zZ);return y.jsxs(y.Fragment,{children:[y.jsx("div",{id:`${CJ}-${u}`,style:TJ,children:f?$["node.a11yDescription.default"]:$["node.a11yDescription.keyboardDisabled"]}),y.jsx("div",{id:`${hJ}-${u}`,style:TJ,children:$["edge.a11yDescription.default"]}),!f&&y.jsx(ZZ,{rfId:u})]})}var a6=I.forwardRef(({position:u="top-left",children:f,className:$,style:F,...l},U)=>{let _=`${u}`.split("-");return y.jsx("div",{className:Ru(["react-flow__panel",$,..._]),style:F,ref:U,...l,children:f})});a6.displayName="Panel";var AJ="https://reactflow.dev?utm_source=attribution";function RZ({proOptions:u,position:f="bottom-right"}){if(I.useEffect(()=>{return},[]),u?.hideAttribution)return null;return y.jsx(a6,{position:f,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${AJ}`,children:y.jsx("a",{href:AJ,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var MZ=(u)=>{let f=[],$=[];for(let[,F]of u.nodeLookup)if(F.selected)f.push(F.internals.userNode);for(let[,F]of u.edgeLookup)if(F.selected)$.push(F);return{selectedNodes:f,selectedEdges:$}},s6=(u)=>u.id;function EZ(u,f){return Gu(u.selectedNodes.map(s6),f.selectedNodes.map(s6))&&Gu(u.selectedEdges.map(s6),f.selectedEdges.map(s6))}function VZ({onSelectionChange:u}){let f=Bu(),{selectedNodes:$,selectedEdges:F}=qu(MZ,EZ);return I.useEffect(()=>{let l={nodes:$,edges:F};u?.(l),f.getState().onSelectionChangeHandlers.forEach((U)=>U(l))},[$,F,u]),null}var XZ=(u)=>!!u.onSelectionChangeHandlers;function DZ({onSelectionChange:u}){let f=qu(XZ);if(u||f)return y.jsx(VZ,{onSelectionChange:u});return null}var vJ=[0,0],OZ={x:0,y:0,zoom:1},SZ=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],WJ=[...SZ,"rfId"],jZ=(u)=>({setNodes:u.setNodes,setEdges:u.setEdges,setMinZoom:u.setMinZoom,setMaxZoom:u.setMaxZoom,setTranslateExtent:u.setTranslateExtent,setNodeExtent:u.setNodeExtent,reset:u.reset,setDefaultNodesAndEdges:u.setDefaultNodesAndEdges}),KJ={translateExtent:T4,nodeOrigin:vJ,minZoom:0.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function NZ(u){let{setNodes:f,setEdges:$,setMinZoom:F,setMaxZoom:l,setTranslateExtent:U,setNodeExtent:_,reset:Q,setDefaultNodesAndEdges:J}=qu(jZ,Gu),q=Bu();I.useEffect(()=>{return J(u.defaultNodes,u.defaultEdges),()=>{T.current=KJ,Q()}},[]);let T=I.useRef(KJ);return I.useEffect(()=>{for(let W of WJ){let A=u[W],K=T.current[W];if(A===K)continue;if(typeof u[W]>"u")continue;if(W==="nodes")f(A);else if(W==="edges")$(A);else if(W==="minZoom")F(A);else if(W==="maxZoom")l(A);else if(W==="translateExtent")U(A);else if(W==="nodeExtent")_(A);else if(W==="ariaLabelConfig")q.setState({ariaLabelConfig:XQ(A)});else if(W==="fitView")q.setState({fitViewQueued:A});else if(W==="fitViewOptions")q.setState({fitViewOptions:A});else q.setState({[W]:A})}T.current=u},WJ.map((W)=>u[W])),null}function wJ(){if(typeof window>"u"||!window.matchMedia)return null;return window.matchMedia("(prefers-color-scheme: dark)")}function IZ(u){let[f,$]=I.useState(u==="system"?null:u);return I.useEffect(()=>{if(u!=="system"){$(u);return}let F=wJ(),l=()=>$(F?.matches?"dark":"light");return l(),F?.addEventListener("change",l),()=>{F?.removeEventListener("change",l)}},[u]),f!==null?f:wJ()?.matches?"dark":"light"}var BJ=typeof document<"u"?document:null;function y3(u=null,f={target:BJ,actInsideInputWithModifier:!0}){let[$,F]=I.useState(!1),l=I.useRef(!1),U=I.useRef(new Set([])),[_,Q]=I.useMemo(()=>{if(u!==null){let q=(Array.isArray(u)?u:[u]).filter((W)=>typeof W==="string").map((W)=>W.replace(/\+/g,`
1827
+ <script>(()=>{var rE=Object.create;var ua=Object.defineProperty;var oE=Object.getOwnPropertyDescriptor;var iE=Object.getOwnPropertyNames;var sE=Object.getPrototypeOf,lE=Object.prototype.hasOwnProperty;var aE=(e,t,n)=>t in e?ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var uE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of iE(t))!lE.call(e,o)&&o!==n&&ua(e,o,{get:()=>t[o],enumerable:!(r=oE(t,o))||r.enumerable});return e};var Dt=(e,t,n)=>(n=e!=null?rE(sE(e)):{},uE(t||!e||!e.__esModule?ua(n,"default",{value:e,enumerable:!0}):n,e));var ke=(e,t,n)=>aE(e,typeof t!="symbol"?t+"":t,n);var zf=K(le=>{"use strict";var xo=Symbol.for("react.element"),cE=Symbol.for("react.portal"),dE=Symbol.for("react.fragment"),fE=Symbol.for("react.strict_mode"),hE=Symbol.for("react.profiler"),pE=Symbol.for("react.provider"),gE=Symbol.for("react.context"),mE=Symbol.for("react.forward_ref"),yE=Symbol.for("react.suspense"),vE=Symbol.for("react.memo"),wE=Symbol.for("react.lazy"),_f=Symbol.iterator;function xE(e){return e===null||typeof e!="object"?null:(e=_f&&e[_f]||e["@@iterator"],typeof e=="function"?e:null)}var bf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mf=Object.assign,If={};function kr(e,t,n){this.props=e,this.context=t,this.refs=If,this.updater=n||bf}kr.prototype.isReactComponent={};kr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};kr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pf(){}Pf.prototype=kr.prototype;function da(e,t,n){this.props=e,this.context=t,this.refs=If,this.updater=n||bf}var fa=da.prototype=new Pf;fa.constructor=da;Mf(fa,kr.prototype);fa.isPureReactComponent=!0;var Nf=Array.isArray,Of=Object.prototype.hasOwnProperty,ha={current:null},Tf={key:!0,ref:!0,__self:!0,__source:!0};function Df(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Of.call(t,r)&&!Tf.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:xo,type:e,key:i,ref:s,props:o,_owner:ha.current}}function EE(e,t){return{$$typeof:xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function pa(e){return typeof e=="object"&&e!==null&&e.$$typeof===xo}function SE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Cf=/\/+/g;function ca(e,t){return typeof e=="object"&&e!==null&&e.key!=null?SE(""+e.key):t.toString(36)}function Ri(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case xo:case cE:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+ca(s,0):r,Nf(o)?(n="",e!=null&&(n=e.replace(Cf,"$&/")+"/"),Ri(o,t,n,"",function(u){return u})):o!=null&&(pa(o)&&(o=EE(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Cf,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Nf(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+ca(i,l);s+=Ri(i,t,n,a,o)}else if(a=xE(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+ca(i,l++),s+=Ri(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ai(e,t,n){if(e==null)return e;var r=[],o=0;return Ri(e,r,"","",function(i){return t.call(n,i,o++)}),r}function kE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ve={current:null},$i={transition:null},_E={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:$i,ReactCurrentOwner:ha};function Lf(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:Ai,forEach:function(e,t,n){Ai(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ai(e,function(){t++}),t},toArray:function(e){return Ai(e,function(t){return t})||[]},only:function(e){if(!pa(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=kr;le.Fragment=dE;le.Profiler=hE;le.PureComponent=da;le.StrictMode=fE;le.Suspense=yE;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_E;le.act=Lf;le.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Mf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=ha.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Of.call(t,a)&&!Tf.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:xo,type:e.type,key:o,ref:i,props:r,_owner:s}};le.createContext=function(e){return e={$$typeof:gE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pE,_context:e},e.Consumer=e};le.createElement=Df;le.createFactory=function(e){var t=Df.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:mE,render:e}};le.isValidElement=pa;le.lazy=function(e){return{$$typeof:wE,_payload:{_status:-1,_result:e},_init:kE}};le.memo=function(e,t){return{$$typeof:vE,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=$i.transition;$i.transition={};try{e()}finally{$i.transition=t}};le.unstable_act=Lf;le.useCallback=function(e,t){return Ve.current.useCallback(e,t)};le.useContext=function(e){return Ve.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)};le.useEffect=function(e,t){return Ve.current.useEffect(e,t)};le.useId=function(){return Ve.current.useId()};le.useImperativeHandle=function(e,t,n){return Ve.current.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return Ve.current.useMemo(e,t)};le.useReducer=function(e,t,n){return Ve.current.useReducer(e,t,n)};le.useRef=function(e){return Ve.current.useRef(e)};le.useState=function(e){return Ve.current.useState(e)};le.useSyncExternalStore=function(e,t,n){return Ve.current.useSyncExternalStore(e,t,n)};le.useTransition=function(){return Ve.current.useTransition()};le.version="18.3.1"});var hn=K((KT,Af)=>{"use strict";Af.exports=zf()});var Yf=K(de=>{"use strict";function va(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Bi(o,t))e[r]=t,e[n]=o,n=r;else break e}}function xt(e){return e.length===0?null:e[0]}function Fi(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,l=e[s],a=s+1,u=e[a];if(0>Bi(l,n))a<o&&0>Bi(u,l)?(e[r]=u,e[a]=n,r=a):(e[r]=l,e[s]=n,r=s);else if(a<o&&0>Bi(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function Bi(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Rf=performance,de.unstable_now=function(){return Rf.now()}):(ga=Date,$f=ga.now(),de.unstable_now=function(){return ga.now()-$f});var Rf,ga,$f,Lt=[],pn=[],NE=1,lt=null,Ae=3,Vi=!1,Yn=!1,So=!1,Ff=typeof setTimeout=="function"?setTimeout:null,Vf=typeof clearTimeout=="function"?clearTimeout:null,Bf=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function wa(e){for(var t=xt(pn);t!==null;){if(t.callback===null)Fi(pn);else if(t.startTime<=e)Fi(pn),t.sortIndex=t.expirationTime,va(Lt,t);else break;t=xt(pn)}}function xa(e){if(So=!1,wa(e),!Yn)if(xt(Lt)!==null)Yn=!0,Sa(Ea);else{var t=xt(pn);t!==null&&ka(xa,t.startTime-e)}}function Ea(e,t){Yn=!1,So&&(So=!1,Vf(ko),ko=-1),Vi=!0;var n=Ae;try{for(wa(t),lt=xt(Lt);lt!==null&&(!(lt.expirationTime>t)||e&&!Uf());){var r=lt.callback;if(typeof r=="function"){lt.callback=null,Ae=lt.priorityLevel;var o=r(lt.expirationTime<=t);t=de.unstable_now(),typeof o=="function"?lt.callback=o:lt===xt(Lt)&&Fi(Lt),wa(t)}else Fi(Lt);lt=xt(Lt)}if(lt!==null)var i=!0;else{var s=xt(pn);s!==null&&ka(xa,s.startTime-t),i=!1}return i}finally{lt=null,Ae=n,Vi=!1}}var ji=!1,Hi=null,ko=-1,jf=5,Wf=-1;function Uf(){return!(de.unstable_now()-Wf<jf)}function ma(){if(Hi!==null){var e=de.unstable_now();Wf=e;var t=!0;try{t=Hi(!0,e)}finally{t?Eo():(ji=!1,Hi=null)}}else ji=!1}var Eo;typeof Bf=="function"?Eo=function(){Bf(ma)}:typeof MessageChannel<"u"?(ya=new MessageChannel,Hf=ya.port2,ya.port1.onmessage=ma,Eo=function(){Hf.postMessage(null)}):Eo=function(){Ff(ma,0)};var ya,Hf;function Sa(e){Hi=e,ji||(ji=!0,Eo())}function ka(e,t){ko=Ff(function(){e(de.unstable_now())},t)}de.unstable_IdlePriority=5;de.unstable_ImmediatePriority=1;de.unstable_LowPriority=4;de.unstable_NormalPriority=3;de.unstable_Profiling=null;de.unstable_UserBlockingPriority=2;de.unstable_cancelCallback=function(e){e.callback=null};de.unstable_continueExecution=function(){Yn||Vi||(Yn=!0,Sa(Ea))};de.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):jf=0<e?Math.floor(1e3/e):5};de.unstable_getCurrentPriorityLevel=function(){return Ae};de.unstable_getFirstCallbackNode=function(){return xt(Lt)};de.unstable_next=function(e){switch(Ae){case 1:case 2:case 3:var t=3;break;default:t=Ae}var n=Ae;Ae=t;try{return e()}finally{Ae=n}};de.unstable_pauseExecution=function(){};de.unstable_requestPaint=function(){};de.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ae;Ae=e;try{return t()}finally{Ae=n}};de.unstable_scheduleCallback=function(e,t,n){var r=de.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:NE++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,va(pn,e),xt(Lt)===null&&e===xt(pn)&&(So?(Vf(ko),ko=-1):So=!0,ka(xa,n-r))):(e.sortIndex=o,va(Lt,e),Yn||Vi||(Yn=!0,Sa(Ea))),e};de.unstable_shouldYield=Uf;de.unstable_wrapCallback=function(e){var t=Ae;return function(){var n=Ae;Ae=t;try{return e.apply(this,arguments)}finally{Ae=n}}}});var Xf=K((e3,qf)=>{"use strict";qf.exports=Yf()});var Kg=K(ot=>{"use strict";var CE=hn(),nt=Xf();function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tp=new Set,Uo={};function ir(e,t){Wr(e,t),Wr(e+"Capture",t)}function Wr(e,t){for(Uo[e]=t,e=0;e<t.length;e++)tp.add(t[e])}var en=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ya=Object.prototype.hasOwnProperty,bE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gf={},Zf={};function ME(e){return Ya.call(Zf,e)?!0:Ya.call(Gf,e)?!1:bE.test(e)?Zf[e]=!0:(Gf[e]=!0,!1)}function IE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function PE(e,t,n,r){if(t===null||typeof t>"u"||IE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ue(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new Ue(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ze[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var $u=/[\-:]([a-z])/g;function Bu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($u,Bu);ze[t]=new Ue(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($u,Bu);ze[t]=new Ue(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($u,Bu);ze[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hu(e,t,n,r){var o=ze.hasOwnProperty(t)?ze[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(PE(t,n,o,r)&&(n=null),r||o===null?ME(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var on=CE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wi=Symbol.for("react.element"),Cr=Symbol.for("react.portal"),br=Symbol.for("react.fragment"),Fu=Symbol.for("react.strict_mode"),qa=Symbol.for("react.profiler"),np=Symbol.for("react.provider"),rp=Symbol.for("react.context"),Vu=Symbol.for("react.forward_ref"),Xa=Symbol.for("react.suspense"),Ga=Symbol.for("react.suspense_list"),ju=Symbol.for("react.memo"),mn=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var op=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Qf=Symbol.iterator;function _o(e){return e===null||typeof e!="object"?null:(e=Qf&&e[Qf]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Object.assign,_a;function To(e){if(_a===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_a=t&&t[1]||""}return`
1828
+ `+_a+e}var Na=!1;function Ca(e,t){if(!e||Na)return"";Na=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
1829
+ `),i=r.stack.split(`
1830
+ `),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var a=`
1831
+ `+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?To(e):""}function OE(e){switch(e.tag){case 5:return To(e.type);case 16:return To("Lazy");case 13:return To("Suspense");case 19:return To("SuspenseList");case 0:case 2:case 15:return e=Ca(e.type,!1),e;case 11:return e=Ca(e.type.render,!1),e;case 1:return e=Ca(e.type,!0),e;default:return""}}function Za(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case br:return"Fragment";case Cr:return"Portal";case qa:return"Profiler";case Fu:return"StrictMode";case Xa:return"Suspense";case Ga:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rp:return(e.displayName||"Context")+".Consumer";case np:return(e._context.displayName||"Context")+".Provider";case Vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ju:return t=e.displayName||null,t!==null?t:Za(e.type)||"Memo";case mn:t=e._payload,e=e._init;try{return Za(e(t))}catch{}}return null}function TE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Za(t);case 8:return t===Fu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ip(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function DE(e){var t=ip(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ui(e){e._valueTracker||(e._valueTracker=DE(e))}function sp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ip(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ws(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qa(e,t){var n=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lp(e,t){t=t.checked,t!=null&&Hu(e,"checked",t,!1)}function Ka(e,t){lp(e,t);var n=Pn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ja(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ja(e,t.type,Pn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ja(e,t,n){(t!=="number"||ws(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Do=Array.isArray;function $r(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Pn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function eu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return xe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(j(92));if(Do(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pn(n)}}function ap(e,t){var n=Pn(t.value),r=Pn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function th(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function up(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?up(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yi,cp=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yi=Yi||document.createElement("div"),Yi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Yo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ao={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},LE=["Webkit","ms","Moz","O"];Object.keys(Ao).forEach(function(e){LE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ao[t]=Ao[e]})});function dp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ao.hasOwnProperty(e)&&Ao[e]?(""+t).trim():t+"px"}function fp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=dp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var zE=xe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nu(e,t){if(t){if(zE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function ru(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ou=null;function Wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var iu=null,Br=null,Hr=null;function nh(e){if(e=ci(e)){if(typeof iu!="function")throw Error(j(280));var t=e.stateNode;t&&(t=qs(t),iu(e.stateNode,e.type,t))}}function hp(e){Br?Hr?Hr.push(e):Hr=[e]:Br=e}function pp(){if(Br){var e=Br,t=Hr;if(Hr=Br=null,nh(e),t)for(e=0;e<t.length;e++)nh(t[e])}}function gp(e,t){return e(t)}function mp(){}var ba=!1;function yp(e,t,n){if(ba)return e(t,n);ba=!0;try{return gp(e,t,n)}finally{ba=!1,(Br!==null||Hr!==null)&&(mp(),pp())}}function qo(e,t){var n=e.stateNode;if(n===null)return null;var r=qs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(j(231,t,typeof n));return n}var su=!1;if(en)try{_r={},Object.defineProperty(_r,"passive",{get:function(){su=!0}}),window.addEventListener("test",_r,_r),window.removeEventListener("test",_r,_r)}catch{su=!1}var _r;function AE(e,t,n,r,o,i,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ro=!1,xs=null,Es=!1,lu=null,RE={onError:function(e){Ro=!0,xs=e}};function $E(e,t,n,r,o,i,s,l,a){Ro=!1,xs=null,AE.apply(RE,arguments)}function BE(e,t,n,r,o,i,s,l,a){if($E.apply(this,arguments),Ro){if(Ro){var u=xs;Ro=!1,xs=null}else throw Error(j(198));Es||(Es=!0,lu=u)}}function sr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function rh(e){if(sr(e)!==e)throw Error(j(188))}function HE(e){var t=e.alternate;if(!t){if(t=sr(e),t===null)throw Error(j(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return rh(o),e;if(i===r)return rh(o),t;i=i.sibling}throw Error(j(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(n.tag!==3)throw Error(j(188));return n.stateNode.current===n?e:t}function wp(e){return e=HE(e),e!==null?xp(e):null}function xp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xp(e);if(t!==null)return t;e=e.sibling}return null}var Ep=nt.unstable_scheduleCallback,oh=nt.unstable_cancelCallback,FE=nt.unstable_shouldYield,VE=nt.unstable_requestPaint,_e=nt.unstable_now,jE=nt.unstable_getCurrentPriorityLevel,Uu=nt.unstable_ImmediatePriority,Sp=nt.unstable_UserBlockingPriority,Ss=nt.unstable_NormalPriority,WE=nt.unstable_LowPriority,kp=nt.unstable_IdlePriority,js=null,$t=null;function UE(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(js,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:XE,YE=Math.log,qE=Math.LN2;function XE(e){return e>>>=0,e===0?32:31-(YE(e)/qE|0)|0}var qi=64,Xi=4194304;function Lo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ks(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Lo(l):(i&=s,i!==0&&(r=Lo(i)))}else s=n&~o,s!==0?r=Lo(s):i!==0&&(r=Lo(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nt(t),o=1<<n,r|=e[n],t&=~o;return r}function GE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ZE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Nt(i),l=1<<s,a=o[s];a===-1?((l&n)===0||(l&r)!==0)&&(o[s]=GE(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}function au(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _p(){var e=qi;return qi<<=1,(qi&4194240)===0&&(qi=64),e}function Ma(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ai(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function QE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Nt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Yu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ce=0;function Np(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Cp,qu,bp,Mp,Ip,uu=!1,Gi=[],Sn=null,kn=null,_n=null,Xo=new Map,Go=new Map,vn=[],KE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ih(e,t){switch(e){case"focusin":case"focusout":Sn=null;break;case"dragenter":case"dragleave":kn=null;break;case"mouseover":case"mouseout":_n=null;break;case"pointerover":case"pointerout":Xo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(t.pointerId)}}function No(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=ci(t),t!==null&&qu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function JE(e,t,n,r,o){switch(t){case"focusin":return Sn=No(Sn,e,t,n,r,o),!0;case"dragenter":return kn=No(kn,e,t,n,r,o),!0;case"mouseover":return _n=No(_n,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Xo.set(i,No(Xo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Go.set(i,No(Go.get(i)||null,e,t,n,r,o)),!0}return!1}function Pp(e){var t=Gn(e.target);if(t!==null){var n=sr(t);if(n!==null){if(t=n.tag,t===13){if(t=vp(n),t!==null){e.blockedOn=t,Ip(e.priority,function(){bp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function us(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=cu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ou=r,n.target.dispatchEvent(r),ou=null}else return t=ci(n),t!==null&&qu(t),e.blockedOn=n,!1;t.shift()}return!0}function sh(e,t,n){us(e)&&n.delete(t)}function eS(){uu=!1,Sn!==null&&us(Sn)&&(Sn=null),kn!==null&&us(kn)&&(kn=null),_n!==null&&us(_n)&&(_n=null),Xo.forEach(sh),Go.forEach(sh)}function Co(e,t){e.blockedOn===t&&(e.blockedOn=null,uu||(uu=!0,nt.unstable_scheduleCallback(nt.unstable_NormalPriority,eS)))}function Zo(e){function t(o){return Co(o,e)}if(0<Gi.length){Co(Gi[0],e);for(var n=1;n<Gi.length;n++){var r=Gi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Sn!==null&&Co(Sn,e),kn!==null&&Co(kn,e),_n!==null&&Co(_n,e),Xo.forEach(t),Go.forEach(t),n=0;n<vn.length;n++)r=vn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<vn.length&&(n=vn[0],n.blockedOn===null);)Pp(n),n.blockedOn===null&&vn.shift()}var Fr=on.ReactCurrentBatchConfig,_s=!0;function tS(e,t,n,r){var o=ce,i=Fr.transition;Fr.transition=null;try{ce=1,Xu(e,t,n,r)}finally{ce=o,Fr.transition=i}}function nS(e,t,n,r){var o=ce,i=Fr.transition;Fr.transition=null;try{ce=4,Xu(e,t,n,r)}finally{ce=o,Fr.transition=i}}function Xu(e,t,n,r){if(_s){var o=cu(e,t,n,r);if(o===null)za(e,t,r,Ns,n),ih(e,r);else if(JE(o,e,t,n,r))r.stopPropagation();else if(ih(e,r),t&4&&-1<KE.indexOf(e)){for(;o!==null;){var i=ci(o);if(i!==null&&Cp(i),i=cu(e,t,n,r),i===null&&za(e,t,r,Ns,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else za(e,t,r,null,n)}}var Ns=null;function cu(e,t,n,r){if(Ns=null,e=Wu(r),e=Gn(e),e!==null)if(t=sr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ns=e,null}function Op(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jE()){case Uu:return 1;case Sp:return 4;case Ss:case WE:return 16;case kp:return 536870912;default:return 16}default:return 16}}var xn=null,Gu=null,cs=null;function Tp(){if(cs)return cs;var e,t=Gu,n=t.length,r,o="value"in xn?xn.value:xn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return cs=o.slice(e,1<r?1-r:void 0)}function ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Zi(){return!0}function lh(){return!1}function rt(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Zi:lh,this.isPropagationStopped=lh,this}return xe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Zi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zi)},persist:function(){},isPersistent:Zi}),t}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zu=rt(Qr),ui=xe({},Qr,{view:0,detail:0}),rS=rt(ui),Ia,Pa,bo,Ws=xe({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bo&&(bo&&e.type==="mousemove"?(Ia=e.screenX-bo.screenX,Pa=e.screenY-bo.screenY):Pa=Ia=0,bo=e),Ia)},movementY:function(e){return"movementY"in e?e.movementY:Pa}}),ah=rt(Ws),oS=xe({},Ws,{dataTransfer:0}),iS=rt(oS),sS=xe({},ui,{relatedTarget:0}),Oa=rt(sS),lS=xe({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),aS=rt(lS),uS=xe({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cS=rt(uS),dS=xe({},Qr,{data:0}),uh=rt(dS),fS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pS[e])?!!t[e]:!1}function Qu(){return gS}var mS=xe({},ui,{key:function(e){if(e.key){var t=fS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yS=rt(mS),vS=xe({},Ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ch=rt(vS),wS=xe({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),xS=rt(wS),ES=xe({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),SS=rt(ES),kS=xe({},Ws,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_S=rt(kS),NS=[9,13,27,32],Ku=en&&"CompositionEvent"in window,$o=null;en&&"documentMode"in document&&($o=document.documentMode);var CS=en&&"TextEvent"in window&&!$o,Dp=en&&(!Ku||$o&&8<$o&&11>=$o),dh=" ",fh=!1;function Lp(e,t){switch(e){case"keyup":return NS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mr=!1;function bS(e,t){switch(e){case"compositionend":return zp(t);case"keypress":return t.which!==32?null:(fh=!0,dh);case"textInput":return e=t.data,e===dh&&fh?null:e;default:return null}}function MS(e,t){if(Mr)return e==="compositionend"||!Ku&&Lp(e,t)?(e=Tp(),cs=Gu=xn=null,Mr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dp&&t.locale!=="ko"?null:t.data;default:return null}}var IS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!IS[e.type]:t==="textarea"}function Ap(e,t,n,r){hp(r),t=Cs(t,"onChange"),0<t.length&&(n=new Zu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bo=null,Qo=null;function PS(e){qp(e,0)}function Us(e){var t=Or(e);if(sp(t))return e}function OS(e,t){if(e==="change")return t}var Rp=!1;en&&(en?(Ki="oninput"in document,Ki||(Ta=document.createElement("div"),Ta.setAttribute("oninput","return;"),Ki=typeof Ta.oninput=="function"),Qi=Ki):Qi=!1,Rp=Qi&&(!document.documentMode||9<document.documentMode));var Qi,Ki,Ta;function ph(){Bo&&(Bo.detachEvent("onpropertychange",$p),Qo=Bo=null)}function $p(e){if(e.propertyName==="value"&&Us(Qo)){var t=[];Ap(t,Qo,e,Wu(e)),yp(PS,t)}}function TS(e,t,n){e==="focusin"?(ph(),Bo=t,Qo=n,Bo.attachEvent("onpropertychange",$p)):e==="focusout"&&ph()}function DS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Us(Qo)}function LS(e,t){if(e==="click")return Us(t)}function zS(e,t){if(e==="input"||e==="change")return Us(t)}function AS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:AS;function Ko(e,t){if(bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Ya.call(t,o)||!bt(e[o],t[o]))return!1}return!0}function gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mh(e,t){var n=gh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gh(n)}}function Bp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hp(){for(var e=window,t=ws();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ws(e.document)}return t}function Ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RS(e){var t=Hp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bp(n.ownerDocument.documentElement,n)){if(r!==null&&Ju(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=mh(n,i);var s=mh(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $S=en&&"documentMode"in document&&11>=document.documentMode,Ir=null,du=null,Ho=null,fu=!1;function yh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fu||Ir==null||Ir!==ws(r)||(r=Ir,"selectionStart"in r&&Ju(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ho&&Ko(Ho,r)||(Ho=r,r=Cs(du,"onSelect"),0<r.length&&(t=new Zu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Ji(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pr={animationend:Ji("Animation","AnimationEnd"),animationiteration:Ji("Animation","AnimationIteration"),animationstart:Ji("Animation","AnimationStart"),transitionend:Ji("Transition","TransitionEnd")},Da={},Fp={};en&&(Fp=document.createElement("div").style,"AnimationEvent"in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),"TransitionEvent"in window||delete Pr.transitionend.transition);function Ys(e){if(Da[e])return Da[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fp)return Da[e]=t[n];return e}var Vp=Ys("animationend"),jp=Ys("animationiteration"),Wp=Ys("animationstart"),Up=Ys("transitionend"),Yp=new Map,vh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tn(e,t){Yp.set(e,t),ir(t,[e])}for(es=0;es<vh.length;es++)ts=vh[es],wh=ts.toLowerCase(),xh=ts[0].toUpperCase()+ts.slice(1),Tn(wh,"on"+xh);var ts,wh,xh,es;Tn(Vp,"onAnimationEnd");Tn(jp,"onAnimationIteration");Tn(Wp,"onAnimationStart");Tn("dblclick","onDoubleClick");Tn("focusin","onFocus");Tn("focusout","onBlur");Tn(Up,"onTransitionEnd");Wr("onMouseEnter",["mouseout","mouseover"]);Wr("onMouseLeave",["mouseout","mouseover"]);Wr("onPointerEnter",["pointerout","pointerover"]);Wr("onPointerLeave",["pointerout","pointerover"]);ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ir("onBeforeInput",["compositionend","keypress","textInput","paste"]);ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),BS=new Set("cancel close invalid load scroll toggle".split(" ").concat(zo));function Eh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,BE(r,t,void 0,e),e.currentTarget=null}function qp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==i&&o.isPropagationStopped())break e;Eh(o,l,u),i=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==i&&o.isPropagationStopped())break e;Eh(o,l,u),i=a}}}if(Es)throw e=lu,Es=!1,lu=null,e}function he(e,t){var n=t[yu];n===void 0&&(n=t[yu]=new Set);var r=e+"__bubble";n.has(r)||(Xp(t,e,2,!1),n.add(r))}function La(e,t,n){var r=0;t&&(r|=4),Xp(n,e,r,t)}var ns="_reactListening"+Math.random().toString(36).slice(2);function Jo(e){if(!e[ns]){e[ns]=!0,tp.forEach(function(n){n!=="selectionchange"&&(BS.has(n)||La(n,!1,e),La(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ns]||(t[ns]=!0,La("selectionchange",!1,t))}}function Xp(e,t,n,r){switch(Op(t)){case 1:var o=tS;break;case 4:o=nS;break;default:o=Xu}n=o.bind(null,t,n,e),o=void 0,!su||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function za(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;s=s.return}for(;l!==null;){if(s=Gn(l),s===null)return;if(a=s.tag,a===5||a===6){r=i=s;continue e}l=l.parentNode}}r=r.return}yp(function(){var u=i,c=Wu(n),f=[];e:{var d=Yp.get(e);if(d!==void 0){var h=Zu,m=e;switch(e){case"keypress":if(ds(n)===0)break e;case"keydown":case"keyup":h=yS;break;case"focusin":m="focus",h=Oa;break;case"focusout":m="blur",h=Oa;break;case"beforeblur":case"afterblur":h=Oa;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ah;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=iS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=xS;break;case Vp:case jp:case Wp:h=aS;break;case Up:h=SS;break;case"scroll":h=rS;break;case"wheel":h=_S;break;case"copy":case"cut":case"paste":h=cS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ch}var w=(t&4)!==0,x=!w&&e==="scroll",g=w?d!==null?d+"Capture":null:d;w=[];for(var y=u,p;y!==null;){p=y;var v=p.stateNode;if(p.tag===5&&v!==null&&(p=v,g!==null&&(v=qo(y,g),v!=null&&w.push(ei(y,v,p)))),x)break;y=y.return}0<w.length&&(d=new h(d,m,null,n,c),f.push({event:d,listeners:w}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==ou&&(m=n.relatedTarget||n.fromElement)&&(Gn(m)||m[tn]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?Gn(m):null,m!==null&&(x=sr(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(w=ah,v="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(w=ch,v="onPointerLeave",g="onPointerEnter",y="pointer"),x=h==null?d:Or(h),p=m==null?d:Or(m),d=new w(v,y+"leave",h,n,c),d.target=x,d.relatedTarget=p,v=null,Gn(c)===u&&(w=new w(g,y+"enter",m,n,c),w.target=p,w.relatedTarget=x,v=w),x=v,h&&m)t:{for(w=h,g=m,y=0,p=w;p;p=Nr(p))y++;for(p=0,v=g;v;v=Nr(v))p++;for(;0<y-p;)w=Nr(w),y--;for(;0<p-y;)g=Nr(g),p--;for(;y--;){if(w===g||g!==null&&w===g.alternate)break t;w=Nr(w),g=Nr(g)}w=null}else w=null;h!==null&&Sh(f,d,h,w,!1),m!==null&&x!==null&&Sh(f,x,m,w,!0)}}e:{if(d=u?Or(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var k=OS;else if(hh(d))if(Rp)k=zS;else{k=DS;var S=TS}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(k=LS);if(k&&(k=k(e,u))){Ap(f,k,n,c);break e}S&&S(e,d,u),e==="focusout"&&(S=d._wrapperState)&&S.controlled&&d.type==="number"&&Ja(d,"number",d.value)}switch(S=u?Or(u):window,e){case"focusin":(hh(S)||S.contentEditable==="true")&&(Ir=S,du=u,Ho=null);break;case"focusout":Ho=du=Ir=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,yh(f,n,c);break;case"selectionchange":if($S)break;case"keydown":case"keyup":yh(f,n,c)}var _;if(Ku)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Mr?Lp(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Dp&&n.locale!=="ko"&&(Mr||N!=="onCompositionStart"?N==="onCompositionEnd"&&Mr&&(_=Tp()):(xn=c,Gu="value"in xn?xn.value:xn.textContent,Mr=!0)),S=Cs(u,N),0<S.length&&(N=new uh(N,e,null,n,c),f.push({event:N,listeners:S}),_?N.data=_:(_=zp(n),_!==null&&(N.data=_)))),(_=CS?bS(e,n):MS(e,n))&&(u=Cs(u,"onBeforeInput"),0<u.length&&(c=new uh("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=_))}qp(f,t)})}function ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cs(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=qo(e,n),i!=null&&r.unshift(ei(e,i,o)),i=qo(e,t),i!=null&&r.push(ei(e,i,o))),e=e.return}return r}function Nr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sh(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,o?(a=qo(n,i),a!=null&&s.unshift(ei(n,a,l))):o||(a=qo(n,i),a!=null&&s.push(ei(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var HS=/\r\n?/g,FS=/\u0000|\uFFFD/g;function kh(e){return(typeof e=="string"?e:""+e).replace(HS,`
1832
+ `).replace(FS,"")}function rs(e,t,n){if(t=kh(t),kh(e)!==t&&n)throw Error(j(425))}function bs(){}var hu=null,pu=null;function gu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mu=typeof setTimeout=="function"?setTimeout:void 0,VS=typeof clearTimeout=="function"?clearTimeout:void 0,_h=typeof Promise=="function"?Promise:void 0,jS=typeof queueMicrotask=="function"?queueMicrotask:typeof _h<"u"?function(e){return _h.resolve(null).then(e).catch(WS)}:mu;function WS(e){setTimeout(function(){throw e})}function Aa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Zo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Zo(t)}function Nn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Nh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Kr=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Kr,ti="__reactProps$"+Kr,tn="__reactContainer$"+Kr,yu="__reactEvents$"+Kr,US="__reactListeners$"+Kr,YS="__reactHandles$"+Kr;function Gn(e){var t=e[Rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tn]||n[Rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nh(e);e!==null;){if(n=e[Rt])return n;e=Nh(e)}return t}e=n,n=e.parentNode}return null}function ci(e){return e=e[Rt]||e[tn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Or(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function qs(e){return e[ti]||null}var vu=[],Tr=-1;function Dn(e){return{current:e}}function pe(e){0>Tr||(e.current=vu[Tr],vu[Tr]=null,Tr--)}function fe(e,t){Tr++,vu[Tr]=e.current,e.current=t}var On={},He=Dn(On),Xe=Dn(!1),er=On;function Ur(e,t){var n=e.type.contextTypes;if(!n)return On;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ge(e){return e=e.childContextTypes,e!=null}function Ms(){pe(Xe),pe(He)}function Ch(e,t,n){if(He.current!==On)throw Error(j(168));fe(He,t),fe(Xe,n)}function Gp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(j(108,TE(e)||"Unknown",o));return xe({},n,r)}function Is(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,er=He.current,fe(He,e),fe(Xe,Xe.current),!0}function bh(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Gp(e,t,er),r.__reactInternalMemoizedMergedChildContext=e,pe(Xe),pe(He),fe(He,e)):pe(Xe),fe(Xe,n)}var Zt=null,Xs=!1,Ra=!1;function Zp(e){Zt===null?Zt=[e]:Zt.push(e)}function qS(e){Xs=!0,Zp(e)}function Ln(){if(!Ra&&Zt!==null){Ra=!0;var e=0,t=ce;try{var n=Zt;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Zt=null,Xs=!1}catch(o){throw Zt!==null&&(Zt=Zt.slice(e+1)),Ep(Uu,Ln),o}finally{ce=t,Ra=!1}}return null}var Dr=[],Lr=0,Ps=null,Os=0,at=[],ut=0,tr=null,Qt=1,Kt="";function qn(e,t){Dr[Lr++]=Os,Dr[Lr++]=Ps,Ps=e,Os=t}function Qp(e,t,n){at[ut++]=Qt,at[ut++]=Kt,at[ut++]=tr,tr=e;var r=Qt;e=Kt;var o=32-Nt(r)-1;r&=~(1<<o),n+=1;var i=32-Nt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Qt=1<<32-Nt(t)+o|n<<o|r,Kt=i+e}else Qt=1<<i|n<<o|r,Kt=e}function ec(e){e.return!==null&&(qn(e,1),Qp(e,1,0))}function tc(e){for(;e===Ps;)Ps=Dr[--Lr],Dr[Lr]=null,Os=Dr[--Lr],Dr[Lr]=null;for(;e===tr;)tr=at[--ut],at[ut]=null,Kt=at[--ut],at[ut]=null,Qt=at[--ut],at[ut]=null}var tt=null,et=null,me=!1,_t=null;function Kp(e,t){var n=ct(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Mh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,tt=e,et=Nn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tt=e,et=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=tr!==null?{id:Qt,overflow:Kt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ct(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tt=e,et=null,!0):!1;default:return!1}}function wu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xu(e){if(me){var t=et;if(t){var n=t;if(!Mh(e,t)){if(wu(e))throw Error(j(418));t=Nn(n.nextSibling);var r=tt;t&&Mh(e,t)?Kp(r,n):(e.flags=e.flags&-4097|2,me=!1,tt=e)}}else{if(wu(e))throw Error(j(418));e.flags=e.flags&-4097|2,me=!1,tt=e}}}function Ih(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tt=e}function os(e){if(e!==tt)return!1;if(!me)return Ih(e),me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!gu(e.type,e.memoizedProps)),t&&(t=et)){if(wu(e))throw Jp(),Error(j(418));for(;t;)Kp(e,t),t=Nn(t.nextSibling)}if(Ih(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){et=Nn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}et=null}}else et=tt?Nn(e.stateNode.nextSibling):null;return!0}function Jp(){for(var e=et;e;)e=Nn(e.nextSibling)}function Yr(){et=tt=null,me=!1}function nc(e){_t===null?_t=[e]:_t.push(e)}var XS=on.ReactCurrentBatchConfig;function Mo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(j(309));var r=n.stateNode}if(!r)throw Error(j(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=o.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(j(284));if(!n._owner)throw Error(j(290,e))}return e}function is(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ph(e){var t=e._init;return t(e._payload)}function eg(e){function t(g,y){if(e){var p=g.deletions;p===null?(g.deletions=[y],g.flags|=16):p.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function o(g,y){return g=In(g,y),g.index=0,g.sibling=null,g}function i(g,y,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<y?(g.flags|=2,y):p):(g.flags|=2,y)):(g.flags|=1048576,y)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,y,p,v){return y===null||y.tag!==6?(y=Wa(p,g.mode,v),y.return=g,y):(y=o(y,p),y.return=g,y)}function a(g,y,p,v){var k=p.type;return k===br?c(g,y,p.props.children,v,p.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===mn&&Ph(k)===y.type)?(v=o(y,p.props),v.ref=Mo(g,y,p),v.return=g,v):(v=vs(p.type,p.key,p.props,null,g.mode,v),v.ref=Mo(g,y,p),v.return=g,v)}function u(g,y,p,v){return y===null||y.tag!==4||y.stateNode.containerInfo!==p.containerInfo||y.stateNode.implementation!==p.implementation?(y=Ua(p,g.mode,v),y.return=g,y):(y=o(y,p.children||[]),y.return=g,y)}function c(g,y,p,v,k){return y===null||y.tag!==7?(y=Jn(p,g.mode,v,k),y.return=g,y):(y=o(y,p),y.return=g,y)}function f(g,y,p){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Wa(""+y,g.mode,p),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Wi:return p=vs(y.type,y.key,y.props,null,g.mode,p),p.ref=Mo(g,null,y),p.return=g,p;case Cr:return y=Ua(y,g.mode,p),y.return=g,y;case mn:var v=y._init;return f(g,v(y._payload),p)}if(Do(y)||_o(y))return y=Jn(y,g.mode,p,null),y.return=g,y;is(g,y)}return null}function d(g,y,p,v){var k=y!==null?y.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return k!==null?null:l(g,y,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Wi:return p.key===k?a(g,y,p,v):null;case Cr:return p.key===k?u(g,y,p,v):null;case mn:return k=p._init,d(g,y,k(p._payload),v)}if(Do(p)||_o(p))return k!==null?null:c(g,y,p,v,null);is(g,p)}return null}function h(g,y,p,v,k){if(typeof v=="string"&&v!==""||typeof v=="number")return g=g.get(p)||null,l(y,g,""+v,k);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Wi:return g=g.get(v.key===null?p:v.key)||null,a(y,g,v,k);case Cr:return g=g.get(v.key===null?p:v.key)||null,u(y,g,v,k);case mn:var S=v._init;return h(g,y,p,S(v._payload),k)}if(Do(v)||_o(v))return g=g.get(p)||null,c(y,g,v,k,null);is(y,v)}return null}function m(g,y,p,v){for(var k=null,S=null,_=y,N=y=0,M=null;_!==null&&N<p.length;N++){_.index>N?(M=_,_=null):M=_.sibling;var A=d(g,_,p[N],v);if(A===null){_===null&&(_=M);break}e&&_&&A.alternate===null&&t(g,_),y=i(A,y,N),S===null?k=A:S.sibling=A,S=A,_=M}if(N===p.length)return n(g,_),me&&qn(g,N),k;if(_===null){for(;N<p.length;N++)_=f(g,p[N],v),_!==null&&(y=i(_,y,N),S===null?k=_:S.sibling=_,S=_);return me&&qn(g,N),k}for(_=r(g,_);N<p.length;N++)M=h(_,g,N,p[N],v),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?N:M.key),y=i(M,y,N),S===null?k=M:S.sibling=M,S=M);return e&&_.forEach(function(R){return t(g,R)}),me&&qn(g,N),k}function w(g,y,p,v){var k=_o(p);if(typeof k!="function")throw Error(j(150));if(p=k.call(p),p==null)throw Error(j(151));for(var S=k=null,_=y,N=y=0,M=null,A=p.next();_!==null&&!A.done;N++,A=p.next()){_.index>N?(M=_,_=null):M=_.sibling;var R=d(g,_,A.value,v);if(R===null){_===null&&(_=M);break}e&&_&&R.alternate===null&&t(g,_),y=i(R,y,N),S===null?k=R:S.sibling=R,S=R,_=M}if(A.done)return n(g,_),me&&qn(g,N),k;if(_===null){for(;!A.done;N++,A=p.next())A=f(g,A.value,v),A!==null&&(y=i(A,y,N),S===null?k=A:S.sibling=A,S=A);return me&&qn(g,N),k}for(_=r(g,_);!A.done;N++,A=p.next())A=h(_,g,N,A.value,v),A!==null&&(e&&A.alternate!==null&&_.delete(A.key===null?N:A.key),y=i(A,y,N),S===null?k=A:S.sibling=A,S=A);return e&&_.forEach(function(V){return t(g,V)}),me&&qn(g,N),k}function x(g,y,p,v){if(typeof p=="object"&&p!==null&&p.type===br&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Wi:e:{for(var k=p.key,S=y;S!==null;){if(S.key===k){if(k=p.type,k===br){if(S.tag===7){n(g,S.sibling),y=o(S,p.props.children),y.return=g,g=y;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===mn&&Ph(k)===S.type){n(g,S.sibling),y=o(S,p.props),y.ref=Mo(g,S,p),y.return=g,g=y;break e}n(g,S);break}else t(g,S);S=S.sibling}p.type===br?(y=Jn(p.props.children,g.mode,v,p.key),y.return=g,g=y):(v=vs(p.type,p.key,p.props,null,g.mode,v),v.ref=Mo(g,y,p),v.return=g,g=v)}return s(g);case Cr:e:{for(S=p.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===p.containerInfo&&y.stateNode.implementation===p.implementation){n(g,y.sibling),y=o(y,p.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Ua(p,g.mode,v),y.return=g,g=y}return s(g);case mn:return S=p._init,x(g,y,S(p._payload),v)}if(Do(p))return m(g,y,p,v);if(_o(p))return w(g,y,p,v);is(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,p),y.return=g,g=y):(n(g,y),y=Wa(p,g.mode,v),y.return=g,g=y),s(g)):n(g,y)}return x}var qr=eg(!0),tg=eg(!1),Ts=Dn(null),Ds=null,zr=null,rc=null;function oc(){rc=zr=Ds=null}function ic(e){var t=Ts.current;pe(Ts),e._currentValue=t}function Eu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vr(e,t){Ds=e,rc=zr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(qe=!0),e.firstContext=null)}function ft(e){var t=e._currentValue;if(rc!==e)if(e={context:e,memoizedValue:t,next:null},zr===null){if(Ds===null)throw Error(j(308));zr=e,Ds.dependencies={lanes:0,firstContext:e}}else zr=zr.next=e;return t}var Zn=null;function sc(e){Zn===null?Zn=[e]:Zn.push(e)}function ng(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,sc(t)):(n.next=o.next,o.next=n),t.interleaved=n,nn(e,r)}function nn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var yn=!1;function lc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Jt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Cn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ae&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,nn(e,n)}return o=r.interleaved,o===null?(t.next=t,sc(r)):(t.next=o.next,o.next=t),r.interleaved=t,nn(e,n)}function fs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yu(e,n)}}function Oh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ls(e,t,n,r){var o=e.updateQueue;yn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(i!==null){var f=o.baseState;s=0,c=u=a=null,l=i;do{var d=l.lane,h=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,w=l;switch(d=t,h=n,w.tag){case 1:if(m=w.payload,typeof m=="function"){f=m.call(h,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=w.payload,d=typeof m=="function"?m.call(h,f,d):m,d==null)break e;f=xe({},f,d);break e;case 2:yn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[l]:d.push(l))}else h={eventTime:h,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=h,a=f):c=c.next=h,s|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;d=l,l=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(c===null&&(a=f),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);rr|=s,e.lanes=s,e.memoizedState=f}}function Th(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(j(191,o));o.call(r)}}}var di={},Bt=Dn(di),ni=Dn(di),ri=Dn(di);function Qn(e){if(e===di)throw Error(j(174));return e}function ac(e,t){switch(fe(ri,t),fe(ni,e),fe(Bt,di),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=tu(t,e)}pe(Bt),fe(Bt,t)}function Xr(){pe(Bt),pe(ni),pe(ri)}function og(e){Qn(ri.current);var t=Qn(Bt.current),n=tu(t,e.type);t!==n&&(fe(ni,e),fe(Bt,n))}function uc(e){ni.current===e&&(pe(Bt),pe(ni))}var ve=Dn(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $a=[];function cc(){for(var e=0;e<$a.length;e++)$a[e]._workInProgressVersionPrimary=null;$a.length=0}var hs=on.ReactCurrentDispatcher,Ba=on.ReactCurrentBatchConfig,nr=0,we=null,be=null,Ie=null,As=!1,Fo=!1,oi=0,GS=0;function Re(){throw Error(j(321))}function dc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!bt(e[n],t[n]))return!1;return!0}function fc(e,t,n,r,o,i){if(nr=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hs.current=e===null||e.memoizedState===null?JS:ek,e=n(r,o),Fo){i=0;do{if(Fo=!1,oi=0,25<=i)throw Error(j(301));i+=1,Ie=be=null,t.updateQueue=null,hs.current=tk,e=n(r,o)}while(Fo)}if(hs.current=Rs,t=be!==null&&be.next!==null,nr=0,Ie=be=we=null,As=!1,t)throw Error(j(300));return e}function hc(){var e=oi!==0;return oi=0,e}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function ht(){if(be===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=Ie===null?we.memoizedState:Ie.next;if(t!==null)Ie=t,be=e;else{if(e===null)throw Error(j(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function ii(e,t){return typeof t=="function"?t(e):t}function Ha(e){var t=ht(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=be,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,a=null,u=i;do{var c=u.lane;if((nr&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,s=r):a=a.next=f,we.lanes|=c,rr|=c}u=u.next}while(u!==null&&u!==i);a===null?s=r:a.next=l,bt(r,t.memoizedState)||(qe=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,we.lanes|=i,rr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fa(e){var t=ht(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);bt(i,t.memoizedState)||(qe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ig(){}function sg(e,t){var n=we,r=ht(),o=t(),i=!bt(r.memoizedState,o);if(i&&(r.memoizedState=o,qe=!0),r=r.queue,pc(ug.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,si(9,ag.bind(null,n,r,o,t),void 0,null),Pe===null)throw Error(j(349));(nr&30)!==0||lg(n,t,o)}return o}function lg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ag(e,t,n,r){t.value=n,t.getSnapshot=r,cg(t)&&dg(e)}function ug(e,t,n){return n(function(){cg(t)&&dg(e)})}function cg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bt(e,n)}catch{return!0}}function dg(e){var t=nn(e,1);t!==null&&Ct(t,e,1,-1)}function Dh(e){var t=At();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:e},t.queue=e,e=e.dispatch=KS.bind(null,we,e),[t.memoizedState,e]}function si(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function fg(){return ht().memoizedState}function ps(e,t,n,r){var o=At();we.flags|=e,o.memoizedState=si(1|t,n,void 0,r===void 0?null:r)}function Gs(e,t,n,r){var o=ht();r=r===void 0?null:r;var i=void 0;if(be!==null){var s=be.memoizedState;if(i=s.destroy,r!==null&&dc(r,s.deps)){o.memoizedState=si(t,n,i,r);return}}we.flags|=e,o.memoizedState=si(1|t,n,i,r)}function Lh(e,t){return ps(8390656,8,e,t)}function pc(e,t){return Gs(2048,8,e,t)}function hg(e,t){return Gs(4,2,e,t)}function pg(e,t){return Gs(4,4,e,t)}function gg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mg(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4,4,gg.bind(null,t,e),n)}function gc(){}function yg(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vg(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wg(e,t,n){return(nr&21)===0?(e.baseState&&(e.baseState=!1,qe=!0),e.memoizedState=n):(bt(n,t)||(n=_p(),we.lanes|=n,rr|=n,e.baseState=!0),t)}function ZS(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=Ba.transition;Ba.transition={};try{e(!1),t()}finally{ce=n,Ba.transition=r}}function xg(){return ht().memoizedState}function QS(e,t,n){var r=Mn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Eg(e))Sg(t,n);else if(n=ng(e,t,n,r),n!==null){var o=We();Ct(n,e,r,o),kg(n,t,r)}}function KS(e,t,n){var r=Mn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eg(e))Sg(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,bt(l,s)){var a=t.interleaved;a===null?(o.next=o,sc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=ng(e,t,o,r),n!==null&&(o=We(),Ct(n,e,r,o),kg(n,t,r))}}function Eg(e){var t=e.alternate;return e===we||t!==null&&t===we}function Sg(e,t){Fo=As=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kg(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yu(e,n)}}var Rs={readContext:ft,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},JS={readContext:ft,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Lh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ps(4194308,4,gg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var n=At();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=At();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=QS.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:Dh,useDebugValue:gc,useDeferredValue:function(e){return At().memoizedState=e},useTransition:function(){var e=Dh(!1),t=e[0];return e=ZS.bind(null,e[1]),At().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,o=At();if(me){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Pe===null)throw Error(j(349));(nr&30)!==0||lg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Lh(ug.bind(null,r,i,e),[e]),r.flags|=2048,si(9,ag.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=At(),t=Pe.identifierPrefix;if(me){var n=Kt,r=Qt;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=oi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=GS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ek={readContext:ft,useCallback:yg,useContext:ft,useEffect:pc,useImperativeHandle:mg,useInsertionEffect:hg,useLayoutEffect:pg,useMemo:vg,useReducer:Ha,useRef:fg,useState:function(){return Ha(ii)},useDebugValue:gc,useDeferredValue:function(e){var t=ht();return wg(t,be.memoizedState,e)},useTransition:function(){var e=Ha(ii)[0],t=ht().memoizedState;return[e,t]},useMutableSource:ig,useSyncExternalStore:sg,useId:xg,unstable_isNewReconciler:!1},tk={readContext:ft,useCallback:yg,useContext:ft,useEffect:pc,useImperativeHandle:mg,useInsertionEffect:hg,useLayoutEffect:pg,useMemo:vg,useReducer:Fa,useRef:fg,useState:function(){return Fa(ii)},useDebugValue:gc,useDeferredValue:function(e){var t=ht();return be===null?t.memoizedState=e:wg(t,be.memoizedState,e)},useTransition:function(){var e=Fa(ii)[0],t=ht().memoizedState;return[e,t]},useMutableSource:ig,useSyncExternalStore:sg,useId:xg,unstable_isNewReconciler:!1};function St(e,t){if(e&&e.defaultProps){t=xe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Su(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={isMounted:function(e){return(e=e._reactInternals)?sr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=We(),o=Mn(e),i=Jt(r,o);i.payload=t,n!=null&&(i.callback=n),t=Cn(e,i,o),t!==null&&(Ct(t,e,o,r),fs(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=We(),o=Mn(e),i=Jt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Cn(e,i,o),t!==null&&(Ct(t,e,o,r),fs(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=We(),r=Mn(e),o=Jt(n,r);o.tag=2,t!=null&&(o.callback=t),t=Cn(e,o,r),t!==null&&(Ct(t,e,r,n),fs(t,e,r))}};function zh(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Ko(n,r)||!Ko(o,i):!0}function _g(e,t,n){var r=!1,o=On,i=t.contextType;return typeof i=="object"&&i!==null?i=ft(i):(o=Ge(t)?er:He.current,r=t.contextTypes,i=(r=r!=null)?Ur(e,o):On),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ah(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Zs.enqueueReplaceState(t,t.state,null)}function ku(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},lc(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ft(i):(i=Ge(t)?er:He.current,o.context=Ur(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Su(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Zs.enqueueReplaceState(o,o.state,null),Ls(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Gr(e,t){try{var n="",r=t;do n+=OE(r),r=r.return;while(r);var o=n}catch(i){o=`
1833
+ Error generating stack: `+i.message+`
1834
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function Va(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function _u(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var nk=typeof WeakMap=="function"?WeakMap:Map;function Ng(e,t,n){n=Jt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Bs||(Bs=!0,Lu=r),_u(e,t)},n}function Cg(e,t,n){n=Jt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){_u(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){_u(e,t),typeof r!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Rh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new nk;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=mk.bind(null,e,t,n),t.then(e,e))}function $h(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Bh(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Jt(-1,1),t.tag=2,Cn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var rk=on.ReactCurrentOwner,qe=!1;function je(e,t,n,r){t.child=e===null?tg(t,null,n,r):qr(t,e.child,n,r)}function Hh(e,t,n,r,o){n=n.render;var i=t.ref;return Vr(t,o),r=fc(e,t,n,r,i,o),n=hc(),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rn(e,t,o)):(me&&n&&ec(t),t.flags|=1,je(e,t,r,o),t.child)}function Fh(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!kc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,bg(e,t,i,r,o)):(e=vs(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ko,n(s,r)&&e.ref===t.ref)return rn(e,t,o)}return t.flags|=1,e=In(i,r),e.ref=t.ref,e.return=t,t.child=e}function bg(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Ko(i,r)&&e.ref===t.ref)if(qe=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(qe=!0);else return t.lanes=e.lanes,rn(e,t,o)}return Nu(e,t,n,r,o)}function Mg(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(Rr,Je),Je|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(Rr,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,fe(Rr,Je),Je|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,fe(Rr,Je),Je|=r;return je(e,t,o,n),t.child}function Ig(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Nu(e,t,n,r,o){var i=Ge(n)?er:He.current;return i=Ur(t,i),Vr(t,o),n=fc(e,t,n,r,i,o),r=hc(),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rn(e,t,o)):(me&&r&&ec(t),t.flags|=1,je(e,t,n,o),t.child)}function Vh(e,t,n,r,o){if(Ge(n)){var i=!0;Is(t)}else i=!1;if(Vr(t,o),t.stateNode===null)gs(e,t),_g(t,n,r),ku(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=ft(u):(u=Ge(n)?er:He.current,u=Ur(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Ah(t,s,r,u),yn=!1;var d=t.memoizedState;s.state=d,Ls(t,r,s,o),a=t.memoizedState,l!==r||d!==a||Xe.current||yn?(typeof c=="function"&&(Su(t,n,c,r),a=t.memoizedState),(l=yn||zh(t,n,l,r,d,a,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,rg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:St(t.type,l),s.props=u,f=t.pendingProps,d=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=ft(a):(a=Ge(n)?er:He.current,a=Ur(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||d!==a)&&Ah(t,s,r,a),yn=!1,d=t.memoizedState,s.state=d,Ls(t,r,s,o);var m=t.memoizedState;l!==f||d!==m||Xe.current||yn?(typeof h=="function"&&(Su(t,n,h,r),m=t.memoizedState),(u=yn||zh(t,n,u,r,d,m,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Cu(e,t,n,r,i,o)}function Cu(e,t,n,r,o,i){Ig(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&bh(t,n,!1),rn(e,t,i);r=t.stateNode,rk.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=qr(t,e.child,null,i),t.child=qr(t,null,l,i)):je(e,t,l,i),t.memoizedState=r.state,o&&bh(t,n,!0),t.child}function Pg(e){var t=e.stateNode;t.pendingContext?Ch(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ch(e,t.context,!1),ac(e,t.containerInfo)}function jh(e,t,n,r,o){return Yr(),nc(o),t.flags|=256,je(e,t,n,r),t.child}var bu={dehydrated:null,treeContext:null,retryLane:0};function Mu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Og(e,t,n){var r=t.pendingProps,o=ve.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),fe(ve,o&1),e===null)return xu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Js(s,r,0,null),e=Jn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mu(n),t.memoizedState=bu,e):mc(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return ok(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=In(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=In(l,i):(i=Jn(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Mu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=bu,r}return i=e.child,e=i.sibling,r=In(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function mc(e,t){return t=Js({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ss(e,t,n,r){return r!==null&&nc(r),qr(t,e.child,null,n),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ok(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Va(Error(j(422))),ss(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Js({mode:"visible",children:r.children},o,0,null),i=Jn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&qr(t,e.child,null,s),t.child.memoizedState=Mu(s),t.memoizedState=bu,i);if((t.mode&1)===0)return ss(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(j(419)),r=Va(i,r,void 0),ss(e,t,s,r)}if(l=(s&e.childLanes)!==0,qe||l){if(r=Pe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,nn(e,o),Ct(r,e,o,-1))}return Sc(),r=Va(Error(j(421))),ss(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=yk.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,et=Nn(o.nextSibling),tt=t,me=!0,_t=null,e!==null&&(at[ut++]=Qt,at[ut++]=Kt,at[ut++]=tr,Qt=e.id,Kt=e.overflow,tr=t),t=mc(t,r.children),t.flags|=4096,t)}function Wh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Eu(e.return,t,n)}function ja(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Tg(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(je(e,t,r.children,n),r=ve.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wh(e,n,t);else if(e.tag===19)Wh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fe(ve,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&zs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ja(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&zs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ja(t,!0,n,null,i);break;case"together":ja(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=In(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=In(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ik(e,t,n){switch(t.tag){case 3:Pg(t),Yr();break;case 5:og(t);break;case 1:Ge(t.type)&&Is(t);break;case 4:ac(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;fe(Ts,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(fe(ve,ve.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Og(e,t,n):(fe(ve,ve.current&1),e=rn(e,t,n),e!==null?e.sibling:null);fe(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Tg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),fe(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,Mg(e,t,n)}return rn(e,t,n)}var Dg,Iu,Lg,zg;Dg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Iu=function(){};Lg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qn(Bt.current);var i=null;switch(n){case"input":o=Qa(e,o),r=Qa(e,r),i=[];break;case"select":o=xe({},o,{value:void 0}),r=xe({},r,{value:void 0}),i=[];break;case"textarea":o=eu(e,o),r=eu(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bs)}nu(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Uo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o?.[u],r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Uo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&he("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};zg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Io(e,t){if(!me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function sk(e,t,n){var r=t.pendingProps;switch(tc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return Ge(t.type)&&Ms(),$e(t),null;case 3:return r=t.stateNode,Xr(),pe(Xe),pe(He),cc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(os(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_t!==null&&(Ru(_t),_t=null))),Iu(e,t),$e(t),null;case 5:uc(t);var o=Qn(ri.current);if(n=t.type,e!==null&&t.stateNode!=null)Lg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return $e(t),null}if(e=Qn(Bt.current),os(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Rt]=t,r[ti]=i,e=(t.mode&1)!==0,n){case"dialog":he("cancel",r),he("close",r);break;case"iframe":case"object":case"embed":he("load",r);break;case"video":case"audio":for(o=0;o<zo.length;o++)he(zo[o],r);break;case"source":he("error",r);break;case"img":case"image":case"link":he("error",r),he("load",r);break;case"details":he("toggle",r);break;case"input":Kf(r,i),he("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},he("invalid",r);break;case"textarea":eh(r,i),he("invalid",r)}nu(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&rs(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&rs(r.textContent,l,e),o=["children",""+l]):Uo.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&he("scroll",r)}switch(n){case"input":Ui(r),Jf(r,i,!0);break;case"textarea":Ui(r),th(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=bs)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=up(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Rt]=t,e[ti]=r,Dg(e,t,!1,!1),t.stateNode=e;e:{switch(s=ru(n,r),n){case"dialog":he("cancel",e),he("close",e),o=r;break;case"iframe":case"object":case"embed":he("load",e),o=r;break;case"video":case"audio":for(o=0;o<zo.length;o++)he(zo[o],e);o=r;break;case"source":he("error",e),o=r;break;case"img":case"image":case"link":he("error",e),he("load",e),o=r;break;case"details":he("toggle",e),o=r;break;case"input":Kf(e,r),o=Qa(e,r),he("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=xe({},r,{value:void 0}),he("invalid",e);break;case"textarea":eh(e,r),o=eu(e,r),he("invalid",e);break;default:o=r}nu(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?fp(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&cp(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Yo(e,a):typeof a=="number"&&Yo(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Uo.hasOwnProperty(i)?a!=null&&i==="onScroll"&&he("scroll",e):a!=null&&Hu(e,i,a,s))}switch(n){case"input":Ui(e),Jf(e,r,!1);break;case"textarea":Ui(e),th(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?$r(e,!!r.multiple,i,!1):r.defaultValue!=null&&$r(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=bs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return $e(t),null;case 6:if(e&&t.stateNode!=null)zg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=Qn(ri.current),Qn(Bt.current),os(t)){if(r=t.stateNode,n=t.memoizedProps,r[Rt]=t,(i=r.nodeValue!==n)&&(e=tt,e!==null))switch(e.tag){case 3:rs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rs(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Rt]=t,t.stateNode=r}return $e(t),null;case 13:if(pe(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(me&&et!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Jp(),Yr(),t.flags|=98560,i=!1;else if(i=os(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(j(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[Rt]=t}else Yr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else _t!==null&&(Ru(_t),_t=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ve.current&1)!==0?Me===0&&(Me=3):Sc())),t.updateQueue!==null&&(t.flags|=4),$e(t),null);case 4:return Xr(),Iu(e,t),e===null&&Jo(t.stateNode.containerInfo),$e(t),null;case 10:return ic(t.type._context),$e(t),null;case 17:return Ge(t.type)&&Ms(),$e(t),null;case 19:if(pe(ve),i=t.memoizedState,i===null)return $e(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Io(i,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=zs(e),s!==null){for(t.flags|=128,Io(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fe(ve,ve.current&1|2),t.child}e=e.sibling}i.tail!==null&&_e()>Zr&&(t.flags|=128,r=!0,Io(i,!1),t.lanes=4194304)}else{if(!r)if(e=zs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Io(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!me)return $e(t),null}else 2*_e()-i.renderingStartTime>Zr&&n!==1073741824&&(t.flags|=128,r=!0,Io(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_e(),t.sibling=null,n=ve.current,fe(ve,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return Ec(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Je&1073741824)!==0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function lk(e,t){switch(tc(t),t.tag){case 1:return Ge(t.type)&&Ms(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xr(),pe(Xe),pe(He),cc(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return uc(t),null;case 13:if(pe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ve),null;case 4:return Xr(),null;case 10:return ic(t.type._context),null;case 22:case 23:return Ec(),null;case 24:return null;default:return null}}var ls=!1,Be=!1,ak=typeof WeakSet=="function"?WeakSet:Set,X=null;function Ar(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ee(e,t,r)}else n.current=null}function Pu(e,t,n){try{n()}catch(r){Ee(e,t,r)}}var Uh=!1;function uk(e,t){if(hu=_s,e=Hp(),Ju(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(l=s+o),f!==i||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===o&&(l=s),d===i&&++c===r&&(a=s),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(pu={focusedElem:e,selectionRange:n},_s=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var m=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var w=m.memoizedProps,x=m.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?w:St(t.type,w),x);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(v){Ee(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return m=Uh,Uh=!1,m}function Vo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Pu(t,n,i)}o=o.next}while(o!==r)}}function Qs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ou(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ag(e){var t=e.alternate;t!==null&&(e.alternate=null,Ag(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[ti],delete t[yu],delete t[US],delete t[YS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rg(e){return e.tag===5||e.tag===3||e.tag===4}function Yh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bs));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function Du(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Du(e,t,n),e=e.sibling;e!==null;)Du(e,t,n),e=e.sibling}var De=null,kt=!1;function gn(e,t,n){for(n=n.child;n!==null;)$g(e,t,n),n=n.sibling}function $g(e,t,n){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(js,n)}catch{}switch(n.tag){case 5:Be||Ar(n,t);case 6:var r=De,o=kt;De=null,gn(e,t,n),De=r,kt=o,De!==null&&(kt?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(kt?(e=De,n=n.stateNode,e.nodeType===8?Aa(e.parentNode,n):e.nodeType===1&&Aa(e,n),Zo(e)):Aa(De,n.stateNode));break;case 4:r=De,o=kt,De=n.stateNode.containerInfo,kt=!0,gn(e,t,n),De=r,kt=o;break;case 0:case 11:case 14:case 15:if(!Be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Pu(n,t,s),o=o.next}while(o!==r)}gn(e,t,n);break;case 1:if(!Be&&(Ar(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ee(n,t,l)}gn(e,t,n);break;case 21:gn(e,t,n);break;case 22:n.mode&1?(Be=(r=Be)||n.memoizedState!==null,gn(e,t,n),Be=r):gn(e,t,n);break;default:gn(e,t,n)}}function qh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ak),t.forEach(function(r){var o=vk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:De=l.stateNode,kt=!1;break e;case 3:De=l.stateNode.containerInfo,kt=!0;break e;case 4:De=l.stateNode.containerInfo,kt=!0;break e}l=l.return}if(De===null)throw Error(j(160));$g(i,s,o),De=null,kt=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){Ee(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bg(t,e),t=t.sibling}function Bg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Et(t,e),zt(e),r&4){try{Vo(3,e,e.return),Qs(3,e)}catch(w){Ee(e,e.return,w)}try{Vo(5,e,e.return)}catch(w){Ee(e,e.return,w)}}break;case 1:Et(t,e),zt(e),r&512&&n!==null&&Ar(n,n.return);break;case 5:if(Et(t,e),zt(e),r&512&&n!==null&&Ar(n,n.return),e.flags&32){var o=e.stateNode;try{Yo(o,"")}catch(w){Ee(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&lp(o,i),ru(l,s);var u=ru(l,i);for(s=0;s<a.length;s+=2){var c=a[s],f=a[s+1];c==="style"?fp(o,f):c==="dangerouslySetInnerHTML"?cp(o,f):c==="children"?Yo(o,f):Hu(o,c,f,u)}switch(l){case"input":Ka(o,i);break;case"textarea":ap(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?$r(o,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?$r(o,!!i.multiple,i.defaultValue,!0):$r(o,!!i.multiple,i.multiple?[]:"",!1))}o[ti]=i}catch(w){Ee(e,e.return,w)}}break;case 6:if(Et(t,e),zt(e),r&4){if(e.stateNode===null)throw Error(j(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){Ee(e,e.return,w)}}break;case 3:if(Et(t,e),zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zo(t.containerInfo)}catch(w){Ee(e,e.return,w)}break;case 4:Et(t,e),zt(e);break;case 13:Et(t,e),zt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(wc=_e())),r&4&&qh(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Be=(u=Be)||c,Et(t,e),Be=u):Et(t,e),zt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&(e.mode&1)!==0)for(X=e,c=e.child;c!==null;){for(f=X=c;X!==null;){switch(d=X,h=d.child,d.tag){case 0:case 11:case 14:case 15:Vo(4,d,d.return);break;case 1:Ar(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(w){Ee(r,n,w)}}break;case 5:Ar(d,d.return);break;case 22:if(d.memoizedState!==null){Gh(f);continue}}h!==null?(h.return=d,X=h):Gh(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{o=f.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,a=f.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=dp("display",s))}catch(w){Ee(e,e.return,w)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(w){Ee(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Et(t,e),zt(e),r&4&&qh(e);break;case 21:break;default:Et(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Rg(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Yo(o,""),r.flags&=-33);var i=Yh(e);Du(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=Yh(e);Tu(e,l,s);break;default:throw Error(j(161))}}catch(a){Ee(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ck(e,t,n){X=e,Hg(e,t,n)}function Hg(e,t,n){for(var r=(e.mode&1)!==0;X!==null;){var o=X,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||ls;if(!s){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Be;l=ls;var u=Be;if(ls=s,(Be=a)&&!u)for(X=o;X!==null;)s=X,a=s.child,s.tag===22&&s.memoizedState!==null?Zh(o):a!==null?(a.return=s,X=a):Zh(o);for(;i!==null;)X=i,Hg(i,t,n),i=i.sibling;X=o,ls=l,Be=u}Xh(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,X=i):Xh(e,t,n)}}function Xh(e){for(;X!==null;){var t=X;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Be||Qs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Be)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:St(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Th(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Th(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Zo(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}Be||t.flags&512&&Ou(t)}catch(d){Ee(t,t.return,d)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function Gh(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function Zh(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qs(4,t)}catch(a){Ee(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){Ee(t,o,a)}}var i=t.return;try{Ou(t)}catch(a){Ee(t,i,a)}break;case 5:var s=t.return;try{Ou(t)}catch(a){Ee(t,s,a)}}}catch(a){Ee(t,t.return,a)}if(t===e){X=null;break}var l=t.sibling;if(l!==null){l.return=t.return,X=l;break}X=t.return}}var dk=Math.ceil,$s=on.ReactCurrentDispatcher,yc=on.ReactCurrentOwner,dt=on.ReactCurrentBatchConfig,ae=0,Pe=null,Ce=null,Le=0,Je=0,Rr=Dn(0),Me=0,li=null,rr=0,Ks=0,vc=0,jo=null,Ye=null,wc=0,Zr=1/0,Gt=null,Bs=!1,Lu=null,bn=null,as=!1,En=null,Hs=0,Wo=0,zu=null,ms=-1,ys=0;function We(){return(ae&6)!==0?_e():ms!==-1?ms:ms=_e()}function Mn(e){return(e.mode&1)===0?1:(ae&2)!==0&&Le!==0?Le&-Le:XS.transition!==null?(ys===0&&(ys=_p()),ys):(e=ce,e!==0||(e=window.event,e=e===void 0?16:Op(e.type)),e)}function Ct(e,t,n,r){if(50<Wo)throw Wo=0,zu=null,Error(j(185));ai(e,n,r),((ae&2)===0||e!==Pe)&&(e===Pe&&((ae&2)===0&&(Ks|=n),Me===4&&wn(e,Le)),Ze(e,r),n===1&&ae===0&&(t.mode&1)===0&&(Zr=_e()+500,Xs&&Ln()))}function Ze(e,t){var n=e.callbackNode;ZE(e,t);var r=ks(e,e===Pe?Le:0);if(r===0)n!==null&&oh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&oh(n),t===1)e.tag===0?qS(Qh.bind(null,e)):Zp(Qh.bind(null,e)),jS(function(){(ae&6)===0&&Ln()}),n=null;else{switch(Np(r)){case 1:n=Uu;break;case 4:n=Sp;break;case 16:n=Ss;break;case 536870912:n=kp;break;default:n=Ss}n=Xg(n,Fg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fg(e,t){if(ms=-1,ys=0,(ae&6)!==0)throw Error(j(327));var n=e.callbackNode;if(jr()&&e.callbackNode!==n)return null;var r=ks(e,e===Pe?Le:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Fs(e,r);else{t=r;var o=ae;ae|=2;var i=jg();(Pe!==e||Le!==t)&&(Gt=null,Zr=_e()+500,Kn(e,t));do try{pk();break}catch(l){Vg(e,l)}while(!0);oc(),$s.current=i,ae=o,Ce!==null?t=0:(Pe=null,Le=0,t=Me)}if(t!==0){if(t===2&&(o=au(e),o!==0&&(r=o,t=Au(e,o))),t===1)throw n=li,Kn(e,0),wn(e,r),Ze(e,_e()),n;if(t===6)wn(e,r);else{if(o=e.current.alternate,(r&30)===0&&!fk(o)&&(t=Fs(e,r),t===2&&(i=au(e),i!==0&&(r=i,t=Au(e,i))),t===1))throw n=li,Kn(e,0),wn(e,r),Ze(e,_e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:Xn(e,Ye,Gt);break;case 3:if(wn(e,r),(r&130023424)===r&&(t=wc+500-_e(),10<t)){if(ks(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){We(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=mu(Xn.bind(null,e,Ye,Gt),t);break}Xn(e,Ye,Gt);break;case 4:if(wn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Nt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dk(r/1960))-r,10<r){e.timeoutHandle=mu(Xn.bind(null,e,Ye,Gt),r);break}Xn(e,Ye,Gt);break;case 5:Xn(e,Ye,Gt);break;default:throw Error(j(329))}}}return Ze(e,_e()),e.callbackNode===n?Fg.bind(null,e):null}function Au(e,t){var n=jo;return e.current.memoizedState.isDehydrated&&(Kn(e,t).flags|=256),e=Fs(e,t),e!==2&&(t=Ye,Ye=n,t!==null&&Ru(t)),e}function Ru(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function fk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!bt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wn(e,t){for(t&=~vc,t&=~Ks,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Qh(e){if((ae&6)!==0)throw Error(j(327));jr();var t=ks(e,0);if((t&1)===0)return Ze(e,_e()),null;var n=Fs(e,t);if(e.tag!==0&&n===2){var r=au(e);r!==0&&(t=r,n=Au(e,r))}if(n===1)throw n=li,Kn(e,0),wn(e,t),Ze(e,_e()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xn(e,Ye,Gt),Ze(e,_e()),null}function xc(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Zr=_e()+500,Xs&&Ln())}}function or(e){En!==null&&En.tag===0&&(ae&6)===0&&jr();var t=ae;ae|=1;var n=dt.transition,r=ce;try{if(dt.transition=null,ce=1,e)return e()}finally{ce=r,dt.transition=n,ae=t,(ae&6)===0&&Ln()}}function Ec(){Je=Rr.current,pe(Rr)}function Kn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,VS(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(tc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ms();break;case 3:Xr(),pe(Xe),pe(He),cc();break;case 5:uc(r);break;case 4:Xr();break;case 13:pe(ve);break;case 19:pe(ve);break;case 10:ic(r.type._context);break;case 22:case 23:Ec()}n=n.return}if(Pe=e,Ce=e=In(e.current,null),Le=Je=t,Me=0,li=null,vc=Ks=rr=0,Ye=jo=null,Zn!==null){for(t=0;t<Zn.length;t++)if(n=Zn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Zn=null}return e}function Vg(e,t){do{var n=Ce;try{if(oc(),hs.current=Rs,As){for(var r=we.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}As=!1}if(nr=0,Ie=be=we=null,Fo=!1,oi=0,yc.current=null,n===null||n.return===null){Me=1,li=t,Ce=null;break}e:{var i=e,s=n.return,l=n,a=t;if(t=Le,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if((c.mode&1)===0&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=$h(s);if(h!==null){h.flags&=-257,Bh(h,s,l,i,t),h.mode&1&&Rh(i,u,t),t=h,a=u;var m=t.updateQueue;if(m===null){var w=new Set;w.add(a),t.updateQueue=w}else m.add(a);break e}else{if((t&1)===0){Rh(i,u,t),Sc();break e}a=Error(j(426))}}else if(me&&l.mode&1){var x=$h(s);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),Bh(x,s,l,i,t),nc(Gr(a,l));break e}}i=a=Gr(a,l),Me!==4&&(Me=2),jo===null?jo=[i]:jo.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=Ng(i,a,t);Oh(i,g);break e;case 1:l=a;var y=i.type,p=i.stateNode;if((i.flags&128)===0&&(typeof y.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(bn===null||!bn.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var v=Cg(i,l,t);Oh(i,v);break e}}i=i.return}while(i!==null)}Ug(n)}catch(k){t=k,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function jg(){var e=$s.current;return $s.current=Rs,e===null?Rs:e}function Sc(){(Me===0||Me===3||Me===2)&&(Me=4),Pe===null||(rr&268435455)===0&&(Ks&268435455)===0||wn(Pe,Le)}function Fs(e,t){var n=ae;ae|=2;var r=jg();(Pe!==e||Le!==t)&&(Gt=null,Kn(e,t));do try{hk();break}catch(o){Vg(e,o)}while(!0);if(oc(),ae=n,$s.current=r,Ce!==null)throw Error(j(261));return Pe=null,Le=0,Me}function hk(){for(;Ce!==null;)Wg(Ce)}function pk(){for(;Ce!==null&&!FE();)Wg(Ce)}function Wg(e){var t=qg(e.alternate,e,Je);e.memoizedProps=e.pendingProps,t===null?Ug(e):Ce=t,yc.current=null}function Ug(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=sk(n,t,Je),n!==null){Ce=n;return}}else{if(n=lk(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Ce=null;return}}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Me===0&&(Me=5)}function Xn(e,t,n){var r=ce,o=dt.transition;try{dt.transition=null,ce=1,gk(e,t,n,r)}finally{dt.transition=o,ce=r}return null}function gk(e,t,n,r){do jr();while(En!==null);if((ae&6)!==0)throw Error(j(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(QE(e,i),e===Pe&&(Ce=Pe=null,Le=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||as||(as=!0,Xg(Ss,function(){return jr(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=dt.transition,dt.transition=null;var s=ce;ce=1;var l=ae;ae|=4,yc.current=null,uk(e,n),Bg(n,e),RS(pu),_s=!!hu,pu=hu=null,e.current=n,ck(n,e,o),VE(),ae=l,ce=s,dt.transition=i}else e.current=n;if(as&&(as=!1,En=e,Hs=o),i=e.pendingLanes,i===0&&(bn=null),UE(n.stateNode,r),Ze(e,_e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Bs)throw Bs=!1,e=Lu,Lu=null,e;return(Hs&1)!==0&&e.tag!==0&&jr(),i=e.pendingLanes,(i&1)!==0?e===zu?Wo++:(Wo=0,zu=e):Wo=0,Ln(),null}function jr(){if(En!==null){var e=Np(Hs),t=dt.transition,n=ce;try{if(dt.transition=null,ce=16>e?16:e,En===null)var r=!1;else{if(e=En,En=null,Hs=0,(ae&6)!==0)throw Error(j(331));var o=ae;for(ae|=4,X=e.current;X!==null;){var i=X,s=i.child;if((X.flags&16)!==0){var l=i.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(X=u;X!==null;){var c=X;switch(c.tag){case 0:case 11:case 15:Vo(8,c,i)}var f=c.child;if(f!==null)f.return=c,X=f;else for(;X!==null;){c=X;var d=c.sibling,h=c.return;if(Ag(c),c===u){X=null;break}if(d!==null){d.return=h,X=d;break}X=h}}}var m=i.alternate;if(m!==null){var w=m.child;if(w!==null){m.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}X=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,X=s;else e:for(;X!==null;){if(i=X,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Vo(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,X=g;break e}X=i.return}}var y=e.current;for(X=y;X!==null;){s=X;var p=s.child;if((s.subtreeFlags&2064)!==0&&p!==null)p.return=s,X=p;else e:for(s=y;X!==null;){if(l=X,(l.flags&2048)!==0)try{switch(l.tag){case 0:case 11:case 15:Qs(9,l)}}catch(k){Ee(l,l.return,k)}if(l===s){X=null;break e}var v=l.sibling;if(v!==null){v.return=l.return,X=v;break e}X=l.return}}if(ae=o,Ln(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(js,e)}catch{}r=!0}return r}finally{ce=n,dt.transition=t}}return!1}function Kh(e,t,n){t=Gr(n,t),t=Ng(e,t,1),e=Cn(e,t,1),t=We(),e!==null&&(ai(e,1,t),Ze(e,t))}function Ee(e,t,n){if(e.tag===3)Kh(e,e,n);else for(;t!==null;){if(t.tag===3){Kh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=Gr(n,e),e=Cg(t,e,1),t=Cn(t,e,1),e=We(),t!==null&&(ai(t,1,e),Ze(t,e));break}}t=t.return}}function mk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=We(),e.pingedLanes|=e.suspendedLanes&n,Pe===e&&(Le&n)===n&&(Me===4||Me===3&&(Le&130023424)===Le&&500>_e()-wc?Kn(e,0):vc|=n),Ze(e,t)}function Yg(e,t){t===0&&((e.mode&1)===0?t=1:(t=Xi,Xi<<=1,(Xi&130023424)===0&&(Xi=4194304)));var n=We();e=nn(e,t),e!==null&&(ai(e,t,n),Ze(e,n))}function yk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yg(e,n)}function vk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),Yg(e,n)}var qg;qg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)qe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return qe=!1,ik(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,me&&(t.flags&1048576)!==0&&Qp(t,Os,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;gs(e,t),e=t.pendingProps;var o=Ur(t,He.current);Vr(t,n),o=fc(null,t,r,e,o,n);var i=hc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(i=!0,Is(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,lc(t),o.updater=Zs,t.stateNode=o,o._reactInternals=t,ku(t,r,e,n),t=Cu(null,t,r,!0,i,n)):(t.tag=0,me&&i&&ec(t),je(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(gs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=xk(r),e=St(r,e),o){case 0:t=Nu(null,t,r,e,n);break e;case 1:t=Vh(null,t,r,e,n);break e;case 11:t=Hh(null,t,r,e,n);break e;case 14:t=Fh(null,t,r,St(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Nu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Vh(e,t,r,o,n);case 3:e:{if(Pg(t),e===null)throw Error(j(387));r=t.pendingProps,i=t.memoizedState,o=i.element,rg(e,t),Ls(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Gr(Error(j(423)),t),t=jh(e,t,r,n,o);break e}else if(r!==o){o=Gr(Error(j(424)),t),t=jh(e,t,r,n,o);break e}else for(et=Nn(t.stateNode.containerInfo.firstChild),tt=t,me=!0,_t=null,n=tg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Yr(),r===o){t=rn(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return og(t),e===null&&xu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,gu(r,o)?s=null:i!==null&&gu(r,i)&&(t.flags|=32),Ig(e,t),je(e,t,s,n),t.child;case 6:return e===null&&xu(t),null;case 13:return Og(e,t,n);case 4:return ac(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=qr(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Hh(e,t,r,o,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,fe(Ts,r._currentValue),r._currentValue=s,i!==null)if(bt(i.value,s)){if(i.children===o.children&&!Xe.current){t=rn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Jt(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Eu(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(j(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Eu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}je(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Vr(t,n),o=ft(o),r=r(o),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,o=St(r,t.pendingProps),o=St(r.type,o),Fh(e,t,r,o,n);case 15:return bg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),gs(e,t),t.tag=1,Ge(r)?(e=!0,Is(t)):e=!1,Vr(t,n),_g(t,r,o),ku(t,r,o,n),Cu(null,t,r,!0,e,n);case 19:return Tg(e,t,n);case 22:return Mg(e,t,n)}throw Error(j(156,t.tag))};function Xg(e,t){return Ep(e,t)}function wk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new wk(e,t,n,r)}function kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xk(e){if(typeof e=="function")return kc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vu)return 11;if(e===ju)return 14}return 2}function In(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vs(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")kc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case br:return Jn(n.children,o,i,t);case Fu:s=8,o|=8;break;case qa:return e=ct(12,n,t,o|2),e.elementType=qa,e.lanes=i,e;case Xa:return e=ct(13,n,t,o),e.elementType=Xa,e.lanes=i,e;case Ga:return e=ct(19,n,t,o),e.elementType=Ga,e.lanes=i,e;case op:return Js(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case np:s=10;break e;case rp:s=9;break e;case Vu:s=11;break e;case ju:s=14;break e;case mn:s=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=ct(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Jn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function Js(e,t,n,r){return e=ct(22,e,r,t),e.elementType=op,e.lanes=n,e.stateNode={isHidden:!1},e}function Wa(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function Ua(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ek(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ma(0),this.expirationTimes=Ma(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function _c(e,t,n,r,o,i,s,l,a){return e=new Ek(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ct(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lc(i),e}function Sk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Cr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gg(e){if(!e)return On;e=e._reactInternals;e:{if(sr(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ge(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var n=e.type;if(Ge(n))return Gp(e,n,t)}return t}function Zg(e,t,n,r,o,i,s,l,a){return e=_c(n,r,!0,e,o,i,s,l,a),e.context=Gg(null),n=e.current,r=We(),o=Mn(n),i=Jt(r,o),i.callback=t??null,Cn(n,i,o),e.current.lanes=o,ai(e,o,r),Ze(e,r),e}function el(e,t,n,r){var o=t.current,i=We(),s=Mn(o);return n=Gg(n),t.context===null?t.context=n:t.pendingContext=n,t=Jt(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Cn(o,t,s),e!==null&&(Ct(e,o,s,i),fs(e,o,s)),s}function Vs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Jh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Nc(e,t){Jh(e,t),(e=e.alternate)&&Jh(e,t)}function kk(){return null}var Qg=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cc(e){this._internalRoot=e}tl.prototype.render=Cc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));el(e,t,null,null)};tl.prototype.unmount=Cc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;or(function(){el(null,e,null,null)}),t[tn]=null}};function tl(e){this._internalRoot=e}tl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<vn.length&&t!==0&&t<vn[n].priority;n++);vn.splice(n,0,e),n===0&&Pp(e)}};function bc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ep(){}function _k(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Vs(s);i.call(u)}}var s=Zg(t,r,e,0,null,!1,!1,"",ep);return e._reactRootContainer=s,e[tn]=s.current,Jo(e.nodeType===8?e.parentNode:e),or(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=Vs(a);l.call(u)}}var a=_c(e,0,!1,null,null,!1,!1,"",ep);return e._reactRootContainer=a,e[tn]=a.current,Jo(e.nodeType===8?e.parentNode:e),or(function(){el(t,a,n,r)}),a}function rl(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var a=Vs(s);l.call(a)}}el(t,s,e,o)}else s=_k(n,t,e,o,r);return Vs(s)}Cp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Lo(t.pendingLanes);n!==0&&(Yu(t,n|1),Ze(t,_e()),(ae&6)===0&&(Zr=_e()+500,Ln()))}break;case 13:or(function(){var r=nn(e,1);if(r!==null){var o=We();Ct(r,e,1,o)}}),Nc(e,1)}};qu=function(e){if(e.tag===13){var t=nn(e,134217728);if(t!==null){var n=We();Ct(t,e,134217728,n)}Nc(e,134217728)}};bp=function(e){if(e.tag===13){var t=Mn(e),n=nn(e,t);if(n!==null){var r=We();Ct(n,e,t,r)}Nc(e,t)}};Mp=function(){return ce};Ip=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};iu=function(e,t,n){switch(t){case"input":if(Ka(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=qs(r);if(!o)throw Error(j(90));sp(r),Ka(r,o)}}}break;case"textarea":ap(e,n);break;case"select":t=n.value,t!=null&&$r(e,!!n.multiple,t,!1)}};gp=xc;mp=or;var Nk={usingClientEntryPoint:!1,Events:[ci,Or,qs,hp,pp,xc]},Po={findFiberByHostInstance:Gn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ck={bundleType:Po.bundleType,version:Po.version,rendererPackageName:Po.rendererPackageName,rendererConfig:Po.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:on.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wp(e),e===null?null:e.stateNode},findFiberByHostInstance:Po.findFiberByHostInstance||kk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Oo=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Oo.isDisabled&&Oo.supportsFiber))try{js=Oo.inject(Ck),$t=Oo}catch{}var Oo;ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nk;ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bc(t))throw Error(j(200));return Sk(e,t,null,n)};ot.createRoot=function(e,t){if(!bc(e))throw Error(j(299));var n=!1,r="",o=Qg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=_c(e,1,!1,null,null,n,!1,r,o),e[tn]=t.current,Jo(e.nodeType===8?e.parentNode:e),new Cc(t)};ot.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=wp(t),e=e===null?null:e.stateNode,e};ot.flushSync=function(e){return or(e)};ot.hydrate=function(e,t,n){if(!nl(t))throw Error(j(200));return rl(null,e,t,!0,n)};ot.hydrateRoot=function(e,t,n){if(!bc(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=Qg;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Zg(t,null,e,1,n??null,o,!1,i,s),e[tn]=t.current,Jo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new tl(t)};ot.render=function(e,t,n){if(!nl(t))throw Error(j(200));return rl(null,e,t,!1,n)};ot.unmountComponentAtNode=function(e){if(!nl(e))throw Error(j(40));return e._reactRootContainer?(or(function(){rl(null,null,e,!1,function(){e._reactRootContainer=null,e[tn]=null})}),!0):!1};ot.unstable_batchedUpdates=xc;ot.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nl(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return rl(e,t,n,!1,r)};ot.version="18.3.1-next-f1338f8080-20240426"});var Mc=K((n3,em)=>{"use strict";function Jg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jg)}catch(e){console.error(e)}}Jg(),em.exports=Kg()});var nm=K(Ic=>{"use strict";var tm=Mc();Ic.createRoot=tm.createRoot,Ic.hydrateRoot=tm.hydrateRoot;var r3});var om=K(ol=>{"use strict";var bk=hn(),Mk=Symbol.for("react.element"),Ik=Symbol.for("react.fragment"),Pk=Object.prototype.hasOwnProperty,Ok=bk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Tk={key:!0,ref:!0,__self:!0,__source:!0};function rm(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Pk.call(t,r)&&!Tk.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Mk,type:e,key:i,ref:s,props:o,_owner:Ok.current}}ol.Fragment=Ik;ol.jsx=rm;ol.jsxs=rm});var il=K((s3,im)=>{"use strict";im.exports=om()});var ty=K(ey=>{"use strict";var yo=hn();function X2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var G2=typeof Object.is=="function"?Object.is:X2,Z2=yo.useState,Q2=yo.useEffect,K2=yo.useLayoutEffect,J2=yo.useDebugValue;function eb(e,t){var n=t(),r=Z2({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return K2(function(){o.value=n,o.getSnapshot=t,Hd(o)&&i({inst:o})},[e,n,t]),Q2(function(){return Hd(o)&&i({inst:o}),e(function(){Hd(o)&&i({inst:o})})},[e]),J2(n),n}function Hd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!G2(e,n)}catch{return!0}}function tb(e,t){return t()}var nb=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tb:eb;ey.useSyncExternalStore=yo.useSyncExternalStore!==void 0?yo.useSyncExternalStore:nb});var ry=K((cD,ny)=>{"use strict";ny.exports=ty()});var iy=K(oy=>{"use strict";var Yl=hn(),rb=ry();function ob(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ib=typeof Object.is=="function"?Object.is:ob,sb=rb.useSyncExternalStore,lb=Yl.useRef,ab=Yl.useEffect,ub=Yl.useMemo,cb=Yl.useDebugValue;oy.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=lb(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=ub(function(){function a(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var m=s.value;if(o(m,h))return f=m}return f=h}if(m=f,ib(c,h))return m;var w=r(h);return o!==void 0&&o(m,w)?(c=h,m):(c=h,f=w)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,o]);var l=sb(e,i[0],i[1]);return ab(function(){s.hasValue=!0,s.value=l},[l]),cb(l),l}});var ly=K((fD,sy)=>{"use strict";sy.exports=iy()});var ea=K((RD,Ov)=>{"use strict";var II="\0",Er="\0",Mv="",Xd=class{constructor(t){ke(this,"_isDirected",!0);ke(this,"_isMultigraph",!1);ke(this,"_isCompound",!1);ke(this,"_label");ke(this,"_defaultNodeLabelFn",()=>{});ke(this,"_defaultEdgeLabelFn",()=>{});ke(this,"_nodes",{});ke(this,"_in",{});ke(this,"_preds",{});ke(this,"_out",{});ke(this,"_sucs",{});ke(this,"_edgeObjs",{});ke(this,"_edgeLabels",{});ke(this,"_nodeCount",0);ke(this,"_edgeCount",0);ke(this,"_parent");ke(this,"_children");t&&(this._isDirected=Object.hasOwn(t,"directed")?t.directed:!0,this._isMultigraph=Object.hasOwn(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.hasOwn(t,"compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[Er]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(n=>Object.keys(t._in[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(t._out[n]).length===0)}setNodes(t,n){var r=arguments,o=this;return t.forEach(function(i){r.length>1?o.setNode(i,n):o.setNode(i)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Er,this._children[t]={},this._children[Er][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var n=this;if(Object.hasOwn(this._nodes,t)){var r=o=>n.removeEdge(n._edgeObjs[o]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(o){n.setParent(o)}),delete this._children[t]),Object.keys(this._in[t]).forEach(r),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=Er;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==Er)return n}}children(t=Er){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===Er)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=this._preds[t];if(n)return Object.keys(n)}successors(t){var n=this._sucs[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){let o=new Set(n);for(var r of this.successors(t))o.add(r);return Array.from(o.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([s,l]){t(s)&&n.setNode(s,l)}),Object.values(this._edgeObjs).forEach(function(s){n.hasNode(s.v)&&n.hasNode(s.w)&&n.setEdge(s,r.edge(s))});var o={};function i(s){var l=r.parent(s);return l===void 0||n.hasNode(l)?(o[s]=l,l):l in o?o[l]:i(l)}return this._isCompound&&n.nodes().forEach(s=>n.setParent(s,i(s))),n}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,n){var r=this,o=arguments;return t.reduce(function(i,s){return o.length>1?r.setEdge(i,s,n):r.setEdge(i,s),s}),this}setEdge(){var t,n,r,o,i=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(t=s.v,n=s.w,r=s.name,arguments.length===2&&(o=arguments[1],i=!0)):(t=s,n=arguments[1],r=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var l=Di(this._isDirected,t,n,r);if(Object.hasOwn(this._edgeLabels,l))return i&&(this._edgeLabels[l]=o),this;if(r!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[l]=i?o:this._defaultEdgeLabelFn(t,n,r);var a=PI(this._isDirected,t,n,r);return t=a.v,n=a.w,Object.freeze(a),this._edgeObjs[l]=a,Iv(this._preds[n],t),Iv(this._sucs[t],n),this._in[n][l]=a,this._out[t][l]=a,this._edgeCount++,this}edge(t,n,r){var o=arguments.length===1?qd(this._isDirected,arguments[0]):Di(this._isDirected,t,n,r);return this._edgeLabels[o]}edgeAsObj(){let t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var o=arguments.length===1?qd(this._isDirected,arguments[0]):Di(this._isDirected,t,n,r);return Object.hasOwn(this._edgeLabels,o)}removeEdge(t,n,r){var o=arguments.length===1?qd(this._isDirected,arguments[0]):Di(this._isDirected,t,n,r),i=this._edgeObjs[o];return i&&(t=i.v,n=i.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Pv(this._preds[n],t),Pv(this._sucs[t],n),delete this._in[n][o],delete this._out[t][o],this._edgeCount--),this}inEdges(t,n){var r=this._in[t];if(r){var o=Object.values(r);return n?o.filter(i=>i.v===n):o}}outEdges(t,n){var r=this._out[t];if(r){var o=Object.values(r);return n?o.filter(i=>i.w===n):o}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}};function Iv(e,t){e[t]?e[t]++:e[t]=1}function Pv(e,t){--e[t]||delete e[t]}function Di(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}return o+Mv+i+Mv+(r===void 0?II:r)}function PI(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}var l={v:o,w:i};return r&&(l.name=r),l}function qd(e,t){return Di(e,t.v,t.w,t.name)}Ov.exports=Xd});var Dv=K((BD,Tv)=>{Tv.exports="2.2.4"});var zv=K((HD,Lv)=>{Lv.exports={Graph:ea(),version:Dv()}});var Rv=K((FD,Av)=>{var OI=ea();Av.exports={write:TI,read:zI};function TI(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:DI(e),edges:LI(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function DI(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),o={v:t};return n!==void 0&&(o.value=n),r!==void 0&&(o.parent=r),o})}function LI(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function zI(e){var t=new OI(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}});var Bv=K((VD,$v)=>{$v.exports=AI;function AI(e){var t={},n=[],r;function o(i){Object.hasOwn(t,i)||(t[i]=!0,r.push(i),e.successors(i).forEach(o),e.predecessors(i).forEach(o))}return e.nodes().forEach(function(i){r=[],o(i),r.length&&n.push(r)}),n}});var Zd=K((jD,Hv)=>{var Gd=class{constructor(){ke(this,"_arr",[]);ke(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var n=this._keyIndices[t];if(n!==void 0)return this._arr[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,n){var r=this._keyIndices;if(t=String(t),!Object.hasOwn(r,t)){var o=this._arr,i=o.length;return r[t]=i,o.push({key:t,priority:n}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,n){var r=this._keyIndices[t];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)}_heapify(t){var n=this._arr,r=2*t,o=r+1,i=t;r<n.length&&(i=n[r].priority<n[i].priority?r:i,o<n.length&&(i=n[o].priority<n[i].priority?o:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var n=this._arr,r=n[t].priority,o;t!==0&&(o=t>>1,!(n[o].priority<r));)this._swap(t,o),t=o}_swap(t,n){var r=this._arr,o=this._keyIndices,i=r[t],s=r[n];r[t]=s,r[n]=i,o[s.key]=t,o[i.key]=n}};Hv.exports=Gd});var Qd=K((UD,Fv)=>{var RI=Zd();Fv.exports=BI;var $I=()=>1;function BI(e,t,n,r){return HI(e,String(t),n||$I,r||function(o){return e.outEdges(o)})}function HI(e,t,n,r){var o={},i=new RI,s,l,a=function(u){var c=u.v!==s?u.v:u.w,f=o[c],d=n(u),h=l.distance+d;if(d<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+d);h<f.distance&&(f.distance=h,f.predecessor=s,i.decrease(c,h))};for(e.nodes().forEach(function(u){var c=u===t?0:Number.POSITIVE_INFINITY;o[u]={distance:c},i.add(u,c)});i.size()>0&&(s=i.removeMin(),l=o[s],l.distance!==Number.POSITIVE_INFINITY);)r(s).forEach(a);return o}});var jv=K((YD,Vv)=>{var FI=Qd();Vv.exports=VI;function VI(e,t,n){return e.nodes().reduce(function(r,o){return r[o]=FI(e,o,t,n),r},{})}});var Kd=K((qD,Wv)=>{Wv.exports=jI;function jI(e){var t=0,n=[],r={},o=[];function i(s){var l=r[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(c){Object.hasOwn(r,c)?r[c].onStack&&(l.lowlink=Math.min(l.lowlink,r[c].index)):(i(c),l.lowlink=Math.min(l.lowlink,r[c].lowlink))}),l.lowlink===l.index){var a=[],u;do u=n.pop(),r[u].onStack=!1,a.push(u);while(s!==u);o.push(a)}}return e.nodes().forEach(function(s){Object.hasOwn(r,s)||i(s)}),o}});var Yv=K((XD,Uv)=>{var WI=Kd();Uv.exports=UI;function UI(e){return WI(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}});var Xv=K((GD,qv)=>{qv.exports=qI;var YI=()=>1;function qI(e,t,n){return XI(e,t||YI,n||function(r){return e.outEdges(r)})}function XI(e,t,n){var r={},o=e.nodes();return o.forEach(function(i){r[i]={},r[i][i]={distance:0},o.forEach(function(s){i!==s&&(r[i][s]={distance:Number.POSITIVE_INFINITY})}),n(i).forEach(function(s){var l=s.v===i?s.w:s.v,a=t(s);r[i][l]={distance:a,predecessor:i}})}),o.forEach(function(i){var s=r[i];o.forEach(function(l){var a=r[l];o.forEach(function(u){var c=a[i],f=s[u],d=a[u],h=c.distance+f.distance;h<d.distance&&(d.distance=h,d.predecessor=f.predecessor)})})}),r}});var Jd=K((ZD,Zv)=>{function Gv(e){var t={},n={},r=[];function o(i){if(Object.hasOwn(n,i))throw new Li;Object.hasOwn(t,i)||(n[i]=!0,t[i]=!0,e.predecessors(i).forEach(o),delete n[i],r.push(i))}if(e.sinks().forEach(o),Object.keys(t).length!==e.nodeCount())throw new Li;return r}var Li=class extends Error{constructor(){super(...arguments)}};Zv.exports=Gv;Gv.CycleException=Li});var Jv=K((QD,Kv)=>{var Qv=Jd();Kv.exports=GI;function GI(e){try{Qv(e)}catch(t){if(t instanceof Qv.CycleException)return!1;throw t}return!0}});var ef=K((KD,tw)=>{tw.exports=ZI;function ZI(e,t,n){Array.isArray(t)||(t=[t]);var r=e.isDirected()?l=>e.successors(l):l=>e.neighbors(l),o=n==="post"?QI:KI,i=[],s={};return t.forEach(l=>{if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);o(l,r,s,i)}),i}function QI(e,t,n,r){for(var o=[[e,!1]];o.length>0;){var i=o.pop();i[1]?r.push(i[0]):Object.hasOwn(n,i[0])||(n[i[0]]=!0,o.push([i[0],!0]),ew(t(i[0]),s=>o.push([s,!1])))}}function KI(e,t,n,r){for(var o=[e];o.length>0;){var i=o.pop();Object.hasOwn(n,i)||(n[i]=!0,r.push(i),ew(t(i),s=>o.push(s)))}}function ew(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}});var rw=K((JD,nw)=>{var JI=ef();nw.exports=eP;function eP(e,t){return JI(e,t,"post")}});var iw=K((eL,ow)=>{var tP=ef();ow.exports=nP;function nP(e,t){return tP(e,t,"pre")}});var lw=K((tL,sw)=>{var rP=ea(),oP=Zd();sw.exports=iP;function iP(e,t){var n=new rP,r={},o=new oP,i;function s(a){var u=a.v===i?a.w:a.v,c=o.priority(u);if(c!==void 0){var f=t(a);f<c&&(r[u]=i,o.decrease(u,f))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(a){o.add(a,Number.POSITIVE_INFINITY),n.setNode(a)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(i=o.removeMin(),Object.hasOwn(r,i))n.setEdge(i,r[i]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(i).forEach(s)}return n}});var uw=K((nL,aw)=>{aw.exports={components:Bv(),dijkstra:Qd(),dijkstraAll:jv(),findCycles:Yv(),floydWarshall:Xv(),isAcyclic:Jv(),postorder:rw(),preorder:iw(),prim:lw(),tarjan:Kd(),topsort:Jd()}});var yt=K((rL,dw)=>{var cw=zv();dw.exports={Graph:cw.Graph,json:Rv(),alg:uw(),version:cw.version}});var pw=K((oL,hw)=>{var tf=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return fw(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&fw(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],n=this._sentinel,r=n._prev;for(;r!==n;)t.push(JSON.stringify(r,sP)),r=r._prev;return"["+t.join(", ")+"]"}};function fw(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function sP(e,t){if(e!=="_next"&&e!=="_prev")return t}hw.exports=tf});var mw=K((iL,gw)=>{var lP=yt().Graph,aP=pw();gw.exports=cP;var uP=()=>1;function cP(e,t){if(e.nodeCount()<=1)return[];let n=fP(e,t||uP);return dP(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w))}function dP(e,t,n){let r=[],o=t[t.length-1],i=t[0],s;for(;e.nodeCount();){for(;s=i.dequeue();)nf(e,t,n,s);for(;s=o.dequeue();)nf(e,t,n,s);if(e.nodeCount()){for(let l=t.length-2;l>0;--l)if(s=t[l].dequeue(),s){r=r.concat(nf(e,t,n,s,!0));break}}}return r}function nf(e,t,n,r,o){let i=o?[]:void 0;return e.inEdges(r.v).forEach(s=>{let l=e.edge(s),a=e.node(s.v);o&&i.push({v:s.v,w:s.w}),a.out-=l,rf(t,n,a)}),e.outEdges(r.v).forEach(s=>{let l=e.edge(s),a=s.w,u=e.node(a);u.in-=l,rf(t,n,u)}),e.removeNode(r.v),i}function fP(e,t){let n=new lP,r=0,o=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let a=n.edge(l.v,l.w)||0,u=t(l),c=a+u;n.setEdge(l.v,l.w,c),o=Math.max(o,n.node(l.v).out+=u),r=Math.max(r,n.node(l.w).in+=u)});let i=hP(o+r+3).map(()=>new aP),s=r+1;return n.nodes().forEach(l=>{rf(i,s,n.node(l))}),{graph:n,buckets:i,zeroIdx:s}}function rf(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function hP(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}});var Ne=K((sL,kw)=>{"use strict";var yw=yt().Graph;kw.exports={addBorderNode:SP,addDummyNode:vw,applyWithChunking:ta,asNonCompoundGraph:gP,buildLayerMatrix:wP,intersectRect:vP,mapValues:IP,maxRank:xw,normalizeRanks:xP,notime:CP,partition:_P,pick:MP,predecessorWeights:yP,range:Sw,removeEmptyRanks:EP,simplify:pP,successorWeights:mP,time:NP,uniqueId:Ew,zipObject:of};function vw(e,t,n,r){for(var o=r;e.hasNode(o);)o=Ew(r);return n.dummy=t,e.setNode(o,n),o}function pP(e){let t=new yw().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t}function gP(e){let t=new yw({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function mP(e){let t=e.nodes().map(n=>{let r={};return e.outEdges(n).forEach(o=>{r[o.w]=(r[o.w]||0)+e.edge(o).weight}),r});return of(e.nodes(),t)}function yP(e){let t=e.nodes().map(n=>{let r={};return e.inEdges(n).forEach(o=>{r[o.v]=(r[o.v]||0)+e.edge(o).weight}),r});return of(e.nodes(),t)}function vP(e,t){let n=e.x,r=e.y,o=t.x-n,i=t.y-r,s=e.width/2,l=e.height/2;if(!o&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let a,u;return Math.abs(i)*s>Math.abs(o)*l?(i<0&&(l=-l),a=l*o/i,u=l):(o<0&&(s=-s),a=s,u=s*i/o),{x:n+a,y:r+u}}function wP(e){let t=Sw(xw(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),o=r.rank;o!==void 0&&(t[o][r.order]=n)}),t}function xP(e){let t=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MAX_VALUE:o}),n=ta(Math.min,t);e.nodes().forEach(r=>{let o=e.node(r);Object.hasOwn(o,"rank")&&(o.rank-=n)})}function EP(e){let t=e.nodes().map(s=>e.node(s).rank),n=ta(Math.min,t),r=[];e.nodes().forEach(s=>{let l=e.node(s).rank-n;r[l]||(r[l]=[]),r[l].push(s)});let o=0,i=e.graph().nodeRankFactor;Array.from(r).forEach((s,l)=>{s===void 0&&l%i!==0?--o:s!==void 0&&o&&s.forEach(a=>e.node(a).rank+=o)})}function SP(e,t,n,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),vw(e,"border",o,t)}function kP(e,t=ww){let n=[];for(let r=0;r<e.length;r+=t){let o=e.slice(r,r+t);n.push(o)}return n}var ww=65535;function ta(e,t){if(t.length>ww){let n=kP(t);return e.apply(null,n.map(r=>e.apply(null,r)))}else return e.apply(null,t)}function xw(e){let n=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MIN_VALUE:o});return ta(Math.max,n)}function _P(e,t){let n={lhs:[],rhs:[]};return e.forEach(r=>{t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function NP(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function CP(e,t){return t()}var bP=0;function Ew(e){var t=++bP;return e+(""+t)}function Sw(e,t,n=1){t==null&&(t=e,e=0);let r=i=>i<t;n<0&&(r=i=>t<i);let o=[];for(let i=e;r(i);i+=n)o.push(i);return o}function MP(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function IP(e,t){let n=t;return typeof t=="string"&&(n=r=>r[t]),Object.entries(e).reduce((r,[o,i])=>(r[o]=n(i,o),r),{})}function of(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}});var Nw=K((lL,_w)=>{"use strict";var PP=mw(),OP=Ne().uniqueId;_w.exports={run:TP,undo:LP};function TP(e){(e.graph().acyclicer==="greedy"?PP(e,n(e)):DP(e)).forEach(r=>{let o=e.edge(r);e.removeEdge(r),o.forwardName=r.name,o.reversed=!0,e.setEdge(r.w,r.v,o,OP("rev"))});function n(r){return o=>r.edge(o).weight}}function DP(e){let t=[],n={},r={};function o(i){Object.hasOwn(r,i)||(r[i]=!0,n[i]=!0,e.outEdges(i).forEach(s=>{Object.hasOwn(n,s.w)?t.push(s):o(s.w)}),delete n[i])}return e.nodes().forEach(o),t}function LP(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}});var bw=K((aL,Cw)=>{"use strict";var zP=Ne();Cw.exports={run:AP,undo:$P};function AP(e){e.graph().dummyChains=[],e.edges().forEach(t=>RP(e,t))}function RP(e,t){let n=t.v,r=e.node(n).rank,o=t.w,i=e.node(o).rank,s=t.name,l=e.edge(t),a=l.labelRank;if(i===r+1)return;e.removeEdge(t);let u,c,f;for(f=0,++r;r<i;++f,++r)l.points=[],c={width:0,height:0,edgeLabel:l,edgeObj:t,rank:r},u=zP.addDummyNode(e,"edge",c,"_d"),r===a&&(c.width=l.width,c.height=l.height,c.dummy="edge-label",c.labelpos=l.labelpos),e.setEdge(n,u,{weight:l.weight},s),f===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,o,{weight:l.weight},s)}function $P(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,o;for(e.setEdge(n.edgeObj,r);n.dummy;)o=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=o,n=e.node(t)})}});var zi=K((uL,Mw)=>{"use strict";var{applyWithChunking:BP}=Ne();Mw.exports={longestPath:HP,slack:FP};function HP(e){var t={};function n(r){var o=e.node(r);if(Object.hasOwn(t,r))return o.rank;t[r]=!0;let i=e.outEdges(r).map(l=>l==null?Number.POSITIVE_INFINITY:n(l.w)-e.edge(l).minlen);var s=BP(Math.min,i);return s===Number.POSITIVE_INFINITY&&(s=0),o.rank=s}e.sources().forEach(n)}function FP(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var sf=K((cL,Iw)=>{"use strict";var VP=yt().Graph,na=zi().slack;Iw.exports=jP;function jP(e){var t=new VP({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var o,i;WP(t,e)<r;)o=UP(t,e),i=t.hasNode(o.v)?na(e,o):-na(e,o),YP(t,e,i);return t}function WP(e,t){function n(r){t.nodeEdges(r).forEach(o=>{var i=o.v,s=r===i?o.w:i;!e.hasNode(s)&&!na(t,o)&&(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function UP(e,t){return t.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=na(t,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function YP(e,t,n){e.nodes().forEach(r=>t.node(r).rank+=n)}});var $w=K((dL,Rw)=>{"use strict";var qP=sf(),Pw=zi().slack,XP=zi().longestPath,GP=yt().alg.preorder,ZP=yt().alg.postorder,QP=Ne().simplify;Rw.exports=Sr;Sr.initLowLimValues=af;Sr.initCutValues=lf;Sr.calcCutValue=Tw;Sr.leaveEdge=Lw;Sr.enterEdge=zw;Sr.exchangeEdges=Aw;function Sr(e){e=QP(e),XP(e);var t=qP(e);af(t),lf(t,e);for(var n,r;n=Lw(t);)r=zw(t,e,n),Aw(t,e,n,r)}function lf(e,t){var n=ZP(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(r=>KP(e,t,r))}function KP(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=Tw(e,t,n)}function Tw(e,t,n){var r=e.node(n),o=r.parent,i=!0,s=t.edge(n,o),l=0;return s||(i=!1,s=t.edge(o,n)),l=s.weight,t.nodeEdges(n).forEach(a=>{var u=a.v===n,c=u?a.w:a.v;if(c!==o){var f=u===i,d=t.edge(a).weight;if(l+=f?d:-d,eO(e,n,c)){var h=e.edge(n,c).cutvalue;l+=f?-h:h}}}),l}function af(e,t){arguments.length<2&&(t=e.nodes()[0]),Dw(e,{},1,t)}function Dw(e,t,n,r,o){var i=n,s=e.node(r);return t[r]=!0,e.neighbors(r).forEach(l=>{Object.hasOwn(t,l)||(n=Dw(e,t,n,l,r))}),s.low=i,s.lim=n++,o?s.parent=o:delete s.parent,n}function Lw(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function zw(e,t,n){var r=n.v,o=n.w;t.hasEdge(r,o)||(r=n.w,o=n.v);var i=e.node(r),s=e.node(o),l=i,a=!1;i.lim>s.lim&&(l=s,a=!0);var u=t.edges().filter(c=>a===Ow(e,e.node(c.v),l)&&a!==Ow(e,e.node(c.w),l));return u.reduce((c,f)=>Pw(t,f)<Pw(t,c)?f:c)}function Aw(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),af(e),lf(e,t),JP(e,t)}function JP(e,t){var n=e.nodes().find(o=>!t.node(o).parent),r=GP(e,n);r=r.slice(1),r.forEach(o=>{var i=e.node(o).parent,s=t.edge(o,i),l=!1;s||(s=t.edge(i,o),l=!0),t.node(o).rank=t.node(i).rank+(l?s.minlen:-s.minlen)})}function eO(e,t,n){return e.hasEdge(t,n)}function Ow(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}});var Vw=K((fL,Fw)=>{"use strict";var tO=zi(),Hw=tO.longestPath,nO=sf(),rO=$w();Fw.exports=oO;function oO(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case"network-simplex":Bw(e);break;case"tight-tree":sO(e);break;case"longest-path":iO(e);break;case"none":break;default:Bw(e)}}var iO=Hw;function sO(e){Hw(e),nO(e)}function Bw(e){rO(e)}});var Ww=K((hL,jw)=>{jw.exports=lO;function lO(e){let t=uO(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),o=r.edgeObj,i=aO(e,t,o.v,o.w),s=i.path,l=i.lca,a=0,u=s[a],c=!0;for(;n!==o.w;){if(r=e.node(n),c){for(;(u=s[a])!==l&&e.node(u).maxRank<r.rank;)a++;u===l&&(c=!1)}if(!c){for(;a<s.length-1&&e.node(u=s[a+1]).minRank<=r.rank;)a++;u=s[a]}e.setParent(n,u),n=e.successors(n)[0]}})}function aO(e,t,n,r){let o=[],i=[],s=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim),a,u;a=n;do a=e.parent(a),o.push(a);while(a&&(t[a].low>s||l>t[a].lim));for(u=a,a=r;(a=e.parent(a))!==u;)i.push(a);return{path:o.concat(i.reverse()),lca:u}}function uO(e){let t={},n=0;function r(o){let i=n;e.children(o).forEach(r),t[o]={low:i,lim:n++}}return e.children().forEach(r),t}});var qw=K((pL,Yw)=>{var ra=Ne();Yw.exports={run:cO,cleanup:hO};function cO(e){let t=ra.addDummyNode(e,"root",{},"_root"),n=dO(e),r=Object.values(n),o=ra.applyWithChunking(Math.max,r)-1,i=2*o+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=i);let s=fO(e)+1;e.children().forEach(l=>Uw(e,t,i,s,o,n,l)),e.graph().nodeRankFactor=i}function Uw(e,t,n,r,o,i,s){let l=e.children(s);if(!l.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}let a=ra.addBorderNode(e,"_bt"),u=ra.addBorderNode(e,"_bb"),c=e.node(s);e.setParent(a,s),c.borderTop=a,e.setParent(u,s),c.borderBottom=u,l.forEach(f=>{Uw(e,t,n,r,o,i,f);let d=e.node(f),h=d.borderTop?d.borderTop:f,m=d.borderBottom?d.borderBottom:f,w=d.borderTop?r:2*r,x=h!==m?1:o-i[s]+1;e.setEdge(a,h,{weight:w,minlen:x,nestingEdge:!0}),e.setEdge(m,u,{weight:w,minlen:x,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,a,{weight:0,minlen:o+i[s]})}function dO(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&i.forEach(s=>n(s,o+1)),t[r]=o}return e.children().forEach(r=>n(r,1)),t}function fO(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function hO(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}});var Zw=K((gL,Gw)=>{var pO=Ne();Gw.exports=gO;function gO(e){function t(n){let r=e.children(n),o=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(let i=o.minRank,s=o.maxRank+1;i<s;++i)Xw(e,"borderLeft","_bl",n,o,i),Xw(e,"borderRight","_br",n,o,i)}}e.children().forEach(t)}function Xw(e,t,n,r,o,i){let s={width:0,height:0,rank:i,borderType:t},l=o[t][i-1],a=pO.addDummyNode(e,"border",s,n);o[t][i]=a,e.setParent(a,r),l&&e.setEdge(l,a,{weight:1})}});var e1=K((mL,Jw)=>{"use strict";Jw.exports={adjust:mO,undo:yO};function mO(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Kw(e)}function yO(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&vO(e),(t==="lr"||t==="rl")&&(wO(e),Kw(e))}function Kw(e){e.nodes().forEach(t=>Qw(e.node(t))),e.edges().forEach(t=>Qw(e.edge(t)))}function Qw(e){let t=e.width;e.width=e.height,e.height=t}function vO(e){e.nodes().forEach(t=>uf(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(uf),Object.hasOwn(n,"y")&&uf(n)})}function uf(e){e.y=-e.y}function wO(e){e.nodes().forEach(t=>cf(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(cf),Object.hasOwn(n,"x")&&cf(n)})}function cf(e){let t=e.x;e.x=e.y,e.y=t}});var r1=K((yL,n1)=>{"use strict";var t1=Ne();n1.exports=xO;function xO(e){let t={},n=e.nodes().filter(a=>!e.children(a).length),r=n.map(a=>e.node(a).rank),o=t1.applyWithChunking(Math.max,r),i=t1.range(o+1).map(()=>[]);function s(a){if(t[a])return;t[a]=!0;let u=e.node(a);i[u.rank].push(a),e.successors(a).forEach(s)}return n.sort((a,u)=>e.node(a).rank-e.node(u).rank).forEach(s),i}});var i1=K((vL,o1)=>{"use strict";var EO=Ne().zipObject;o1.exports=SO;function SO(e,t){let n=0;for(let r=1;r<t.length;++r)n+=kO(e,t[r-1],t[r]);return n}function kO(e,t,n){let r=EO(n,n.map((u,c)=>c)),o=t.flatMap(u=>e.outEdges(u).map(c=>({pos:r[c.w],weight:e.edge(c).weight})).sort((c,f)=>c.pos-f.pos)),i=1;for(;i<n.length;)i<<=1;let s=2*i-1;i-=1;let l=new Array(s).fill(0),a=0;return o.forEach(u=>{let c=u.pos+i;l[c]+=u.weight;let f=0;for(;c>0;)c%2&&(f+=l[c+1]),c=c-1>>1,l[c]+=u.weight;a+=u.weight*f}),a}});var l1=K((wL,s1)=>{s1.exports=_O;function _O(e,t=[]){return t.map(n=>{let r=e.inEdges(n);if(r.length){let o=r.reduce((i,s)=>{let l=e.edge(s),a=e.node(s.v);return{sum:i.sum+l.weight*a.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}});var u1=K((xL,a1)=>{"use strict";var NO=Ne();a1.exports=CO;function CO(e,t){let n={};e.forEach((o,i)=>{let s=n[o.v]={indegree:0,in:[],out:[],vs:[o.v],i};o.barycenter!==void 0&&(s.barycenter=o.barycenter,s.weight=o.weight)}),t.edges().forEach(o=>{let i=n[o.v],s=n[o.w];i!==void 0&&s!==void 0&&(s.indegree++,i.out.push(n[o.w]))});let r=Object.values(n).filter(o=>!o.indegree);return bO(r)}function bO(e){let t=[];function n(o){return i=>{i.merged||(i.barycenter===void 0||o.barycenter===void 0||i.barycenter>=o.barycenter)&&MO(o,i)}}function r(o){return i=>{i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){let o=e.pop();t.push(o),o.in.reverse().forEach(n(o)),o.out.forEach(r(o))}return t.filter(o=>!o.merged).map(o=>NO.pick(o,["vs","i","barycenter","weight"]))}function MO(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}});var f1=K((EL,d1)=>{var IO=Ne();d1.exports=PO;function PO(e,t){let n=IO.partition(e,c=>Object.hasOwn(c,"barycenter")),r=n.lhs,o=n.rhs.sort((c,f)=>f.i-c.i),i=[],s=0,l=0,a=0;r.sort(OO(!!t)),a=c1(i,o,a),r.forEach(c=>{a+=c.vs.length,i.push(c.vs),s+=c.barycenter*c.weight,l+=c.weight,a=c1(i,o,a)});let u={vs:i.flat(!0)};return l&&(u.barycenter=s/l,u.weight=l),u}function c1(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function OO(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}});var g1=K((SL,p1)=>{var TO=l1(),DO=u1(),LO=f1();p1.exports=h1;function h1(e,t,n,r){let o=e.children(t),i=e.node(t),s=i?i.borderLeft:void 0,l=i?i.borderRight:void 0,a={};s&&(o=o.filter(d=>d!==s&&d!==l));let u=TO(e,o);u.forEach(d=>{if(e.children(d.v).length){let h=h1(e,d.v,n,r);a[d.v]=h,Object.hasOwn(h,"barycenter")&&AO(d,h)}});let c=DO(u,n);zO(c,a);let f=LO(c,r);if(s&&(f.vs=[s,f.vs,l].flat(!0),e.predecessors(s).length)){let d=e.node(e.predecessors(s)[0]),h=e.node(e.predecessors(l)[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+h.order)/(f.weight+2),f.weight+=2}return f}function zO(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(r=>t[r]?t[r].vs:r)})}function AO(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}});var y1=K((kL,m1)=>{var RO=yt().Graph,$O=Ne();m1.exports=BO;function BO(e,t,n,r){r||(r=e.nodes());let o=HO(e),i=new RO({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(s=>e.node(s));return r.forEach(s=>{let l=e.node(s),a=e.parent(s);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(i.setNode(s),i.setParent(s,a||o),e[n](s).forEach(u=>{let c=u.v===s?u.w:u.v,f=i.edge(c,s),d=f!==void 0?f.weight:0;i.setEdge(c,s,{weight:e.edge(u).weight+d})}),Object.hasOwn(l,"minRank")&&i.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),i}function HO(e){for(var t;e.hasNode(t=$O.uniqueId("_root")););return t}});var w1=K((_L,v1)=>{v1.exports=FO;function FO(e,t,n){let r={},o;n.forEach(i=>{let s=e.parent(i),l,a;for(;s;){if(l=e.parent(s),l?(a=r[l],r[l]=s):(a=o,o=s),a&&a!==s){t.setEdge(a,s);return}s=l}})}});var _1=K((NL,k1)=>{"use strict";var VO=r1(),jO=i1(),WO=g1(),UO=y1(),YO=w1(),qO=yt().Graph,oa=Ne();k1.exports=S1;function S1(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,S1);return}let n=oa.maxRank(e),r=x1(e,oa.range(1,n+1),"inEdges"),o=x1(e,oa.range(n-1,-1,-1),"outEdges"),i=VO(e);if(E1(e,i),t&&t.disableOptimalOrderHeuristic)return;let s=Number.POSITIVE_INFINITY,l;for(let a=0,u=0;u<4;++a,++u){XO(a%2?r:o,a%4>=2),i=oa.buildLayerMatrix(e);let c=jO(e,i);c<s&&(u=0,l=Object.assign({},i),s=c)}E1(e,l)}function x1(e,t,n){let r=new Map,o=(i,s)=>{r.has(i)||r.set(i,[]),r.get(i).push(s)};for(let i of e.nodes()){let s=e.node(i);if(typeof s.rank=="number"&&o(s.rank,i),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let l=s.minRank;l<=s.maxRank;l++)l!==s.rank&&o(l,i)}return t.map(function(i){return UO(e,i,n,r.get(i)||[])})}function XO(e,t){let n=new qO;e.forEach(function(r){let o=r.graph().root,i=WO(r,o,n,t);i.vs.forEach((s,l)=>r.node(s).order=l),YO(r,n,i.vs)})}function E1(e,t){Object.values(t).forEach(n=>n.forEach((r,o)=>e.node(r).order=o))}});var L1=K((CL,D1)=>{"use strict";var GO=yt().Graph,fn=Ne();D1.exports={positionX:KO,findType1Conflicts:N1,findType2Conflicts:C1,addConflict:df,hasConflict:b1,verticalAlignment:M1,horizontalCompaction:I1,alignCoordinates:O1,findSmallestWidthAlignment:P1,balance:T1};function N1(e,t){let n={};function r(o,i){let s=0,l=0,a=o.length,u=i[i.length-1];return i.forEach((c,f)=>{let d=ZO(e,c),h=d?e.node(d).order:a;(d||c===u)&&(i.slice(l,f+1).forEach(m=>{e.predecessors(m).forEach(w=>{let x=e.node(w),g=x.order;(g<s||h<g)&&!(x.dummy&&e.node(m).dummy)&&df(n,w,m)})}),l=f+1,s=h)}),i}return t.length&&t.reduce(r),n}function C1(e,t){let n={};function r(i,s,l,a,u){let c;fn.range(s,l).forEach(f=>{c=i[f],e.node(c).dummy&&e.predecessors(c).forEach(d=>{let h=e.node(d);h.dummy&&(h.order<a||h.order>u)&&df(n,d,c)})})}function o(i,s){let l=-1,a,u=0;return s.forEach((c,f)=>{if(e.node(c).dummy==="border"){let d=e.predecessors(c);d.length&&(a=e.node(d[0]).order,r(s,u,f,l,a),u=f,l=a)}r(s,u,s.length,a,i.length)}),s}return t.length&&t.reduce(o),n}function ZO(e,t){if(e.node(t).dummy)return e.predecessors(t).find(n=>e.node(n).dummy)}function df(e,t,n){if(t>n){let o=t;t=n,n=o}let r=e[t];r||(e[t]=r={}),r[n]=!0}function b1(e,t,n){if(t>n){let r=t;t=n,n=r}return!!e[t]&&Object.hasOwn(e[t],n)}function M1(e,t,n,r){let o={},i={},s={};return t.forEach(l=>{l.forEach((a,u)=>{o[a]=a,i[a]=a,s[a]=u})}),t.forEach(l=>{let a=-1;l.forEach(u=>{let c=r(u);if(c.length){c=c.sort((d,h)=>s[d]-s[h]);let f=(c.length-1)/2;for(let d=Math.floor(f),h=Math.ceil(f);d<=h;++d){let m=c[d];i[u]===u&&a<s[m]&&!b1(n,u,m)&&(i[m]=u,i[u]=o[u]=o[m],a=s[m])}}})}),{root:o,align:i}}function I1(e,t,n,r,o){let i={},s=QO(e,t,n,o),l=o?"borderLeft":"borderRight";function a(f,d){let h=s.nodes(),m=h.pop(),w={};for(;m;)w[m]?f(m):(w[m]=!0,h.push(m),h=h.concat(d(m))),m=h.pop()}function u(f){i[f]=s.inEdges(f).reduce((d,h)=>Math.max(d,i[h.v]+s.edge(h)),0)}function c(f){let d=s.outEdges(f).reduce((m,w)=>Math.min(m,i[w.w]-s.edge(w)),Number.POSITIVE_INFINITY),h=e.node(f);d!==Number.POSITIVE_INFINITY&&h.borderType!==l&&(i[f]=Math.max(i[f],d))}return a(u,s.predecessors.bind(s)),a(c,s.successors.bind(s)),Object.keys(r).forEach(f=>i[f]=i[n[f]]),i}function QO(e,t,n,r){let o=new GO,i=e.graph(),s=JO(i.nodesep,i.edgesep,r);return t.forEach(l=>{let a;l.forEach(u=>{let c=n[u];if(o.setNode(c),a){var f=n[a],d=o.edge(f,c);o.setEdge(f,c,Math.max(s(e,u,a),d||0))}a=u})}),o}function P1(e,t){return Object.values(t).reduce((n,r)=>{let o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(r).forEach(([l,a])=>{let u=eT(e,l)/2;o=Math.max(a+u,o),i=Math.min(a-u,i)});let s=o-i;return s<n[0]&&(n=[s,r]),n},[Number.POSITIVE_INFINITY,null])[1]}function O1(e,t){let n=Object.values(t),r=fn.applyWithChunking(Math.min,n),o=fn.applyWithChunking(Math.max,n);["u","d"].forEach(i=>{["l","r"].forEach(s=>{let l=i+s,a=e[l];if(a===t)return;let u=Object.values(a),c=r-fn.applyWithChunking(Math.min,u);s!=="l"&&(c=o-fn.applyWithChunking(Math.max,u)),c&&(e[l]=fn.mapValues(a,f=>f+c))})})}function T1(e,t){return fn.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let o=Object.values(e).map(i=>i[r]).sort((i,s)=>i-s);return(o[1]+o[2])/2}})}function KO(e){let t=fn.buildLayerMatrix(e),n=Object.assign(N1(e,t),C1(e,t)),r={},o;["u","d"].forEach(s=>{o=s==="u"?t:Object.values(t).reverse(),["l","r"].forEach(l=>{l==="r"&&(o=o.map(f=>Object.values(f).reverse()));let a=(s==="u"?e.predecessors:e.successors).bind(e),u=M1(e,o,n,a),c=I1(e,o,u.root,u.align,l==="r");l==="r"&&(c=fn.mapValues(c,f=>-f)),r[s+l]=c})});let i=P1(e,r);return O1(r,i),T1(r,e.graph().align)}function JO(e,t,n){return(r,o,i)=>{let s=r.node(o),l=r.node(i),a=0,u;if(a+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2;break}if(u&&(a+=n?u:-u),u=0,a+=(s.dummy?t:e)/2,a+=(l.dummy?t:e)/2,a+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":u=l.width/2;break;case"r":u=-l.width/2;break}return u&&(a+=n?u:-u),u=0,a}}function eT(e,t){return e.node(t).width}});var R1=K((bL,A1)=>{"use strict";var z1=Ne(),tT=L1().positionX;A1.exports=nT;function nT(e){e=z1.asNonCompoundGraph(e),rT(e),Object.entries(tT(e)).forEach(([t,n])=>e.node(t).x=n)}function rT(e){let t=z1.buildLayerMatrix(e),n=e.graph().ranksep,r=0;t.forEach(o=>{let i=o.reduce((s,l)=>{let a=e.node(l).height;return s>a?s:a},0);o.forEach(s=>e.node(s).y=r+i/2),r+=i+n})}});var W1=K((ML,j1)=>{"use strict";var $1=Nw(),B1=bw(),oT=Vw(),iT=Ne().normalizeRanks,sT=Ww(),lT=Ne().removeEmptyRanks,H1=qw(),aT=Zw(),F1=e1(),uT=_1(),cT=R1(),vt=Ne(),dT=yt().Graph;j1.exports=fT;function fT(e,t){let n=t&&t.debugTiming?vt.time:vt.notime;n("layout",()=>{let r=n(" buildLayoutGraph",()=>ST(e));n(" runLayout",()=>hT(r,n,t)),n(" updateInputGraph",()=>pT(e,r))})}function hT(e,t,n){t(" makeSpaceForEdgeLabels",()=>kT(e)),t(" removeSelfEdges",()=>TT(e)),t(" acyclic",()=>$1.run(e)),t(" nestingGraph.run",()=>H1.run(e)),t(" rank",()=>oT(vt.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>_T(e)),t(" removeEmptyRanks",()=>lT(e)),t(" nestingGraph.cleanup",()=>H1.cleanup(e)),t(" normalizeRanks",()=>iT(e)),t(" assignRankMinMax",()=>NT(e)),t(" removeEdgeLabelProxies",()=>CT(e)),t(" normalize.run",()=>B1.run(e)),t(" parentDummyChains",()=>sT(e)),t(" addBorderSegments",()=>aT(e)),t(" order",()=>uT(e,n)),t(" insertSelfEdges",()=>DT(e)),t(" adjustCoordinateSystem",()=>F1.adjust(e)),t(" position",()=>cT(e)),t(" positionSelfEdges",()=>LT(e)),t(" removeBorderNodes",()=>OT(e)),t(" normalize.undo",()=>B1.undo(e)),t(" fixupEdgeLabelCoords",()=>IT(e)),t(" undoCoordinateSystem",()=>F1.undo(e)),t(" translateGraph",()=>bT(e)),t(" assignNodeIntersects",()=>MT(e)),t(" reversePoints",()=>PT(e)),t(" acyclic.undo",()=>$1.undo(e))}function pT(e,t){e.nodes().forEach(n=>{let r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,r.rank=o.rank,t.children(n).length&&(r.width=o.width,r.height=o.height))}),e.edges().forEach(n=>{let r=e.edge(n),o=t.edge(n);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var gT=["nodesep","edgesep","ranksep","marginx","marginy"],mT={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},yT=["acyclicer","ranker","rankdir","align"],vT=["width","height","rank"],V1={width:0,height:0},wT=["minlen","weight","width","height","labeloffset"],xT={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ET=["labelpos"];function ST(e){let t=new dT({multigraph:!0,compound:!0}),n=hf(e.graph());return t.setGraph(Object.assign({},mT,ff(n,gT),vt.pick(n,yT))),e.nodes().forEach(r=>{let o=hf(e.node(r)),i=ff(o,vT);Object.keys(V1).forEach(s=>{i[s]===void 0&&(i[s]=V1[s])}),t.setNode(r,i),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{let o=hf(e.edge(r));t.setEdge(r,Object.assign({},xT,ff(o,wT),vt.pick(o,ET)))}),t}function kT(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function _T(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};vt.addDummyNode(e,"edge-proxy",i,"_ep")}})}function NT(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function CT(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function bT(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),s=i.marginx||0,l=i.marginy||0;function a(u){let c=u.x,f=u.y,d=u.width,h=u.height;t=Math.min(t,c-d/2),n=Math.max(n,c+d/2),r=Math.min(r,f-h/2),o=Math.max(o,f+h/2)}e.nodes().forEach(u=>a(e.node(u))),e.edges().forEach(u=>{let c=e.edge(u);Object.hasOwn(c,"x")&&a(c)}),t-=s,r-=l,e.nodes().forEach(u=>{let c=e.node(u);c.x-=t,c.y-=r}),e.edges().forEach(u=>{let c=e.edge(u);c.points.forEach(f=>{f.x-=t,f.y-=r}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=r)}),i.width=n-t+s,i.height=o-r+l}function MT(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),o=e.node(t.w),i,s;n.points?(i=n.points[0],s=n.points[n.points.length-1]):(n.points=[],i=o,s=r),n.points.unshift(vt.intersectRect(r,i)),n.points.push(vt.intersectRect(o,s))})}function IT(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function PT(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function OT(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),s=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function TT(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function DT(e){var t=vt.buildLayerMatrix(e);t.forEach(n=>{var r=0;n.forEach((o,i)=>{var s=e.node(o);s.order=i+r,(s.selfEdges||[]).forEach(l=>{vt.addDummyNode(e,"selfedge",{width:l.label.width,height:l.label.height,rank:s.rank,order:i+ ++r,e:l.e,label:l.label},"_se")}),delete s.selfEdges})})}function LT(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,s=n.x-o,l=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*s/3,y:i-l},{x:o+5*s/6,y:i-l},{x:o+s,y:i},{x:o+5*s/6,y:i+l},{x:o+2*s/3,y:i+l}],n.label.x=n.x,n.label.y=n.y}})}function ff(e,t){return vt.mapValues(vt.pick(e,t),Number)}function hf(e){var t={};return e&&Object.entries(e).forEach(([n,r])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=r}),t}});var Y1=K((IL,U1)=>{var zT=Ne(),AT=yt().Graph;U1.exports={debugOrdering:RT};function RT(e){let t=zT.buildLayerMatrix(e),n=new AT({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(r=>{n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),e.edges().forEach(r=>n.setEdge(r.v,r.w,{},r.name)),t.forEach((r,o)=>{let i="layer"+o;n.setNode(i,{rank:"same"}),r.reduce((s,l)=>(n.setEdge(s,l,{style:"invis"}),l))}),n}});var X1=K((PL,q1)=>{q1.exports="1.1.8"});var Z1=K((OL,G1)=>{G1.exports={graphlib:yt(),layout:W1(),debug:Y1(),util:{time:Ne().time,notime:Ne().notime},version:X1()}});var oe=Dt(hn(),1),J1=Dt(nm(),1);var D=Dt(il()),T=Dt(hn());function Se(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Se(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Dk={value:()=>{}};function lr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new sl(n)}function sl(e){this._=e}function Lk(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}sl.prototype=lr.prototype={constructor:sl,on:function(e,t){var n=this._,r=Lk(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=zk(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=sm(n[o],e.name,t);else if(t==null)for(o in n)n[o]=sm(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new sl(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function zk(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function sm(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Dk,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Pc="http://www.w3.org/1999/xhtml",lm={svg:"http://www.w3.org/2000/svg",xhtml:Pc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fi(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),lm.hasOwnProperty(t)?{space:lm[t],local:e}:e}function Ak(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pc&&t.documentElement.namespaceURI===Pc?t.createElement(e):t.createElementNS(n,e)}}function Rk(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function am(e){var t=fi(e);return(t.local?Rk:Ak)(t)}function $k(){}function al(e){return e==null?$k:function(){return this.querySelector(e)}}function Bk(e){typeof e!="function"&&(e=al(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=new Array(s),a,u,c=0;c<s;++c)(a=i[c])&&(u=e.call(a,a.__data__,c,i))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new it(r,this._parents)}function Hk(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Fk(){return[]}function Tc(e){return e==null?Fk:function(){return this.querySelectorAll(e)}}function Vk(e){return function(){return Hk(e.apply(this,arguments))}}function jk(e){typeof e=="function"?e=Vk(e):e=Tc(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(r.push(e.call(a,a.__data__,u,s)),o.push(a));return new it(r,o)}function Dc(e){return function(){return this.matches(e)}}function um(e){return function(t){return t.matches(e)}}var Wk=Array.prototype.find;function Uk(e){return function(){return Wk.call(this.children,e)}}function Yk(){return this.firstElementChild}function qk(e){return this.select(e==null?Yk:Uk(typeof e=="function"?e:um(e)))}var Xk=Array.prototype.filter;function Gk(){return Array.from(this.children)}function Zk(e){return function(){return Xk.call(this.children,e)}}function Qk(e){return this.selectAll(e==null?Gk:Zk(typeof e=="function"?e:um(e)))}function Kk(e){typeof e!="function"&&(e=Dc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new it(r,this._parents)}function cm(e){return new Array(e.length)}function Jk(){return new it(this._enter||this._groups.map(cm),this._parents)}function ll(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ll.prototype={constructor:ll,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function e_(e){return function(){return e}}function t_(e,t,n,r,o,i){for(var s=0,l,a=t.length,u=i.length;s<u;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new ll(e,i[s]);for(;s<a;++s)(l=t[s])&&(o[s]=l)}function n_(e,t,n,r,o,i,s){var l,a,u=new Map,c=t.length,f=i.length,d=new Array(c),h;for(l=0;l<c;++l)(a=t[l])&&(d[l]=h=s.call(a,a.__data__,l,t)+"",u.has(h)?o[l]=a:u.set(h,a));for(l=0;l<f;++l)h=s.call(e,i[l],l,i)+"",(a=u.get(h))?(r[l]=a,a.__data__=i[l],u.delete(h)):n[l]=new ll(e,i[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(d[l])===a&&(o[l]=a)}function r_(e){return e.__data__}function o_(e,t){if(!arguments.length)return Array.from(this,r_);var n=t?n_:t_,r=this._parents,o=this._groups;typeof e!="function"&&(e=e_(e));for(var i=o.length,s=new Array(i),l=new Array(i),a=new Array(i),u=0;u<i;++u){var c=r[u],f=o[u],d=f.length,h=i_(e.call(c,c&&c.__data__,u,r)),m=h.length,w=l[u]=new Array(m),x=s[u]=new Array(m),g=a[u]=new Array(d);n(c,f,w,x,g,h,t);for(var y=0,p=0,v,k;y<m;++y)if(v=w[y]){for(y>=p&&(p=y+1);!(k=x[p])&&++p<m;);v._next=k||null}}return s=new it(s,r),s._enter=l,s._exit=a,s}function i_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function s_(){return new it(this._exit||this._groups.map(cm),this._parents)}function l_(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function a_(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),l=new Array(o),a=0;a<s;++a)for(var u=n[a],c=r[a],f=u.length,d=l[a]=new Array(f),h,m=0;m<f;++m)(h=u[m]||c[m])&&(d[m]=h);for(;a<o;++a)l[a]=n[a];return new it(l,this._parents)}function u_(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function c_(e){e||(e=d_);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,a=o[i]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new it(o,this._parents).order()}function d_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function f_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function h_(){return Array.from(this)}function p_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function g_(){let e=0;for(let t of this)++e;return e}function m_(){return!this.node()}function y_(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function v_(e){return function(){this.removeAttribute(e)}}function w_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function x_(e,t){return function(){this.setAttribute(e,t)}}function E_(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function S_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function k_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function __(e,t){var n=fi(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?w_:v_:typeof t=="function"?n.local?k_:S_:n.local?E_:x_)(n,t))}function dm(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function N_(e){return function(){this.style.removeProperty(e)}}function C_(e,t,n){return function(){this.style.setProperty(e,t,n)}}function b_(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function M_(e,t,n){return arguments.length>1?this.each((t==null?N_:typeof t=="function"?b_:C_)(e,t,n??"")):ar(this.node(),e)}function ar(e,t){return e.style.getPropertyValue(t)||dm(e).getComputedStyle(e,null).getPropertyValue(t)}function I_(e){return function(){delete this[e]}}function P_(e,t){return function(){this[e]=t}}function O_(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function T_(e,t){return arguments.length>1?this.each((t==null?I_:typeof t=="function"?O_:P_)(e,t)):this.node()[e]}function fm(e){return e.trim().split(/^|\s+/)}function Lc(e){return e.classList||new hm(e)}function hm(e){this._node=e,this._names=fm(e.getAttribute("class")||"")}hm.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function pm(e,t){for(var n=Lc(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function gm(e,t){for(var n=Lc(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function D_(e){return function(){pm(this,e)}}function L_(e){return function(){gm(this,e)}}function z_(e,t){return function(){(t.apply(this,arguments)?pm:gm)(this,e)}}function A_(e,t){var n=fm(e+"");if(arguments.length<2){for(var r=Lc(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?z_:t?D_:L_)(n,t))}function R_(){this.textContent=""}function $_(e){return function(){this.textContent=e}}function B_(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function H_(e){return arguments.length?this.each(e==null?R_:(typeof e=="function"?B_:$_)(e)):this.node().textContent}function F_(){this.innerHTML=""}function V_(e){return function(){this.innerHTML=e}}function j_(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function W_(e){return arguments.length?this.each(e==null?F_:(typeof e=="function"?j_:V_)(e)):this.node().innerHTML}function U_(){this.nextSibling&&this.parentNode.appendChild(this)}function Y_(){return this.each(U_)}function q_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function X_(){return this.each(q_)}function G_(e){var t=typeof e=="function"?e:am(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Z_(){return null}function Q_(e,t){var n=typeof e=="function"?e:am(e),r=t==null?Z_:typeof t=="function"?t:al(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function K_(){var e=this.parentNode;e&&e.removeChild(this)}function J_(){return this.each(K_)}function eN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tN(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nN(e){return this.select(e?tN:eN)}function rN(e){return arguments.length?this.property("__data__",e):this.node().__data__}function oN(e){return function(t){e.call(this,t,this.__data__)}}function iN(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function sN(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function lN(e,t,n){return function(){var r=this.__on,o,i=oN(t);if(r){for(var s=0,l=r.length;s<l;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function aN(e,t,n){var r=iN(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(o=0,c=l[a];o<i;++o)if((s=r[o]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?lN:sN,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function mm(e,t,n){var r=dm(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function uN(e,t){return function(){return mm(this,e,t)}}function cN(e,t){return function(){return mm(this,e,t.apply(this,arguments))}}function dN(e,t){return this.each((typeof t=="function"?cN:uN)(e,t))}function*fN(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var ym=[null];function it(e,t){this._groups=e,this._parents=t}function ur(){return new it([[document.documentElement]],ym)}function hN(){return this}it.prototype=ur.prototype={constructor:it,select:Bk,selectAll:jk,selectChild:qk,selectChildren:Qk,filter:Kk,data:o_,enter:Jk,exit:s_,join:l_,merge:a_,selection:hN,order:u_,sort:c_,call:f_,nodes:h_,node:p_,size:g_,empty:m_,each:y_,attr:__,style:M_,property:T_,classed:A_,text:H_,html:W_,raise:Y_,lower:X_,append:G_,insert:Q_,remove:J_,clone:nN,datum:rN,on:aN,dispatch:dN,[Symbol.iterator]:fN};function Fe(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],ym)}var pN=0;function gN(){return new Oc}function Oc(){this._="@"+(++pN).toString(36)}Oc.prototype=gN.prototype={constructor:Oc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function mN(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Qe(e,t){if(e=mN(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}var yN={passive:!1},hi={capture:!0,passive:!1};function zc(e){e.stopImmediatePropagation()}function Jr(e){e.preventDefault(),e.stopImmediatePropagation()}function Rc(e){var t=e.document.documentElement,n=Fe(e).on("dragstart.drag",Jr,hi);"onselectstart"in t?n.on("selectstart.drag",Jr,hi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function $c(e,t){var n=e.document.documentElement,r=Fe(e).on("dragstart.drag",null);t&&(r.on("click.drag",Jr,hi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var ul=e=>()=>e;function Ac(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Ac.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function vN(e){return!e.ctrlKey&&!e.button}function wN(){return this.parentNode}function xN(e,t){return t??{x:e.x,y:e.y}}function EN(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bc(){var e=vN,t=wN,n=xN,r=EN,o={},i=lr("start","drag","end"),s=0,l,a,u,c,f=0;function d(v){v.on("mousedown.drag",h).filter(r).on("touchstart.drag",x).on("touchmove.drag",g,yN).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,k){if(!(c||!e.call(this,v,k))){var S=p(this,t.call(this,v,k),v,k,"mouse");S&&(Fe(v.view).on("mousemove.drag",m,hi).on("mouseup.drag",w,hi),Rc(v.view),zc(v),u=!1,l=v.clientX,a=v.clientY,S("start",v))}}function m(v){if(Jr(v),!u){var k=v.clientX-l,S=v.clientY-a;u=k*k+S*S>f}o.mouse("drag",v)}function w(v){Fe(v.view).on("mousemove.drag mouseup.drag",null),$c(v.view,u),Jr(v),o.mouse("end",v)}function x(v,k){if(e.call(this,v,k)){var S=v.changedTouches,_=t.call(this,v,k),N=S.length,M,A;for(M=0;M<N;++M)(A=p(this,_,v,k,S[M].identifier,S[M]))&&(zc(v),A("start",v,S[M]))}}function g(v){var k=v.changedTouches,S=k.length,_,N;for(_=0;_<S;++_)(N=o[k[_].identifier])&&(Jr(v),N("drag",v,k[_]))}function y(v){var k=v.changedTouches,S=k.length,_,N;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),_=0;_<S;++_)(N=o[k[_].identifier])&&(zc(v),N("end",v,k[_]))}function p(v,k,S,_,N,M){var A=i.copy(),R=Qe(M||S,k),V,B,E;if((E=n.call(v,new Ac("beforestart",{sourceEvent:S,target:d,identifier:N,active:s,x:R[0],y:R[1],dx:0,dy:0,dispatch:A}),_))!=null)return V=E.x-R[0]||0,B=E.y-R[1]||0,function b(I,P,L){var z=R,F;switch(I){case"start":o[N]=b,F=s++;break;case"end":delete o[N],--s;case"drag":R=Qe(L||P,k),F=s;break}A.call(I,v,new Ac(I,{sourceEvent:P,subject:E,target:d,identifier:N,active:F,x:R[0]+V,y:R[1]+B,dx:R[0]-z[0],dy:R[1]-z[1],dispatch:A}),_)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:ul(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:ul(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:ul(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:ul(!!v),d):r},d.on=function(){var v=i.on.apply(i,arguments);return v===i?d:v},d.clickDistance=function(v){return arguments.length?(f=(v=+v)*v,d):Math.sqrt(f)},d}function ro(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mi(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zn(){}var hr=.7,no=1/hr,eo="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SN=/^#([0-9a-f]{3,8})$/,kN=new RegExp(`^rgb\\(${eo},${eo},${eo}\\)$`),_N=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),NN=new RegExp(`^rgba\\(${eo},${eo},${eo},${pi}\\)$`),CN=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${pi}\\)$`),bN=new RegExp(`^hsl\\(${pi},${Ht},${Ht}\\)$`),MN=new RegExp(`^hsla\\(${pi},${Ht},${Ht},${pi}\\)$`),vm={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};ro(zn,ln,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wm,formatHex:wm,formatHex8:IN,formatHsl:PN,formatRgb:xm,toString:xm});function wm(){return this.rgb().formatHex()}function IN(){return this.rgb().formatHex8()}function PN(){return Im(this).formatHsl()}function xm(){return this.rgb().formatRgb()}function ln(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Em(t):n===3?new Oe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=kN.exec(e))?new Oe(t[1],t[2],t[3],1):(t=_N.exec(e))?new Oe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=NN.exec(e))?cl(t[1],t[2],t[3],t[4]):(t=CN.exec(e))?cl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=bN.exec(e))?_m(t[1],t[2]/100,t[3]/100,1):(t=MN.exec(e))?_m(t[1],t[2]/100,t[3]/100,t[4]):vm.hasOwnProperty(e)?Em(vm[e]):e==="transparent"?new Oe(NaN,NaN,NaN,0):null}function Em(e){return new Oe(e>>16&255,e>>8&255,e&255,1)}function cl(e,t,n,r){return r<=0&&(e=t=n=NaN),new Oe(e,t,n,r)}function Uc(e){return e instanceof zn||(e=ln(e)),e?(e=e.rgb(),new Oe(e.r,e.g,e.b,e.opacity)):new Oe}function yi(e,t,n,r){return arguments.length===1?Uc(e):new Oe(e,t,n,r??1)}function Oe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ro(Oe,yi,mi(zn,{brighter(e){return e=e==null?no:Math.pow(no,e),new Oe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hr:Math.pow(hr,e),new Oe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Oe(dr(this.r),dr(this.g),dr(this.b),fl(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:Sm,formatHex:Sm,formatHex8:ON,formatRgb:km,toString:km}));function Sm(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}`}function ON(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}${cr((isNaN(this.opacity)?1:this.opacity)*255)}`}function km(){let e=fl(this.opacity);return`${e===1?"rgb(":"rgba("}${dr(this.r)}, ${dr(this.g)}, ${dr(this.b)}${e===1?")":`, ${e})`}`}function fl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function dr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cr(e){return e=dr(e),(e<16?"0":"")+e.toString(16)}function _m(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,n,r)}function Im(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof zn||(e=ln(e)),!e)return new Mt;if(e instanceof Mt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-o,a=(i+o)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=a<.5?i+o:2-i-o,s*=60):l=a>0&&a<1?0:s,new Mt(s,l,a,e.opacity)}function pl(e,t,n,r){return arguments.length===1?Im(e):new Mt(e,t,n,r??1)}function Mt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ro(Mt,pl,mi(zn,{brighter(e){return e=e==null?no:Math.pow(no,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hr:Math.pow(hr,e),new Mt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Oe(Hc(e>=240?e-240:e+120,o,r),Hc(e,o,r),Hc(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Mt(Nm(this.h),dl(this.s),dl(this.l),fl(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(){let e=fl(this.opacity);return`${e===1?"hsl(":"hsla("}${Nm(this.h)}, ${dl(this.s)*100}%, ${dl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Nm(e){return e=(e||0)%360,e<0?e+360:e}function dl(e){return Math.max(0,Math.min(1,e||0))}function Hc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Pm=Math.PI/180,Om=180/Math.PI,hl=18,Tm=.96422,Dm=1,Lm=.82521,zm=4/29,to=6/29,Am=3*to*to,TN=to*to*to;function Rm(e){if(e instanceof Ft)return new Ft(e.l,e.a,e.b,e.opacity);if(e instanceof sn)return Bm(e);e instanceof Oe||(e=Uc(e));var t=Wc(e.r),n=Wc(e.g),r=Wc(e.b),o=Fc((.2225045*t+.7168786*n+.0606169*r)/Dm),i,s;return t===n&&n===r?i=s=o:(i=Fc((.4360747*t+.3850649*n+.1430804*r)/Tm),s=Fc((.0139322*t+.0971045*n+.7141733*r)/Lm)),new Ft(116*o-16,500*(i-o),200*(o-s),e.opacity)}function $m(e,t,n,r){return arguments.length===1?Rm(e):new Ft(e,t,n,r??1)}function Ft(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ro(Ft,$m,mi(zn,{brighter(e){return new Ft(this.l+hl*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ft(this.l-hl*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=Tm*Vc(t),e=Dm*Vc(e),n=Lm*Vc(n),new Oe(jc(3.1338561*t-1.6168667*e-.4906146*n),jc(-.9787684*t+1.9161415*e+.033454*n),jc(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Fc(e){return e>TN?Math.pow(e,1/3):e/Am+zm}function Vc(e){return e>to?e*e*e:Am*(e-zm)}function jc(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Wc(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function DN(e){if(e instanceof sn)return new sn(e.h,e.c,e.l,e.opacity);if(e instanceof Ft||(e=Rm(e)),e.a===0&&e.b===0)return new sn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Om;return new sn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function gl(e,t,n,r){return arguments.length===1?DN(e):new sn(e,t,n,r??1)}function sn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Bm(e){if(isNaN(e.h))return new Ft(e.l,0,0,e.opacity);var t=e.h*Pm;return new Ft(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ro(sn,gl,mi(zn,{brighter(e){return new sn(this.h,this.c,this.l+hl*(e??1),this.opacity)},darker(e){return new sn(this.h,this.c,this.l-hl*(e??1),this.opacity)},rgb(){return Bm(this).rgb()}}));var Hm=-.14861,Yc=1.78277,qc=-.29227,ml=-.90649,gi=1.97294,Cm=gi*ml,bm=gi*Yc,Mm=Yc*qc-ml*Hm;function LN(e){if(e instanceof fr)return new fr(e.h,e.s,e.l,e.opacity);e instanceof Oe||(e=Uc(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Mm*r+Cm*t-bm*n)/(Mm+Cm-bm),i=r-o,s=(gi*(n-o)-qc*i)/ml,l=Math.sqrt(s*s+i*i)/(gi*o*(1-o)),a=l?Math.atan2(s,i)*Om-120:NaN;return new fr(a<0?a+360:a,l,o,e.opacity)}function yl(e,t,n,r){return arguments.length===1?LN(e):new fr(e,t,n,r??1)}function fr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ro(fr,yl,mi(zn,{brighter(e){return e=e==null?no:Math.pow(no,e),new fr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hr:Math.pow(hr,e),new fr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Pm,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Oe(255*(t+n*(Hm*r+Yc*o)),255*(t+n*(qc*r+ml*o)),255*(t+n*(gi*r)),this.opacity)}}));function jm(e,t,n,r,o){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*o)/6}function zN(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],i=e[r+1],s=r>0?e[r-1]:2*o-i,l=r<t-1?e[r+2]:2*i-o;return jm((n-r/t)*t,s,o,i,l)}}function AN(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],l=e[(r+2)%t];return jm((n-r/t)*t,o,i,s,l)}}var wl=e=>()=>e;function Wm(e,t){return function(n){return e+n*t}}function RN(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Qc(e,t){var n=t-e;return n?Wm(e,n>180||n<-180?n-360*Math.round(n/360):n):wl(isNaN(e)?t:e)}function $N(e){return(e=+e)==1?Ke:function(t,n){return n-t?RN(t,n,e):wl(isNaN(t)?n:t)}}function Ke(e,t){var n=t-e;return n?Wm(e,n):wl(isNaN(e)?t:e)}var vi=(function e(t){var n=$N(t);function r(o,i){var s=n((o=yi(o)).r,(i=yi(i)).r),l=n(o.g,i.g),a=n(o.b,i.b),u=Ke(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=a(c),o.opacity=u(c),o+""}}return r.gamma=e,r})(1);function Um(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),i=new Array(n),s,l;for(s=0;s<n;++s)l=yi(t[s]),r[s]=l.r||0,o[s]=l.g||0,i[s]=l.b||0;return r=e(r),o=e(o),i=e(i),l.opacity=1,function(a){return l.r=r(a),l.g=o(a),l.b=i(a),l+""}}}var g3=Um(zN),m3=Um(AN);function BN(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function HN(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FN(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=oo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=o[s](l);return i}}function VN(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function It(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function jN(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=oo(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Gc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xc=new RegExp(Gc.source,"g");function WN(e){return function(){return e}}function UN(e){return function(t){return e(t)+""}}function Kc(e,t){var n=Gc.lastIndex=Xc.lastIndex=0,r,o,i,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=Gc.exec(e))&&(o=Xc.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:It(r,o)})),n=Xc.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?a[0]?UN(a[0].x):WN(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)l[(f=a[c]).i]=f.x(u);return l.join("")})}function oo(e,t){var n=typeof t,r;return t==null||n==="boolean"?wl(t):(n==="number"?It:n==="string"?(r=ln(t))?(t=r,vi):Kc:t instanceof ln?vi:t instanceof Date?VN:HN(t)?BN:Array.isArray(t)?FN:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?jN:It)(e,t)}var Fm=180/Math.PI,Zc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ym(e,t,n,r,o,i){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Fm,skewX:Math.atan(a)*Fm,scaleX:s,scaleY:l}}var vl;function YN(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Zc:Ym(t.a,t.b,t.c,t.d,t.e,t.f)}function qN(e){return e==null||(vl||(vl=document.createElementNS("http://www.w3.org/2000/svg","g")),vl.setAttribute("transform",e),!(e=vl.transform.baseVal.consolidate()))?Zc:(e=e.matrix,Ym(e.a,e.b,e.c,e.d,e.e,e.f))}function qm(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,c,f,d,h,m){if(u!==f||c!==d){var w=h.push("translate(",null,t,null,n);m.push({i:w-4,x:It(u,f)},{i:w-2,x:It(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function s(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:It(u,c)})):c&&f.push(o(f)+"rotate("+c+r)}function l(u,c,f,d){u!==c?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:It(u,c)}):c&&f.push(o(f)+"skewX("+c+r)}function a(u,c,f,d,h,m){if(u!==f||c!==d){var w=h.push(o(h)+"scale(",null,",",null,")");m.push({i:w-4,x:It(u,f)},{i:w-2,x:It(c,d)})}else(f!==1||d!==1)&&h.push(o(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,d),s(u.rotate,c.rotate,f,d),l(u.skewX,c.skewX,f,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var m=-1,w=d.length,x;++m<w;)f[(x=d[m]).i]=x.x(h);return f.join("")}}}var Xm=qm(YN,"px, ","px)","deg)"),Gm=qm(qN,", ",")",")"),XN=1e-12;function Vm(e){return((e=Math.exp(e))+1/e)/2}function GN(e){return((e=Math.exp(e))-1/e)/2}function ZN(e){return((e=Math.exp(2*e))-1)/(e+1)}var io=(function e(t,n,r){function o(i,s){var l=i[0],a=i[1],u=i[2],c=s[0],f=s[1],d=s[2],h=c-l,m=f-a,w=h*h+m*m,x,g;if(w<XN)g=Math.log(d/u)/t,x=function(_){return[l+_*h,a+_*m,u*Math.exp(t*_*g)]};else{var y=Math.sqrt(w),p=(d*d-u*u+r*w)/(2*u*n*y),v=(d*d-u*u-r*w)/(2*d*n*y),k=Math.log(Math.sqrt(p*p+1)-p),S=Math.log(Math.sqrt(v*v+1)-v);g=(S-k)/t,x=function(_){var N=_*g,M=Vm(k),A=u/(n*y)*(M*ZN(t*N+k)-GN(k));return[l+A*h,a+A*m,u*M/Vm(t*N+k)]}}return x.duration=Math.abs(g)*1e3*t/Math.SQRT2,x}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,a=l*l;return e(s,l,a)},o})(Math.SQRT2,2,4);function Zm(e){return function(t,n){var r=e((t=pl(t)).h,(n=pl(n)).h),o=Ke(t.s,n.s),i=Ke(t.l,n.l),s=Ke(t.opacity,n.opacity);return function(l){return t.h=r(l),t.s=o(l),t.l=i(l),t.opacity=s(l),t+""}}}var y3=Zm(Qc),v3=Zm(Ke);function Qm(e){return function(t,n){var r=e((t=gl(t)).h,(n=gl(n)).h),o=Ke(t.c,n.c),i=Ke(t.l,n.l),s=Ke(t.opacity,n.opacity);return function(l){return t.h=r(l),t.c=o(l),t.l=i(l),t.opacity=s(l),t+""}}}var w3=Qm(Qc),x3=Qm(Ke);function Km(e){return(function t(n){n=+n;function r(o,i){var s=e((o=yl(o)).h,(i=yl(i)).h),l=Ke(o.s,i.s),a=Ke(o.l,i.l),u=Ke(o.opacity,i.opacity);return function(c){return o.h=s(c),o.s=l(c),o.l=a(Math.pow(c,n)),o.opacity=u(c),o+""}}return r.gamma=t,r})(1)}var E3=Km(Qc),S3=Km(Ke);var so=0,xi=0,wi=0,e0=1e3,xl,Ei,El=0,pr=0,kl=0,Si=typeof performance=="object"&&performance.now?performance:Date,t0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _l(){return pr||(t0(QN),pr=Si.now()+kl)}function QN(){pr=0}function Sl(){this._call=this._time=this._next=null}Sl.prototype=ed.prototype={constructor:Sl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_l():+n)+(t==null?0:+t),!this._next&&Ei!==this&&(Ei?Ei._next=this:xl=this,Ei=this),this._call=e,this._time=n,Jc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jc())}};function ed(e,t,n){var r=new Sl;return r.restart(e,t,n),r}function KN(){_l(),++so;for(var e=xl,t;e;)(t=pr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--so}function Jm(){pr=(El=Si.now())+kl,so=xi=0;try{KN()}finally{so=0,eC(),pr=0}}function JN(){var e=Si.now(),t=e-El;t>e0&&(kl-=t,El=e)}function eC(){for(var e,t=xl,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:xl=n);Ei=e,Jc(r)}function Jc(e){if(!so){xi&&(xi=clearTimeout(xi));var t=e-pr;t>24?(e<1/0&&(xi=setTimeout(Jm,Math.ceil(e-Si.now()-kl)+1)),wi&&(wi=clearInterval(wi))):(wi||(El=Si.now(),wi=setInterval(JN,e0)),so=1,t0(Jm))}}function td(e,t,n){var r=new Sl;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}function r0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nd=3,N3=(function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n})(nd),C3=(function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n})(nd),b3=(function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n})(nd),tC=Math.PI,M3=tC/2;function Nl(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}var n0=4/11,I3=6/11,P3=8/11,O3=3/4,T3=9/11,D3=10/11,L3=15/16,z3=21/22,A3=63/64,R3=1/n0/n0;var rd=1.70158,$3=(function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n})(rd),B3=(function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n})(rd),H3=(function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n})(rd),lo=2*Math.PI,od=1,id=.3,F3=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=lo);function o(i){return t*Nl(- --i)*Math.sin((r-i)/n)}return o.amplitude=function(i){return e(i,n*lo)},o.period=function(i){return e(t,i)},o})(od,id),V3=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=lo);function o(i){return 1-t*Nl(i=+i)*Math.sin((i+r)/n)}return o.amplitude=function(i){return e(i,n*lo)},o.period=function(i){return e(t,i)},o})(od,id),j3=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=lo);function o(i){return((i=i*2-1)<0?t*Nl(-i)*Math.sin((r-i)/n):2-t*Nl(i)*Math.sin((r+i)/n))/2}return o.amplitude=function(i){return e(i,n*lo)},o.period=function(i){return e(t,i)},o})(od,id);var nC=lr("start","end","cancel","interrupt"),rC=[],s0=0,o0=1,sd=2,Cl=3,i0=4,ld=5,bl=6;function Ml(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;oC(e,n,{name:t,index:r,group:o,on:nC,tween:rC,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:s0})}function ad(e,t){var n=Pt(e,t);if(n.state>s0)throw new Error("too late; already scheduled");return n}function Vt(e,t){var n=Pt(e,t);if(n.state>Cl)throw new Error("too late; already running");return n}function Pt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function oC(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=ed(i,0,n.time);function i(u){n.state=o0,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,d,h;if(n.state!==o0)return a();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Cl)return td(s);h.state===i0?(h.state=bl,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=bl,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(td(function(){n.state===Cl&&(n.state=i0,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=sd,n.on.call("start",e,e.__data__,n.index,n.group),n.state===sd){for(n.state=Cl,o=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++f]=h);o.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=ld,1),f=-1,d=o.length;++f<d;)o[f].call(e,c);n.state===ld&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=bl,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ki(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>sd&&r.state<ld,r.state=bl,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function iC(e){return this.each(function(){ki(this,e)})}function sC(e,t){var n,r;return function(){var o=Vt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function lC(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Vt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var l={name:t,value:n},a=0,u=o.length;a<u;++a)if(o[a].name===t){o[a]=l;break}a===u&&o.push(l)}i.tween=o}}function aC(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?sC:lC)(n,e,t))}function ud(e,t,n){var r=e._id;return e.each(function(){var o=Vt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Pt(o,r).value[t]}}function l0(e,t){var n;return(typeof t=="number"?It:t instanceof ln?vi:(n=ln(t))?(t=n,vi):Kc)(e,t)}function uC(e){return function(){this.removeAttribute(e)}}function cC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dC(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function fC(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function hC(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function pC(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function gC(e,t){var n=fi(e),r=n==="transform"?Gm:l0;return this.attrTween(e,typeof t=="function"?(n.local?pC:hC)(n,r,ud(this,"attr."+e,t)):t==null?(n.local?cC:uC)(n):(n.local?fC:dC)(n,r,t))}function mC(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function yC(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function vC(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&yC(e,i)),n}return o._value=t,o}function wC(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&mC(e,i)),n}return o._value=t,o}function xC(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=fi(e);return this.tween(n,(r.local?vC:wC)(r,t))}function EC(e,t){return function(){ad(this,e).delay=+t.apply(this,arguments)}}function SC(e,t){return t=+t,function(){ad(this,e).delay=t}}function kC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?EC:SC)(t,e)):Pt(this.node(),t).delay}function _C(e,t){return function(){Vt(this,e).duration=+t.apply(this,arguments)}}function NC(e,t){return t=+t,function(){Vt(this,e).duration=t}}function CC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_C:NC)(t,e)):Pt(this.node(),t).duration}function bC(e,t){if(typeof t!="function")throw new Error;return function(){Vt(this,e).ease=t}}function MC(e){var t=this._id;return arguments.length?this.each(bC(t,e)):Pt(this.node(),t).ease}function IC(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Vt(this,e).ease=n}}function PC(e){if(typeof e!="function")throw new Error;return this.each(IC(this._id,e))}function OC(e){typeof e!="function"&&(e=Dc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new un(r,this._parents,this._name,this._id)}function TC(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),l=0;l<i;++l)for(var a=t[l],u=n[l],c=a.length,f=s[l]=new Array(c),d,h=0;h<c;++h)(d=a[h]||u[h])&&(f[h]=d);for(;l<r;++l)s[l]=t[l];return new un(s,this._parents,this._name,this._id)}function DC(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function LC(e,t,n){var r,o,i=DC(t)?ad:Vt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function zC(e,t){var n=this._id;return arguments.length<2?Pt(this.node(),n).on.on(e):this.each(LC(n,e,t))}function AC(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function RC(){return this.on("end.remove",AC(this._id))}function $C(e){var t=this._name,n=this._id;typeof e!="function"&&(e=al(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var l=r[s],a=l.length,u=i[s]=new Array(a),c,f,d=0;d<a;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,Ml(u[d],t,n,d,u,Pt(c,n)));return new un(i,this._parents,t,n)}function BC(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Tc(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var a=r[l],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var d=e.call(c,c.__data__,f,a),h,m=Pt(c,n),w=0,x=d.length;w<x;++w)(h=d[w])&&Ml(h,t,n,w,d,m);i.push(d),s.push(c)}return new un(i,s,t,n)}var HC=ur.prototype.constructor;function FC(){return new HC(this._groups,this._parents)}function VC(e,t){var n,r,o;return function(){var i=ar(this,e),s=(this.style.removeProperty(e),ar(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function a0(e){return function(){this.style.removeProperty(e)}}function jC(e,t,n){var r,o=n+"",i;return function(){var s=ar(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function WC(e,t,n){var r,o,i;return function(){var s=ar(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),ar(this,e))),s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l))}}function UC(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var a=Vt(this,e),u=a.on,c=a.value[i]==null?l||(l=a0(t)):void 0;(u!==n||o!==c)&&(r=(n=u).copy()).on(s,o=c),a.on=r}}function YC(e,t,n){var r=(e+="")=="transform"?Xm:l0;return t==null?this.styleTween(e,VC(e,r)).on("end.style."+e,a0(e)):typeof t=="function"?this.styleTween(e,WC(e,r,ud(this,"style."+e,t))).each(UC(this._id,e)):this.styleTween(e,jC(e,r,t),n).on("end.style."+e,null)}function qC(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function XC(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&qC(e,s,n)),r}return i._value=t,i}function GC(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,XC(e,t,n??""))}function ZC(e){return function(){this.textContent=e}}function QC(e){return function(){var t=e(this);this.textContent=t??""}}function KC(e){return this.tween("text",typeof e=="function"?QC(ud(this,"text",e)):ZC(e==null?"":e+""))}function JC(e){return function(t){this.textContent=e.call(this,t)}}function e2(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&JC(o)),t}return r._value=e,r}function t2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,e2(e))}function n2(){for(var e=this._name,t=this._id,n=u0(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=Pt(a,t);Ml(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new un(r,this._parents,e,n)}function r2(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var l={value:s},a={value:function(){--o===0&&i()}};n.each(function(){var u=Vt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),o===0&&i()})}var o2=0;function un(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function i2(e){return ur().transition(e)}function u0(){return++o2}var an=ur.prototype;un.prototype=i2.prototype={constructor:un,select:$C,selectAll:BC,selectChild:an.selectChild,selectChildren:an.selectChildren,filter:OC,merge:TC,selection:FC,transition:n2,call:an.call,nodes:an.nodes,node:an.node,size:an.size,empty:an.empty,each:an.each,on:zC,attr:gC,attrTween:xC,style:YC,styleTween:GC,text:KC,textTween:t2,remove:RC,tween:aC,delay:kC,duration:CC,ease:MC,easeVarying:PC,end:r2,[Symbol.iterator]:an[Symbol.iterator]};var s2={time:null,delay:0,duration:250,ease:r0};function l2(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function a2(e){var t,n;e instanceof un?(t=e._id,e=e._name):(t=u0(),(n=s2).time=_l(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&Ml(a,e,t,u,s,n||l2(a,t));return new un(r,this._parents,e,t)}ur.prototype.interrupt=iC;ur.prototype.transition=a2;var Il=e=>()=>e;function u2(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function cn(e,t,n){this.k=e,this.x=t,this.y=n}cn.prototype={constructor:cn,scale:function(e){return e===1?this:new cn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new cn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ni=new cn(1,0,0);dd.prototype=cn.prototype;function dd(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ni;return e.__zoom}function cd(e){e.stopImmediatePropagation()}function _i(e){e.preventDefault(),e.stopImmediatePropagation()}function c2(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function d2(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function c0(){return this.__zoom||Ni}function f2(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function h2(){return navigator.maxTouchPoints||"ontouchstart"in this}function p2(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function fd(){var e=c2,t=d2,n=p2,r=f2,o=h2,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=io,u=lr("start","zoom","end"),c,f,d,h=500,m=150,w=0,x=10;function g(E){E.property("__zoom",c0).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",A).filter(o).on("touchstart.zoom",R).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(E,b,I,P){var L=E.selection?E.selection():E;L.property("__zoom",c0),E!==L?k(E,b,I,P):L.interrupt().each(function(){S(this,arguments).event(P).start().zoom(null,typeof b=="function"?b.apply(this,arguments):b).end()})},g.scaleBy=function(E,b,I,P){g.scaleTo(E,function(){var L=this.__zoom.k,z=typeof b=="function"?b.apply(this,arguments):b;return L*z},I,P)},g.scaleTo=function(E,b,I,P){g.transform(E,function(){var L=t.apply(this,arguments),z=this.__zoom,F=I==null?v(L):typeof I=="function"?I.apply(this,arguments):I,H=z.invert(F),Y=typeof b=="function"?b.apply(this,arguments):b;return n(p(y(z,Y),F,H),L,s)},I,P)},g.translateBy=function(E,b,I,P){g.transform(E,function(){return n(this.__zoom.translate(typeof b=="function"?b.apply(this,arguments):b,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),s)},null,P)},g.translateTo=function(E,b,I,P,L){g.transform(E,function(){var z=t.apply(this,arguments),F=this.__zoom,H=P==null?v(z):typeof P=="function"?P.apply(this,arguments):P;return n(Ni.translate(H[0],H[1]).scale(F.k).translate(typeof b=="function"?-b.apply(this,arguments):-b,typeof I=="function"?-I.apply(this,arguments):-I),z,s)},P,L)};function y(E,b){return b=Math.max(i[0],Math.min(i[1],b)),b===E.k?E:new cn(b,E.x,E.y)}function p(E,b,I){var P=b[0]-I[0]*E.k,L=b[1]-I[1]*E.k;return P===E.x&&L===E.y?E:new cn(E.k,P,L)}function v(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function k(E,b,I,P){E.on("start.zoom",function(){S(this,arguments).event(P).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(P).end()}).tween("zoom",function(){var L=this,z=arguments,F=S(L,z).event(P),H=t.apply(L,z),Y=I==null?v(H):typeof I=="function"?I.apply(L,z):I,ne=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),U=L.__zoom,te=typeof b=="function"?b.apply(L,z):b,re=a(U.invert(Y).concat(ne/U.k),te.invert(Y).concat(ne/te.k));return function(ee){if(ee===1)ee=te;else{var $=re(ee),G=ne/$[2];ee=new cn(G,Y[0]-$[0]*G,Y[1]-$[1]*G)}F.zoom(null,ee)}})}function S(E,b,I){return!I&&E.__zooming||new _(E,b)}function _(E,b){this.that=E,this.args=b,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,b),this.taps=0}_.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,b){return this.mouse&&E!=="mouse"&&(this.mouse[1]=b.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=b.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=b.invert(this.touch1[0])),this.that.__zoom=b,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var b=Fe(this.that).datum();u.call(E,this.that,new u2(E,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:u}),b)}};function N(E,...b){if(!e.apply(this,arguments))return;var I=S(this,b).event(E),P=this.__zoom,L=Math.max(i[0],Math.min(i[1],P.k*Math.pow(2,r.apply(this,arguments)))),z=Qe(E);if(I.wheel)(I.mouse[0][0]!==z[0]||I.mouse[0][1]!==z[1])&&(I.mouse[1]=P.invert(I.mouse[0]=z)),clearTimeout(I.wheel);else{if(P.k===L)return;I.mouse=[z,P.invert(z)],ki(this),I.start()}_i(E),I.wheel=setTimeout(F,m),I.zoom("mouse",n(p(y(P,L),I.mouse[0],I.mouse[1]),I.extent,s));function F(){I.wheel=null,I.end()}}function M(E,...b){if(d||!e.apply(this,arguments))return;var I=E.currentTarget,P=S(this,b,!0).event(E),L=Fe(E.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",ne,!0),z=Qe(E,I),F=E.clientX,H=E.clientY;Rc(E.view),cd(E),P.mouse=[z,this.__zoom.invert(z)],ki(this),P.start();function Y(U){if(_i(U),!P.moved){var te=U.clientX-F,re=U.clientY-H;P.moved=te*te+re*re>w}P.event(U).zoom("mouse",n(p(P.that.__zoom,P.mouse[0]=Qe(U,I),P.mouse[1]),P.extent,s))}function ne(U){L.on("mousemove.zoom mouseup.zoom",null),$c(U.view,P.moved),_i(U),P.event(U).end()}}function A(E,...b){if(e.apply(this,arguments)){var I=this.__zoom,P=Qe(E.changedTouches?E.changedTouches[0]:E,this),L=I.invert(P),z=I.k*(E.shiftKey?.5:2),F=n(p(y(I,z),P,L),t.apply(this,b),s);_i(E),l>0?Fe(this).transition().duration(l).call(k,F,P,E):Fe(this).call(g.transform,F,P,E)}}function R(E,...b){if(e.apply(this,arguments)){var I=E.touches,P=I.length,L=S(this,b,E.changedTouches.length===P).event(E),z,F,H,Y;for(cd(E),F=0;F<P;++F)H=I[F],Y=Qe(H,this),Y=[Y,this.__zoom.invert(Y),H.identifier],L.touch0?!L.touch1&&L.touch0[2]!==Y[2]&&(L.touch1=Y,L.taps=0):(L.touch0=Y,z=!0,L.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(L.taps<2&&(f=Y[0],c=setTimeout(function(){c=null},h)),ki(this),L.start())}}function V(E,...b){if(this.__zooming){var I=S(this,b).event(E),P=E.changedTouches,L=P.length,z,F,H,Y;for(_i(E),z=0;z<L;++z)F=P[z],H=Qe(F,this),I.touch0&&I.touch0[2]===F.identifier?I.touch0[0]=H:I.touch1&&I.touch1[2]===F.identifier&&(I.touch1[0]=H);if(F=I.that.__zoom,I.touch1){var ne=I.touch0[0],U=I.touch0[1],te=I.touch1[0],re=I.touch1[1],ee=(ee=te[0]-ne[0])*ee+(ee=te[1]-ne[1])*ee,$=($=re[0]-U[0])*$+($=re[1]-U[1])*$;F=y(F,Math.sqrt(ee/$)),H=[(ne[0]+te[0])/2,(ne[1]+te[1])/2],Y=[(U[0]+re[0])/2,(U[1]+re[1])/2]}else if(I.touch0)H=I.touch0[0],Y=I.touch0[1];else return;I.zoom("touch",n(p(F,H,Y),I.extent,s))}}function B(E,...b){if(this.__zooming){var I=S(this,b).event(E),P=E.changedTouches,L=P.length,z,F;for(cd(E),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),z=0;z<L;++z)F=P[z],I.touch0&&I.touch0[2]===F.identifier?delete I.touch0:I.touch1&&I.touch1[2]===F.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(F=Qe(F,this),Math.hypot(f[0]-F[0],f[1]-F[1])<x)){var H=Fe(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return g.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:Il(+E),g):r},g.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Il(!!E),g):e},g.touchable=function(E){return arguments.length?(o=typeof E=="function"?E:Il(!!E),g):o},g.extent=function(E){return arguments.length?(t=typeof E=="function"?E:Il([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),g):t},g.scaleExtent=function(E){return arguments.length?(i[0]=+E[0],i[1]=+E[1],g):[i[0],i[1]]},g.translateExtent=function(E){return arguments.length?(s[0][0]=+E[0][0],s[1][0]=+E[1][0],s[0][1]=+E[0][1],s[1][1]=+E[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(E){return arguments.length?(n=E,g):n},g.duration=function(E){return arguments.length?(l=+E,g):l},g.interpolate=function(E){return arguments.length?(a=E,g):a},g.on=function(){var E=u.on.apply(u,arguments);return E===u?g:E},g.clickDistance=function(E){return arguments.length?(w=(E=+E)*E,g):Math.sqrt(w)},g.tapDistance=function(E){return arguments.length?(x=+E,g):x},g}var st={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},co=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],yd=["Enter"," ","Escape"],vd={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},Bn;(function(e){e.Strict="strict",e.Loose="loose"})(Bn||(Bn={}));var dn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(dn||(dn={}));var gr;(function(e){e.Partial="partial",e.Full="full"})(gr||(gr={}));var wd={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},jt;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(jt||(jt={}));var Wt;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Wt||(Wt={}));var Q;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Q||(Q={}));var d0={[Q.Left]:Q.Right,[Q.Right]:Q.Left,[Q.Top]:Q.Bottom,[Q.Bottom]:Q.Top},xd=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,_0=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Ed=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var bi=(e,t=[0,0])=>{let{width:n,height:r}=mt(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},Sd=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((o,i)=>{let s=typeof i=="string",l=!t.nodeLookup&&!s?i:void 0;return t.nodeLookup&&(l=s?t.nodeLookup.get(i):Ed(i)?i:t.nodeLookup.get(i.id)),l?(n=!0,zl(o,Tl(l,t.nodeOrigin))):o},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?Al(r):{x:0,y:0,width:0,height:0}},fo=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=zl(n,Tl(o)),r=!0)}),r?Al(n):{x:0,y:0,width:0,height:0}},Dl=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{let l=(t.x-n)/o,a=(t.y-r)/o,u=t.width/o,c=t.height/o,f=[];for(let d of e.values()){let{measured:h,selectable:m=!0,hidden:w=!1}=d;if(s&&!m||w)continue;let x=h.width??d.width??d.initialWidth??0,g=h.height??d.height??d.initialHeight??0,{x:y,y:p}=d.internals.positionAbsolute,v=I0(l,a,u,c,y,p,x,g),k=x*g,S=i&&v>0;(!d.internals.handleBounds||S||v>=k||d.dragging)&&f.push(d)}return f},N0=(e,t)=>{let n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function g2(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{let i;if(t?.includeHiddenNodes){let{width:s,height:l}=mt(o);i=s>0&&l>0}else i=!!(o.measured.width&&o.measured.height&&!o.hidden);i&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function C0({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return!0;let l=g2(e,s),a=fo(l),u=Ii(a,t,n,s?.minZoom??o,s?.maxZoom??i,s?.padding??.1);return await r.setViewport(u,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),!0}function kd({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){let s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},c=s.origin??r,f=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i?.("005",st.error005());else{let{width:h,height:m}=mt(l);h&&m&&(f=[[a,u],[a+h,u+m]])}else l&&vr(s.extent)&&(f=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);let d=vr(f)?mr(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&i?.("015",st.error015()),{position:{x:d.x-a+(s.measured.width??0)*c[0],y:d.y-u+(s.measured.height??0)*c[1]},positionAbsolute:d}}async function b0({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){let i=new Set(e.map(d=>d.id)),s=[];for(let d of n){if(d.deletable===!1)continue;let h=i.has(d.id),m=!h&&d.parentId&&s.find(w=>w.id===d.parentId);(h||m)&&s.push(d)}let l=new Set(t.map(d=>d.id)),a=r.filter(d=>d.deletable!==!1),c=N0(s,a);for(let d of a)l.has(d.id)&&!c.find(m=>m.id===d.id)&&c.push(d);if(!o)return{edges:c,nodes:s};let f=await o({nodes:s,edges:c});return typeof f=="boolean"?f?{edges:c,nodes:s}:{edges:[],nodes:[]}:f}var uo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),mr=(e={x:0,y:0},t,n)=>({x:uo(e.x,t[0][0],t[1][0]-(n?.width??0)),y:uo(e.y,t[0][1],t[1][1]-(n?.height??0))});function M0(e,t,n){let{width:r,height:o}=mt(n),{x:i,y:s}=n.internals.positionAbsolute;return mr(e,[[i,s],[i+r,s+o]],t)}var f0=(e,t,n)=>e<t?uo(Math.abs(e-t),1,t)/t:e>n?-uo(Math.abs(e-n),1,t)/t:0,Ll=(e,t,n=15,r=40)=>{let o=f0(e.x,r,t.width-r)*n,i=f0(e.y,r,t.height-r)*n;return[o,i]},zl=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),md=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Al=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),ho=(e,t=[0,0])=>{let{x:n,y:r}=Ed(e)?e.internals.positionAbsolute:bi(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Tl=(e,t=[0,0])=>{let{x:n,y:r}=Ed(e)?e.internals.positionAbsolute:bi(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},_d=(e,t)=>Al(zl(md(e),md(t))),I0=(e,t,n,r,o,i,s,l)=>{let a=Math.max(0,Math.min(e+n,o+s)-Math.max(e,o)),u=Math.max(0,Math.min(t+r,i+l)-Math.max(t,i));return Math.ceil(a*u)},Mi=(e,t)=>I0(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Nd=e=>pt(e.width)&&pt(e.height)&&pt(e.x)&&pt(e.y),pt=e=>!isNaN(e)&&isFinite(e),Cd=(e,t)=>(n,r)=>{},po=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),go=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{let l={x:(e-n)/o,y:(t-r)/o};return i?po(l,s):l},yr=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function ao(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function m2(e,t,n){if(typeof e=="string"||typeof e=="number"){let r=ao(e,n),o=ao(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){let r=ao(e.top??e.y??0,n),o=ao(e.bottom??e.y??0,n),i=ao(e.left??e.x??0,t),s=ao(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function y2(e,t,n,r,o,i){let{x:s,y:l}=yr(e,[t,n,r]),{x:a,y:u}=yr({x:e.x+e.width,y:e.y+e.height},[t,n,r]),c=o-a,f=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(f)}}var Ii=(e,t,n,r,o,i)=>{let s=m2(i,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=uo(u,r,o),f=e.x+e.width/2,d=e.y+e.height/2,h=t/2-f*c,m=n/2-d*c,w=y2(e,h,m,c,t,n),x={left:Math.min(w.left-s.left,0),top:Math.min(w.top-s.top,0),right:Math.min(w.right-s.right,0),bottom:Math.min(w.bottom-s.bottom,0)};return{x:h-x.left+x.right,y:m-x.top+x.bottom,zoom:c}},mo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function vr(e){return e!=null&&e!=="parent"}function mt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function bd(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Md(e,t={width:0,height:0},n,r,o){let i={...e},s=r.get(n);if(s){let l=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function Id(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function P0(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function O0(e){return{...vd,...e||{}}}function Pd(e){return e===null?null:e?"valid":"invalid"}function Ci(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){let{x:i,y:s}=gt(e),l=go({x:i-(o?.left??0),y:s-(o?.top??0)},r),{x:a,y:u}=n?po(l,t):l;return{xSnapped:a,ySnapped:u,...l}}var Rl=e=>({width:e.offsetWidth,height:e.offsetHeight}),Od=e=>e?.getRootNode?.()||window?.document,v2=["INPUT","SELECT","TEXTAREA"];function Td(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:v2.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var Dd=e=>"clientX"in e,gt=(e,t)=>{let n=Dd(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},h0=(e,t,n,r,o)=>{let i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{let l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...Rl(s)}})};function $l({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:l}){let a=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+l*.375+r*.125,c=Math.abs(a-e),f=Math.abs(u-t);return[a,u,c,f]}function Pl(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function p0({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Q.Left:return[t-Pl(t-r,i),n];case Q.Right:return[t+Pl(r-t,i),n];case Q.Top:return[t,n-Pl(n-o,i)];case Q.Bottom:return[t,n+Pl(o-n,i)]}}function Bl({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:o,targetPosition:i=Q.Top,curvature:s=.25}){let[l,a]=p0({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,c]=p0({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[f,d,h,m]=$l({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${a} ${u},${c} ${r},${o}`,f,d,h,m]}function Ld({sourceX:e,sourceY:t,targetX:n,targetY:r}){let o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,o,s]}function T0({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;let s=o&&n?r+1e3:r,l=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+l}function D0({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){let i=zl(Tl(e),Tl(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);let s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Mi(s,Al(i))>0}var w2=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,x2=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),L0=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.("006",st.error006()),t;let r=n.getEdgeId||w2,o;return xd(e)?o={...e}:o={...e,id:r(e)},x2(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Hl({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[o,i,s,l]=Ld({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}var g0={[Q.Left]:{x:-1,y:0},[Q.Right]:{x:1,y:0},[Q.Top]:{x:0,y:-1},[Q.Bottom]:{x:0,y:1}},E2=({source:e,sourcePosition:t=Q.Bottom,target:n})=>t===Q.Left||t===Q.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},m0=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),S2=(e,t,n)=>e.x===t.x&&t.x===n.x&&(t.y-e.y)*(n.y-t.y)>=0||e.y===t.y&&t.y===n.y&&(t.x-e.x)*(n.x-t.x)>=0;function k2({source:e,sourcePosition:t=Q.Bottom,target:n,targetPosition:r=Q.Top,center:o,offset:i,stepPosition:s}){let l=g0[t],a=g0[r],u={x:e.x+l.x*i,y:e.y+l.y*i},c={x:n.x+a.x*i,y:n.y+a.y*i},f=E2({source:u,sourcePosition:t,target:c}),d=f.x!==0?"x":"y",h=f[d],m=[],w,x,g={x:0,y:0},y={x:0,y:0},[,,p,v]=Ld({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[d]*a[d]===-1){d==="x"?(w=o.x??u.x+(c.x-u.x)*s,x=o.y??(u.y+c.y)/2):(w=o.x??(u.x+c.x)/2,x=o.y??u.y+(c.y-u.y)*s);let N=[{x:w,y:u.y},{x:w,y:c.y}],M=[{x:u.x,y:x},{x:c.x,y:x}];l[d]===h?m=d==="x"?N:M:m=d==="x"?M:N}else{let N=[{x:u.x,y:c.y}],M=[{x:c.x,y:u.y}];if(d==="x"?m=l.x===h?M:N:m=l.y===h?N:M,t===r){let E=Math.abs(e[d]-n[d]);if(E<=i){let b=Math.min(i-1,i-E);l[d]===h?g[d]=(u[d]>e[d]?-1:1)*b:y[d]=(c[d]>n[d]?-1:1)*b}}if(t!==r){let E=d==="x"?"y":"x",b=l[d]===a[E],I=u[E]>c[E],P=u[E]<c[E];(l[d]===1&&(!b&&I||b&&P)||l[d]!==1&&(!b&&P||b&&I))&&(m=d==="x"?N:M)}let A={x:u.x+g.x,y:u.y+g.y},R={x:c.x+y.x,y:c.y+y.y},V=Math.max(Math.abs(A.x-m[0].x),Math.abs(R.x-m[0].x)),B=Math.max(Math.abs(A.y-m[0].y),Math.abs(R.y-m[0].y));V>=B?(w=(A.x+R.x)/2,x=m[0].y):(w=m[0].x,x=(A.y+R.y)/2)}let k={x:u.x+g.x,y:u.y+g.y},S={x:c.x+y.x,y:c.y+y.y},_=[];for(let N of[e,k,...m,S,n]){let[M,A]=_.slice(-2);A&&S2(M,A,N)&&_.pop(),_.push(N)}return[_,w,x,p,v]}function _2(e,t,n,r){let o=Math.min(m0(e,t)/2,m0(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*c}`}let l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${s+o*a}Q ${i},${s} ${i+o*l},${s}`}function Pi({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:o,targetPosition:i=Q.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:c=.5}){let[f,d,h,m,w]=k2({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:a},offset:u,stepPosition:c}),x=`M${f[0].x} ${f[0].y}`;for(let g=1;g<f.length-1;g++)x+=_2(f[g-1],f[g],f[g+1],s);return x+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[x,d,h,m,w]}function y0(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function z0(e){let{sourceNode:t,targetNode:n}=e;if(!y0(t)||!y0(n))return null;let r=t.internals.handleBounds||v0(t.handles),o=n.internals.handleBounds||v0(n.handles),i=w0(r?.source??[],e.sourceHandle),s=w0(e.connectionMode===Bn.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!i||!s)return e.onError?.("008",st.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let l=i?.position||Q.Bottom,a=s?.position||Q.Top,u=Hn(t,i,l),c=Hn(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:a}}function v0(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Hn(e,t,n=Q.Left,r=!1){let o=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??mt(e);if(r)return{x:o+s/2,y:i+l/2};switch(t?.position??n){case Q.Top:return{x:o+s/2,y:i};case Q.Right:return{x:o+s,y:i+l/2};case Q.Bottom:return{x:o+s/2,y:i+l};case Q.Left:return{x:o,y:i+l/2}}}function w0(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Fl(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function A0(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){let i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||o].forEach(a=>{if(a&&typeof a=="object"){let u=Fl(a,t);i.has(u)||(s.push({id:u,color:a.color||n,...a}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}var R0=1e3,N2=10,zd={nodeOrigin:[0,0],nodeExtent:co,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},C2={...zd,checkEquality:!0};function Ad(e,t){let n={...e};for(let r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function $0(e,t,n){let r=Ad(zd,n);for(let o of e.values())if(o.parentId)$d(o,e,t,r);else{let i=bi(o,r.nodeOrigin),s=vr(o.extent)?o.extent:r.nodeExtent,l=mr(i,s,mt(o));o.internals.positionAbsolute=l}}function b2(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let o of e.handles){let i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function Rd(e){return e==="manual"}function Vl(e,t,n,r={}){let o=Ad(C2,r),i={i:0},s=new Map(t),l=o?.elevateNodesOnSelect&&!Rd(o.zIndexMode)?R0:0,a=e.length>0,u=!1;t.clear(),n.clear();for(let c of e){let f=s.get(c.id);if(o.checkEquality&&c===f?.internals.userNode)t.set(c.id,f);else{let d=bi(c,o.nodeOrigin),h=vr(c.extent)?c.extent:o.nodeExtent,m=mr(d,h,mt(c));f={...o.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:m,handleBounds:b2(c,f),z:B0(c,l,o.zIndexMode),userNode:c}},t.set(c.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(a=!1),c.parentId&&$d(f,t,n,r,i),u||(u=c.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function M2(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function $d(e,t,n,r,o){let{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=Ad(zd,r),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}M2(e,n),o&&!c.parentId&&c.internals.rootParentIndex===void 0&&a==="auto"&&(c.internals.rootParentIndex=++o.i,c.internals.z=c.internals.z+o.i*N2),o&&c.internals.rootParentIndex!==void 0&&(o.i=c.internals.rootParentIndex);let f=i&&!Rd(a)?R0:0,{x:d,y:h,z:m}=I2(e,c,s,l,f,a),{positionAbsolute:w}=e.internals,x=d!==w.x||h!==w.y;(x||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:d,y:h}:w,z:m}})}function B0(e,t,n){let r=pt(e.zIndex)?e.zIndex:0;return Rd(n)?r:r+(e.selected?t:0)}function I2(e,t,n,r,o,i){let{x:s,y:l}=t.internals.positionAbsolute,a=mt(e),u=bi(e,n),c=vr(e.extent)?mr(u,e.extent,a):u,f=mr({x:s+c.x,y:l+c.y},r,a);e.extent==="parent"&&(f=M0(f,a,t));let d=B0(e,o,i),h=t.internals.z??0;return{x:f.x,y:f.y,z:h>=d?h+1:d}}function jl(e,t,n,r=[0,0]){let o=[],i=new Map;for(let s of e){let l=t.get(s.parentId);if(!l)continue;let a=i.get(s.parentId)?.expandedRect??ho(l),u=_d(a,s.rect);i.set(s.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:s,parent:l},a)=>{let u=l.internals.positionAbsolute,c=mt(l),f=l.origin??r,d=s.x<u.x?Math.round(Math.abs(u.x-s.x)):0,h=s.y<u.y?Math.round(Math.abs(u.y-s.y)):0,m=Math.max(c.width,Math.round(s.width)),w=Math.max(c.height,Math.round(s.height)),x=(m-c.width)*f[0],g=(w-c.height)*f[1];(d>0||h>0||x||g)&&(o.push({id:a,type:"position",position:{x:l.position.x-d+x,y:l.position.y-h+g}}),n.get(a)?.forEach(y=>{e.some(p=>p.id===y.id)||o.push({id:y.id,type:"position",position:{x:y.position.x+d,y:y.position.y+h}})})),(c.width<s.width||c.height<s.height||d||h)&&o.push({id:a,type:"dimensions",setAttributes:!0,dimensions:{width:m+(d?f[0]*d-x:0),height:w+(h?f[1]*h-g:0)}})}),o}function H0(e,t,n,r,o,i,s){let l=r?.querySelector(".xyflow__viewport"),a=!1;if(!l)return{changes:[],updatedInternals:a};let u=[],c=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(c.transform),d=[];for(let h of e.values()){let m=t.get(h.id);if(!m)continue;if(m.hidden){t.set(m.id,{...m,internals:{...m.internals,handleBounds:void 0}}),a=!0;continue}let w=Rl(h.nodeElement),x=m.measured.width!==w.width||m.measured.height!==w.height;if(!!(w.width&&w.height&&(x||!m.internals.handleBounds||h.force))){let y=h.nodeElement.getBoundingClientRect(),p=vr(m.extent)?m.extent:i,{positionAbsolute:v}=m.internals;if(m.parentId&&m.extent==="parent"){let S=t.get(m.parentId);S&&(v=M0(v,w,S))}else p&&(v=mr(v,p,w));let k={...m,measured:w,internals:{...m.internals,positionAbsolute:v,handleBounds:{source:h0("source",h.nodeElement,y,f,m.id),target:h0("target",h.nodeElement,y,f,m.id)}}};t.set(m.id,k),m.parentId&&$d(k,t,n,{nodeOrigin:o,zIndexMode:s}),a=!0,x&&(u.push({id:m.id,type:"dimensions",dimensions:w}),m.expandParent&&m.parentId&&d.push({id:m.id,parentId:m.parentId,rect:ho(k,o)}))}}if(d.length>0){let h=jl(d,t,n,o);u.push(...h)}return{changes:u,updatedInternals:a}}async function F0({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return!1;let s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function x0(e,t,n,r,o,i){let s=o,l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${o}-${e}`;let a=r.get(s)||new Map;if(r.set(s,a.set(n,t)),i){s=`${o}-${e}-${i}`;let u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function Bd(e,t,n){e.clear(),t.clear();for(let r of n){let{source:o,target:i,sourceHandle:s=null,targetHandle:l=null}=r,a={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:l},u=`${o}-${s}--${i}-${l}`,c=`${i}-${l}--${o}-${s}`;x0("source",a,c,e,o,s),x0("target",a,u,e,i,l),t.set(r.id,r)}}function V0(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:V0(n,t):!1}function E0(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function P2(e,t,n,r,o){let i=new Map;for(let[s,l]of e)if((o?l.id===r:l.selected||l.id===r)&&(o||!l.parentId||!V0(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let u=e.get(s);u&&i.set(s,{id:s,position:u.position||{x:0,y:0},distance:{x:n.x-u.internals.positionAbsolute.x,y:n.y-u.internals.positionAbsolute.y},extent:u.extent,parentId:u.parentId,origin:u.origin,expandParent:u.expandParent,internals:{positionAbsolute:u.internals.positionAbsolute||{x:0,y:0}},measured:{width:u.measured.width??0,height:u.measured.height??0}})}return i}function hd({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let o=[];for(let[s,l]of t){let a=n.get(s)?.internals.userNode;a&&o.push({...a,position:l.position,dragging:r})}if(!e)return[o[0],o];let i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:r}:o[0],o]}function O2({dragItems:e,snapGrid:t,x:n,y:r}){let o=e.values().next().value;if(!o)return null;let i={x:n-o.distance.x,y:r-o.distance.y},s=po(i,t);return{x:s.x-i.x,y:s.y-i.y}}function j0({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,l=new Map,a=!1,u={x:0,y:0},c=null,f=!1,d=null,h=!1,m=!1,w=null;function x({noDragClassName:y,handleSelector:p,domNode:v,isSelectable:k,nodeId:S,nodeClickDistance:_=0}){d=Fe(v);function N({x:V,y:B}){let{nodeLookup:E,nodeExtent:b,snapGrid:I,snapToGrid:P,nodeOrigin:L,onNodeDrag:z,onSelectionDrag:F,onError:H,updateNodePositions:Y}=t();i={x:V,y:B};let ne=!1,U=l.size>1,te=U&&b?md(fo(l)):null,re=U&&P?O2({dragItems:l,snapGrid:I,x:V,y:B}):null;for(let[ee,$]of l){if(!E.has(ee))continue;let G={x:V-$.distance.x,y:B-$.distance.y};P&&(G=re?{x:Math.round(G.x+re.x),y:Math.round(G.y+re.y)}:po(G,I));let O=null;if(U&&b&&!$.extent&&te){let{positionAbsolute:Z}=$.internals,J=Z.x-te.x+b[0][0],ie=Z.x+$.measured.width-te.x2+b[1][0],se=Z.y-te.y+b[0][1],Te=Z.y+$.measured.height-te.y2+b[1][1];O=[[J,se],[ie,Te]]}let{position:W,positionAbsolute:q}=kd({nodeId:ee,nextPosition:G,nodeLookup:E,nodeExtent:O||b,nodeOrigin:L,onError:H});ne=ne||$.position.x!==W.x||$.position.y!==W.y,$.position=W,$.internals.positionAbsolute=q}if(m=m||ne,!!ne&&(Y(l,!0),w&&(r||z||!S&&F))){let[ee,$]=hd({nodeId:S,dragItems:l,nodeLookup:E});r?.(w,l,ee,$),z?.(w,ee,$),S||F?.(w,$)}}async function M(){if(!c)return;let{transform:V,panBy:B,autoPanSpeed:E,autoPanOnNodeDrag:b}=t();if(!b){a=!1,cancelAnimationFrame(s);return}let[I,P]=Ll(u,c,E);(I!==0||P!==0)&&(i.x=(i.x??0)-I/V[2],i.y=(i.y??0)-P/V[2],await B({x:I,y:P})&&N(i)),s=requestAnimationFrame(M)}function A(V){let{nodeLookup:B,multiSelectionActive:E,nodesDraggable:b,transform:I,snapGrid:P,snapToGrid:L,selectNodesOnDrag:z,onNodeDragStart:F,onSelectionDragStart:H,unselectNodesAndEdges:Y}=t();f=!0;let ne=!!S&&!E&&!B.get(S)?.selected;(!z||!k)&&!E&&S&&(B.get(S)?.selected||Y()),k&&z&&S&&e?.(S);let U=Ci(V.sourceEvent,{transform:I,snapGrid:P,snapToGrid:L,containerBounds:c});if(i=U,l=P2(B,b,U,S,ne),l.size>0&&(n||F||!S&&H)){let[te,re]=hd({nodeId:S,dragItems:l,nodeLookup:B});n?.(V.sourceEvent,l,te,re),F?.(V.sourceEvent,te,re),S||H?.(V.sourceEvent,re)}}let R=Bc().clickDistance(_).on("start",V=>{let{domNode:B,nodeDragThreshold:E,transform:b,snapGrid:I,snapToGrid:P}=t();c=B?.getBoundingClientRect()||null,h=!1,m=!1,w=V.sourceEvent,E===0&&A(V),i=Ci(V.sourceEvent,{transform:b,snapGrid:I,snapToGrid:P,containerBounds:c}),u=gt(V.sourceEvent,c)}).on("drag",V=>{let{autoPanOnNodeDrag:B,transform:E,snapGrid:b,snapToGrid:I,nodeDragThreshold:P,nodeLookup:L}=t(),z=Ci(V.sourceEvent,{transform:E,snapGrid:b,snapToGrid:I,containerBounds:c});if(w=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||S&&!L.has(S))&&(h=!0),!h){if(!a&&B&&f&&(a=!0,M()),!f){let F=gt(V.sourceEvent,c),H=F.x-u.x,Y=F.y-u.y;Math.sqrt(H*H+Y*Y)>P&&A(V)}(i.x!==z.xSnapped||i.y!==z.ySnapped)&&l&&f&&(u=gt(V.sourceEvent,c),N(z))}}).on("end",V=>{if(!f||h){h&&l.size>0&&t().updateNodePositions(l,!1);return}if(a=!1,f=!1,cancelAnimationFrame(s),l.size>0){let{nodeLookup:B,updateNodePositions:E,onNodeDragStop:b,onSelectionDragStop:I}=t();if(m&&(E(l,!1),m=!1),o||b||!S&&I){let[P,L]=hd({nodeId:S,dragItems:l,nodeLookup:B,dragging:!1});o?.(V.sourceEvent,l,P,L),b?.(V.sourceEvent,P,L),S||I?.(V.sourceEvent,L)}}}).filter(V=>{let B=V.target;return!V.button&&(!y||!E0(B,`.${y}`,v))&&(!p||E0(B,p,v))});d.call(R)}function g(){d?.on(".drag",null)}return{update:x,destroy:g}}function T2(e,t,n){let r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let i of t.values())Mi(o,ho(i))>0&&r.push(i);return r}var D2=250;function L2(e,t,n,r){let o=[],i=1/0,s=T2(e,n,t+D2);for(let l of s){let a=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(let u of a){if(r.nodeId===u.nodeId&&r.type===u.type&&r.id===u.id)continue;let{x:c,y:f}=Hn(l,u,u.position,!0),d=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(f-e.y,2));d>t||(d<i?(o=[{...u,x:c,y:f}],i=d):d===i&&o.push({...u,x:c,y:f}))}}if(!o.length)return null;if(o.length>1){let l=r.type==="source"?"target":"source";return o.find(a=>a.type===l)??o[0]}return o[0]}function W0(e,t,n,r,o,i=!1){let s=r.get(e);if(!s)return null;let l=o==="strict"?s.internals.handleBounds?.[t]:[...s.internals.handleBounds?.source??[],...s.internals.handleBounds?.target??[]],a=(n?l?.find(u=>u.id===n):l?.[0])??null;return a&&i?{...a,...Hn(s,a,a.position,!0)}:a}function U0(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function z2(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Y0=()=>!0;function A2(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:c,flowId:f,panBy:d,cancelConnection:h,onConnectStart:m,onConnect:w,onConnectEnd:x,isValidConnection:g=Y0,onReconnectEnd:y,updateConnection:p,getTransform:v,getFromHandle:k,autoPanSpeed:S,dragThreshold:_=1,handleDomNode:N}){let M=Od(e.target),A=0,R,{x:V,y:B}=gt(e),E=U0(i,N),b=l?.getBoundingClientRect(),I=!1;if(!b||!E)return;let P=W0(o,E,r,a,t);if(!P)return;let L=gt(e,b),z=!1,F=null,H=!1,Y=null;function ne(){if(!c||!b)return;let[W,q]=Ll(L,b,S);d({x:W,y:q}),A=requestAnimationFrame(ne)}let U={...P,nodeId:o,type:E,position:P.position},te=a.get(o),ee={inProgress:!0,isValid:null,from:Hn(te,U,Q.Left,!0),fromHandle:U,fromPosition:U.position,fromNode:te,to:L,toHandle:null,toPosition:d0[U.position],toNode:null,pointer:L};function $(){I=!0,p(ee),m?.(e,{nodeId:o,handleId:r,handleType:E})}_===0&&$();function G(W){if(!I){let{x:Te,y:Ut}=gt(W),Ot=Te-V,Tt=Ut-B;if(!(Ot*Ot+Tt*Tt>_*_))return;$()}if(!k()||!U){O(W);return}let q=v();L=gt(W,b),R=L2(go(L,q,!1,[1,1]),n,a,U),z||(ne(),z=!0);let Z=q0(W,{handle:R,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:g,doc:M,lib:u,flowId:f,nodeLookup:a});Y=Z.handleDomNode,F=Z.connection,H=z2(!!R,Z.isValid);let J=a.get(o),ie=J?Hn(J,U,Q.Left,!0):ee.from,se={...ee,from:ie,isValid:H,to:Z.toHandle&&H?yr({x:Z.toHandle.x,y:Z.toHandle.y},q):L,toHandle:Z.toHandle,toPosition:H&&Z.toHandle?Z.toHandle.position:d0[U.position],toNode:Z.toHandle?a.get(Z.toHandle.nodeId):null,pointer:L};p(se),ee=se}function O(W){if(!("touches"in W&&W.touches.length>0)){if(I){(R||Y)&&F&&H&&w?.(F);let{inProgress:q,...Z}=ee,J={...Z,toPosition:ee.toHandle?ee.toPosition:null};x?.(W,J),i&&y?.(W,J)}h(),cancelAnimationFrame(A),z=!1,H=!1,F=null,Y=null,M.removeEventListener("mousemove",G),M.removeEventListener("mouseup",O),M.removeEventListener("touchmove",G),M.removeEventListener("touchend",O)}}M.addEventListener("mousemove",G),M.addEventListener("mouseup",O),M.addEventListener("touchmove",G),M.addEventListener("touchend",O)}function q0(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:a,isValidConnection:u=Y0,nodeLookup:c}){let f=i==="target",d=t?s.querySelector(`.${l}-flow__handle[data-id="${a}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:m}=gt(e),w=s.elementFromPoint(h,m),x=w?.classList.contains(`${l}-flow__handle`)?w:d,g={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){let y=U0(void 0,x),p=x.getAttribute("data-nodeid"),v=x.getAttribute("data-handleid"),k=x.classList.contains("connectable"),S=x.classList.contains("connectableend");if(!p||!y)return g;let _={source:f?p:r,sourceHandle:f?v:o,target:f?r:p,targetHandle:f?o:v};g.connection=_;let M=k&&S&&(n===Bn.Strict?f&&y==="source"||!f&&y==="target":p!==r||v!==o);g.isValid=M&&u(_),g.toHandle=W0(p,y,v,c,n,!0)}return g}var Wl={onPointerDown:A2,isValid:q0};function X0({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let o=Fe(e);function i({translateExtent:l,width:a,height:u,zoomStep:c=1,pannable:f=!0,zoomable:d=!0,inversePan:h=!1}){let m=p=>{if(p.sourceEvent.type!=="wheel"||!t)return;let v=n(),k=p.sourceEvent.ctrlKey&&mo()?10:1,S=-p.sourceEvent.deltaY*(p.sourceEvent.deltaMode===1?.05:p.sourceEvent.deltaMode?1:.002)*c,_=v[2]*Math.pow(2,S*k);t.scaleTo(_)},w=[0,0],x=p=>{(p.sourceEvent.type==="mousedown"||p.sourceEvent.type==="touchstart")&&(w=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY])},g=p=>{let v=n();if(p.sourceEvent.type!=="mousemove"&&p.sourceEvent.type!=="touchmove"||!t)return;let k=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY],S=[k[0]-w[0],k[1]-w[1]];w=k;let _=r()*Math.max(v[2],Math.log(v[2]))*(h?-1:1),N={x:v[0]-S[0]*_,y:v[1]-S[1]*_},M=[[0,0],[a,u]];t.setViewportConstrained({x:N.x,y:N.y,zoom:v[2]},M,l)},y=fd().on("start",x).on("zoom",f?g:null).on("zoom.wheel",d?m:null);o.call(y,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:Qe}}var Ul=e=>({x:e.x,y:e.y,zoom:e.k}),pd=({x:e,y:t,zoom:n})=>Ni.translate(e,t).scale(n),$n=(e,t)=>e.target.closest(`.${t}`),G0=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),R2=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,gd=(e,t=0,n=R2,r=()=>{})=>{let o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},Z0=e=>{let t=e.ctrlKey&&mo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function $2({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return c=>{if($n(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let f=n.property("__zoom").k||1;if(c.ctrlKey&&s){let x=Qe(c),g=Z0(c),y=f*Math.pow(2,g);r.scaleTo(n,y,x,c);return}let d=c.deltaMode===1?20:1,h=o===dn.Vertical?0:c.deltaX*d,m=o===dn.Horizontal?0:c.deltaY*d;!mo()&&c.shiftKey&&o!==dn.Vertical&&(h=c.deltaY*d,m=0),r.translateBy(n,-(h/f)*i,-(m/f)*i,{internal:!0});let w=Ul(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?a?.(c,w):(e.isPanScrolling=!0,l?.(c,w)),e.panScrollTimeout=setTimeout(()=>{u?.(c,w),e.isPanScrolling=!1},150)}}function B2({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){let i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=$n(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function H2({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let o=Ul(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,o)}}function F2({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{e.usedRightMouseButton=!!(n&&G0(t,e.mouseButton??0)),i.sourceEvent?.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!i.sourceEvent?.internal&&o?.(i.sourceEvent,Ul(i.transform))}}function V2({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{if(!s.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&G0(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){let l=Ul(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(s.sourceEvent,l)},n?150:0)}}}function j2({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:l,noWheelClassName:a,noPanClassName:u,lib:c,connectionInProgress:f}){return d=>{let h=t||n,m=r&&d.ctrlKey,w=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&($n(d,`${c}-flow__node`)||$n(d,`${c}-flow__edge`)||$n(d,`${c}-flow__selection`)||$n(d,`${c}-flow__nodesselection`)))return!0;if(!o&&!h&&!i&&!s&&!r||l||f&&!w||$n(d,a)&&w||$n(d,u)&&(!w||i&&w&&!t)||!r&&d.ctrlKey&&w)return!1;if(!r&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!h&&!i&&!m&&w||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let x=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||w||e)&&x}}function Q0({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:a}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),f=[[0,0],[c.width,c.height]],d=typeof ResizeObserver<"u"?new ResizeObserver(B=>{let E=B[0];E?.contentRect&&(f=[[0,0],[E.contentRect.width,E.contentRect.height]])}):null;d?.observe(e);let h=fd().extent(()=>f).scaleExtent([t,n]).translateExtent(r),m=Fe(e).call(h);v({x:o.x,y:o.y,zoom:uo(o.zoom,t,n)},[[0,0],[c.width,c.height]],r);let w=m.on("wheel.zoom"),x=m.on("dblclick.zoom");h.wheelDelta(Z0);async function g(B,E){return m?new Promise(b=>{h?.interpolate(E?.interpolate==="linear"?oo:io).transform(gd(m,E?.duration,E?.ease,()=>b(!0)),B)}):!1}function y({noWheelClassName:B,noPanClassName:E,onPaneContextMenu:b,userSelectionActive:I,panOnScroll:P,panOnDrag:L,panOnScrollMode:z,panOnScrollSpeed:F,preventScrolling:H,zoomOnPinch:Y,zoomOnScroll:ne,zoomOnDoubleClick:U,panActivationKeyPressed:te=!1,zoomActivationKeyPressed:re,lib:ee,onTransformChange:$,connectionInProgress:G,paneClickDistance:O,selectionOnDrag:W}){I&&!u.isZoomingOrPanning&&h.on("zoom",null);let q=P&&!re&&!I;h.clickDistance(W?1/0:!pt(O)||O<0?0:O);let Z=q?$2({zoomPanValues:u,noWheelClassName:B,d3Selection:m,d3Zoom:h,panOnScrollMode:z,panOnScrollSpeed:F,zoomOnPinch:Y,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):B2({noWheelClassName:B,preventScrolling:H,d3ZoomHandler:w});m.on("wheel.zoom",Z,{passive:!1});let J=H2({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});h.on("start",J);let ie=F2({zoomPanValues:u,panOnDrag:L,onPaneContextMenu:!!b,onPanZoom:i,onTransformChange:$});h.on("zoom",ie);let se=V2({zoomPanValues:u,panOnDrag:L,panOnScroll:P,onPaneContextMenu:b,onPanZoomEnd:l,onDraggingChange:a});h.on("end",se);let Te=j2({panActivationKeyPressed:te,zoomActivationKeyPressed:re,panOnDrag:L,zoomOnScroll:ne,panOnScroll:P,zoomOnDoubleClick:U,zoomOnPinch:Y,userSelectionActive:I,noPanClassName:E,noWheelClassName:B,lib:ee,connectionInProgress:G});h.filter(Te),U?m.on("dblclick.zoom",x):m.on("dblclick.zoom",null)}function p(){h.on("zoom",null),d?.disconnect()}async function v(B,E,b){let I=pd(B),P=h?.constrain()(I,E,b);return P&&await g(P),P}async function k(B,E){let b=pd(B);return await g(b,E),b}function S(B){if(m){let E=pd(B),b=m.property("__zoom");(b.k!==B.zoom||b.x!==B.x||b.y!==B.y)&&h?.transform(m,E,null,{sync:!0})}}function _(){let B=m?dd(m.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}async function N(B,E){return m?new Promise(b=>{h?.interpolate(E?.interpolate==="linear"?oo:io).scaleTo(gd(m,E?.duration,E?.ease,()=>b(!0)),B)}):!1}async function M(B,E){return m?new Promise(b=>{h?.interpolate(E?.interpolate==="linear"?oo:io).scaleBy(gd(m,E?.duration,E?.ease,()=>b(!0)),B)}):!1}function A(B){h?.scaleExtent(B)}function R(B){h?.translateExtent(B)}function V(B){let E=!pt(B)||B<0?0:B;h?.clickDistance(E)}return{update:y,destroy:p,setViewport:k,setViewportConstrained:v,getViewport:_,scaleTo:N,scaleBy:M,setScaleExtent:A,setTranslateExtent:R,syncViewport:S,setClickDistance:V}}var Fn;(function(e){e.Line="line",e.Handle="handle"})(Fn||(Fn={}));function W2({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){let s=e-t,l=n-r,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(a[0]=a[0]*-1),l&&i&&(a[1]=a[1]*-1),a}function S0(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function An(e,t){return Math.max(0,t-e)}function Rn(e,t){return Math.max(0,e-t)}function Ol(e,t,n){return Math.max(0,t-e,e-n)}function k0(e,t){return e?!t:t}function U2(e,t,n,r,o,i,s,l){let{affectsX:a,affectsY:u}=t,{isHorizontal:c,isVertical:f}=t,d=c&&f,{xSnapped:h,ySnapped:m}=n,{minWidth:w,maxWidth:x,minHeight:g,maxHeight:y}=r,{x:p,y:v,width:k,height:S,aspectRatio:_}=e,N=Math.floor(c?h-e.pointerX:0),M=Math.floor(f?m-e.pointerY:0),A=k+(a?-N:N),R=S+(u?-M:M),V=-i[0]*k,B=-i[1]*S,E=Ol(A,w,x),b=Ol(R,g,y);if(s){let L=0,z=0;a&&N<0?L=An(p+N+V,s[0][0]):!a&&N>0&&(L=Rn(p+A+V,s[1][0])),u&&M<0?z=An(v+M+B,s[0][1]):!u&&M>0&&(z=Rn(v+R+B,s[1][1])),E=Math.max(E,L),b=Math.max(b,z)}if(l){let L=0,z=0;a&&N>0?L=Rn(p+N,l[0][0]):!a&&N<0&&(L=An(p+A,l[1][0])),u&&M>0?z=Rn(v+M,l[0][1]):!u&&M<0&&(z=An(v+R,l[1][1])),E=Math.max(E,L),b=Math.max(b,z)}if(o){if(c){let L=Ol(A/_,g,y)*_;if(E=Math.max(E,L),s){let z=0;!a&&!u||a&&!u&&d?z=Rn(v+B+A/_,s[1][1])*_:z=An(v+B+(a?N:-N)/_,s[0][1])*_,E=Math.max(E,z)}if(l){let z=0;!a&&!u||a&&!u&&d?z=An(v+A/_,l[1][1])*_:z=Rn(v+(a?N:-N)/_,l[0][1])*_,E=Math.max(E,z)}}if(f){let L=Ol(R*_,w,x)/_;if(b=Math.max(b,L),s){let z=0;!a&&!u||u&&!a&&d?z=Rn(p+R*_+V,s[1][0])/_:z=An(p+(u?M:-M)*_+V,s[0][0])/_,b=Math.max(b,z)}if(l){let z=0;!a&&!u||u&&!a&&d?z=An(p+R*_,l[1][0])/_:z=Rn(p+(u?M:-M)*_,l[0][0])/_,b=Math.max(b,z)}}}M=M+(M<0?b:-b),N=N+(N<0?E:-E),o&&(d?A>R*_?M=(k0(a,u)?-N:N)/_:N=(k0(a,u)?-M:M)*_:c?(M=N/_,u=a):(N=M*_,a=u));let I=a?p+N:p,P=u?v+M:v;return{width:k+(a?-N:N),height:S+(u?-M:M),x:i[0]*N*(a?-1:1)+I,y:i[1]*M*(u?-1:1)+P}}var K0={width:0,height:0,x:0,y:0},Y2={...K0,pointerX:0,pointerY:0,aspectRatio:1};function q2(e,t,n){let r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,a=n[1]*s;return[[r-l,o-a],[r+i-l,o+s-a]]}function J0({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){let i=Fe(e),s={controlDirection:S0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:c,keepAspectRatio:f,resizeDirection:d,onResizeStart:h,onResize:m,onResizeEnd:w,shouldResize:x}){let g={...K0},y={...Y2};s={boundaries:c,resizeDirection:d,keepAspectRatio:f,controlDirection:S0(u)};let p,v=null,k=[],S,_,N,M=Bc().on("start",A=>{let{nodeLookup:R,transform:V,snapGrid:B,snapToGrid:E,nodeOrigin:b,paneDomNode:I}=n();if(p=R.get(t),!p)return;v=I?.getBoundingClientRect()??null;let{xSnapped:P,ySnapped:L}=Ci(A.sourceEvent,{transform:V,snapGrid:B,snapToGrid:E,containerBounds:v});g={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},y={...g,pointerX:P,pointerY:L,aspectRatio:g.width/g.height},S=void 0,_=vr(p.extent)?p.extent:void 0,p.parentId&&(p.extent==="parent"||p.expandParent)&&(S=R.get(p.parentId)),S&&p.extent==="parent"&&(_=[[0,0],[S.measured.width,S.measured.height]]),k=[],N=void 0;for(let[z,F]of R)if(F.parentId===t&&(k.push({id:z,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){let H=q2(F,p,F.origin??b);N?N=[[Math.min(H[0][0],N[0][0]),Math.min(H[0][1],N[0][1])],[Math.max(H[1][0],N[1][0]),Math.max(H[1][1],N[1][1])]]:N=H}h?.(A,{...g})}).on("drag",A=>{let{transform:R,snapGrid:V,snapToGrid:B,nodeOrigin:E}=n(),b=Ci(A.sourceEvent,{transform:R,snapGrid:V,snapToGrid:B,containerBounds:v}),I=[];if(!p)return;let{x:P,y:L,width:z,height:F}=g,H={},Y=p.origin??E,{width:ne,height:U,x:te,y:re}=U2(y,s.controlDirection,b,s.boundaries,s.keepAspectRatio,Y,_,N),ee=ne!==z,$=U!==F,G=te!==P&&ee,O=re!==L&&$;if(!G&&!O&&!ee&&!$)return;let W={prevValues:{...g},startX:y.x,startY:y.y,childNodes:k.map(ie=>({...ie,position:{...ie.position}}))};if((G||O||Y[0]===1||Y[1]===1)&&(H.x=G?te:g.x,H.y=O?re:g.y,g.x=H.x,g.y=H.y,k.length>0)){let ie=te-P,se=re-L;for(let Te of k)Te.position={x:Te.position.x-ie+Y[0]*(ne-z),y:Te.position.y-se+Y[1]*(U-F)},I.push(Te)}if((ee||$)&&(H.width=ee&&(!s.resizeDirection||s.resizeDirection==="horizontal")?ne:g.width,H.height=$&&(!s.resizeDirection||s.resizeDirection==="vertical")?U:g.height,g.width=H.width,g.height=H.height),S&&p.expandParent){let ie=Y[0]*(H.width??0);H.x&&H.x<ie&&(g.x=ie,y.x=y.x-(H.x-ie));let se=Y[1]*(H.height??0);H.y&&H.y<se&&(g.y=se,y.y=y.y-(H.y-se))}let q=W2({width:g.width,prevWidth:z,height:g.height,prevHeight:F,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),Z={...g,direction:q};if(x?.(A,Z)===!1){g=W.prevValues,y.x=W.startX,y.y=W.startY,k.forEach((ie,se)=>{ie.position=W.childNodes[se].position});return}m?.(A,Z),r(H,I)}).on("end",A=>{w?.(A,{...g}),o?.({...g})});i.call(M)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var fy=Dt(hn(),1),hy=Dt(ly(),1);var uy={},ay=e=>{let t,n=new Set,r=(c,f)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(uy.env?uy.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,a);return a},cy=e=>e?ay(e):ay;var{useDebugValue:db}=fy.default,{useSyncExternalStoreWithSelector:fb}=hy.default,hb=e=>e;function Fd(e,t=hb,n){let r=fb(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return db(r),r}var dy=(e,t)=>{let n=cy(e),r=(o,i=t)=>Fd(n,o,i);return Object.assign(r,n),r},py=(e,t)=>e?dy(e,t):dy;function ye(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var pb=Dt(Mc()),Zl=(0,T.createContext)(null),gb=Zl.Provider,Fy=st.error001("react");function ue(e,t){let n=(0,T.useContext)(Zl);if(n===null)throw new Error(Fy);return Fd(n,e,t)}function ge(){let e=(0,T.useContext)(Zl);if(e===null)throw new Error(Fy);return(0,T.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var gy={display:"none"},mb={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Vy="react-flow__node-desc",jy="react-flow__edge-desc",yb="react-flow__aria-live",vb=e=>e.ariaLiveMessage,wb=e=>e.ariaLabelConfig;function xb({rfId:e}){let t=ue(vb);return(0,D.jsx)("div",{id:`${yb}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:mb,children:t})}function Eb({rfId:e,disableKeyboardA11y:t}){let n=ue(wb);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("div",{id:`${Vy}-${e}`,style:gy,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,D.jsx)("div",{id:`${jy}-${e}`,style:gy,children:n["edge.a11yDescription.default"]}),!t&&(0,D.jsx)(xb,{rfId:e})]})}var Ql=(0,T.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{let s=`${e}`.split("-");return(0,D.jsx)("div",{className:Se(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});Ql.displayName="Panel";var my="https://reactflow.dev?utm_source=attribution";function Sb({proOptions:e,position:t="bottom-right"}){return(0,T.useEffect)(()=>{},[]),e?.hideAttribution?null:(0,D.jsx)(Ql,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${my}`,children:(0,D.jsx)("a",{href:my,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var kb=e=>{let t=[],n=[];for(let[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(let[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},ql=e=>e.id;function _b(e,t){return ye(e.selectedNodes.map(ql),t.selectedNodes.map(ql))&&ye(e.selectedEdges.map(ql),t.selectedEdges.map(ql))}function Nb({onSelectionChange:e}){let t=ge(),{selectedNodes:n,selectedEdges:r}=ue(kb,_b);return(0,T.useEffect)(()=>{let o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}var Cb=e=>!!e.onSelectionChangeHandlers;function bb({onSelectionChange:e}){let t=ue(Cb);return e||t?(0,D.jsx)(Nb,{onSelectionChange:e}):null}var Wy=[0,0],Mb={x:0,y:0,zoom:1},Ib=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],yy=[...Ib,"rfId"],Pb=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),vy={translateExtent:co,nodeOrigin:Wy,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Ob(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=ue(Pb,ye),u=ge();(0,T.useEffect)(()=>(a(e.defaultNodes,e.defaultEdges),()=>{c.current=vy,l()}),[]);let c=(0,T.useRef)(vy);return(0,T.useEffect)(()=>{for(let f of yy){let d=e[f],h=c.current[f];d!==h&&(typeof e[f]>"u"||(f==="nodes"?t(d):f==="edges"?n(d):f==="minZoom"?r(d):f==="maxZoom"?o(d):f==="translateExtent"?i(d):f==="nodeExtent"?s(d):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:O0(d)}):f==="fitView"?u.setState({fitViewQueued:d}):f==="fitViewOptions"?u.setState({fitViewOptions:d}):u.setState({[f]:d})))}c.current=e},yy.map(f=>e[f])),null}function wy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Tb(e){let[t,n]=(0,T.useState)(e==="system"?null:e);return(0,T.useEffect)(()=>{if(e!=="system"){n(e);return}let r=wy(),o=()=>n(r?.matches?"dark":"light");return o(),r?.addEventListener("change",o),()=>{r?.removeEventListener("change",o)}},[e]),t!==null?t:wy()?.matches?"dark":"light"}var xy=typeof document<"u"?document:null;function Oi(e=null,t={target:xy,actInsideInputWithModifier:!0}){let[n,r]=(0,T.useState)(!1),o=(0,T.useRef)(!1),i=(0,T.useRef)(new Set([])),[s,l]=(0,T.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace(/\+/g,`
1377
1835
  `).replace(`
1378
1836
 
1379
1837
  `,`
1380
1838
  +`).split(`
1381
- `)),T=q.reduce((W,A)=>W.concat(...A),[]);return[q,T]}return[[],[]]},[u]);return I.useEffect(()=>{let J=f?.target??BJ,q=f?.actInsideInputWithModifier??!0;if(u!==null){let T=(K)=>{if(l.current=K.ctrlKey||K.metaKey||K.shiftKey||K.altKey,(!l.current||l.current&&!q)&&k$(K))return!1;let z=GJ(K.code,Q);if(U.current.add(K[z]),LJ(_,U.current,!1)){let Z=K.composedPath?.()?.[0]||K.target,B=Z?.nodeName==="BUTTON"||Z?.nodeName==="A";if(f.preventDefault!==!1&&(l.current||!B))K.preventDefault();F(!0)}},W=(K)=>{let L=GJ(K.code,Q);if(LJ(_,U.current,!0))F(!1),U.current.clear();else U.current.delete(K[L]);if(K.key==="Meta")U.current.clear();l.current=!1},A=()=>{U.current.clear(),F(!1)};return J?.addEventListener("keydown",T),J?.addEventListener("keyup",W),window.addEventListener("blur",A),window.addEventListener("contextmenu",A),()=>{J?.removeEventListener("keydown",T),J?.removeEventListener("keyup",W),window.removeEventListener("blur",A),window.removeEventListener("contextmenu",A)}}},[u,F]),$}function LJ(u,f,$){return u.filter((F)=>$||F.length===f.size).some((F)=>F.every((l)=>f.has(l)))}function GJ(u,f){return f.includes(u)?"code":"key"}var yZ=()=>{let u=Bu();return I.useMemo(()=>{return{zoomIn:async(f)=>{let{panZoom:$}=u.getState();return $?$.scaleBy(1.2,f):!1},zoomOut:async(f)=>{let{panZoom:$}=u.getState();return $?$.scaleBy(0.8333333333333334,f):!1},zoomTo:async(f,$)=>{let{panZoom:F}=u.getState();return F?F.scaleTo(f,$):!1},getZoom:()=>u.getState().transform[2],setViewport:async(f,$)=>{let{transform:[F,l,U],panZoom:_}=u.getState();if(!_)return!1;return await _.setViewport({x:f.x??F,y:f.y??l,zoom:f.zoom??U},$),!0},getViewport:()=>{let[f,$,F]=u.getState().transform;return{x:f,y:$,zoom:F}},setCenter:async(f,$,F)=>{return u.getState().setCenter(f,$,F)},fitBounds:async(f,$)=>{let{width:F,height:l,minZoom:U,maxZoom:_,panZoom:Q}=u.getState(),J=N3(f,F,l,U,_,$?.padding??0.1);if(!Q)return!1;return await Q.setViewport(J,{duration:$?.duration,ease:$?.ease,interpolate:$?.interpolate}),!0},screenToFlowPosition:(f,$={})=>{let{transform:F,snapGrid:l,snapToGrid:U,domNode:_}=u.getState();if(!_)return f;let{x:Q,y:J}=_.getBoundingClientRect(),q={x:f.x-Q,y:f.y-J},T=$.snapGrid??l,W=$.snapToGrid??U;return w4(q,F,W,T)},flowToScreenPosition:(f)=>{let{transform:$,domNode:F}=u.getState();if(!F)return f;let{x:l,y:U}=F.getBoundingClientRect(),_=G1(f,$);return{x:_.x+l,y:_.y+U}}}},[])};function xJ(u,f){let $=[],F=new Map,l=[];for(let U of u)if(U.type==="add"){l.push(U);continue}else if(U.type==="remove"||U.type==="replace")F.set(U.id,[U]);else{let _=F.get(U.id);if(_)_.push(U);else F.set(U.id,[U])}for(let U of f){let _=F.get(U.id);if(!_){$.push(U);continue}if(_[0].type==="remove")continue;if(_[0].type==="replace"){$.push({..._[0].item});continue}let Q={...U};for(let J of _)kZ(J,Q);$.push(Q)}if(l.length)l.forEach((U)=>{if(U.index!==void 0)$.splice(U.index,0,{...U.item});else $.push({...U.item})});return $}function kZ(u,f){switch(u.type){case"select":{f.selected=u.selected;break}case"position":{if(typeof u.position<"u")f.position=u.position;if(typeof u.dragging<"u")f.dragging=u.dragging;break}case"dimensions":{if(typeof u.dimensions<"u"){if(f.measured={...u.dimensions},u.setAttributes){if(u.setAttributes===!0||u.setAttributes==="width")f.width=u.dimensions.width;if(u.setAttributes===!0||u.setAttributes==="height")f.height=u.dimensions.height}}if(typeof u.resizing==="boolean")f.resizing=u.resizing;break}}}function cJ(u,f){return xJ(u,f)}function mJ(u,f){return xJ(u,f)}function z1(u,f){return{id:u,type:"select",selected:f}}function G4(u,f=new Set){let $=[];for(let[F,l]of u){let U=f.has(F);if(!(l.selected===void 0&&!U)&&l.selected!==U)$.push(z1(l.id,U))}return $}function HJ({items:u=[],lookup:f}){let $=[],F=new Map(u.map((l)=>[l.id,l]));for(let[l,U]of u.entries()){let _=f.get(U.id),Q=_?.internals?.userNode??_;if(Q!==void 0&&Q!==U)$.push({id:U.id,item:U,type:"replace"});if(Q===void 0)$.push({item:U,type:"add",index:l})}for(let[l]of f)if(F.get(l)===void 0)$.push({id:l,type:"remove"});return $}function zJ(u){return{id:u.id,type:"remove"}}var PZ=O$("React Flow","https://reactflow.dev/");function rZ(u,f,$={}){return jQ(u,f,{...$,onError:$.onError??PZ})}var ZJ=(u)=>zQ(u),CZ=(u)=>R$(u);function pJ(u){return I.forwardRef(u)}var bJ=typeof window<"u"?I.useLayoutEffect:I.useEffect;function YJ(u){let[f,$]=I.useState(BigInt(0)),[F]=I.useState(()=>hZ(()=>$((l)=>l+BigInt(1))));return bJ(()=>{let l=F.get();if(l.length)u(l),F.reset()},[f]),F}function hZ(u){let f=[];return{get:()=>f,reset:()=>{f=[]},push:($)=>{f.push($),u()}}}var iJ=I.createContext(null);function vZ({children:u}){let f=Bu(),$=I.useCallback((Q)=>{let{nodes:J=[],setNodes:q,hasDefaultNodes:T,onNodesChange:W,nodeLookup:A,fitViewQueued:K,onNodesChangeMiddlewareMap:L}=f.getState(),z=J;for(let B of Q)z=typeof B==="function"?B(z):B;let Z=HJ({items:z,lookup:A});for(let B of L.values())Z=B(Z);if(T)q(z);if(Z.length>0)W?.(Z);else if(K)window.requestAnimationFrame(()=>{let{fitViewQueued:B,nodes:G,setNodes:w}=f.getState();if(B)w(G)})},[]),F=YJ($),l=I.useCallback((Q)=>{let{edges:J=[],setEdges:q,hasDefaultEdges:T,onEdgesChange:W,edgeLookup:A}=f.getState(),K=J;for(let L of Q)K=typeof L==="function"?L(K):L;if(T)q(K);else if(W)W(HJ({items:K,lookup:A}))},[]),U=YJ(l),_=I.useMemo(()=>({nodeQueue:F,edgeQueue:U}),[]);return y.jsx(iJ.Provider,{value:_,children:u})}function xZ(){let u=I.useContext(iJ);if(!u)throw Error("useBatchContext must be used within a BatchProvider");return u}var cZ=(u)=>!!u.panZoom;function k3(){let u=yZ(),f=Bu(),$=xZ(),F=qu(cZ),l=I.useMemo(()=>{let U=(W)=>f.getState().nodeLookup.get(W),_=(W)=>{$.nodeQueue.push(W)},Q=(W)=>{$.edgeQueue.push(W)},J=(W)=>{let{nodeLookup:A,nodeOrigin:K}=f.getState(),L=ZJ(W)?W:A.get(W.id),z=L.parentId?j$(L.position,L.measured,L.parentId,A,K):L.position,Z={...L,position:z,width:L.measured?.width??L.width,height:L.measured?.height??L.height};return W4(Z,L.parentId?void 0:K)},q=(W,A,K={replace:!1})=>{_((L)=>L.map((z)=>{if(z.id===W){let Z=typeof A==="function"?A(z):A;return K.replace&&ZJ(Z)?Z:{...z,...Z}}return z}))},T=(W,A,K={replace:!1})=>{Q((L)=>L.map((z)=>{if(z.id===W){let Z=typeof A==="function"?A(z):A;return K.replace&&CZ(Z)?Z:{...z,...Z}}return z}))};return{getNodes:()=>f.getState().nodes.map((W)=>({...W})),getNode:(W)=>U(W)?.internals.userNode,getInternalNode:U,getEdges:()=>{let{edges:W=[]}=f.getState();return W.map((A)=>({...A}))},getEdge:(W)=>f.getState().edgeLookup.get(W),setNodes:_,setEdges:Q,addNodes:(W)=>{let A=Array.isArray(W)?W:[W];$.nodeQueue.push((K)=>[...K,...A])},addEdges:(W)=>{let A=Array.isArray(W)?W:[W];$.edgeQueue.push((K)=>[...K,...A])},toObject:()=>{let{nodes:W=[],edges:A=[],transform:K}=f.getState(),[L,z,Z]=K;return{nodes:W.map((B)=>({...B})),edges:A.map((B)=>({...B})),viewport:{x:L,y:z,zoom:Z}}},deleteElements:async({nodes:W=[],edges:A=[]})=>{let{nodes:K,edges:L,onNodesDelete:z,onEdgesDelete:Z,triggerNodeChanges:B,triggerEdgeChanges:G,onDelete:w,onBeforeDelete:H}=f.getState(),{nodes:M,edges:R}=await RQ({nodesToRemove:W,edgesToRemove:A,nodes:K,edges:L,onBeforeDelete:H}),E=R.length>0,V=M.length>0;if(E){let D=R.map(zJ);Z?.(R),G(D)}if(V){let D=M.map(zJ);z?.(M),B(D)}if(V||E)w?.({nodes:M,edges:R});return{deletedNodes:M,deletedEdges:R}},getIntersectingNodes:(W,A=!0,K)=>{let L=D$(W),z=L?W:J(W),Z=K!==void 0;if(!z)return[];let{nodeOrigin:B}=f.getState();return(K||f.getState().nodes).filter((G)=>{let w=f.getState().nodeLookup.get(G.id);if(w&&!L&&(G.id===W.id||!w.internals.positionAbsolute))return!1;let H=W4(Z?G:w,B),M=j3(H,z);return A&&M>0||M>=H.width*H.height||M>=z.width*z.height})},isNodeIntersecting:(W,A,K=!0)=>{let z=D$(W)?W:J(W);if(!z)return!1;let Z=j3(z,A);return K&&Z>0||Z>=A.width*A.height||Z>=z.width*z.height},updateNode:q,updateNodeData:(W,A,K={replace:!1})=>{q(W,(L)=>{let z=typeof A==="function"?A(L):A;return K.replace?{...L,data:z}:{...L,data:{...L.data,...z}}},K)},updateEdge:T,updateEdgeData:(W,A,K={replace:!1})=>{T(W,(L)=>{let z=typeof A==="function"?A(L):A;return K.replace?{...L,data:z}:{...L,data:{...L.data,...z}}},K)},getNodesBounds:(W)=>{let{nodeLookup:A,nodeOrigin:K}=f.getState();return E$(W,{nodeLookup:A,nodeOrigin:K})},getHandleConnections:({type:W,id:A,nodeId:K})=>Array.from(f.getState().connectionLookup.get(`${K}-${W}${A?`-${A}`:""}`)?.values()??[]),getNodeConnections:({type:W,handleId:A,nodeId:K})=>Array.from(f.getState().connectionLookup.get(`${K}${W?A?`-${W}-${A}`:`-${W}`:""}`)?.values()??[]),fitView:async(W)=>{let A=f.getState().fitViewResolver??VQ();return f.setState({fitViewQueued:!0,fitViewOptions:W,fitViewResolver:A}),$.nodeQueue.push((K)=>[...K]),A.promise}}},[]);return I.useMemo(()=>{return{...l,...u,viewportInitialized:F}},[F])}var RJ=(u)=>u.selected,mZ=typeof window<"u"?window:void 0;function pZ({deleteKeyCode:u,multiSelectionKeyCode:f}){let $=Bu(),{deleteElements:F}=k3(),l=y3(u,{actInsideInputWithModifier:!1}),U=y3(f,{target:mZ});I.useEffect(()=>{if(l){let{edges:_,nodes:Q}=$.getState();F({nodes:Q.filter(RJ),edges:_.filter(RJ)}),$.setState({nodesSelectionActive:!1})}},[l]),I.useEffect(()=>{$.setState({multiSelectionActive:U})},[U])}function bZ(u){let f=Bu();I.useEffect(()=>{let $=()=>{if(!u.current||!(u.current.checkVisibility?.()??!0))return!1;let F=C6(u.current);if(F.height===0||F.width===0)f.getState().onError?.("004",Uf.error004());f.setState({width:F.width||500,height:F.height||500})};if(u.current){$(),window.addEventListener("resize",$);let F=new ResizeObserver(()=>$());return F.observe(u.current),()=>{window.removeEventListener("resize",$),F.disconnect()}}},[])}var o6={position:"absolute",width:"100%",height:"100%",top:0,left:0},iZ=(u)=>({userSelectionActive:u.userSelectionActive,lib:u.lib,connectionInProgress:u.connection.inProgress});function gZ({onPaneContextMenu:u,zoomOnScroll:f=!0,zoomOnPinch:$=!0,panOnScroll:F=!1,panActivationKeyPressed:l,panOnScrollSpeed:U=0.5,panOnScrollMode:_=T0.Free,zoomOnDoubleClick:Q=!0,panOnDrag:J=!0,defaultViewport:q,translateExtent:T,minZoom:W,maxZoom:A,zoomActivationKeyCode:K,preventScrolling:L=!0,children:z,noWheelClassName:Z,noPanClassName:B,onViewportChange:G,isControlledViewport:w,paneClickDistance:H,selectionOnDrag:M}){let R=Bu(),E=I.useRef(null),{userSelectionActive:V,lib:D,connectionInProgress:r}=qu(iZ,Gu),C=y3(K),m=I.useRef();bZ(E);let v=I.useCallback((Y)=>{if(G?.({x:Y[0],y:Y[1],zoom:Y[2]}),!w)R.setState({transform:Y})},[G,w]);return I.useEffect(()=>{if(E.current){m.current=sQ({domNode:E.current,minZoom:W,maxZoom:A,translateExtent:T,viewport:q,onDraggingChange:(j)=>R.setState((k)=>k.paneDragging===j?k:{paneDragging:j}),onPanZoomStart:(j,k)=>{let{onViewportChangeStart:P,onMoveStart:c}=R.getState();c?.(j,k),P?.(k)},onPanZoom:(j,k)=>{let{onViewportChange:P,onMove:c}=R.getState();c?.(j,k),P?.(k)},onPanZoomEnd:(j,k)=>{let{onViewportChangeEnd:P,onMoveEnd:c}=R.getState();c?.(j,k),P?.(k)}});let{x:Y,y:X,zoom:O}=m.current.getViewport();return R.setState({panZoom:m.current,transform:[Y,X,O],domNode:E.current.closest(".react-flow")}),()=>{m.current?.destroy()}}},[]),I.useEffect(()=>{m.current?.update({onPaneContextMenu:u,zoomOnScroll:f,zoomOnPinch:$,panOnScroll:F,panActivationKeyPressed:l,panOnScrollSpeed:U,panOnScrollMode:_,zoomOnDoubleClick:Q,panOnDrag:J,zoomActivationKeyPressed:C,preventScrolling:L,noPanClassName:B,userSelectionActive:V,noWheelClassName:Z,lib:D,onTransformChange:v,connectionInProgress:r,selectionOnDrag:M,paneClickDistance:H})},[u,f,$,F,l,U,_,Q,J,C,L,B,V,Z,D,v,r,M,H]),y.jsx("div",{className:"react-flow__renderer",ref:E,style:o6,children:z})}var sZ=(u)=>({userSelectionActive:u.userSelectionActive,userSelectionRect:u.userSelectionRect});function tZ(){let{userSelectionActive:u,userSelectionRect:f}=qu(sZ,Gu);if(!(u&&f))return null;return y.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:f.width,height:f.height,transform:`translate(${f.x}px, ${f.y}px)`}})}var b$=(u,f)=>{return($)=>{if($.target!==f.current)return;u?.($)}},nZ=(u)=>({userSelectionActive:u.userSelectionActive,elementsSelectable:u.elementsSelectable,dragging:u.paneDragging,panBy:u.panBy,autoPanSpeed:u.autoPanSpeed});function dZ({isSelecting:u,selectionKeyPressed:f,selectionMode:$=B1.Full,panOnDrag:F,autoPanOnSelection:l,paneClickDistance:U,selectionOnDrag:_,onSelectionStart:Q,onSelectionEnd:J,onPaneClick:q,onPaneContextMenu:T,onPaneScroll:W,onPaneMouseEnter:A,onPaneMouseMove:K,onPaneMouseLeave:L,children:z}){let Z=I.useRef(0),B=Bu(),{userSelectionActive:G,elementsSelectable:w,dragging:H,panBy:M,autoPanSpeed:R}=qu(nZ,Gu),E=w&&(u||G),V=I.useRef(null),D=I.useRef(),r=I.useRef(new Set),C=I.useRef(new Set),m=I.useRef(!1),v=I.useRef(!1),Y=I.useRef({x:0,y:0}),X=I.useRef(!1),O=(h)=>{if(v.current||m.current||B.getState().connection.inProgress){v.current=!1,m.current=!1;return}let{connectionClickStartHandle:n,connection:N,onClickConnectEnd:b,resetSelectedElements:s}=B.getState();if(n){let d=structuredClone(N);delete d.inProgress,d.toPosition=d.toHandle?d.toHandle.position:null,b?.(h.nativeEvent,d),B.setState({connectionClickStartHandle:null})}q?.(h),s(),B.setState({nodesSelectionActive:!1})},j=(h)=>{if(Array.isArray(F)&&F?.includes(2)){h.preventDefault();return}T?.(h)},k=W?(h)=>W(h):void 0,P=(h)=>{if(v.current)h.stopPropagation(),v.current=!1},c=(h)=>{if(h.pointerType==="touch"&&F!==!1&&!f)return;let{domNode:n,transform:N}=B.getState();if(D.current=n?.getBoundingClientRect(),!D.current)return;let b=h.target===V.current;if(!b&&!!h.target.closest(".nokey")||!u||!(_&&b||f)||h.button!==0||!h.isPrimary)return;h.target?.setPointerCapture?.(h.pointerId),v.current=!1;let{x:e,y:lu}=wf(h.nativeEvent,D.current),Uu=w4({x:e,y:lu},N);if(B.setState({userSelectionRect:{width:0,height:0,startX:Uu.x,startY:Uu.y,x:e,y:lu}}),!b)h.stopPropagation(),h.preventDefault()};function x(h,n){let{userSelectionRect:N}=B.getState();if(!N)return;let{transform:b,nodeLookup:s,edgeLookup:d,connectionLookup:e,triggerNodeChanges:lu,triggerEdgeChanges:Uu,defaultEdgeOptions:Nu}=B.getState(),bf={x:N.startX,y:N.startY},{x:jf,y:Nf}=G1(bf,b),gf={startX:bf.x,startY:bf.y,x:h<jf?h:jf,y:n<Nf?n:Nf,width:Math.abs(h-jf),height:Math.abs(n-Nf)},H4=r.current,m0=C.current;r.current=new Set(y6(s,gf,b,$===B1.Partial,!0).map((Hf)=>Hf.id)),C.current=new Set;let p0=Nu?.selectable??!0;for(let Hf of r.current){let sf=e.get(Hf);if(!sf)continue;for(let{edgeId:tf}of sf.values()){let b0=d.get(tf);if(b0&&(b0.selectable??p0))C.current.add(tf)}}if(!N$(H4,r.current)){let Hf=G4(s,r.current);lu(Hf)}if(!N$(m0,C.current)){let Hf=G4(d,C.current);Uu(Hf)}B.setState({userSelectionRect:gf,userSelectionActive:!0,nodesSelectionActive:!1})}function g(){if(!l||!D.current)return;let[h,n]=k6(Y.current,D.current,R);M({x:h,y:n}).then((N)=>{if(!v.current||!N){Z.current=requestAnimationFrame(g);return}let{x:b,y:s}=Y.current;x(b,s),Z.current=requestAnimationFrame(g)})}let $u=()=>{cancelAnimationFrame(Z.current),Z.current=0,X.current=!1};I.useEffect(()=>{return()=>$u()},[]);let i=(h)=>{let{userSelectionRect:n,transform:N,resetSelectedElements:b}=B.getState();if(!D.current||!n)return;let{x:s,y:d}=wf(h.nativeEvent,D.current);Y.current={x:s,y:d};let e=G1({x:n.startX,y:n.startY},N);if(!v.current){let lu=f?0:U;if(Math.hypot(s-e.x,d-e.y)<=lu)return;b(),Q?.(h)}if(v.current=!0,!X.current)g(),X.current=!0;x(s,d)},fu=(h)=>{if(!E){if(h.target===V.current&&B.getState().connection.inProgress)m.current=!0;return}if(h.button!==0)return;if(h.target?.releasePointerCapture?.(h.pointerId),!G&&h.target===V.current&&B.getState().userSelectionRect)O?.(h);if(B.setState({userSelectionActive:!1,userSelectionRect:null}),v.current)J?.(h),B.setState({nodesSelectionActive:r.current.size>0});$u()},Fu=(h)=>{h.target?.releasePointerCapture?.(h.pointerId),$u()},uu=F===!0||Array.isArray(F)&&F.includes(0);return y.jsxs("div",{className:Ru(["react-flow__pane",{draggable:uu,dragging:H,selection:u}]),onClick:E?void 0:b$(O,V),onContextMenu:b$(j,V),onWheel:b$(k,V),onPointerEnter:E?void 0:A,onPointerMove:E?i:K,onPointerUp:fu,onPointerCancel:E?Fu:void 0,onPointerDownCapture:E?c:void 0,onClickCapture:E?P:void 0,onPointerLeave:L,ref:V,style:o6,children:[z,y.jsx(tZ,{})]})}function g$({id:u,store:f,unselect:$=!1,nodeRef:F}){let{addSelectedNodes:l,unselectNodesAndEdges:U,multiSelectionActive:_,nodeLookup:Q,onError:J}=f.getState(),q=Q.get(u);if(!q){J?.("012",Uf.error012(u));return}if(f.setState({nodesSelectionActive:!1}),!q.selected)l([u]);else if($||q.selected&&_)U({nodes:[q],edges:[]}),requestAnimationFrame(()=>F?.current?.blur())}function gJ({nodeRef:u,disabled:f=!1,noDragClassName:$,handleSelector:F,nodeId:l,isSelectable:U,nodeClickDistance:_}){let Q=Bu(),[J,q]=I.useState(!1),T=I.useRef();return I.useEffect(()=>{if(f)return;return T.current=vQ({getStoreItems:()=>Q.getState(),onNodeMouseDown:(W)=>{g$({id:W,store:Q,nodeRef:u})},onDragStart:()=>{q(!0)},onDragStop:()=>{q(!1)}}),()=>{T.current?.destroy(),T.current=void 0}},[f,Q,u]),I.useEffect(()=>{if(f||!u.current||!T.current)return;T.current.update({noDragClassName:$,handleSelector:F,domNode:u.current,isSelectable:U,nodeId:l,nodeClickDistance:_})},[$,F,f,U,u,l,_]),J}var aZ=(u)=>(f)=>f.selected&&(f.draggable||u&&typeof f.draggable>"u");function sJ(){let u=Bu();return I.useCallback(($)=>{let{nodeExtent:F,snapToGrid:l,snapGrid:U,nodesDraggable:_,onError:Q,updateNodePositions:J,nodeLookup:q,nodeOrigin:T}=u.getState(),W=new Map,A=aZ(_),K=l?U[0]:5,L=l?U[1]:5,z=$.direction.x*K*$.factor,Z=$.direction.y*L*$.factor;for(let[,B]of q){if(!A(B))continue;let G={x:B.internals.positionAbsolute.x+z,y:B.internals.positionAbsolute.y+Z};if(l)G=K4(G,U);let{position:w,positionAbsolute:H}=V$({nodeId:B.id,nextPosition:G,nodeLookup:q,nodeExtent:F,nodeOrigin:T,onError:Q});B.position=w,B.internals.positionAbsolute=H,W.set(B.id,B)}J(W)},[])}var s$=I.createContext(null),oZ=s$.Provider;s$.Consumer;var tJ=()=>{return I.useContext(s$)},eZ=(u)=>({connectOnClick:u.connectOnClick,noPanClassName:u.noPanClassName,rfId:u.rfId}),nJ=I.createContext(null);function uY({children:u}){let f=qu(eZ,Gu);return y.jsx(nJ.Provider,{value:f,children:u})}function fY(){let u=I.useContext(nJ);if(!u)throw Error("useHandleConfig must be used within a HandleConfigProvider");return u}var $Y={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},FY=(u,f,$)=>(F)=>{let{connectionClickStartHandle:l,connectionMode:U,connection:_}=F,{fromHandle:Q,toHandle:J,isValid:q}=_;if(!Q&&!l)return $Y;let T=J?.nodeId===u&&J?.id===f&&J?.type===$;return{connectingFrom:Q?.nodeId===u&&Q?.id===f&&Q?.type===$,connectingTo:T,clickConnecting:l?.nodeId===u&&l?.id===f&&l?.type===$,isPossibleEndHandle:U===h0.Strict?Q?.type!==$:u!==Q?.nodeId||f!==Q?.id,connectionInProcess:!!Q,clickConnectionInProcess:!!l,valid:T&&q}};function lY({type:u="source",position:f=a.Top,isValidConnection:$,isConnectable:F=!0,isConnectableStart:l=!0,isConnectableEnd:U=!0,id:_,onConnect:Q,children:J,className:q,onMouseDown:T,onTouchStart:W,...A},K){let L=_||null,z=u==="target",Z=Bu(),B=tJ(),{connectOnClick:G,noPanClassName:w,rfId:H}=fY(),{connectingFrom:M,connectingTo:R,clickConnecting:E,isPossibleEndHandle:V,connectionInProcess:D,clickConnectionInProcess:r,valid:C}=qu(FY(B,L,u),Gu);if(!B)Z.getState().onError?.("010",Uf.error010());let m=(X)=>{let{defaultEdgeOptions:O,onConnect:j,hasDefaultEdges:k}=Z.getState(),P={...O,...X};if(k){let{edges:c,setEdges:x,onError:g}=Z.getState();x(rZ(P,c,{onError:g}))}j?.(P),Q?.(P)},v=(X)=>{if(!B)return;let O=P$(X.nativeEvent);if(l&&(O&&X.button===0||!O)){let j=Z.getState();b6.onPointerDown(X.nativeEvent,{handleDomNode:X.currentTarget,autoPanOnConnect:j.autoPanOnConnect,connectionMode:j.connectionMode,connectionRadius:j.connectionRadius,domNode:j.domNode,nodeLookup:j.nodeLookup,lib:j.lib,isTarget:z,handleId:L,nodeId:B,flowId:j.rfId,panBy:j.panBy,cancelConnection:j.cancelConnection,onConnectStart:j.onConnectStart,onConnectEnd:(...k)=>Z.getState().onConnectEnd?.(...k),updateConnection:j.updateConnection,onConnect:m,isValidConnection:$||((...k)=>Z.getState().isValidConnection?.(...k)??!0),getTransform:()=>Z.getState().transform,getFromHandle:()=>Z.getState().connection.fromHandle,autoPanSpeed:j.autoPanSpeed,dragThreshold:j.connectionDragThreshold})}if(O)T?.(X);else W?.(X)},Y=(X)=>{let{onClickConnectStart:O,onClickConnectEnd:j,connectionClickStartHandle:k,connectionMode:P,isValidConnection:c,lib:x,rfId:g,nodeLookup:$u,connection:i}=Z.getState();if(!B||!k&&!l)return;if(!k){O?.(X.nativeEvent,{nodeId:B,handleId:L,handleType:u}),Z.setState({connectionClickStartHandle:{nodeId:B,type:u,id:L}});return}let fu=y$(X.target),Fu=$||c,{connection:uu,isValid:h}=b6.isValid(X.nativeEvent,{handle:{nodeId:B,id:L,type:u},connectionMode:P,fromNodeId:k.nodeId,fromHandleId:k.id||null,fromType:k.type,isValidConnection:Fu,flowId:g,doc:fu,lib:x,nodeLookup:$u});if(h&&uu)m(uu);let n=structuredClone(i);delete n.inProgress,n.toPosition=n.toHandle?n.toHandle.position:null,j?.(X,n),Z.setState({connectionClickStartHandle:null})};return y.jsx("div",{"data-handleid":L,"data-nodeid":B,"data-handlepos":f,"data-id":`${H}-${B}-${L}-${u}`,className:Ru(["react-flow__handle",`react-flow__handle-${f}`,"nodrag",w,q,{source:!z,target:z,connectable:F,connectablestart:l,connectableend:U,clickconnecting:E,connectingfrom:M,connectingto:R,valid:C,connectionindicator:F&&(!D||V)&&(D||r?U:l)}]),onMouseDown:v,onTouchStart:v,onClick:G?Y:void 0,ref:K,...A,children:J})}var Z1=I.memo(pJ(lY));function UY({data:u,isConnectable:f,sourcePosition:$=a.Bottom}){return y.jsxs(y.Fragment,{children:[u?.label,y.jsx(Z1,{type:"source",position:$,isConnectable:f})]})}function _Y({data:u,isConnectable:f,targetPosition:$=a.Top,sourcePosition:F=a.Bottom}){return y.jsxs(y.Fragment,{children:[y.jsx(Z1,{type:"target",position:$,isConnectable:f}),u?.label,y.jsx(Z1,{type:"source",position:F,isConnectable:f})]})}function QY(){return null}function JY({data:u,isConnectable:f,targetPosition:$=a.Top}){return y.jsxs(y.Fragment,{children:[y.jsx(Z1,{type:"target",position:$,isConnectable:f}),u?.label]})}var n6={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},MJ={input:UY,default:_Y,output:JY,group:QY};function qY(u){if(u.internals.handleBounds===void 0)return{width:u.width??u.initialWidth??u.style?.width,height:u.height??u.initialHeight??u.style?.height};return{width:u.width??u.style?.width,height:u.height??u.style?.height}}var TY=(u)=>{let{width:f,height:$,x:F,y:l}=A4(u.nodeLookup,{filter:(U)=>!!U.selected});return{width:Kf(f)?f:null,height:Kf($)?$:null,userSelectionActive:u.userSelectionActive,transformString:`translate(${u.transform[0]}px,${u.transform[1]}px) scale(${u.transform[2]}) translate(${F}px,${l}px)`}};function AY({onSelectionContextMenu:u,noPanClassName:f,disableKeyboardA11y:$}){let F=Bu(),{width:l,height:U,transformString:_,userSelectionActive:Q}=qu(TY,Gu),J=sJ(),q=I.useRef(null);I.useEffect(()=>{if(!$)q.current?.focus({preventScroll:!0})},[$]);let T=!Q&&l!==null&&U!==null;if(gJ({nodeRef:q,disabled:!T}),!T)return null;let W=u?(K)=>{let L=F.getState().nodes.filter((z)=>z.selected);u(K,L)}:void 0,A=(K)=>{if(Object.prototype.hasOwnProperty.call(n6,K.key))K.preventDefault(),J({direction:n6[K.key],factor:K.shiftKey?4:1})};return y.jsx("div",{className:Ru(["react-flow__nodesselection","react-flow__container",f]),style:{transform:_},children:y.jsx("div",{ref:q,className:"react-flow__nodesselection-rect",onContextMenu:W,tabIndex:$?void 0:-1,onKeyDown:$?void 0:A,style:{width:l,height:U}})})}var EJ=typeof window<"u"?window:void 0,WY=(u)=>{return{nodesSelectionActive:u.nodesSelectionActive,userSelectionActive:u.userSelectionActive}};function dJ({children:u,onPaneClick:f,onPaneMouseEnter:$,onPaneMouseMove:F,onPaneMouseLeave:l,onPaneContextMenu:U,onPaneScroll:_,paneClickDistance:Q,deleteKeyCode:J,selectionKeyCode:q,selectionOnDrag:T,selectionMode:W,onSelectionStart:A,onSelectionEnd:K,multiSelectionKeyCode:L,panActivationKeyCode:z,zoomActivationKeyCode:Z,elementsSelectable:B,zoomOnScroll:G,zoomOnPinch:w,panOnScroll:H,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:E,panOnDrag:V,autoPanOnSelection:D,defaultViewport:r,translateExtent:C,minZoom:m,maxZoom:v,preventScrolling:Y,onSelectionContextMenu:X,noWheelClassName:O,noPanClassName:j,disableKeyboardA11y:k,onViewportChange:P,isControlledViewport:c}){let{nodesSelectionActive:x,userSelectionActive:g}=qu(WY,Gu),$u=y3(q,{target:EJ}),i=y3(z,{target:EJ}),fu=i||V,Fu=i||H,uu=T&&fu!==!0,h=$u||g||uu;return pZ({deleteKeyCode:J,multiSelectionKeyCode:L}),y.jsx(gZ,{onPaneContextMenu:U,elementsSelectable:B,zoomOnScroll:G,zoomOnPinch:w,panOnScroll:Fu,panActivationKeyPressed:i,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:E,panOnDrag:!$u&&fu,defaultViewport:r,translateExtent:C,minZoom:m,maxZoom:v,zoomActivationKeyCode:Z,preventScrolling:Y,noWheelClassName:O,noPanClassName:j,onViewportChange:P,isControlledViewport:c,paneClickDistance:Q,selectionOnDrag:uu,children:y.jsxs(dZ,{onSelectionStart:A,onSelectionEnd:K,onPaneClick:f,onPaneMouseEnter:$,onPaneMouseMove:F,onPaneMouseLeave:l,onPaneContextMenu:U,onPaneScroll:_,panOnDrag:fu,autoPanOnSelection:D,isSelecting:!!h,selectionMode:W,selectionKeyPressed:$u,paneClickDistance:Q,selectionOnDrag:uu,children:[u,x&&y.jsx(AY,{onSelectionContextMenu:X,noPanClassName:j,disableKeyboardA11y:k})]})})}dJ.displayName="FlowRenderer";var KY=I.memo(dJ),wY=(u)=>(f)=>{return u?y6(f.nodeLookup,{x:0,y:0,width:f.width,height:f.height},f.transform,!0).map(($)=>$.id):Array.from(f.nodeLookup.keys())};function BY(u){return qu(I.useCallback(wY(u),[u]),Gu)}var LY=(u)=>u.updateNodeInternals;function GY(){let u=qu(LY),[f]=I.useState(()=>{if(typeof ResizeObserver>"u")return null;return new ResizeObserver(($)=>{let F=new Map;$.forEach((l)=>{let U=l.target.getAttribute("data-id");F.set(U,{id:U,nodeElement:l.target,force:!0})}),u(F)})});return I.useEffect(()=>{return()=>{f?.disconnect()}},[f]),f}function HY({node:u,nodeType:f,hasDimensions:$,resizeObserver:F}){let l=Bu(),U=I.useRef(null),_=I.useRef(null),Q=I.useRef(u.sourcePosition),J=I.useRef(u.targetPosition),q=I.useRef(f),T=$&&!!u.internals.handleBounds;return I.useEffect(()=>{if(U.current&&!u.hidden&&(!T||_.current!==U.current)){if(_.current)F?.unobserve(_.current);F?.observe(U.current),_.current=U.current}},[T,u.hidden]),I.useEffect(()=>{return()=>{if(_.current)F?.unobserve(_.current),_.current=null}},[]),I.useEffect(()=>{if(U.current){let W=q.current!==f,A=Q.current!==u.sourcePosition,K=J.current!==u.targetPosition;if(W||A||K)q.current=f,Q.current=u.sourcePosition,J.current=u.targetPosition,l.getState().updateNodeInternals(new Map([[u.id,{id:u.id,nodeElement:U.current,force:!0}]]))}},[u.id,f,u.sourcePosition,u.targetPosition]),U}function zY({id:u,onClick:f,onMouseEnter:$,onMouseMove:F,onMouseLeave:l,onContextMenu:U,onDoubleClick:_,nodesDraggable:Q,elementsSelectable:J,nodesConnectable:q,nodesFocusable:T,resizeObserver:W,noDragClassName:A,noPanClassName:K,disableKeyboardA11y:L,rfId:z,nodeTypes:Z,nodeClickDistance:B,onError:G}){let{node:w,internals:H,isParent:M}=qu((h)=>{let n=h.nodeLookup.get(u),N=h.parentLookup.has(u);return{node:n,internals:n.internals,isParent:N}},Gu),R=w.type||"default",E=Z?.[R]||MJ[R];if(E===void 0)G?.("003",Uf.error003(R)),R="default",E=Z?.default||MJ.default;let V=!!(w.draggable||Q&&typeof w.draggable>"u"),D=!!(w.selectable||J&&typeof w.selectable>"u"),r=!!(w.connectable||q&&typeof w.connectable>"u"),C=!!(w.focusable||T&&typeof w.focusable>"u"),m=Bu(),v=S$(w),Y=HY({node:w,nodeType:R,hasDimensions:v,resizeObserver:W}),X=gJ({nodeRef:Y,disabled:w.hidden||!V,noDragClassName:A,handleSelector:w.dragHandle,nodeId:u,isSelectable:D,nodeClickDistance:B}),O=sJ();if(w.hidden)return null;let j=Bf(w),k=qY(w),P=D||V||f||$||F||l,c=$?(h)=>$(h,{...H.userNode}):void 0,x=F?(h)=>F(h,{...H.userNode}):void 0,g=l?(h)=>l(h,{...H.userNode}):void 0,$u=U?(h)=>U(h,{...H.userNode}):void 0,i=_?(h)=>_(h,{...H.userNode}):void 0,fu=(h)=>{let{selectNodesOnDrag:n,nodeDragThreshold:N}=m.getState();if(D&&(!n||!V||N>0))g$({id:u,store:m,nodeRef:Y});if(f)f(h,{...H.userNode})},Fu=(h)=>{if(k$(h.nativeEvent)||L)return;if(z$.includes(h.key)&&D){let n=h.key==="Escape";g$({id:u,store:m,unselect:n,nodeRef:Y})}else if(V&&w.selected&&Object.prototype.hasOwnProperty.call(n6,h.key)){h.preventDefault();let{ariaLabelConfig:n}=m.getState();m.setState({ariaLiveMessage:n["node.a11yDescription.ariaLiveMessage"]({direction:h.key.replace("Arrow","").toLowerCase(),x:~~H.positionAbsolute.x,y:~~H.positionAbsolute.y})}),O({direction:n6[h.key],factor:h.shiftKey?4:1})}},uu=()=>{if(L||!Y.current?.matches(":focus-visible"))return;let{transform:h,width:n,height:N,autoPanOnNodeFocus:b,setCenter:s}=m.getState();if(!b)return;if(!(y6(new Map([[u,w]]),{x:0,y:0,width:n,height:N},h,!0).length>0))s(w.position.x+j.width/2,w.position.y+j.height/2,{zoom:h[2]})};return y.jsx("div",{className:Ru(["react-flow__node",`react-flow__node-${R}`,{[K]:V},w.className,{selected:w.selected,selectable:D,parent:M,draggable:V,dragging:X}]),ref:Y,style:{zIndex:H.z,transform:`translate(${H.positionAbsolute.x}px,${H.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:v?"visible":"hidden",...w.style,...k},"data-id":u,"data-testid":`rf__node-${u}`,onMouseEnter:c,onMouseMove:x,onMouseLeave:g,onContextMenu:$u,onClick:fu,onDoubleClick:i,onKeyDown:C?Fu:void 0,tabIndex:C?0:void 0,onFocus:C?uu:void 0,role:w.ariaRole??(C?"group":void 0),"aria-roledescription":"node","aria-describedby":L?void 0:`${CJ}-${z}`,"aria-label":w.ariaLabel,...w.domAttributes,children:y.jsx(oZ,{value:u,children:y.jsx(E,{id:u,data:w.data,type:R,positionAbsoluteX:H.positionAbsolute.x,positionAbsoluteY:H.positionAbsolute.y,selected:w.selected??!1,selectable:D,draggable:V,deletable:w.deletable??!0,isConnectable:r,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:X,dragHandle:w.dragHandle,zIndex:H.z,parentId:w.parentId,...j})})})}var ZY=I.memo(zY),YY=(u)=>({nodesConnectable:u.nodesConnectable,nodesFocusable:u.nodesFocusable,elementsSelectable:u.elementsSelectable,onError:u.onError});function aJ(u){let{nodesConnectable:f,nodesFocusable:$,elementsSelectable:F,onError:l}=qu(YY,Gu),U=BY(u.onlyRenderVisibleElements),_=GY();return y.jsx("div",{className:"react-flow__nodes",style:o6,children:U.map((Q)=>{return y.jsx(ZY,{id:Q,nodeTypes:u.nodeTypes,nodeExtent:u.nodeExtent,onClick:u.onNodeClick,onMouseEnter:u.onNodeMouseEnter,onMouseMove:u.onNodeMouseMove,onMouseLeave:u.onNodeMouseLeave,onContextMenu:u.onNodeContextMenu,onDoubleClick:u.onNodeDoubleClick,noDragClassName:u.noDragClassName,noPanClassName:u.noPanClassName,rfId:u.rfId,disableKeyboardA11y:u.disableKeyboardA11y,resizeObserver:_,nodesDraggable:u.nodesDraggable??!0,nodesConnectable:f,nodesFocusable:$,elementsSelectable:F,nodeClickDistance:u.nodeClickDistance,onError:l},Q)})})}aJ.displayName="NodeRenderer";var RY=I.memo(aJ);function MY(u){return qu(I.useCallback(($)=>{if(!u)return $.edges.map((l)=>l.id);let F=[];if($.width&&$.height)for(let l of $.edges){let U=$.nodeLookup.get(l.source),_=$.nodeLookup.get(l.target);if(U&&_&&SQ({sourceNode:U,targetNode:_,width:$.width,height:$.height,transform:$.transform}))F.push(l.id)}return F},[u]),Gu)}var EY=({color:u="none",strokeWidth:f=1})=>{let $={strokeWidth:f,...u&&{stroke:u}};return y.jsx("polyline",{className:"arrow",style:$,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},VY=({color:u="none",strokeWidth:f=1})=>{let $={strokeWidth:f,...u&&{stroke:u,fill:u}};return y.jsx("polyline",{className:"arrowclosed",style:$,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},VJ={[pf.Arrow]:EY,[pf.ArrowClosed]:VY};function XY(u){let f=Bu();return I.useMemo(()=>{if(!Object.prototype.hasOwnProperty.call(VJ,u))return f.getState().onError?.("009",Uf.error009(u)),null;return VJ[u]},[u])}var DY=({id:u,type:f,color:$,width:F=12.5,height:l=12.5,markerUnits:U="strokeWidth",strokeWidth:_,orient:Q="auto-start-reverse"})=>{let J=XY(f);if(!J)return null;return y.jsx("marker",{className:"react-flow__arrowhead",id:u,markerWidth:`${F}`,markerHeight:`${l}`,viewBox:"-10 -10 20 20",markerUnits:U,orient:Q,refX:"0",refY:"0",children:y.jsx(J,{color:$,strokeWidth:_})})},oJ=({defaultColor:u,rfId:f})=>{let $=qu((U)=>U.edges),F=qu((U)=>U.defaultEdgeOptions),l=I.useMemo(()=>{return IQ($,{id:f,defaultColor:u,defaultMarkerStart:F?.markerStart,defaultMarkerEnd:F?.markerEnd})},[$,F,f,u]);if(!l.length)return null;return y.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:y.jsx("defs",{children:l.map((U)=>y.jsx(DY,{id:U.id,type:U.type,color:U.color,width:U.width,height:U.height,markerUnits:U.markerUnits,strokeWidth:U.strokeWidth,orient:U.orient},U.id))})})};oJ.displayName="MarkerDefinitions";var OY=I.memo(oJ);function eJ({x:u,y:f,label:$,labelStyle:F,labelShowBg:l=!0,labelBgStyle:U,labelBgPadding:_=[2,4],labelBgBorderRadius:Q=2,children:J,className:q,...T}){let[W,A]=I.useState({x:1,y:0,width:0,height:0}),K=Ru(["react-flow__edge-textwrapper",q]),L=I.useRef(null);if(I.useEffect(()=>{if(L.current){let z=L.current.getBBox();A({x:z.x,y:z.y,width:z.width,height:z.height})}},[$]),!$)return null;return y.jsxs("g",{transform:`translate(${u-W.width/2} ${f-W.height/2})`,className:K,visibility:W.width?"visible":"hidden",...T,children:[l&&y.jsx("rect",{width:W.width+2*_[0],x:-_[0],y:-_[1],height:W.height+2*_[1],className:"react-flow__edge-textbg",style:U,rx:Q,ry:Q}),y.jsx("text",{className:"react-flow__edge-text",y:W.height/2,dy:"0.3em",ref:L,style:F,children:$}),J]})}eJ.displayName="EdgeText";var SY=I.memo(eJ);function e6({path:u,labelX:f,labelY:$,label:F,labelStyle:l,labelShowBg:U,labelBgStyle:_,labelBgPadding:Q,labelBgBorderRadius:J,interactionWidth:q=20,...T}){return y.jsxs(y.Fragment,{children:[y.jsx("path",{...T,d:u,fill:"none",className:Ru(["react-flow__edge-path",T.className])}),q?y.jsx("path",{d:u,fill:"none",strokeOpacity:0,strokeWidth:q,className:"react-flow__edge-interaction"}):null,F&&Kf(f)&&Kf($)?y.jsx(SY,{x:f,y:$,label:F,labelStyle:l,labelShowBg:U,labelBgStyle:_,labelBgPadding:Q,labelBgBorderRadius:J}):null]})}function XJ({pos:u,x1:f,y1:$,x2:F,y2:l}){if(u===a.Left||u===a.Right)return[0.5*(f+F),$];return[f,0.5*($+l)]}function uq({sourceX:u,sourceY:f,sourcePosition:$=a.Bottom,targetX:F,targetY:l,targetPosition:U=a.Top}){let[_,Q]=XJ({pos:$,x1:u,y1:f,x2:F,y2:l}),[J,q]=XJ({pos:U,x1:F,y1:l,x2:u,y2:f}),[T,W,A,K]=h6({sourceX:u,sourceY:f,targetX:F,targetY:l,sourceControlX:_,sourceControlY:Q,targetControlX:J,targetControlY:q});return[`M${u},${f} C${_},${Q} ${J},${q} ${F},${l}`,T,W,A,K]}function fq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,sourcePosition:_,targetPosition:Q,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,interactionWidth:B})=>{let[G,w,H]=uq({sourceX:$,sourceY:F,sourcePosition:_,targetX:l,targetY:U,targetPosition:Q}),M=u.isInternal?void 0:f;return y.jsx(e6,{id:M,path:G,labelX:w,labelY:H,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,interactionWidth:B})})}var jY=fq({isInternal:!1}),$q=fq({isInternal:!0});jY.displayName="SimpleBezierEdge";$q.displayName="SimpleBezierEdgeInternal";function Fq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,sourcePosition:K=a.Bottom,targetPosition:L=a.Top,markerEnd:z,markerStart:Z,pathOptions:B,interactionWidth:G})=>{let[w,H,M]=I3({sourceX:$,sourceY:F,sourcePosition:K,targetX:l,targetY:U,targetPosition:L,borderRadius:B?.borderRadius,offset:B?.offset,stepPosition:B?.stepPosition}),R=u.isInternal?void 0:f;return y.jsx(e6,{id:R,path:w,labelX:H,labelY:M,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,markerEnd:z,markerStart:Z,interactionWidth:G})})}var lq=Fq({isInternal:!1}),Uq=Fq({isInternal:!0});lq.displayName="SmoothStepEdge";Uq.displayName="SmoothStepEdgeInternal";function _q(u){return I.memo(({id:f,...$})=>{let F=u.isInternal?void 0:f;return y.jsx(lq,{...$,id:F,pathOptions:I.useMemo(()=>({borderRadius:0,offset:$.pathOptions?.offset}),[$.pathOptions?.offset])})})}var NY=_q({isInternal:!1}),Qq=_q({isInternal:!0});NY.displayName="StepEdge";Qq.displayName="StepEdgeInternal";function Jq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,markerEnd:K,markerStart:L,interactionWidth:z})=>{let[Z,B,G]=x6({sourceX:$,sourceY:F,targetX:l,targetY:U}),w=u.isInternal?void 0:f;return y.jsx(e6,{id:w,path:Z,labelX:B,labelY:G,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,markerEnd:K,markerStart:L,interactionWidth:z})})}var IY=Jq({isInternal:!1}),qq=Jq({isInternal:!0});IY.displayName="StraightEdge";qq.displayName="StraightEdgeInternal";function Tq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,sourcePosition:_=a.Bottom,targetPosition:Q=a.Top,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,pathOptions:B,interactionWidth:G})=>{let[w,H,M]=v6({sourceX:$,sourceY:F,sourcePosition:_,targetX:l,targetY:U,targetPosition:Q,curvature:B?.curvature}),R=u.isInternal?void 0:f;return y.jsx(e6,{id:R,path:w,labelX:H,labelY:M,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,interactionWidth:G})})}var yY=Tq({isInternal:!1}),Aq=Tq({isInternal:!0});yY.displayName="BezierEdge";Aq.displayName="BezierEdgeInternal";var DJ={default:Aq,straight:qq,step:Qq,smoothstep:Uq,simplebezier:$q},OJ={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},kY=(u,f,$)=>{if($===a.Left)return u-f;if($===a.Right)return u+f;return u},PY=(u,f,$)=>{if($===a.Top)return u-f;if($===a.Bottom)return u+f;return u},SJ="react-flow__edgeupdater";function jJ({position:u,centerX:f,centerY:$,radius:F=10,onMouseDown:l,onMouseEnter:U,onMouseOut:_,type:Q}){return y.jsx("circle",{onMouseDown:l,onMouseEnter:U,onMouseOut:_,className:Ru([SJ,`${SJ}-${Q}`]),cx:kY(f,F,u),cy:PY($,F,u),r:F,stroke:"transparent",fill:"transparent"})}function rY({isReconnectable:u,reconnectRadius:f,edge:$,sourceX:F,sourceY:l,targetX:U,targetY:_,sourcePosition:Q,targetPosition:J,onReconnect:q,onReconnectStart:T,onReconnectEnd:W,setReconnecting:A,setUpdateHover:K}){let L=Bu(),z=(H,M)=>{if(H.button!==0)return;let{autoPanOnConnect:R,domNode:E,connectionMode:V,connectionRadius:D,lib:r,onConnectStart:C,cancelConnection:m,nodeLookup:v,rfId:Y,panBy:X,updateConnection:O}=L.getState(),j=M.type==="target",k=(x,g)=>{A(!1),W?.(x,$,M.type,g)},P=(x)=>q?.($,x),c=(x,g)=>{A(!0),T?.(H,$,M.type),C?.(x,g)};b6.onPointerDown(H.nativeEvent,{autoPanOnConnect:R,connectionMode:V,connectionRadius:D,domNode:E,handleId:M.id,nodeId:M.nodeId,nodeLookup:v,isTarget:j,edgeUpdaterType:M.type,lib:r,flowId:Y,cancelConnection:m,panBy:X,isValidConnection:(...x)=>L.getState().isValidConnection?.(...x)??!0,onConnect:P,onConnectStart:c,onConnectEnd:(...x)=>L.getState().onConnectEnd?.(...x),onReconnectEnd:k,updateConnection:O,getTransform:()=>L.getState().transform,getFromHandle:()=>L.getState().connection.fromHandle,dragThreshold:L.getState().connectionDragThreshold,handleDomNode:H.currentTarget})},Z=(H)=>z(H,{nodeId:$.target,id:$.targetHandle??null,type:"target"}),B=(H)=>z(H,{nodeId:$.source,id:$.sourceHandle??null,type:"source"}),G=()=>K(!0),w=()=>K(!1);return y.jsxs(y.Fragment,{children:[(u===!0||u==="source")&&y.jsx(jJ,{position:Q,centerX:F,centerY:l,radius:f,onMouseDown:Z,onMouseEnter:G,onMouseOut:w,type:"source"}),(u===!0||u==="target")&&y.jsx(jJ,{position:J,centerX:U,centerY:_,radius:f,onMouseDown:B,onMouseEnter:G,onMouseOut:w,type:"target"})]})}function CY({id:u,edgesFocusable:f,edgesReconnectable:$,elementsSelectable:F,onClick:l,onDoubleClick:U,onContextMenu:_,onMouseEnter:Q,onMouseMove:J,onMouseLeave:q,reconnectRadius:T,onReconnect:W,onReconnectStart:A,onReconnectEnd:K,rfId:L,edgeTypes:z,noPanClassName:Z,onError:B,disableKeyboardA11y:G}){let w=qu((s)=>s.edgeLookup.get(u)),H=qu((s)=>s.defaultEdgeOptions);w=H?{...H,...w}:w;let M=w.type||"default",R=z?.[M]||DJ[M];if(R===void 0)B?.("011",Uf.error011(M)),M="default",R=z?.default||DJ.default;let E=!!(w.focusable||f&&typeof w.focusable>"u"),V=typeof W<"u"&&(w.reconnectable||$&&typeof w.reconnectable>"u"),D=!!(w.selectable||F&&typeof w.selectable>"u"),r=I.useRef(null),[C,m]=I.useState(!1),[v,Y]=I.useState(!1),X=Bu(),{zIndex:O=w.zIndex,sourceX:j,sourceY:k,targetX:P,targetY:c,sourcePosition:x,targetPosition:g}=qu(I.useCallback((s)=>{let d=s.nodeLookup.get(w.source),e=s.nodeLookup.get(w.target);if(!d||!e)return OJ;let lu=NQ({id:u,sourceNode:d,targetNode:e,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:s.connectionMode,onError:B}),Uu=OQ({selected:w.selected,zIndex:w.zIndex,sourceNode:d,targetNode:e,elevateOnSelect:s.elevateEdgesOnSelect,zIndexMode:s.zIndexMode});return{...lu||OJ,zIndex:Uu}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex,B]),Gu),$u=I.useMemo(()=>w.markerStart?`url('#${c6(w.markerStart,L)}')`:void 0,[w.markerStart,L]),i=I.useMemo(()=>w.markerEnd?`url('#${c6(w.markerEnd,L)}')`:void 0,[w.markerEnd,L]);if(w.hidden||j===null||k===null||P===null||c===null)return null;let fu=(s)=>{let{addSelectedEdges:d,unselectNodesAndEdges:e,multiSelectionActive:lu}=X.getState();if(D)if(X.setState({nodesSelectionActive:!1}),w.selected&&lu)e({nodes:[],edges:[w]}),r.current?.blur();else d([u]);if(l)l(s,w)},Fu=U?(s)=>{U(s,{...w})}:void 0,uu=_?(s)=>{_(s,{...w})}:void 0,h=Q?(s)=>{Q(s,{...w})}:void 0,n=J?(s)=>{J(s,{...w})}:void 0,N=q?(s)=>{q(s,{...w})}:void 0,b=(s)=>{if(!G&&z$.includes(s.key)&&D){let{unselectNodesAndEdges:d,addSelectedEdges:e}=X.getState();if(s.key==="Escape")r.current?.blur(),d({edges:[w]});else e([u])}};return y.jsx("svg",{style:{zIndex:O},children:y.jsxs("g",{className:Ru(["react-flow__edge",`react-flow__edge-${M}`,w.className,Z,{selected:w.selected,animated:w.animated,inactive:!D&&!l,updating:C,selectable:D}]),onClick:fu,onDoubleClick:Fu,onContextMenu:uu,onMouseEnter:h,onMouseMove:n,onMouseLeave:N,onKeyDown:E?b:void 0,tabIndex:E?0:void 0,role:w.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":u,"data-testid":`rf__edge-${u}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":E?`${hJ}-${L}`:void 0,ref:r,...w.domAttributes,children:[!v&&y.jsx(R,{id:u,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:D,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:j,sourceY:k,targetX:P,targetY:c,sourcePosition:x,targetPosition:g,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:$u,markerEnd:i,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),V&&y.jsx(rY,{edge:w,isReconnectable:V,reconnectRadius:T,onReconnect:W,onReconnectStart:A,onReconnectEnd:K,sourceX:j,sourceY:k,targetX:P,targetY:c,sourcePosition:x,targetPosition:g,setUpdateHover:m,setReconnecting:Y})]})})}var hY=I.memo(CY),vY=(u)=>({edgesFocusable:u.edgesFocusable,edgesReconnectable:u.edgesReconnectable,elementsSelectable:u.elementsSelectable,connectionMode:u.connectionMode,onError:u.onError});function Wq({defaultMarkerColor:u,onlyRenderVisibleElements:f,rfId:$,edgeTypes:F,noPanClassName:l,onReconnect:U,onEdgeContextMenu:_,onEdgeMouseEnter:Q,onEdgeMouseMove:J,onEdgeMouseLeave:q,onEdgeClick:T,reconnectRadius:W,onEdgeDoubleClick:A,onReconnectStart:K,onReconnectEnd:L,disableKeyboardA11y:z}){let{edgesFocusable:Z,edgesReconnectable:B,elementsSelectable:G,onError:w}=qu(vY,Gu),H=MY(f);return y.jsxs("div",{className:"react-flow__edges",children:[y.jsx(OY,{defaultColor:u,rfId:$}),H.map((M)=>{return y.jsx(hY,{id:M,edgesFocusable:Z,edgesReconnectable:B,elementsSelectable:G,noPanClassName:l,onReconnect:U,onContextMenu:_,onMouseEnter:Q,onMouseMove:J,onMouseLeave:q,onClick:T,reconnectRadius:W,onDoubleClick:A,onReconnectStart:K,onReconnectEnd:L,rfId:$,onError:w,edgeTypes:F,disableKeyboardA11y:z},M)})]})}Wq.displayName="EdgeRenderer";var xY=I.memo(Wq),NJ=(u)=>`translate(${u[0]}px,${u[1]}px) scale(${u[2]})`;function cY({children:u}){let f=Bu(),$=I.useRef(null),[F]=I.useState(()=>f.getState().transform);return bJ(()=>{let l=null,U=()=>{let _=f.getState().transform;if(l&&_[0]===l[0]&&_[1]===l[1]&&_[2]===l[2])return;if(l=_,$.current)$.current.style.transform=NJ(_)};return U(),f.subscribe(U)},[f]),y.jsx("div",{ref:$,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:NJ(F)},children:u})}function mY(u){let f=k3(),$=I.useRef(!1);I.useEffect(()=>{if(!$.current&&f.viewportInitialized&&u)setTimeout(()=>u(f),1),$.current=!0},[u,f.viewportInitialized])}var pY=(u)=>u.panZoom?.syncViewport;function bY(u){let f=qu(pY),$=Bu();return I.useEffect(()=>{if(u)f?.(u),$.setState({transform:[u.x,u.y,u.zoom]})},[u,f]),null}function IJ(u){return u.connection.inProgress?{...u.connection,to:w4(u.connection.to,u.transform)}:{...u.connection}}function iY(u){if(u)return($)=>{let F=IJ($);return u(F)};return IJ}function gY(u){let f=iY(u);return qu(f,Gu)}var sY=(u)=>({nodesConnectable:u.nodesConnectable,isValid:u.connection.isValid,inProgress:u.connection.inProgress,width:u.width,height:u.height});function tY({containerStyle:u,style:f,type:$,component:F}){let{nodesConnectable:l,width:U,height:_,isValid:Q,inProgress:J}=qu(sY,Gu);if(!(U&&l&&J))return null;return y.jsx("svg",{style:u,width:U,height:_,className:"react-flow__connectionline react-flow__container",children:y.jsx("g",{className:Ru(["react-flow__connection",I$(Q)]),children:y.jsx(Kq,{style:f,type:$,CustomComponent:F,isValid:Q})})})}var Kq=({style:u,type:f=mf.Bezier,CustomComponent:$,isValid:F})=>{let{inProgress:l,from:U,fromNode:_,fromHandle:Q,fromPosition:J,to:q,toNode:T,toHandle:W,toPosition:A,pointer:K}=gY();if(!l)return;if($)return y.jsx($,{connectionLineType:f,connectionLineStyle:u,fromNode:_,fromHandle:Q,fromX:U.x,fromY:U.y,toX:q.x,toY:q.y,fromPosition:J,toPosition:A,connectionStatus:I$(F),toNode:T,toHandle:W,pointer:K});let L="",z={sourceX:U.x,sourceY:U.y,sourcePosition:J,targetX:q.x,targetY:q.y,targetPosition:A};switch(f){case mf.Bezier:[L]=v6(z);break;case mf.SimpleBezier:[L]=uq(z);break;case mf.Step:[L]=I3({...z,borderRadius:0});break;case mf.SmoothStep:[L]=I3(z);break;default:[L]=x6(z)}return y.jsx("path",{d:L,fill:"none",className:"react-flow__connection-path",style:u})};Kq.displayName="ConnectionLine";var nY={};function yJ(u=nY){let f=I.useRef(u),$=Bu();I.useEffect(()=>{},[u])}function dY(){let u=Bu(),f=I.useRef(!1);I.useEffect(()=>{},[])}function wq({nodeTypes:u,edgeTypes:f,onInit:$,onNodeClick:F,onEdgeClick:l,onNodeDoubleClick:U,onEdgeDoubleClick:_,onNodeMouseEnter:Q,onNodeMouseMove:J,onNodeMouseLeave:q,onNodeContextMenu:T,onSelectionContextMenu:W,onSelectionStart:A,onSelectionEnd:K,connectionLineType:L,connectionLineStyle:z,connectionLineComponent:Z,connectionLineContainerStyle:B,selectionKeyCode:G,selectionOnDrag:w,selectionMode:H,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:E,deleteKeyCode:V,onlyRenderVisibleElements:D,elementsSelectable:r,defaultViewport:C,translateExtent:m,minZoom:v,maxZoom:Y,preventScrolling:X,defaultMarkerColor:O,zoomOnScroll:j,zoomOnPinch:k,panOnScroll:P,panOnScrollSpeed:c,panOnScrollMode:x,zoomOnDoubleClick:g,panOnDrag:$u,autoPanOnSelection:i,onPaneClick:fu,onPaneMouseEnter:Fu,onPaneMouseMove:uu,onPaneMouseLeave:h,onPaneScroll:n,onPaneContextMenu:N,paneClickDistance:b,nodeClickDistance:s,onEdgeContextMenu:d,onEdgeMouseEnter:e,onEdgeMouseMove:lu,onEdgeMouseLeave:Uu,reconnectRadius:Nu,onReconnect:bf,onReconnectStart:jf,onReconnectEnd:Nf,noDragClassName:gf,noWheelClassName:H4,noPanClassName:m0,disableKeyboardA11y:p0,nodeExtent:Hf,rfId:sf,viewport:tf,onViewportChange:b0,nodesDraggable:Q5}){return yJ(u),yJ(f),dY(),mY($),bY(tf),y.jsx(KY,{onPaneClick:fu,onPaneMouseEnter:Fu,onPaneMouseMove:uu,onPaneMouseLeave:h,onPaneContextMenu:N,onPaneScroll:n,paneClickDistance:b,deleteKeyCode:V,selectionKeyCode:G,selectionOnDrag:w,selectionMode:H,onSelectionStart:A,onSelectionEnd:K,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:E,elementsSelectable:r,zoomOnScroll:j,zoomOnPinch:k,zoomOnDoubleClick:g,panOnScroll:P,panOnScrollSpeed:c,panOnScrollMode:x,panOnDrag:$u,autoPanOnSelection:i,defaultViewport:C,translateExtent:m,minZoom:v,maxZoom:Y,onSelectionContextMenu:W,preventScrolling:X,noDragClassName:gf,noWheelClassName:H4,noPanClassName:m0,disableKeyboardA11y:p0,onViewportChange:b0,isControlledViewport:!!tf,children:y.jsxs(cY,{children:[y.jsx(xY,{edgeTypes:f,onEdgeClick:l,onEdgeDoubleClick:_,onReconnect:bf,onReconnectStart:jf,onReconnectEnd:Nf,onlyRenderVisibleElements:D,onEdgeContextMenu:d,onEdgeMouseEnter:e,onEdgeMouseMove:lu,onEdgeMouseLeave:Uu,reconnectRadius:Nu,defaultMarkerColor:O,noPanClassName:m0,disableKeyboardA11y:p0,rfId:sf}),y.jsx(tY,{style:z,type:L,component:Z,containerStyle:B}),y.jsx("div",{className:"react-flow__edgelabel-renderer"}),y.jsx(RY,{nodeTypes:u,onNodeClick:F,onNodeDoubleClick:U,onNodeMouseEnter:Q,onNodeMouseMove:J,onNodeMouseLeave:q,onNodeContextMenu:T,nodeClickDistance:s,onlyRenderVisibleElements:D,noPanClassName:m0,noDragClassName:gf,disableKeyboardA11y:p0,nodeExtent:Hf,rfId:sf,nodesDraggable:Q5}),y.jsx("div",{className:"react-flow__viewport-portal"})]})})}wq.displayName="GraphView";var aY=I.memo(wq),oY=O$("React Flow","https://reactflow.dev/"),kJ=({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,width:l,height:U,fitView:_,fitViewOptions:Q,minZoom:J=0.5,maxZoom:q=2,nodeOrigin:T,nodeExtent:W,zIndexMode:A="basic"}={})=>{let K=new Map,L=new Map,z=new Map,Z=new Map,B=F??f??[],G=$??u??[],w=T??[0,0],H=W??T4;c$(z,Z,B);let{nodesInitialized:M}=m6(G,K,L,{nodeOrigin:w,nodeExtent:H,zIndexMode:A}),R=[0,0,1];if(_&&l&&U){let E=A4(K,{filter:(C)=>!!((C.width||C.initialWidth)&&(C.height||C.initialHeight))}),{x:V,y:D,zoom:r}=N3(E,l,U,J,q,Q?.padding??0.1);R=[V,D,r]}return{rfId:"1",width:l??0,height:U??0,transform:R,nodes:G,nodesInitialized:M,nodeLookup:K,parentLookup:L,edges:B,edgeLookup:Z,connectionLookup:z,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:$!==void 0,hasDefaultEdges:F!==void 0,panZoom:null,minZoom:J,maxZoom:q,translateExtent:T4,nodeExtent:H,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:h0.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:_??!1,fitViewOptions:Q,fitViewResolver:null,connection:{...Y$},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:oY,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Z$,zIndexMode:A,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},eY=({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,width:l,height:U,fitView:_,fitViewOptions:Q,minZoom:J,maxZoom:q,nodeOrigin:T,nodeExtent:W,zIndexMode:A})=>qJ((K,L)=>{async function z(){let{nodeLookup:Z,panZoom:B,fitViewOptions:G,fitViewResolver:w,width:H,height:M,minZoom:R,maxZoom:E}=L();if(!B)return;await YQ({nodes:Z,width:H,height:M,panZoom:B,minZoom:R,maxZoom:E},G),w?.resolve(!0),K({fitViewResolver:null})}return{...kJ({nodes:u,edges:f,width:l,height:U,fitView:_,fitViewOptions:Q,minZoom:J,maxZoom:q,nodeOrigin:T,nodeExtent:W,defaultNodes:$,defaultEdges:F,zIndexMode:A}),setNodes:(Z)=>{let{nodeLookup:B,parentLookup:G,nodeOrigin:w,nodeExtent:H,elevateNodesOnSelect:M,fitViewQueued:R,zIndexMode:E,nodesSelectionActive:V}=L(),{nodesInitialized:D,hasSelectedNodes:r}=m6(Z,B,G,{nodeOrigin:w,nodeExtent:H,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:E}),C=V&&r;if(R&&D)z(),K({nodes:Z,nodesInitialized:D,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:C});else K({nodes:Z,nodesInitialized:D,nodesSelectionActive:C})},setEdges:(Z)=>{let{connectionLookup:B,edgeLookup:G}=L();c$(B,G,Z),K({edges:Z})},setDefaultNodesAndEdges:(Z,B)=>{if(Z){let{setNodes:G}=L();G(Z),K({hasDefaultNodes:!0})}if(B){let{setEdges:G}=L();G(B),K({hasDefaultEdges:!0})}},updateNodeInternals:(Z)=>{let{triggerNodeChanges:B,nodeLookup:G,parentLookup:w,domNode:H,nodeOrigin:M,nodeExtent:R,debug:E,fitViewQueued:V,zIndexMode:D}=L(),{changes:r,updatedInternals:C}=rQ(Z,G,w,H,M,R,D);if(!C)return;if(kQ(G,w,{nodeOrigin:M,nodeExtent:R,zIndexMode:D}),V)z(),K({fitViewQueued:!1,fitViewOptions:void 0});else K({});if(r?.length>0){if(E)console.log("React Flow: trigger node changes",r);B?.(r)}},updateNodePositions:(Z,B=!1)=>{let G=[],w=[],{nodeLookup:H,triggerNodeChanges:M,connection:R,updateConnection:E,onNodesChangeMiddlewareMap:V}=L();for(let[D,r]of Z){let C=H.get(D),m=!!(C?.expandParent&&C?.parentId&&r?.position),v={id:D,type:"position",position:m?{x:Math.max(0,r.position.x),y:Math.max(0,r.position.y)}:r.position,dragging:B};if(C&&R.inProgress&&R.fromNode.id===C.id){let Y=v0(C,R.fromHandle,a.Left,!0);E({...R,from:Y})}if(m&&C.parentId)G.push({id:D,parentId:C.parentId,rect:{...r.internals.positionAbsolute,width:r.measured.width??0,height:r.measured.height??0}});w.push(v)}if(G.length>0){let{parentLookup:D,nodeOrigin:r}=L(),C=p6(G,H,D,r);w.push(...C)}for(let D of V.values())w=D(w);M(w)},triggerNodeChanges:(Z)=>{let{onNodesChange:B,setNodes:G,nodes:w,hasDefaultNodes:H,debug:M}=L();if(Z?.length){if(H){let R=cJ(Z,w);G(R)}if(M)console.log("React Flow: trigger node changes",Z);B?.(Z)}},triggerEdgeChanges:(Z)=>{let{onEdgesChange:B,setEdges:G,edges:w,hasDefaultEdges:H,debug:M}=L();if(Z?.length){if(H){let R=mJ(Z,w);G(R)}if(M)console.log("React Flow: trigger edge changes",Z);B?.(Z)}},addSelectedNodes:(Z)=>{let{multiSelectionActive:B,edgeLookup:G,nodeLookup:w,triggerNodeChanges:H,triggerEdgeChanges:M}=L();if(B){let R=Z.map((E)=>z1(E,!0));H(R);return}H(G4(w,new Set([...Z]))),M(G4(G))},addSelectedEdges:(Z)=>{let{multiSelectionActive:B,edgeLookup:G,nodeLookup:w,triggerNodeChanges:H,triggerEdgeChanges:M}=L();if(B){let R=Z.map((E)=>z1(E,!0));M(R);return}M(G4(G,new Set([...Z]))),H(G4(w,new Set))},unselectNodesAndEdges:({nodes:Z,edges:B}={})=>{let{edges:G,nodes:w,nodeLookup:H,triggerNodeChanges:M,triggerEdgeChanges:R}=L(),E=Z?Z:w,V=B?B:G,D=[];for(let C of E){if(!C.selected)continue;D.push(z1(C.id,!1))}let r=[];for(let C of V){if(!C.selected)continue;r.push(z1(C.id,!1))}M(D),R(r)},setMinZoom:(Z)=>{let{panZoom:B,maxZoom:G}=L();B?.setScaleExtent([Z,G]),K({minZoom:Z})},setMaxZoom:(Z)=>{let{panZoom:B,minZoom:G}=L();B?.setScaleExtent([G,Z]),K({maxZoom:Z})},setTranslateExtent:(Z)=>{L().panZoom?.setTranslateExtent(Z),K({translateExtent:Z})},resetSelectedElements:()=>{let{edges:Z,nodes:B,triggerNodeChanges:G,triggerEdgeChanges:w,elementsSelectable:H}=L();if(!H)return;let M=B.reduce((E,V)=>V.selected?[...E,z1(V.id,!1)]:E,[]),R=Z.reduce((E,V)=>V.selected?[...E,z1(V.id,!1)]:E,[]);G(M),w(R)},setNodeExtent:(Z)=>{let{nodes:B,nodeLookup:G,parentLookup:w,nodeOrigin:H,elevateNodesOnSelect:M,nodeExtent:R,zIndexMode:E}=L();if(Z[0][0]===R[0][0]&&Z[0][1]===R[0][1]&&Z[1][0]===R[1][0]&&Z[1][1]===R[1][1])return;m6(B,G,w,{nodeOrigin:H,nodeExtent:Z,elevateNodesOnSelect:M,checkEquality:!1,zIndexMode:E}),K({nodeExtent:Z})},panBy:(Z)=>{let{transform:B,width:G,height:w,panZoom:H,translateExtent:M}=L();return CQ({delta:Z,panZoom:H,transform:B,translateExtent:M,width:G,height:w})},setCenter:async(Z,B,G)=>{let{width:w,height:H,maxZoom:M,panZoom:R}=L();if(!R)return!1;let E=typeof G?.zoom<"u"?G.zoom:M;return await R.setViewport({x:w/2-Z*E,y:H/2-B*E,zoom:E},{duration:G?.duration,ease:G?.ease,interpolate:G?.interpolate}),!0},cancelConnection:()=>{K({connection:{...Y$}})},updateConnection:(Z)=>{K({connection:Z})},reset:()=>K({...kJ()})}},Object.is);function t$({initialNodes:u,initialEdges:f,defaultNodes:$,defaultEdges:F,initialWidth:l,initialHeight:U,initialMinZoom:_,initialMaxZoom:Q,initialFitViewOptions:J,fitView:q,nodeOrigin:T,nodeExtent:W,zIndexMode:A,children:K}){let[L]=I.useState(()=>eY({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,width:l,height:U,fitView:q,minZoom:_,maxZoom:Q,fitViewOptions:J,nodeOrigin:T,nodeExtent:W,zIndexMode:A}));return y.jsx(BZ,{value:L,children:y.jsx(vZ,{children:y.jsx(uY,{children:K})})})}function uR({children:u,nodes:f,edges:$,defaultNodes:F,defaultEdges:l,width:U,height:_,fitView:Q,fitViewOptions:J,minZoom:q,maxZoom:T,nodeOrigin:W,nodeExtent:A,zIndexMode:K}){if(I.useContext(d6))return y.jsx(y.Fragment,{children:u});return y.jsx(t$,{initialNodes:f,initialEdges:$,defaultNodes:F,defaultEdges:l,initialWidth:U,initialHeight:_,fitView:Q,initialFitViewOptions:J,initialMinZoom:q,initialMaxZoom:T,nodeOrigin:W,nodeExtent:A,zIndexMode:K,children:u})}var fR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function $R({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,className:l,nodeTypes:U,edgeTypes:_,onNodeClick:Q,onEdgeClick:J,onInit:q,onMove:T,onMoveStart:W,onMoveEnd:A,onConnect:K,onConnectStart:L,onConnectEnd:z,onClickConnectStart:Z,onClickConnectEnd:B,onNodeMouseEnter:G,onNodeMouseMove:w,onNodeMouseLeave:H,onNodeContextMenu:M,onNodeDoubleClick:R,onNodeDragStart:E,onNodeDrag:V,onNodeDragStop:D,onNodesDelete:r,onEdgesDelete:C,onDelete:m,onSelectionChange:v,onSelectionDragStart:Y,onSelectionDrag:X,onSelectionDragStop:O,onSelectionContextMenu:j,onSelectionStart:k,onSelectionEnd:P,onBeforeDelete:c,connectionMode:x,connectionLineType:g=mf.Bezier,connectionLineStyle:$u,connectionLineComponent:i,connectionLineContainerStyle:fu,deleteKeyCode:Fu="Backspace",selectionKeyCode:uu="Shift",selectionOnDrag:h=!1,selectionMode:n=B1.Full,panActivationKeyCode:N="Space",multiSelectionKeyCode:b=B4()?"Meta":"Control",zoomActivationKeyCode:s=B4()?"Meta":"Control",snapToGrid:d,snapGrid:e,onlyRenderVisibleElements:lu=!1,selectNodesOnDrag:Uu,nodesDraggable:Nu,autoPanOnNodeFocus:bf,nodesConnectable:jf,nodesFocusable:Nf,nodeOrigin:gf=vJ,edgesFocusable:H4,edgesReconnectable:m0,elementsSelectable:p0=!0,defaultViewport:Hf=OZ,minZoom:sf=0.5,maxZoom:tf=2,translateExtent:b0=T4,preventScrolling:Q5=!0,nodeExtent:J5,defaultMarkerColor:oA="#b1b1b7",zoomOnScroll:eA=!0,zoomOnPinch:uW=!0,panOnScroll:fW=!1,panOnScrollSpeed:$W=0.5,panOnScrollMode:FW=T0.Free,zoomOnDoubleClick:lW=!0,panOnDrag:UW=!0,onPaneClick:_W,onPaneMouseEnter:QW,onPaneMouseMove:JW,onPaneMouseLeave:qW,onPaneScroll:TW,onPaneContextMenu:AW,paneClickDistance:WW=1,nodeClickDistance:KW=0,children:wW,onReconnect:BW,onReconnectStart:LW,onReconnectEnd:GW,onEdgeContextMenu:HW,onEdgeDoubleClick:zW,onEdgeMouseEnter:ZW,onEdgeMouseMove:YW,onEdgeMouseLeave:RW,reconnectRadius:MW=10,onNodesChange:EW,onEdgesChange:VW,noDragClassName:XW="nodrag",noWheelClassName:DW="nowheel",noPanClassName:wF="nopan",fitView:BF,fitViewOptions:LF,connectOnClick:OW,attributionPosition:SW,proOptions:jW,defaultEdgeOptions:NW,elevateNodesOnSelect:IW=!0,elevateEdgesOnSelect:yW=!1,disableKeyboardA11y:GF=!1,autoPanOnConnect:kW,autoPanOnNodeDrag:PW,autoPanOnSelection:rW=!0,autoPanSpeed:CW,connectionRadius:hW,isValidConnection:vW,onError:xW,style:cW,id:HF,nodeDragThreshold:mW,connectionDragThreshold:pW,viewport:bW,onViewportChange:iW,width:gW,height:sW,colorMode:tW="light",debug:nW,onScroll:zF,ariaLabelConfig:dW,zIndexMode:ZF="basic",...aW},oW){let q5=HF||"1",eW=IZ(tW),uK=I.useCallback((YF)=>{YF.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),zF?.(YF)},[zF]);return y.jsx("div",{"data-testid":"rf__wrapper",...aW,onScroll:uK,style:{...cW,...fR},ref:oW,className:Ru(["react-flow",l,eW]),id:HF,role:"application",children:y.jsxs(uR,{nodes:u,edges:f,width:gW,height:sW,fitView:BF,fitViewOptions:LF,minZoom:sf,maxZoom:tf,nodeOrigin:gf,nodeExtent:J5,zIndexMode:ZF,children:[y.jsx(NZ,{nodes:u,edges:f,defaultNodes:$,defaultEdges:F,onConnect:K,onConnectStart:L,onConnectEnd:z,onClickConnectStart:Z,onClickConnectEnd:B,nodesDraggable:Nu,autoPanOnNodeFocus:bf,nodesConnectable:jf,nodesFocusable:Nf,edgesFocusable:H4,edgesReconnectable:m0,elementsSelectable:p0,elevateNodesOnSelect:IW,elevateEdgesOnSelect:yW,minZoom:sf,maxZoom:tf,nodeExtent:J5,onNodesChange:EW,onEdgesChange:VW,snapToGrid:d,snapGrid:e,connectionMode:x,translateExtent:b0,connectOnClick:OW,defaultEdgeOptions:NW,fitView:BF,fitViewOptions:LF,onNodesDelete:r,onEdgesDelete:C,onDelete:m,onNodeDragStart:E,onNodeDrag:V,onNodeDragStop:D,onSelectionDrag:X,onSelectionDragStart:Y,onSelectionDragStop:O,onMove:T,onMoveStart:W,onMoveEnd:A,noPanClassName:wF,nodeOrigin:gf,rfId:q5,autoPanOnConnect:kW,autoPanOnNodeDrag:PW,autoPanSpeed:CW,onError:xW,connectionRadius:hW,isValidConnection:vW,selectNodesOnDrag:Uu,nodeDragThreshold:mW,connectionDragThreshold:pW,onBeforeDelete:c,debug:nW,ariaLabelConfig:dW,zIndexMode:ZF}),y.jsx(aY,{onInit:q,onNodeClick:Q,onEdgeClick:J,onNodeMouseEnter:G,onNodeMouseMove:w,onNodeMouseLeave:H,onNodeContextMenu:M,onNodeDoubleClick:R,nodeTypes:U,edgeTypes:_,connectionLineType:g,connectionLineStyle:$u,connectionLineComponent:i,connectionLineContainerStyle:fu,selectionKeyCode:uu,selectionOnDrag:h,selectionMode:n,deleteKeyCode:Fu,multiSelectionKeyCode:b,panActivationKeyCode:N,zoomActivationKeyCode:s,onlyRenderVisibleElements:lu,defaultViewport:Hf,translateExtent:b0,minZoom:sf,maxZoom:tf,preventScrolling:Q5,zoomOnScroll:eA,zoomOnPinch:uW,zoomOnDoubleClick:lW,panOnScroll:fW,panOnScrollSpeed:$W,panOnScrollMode:FW,panOnDrag:UW,autoPanOnSelection:rW,onPaneClick:_W,onPaneMouseEnter:QW,onPaneMouseMove:JW,onPaneMouseLeave:qW,onPaneScroll:TW,onPaneContextMenu:AW,paneClickDistance:WW,nodeClickDistance:KW,onSelectionContextMenu:j,onSelectionStart:k,onSelectionEnd:P,onReconnect:BW,onReconnectStart:LW,onReconnectEnd:GW,onEdgeContextMenu:HW,onEdgeDoubleClick:zW,onEdgeMouseEnter:ZW,onEdgeMouseMove:YW,onEdgeMouseLeave:RW,reconnectRadius:MW,defaultMarkerColor:oA,noDragClassName:XW,noWheelClassName:DW,noPanClassName:wF,rfId:q5,disableKeyboardA11y:GF,nodeExtent:J5,viewport:bW,onViewportChange:iW,nodesDraggable:Nu}),y.jsx(DZ,{onSelectionChange:v}),wW,y.jsx(RZ,{proOptions:jW,position:SW}),y.jsx(YZ,{rfId:q5,disableKeyboardA11y:GF})]})})}var Bq=pJ($R);function Lq(u){let[f,$]=I.useState(u),F=I.useCallback((l)=>$((U)=>cJ(l,U)),[]);return[f,$,F]}function Gq(u){let[f,$]=I.useState(u),F=I.useCallback((l)=>$((U)=>mJ(l,U)),[]);return[f,$,F]}var HD=Uf.error014();function FR({dimensions:u,lineWidth:f,variant:$,className:F}){return y.jsx("path",{strokeWidth:f,d:`M${u[0]/2} 0 V${u[1]} M0 ${u[1]/2} H${u[0]}`,className:Ru(["react-flow__background-pattern",$,F])})}function lR({radius:u,className:f}){return y.jsx("circle",{cx:u,cy:u,r:u,className:Ru(["react-flow__background-pattern","dots",f])})}var c0;(function(u){u.Lines="lines",u.Dots="dots",u.Cross="cross"})(c0||(c0={}));var UR={[c0.Dots]:1,[c0.Lines]:1,[c0.Cross]:6},_R=(u)=>({transform:u.transform,patternId:`pattern-${u.rfId}`});function Hq({id:u,variant:f=c0.Dots,gap:$=20,size:F,lineWidth:l=1,offset:U=0,color:_,bgColor:Q,style:J,className:q,patternClassName:T}){let W=I.useRef(null),{transform:A,patternId:K}=qu(_R,Gu),L=F||UR[f],z=f===c0.Dots,Z=f===c0.Cross,B=Array.isArray($)?$:[$,$],G=[B[0]*A[2]||1,B[1]*A[2]||1],w=L*A[2],H=Array.isArray(U)?U:[U,U],M=Z?[w,w]:G,R=[H[0]*A[2]+M[0]/2,H[1]*A[2]+M[1]/2],E=`${K}${u?u:""}`;return y.jsxs("svg",{className:Ru(["react-flow__background",q]),style:{...J,...o6,"--xy-background-color-props":Q,"--xy-background-pattern-color-props":_},ref:W,"data-testid":"rf__background",children:[y.jsx("pattern",{id:E,x:A[0]%G[0],y:A[1]%G[1],width:G[0],height:G[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:z?y.jsx(lR,{radius:w/2,className:T}):y.jsx(FR,{dimensions:M,lineWidth:l,variant:f,className:T})}),y.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}Hq.displayName="Background";var zq=I.memo(Hq);function QR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:y.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function JR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:y.jsx("path",{d:"M0 0h32v4.2H0z"})})}function qR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:y.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function TR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function AR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function t6({children:u,className:f,...$}){return y.jsx("button",{type:"button",className:Ru(["react-flow__controls-button",f]),...$,children:u})}var WR=(u)=>({isInteractive:u.nodesDraggable||u.nodesConnectable||u.elementsSelectable,minZoomReached:u.transform[2]<=u.minZoom,maxZoomReached:u.transform[2]>=u.maxZoom,ariaLabelConfig:u.ariaLabelConfig});function Zq({style:u,showZoom:f=!0,showFitView:$=!0,showInteractive:F=!0,fitViewOptions:l,onZoomIn:U,onZoomOut:_,onFitView:Q,onInteractiveChange:J,className:q,children:T,position:W="bottom-left",orientation:A="vertical","aria-label":K}){let L=Bu(),{isInteractive:z,minZoomReached:Z,maxZoomReached:B,ariaLabelConfig:G}=qu(WR,Gu),{zoomIn:w,zoomOut:H,fitView:M}=k3(),R=()=>{w(),U?.()},E=()=>{H(),_?.()},V=()=>{M(l),Q?.()},D=()=>{L.setState({nodesDraggable:!z,nodesConnectable:!z,elementsSelectable:!z}),J?.(!z)};return y.jsxs(a6,{className:Ru(["react-flow__controls",A==="horizontal"?"horizontal":"vertical",q]),position:W,style:u,"data-testid":"rf__controls","aria-label":K??G["controls.ariaLabel"],children:[f&&y.jsxs(y.Fragment,{children:[y.jsx(t6,{onClick:R,className:"react-flow__controls-zoomin",title:G["controls.zoomIn.ariaLabel"],"aria-label":G["controls.zoomIn.ariaLabel"],disabled:B,children:y.jsx(QR,{})}),y.jsx(t6,{onClick:E,className:"react-flow__controls-zoomout",title:G["controls.zoomOut.ariaLabel"],"aria-label":G["controls.zoomOut.ariaLabel"],disabled:Z,children:y.jsx(JR,{})})]}),$&&y.jsx(t6,{className:"react-flow__controls-fitview",onClick:V,title:G["controls.fitView.ariaLabel"],"aria-label":G["controls.fitView.ariaLabel"],children:y.jsx(qR,{})}),F&&y.jsx(t6,{className:"react-flow__controls-interactive",onClick:D,title:G["controls.interactive.ariaLabel"],"aria-label":G["controls.interactive.ariaLabel"],children:z?y.jsx(AR,{}):y.jsx(TR,{})}),T]})}Zq.displayName="Controls";var zD=I.memo(Zq);function KR({id:u,x:f,y:$,width:F,height:l,style:U,color:_,strokeColor:Q,strokeWidth:J,className:q,borderRadius:T,shapeRendering:W,selected:A,onClick:K}){let{background:L,backgroundColor:z}=U||{},Z=_||L||z;return y.jsx("rect",{className:Ru(["react-flow__minimap-node",{selected:A},q]),x:f,y:$,rx:T,ry:T,width:F,height:l,style:{fill:Z,stroke:Q,strokeWidth:J},shapeRendering:W,onClick:K?(B)=>K(B,u):void 0})}var wR=I.memo(KR),BR=(u)=>u.nodes.map((f)=>f.id),i$=(u)=>u instanceof Function?u:()=>u;function LR({nodeStrokeColor:u,nodeColor:f,nodeClassName:$="",nodeBorderRadius:F=5,nodeStrokeWidth:l,nodeComponent:U=wR,onClick:_}){let Q=qu(BR,Gu),J=i$(f),q=i$(u),T=i$($),W=typeof window>"u"||!!window.chrome?"crispEdges":"geometricPrecision";return y.jsx(y.Fragment,{children:Q.map((A)=>y.jsx(HR,{id:A,nodeColorFunc:J,nodeStrokeColorFunc:q,nodeClassNameFunc:T,nodeBorderRadius:F,nodeStrokeWidth:l,NodeComponent:U,onClick:_,shapeRendering:W},A))})}function GR({id:u,nodeColorFunc:f,nodeStrokeColorFunc:$,nodeClassNameFunc:F,nodeBorderRadius:l,nodeStrokeWidth:U,shapeRendering:_,NodeComponent:Q,onClick:J}){let{node:q,x:T,y:W,width:A,height:K}=qu((L)=>{let z=L.nodeLookup.get(u);if(!z)return{node:void 0,x:0,y:0,width:0,height:0};let Z=z.internals.userNode,{x:B,y:G}=z.internals.positionAbsolute,{width:w,height:H}=Bf(Z);return{node:Z,x:B,y:G,width:w,height:H}},Gu);if(!q||q.hidden||!S$(q))return null;return y.jsx(Q,{x:T,y:W,width:A,height:K,style:q.style,selected:!!q.selected,className:F(q),color:f(q),borderRadius:l,strokeColor:$(q),strokeWidth:U,shapeRendering:_,onClick:J,id:q.id})}var HR=I.memo(GR),zR=I.memo(LR),ZR=200,YR=150,RR=(u)=>!u.hidden,MR=(u)=>{let f={x:-u.transform[0]/u.transform[2],y:-u.transform[1]/u.transform[2],width:u.width/u.transform[2],height:u.height/u.transform[2]},$=!1;for(let F of u.nodeLookup.values())if(!F.hidden){$=!0;break}return{viewBB:f,boundingRect:$?X$(A4(u.nodeLookup,{filter:RR}),f):f,rfId:u.rfId,panZoom:u.panZoom,translateExtent:u.translateExtent,flowWidth:u.width,flowHeight:u.height,ariaLabelConfig:u.ariaLabelConfig}},PJ=(u,f)=>u.x===f.x&&u.y===f.y&&u.width===f.width&&u.height===f.height,ER=(u,f)=>PJ(u.viewBB,f.viewBB)&&PJ(u.boundingRect,f.boundingRect)&&u.rfId===f.rfId&&u.panZoom===f.panZoom&&u.translateExtent===f.translateExtent&&u.flowWidth===f.flowWidth&&u.flowHeight===f.flowHeight&&u.ariaLabelConfig===f.ariaLabelConfig,VR="react-flow__minimap-desc";function Yq({style:u,className:f,nodeStrokeColor:$,nodeColor:F,nodeClassName:l="",nodeBorderRadius:U=5,nodeStrokeWidth:_,nodeComponent:Q,bgColor:J,maskColor:q,maskStrokeColor:T,maskStrokeWidth:W,position:A="bottom-right",onClick:K,onNodeClick:L,pannable:z=!1,zoomable:Z=!1,ariaLabel:B,inversePan:G,zoomStep:w=1,offsetScale:H=5}){let M=Bu(),R=I.useRef(null),{boundingRect:E,panZoom:V,viewBB:D,rfId:r,translateExtent:C,flowWidth:m,flowHeight:v,ariaLabelConfig:Y}=qu(MR,ER),X=u?.width??ZR,O=u?.height??YR,j=E.width/X,k=E.height/O,P=Math.max(j,k),c=P*X,x=P*O,g=H*P,$u=E.x-(c-E.width)/2-g,i=E.y-(x-E.height)/2-g,fu=c+g*2,Fu=x+g*2,uu=`${VR}-${r}`,h=I.useRef(0),n=I.useRef();h.current=P,I.useEffect(()=>{let e=M.getState().panZoom;if(R.current&&e)return n.current=bQ({domNode:R.current,panZoom:e,getTransform:()=>M.getState().transform,getViewScale:()=>h.current}),()=>{n.current?.destroy()}},[V]),I.useEffect(()=>{n.current?.update({translateExtent:C,width:m,height:v,inversePan:G,pannable:z,zoomStep:w,zoomable:Z})},[z,Z,G,w,C,m,v]);let N=K?(e)=>{let[lu,Uu]=n.current?.pointer(e)||[0,0];K(e,{x:lu,y:Uu})}:void 0,b=I.useCallback((e,lu)=>{let Uu=M.getState().nodeLookup.get(lu).internals.userNode;L?.(e,Uu)},[L]),s=L?b:void 0,d=B??Y["minimap.ariaLabel"];return y.jsx(a6,{position:A,style:{...u,"--xy-minimap-background-color-props":typeof J==="string"?J:void 0,"--xy-minimap-mask-background-color-props":typeof q==="string"?q:void 0,"--xy-minimap-mask-stroke-color-props":typeof T==="string"?T:void 0,"--xy-minimap-mask-stroke-width-props":typeof W==="number"?W*P:void 0,"--xy-minimap-node-background-color-props":typeof F==="string"?F:void 0,"--xy-minimap-node-stroke-color-props":typeof $==="string"?$:void 0,"--xy-minimap-node-stroke-width-props":typeof _==="number"?_:void 0},className:Ru(["react-flow__minimap",f]),"data-testid":"rf__minimap",children:y.jsxs("svg",{width:X,height:O,viewBox:`${$u} ${i} ${fu} ${Fu}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":uu,ref:R,onClick:N,children:[d&&y.jsx("title",{id:uu,children:d}),y.jsx(zR,{onClick:s,nodeColor:F,nodeStrokeColor:$,nodeBorderRadius:U,nodeClassName:l,nodeStrokeWidth:_,nodeComponent:Q}),y.jsx("path",{className:"react-flow__minimap-mask",d:`M${$u-g},${i-g}h${fu+g*2}v${Fu+g*2}h${-fu-g*2}z
1382
- M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Yq.displayName="MiniMap";var Rq=I.memo(Yq),XR=(u)=>(f)=>u?`${Math.max(1/f.transform[2],1)}`:void 0,DR={[x0.Line]:"right",[x0.Handle]:"bottom-right"};function OR({nodeId:u,position:f,variant:$=x0.Handle,className:F,style:l=void 0,children:U,color:_,minWidth:Q=10,minHeight:J=10,maxWidth:q=Number.MAX_VALUE,maxHeight:T=Number.MAX_VALUE,keepAspectRatio:W=!1,resizeDirection:A,autoScale:K=!0,shouldResize:L,onResizeStart:z,onResize:Z,onResizeEnd:B}){let G=tJ(),w=typeof u==="string"?u:G,H=Bu(),M=I.useRef(null),R=$===x0.Handle,E=qu(I.useCallback(XR(R&&K),[R,K]),Gu),V=I.useRef(null),D=f??DR[$];I.useEffect(()=>{if(!M.current||!w)return;if(!V.current)V.current=nQ({domNode:M.current,nodeId:w,getStoreItems:()=>{let{nodeLookup:C,transform:m,snapGrid:v,snapToGrid:Y,nodeOrigin:X,domNode:O}=H.getState();return{nodeLookup:C,transform:m,snapGrid:v,snapToGrid:Y,nodeOrigin:X,paneDomNode:O}},onChange:(C,m)=>{let{triggerNodeChanges:v,nodeLookup:Y,parentLookup:X,nodeOrigin:O}=H.getState(),j=[],k={x:C.x,y:C.y},P=Y.get(w);if(P&&P.expandParent&&P.parentId){let c=P.origin??O,x=C.width??P.measured.width??0,g=C.height??P.measured.height??0,$u={id:P.id,parentId:P.parentId,rect:{width:x,height:g,...j$({x:C.x??P.position.x,y:C.y??P.position.y},{width:x,height:g},P.parentId,Y,c)}},i=p6([$u],Y,X,O);j.push(...i),k.x=C.x?Math.max(c[0]*x,C.x):void 0,k.y=C.y?Math.max(c[1]*g,C.y):void 0}if(k.x!==void 0&&k.y!==void 0){let c={id:w,type:"position",position:{...k}};j.push(c)}if(C.width!==void 0&&C.height!==void 0){let x={id:w,type:"dimensions",resizing:!0,setAttributes:!A?!0:A==="horizontal"?"width":"height",dimensions:{width:C.width,height:C.height}};j.push(x)}for(let c of m){let x={...c,type:"position"};j.push(x)}v(j)},onEnd:({width:C,height:m})=>{let v={id:w,type:"dimensions",resizing:!1,dimensions:{width:C,height:m}};H.getState().triggerNodeChanges([v])}});return V.current.update({controlPosition:D,boundaries:{minWidth:Q,minHeight:J,maxWidth:q,maxHeight:T},keepAspectRatio:W,resizeDirection:A,onResizeStart:z,onResize:Z,onResizeEnd:B,shouldResize:L}),()=>{V.current?.destroy()}},[D,Q,J,q,T,W,z,Z,B,L]);let r=D.split("-");return y.jsx("div",{className:Ru(["react-flow__resize-control","nodrag",...r,$,F]),ref:M,style:{...l,scale:E,..._&&{[R?"backgroundColor":"borderColor"]:_}},children:U})}var ZD=I.memo(OR);var WF=If(tA(),1),S=If(U6(),1),nA={zh:{modelPrefix:"生成模型:",backParent:"← 返回上级地图",levelOverview:"L0 全景图谱",levelSubPrefix:"L1+ 深度专题:",allStreams:"全部脉络",searchPlaceholder:"搜索概念、机制、符号、路径或追问关键词…",zoomIn:"放大",zoomOut:"缩小",lock:"锁定节点",unlock:"已锁定(点击解锁)",fitView:"适配全图",reset:"重置",legend:"图例",scopeNotes:"边界与待确认",learningPath:"推荐学习顺序:",expandDetail:"展开细节",collapseDetail:"收起细节",detailEdgeLabel:"下钻细节",deepDiveBadgeTitle:"继续深挖此核心",deepDiveModalTitle:"继续深潜(Loop Prompts)",tabAsk:"定向深究追问(对话精读)",tabRecursive:"递归生成子地图(AtlasLoop)",copyBtn:"一键复制提示词",copiedBtn:"已复制",copySnippet:"复制片段",openInEditor:"在编辑器中打开",editorConfirmHint:"提示:首次点击时浏览器可能会请求确认打开外部编辑器应用;若目标文件路径移动请重新生成。",recursiveUsageHint:"将下方指令直接发送给 AI,即可围绕当前焦点递归生成下一层独立交互式 HTML 子地图:",whatItDoes:"核心说明",whyItMatters:"为什么重要",inputsLabel:"前置条件 / 输入",outputsLabel:"核心产出 / 结果",mechanismsLabel:"内部机制与影响",watchoutsLabel:"阅读与理解注意点",anchorsLabel:"关联依据与直达锚点",openDeepDiveBtn:"查看「?」进阶追问与递归指令",unverifiedTag:"待确认",verifiedTag:"已核实",uncoveredTitle:"尚未覆盖的范围",unverifiedTitle:"待确认项说明",noSearchMatches:"无匹配节点",nestedBadge:"内部细节节点",close:"关闭",roles:{entry:"起点 / 命题",core:"核心机制",branch:"判断 / 分岔",foundation:"底层基石 / 存储",context:"外部环境 / 关联",extension:"延伸 / 异步演化",outcome:"最终结论 / 结果"}},en:{modelPrefix:"Model: ",backParent:"← Back to Parent Atlas",levelOverview:"L0 Overview",levelSubPrefix:"L1+ Deep Dive: ",allStreams:"All Streams",searchPlaceholder:"Search concepts, mechanisms, symbols, files, or prompts…",zoomIn:"Zoom In",zoomOut:"Zoom Out",lock:"Lock Nodes",unlock:"Locked (Unlock)",fitView:"Fit View",reset:"Reset",legend:"Legend",scopeNotes:"Scope & Notes",learningPath:"Recommended Order:",expandDetail:"Expand Details",collapseDetail:"Collapse Details",detailEdgeLabel:"Drill-down",deepDiveBadgeTitle:"Deep dive into this node",deepDiveModalTitle:"Deep Dive Loop Prompts",tabAsk:"Targeted Follow-up Prompts",tabRecursive:"Recursive Sub-Atlas Prompt",copyBtn:"Copy Prompt",copiedBtn:"Copied!",copySnippet:"Copy",openInEditor:"Open in Editor",editorConfirmHint:"Note: Your browser may ask permission to launch the external editor. Regenerate if local files move.",recursiveUsageHint:"Send this prompt to your AI agent to generate a dedicated L1/L2 interactive HTML sub-atlas for this focus:",whatItDoes:"What It Does",whyItMatters:"Why It Matters",inputsLabel:"Inputs / Preconditions",outputsLabel:"Outputs / Effects",mechanismsLabel:"Mechanism & Side Effects",watchoutsLabel:"Key Watchouts",anchorsLabel:"Evidence & Direct Anchors",openDeepDiveBtn:'Open "?" Deep-Dive Prompts',unverifiedTag:"Unverified",verifiedTag:"Verified",uncoveredTitle:"Uncovered Scope",unverifiedTitle:"Unverified / Pending Items",noSearchMatches:"No matching nodes",nestedBadge:"Detail Sub-node",close:"Close",roles:{entry:"Entry / Trigger",core:"Core Mechanism",branch:"Decision / Branch",foundation:"Foundation / Store",context:"External / Context",extension:"Extension / Async",outcome:"Outcome / Takeaway"}}};function hV(u={}){let $=String(u.language||"en").toLowerCase().startsWith("zh")?nA.zh:nA.en,F=u.uiLabels&&typeof u.uiLabels==="object"?u.uiLabels:{};return{...$,...F,roles:{...$.roles,...F.roles||{}}}}var _5={entry:{accent:"#2563eb",bg:"#eff6ff",badgeBg:"#dbeafe",badgeText:"#1d4ed8"},core:{accent:"#0f766e",bg:"#f0fdfa",badgeBg:"#ccfbf1",badgeText:"#0f766e"},branch:{accent:"#d97706",bg:"#fffbeb",badgeBg:"#fef3c7",badgeText:"#b45309"},foundation:{accent:"#7c3aed",bg:"#f5f3ff",badgeBg:"#ede9fe",badgeText:"#6d28d9"},context:{accent:"#475569",bg:"#f8fafc",badgeBg:"#e2e8f0",badgeText:"#334155"},extension:{accent:"#db2777",bg:"#fdf2f8",badgeBg:"#fce7f3",badgeText:"#be185d"},outcome:{accent:"#16a34a",bg:"#f0fdf4",badgeBg:"#dcfce7",badgeText:"#15803d"}};function vV(u){if(navigator.clipboard&&typeof navigator.clipboard.writeText==="function")return navigator.clipboard.writeText(u).catch(()=>dA(u));return Promise.resolve(dA(u))}function dA(u){let f=document.createElement("textarea");f.value=u,f.setAttribute("readonly","true"),f.style.position="fixed",f.style.top="-9999px",f.style.left="-9999px",document.body.appendChild(f),f.select();try{document.execCommand("copy")}catch($){}return document.body.removeChild(f),!0}function xV(u,f,$,F,l){let U=new WF.default.graphlib.Graph;U.setDefaultEdgeLabel(()=>({})),U.setGraph({rankdir:"LR",nodesep:68,ranksep:118,marginx:44,marginy:44});let _=Array.isArray(u.nodes)?u.nodes:[],Q=Array.isArray(u.edges)?u.edges:[],J=_.filter((K)=>{if(f==="all")return!0;return Array.isArray(K.streamIds)&&K.streamIds.includes(f)}),q=new Set(J.map((K)=>K.id)),T=[],W=[];for(let K of J){let L=Array.isArray(K.detailGraph?.nodes)?K.detailGraph.nodes.length:0,z=$.has(K.id)&&L>0,Z=304,B=148;if(U.setNode(K.id,{width:304,height:148}),T.push({id:K.id,type:"atlasNode",position:{x:0,y:0},data:{item:K,isSubNode:!1,detailCount:L,isExpanded:z,t:F,...l},style:{width:304,minHeight:148}}),z){let G=K.detailGraph.nodes||[],w=K.detailGraph.edges||[],H=new Map;for(let M of G)H.set(M.id,0);for(let M of w)if(H.has(M.target))H.set(M.target,H.get(M.target)+1);for(let M of G){let R=`${K.id}::${M.id}`,E=268,V=124;if(U.setNode(R,{width:268,height:124}),T.push({id:R,type:"atlasNode",position:{x:0,y:0},data:{item:{...M,parentTitle:K.title,parentId:K.id},isSubNode:!0,detailCount:0,isExpanded:!1,t:F,...l},style:{width:268,minHeight:124}}),(H.get(M.id)||0)===0){let D=`bridge::${K.id}->${R}`;U.setEdge(K.id,R),W.push({id:D,source:K.id,target:R,label:F.detailEdgeLabel,animated:!0,style:{stroke:"#0ea5e9",strokeWidth:1.8,strokeDasharray:"5 4"},labelStyle:{fill:"#0369a1",fontSize:11,fontWeight:600},labelBgStyle:{fill:"#f0f9ff",fillOpacity:0.92},markerEnd:{type:pf.ArrowClosed,color:"#0ea5e9"}})}}for(let M=0;M<w.length;M++){let R=w[M],E=`${K.id}::${R.source}`,V=`${K.id}::${R.target}`;U.setEdge(E,V),W.push({id:`subedge::${K.id}::${R.id||M}`,source:E,target:V,label:R.label||"",style:{stroke:"#64748b",strokeWidth:1.6},labelStyle:{fill:"#334155",fontSize:11,fontWeight:500},labelBgStyle:{fill:"#f8fafc",fillOpacity:0.92},markerEnd:{type:pf.ArrowClosed,color:"#64748b"}})}}}for(let K=0;K<Q.length;K++){let L=Q[K];if(!q.has(L.source)||!q.has(L.target))continue;U.setEdge(L.source,L.target),W.push({id:L.id||`edge-${K}`,source:L.source,target:L.target,label:L.label||"",style:{stroke:"#334155",strokeWidth:2},labelStyle:{fill:"#0f172a",fontSize:11.5,fontWeight:600},labelBgStyle:{fill:"#ffffff",fillOpacity:0.94},labelBgPadding:[6,3],labelBgBorderRadius:4,markerEnd:{type:pf.ArrowClosed,color:"#334155"}})}return WF.default.layout(U),{nodes:T.map((K)=>{let L=U.node(K.id),z=K.style.width||300,Z=K.style.minHeight||140;return{...K,targetPosition:a.Left,sourcePosition:a.Right,position:{x:Math.round((L?L.x:0)-z/2),y:Math.round((L?L.y:0)-Z/2)}}}),edges:W}}function cV({id:u,data:f,selected:$}){let{item:F,isSubNode:l,detailCount:U,isExpanded:_,t:Q,onToggleExpand:J,onOpenDeepDive:q,onSelectNode:T}=f,[W,A]=Qu.useState(!1),K=_5[F.role]?F.role:"core",L=_5[K],z=Boolean(F.deepDive&&(Array.isArray(F.deepDive.askPrompts)&&F.deepDive.askPrompts.length>0||F.deepDive.subAtlasPrompt)),Z=Array.isArray(F.anchors)?F.anchors.length:0;return S.jsxs("div",{"data-testid":l?"atlas-subnode-card":"atlas-node-card","data-node-id":u,onClick:()=>T(u),className:`atlas-node ${l?"atlas-node-sub":""} ${$?"atlas-node-selected":""}`,style:{borderLeft:`5px solid ${L.accent}`,background:l?"#ffffff":L.bg},children:[S.jsx(Z1,{type:"target",position:a.Left,className:"atlas-handle"}),S.jsxs("div",{className:"atlas-node-header",children:[S.jsxs("div",{className:"atlas-node-badges",children:[S.jsx("span",{className:"atlas-role-badge",style:{background:L.badgeBg,color:L.badgeText},children:Q.roles[K]||F.role}),l&&S.jsx("span",{className:"atlas-sub-pill",children:Q.nestedBadge}),F.confidence==="unverified"&&S.jsx("span",{className:"atlas-unverified-pill",children:Q.unverifiedTag})]}),z&&S.jsxs("div",{className:"atlas-help-wrap nodrag nopan",children:[S.jsx("button",{type:"button","data-testid":"node-deep-dive-btn","data-for-node":u,"aria-label":Q.deepDiveBadgeTitle,className:"atlas-help-btn nodrag nopan",onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onPointerDown:(B)=>B.stopPropagation(),onMouseDown:(B)=>B.stopPropagation(),onClick:(B)=>{B.stopPropagation(),A(!1),q({title:F.title,deepDive:F.deepDive})},children:"?"}),W&&S.jsx("div",{"data-testid":"deep-dive-tooltip",className:"atlas-help-tooltip",children:F.deepDive.hoverHint||Q.deepDiveBadgeTitle})]})]}),S.jsx("div",{className:"atlas-node-title",children:F.title}),F.summary&&S.jsx("div",{className:"atlas-node-summary",children:F.summary}),(U>0||Z>0)&&S.jsxs("div",{className:"atlas-node-footer nodrag nopan",children:[U>0?S.jsx("button",{type:"button","data-testid":"node-expand-btn","data-for-node":u,className:`atlas-expand-btn nodrag nopan ${_?"active":""}`,onPointerDown:(B)=>B.stopPropagation(),onMouseDown:(B)=>B.stopPropagation(),onClick:(B)=>{B.stopPropagation(),J(u)},children:_?`${Q.collapseDetail} (${U})`:`${Q.expandDetail} (${U})`}):S.jsx("span",{}),Z>0&&S.jsxs("span",{className:"atlas-anchor-count",children:["#",Z]})]}),S.jsx(Z1,{type:"source",position:a.Right,className:"atlas-handle"})]})}var mV={atlasNode:cV};function KF({text:u,label:f,copiedLabel:$,testId:F="btn-copy-prompt",small:l=!1}){let[U,_]=Qu.useState(!1),Q=Qu.useRef(null);return S.jsx("button",{type:"button","data-testid":F,"data-copied":U?"true":"false",onClick:(q)=>{q.stopPropagation(),vV(u).then(()=>{if(_(!0),Q.current)clearTimeout(Q.current);Q.current=setTimeout(()=>_(!1),1800)})},className:`atlas-copy-btn ${l?"small":""} ${U?"copied":""}`,children:U?$:f})}function pV({target:u,t:f,onClose:$}){let[F,l]=Qu.useState("ask");if(!u||!u.deepDive)return null;let U=Array.isArray(u.deepDive.askPrompts)?u.deepDive.askPrompts:[],_=u.deepDive.subAtlasPrompt||"";return S.jsx("div",{className:"atlas-modal-backdrop","data-testid":"deep-dive-backdrop",onClick:$,children:S.jsxs("div",{className:"atlas-modal","data-testid":"deep-dive-panel",onClick:(Q)=>Q.stopPropagation(),children:[S.jsxs("div",{className:"atlas-modal-header",children:[S.jsxs("div",{children:[S.jsx("div",{className:"atlas-modal-kicker",children:f.deepDiveModalTitle}),S.jsx("h3",{className:"atlas-modal-title",children:u.title})]}),S.jsx("button",{type:"button","data-testid":"btn-close-deep-dive",className:"atlas-icon-close",onClick:$,children:f.close})]}),S.jsxs("div",{className:"atlas-modal-tabs",children:[S.jsxs("button",{type:"button","data-testid":"tab-ask-prompts",className:`atlas-tab-btn ${F==="ask"?"active":""}`,onClick:()=>l("ask"),children:[f.tabAsk," (",U.length,")"]}),_&&S.jsx("button",{type:"button","data-testid":"tab-recursive-prompt",className:`atlas-tab-btn ${F==="recursive"?"active":""}`,onClick:()=>l("recursive"),children:f.tabRecursive})]}),S.jsxs("div",{className:"atlas-modal-body",children:[F==="ask"&&S.jsx("div",{className:"atlas-prompt-list",children:U.map((Q,J)=>S.jsxs("div",{className:"atlas-prompt-card","data-testid":"ask-prompt-card",children:[S.jsxs("div",{className:"atlas-prompt-card-head",children:[S.jsx("strong",{children:Q.title}),S.jsx(KF,{text:Q.prompt,label:f.copyBtn,copiedLabel:f.copiedBtn,testId:`btn-copy-ask-${J}`})]}),S.jsx("pre",{className:"atlas-prompt-pre","data-testid":"ask-prompt-text",children:Q.prompt})]},J))}),F==="recursive"&&_&&S.jsxs("div",{className:"atlas-prompt-card","data-testid":"recursive-prompt-card",children:[S.jsx("p",{className:"atlas-hint-p",children:f.recursiveUsageHint}),S.jsxs("div",{className:"atlas-prompt-card-head",children:[S.jsx("strong",{children:"AtlasLoop L1+"}),S.jsx(KF,{text:_,label:f.copyBtn,copiedLabel:f.copiedBtn,testId:"btn-copy-recursive"})]}),S.jsx("pre",{className:"atlas-prompt-pre","data-testid":"recursive-prompt-text",children:_})]})]})]})})}function bV({data:u}){let f=u.meta||{},$=Qu.useMemo(()=>hV(f),[f]),F=Array.isArray(u.streams)?u.streams:[],[l,U]=Qu.useState("all"),[_,Q]=Qu.useState(()=>new Set),[J,q]=Qu.useState(!1),[T,W]=Qu.useState(!1),[A,K]=Qu.useState(!1),[L,z]=Qu.useState(""),[Z,B]=Qu.useState(null),[G,w]=Qu.useState(null),[H,M]=Qu.useState(0),R=k3(),E=Qu.useRef(null),V=Qu.useCallback((N)=>{Q((b)=>{let s=new Set(b);if(s.has(N))s.delete(N);else s.add(N);return s})},[]),D=Qu.useCallback((N)=>{w(N)},[]),r=Qu.useCallback((N)=>{B(N)},[]),C=Qu.useMemo(()=>({onToggleExpand:V,onOpenDeepDive:D,onSelectNode:r}),[V,D,r]),m=Qu.useMemo(()=>xV(u,l,_,$,C),[u,l,_,$,C,H]),[v,Y,X]=Lq(m.nodes),[O,j,k]=Gq(m.edges);Qu.useEffect(()=>{Y(m.nodes),j(m.edges)},[m,Y,j]),Qu.useEffect(()=>{Y((N)=>N.map((b)=>{let s=b.id===Z;return b.selected===s?b:{...b,selected:s}}))},[Z,Y]),Qu.useEffect(()=>{if(E.current){let N=E.current;if(v.some((s)=>s.id===N))E.current=null,requestAnimationFrame(()=>{R.fitView({nodes:[{id:N}],padding:0.45,duration:0})})}},[v,R]);let P=Qu.useCallback(()=>{R.fitView({padding:0.18,duration:0})},[R]),c=Qu.useCallback(()=>{U("all"),Q(new Set),z(""),B(null),w(null),K(!1),q(!1),M((N)=>N+1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{R.fitView({padding:0.18,duration:0})})})},[R]),x=Qu.useMemo(()=>{let N=[];for(let b of u.nodes||[]){let s=(b.anchors||[]).map((e)=>[e.label,e.filePath,e.symbol,e.content,e.citation,e.url].filter(Boolean).join(" ")).join(" "),d=(b.deepDive?.askPrompts||[]).map((e)=>`${e.title} ${e.prompt}`).join(" ");N.push({flowId:b.id,parentId:null,title:b.title,summary:b.summary||"",isSub:!1,haystack:`${b.title} ${b.summary||""} ${b.whyItMatters||""} ${s} ${d}`.toLowerCase()});for(let e of b.detailGraph?.nodes||[]){let lu=(e.anchors||[]).map((Uu)=>[Uu.label,Uu.filePath,Uu.symbol,Uu.content,Uu.citation,Uu.url].filter(Boolean).join(" ")).join(" ");N.push({flowId:`${b.id}::${e.id}`,parentId:b.id,title:e.title,summary:`${b.title} → ${e.summary||""}`,isSub:!0,haystack:`${e.title} ${e.summary||""} ${b.title} ${lu}`.toLowerCase()})}}return N},[u.nodes]),g=Qu.useMemo(()=>{let N=L.trim().toLowerCase();if(!N)return[];return x.filter((b)=>b.haystack.includes(N)).slice(0,12)},[L,x]),$u=(N)=>{if(l!=="all")U("all");if(N.parentId&&!_.has(N.parentId))Q((s)=>{let d=new Set(s);return d.add(N.parentId),d});if(B(N.flowId),E.current=N.flowId,z(""),v.some((s)=>s.id===N.flowId))E.current=null,requestAnimationFrame(()=>{R.fitView({nodes:[{id:N.flowId}],padding:0.45,duration:0})})},i=Qu.useMemo(()=>{if(!Z)return null;if(Z.includes("::")){let[N,b]=Z.split("::"),s=(u.nodes||[]).find((e)=>e.id===N),d=(s?.detailGraph?.nodes||[]).find((e)=>e.id===b);return d?{...d,_parentTitle:s?.title}:null}return(u.nodes||[]).find((N)=>N.id===Z)||null},[Z,u.nodes]),fu=Qu.useMemo(()=>{if(l==="all")return F[0]||null;return F.find((N)=>N.id===l)||null},[l,F]),Fu=Qu.useMemo(()=>{let N=new Map;for(let b of u.nodes||[])N.set(b.id,b.title);return N},[u.nodes]),uu=Array.isArray(f.uncoveredScopes)?f.uncoveredScopes:[],h=Array.isArray(f.unverifiedNotes)?f.unverifiedNotes:[],n=uu.length+h.length;return S.jsxs("div",{className:"atlas-shell-root",children:[S.jsxs("header",{className:"atlas-topbar","data-testid":"atlas-topbar",children:[S.jsxs("div",{className:"atlas-topbar-left",children:[S.jsxs("div",{className:"atlas-top-badges",children:[f.parentMapHtml&&S.jsx("a",{href:f.parentMapHtml,"data-testid":"parent-map-link",className:"atlas-parent-link",children:$.backParent}),f.subjectTag&&S.jsx("span",{className:"atlas-subject-badge",children:f.subjectTag}),S.jsx("span",{className:"atlas-level-badge","data-testid":"level-badge",children:f.level&&Number(f.level)>0&&f.drillDownTarget?`${$.levelSubPrefix}${f.drillDownTarget}`:$.levelOverview})]}),S.jsx("h1",{className:"atlas-main-title",children:f.title}),f.subtitle&&S.jsx("p",{className:"atlas-subtitle",children:f.subtitle})]}),S.jsxs("div",{className:"atlas-topbar-right",children:[S.jsxs("div",{className:"atlas-model-pill","data-testid":"model-badge",children:[$.modelPrefix,f.generatedByModel]}),n>0&&S.jsxs("button",{type:"button","data-testid":"btn-scope-notes",className:"atlas-scope-btn",onClick:()=>K(!0),children:[$.scopeNotes," (",n,")"]})]})]}),S.jsxs("div",{className:"atlas-toolbar-row",children:[S.jsxs("div",{className:"atlas-streams-bar","data-testid":"stream-filter-bar",children:[S.jsx("button",{type:"button","data-testid":"stream-btn-all","data-active":l==="all"?"true":"false",className:`atlas-stream-pill ${l==="all"?"active":""}`,onClick:()=>U("all"),children:$.allStreams}),F.map((N)=>{let b=Boolean(N.deepDive&&(N.deepDive.askPrompts&&N.deepDive.askPrompts.length>0||N.deepDive.subAtlasPrompt));return S.jsxs("div",{className:"atlas-stream-pill-group",children:[S.jsx("button",{type:"button","data-testid":`stream-btn-${N.id}`,"data-active":l===N.id?"true":"false",className:`atlas-stream-pill ${l===N.id?"active":""}`,onClick:()=>U(N.id),children:N.title}),b&&S.jsx("button",{type:"button",title:N.deepDive.hoverHint||$.deepDiveBadgeTitle,"data-testid":`stream-deep-dive-${N.id}`,className:"atlas-stream-help-btn",onClick:()=>w({title:N.title,deepDive:N.deepDive}),children:"?"})]},N.id)})]}),S.jsxs("div",{className:"atlas-controls-group",children:[S.jsxs("div",{className:"atlas-search-box",children:[S.jsx("input",{type:"search","data-testid":"search-input",value:L,onChange:(N)=>z(N.target.value),placeholder:$.searchPlaceholder,className:"atlas-search-input"}),L.trim()!==""&&S.jsx("div",{className:"atlas-search-dropdown","data-testid":"search-results",children:g.length===0?S.jsx("div",{className:"atlas-search-empty",children:$.noSearchMatches}):g.map((N)=>S.jsxs("button",{type:"button","data-testid":"search-result-item","data-target-id":N.flowId,className:"atlas-search-item",onClick:()=>$u(N),children:[S.jsxs("div",{className:"atlas-search-item-title",children:[N.title,N.isSub&&S.jsx("span",{className:"atlas-sub-pill",children:$.nestedBadge})]}),N.summary&&S.jsx("div",{className:"atlas-search-item-sub",children:N.summary})]},N.flowId))})]}),S.jsxs("div",{className:"atlas-canvas-btns",children:[S.jsxs("button",{type:"button","data-testid":"btn-zoom-in",className:"atlas-ctrl-btn",onClick:()=>R.zoomIn({duration:0}),children:["+ ",$.zoomIn]}),S.jsxs("button",{type:"button","data-testid":"btn-zoom-out",className:"atlas-ctrl-btn",onClick:()=>R.zoomOut({duration:0}),children:["− ",$.zoomOut]}),S.jsx("button",{type:"button","data-testid":"btn-lock","data-locked":J?"true":"false",className:`atlas-ctrl-btn ${J?"locked":""}`,onClick:()=>q((N)=>!N),children:J?`\uD83D\uDD12 ${$.unlock}`:`\uD83D\uDD13 ${$.lock}`}),S.jsx("button",{type:"button","data-testid":"btn-fit-view",className:"atlas-ctrl-btn",onClick:P,children:$.fitView}),S.jsx("button",{type:"button","data-testid":"btn-reset",className:"atlas-ctrl-btn reset-btn",onClick:c,children:$.reset}),S.jsx("button",{type:"button","data-testid":"btn-legend",className:`atlas-ctrl-btn ${T?"active":""}`,onClick:()=>W((N)=>!N),children:$.legend})]})]})]}),fu&&Array.isArray(fu.learningOrder)&&fu.learningOrder.length>0&&S.jsxs("div",{className:"atlas-reading-bar","data-testid":"learning-order-bar",children:[S.jsx("span",{className:"atlas-reading-label",children:$.learningPath}),S.jsx("div",{className:"atlas-reading-steps",children:fu.learningOrder.map((N,b)=>{let s=Fu.get(N)||N;return S.jsxs("button",{type:"button","data-testid":`learning-step-${b}`,className:`atlas-step-chip ${Z===N?"active":""}`,onClick:()=>{B(N),R.fitView({nodes:[{id:N}],padding:0.45,duration:0})},children:[S.jsx("span",{className:"atlas-step-num",children:b+1}),s]},N)})})]}),S.jsxs("div",{className:"atlas-main-workspace",children:[S.jsxs("div",{className:"atlas-canvas-container","data-testid":"atlas-canvas-wrap",children:[S.jsxs(Bq,{nodes:v,edges:O,nodeTypes:mV,onNodesChange:X,onEdgesChange:k,nodesDraggable:!J,nodesConnectable:!1,elementsSelectable:!0,fitView:!0,fitViewOptions:{padding:0.18},minZoom:0.15,maxZoom:2.5,proOptions:{hideAttribution:!0},children:[S.jsx(zq,{gap:20,size:1,color:"#cbd5e1"}),S.jsx(Rq,{pannable:!0,zoomable:!0,nodeColor:(N)=>{let b=N.data?.item?.role;return _5[b]?.accent||"#64748b"},style:{border:"1px solid #cbd5e1",borderRadius:8}})]}),T&&S.jsx("div",{className:"atlas-legend-card","data-testid":"legend-panel",children:Object.entries(_5).map(([N,b])=>S.jsxs("div",{className:"atlas-legend-row",children:[S.jsx("span",{className:"atlas-legend-swatch",style:{background:b.accent}}),S.jsx("span",{children:$.roles[N]||N})]},N))})]}),i&&S.jsxs("aside",{className:"atlas-inspector","data-testid":"inspector-panel",children:[S.jsxs("div",{className:"atlas-inspector-head",children:[S.jsxs("div",{children:[i._parentTitle&&S.jsx("div",{className:"atlas-inspector-parent",children:i._parentTitle}),S.jsx("h2",{className:"atlas-inspector-title",children:i.title})]}),S.jsx("button",{type:"button","data-testid":"btn-close-inspector",className:"atlas-icon-close",onClick:()=>B(null),children:$.close})]}),S.jsxs("div",{className:"atlas-inspector-meta",children:[S.jsx("span",{className:`atlas-conf-badge ${i.confidence==="unverified"?"warn":"ok"}`,children:i.confidence==="unverified"?$.unverifiedTag:$.verifiedTag}),i.unverifiedReason&&S.jsx("p",{className:"atlas-unverified-note",children:i.unverifiedReason})]}),i.summary&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.whatItDoes}),S.jsx("p",{children:i.summary})]}),i.whyItMatters&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.whyItMatters}),S.jsx("p",{children:i.whyItMatters})]}),(i.keyFactors?.inputs||i.keyFactors?.outputs)&&S.jsxs("section",{className:"atlas-sec",children:[i.keyFactors.inputs&&S.jsxs("div",{className:"atlas-kv",children:[S.jsxs("strong",{children:[$.inputsLabel,":"]}),S.jsx("span",{children:i.keyFactors.inputs})]}),i.keyFactors.outputs&&S.jsxs("div",{className:"atlas-kv",children:[S.jsxs("strong",{children:[$.outputsLabel,":"]}),S.jsx("span",{children:i.keyFactors.outputs})]})]}),i.mechanismsAndEffects&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.mechanismsLabel}),S.jsx("p",{children:i.mechanismsAndEffects})]}),i.watchouts&&S.jsxs("section",{className:"atlas-sec atlas-watchout-box",children:[S.jsx("h4",{children:$.watchoutsLabel}),S.jsx("p",{children:i.watchouts})]}),Array.isArray(i.anchors)&&i.anchors.length>0&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.anchorsLabel}),S.jsx("div",{className:"atlas-anchor-list",children:i.anchors.map((N,b)=>S.jsxs("div",{className:"atlas-anchor-card","data-testid":"anchor-item",children:[S.jsx("div",{className:"atlas-anchor-label",children:N.label}),N.kind==="editor"&&S.jsxs("div",{className:"atlas-anchor-editor",children:[S.jsxs("code",{children:[N.filePath,":",N.line||1,N.symbol?` (${N.symbol})`:""]}),N.unsupportedNote?S.jsx("div",{className:"atlas-unverified-note",children:N.unsupportedNote}):S.jsxs(S.Fragment,{children:[S.jsxs("a",{href:N.editorUri,"data-testid":"editor-jump-link",className:"atlas-editor-btn",children:[$.openInEditor," (",(N.editor||"vscode").toUpperCase(),")"]}),S.jsx("div",{className:"atlas-editor-hint",children:$.editorConfirmHint})]})]}),N.kind==="snippet"&&S.jsxs("div",{className:"atlas-anchor-snippet",children:[S.jsx("pre",{children:N.content}),S.jsx(KF,{text:N.content||"",label:$.copySnippet,copiedLabel:$.copiedBtn,testId:`btn-copy-snippet-${b}`,small:!0})]}),N.kind==="link"&&S.jsx("a",{href:N.url,target:"_blank",rel:"noopener noreferrer",className:"atlas-ext-link",children:N.url}),N.kind==="source"&&S.jsx("div",{className:"atlas-source-cite",children:N.citation})]},b))})]}),i.deepDive&&S.jsx("section",{className:"atlas-sec",children:S.jsxs("button",{type:"button","data-testid":"inspector-open-deep-dive",className:"atlas-open-dive-btn",onClick:()=>w({title:i.title,deepDive:i.deepDive}),children:["? ",$.openDeepDiveBtn]})})]})]}),S.jsx(pV,{target:G,t:$,onClose:()=>w(null)}),A&&S.jsx("div",{className:"atlas-modal-backdrop",onClick:()=>K(!1),children:S.jsxs("div",{className:"atlas-modal",onClick:(N)=>N.stopPropagation(),children:[S.jsxs("div",{className:"atlas-modal-header",children:[S.jsx("h3",{className:"atlas-modal-title",children:$.scopeNotes}),S.jsx("button",{type:"button",className:"atlas-icon-close",onClick:()=>K(!1),children:$.close})]}),S.jsxs("div",{className:"atlas-modal-body",children:[uu.length>0&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.uncoveredTitle}),S.jsx("ul",{children:uu.map((N,b)=>S.jsx("li",{children:N},b))})]}),h.length>0&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.unverifiedTitle}),S.jsx("ul",{children:h.map((N,b)=>S.jsx("li",{children:N},b))})]})]})]})})]})}function iV(){let u=document.getElementById("atlas-data-json"),f=u?JSON.parse(u.textContent):window.__ATLAS_DATA__||{},$=document.getElementById("root");aA.createRoot($).render(S.jsx(t$,{children:S.jsx(bV,{data:f})}))}iV();})();
1839
+ `)),c=u.reduce((f,d)=>f.concat(...d),[]);return[u,c]}return[[],[]]},[e]);return(0,T.useEffect)(()=>{let a=t?.target??xy,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(o.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!o.current||o.current&&!u)&&Td(h))return!1;let w=Sy(h.code,l);if(i.current.add(h[w]),Ey(s,i.current,!1)){let x=h.composedPath?.()?.[0]||h.target,g=x?.nodeName==="BUTTON"||x?.nodeName==="A";t.preventDefault!==!1&&(o.current||!g)&&h.preventDefault(),r(!0)}},f=h=>{let m=Sy(h.code,l);Ey(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(h[m]),h.key==="Meta"&&i.current.clear(),o.current=!1},d=()=>{i.current.clear(),r(!1)};return a?.addEventListener("keydown",c),a?.addEventListener("keyup",f),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{a?.removeEventListener("keydown",c),a?.removeEventListener("keyup",f),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function Ey(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Sy(e,t){return t.includes(e)?"code":"key"}var Db=()=>{let e=ge();return(0,T.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:o,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),a=Ii(t,r,o,i,s,n?.padding??.1);return l?(await l.setViewport(a,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;let{x:l,y:a}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},c=n.snapGrid??o,f=n.snapToGrid??i;return go(u,r,f,c)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:o,y:i}=r.getBoundingClientRect(),s=yr(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function Uy(e,t){let n=[],r=new Map,o=[];for(let i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{let s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(let i of t){let s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}let l={...i};for(let a of s)Lb(a,l);n.push(l)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function Lb(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Yy(e,t){return Uy(e,t)}function qy(e,t){return Uy(e,t)}function wr(e,t){return{id:e,type:"select",selected:t}}function vo(e,t=new Set){let n=[];for(let[r,o]of e){let i=t.has(r);!(o.selected===void 0&&!i)&&o.selected!==i&&n.push(wr(o.id,i))}return n}function ky({items:e=[],lookup:t}){let n=[],r=new Map(e.map(o=>[o.id,o]));for(let[o,i]of e.entries()){let s=t.get(i.id),l=s?.internals?.userNode??s;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:o})}for(let[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function _y(e){return{id:e.id,type:"remove"}}var zb=Cd("React Flow","https://reactflow.dev/");function Ab(e,t,n={}){return L0(e,t,{...n,onError:n.onError??zb})}var Ny=e=>_0(e),Rb=e=>xd(e);function Xy(e){return(0,T.forwardRef)(e)}var Gy=typeof window<"u"?T.useLayoutEffect:T.useEffect;function Cy(e){let[t,n]=(0,T.useState)(BigInt(0)),[r]=(0,T.useState)(()=>$b(()=>n(o=>o+BigInt(1))));return Gy(()=>{let o=r.get();o.length&&(e(o),r.reset())},[t]),r}function $b(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Zy=(0,T.createContext)(null);function Bb({children:e}){let t=ge(),n=(0,T.useCallback)(l=>{let{nodes:a=[],setNodes:u,hasDefaultNodes:c,onNodesChange:f,nodeLookup:d,fitViewQueued:h,onNodesChangeMiddlewareMap:m}=t.getState(),w=a;for(let g of l)w=typeof g=="function"?g(w):g;let x=ky({items:w,lookup:d});for(let g of m.values())x=g(x);c&&u(w),x.length>0?f?.(x):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:g,nodes:y,setNodes:p}=t.getState();g&&p(y)})},[]),r=Cy(n),o=(0,T.useCallback)(l=>{let{edges:a=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:f,edgeLookup:d}=t.getState(),h=a;for(let m of l)h=typeof m=="function"?m(h):m;c?u(h):f&&f(ky({items:h,lookup:d}))},[]),i=Cy(o),s=(0,T.useMemo)(()=>({nodeQueue:r,edgeQueue:i}),[]);return(0,D.jsx)(Zy.Provider,{value:s,children:e})}function Hb(){let e=(0,T.useContext)(Zy);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var Fb=e=>!!e.panZoom;function Ti(){let e=Db(),t=ge(),n=Hb(),r=ue(Fb),o=(0,T.useMemo)(()=>{let i=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},a=f=>{let{nodeLookup:d,nodeOrigin:h}=t.getState(),m=Ny(f)?f:d.get(f.id),w=m.parentId?Md(m.position,m.measured,m.parentId,d,h):m.position,x={...m,position:w,width:m.measured?.width??m.width,height:m.measured?.height??m.height};return ho(x,m.parentId?void 0:h)},u=(f,d,h={replace:!1})=>{s(m=>m.map(w=>{if(w.id===f){let x=typeof d=="function"?d(w):d;return h.replace&&Ny(x)?x:{...w,...x}}return w}))},c=(f,d,h={replace:!1})=>{l(m=>m.map(w=>{if(w.id===f){let x=typeof d=="function"?d(w):d;return h.replace&&Rb(x)?x:{...w,...x}}return w}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>i(f)?.internals.userNode,getInternalNode:i,getEdges:()=>{let{edges:f=[]}=t.getState();return f.map(d=>({...d}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{let d=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...d])},addEdges:f=>{let d=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{let{nodes:f=[],edges:d=[],transform:h}=t.getState(),[m,w,x]=h;return{nodes:f.map(g=>({...g})),edges:d.map(g=>({...g})),viewport:{x:m,y:w,zoom:x}}},deleteElements:async({nodes:f=[],edges:d=[]})=>{let{nodes:h,edges:m,onNodesDelete:w,onEdgesDelete:x,triggerNodeChanges:g,triggerEdgeChanges:y,onDelete:p,onBeforeDelete:v}=t.getState(),{nodes:k,edges:S}=await b0({nodesToRemove:f,edgesToRemove:d,nodes:h,edges:m,onBeforeDelete:v}),_=S.length>0,N=k.length>0;if(_){let M=S.map(_y);x?.(S),y(M)}if(N){let M=k.map(_y);w?.(k),g(M)}return(N||_)&&p?.({nodes:k,edges:S}),{deletedNodes:k,deletedEdges:S}},getIntersectingNodes:(f,d=!0,h)=>{let m=Nd(f),w=m?f:a(f),x=h!==void 0;if(!w)return[];let{nodeOrigin:g}=t.getState();return(h||t.getState().nodes).filter(y=>{let p=t.getState().nodeLookup.get(y.id);if(p&&!m&&(y.id===f.id||!p.internals.positionAbsolute))return!1;let v=ho(x?y:p,g),k=Mi(v,w);return d&&k>0||k>=v.width*v.height||k>=w.width*w.height})},isNodeIntersecting:(f,d,h=!0)=>{let w=Nd(f)?f:a(f);if(!w)return!1;let x=Mi(w,d);return h&&x>0||x>=d.width*d.height||x>=w.width*w.height},updateNode:u,updateNodeData:(f,d,h={replace:!1})=>{u(f,m=>{let w=typeof d=="function"?d(m):d;return h.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},h)},updateEdge:c,updateEdgeData:(f,d,h={replace:!1})=>{c(f,m=>{let w=typeof d=="function"?d(m):d;return h.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},h)},getNodesBounds:f=>{let{nodeLookup:d,nodeOrigin:h}=t.getState();return Sd(f,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:f,id:d,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${f}${d?`-${d}`:""}`)?.values()??[]),getNodeConnections:({type:f,handleId:d,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${f?d?`-${f}-${d}`:`-${f}`:""}`)?.values()??[]),fitView:async f=>{let d=t.getState().fitViewResolver??P0();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:d}),n.nodeQueue.push(h=>[...h]),d.promise}}},[]);return(0,T.useMemo)(()=>({...o,...e,viewportInitialized:r}),[r])}var by=e=>e.selected,Vb=typeof window<"u"?window:void 0;function jb({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=ge(),{deleteElements:r}=Ti(),o=Oi(e,{actInsideInputWithModifier:!1}),i=Oi(t,{target:Vb});(0,T.useEffect)(()=>{if(o){let{edges:s,nodes:l}=n.getState();r({nodes:l.filter(by),edges:s.filter(by)}),n.setState({nodesSelectionActive:!1})}},[o]),(0,T.useEffect)(()=>{n.setState({multiSelectionActive:i})},[i])}function Wb(e){let t=ge();(0,T.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let r=Rl(e.current);(r.height===0||r.width===0)&&t.getState().onError?.("004",st.error004()),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);let r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r.disconnect()}}},[])}var Kl={position:"absolute",width:"100%",height:"100%",top:0,left:0},Ub=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Yb({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:o,panOnScrollSpeed:i=.5,panOnScrollMode:s=dn.Free,zoomOnDoubleClick:l=!0,panOnDrag:a=!0,defaultViewport:u,translateExtent:c,minZoom:f,maxZoom:d,zoomActivationKeyCode:h,preventScrolling:m=!0,children:w,noWheelClassName:x,noPanClassName:g,onViewportChange:y,isControlledViewport:p,paneClickDistance:v,selectionOnDrag:k}){let S=ge(),_=(0,T.useRef)(null),{userSelectionActive:N,lib:M,connectionInProgress:A}=ue(Ub,ye),R=Oi(h),V=(0,T.useRef)();Wb(_);let B=(0,T.useCallback)(E=>{y?.({x:E[0],y:E[1],zoom:E[2]}),p||S.setState({transform:E})},[y,p]);return(0,T.useEffect)(()=>{if(_.current){V.current=Q0({domNode:_.current,minZoom:f,maxZoom:d,translateExtent:c,viewport:u,onDraggingChange:P=>S.setState(L=>L.paneDragging===P?L:{paneDragging:P}),onPanZoomStart:(P,L)=>{let{onViewportChangeStart:z,onMoveStart:F}=S.getState();F?.(P,L),z?.(L)},onPanZoom:(P,L)=>{let{onViewportChange:z,onMove:F}=S.getState();F?.(P,L),z?.(L)},onPanZoomEnd:(P,L)=>{let{onViewportChangeEnd:z,onMoveEnd:F}=S.getState();F?.(P,L),z?.(L)}});let{x:E,y:b,zoom:I}=V.current.getViewport();return S.setState({panZoom:V.current,transform:[E,b,I],domNode:_.current.closest(".react-flow")}),()=>{V.current?.destroy()}}},[]),(0,T.useEffect)(()=>{V.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:l,panOnDrag:a,zoomActivationKeyPressed:R,preventScrolling:m,noPanClassName:g,userSelectionActive:N,noWheelClassName:x,lib:M,onTransformChange:B,connectionInProgress:A,selectionOnDrag:k,paneClickDistance:v})},[e,t,n,r,o,i,s,l,a,R,m,g,N,x,M,B,A,k,v]),(0,D.jsx)("div",{className:"react-flow__renderer",ref:_,style:Kl,children:w})}var qb=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Xb(){let{userSelectionActive:e,userSelectionRect:t}=ue(qb,ye);return e&&t?(0,D.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Vd=(e,t)=>n=>{n.target===t.current&&e?.(n)},Gb=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Zb({isSelecting:e,selectionKeyPressed:t,selectionMode:n=gr.Full,panOnDrag:r,autoPanOnSelection:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:a,onPaneClick:u,onPaneContextMenu:c,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:h,onPaneMouseLeave:m,children:w}){let x=(0,T.useRef)(0),g=ge(),{userSelectionActive:y,elementsSelectable:p,dragging:v,panBy:k,autoPanSpeed:S}=ue(Gb,ye),_=p&&(e||y),N=(0,T.useRef)(null),M=(0,T.useRef)(),A=(0,T.useRef)(new Set),R=(0,T.useRef)(new Set),V=(0,T.useRef)(!1),B=(0,T.useRef)(!1),E=(0,T.useRef)({x:0,y:0}),b=(0,T.useRef)(!1),I=$=>{if(B.current||V.current||g.getState().connection.inProgress){B.current=!1,V.current=!1;return}let{connectionClickStartHandle:G,connection:O,onClickConnectEnd:W,resetSelectedElements:q}=g.getState();if(G){let Z=structuredClone(O);delete Z.inProgress,Z.toPosition=Z.toHandle?Z.toHandle.position:null,W?.($.nativeEvent,Z),g.setState({connectionClickStartHandle:null})}u?.($),q(),g.setState({nodesSelectionActive:!1})},P=$=>{if(Array.isArray(r)&&r?.includes(2)){$.preventDefault();return}c?.($)},L=f?$=>f($):void 0,z=$=>{B.current&&($.stopPropagation(),B.current=!1)},F=$=>{if($.pointerType==="touch"&&r!==!1&&!t)return;let{domNode:G,transform:O}=g.getState();if(M.current=G?.getBoundingClientRect(),!M.current)return;let W=$.target===N.current;if(!W&&!!$.target.closest(".nokey")||!e||!(s&&W||t)||$.button!==0||!$.isPrimary)return;$.target?.setPointerCapture?.($.pointerId),B.current=!1;let{x:J,y:ie}=gt($.nativeEvent,M.current),se=go({x:J,y:ie},O);g.setState({userSelectionRect:{width:0,height:0,startX:se.x,startY:se.y,x:J,y:ie}}),W||($.stopPropagation(),$.preventDefault())};function H($,G){let{userSelectionRect:O}=g.getState();if(!O)return;let{transform:W,nodeLookup:q,edgeLookup:Z,connectionLookup:J,triggerNodeChanges:ie,triggerEdgeChanges:se,defaultEdgeOptions:Te}=g.getState(),Ut={x:O.startX,y:O.startY},{x:Ot,y:Tt}=yr(Ut,W),Yt={startX:Ut.x,startY:Ut.y,x:$<Ot?$:Ot,y:G<Tt?G:Tt,width:Math.abs($-Ot),height:Math.abs(G-Tt)},wo=A.current,jn=R.current;A.current=new Set(Dl(q,Yt,W,n===gr.Partial,!0).map(wt=>wt.id)),R.current=new Set;let Wn=Te?.selectable??!0;for(let wt of A.current){let qt=J.get(wt);if(qt)for(let{edgeId:Xt}of qt.values()){let Un=Z.get(Xt);Un&&(Un.selectable??Wn)&&R.current.add(Xt)}}if(!Id(wo,A.current)){let wt=vo(q,A.current);ie(wt)}if(!Id(jn,R.current)){let wt=vo(Z,R.current);se(wt)}g.setState({userSelectionRect:Yt,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!o||!M.current)return;let[$,G]=Ll(E.current,M.current,S);k({x:$,y:G}).then(O=>{if(!B.current||!O){x.current=requestAnimationFrame(Y);return}let{x:W,y:q}=E.current;H(W,q),x.current=requestAnimationFrame(Y)})}let ne=()=>{cancelAnimationFrame(x.current),x.current=0,b.current=!1};(0,T.useEffect)(()=>()=>ne(),[]);let U=$=>{let{userSelectionRect:G,transform:O,resetSelectedElements:W}=g.getState();if(!M.current||!G)return;let{x:q,y:Z}=gt($.nativeEvent,M.current);E.current={x:q,y:Z};let J=yr({x:G.startX,y:G.startY},O);if(!B.current){let ie=t?0:i;if(Math.hypot(q-J.x,Z-J.y)<=ie)return;W(),l?.($)}B.current=!0,b.current||(Y(),b.current=!0),H(q,Z)},te=$=>{if(!_){$.target===N.current&&g.getState().connection.inProgress&&(V.current=!0);return}$.button===0&&($.target?.releasePointerCapture?.($.pointerId),!y&&$.target===N.current&&g.getState().userSelectionRect&&I?.($),g.setState({userSelectionActive:!1,userSelectionRect:null}),B.current&&(a?.($),g.setState({nodesSelectionActive:A.current.size>0})),ne())},re=$=>{$.target?.releasePointerCapture?.($.pointerId),ne()},ee=r===!0||Array.isArray(r)&&r.includes(0);return(0,D.jsxs)("div",{className:Se(["react-flow__pane",{draggable:ee,dragging:v,selection:e}]),onClick:_?void 0:Vd(I,N),onContextMenu:Vd(P,N),onWheel:Vd(L,N),onPointerEnter:_?void 0:d,onPointerMove:_?U:h,onPointerUp:te,onPointerCancel:_?re:void 0,onPointerDownCapture:_?F:void 0,onClickCapture:_?z:void 0,onPointerLeave:m,ref:N,style:Kl,children:[w,(0,D.jsx)(Xb,{})]})}function Wd({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a?.("012",st.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):o([e])}function Qy({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){let l=ge(),[a,u]=(0,T.useState)(!1),c=(0,T.useRef)();return(0,T.useEffect)(()=>{if(!t)return c.current=j0({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{Wd({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}}),()=>{c.current?.destroy(),c.current=void 0}},[t,l,e]),(0,T.useEffect)(()=>{t||!e.current||!c.current||c.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s})},[n,r,t,i,e,o,s]),a}var Qb=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Ky(){let e=ge();return(0,T.useCallback)(n=>{let{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:c}=e.getState(),f=new Map,d=Qb(s),h=o?i[0]:5,m=o?i[1]:5,w=n.direction.x*h*n.factor,x=n.direction.y*m*n.factor;for(let[,g]of u){if(!d(g))continue;let y={x:g.internals.positionAbsolute.x+w,y:g.internals.positionAbsolute.y+x};o&&(y=po(y,i));let{position:p,positionAbsolute:v}=kd({nodeId:g.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:c,onError:l});g.position=p,g.internals.positionAbsolute=v,f.set(g.id,g)}a(f)},[])}var Ud=(0,T.createContext)(null),Kb=Ud.Provider;Ud.Consumer;var Jy=()=>(0,T.useContext)(Ud),Jb=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),ev=(0,T.createContext)(null);function eM({children:e}){let t=ue(Jb,ye);return(0,D.jsx)(ev.Provider,{value:t,children:e})}function tM(){let e=(0,T.useContext)(ev);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}var nM={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},rM=(e,t,n)=>r=>{let{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s;if(!l&&!o)return nM;let c=a?.nodeId===e&&a?.id===t&&a?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:c,clickConnecting:o?.nodeId===e&&o?.id===t&&o?.type===n,isPossibleEndHandle:i===Bn.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!o,valid:c&&u}};function oM({type:e="source",position:t=Q.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:c,onTouchStart:f,...d},h){let m=s||null,w=e==="target",x=ge(),g=Jy(),{connectOnClick:y,noPanClassName:p,rfId:v}=tM(),{connectingFrom:k,connectingTo:S,clickConnecting:_,isPossibleEndHandle:N,connectionInProcess:M,clickConnectionInProcess:A,valid:R}=ue(rM(g,m,e),ye);g||x.getState().onError?.("010",st.error010());let V=b=>{let{defaultEdgeOptions:I,onConnect:P,hasDefaultEdges:L}=x.getState(),z={...I,...b};if(L){let{edges:F,setEdges:H,onError:Y}=x.getState();H(Ab(z,F,{onError:Y}))}P?.(z),l?.(z)},B=b=>{if(!g)return;let I=Dd(b.nativeEvent);if(o&&(I&&b.button===0||!I)){let P=x.getState();Wl.onPointerDown(b.nativeEvent,{handleDomNode:b.currentTarget,autoPanOnConnect:P.autoPanOnConnect,connectionMode:P.connectionMode,connectionRadius:P.connectionRadius,domNode:P.domNode,nodeLookup:P.nodeLookup,lib:P.lib,isTarget:w,handleId:m,nodeId:g,flowId:P.rfId,panBy:P.panBy,cancelConnection:P.cancelConnection,onConnectStart:P.onConnectStart,onConnectEnd:(...L)=>x.getState().onConnectEnd?.(...L),updateConnection:P.updateConnection,onConnect:V,isValidConnection:n||((...L)=>x.getState().isValidConnection?.(...L)??!0),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:P.autoPanSpeed,dragThreshold:P.connectionDragThreshold})}I?c?.(b):f?.(b)},E=b=>{let{onClickConnectStart:I,onClickConnectEnd:P,connectionClickStartHandle:L,connectionMode:z,isValidConnection:F,lib:H,rfId:Y,nodeLookup:ne,connection:U}=x.getState();if(!g||!L&&!o)return;if(!L){I?.(b.nativeEvent,{nodeId:g,handleId:m,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:g,type:e,id:m}});return}let te=Od(b.target),re=n||F,{connection:ee,isValid:$}=Wl.isValid(b.nativeEvent,{handle:{nodeId:g,id:m,type:e},connectionMode:z,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:re,flowId:Y,doc:te,lib:H,nodeLookup:ne});$&&ee&&V(ee);let G=structuredClone(U);delete G.inProgress,G.toPosition=G.toHandle?G.toHandle.position:null,P?.(b,G),x.setState({connectionClickStartHandle:null})};return(0,D.jsx)("div",{"data-handleid":m,"data-nodeid":g,"data-handlepos":t,"data-id":`${v}-${g}-${m}-${e}`,className:Se(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",p,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:_,connectingfrom:k,connectingto:S,valid:R,connectionindicator:r&&(!M||N)&&(M||A?i:o)}]),onMouseDown:B,onTouchStart:B,onClick:y?E:void 0,ref:h,...d,children:a})}var xr=(0,T.memo)(Xy(oM));function iM({data:e,isConnectable:t,sourcePosition:n=Q.Bottom}){return(0,D.jsxs)(D.Fragment,{children:[e?.label,(0,D.jsx)(xr,{type:"source",position:n,isConnectable:t})]})}function sM({data:e,isConnectable:t,targetPosition:n=Q.Top,sourcePosition:r=Q.Bottom}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(xr,{type:"target",position:n,isConnectable:t}),e?.label,(0,D.jsx)(xr,{type:"source",position:r,isConnectable:t})]})}function lM(){return null}function aM({data:e,isConnectable:t,targetPosition:n=Q.Top}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(xr,{type:"target",position:n,isConnectable:t}),e?.label]})}var Gl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},My={input:iM,default:sM,output:aM,group:lM};function uM(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var cM=e=>{let{width:t,height:n,x:r,y:o}=fo(e.nodeLookup,{filter:i=>!!i.selected});return{width:pt(t)?t:null,height:pt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function dM({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=ge(),{width:o,height:i,transformString:s,userSelectionActive:l}=ue(cM,ye),a=Ky(),u=(0,T.useRef)(null);(0,T.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!l&&o!==null&&i!==null;if(Qy({nodeRef:u,disabled:!c}),!c)return null;let f=e?h=>{let m=r.getState().nodes.filter(w=>w.selected);e(h,m)}:void 0,d=h=>{Object.prototype.hasOwnProperty.call(Gl,h.key)&&(h.preventDefault(),a({direction:Gl[h.key],factor:h.shiftKey?4:1}))};return(0,D.jsx)("div",{className:Se(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:(0,D.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}var Iy=typeof window<"u"?window:void 0,fM=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function tv({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:c,selectionMode:f,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:m,panActivationKeyCode:w,zoomActivationKeyCode:x,elementsSelectable:g,zoomOnScroll:y,zoomOnPinch:p,panOnScroll:v,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:_,panOnDrag:N,autoPanOnSelection:M,defaultViewport:A,translateExtent:R,minZoom:V,maxZoom:B,preventScrolling:E,onSelectionContextMenu:b,noWheelClassName:I,noPanClassName:P,disableKeyboardA11y:L,onViewportChange:z,isControlledViewport:F}){let{nodesSelectionActive:H,userSelectionActive:Y}=ue(fM,ye),ne=Oi(u,{target:Iy}),U=Oi(w,{target:Iy}),te=U||N,re=U||v,ee=c&&te!==!0,$=ne||Y||ee;return jb({deleteKeyCode:a,multiSelectionKeyCode:m}),(0,D.jsx)(Yb,{onPaneContextMenu:i,elementsSelectable:g,zoomOnScroll:y,zoomOnPinch:p,panOnScroll:re,panActivationKeyPressed:U,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:_,panOnDrag:!ne&&te,defaultViewport:A,translateExtent:R,minZoom:V,maxZoom:B,zoomActivationKeyCode:x,preventScrolling:E,noWheelClassName:I,noPanClassName:P,onViewportChange:z,isControlledViewport:F,paneClickDistance:l,selectionOnDrag:ee,children:(0,D.jsxs)(Zb,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:te,autoPanOnSelection:M,isSelecting:!!$,selectionMode:f,selectionKeyPressed:ne,paneClickDistance:l,selectionOnDrag:ee,children:[e,H&&(0,D.jsx)(dM,{onSelectionContextMenu:b,noPanClassName:P,disableKeyboardA11y:L})]})})}tv.displayName="FlowRenderer";var hM=(0,T.memo)(tv),pM=e=>t=>e?Dl(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function gM(e){return ue((0,T.useCallback)(pM(e),[e]),ye)}var mM=e=>e.updateNodeInternals;function yM(){let e=ue(mM),[t]=(0,T.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let r=new Map;n.forEach(o=>{let i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return(0,T.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function vM({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let o=ge(),i=(0,T.useRef)(null),s=(0,T.useRef)(null),l=(0,T.useRef)(e.sourcePosition),a=(0,T.useRef)(e.targetPosition),u=(0,T.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,T.useEffect)(()=>{i.current&&!e.hidden&&(!c||s.current!==i.current)&&(s.current&&r?.unobserve(s.current),r?.observe(i.current),s.current=i.current)},[c,e.hidden]),(0,T.useEffect)(()=>()=>{s.current&&(r?.unobserve(s.current),s.current=null)},[]),(0,T.useEffect)(()=>{if(i.current){let f=u.current!==t,d=l.current!==e.sourcePosition,h=a.current!==e.targetPosition;(f||d||h)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function wM({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:c,resizeObserver:f,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:m,rfId:w,nodeTypes:x,nodeClickDistance:g,onError:y}){let{node:p,internals:v,isParent:k}=ue($=>{let G=$.nodeLookup.get(e),O=$.parentLookup.has(e);return{node:G,internals:G.internals,isParent:O}},ye),S=p.type||"default",_=x?.[S]||My[S];_===void 0&&(y?.("003",st.error003(S)),S="default",_=x?.default||My.default);let N=!!(p.draggable||l&&typeof p.draggable>"u"),M=!!(p.selectable||a&&typeof p.selectable>"u"),A=!!(p.connectable||u&&typeof p.connectable>"u"),R=!!(p.focusable||c&&typeof p.focusable>"u"),V=ge(),B=bd(p),E=vM({node:p,nodeType:S,hasDimensions:B,resizeObserver:f}),b=Qy({nodeRef:E,disabled:p.hidden||!N,noDragClassName:d,handleSelector:p.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:g}),I=Ky();if(p.hidden)return null;let P=mt(p),L=uM(p),z=M||N||t||n||r||o,F=n?$=>n($,{...v.userNode}):void 0,H=r?$=>r($,{...v.userNode}):void 0,Y=o?$=>o($,{...v.userNode}):void 0,ne=i?$=>i($,{...v.userNode}):void 0,U=s?$=>s($,{...v.userNode}):void 0,te=$=>{let{selectNodesOnDrag:G,nodeDragThreshold:O}=V.getState();M&&(!G||!N||O>0)&&Wd({id:e,store:V,nodeRef:E}),t&&t($,{...v.userNode})},re=$=>{if(!(Td($.nativeEvent)||m)){if(yd.includes($.key)&&M){let G=$.key==="Escape";Wd({id:e,store:V,unselect:G,nodeRef:E})}else if(N&&p.selected&&Object.prototype.hasOwnProperty.call(Gl,$.key)){$.preventDefault();let{ariaLabelConfig:G}=V.getState();V.setState({ariaLiveMessage:G["node.a11yDescription.ariaLiveMessage"]({direction:$.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),I({direction:Gl[$.key],factor:$.shiftKey?4:1})}}},ee=()=>{if(m||!E.current?.matches(":focus-visible"))return;let{transform:$,width:G,height:O,autoPanOnNodeFocus:W,setCenter:q}=V.getState();if(!W)return;Dl(new Map([[e,p]]),{x:0,y:0,width:G,height:O},$,!0).length>0||q(p.position.x+P.width/2,p.position.y+P.height/2,{zoom:$[2]})};return(0,D.jsx)("div",{className:Se(["react-flow__node",`react-flow__node-${S}`,{[h]:N},p.className,{selected:p.selected,selectable:M,parent:k,draggable:N,dragging:b}]),ref:E,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:z?"all":"none",visibility:B?"visible":"hidden",...p.style,...L},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:F,onMouseMove:H,onMouseLeave:Y,onContextMenu:ne,onClick:te,onDoubleClick:U,onKeyDown:R?re:void 0,tabIndex:R?0:void 0,onFocus:R?ee:void 0,role:p.ariaRole??(R?"group":void 0),"aria-roledescription":"node","aria-describedby":m?void 0:`${Vy}-${w}`,"aria-label":p.ariaLabel,...p.domAttributes,children:(0,D.jsx)(Kb,{value:e,children:(0,D.jsx)(_,{id:e,data:p.data,type:S,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:p.selected??!1,selectable:M,draggable:N,deletable:p.deletable??!0,isConnectable:A,sourcePosition:p.sourcePosition,targetPosition:p.targetPosition,dragging:b,dragHandle:p.dragHandle,zIndex:v.z,parentId:p.parentId,...P})})})}var xM=(0,T.memo)(wM),EM=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function nv(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:o}=ue(EM,ye),i=gM(e.onlyRenderVisibleElements),s=yM();return(0,D.jsx)("div",{className:"react-flow__nodes",style:Kl,children:i.map(l=>(0,D.jsx)(xM,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:o},l))})}nv.displayName="NodeRenderer";var SM=(0,T.memo)(nv);function kM(e){return ue((0,T.useCallback)(n=>{if(!e)return n.edges.map(o=>o.id);let r=[];if(n.width&&n.height)for(let o of n.edges){let i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&D0({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),ye)}var _M=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,D.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},NM=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,D.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Py={[Wt.Arrow]:_M,[Wt.ArrowClosed]:NM};function CM(e){let t=ge();return(0,T.useMemo)(()=>Object.prototype.hasOwnProperty.call(Py,e)?Py[e]:(t.getState().onError?.("009",st.error009(e)),null),[e])}var bM=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{let a=CM(t);return a?(0,D.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:(0,D.jsx)(a,{color:n,strokeWidth:s})}):null},rv=({defaultColor:e,rfId:t})=>{let n=ue(i=>i.edges),r=ue(i=>i.defaultEdgeOptions),o=(0,T.useMemo)(()=>A0(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return o.length?(0,D.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,D.jsx)("defs",{children:o.map(i=>(0,D.jsx)(bM,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};rv.displayName="MarkerDefinitions";var MM=(0,T.memo)(rv);function ov({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...c}){let[f,d]=(0,T.useState)({x:1,y:0,width:0,height:0}),h=Se(["react-flow__edge-textwrapper",u]),m=(0,T.useRef)(null);return(0,T.useEffect)(()=>{if(m.current){let w=m.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?(0,D.jsxs)("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...c,children:[o&&(0,D.jsx)("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),(0,D.jsx)("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:m,style:r,children:n}),a]}):null}ov.displayName="EdgeText";var IM=(0,T.memo)(ov);function Jl({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...c}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("path",{...c,d:e,fill:"none",className:Se(["react-flow__edge-path",c.className])}),u?(0,D.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&pt(t)&&pt(n)?(0,D.jsx)(IM,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function Oy({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Q.Left||e===Q.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function iv({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:o,targetPosition:i=Q.Top}){let[s,l]=Oy({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Oy({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,f,d,h]=$l({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${s},${l} ${a},${u} ${r},${o}`,c,f,d,h]}function sv(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,interactionWidth:g})=>{let[y,p,v]=iv({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),k=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:k,path:y,labelX:p,labelY:v,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,interactionWidth:g})})}var PM=sv({isInternal:!1}),lv=sv({isInternal:!0});PM.displayName="SimpleBezierEdge";lv.displayName="SimpleBezierEdgeInternal";function av(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,sourcePosition:h=Q.Bottom,targetPosition:m=Q.Top,markerEnd:w,markerStart:x,pathOptions:g,interactionWidth:y})=>{let[p,v,k]=Pi({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:i,targetPosition:m,borderRadius:g?.borderRadius,offset:g?.offset,stepPosition:g?.stepPosition}),S=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:S,path:p,labelX:v,labelY:k,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:w,markerStart:x,interactionWidth:y})})}var uv=av({isInternal:!1}),cv=av({isInternal:!0});uv.displayName="SmoothStepEdge";cv.displayName="SmoothStepEdgeInternal";function dv(e){return(0,T.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,D.jsx)(uv,{...n,id:r,pathOptions:(0,T.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var OM=dv({isInternal:!1}),fv=dv({isInternal:!0});OM.displayName="StepEdge";fv.displayName="StepEdgeInternal";function hv(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:m,interactionWidth:w})=>{let[x,g,y]=Hl({sourceX:n,sourceY:r,targetX:o,targetY:i}),p=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:p,path:x,labelX:g,labelY:y,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:m,interactionWidth:w})})}var TM=hv({isInternal:!1}),pv=hv({isInternal:!0});TM.displayName="StraightEdge";pv.displayName="StraightEdgeInternal";function gv(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=Q.Bottom,targetPosition:l=Q.Top,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,pathOptions:g,interactionWidth:y})=>{let[p,v,k]=Bl({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:g?.curvature}),S=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:S,path:p,labelX:v,labelY:k,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,interactionWidth:y})})}var DM=gv({isInternal:!1}),mv=gv({isInternal:!0});DM.displayName="BezierEdge";mv.displayName="BezierEdgeInternal";var Ty={default:mv,straight:pv,step:fv,smoothstep:cv,simplebezier:lv},Dy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},LM=(e,t,n)=>n===Q.Left?e-t:n===Q.Right?e+t:e,zM=(e,t,n)=>n===Q.Top?e-t:n===Q.Bottom?e+t:e,Ly="react-flow__edgeupdater";function zy({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return(0,D.jsx)("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Se([Ly,`${Ly}-${l}`]),cx:LM(t,r,e),cy:zM(n,r,e),r,stroke:"transparent",fill:"transparent"})}function AM({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:c,onReconnectEnd:f,setReconnecting:d,setUpdateHover:h}){let m=ge(),w=(v,k)=>{if(v.button!==0)return;let{autoPanOnConnect:S,domNode:_,connectionMode:N,connectionRadius:M,lib:A,onConnectStart:R,cancelConnection:V,nodeLookup:B,rfId:E,panBy:b,updateConnection:I}=m.getState(),P=k.type==="target",L=(H,Y)=>{d(!1),f?.(H,n,k.type,Y)},z=H=>u?.(n,H),F=(H,Y)=>{d(!0),c?.(v,n,k.type),R?.(H,Y)};Wl.onPointerDown(v.nativeEvent,{autoPanOnConnect:S,connectionMode:N,connectionRadius:M,domNode:_,handleId:k.id,nodeId:k.nodeId,nodeLookup:B,isTarget:P,edgeUpdaterType:k.type,lib:A,flowId:E,cancelConnection:V,panBy:b,isValidConnection:(...H)=>m.getState().isValidConnection?.(...H)??!0,onConnect:z,onConnectStart:F,onConnectEnd:(...H)=>m.getState().onConnectEnd?.(...H),onReconnectEnd:L,updateConnection:I,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},x=v=>w(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),g=v=>w(v,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>h(!0),p=()=>h(!1);return(0,D.jsxs)(D.Fragment,{children:[(e===!0||e==="source")&&(0,D.jsx)(zy,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:x,onMouseEnter:y,onMouseOut:p,type:"source"}),(e===!0||e==="target")&&(0,D.jsx)(zy,{position:a,centerX:i,centerY:s,radius:t,onMouseDown:g,onMouseEnter:y,onMouseOut:p,type:"target"})]})}function RM({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,rfId:m,edgeTypes:w,noPanClassName:x,onError:g,disableKeyboardA11y:y}){let p=ue(q=>q.edgeLookup.get(e)),v=ue(q=>q.defaultEdgeOptions);p=v?{...v,...p}:p;let k=p.type||"default",S=w?.[k]||Ty[k];S===void 0&&(g?.("011",st.error011(k)),k="default",S=w?.default||Ty.default);let _=!!(p.focusable||t&&typeof p.focusable>"u"),N=typeof f<"u"&&(p.reconnectable||n&&typeof p.reconnectable>"u"),M=!!(p.selectable||r&&typeof p.selectable>"u"),A=(0,T.useRef)(null),[R,V]=(0,T.useState)(!1),[B,E]=(0,T.useState)(!1),b=ge(),{zIndex:I=p.zIndex,sourceX:P,sourceY:L,targetX:z,targetY:F,sourcePosition:H,targetPosition:Y}=ue((0,T.useCallback)(q=>{let Z=q.nodeLookup.get(p.source),J=q.nodeLookup.get(p.target);if(!Z||!J)return Dy;let ie=z0({id:e,sourceNode:Z,targetNode:J,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:q.connectionMode,onError:g}),se=T0({selected:p.selected,zIndex:p.zIndex,sourceNode:Z,targetNode:J,elevateOnSelect:q.elevateEdgesOnSelect,zIndexMode:q.zIndexMode});return{...ie||Dy,zIndex:se}},[p.source,p.target,p.sourceHandle,p.targetHandle,p.selected,p.zIndex,g]),ye),ne=(0,T.useMemo)(()=>p.markerStart?`url('#${Fl(p.markerStart,m)}')`:void 0,[p.markerStart,m]),U=(0,T.useMemo)(()=>p.markerEnd?`url('#${Fl(p.markerEnd,m)}')`:void 0,[p.markerEnd,m]);if(p.hidden||P===null||L===null||z===null||F===null)return null;let te=q=>{let{addSelectedEdges:Z,unselectNodesAndEdges:J,multiSelectionActive:ie}=b.getState();M&&(b.setState({nodesSelectionActive:!1}),p.selected&&ie?(J({nodes:[],edges:[p]}),A.current?.blur()):Z([e])),o&&o(q,p)},re=i?q=>{i(q,{...p})}:void 0,ee=s?q=>{s(q,{...p})}:void 0,$=l?q=>{l(q,{...p})}:void 0,G=a?q=>{a(q,{...p})}:void 0,O=u?q=>{u(q,{...p})}:void 0,W=q=>{if(!y&&yd.includes(q.key)&&M){let{unselectNodesAndEdges:Z,addSelectedEdges:J}=b.getState();q.key==="Escape"?(A.current?.blur(),Z({edges:[p]})):J([e])}};return(0,D.jsx)("svg",{style:{zIndex:I},children:(0,D.jsxs)("g",{className:Se(["react-flow__edge",`react-flow__edge-${k}`,p.className,x,{selected:p.selected,animated:p.animated,inactive:!M&&!o,updating:R,selectable:M}]),onClick:te,onDoubleClick:re,onContextMenu:ee,onMouseEnter:$,onMouseMove:G,onMouseLeave:O,onKeyDown:_?W:void 0,tabIndex:_?0:void 0,role:p.ariaRole??(_?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":p.ariaLabel===null?void 0:p.ariaLabel||`Edge from ${p.source} to ${p.target}`,"aria-describedby":_?`${jy}-${m}`:void 0,ref:A,...p.domAttributes,children:[!B&&(0,D.jsx)(S,{id:e,source:p.source,target:p.target,type:p.type,selected:p.selected,animated:p.animated,selectable:M,deletable:p.deletable??!0,label:p.label,labelStyle:p.labelStyle,labelShowBg:p.labelShowBg,labelBgStyle:p.labelBgStyle,labelBgPadding:p.labelBgPadding,labelBgBorderRadius:p.labelBgBorderRadius,sourceX:P,sourceY:L,targetX:z,targetY:F,sourcePosition:H,targetPosition:Y,data:p.data,style:p.style,sourceHandleId:p.sourceHandle,targetHandleId:p.targetHandle,markerStart:ne,markerEnd:U,pathOptions:"pathOptions"in p?p.pathOptions:void 0,interactionWidth:p.interactionWidth}),N&&(0,D.jsx)(AM,{edge:p,isReconnectable:N,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,sourceX:P,sourceY:L,targetX:z,targetY:F,sourcePosition:H,targetPosition:Y,setUpdateHover:V,setReconnecting:E})]})})}var $M=(0,T.memo)(RM),BM=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function yv({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:f,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:m,disableKeyboardA11y:w}){let{edgesFocusable:x,edgesReconnectable:g,elementsSelectable:y,onError:p}=ue(BM,ye),v=kM(t);return(0,D.jsxs)("div",{className:"react-flow__edges",children:[(0,D.jsx)(MM,{defaultColor:e,rfId:n}),v.map(k=>(0,D.jsx)($M,{id:k,edgesFocusable:x,edgesReconnectable:g,elementsSelectable:y,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:c,reconnectRadius:f,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:m,rfId:n,onError:p,edgeTypes:r,disableKeyboardA11y:w},k))]})}yv.displayName="EdgeRenderer";var HM=(0,T.memo)(yv),Ay=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function FM({children:e}){let t=ge(),n=(0,T.useRef)(null),[r]=(0,T.useState)(()=>t.getState().transform);return Gy(()=>{let o=null,i=()=>{let s=t.getState().transform;o&&s[0]===o[0]&&s[1]===o[1]&&s[2]===o[2]||(o=s,n.current&&(n.current.style.transform=Ay(s)))};return i(),t.subscribe(i)},[t]),(0,D.jsx)("div",{ref:n,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:Ay(r)},children:e})}function VM(e){let t=Ti(),n=(0,T.useRef)(!1);(0,T.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var jM=e=>e.panZoom?.syncViewport;function WM(e){let t=ue(jM),n=ge();return(0,T.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Ry(e){return e.connection.inProgress?{...e.connection,to:go(e.connection.to,e.transform)}:{...e.connection}}function UM(e){return e?n=>{let r=Ry(n);return e(r)}:Ry}function YM(e){let t=UM(e);return ue(t,ye)}var qM=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function XM({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:a}=ue(qM,ye);return!(i&&o&&a)?null:(0,D.jsx)("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:(0,D.jsx)("g",{className:Se(["react-flow__connection",Pd(l)]),children:(0,D.jsx)(vv,{style:t,type:n,CustomComponent:r,isValid:l})})})}var vv=({style:e,type:t=jt.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:c,toHandle:f,toPosition:d,pointer:h}=YM();if(!o)return;if(n)return(0,D.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:d,connectionStatus:Pd(r),toNode:c,toHandle:f,pointer:h});let m="",w={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:d};switch(t){case jt.Bezier:[m]=Bl(w);break;case jt.SimpleBezier:[m]=iv(w);break;case jt.Step:[m]=Pi({...w,borderRadius:0});break;case jt.SmoothStep:[m]=Pi(w);break;default:[m]=Hl(w)}return(0,D.jsx)("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};vv.displayName="ConnectionLine";var GM={};function $y(e=GM){let t=(0,T.useRef)(e),n=ge();(0,T.useEffect)(()=>{},[e])}function ZM(){let e=ge(),t=(0,T.useRef)(!1);(0,T.useEffect)(()=>{},[])}function wv({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:f,onSelectionStart:d,onSelectionEnd:h,connectionLineType:m,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:g,selectionKeyCode:y,selectionOnDrag:p,selectionMode:v,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:_,deleteKeyCode:N,onlyRenderVisibleElements:M,elementsSelectable:A,defaultViewport:R,translateExtent:V,minZoom:B,maxZoom:E,preventScrolling:b,defaultMarkerColor:I,zoomOnScroll:P,zoomOnPinch:L,panOnScroll:z,panOnScrollSpeed:F,panOnScrollMode:H,zoomOnDoubleClick:Y,panOnDrag:ne,autoPanOnSelection:U,onPaneClick:te,onPaneMouseEnter:re,onPaneMouseMove:ee,onPaneMouseLeave:$,onPaneScroll:G,onPaneContextMenu:O,paneClickDistance:W,nodeClickDistance:q,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ie,onEdgeMouseLeave:se,reconnectRadius:Te,onReconnect:Ut,onReconnectStart:Ot,onReconnectEnd:Tt,noDragClassName:Yt,noWheelClassName:wo,noPanClassName:jn,disableKeyboardA11y:Wn,nodeExtent:wt,rfId:qt,viewport:Xt,onViewportChange:Un,nodesDraggable:sa}){return $y(e),$y(t),ZM(),VM(n),WM(Xt),(0,D.jsx)(hM,{onPaneClick:te,onPaneMouseEnter:re,onPaneMouseMove:ee,onPaneMouseLeave:$,onPaneContextMenu:O,onPaneScroll:G,paneClickDistance:W,deleteKeyCode:N,selectionKeyCode:y,selectionOnDrag:p,selectionMode:v,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:_,elementsSelectable:A,zoomOnScroll:P,zoomOnPinch:L,zoomOnDoubleClick:Y,panOnScroll:z,panOnScrollSpeed:F,panOnScrollMode:H,panOnDrag:ne,autoPanOnSelection:U,defaultViewport:R,translateExtent:V,minZoom:B,maxZoom:E,onSelectionContextMenu:f,preventScrolling:b,noDragClassName:Yt,noWheelClassName:wo,noPanClassName:jn,disableKeyboardA11y:Wn,onViewportChange:Un,isControlledViewport:!!Xt,children:(0,D.jsxs)(FM,{children:[(0,D.jsx)(HM,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:Ut,onReconnectStart:Ot,onReconnectEnd:Tt,onlyRenderVisibleElements:M,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ie,onEdgeMouseLeave:se,reconnectRadius:Te,defaultMarkerColor:I,noPanClassName:jn,disableKeyboardA11y:Wn,rfId:qt}),(0,D.jsx)(XM,{style:w,type:m,component:x,containerStyle:g}),(0,D.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,D.jsx)(SM,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:q,onlyRenderVisibleElements:M,noPanClassName:jn,noDragClassName:Yt,disableKeyboardA11y:Wn,nodeExtent:wt,rfId:qt,nodesDraggable:sa}),(0,D.jsx)("div",{className:"react-flow__viewport-portal"})]})})}wv.displayName="GraphView";var QM=(0,T.memo)(wv),KM=Cd("React Flow","https://reactflow.dev/"),By=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:f,zIndexMode:d="basic"}={})=>{let h=new Map,m=new Map,w=new Map,x=new Map,g=r??t??[],y=n??e??[],p=c??[0,0],v=f??co;Bd(w,x,g);let{nodesInitialized:k}=Vl(y,h,m,{nodeOrigin:p,nodeExtent:v,zIndexMode:d}),S=[0,0,1];if(s&&o&&i){let _=fo(h,{filter:R=>!!((R.width||R.initialWidth)&&(R.height||R.initialHeight))}),{x:N,y:M,zoom:A}=Ii(_,o,i,a,u,l?.padding??.1);S=[N,M,A]}return{rfId:"1",width:o??0,height:i??0,transform:S,nodes:y,nodesInitialized:k,nodeLookup:h,parentLookup:m,edges:g,edgeLookup:x,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:co,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Bn.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:p,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...wd},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:KM,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:vd,zIndexMode:d,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},JM=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,zIndexMode:d})=>py((h,m)=>{async function w(){let{nodeLookup:x,panZoom:g,fitViewOptions:y,fitViewResolver:p,width:v,height:k,minZoom:S,maxZoom:_}=m();g&&(await C0({nodes:x,width:v,height:k,panZoom:g,minZoom:S,maxZoom:_},y),p?.resolve(!0),h({fitViewResolver:null}))}return{...By({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:x=>{let{nodeLookup:g,parentLookup:y,nodeOrigin:p,nodeExtent:v,elevateNodesOnSelect:k,fitViewQueued:S,zIndexMode:_,nodesSelectionActive:N}=m(),{nodesInitialized:M,hasSelectedNodes:A}=Vl(x,g,y,{nodeOrigin:p,nodeExtent:v,elevateNodesOnSelect:k,checkEquality:!0,zIndexMode:_}),R=N&&A;S&&M?(w(),h({nodes:x,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:R})):h({nodes:x,nodesInitialized:M,nodesSelectionActive:R})},setEdges:x=>{let{connectionLookup:g,edgeLookup:y}=m();Bd(g,y,x),h({edges:x})},setDefaultNodesAndEdges:(x,g)=>{if(x){let{setNodes:y}=m();y(x),h({hasDefaultNodes:!0})}if(g){let{setEdges:y}=m();y(g),h({hasDefaultEdges:!0})}},updateNodeInternals:x=>{let{triggerNodeChanges:g,nodeLookup:y,parentLookup:p,domNode:v,nodeOrigin:k,nodeExtent:S,debug:_,fitViewQueued:N,zIndexMode:M}=m(),{changes:A,updatedInternals:R}=H0(x,y,p,v,k,S,M);R&&($0(y,p,{nodeOrigin:k,nodeExtent:S,zIndexMode:M}),N?(w(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),A?.length>0&&(_&&console.log("React Flow: trigger node changes",A),g?.(A)))},updateNodePositions:(x,g=!1)=>{let y=[],p=[],{nodeLookup:v,triggerNodeChanges:k,connection:S,updateConnection:_,onNodesChangeMiddlewareMap:N}=m();for(let[M,A]of x){let R=v.get(M),V=!!(R?.expandParent&&R?.parentId&&A?.position),B={id:M,type:"position",position:V?{x:Math.max(0,A.position.x),y:Math.max(0,A.position.y)}:A.position,dragging:g};if(R&&S.inProgress&&S.fromNode.id===R.id){let E=Hn(R,S.fromHandle,Q.Left,!0);_({...S,from:E})}V&&R.parentId&&y.push({id:M,parentId:R.parentId,rect:{...A.internals.positionAbsolute,width:A.measured.width??0,height:A.measured.height??0}}),p.push(B)}if(y.length>0){let{parentLookup:M,nodeOrigin:A}=m(),R=jl(y,v,M,A);p.push(...R)}for(let M of N.values())p=M(p);k(p)},triggerNodeChanges:x=>{let{onNodesChange:g,setNodes:y,nodes:p,hasDefaultNodes:v,debug:k}=m();if(x?.length){if(v){let S=Yy(x,p);y(S)}k&&console.log("React Flow: trigger node changes",x),g?.(x)}},triggerEdgeChanges:x=>{let{onEdgesChange:g,setEdges:y,edges:p,hasDefaultEdges:v,debug:k}=m();if(x?.length){if(v){let S=qy(x,p);y(S)}k&&console.log("React Flow: trigger edge changes",x),g?.(x)}},addSelectedNodes:x=>{let{multiSelectionActive:g,edgeLookup:y,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:k}=m();if(g){let S=x.map(_=>wr(_,!0));v(S);return}v(vo(p,new Set([...x]))),k(vo(y))},addSelectedEdges:x=>{let{multiSelectionActive:g,edgeLookup:y,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:k}=m();if(g){let S=x.map(_=>wr(_,!0));k(S);return}k(vo(y,new Set([...x]))),v(vo(p,new Set))},unselectNodesAndEdges:({nodes:x,edges:g}={})=>{let{edges:y,nodes:p,nodeLookup:v,triggerNodeChanges:k,triggerEdgeChanges:S}=m(),_=x||p,N=g||y,M=[];for(let R of _)R.selected&&M.push(wr(R.id,!1));let A=[];for(let R of N)R.selected&&A.push(wr(R.id,!1));k(M),S(A)},setMinZoom:x=>{let{panZoom:g,maxZoom:y}=m();g?.setScaleExtent([x,y]),h({minZoom:x})},setMaxZoom:x=>{let{panZoom:g,minZoom:y}=m();g?.setScaleExtent([y,x]),h({maxZoom:x})},setTranslateExtent:x=>{m().panZoom?.setTranslateExtent(x),h({translateExtent:x})},resetSelectedElements:()=>{let{edges:x,nodes:g,triggerNodeChanges:y,triggerEdgeChanges:p,elementsSelectable:v}=m();if(!v)return;let k=g.reduce((_,N)=>N.selected?[..._,wr(N.id,!1)]:_,[]),S=x.reduce((_,N)=>N.selected?[..._,wr(N.id,!1)]:_,[]);y(k),p(S)},setNodeExtent:x=>{let{nodes:g,nodeLookup:y,parentLookup:p,nodeOrigin:v,elevateNodesOnSelect:k,nodeExtent:S,zIndexMode:_}=m();x[0][0]===S[0][0]&&x[0][1]===S[0][1]&&x[1][0]===S[1][0]&&x[1][1]===S[1][1]||(Vl(g,y,p,{nodeOrigin:v,nodeExtent:x,elevateNodesOnSelect:k,checkEquality:!1,zIndexMode:_}),h({nodeExtent:x}))},panBy:x=>{let{transform:g,width:y,height:p,panZoom:v,translateExtent:k}=m();return F0({delta:x,panZoom:v,transform:g,translateExtent:k,width:y,height:p})},setCenter:async(x,g,y)=>{let{width:p,height:v,maxZoom:k,panZoom:S}=m();if(!S)return!1;let _=typeof y?.zoom<"u"?y.zoom:k;return await S.setViewport({x:p/2-x*_,y:v/2-g*_,zoom:_},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),!0},cancelConnection:()=>{h({connection:{...wd}})},updateConnection:x=>{h({connection:x})},reset:()=>h({...By()})}},Object.is);function Yd({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:c,nodeExtent:f,zIndexMode:d,children:h}){let[m]=(0,T.useState)(()=>JM({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:c,nodeExtent:f,zIndexMode:d}));return(0,D.jsx)(gb,{value:m,children:(0,D.jsx)(Bb,{children:(0,D.jsx)(eM,{children:h})})})}function eI({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:h}){return(0,T.useContext)(Zl)?(0,D.jsx)(D.Fragment,{children:e}):(0,D.jsx)(Yd,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:h,children:e})}var tI={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function nI({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:c,onMoveStart:f,onMoveEnd:d,onConnect:h,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:g,onNodeMouseEnter:y,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:k,onNodeDoubleClick:S,onNodeDragStart:_,onNodeDrag:N,onNodeDragStop:M,onNodesDelete:A,onEdgesDelete:R,onDelete:V,onSelectionChange:B,onSelectionDragStart:E,onSelectionDrag:b,onSelectionDragStop:I,onSelectionContextMenu:P,onSelectionStart:L,onSelectionEnd:z,onBeforeDelete:F,connectionMode:H,connectionLineType:Y=jt.Bezier,connectionLineStyle:ne,connectionLineComponent:U,connectionLineContainerStyle:te,deleteKeyCode:re="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:$=!1,selectionMode:G=gr.Full,panActivationKeyCode:O="Space",multiSelectionKeyCode:W=mo()?"Meta":"Control",zoomActivationKeyCode:q=mo()?"Meta":"Control",snapToGrid:Z,snapGrid:J,onlyRenderVisibleElements:ie=!1,selectNodesOnDrag:se,nodesDraggable:Te,autoPanOnNodeFocus:Ut,nodesConnectable:Ot,nodesFocusable:Tt,nodeOrigin:Yt=Wy,edgesFocusable:wo,edgesReconnectable:jn,elementsSelectable:Wn=!0,defaultViewport:wt=Mb,minZoom:qt=.5,maxZoom:Xt=2,translateExtent:Un=co,preventScrolling:sa=!0,nodeExtent:la,defaultMarkerColor:ex="#b1b1b7",zoomOnScroll:tx=!0,zoomOnPinch:nx=!0,panOnScroll:rx=!1,panOnScrollSpeed:ox=.5,panOnScrollMode:ix=dn.Free,zoomOnDoubleClick:sx=!0,panOnDrag:lx=!0,onPaneClick:ax,onPaneMouseEnter:ux,onPaneMouseMove:cx,onPaneMouseLeave:dx,onPaneScroll:fx,onPaneContextMenu:hx,paneClickDistance:px=1,nodeClickDistance:gx=0,children:mx,onReconnect:yx,onReconnectStart:vx,onReconnectEnd:wx,onEdgeContextMenu:xx,onEdgeDoubleClick:Ex,onEdgeMouseEnter:Sx,onEdgeMouseMove:kx,onEdgeMouseLeave:_x,reconnectRadius:Nx=10,onNodesChange:Cx,onEdgesChange:bx,noDragClassName:Mx="nodrag",noWheelClassName:Ix="nowheel",noPanClassName:mf="nopan",fitView:yf,fitViewOptions:vf,connectOnClick:Px,attributionPosition:Ox,proOptions:Tx,defaultEdgeOptions:Dx,elevateNodesOnSelect:Lx=!0,elevateEdgesOnSelect:zx=!1,disableKeyboardA11y:wf=!1,autoPanOnConnect:Ax,autoPanOnNodeDrag:Rx,autoPanOnSelection:$x=!0,autoPanSpeed:Bx,connectionRadius:Hx,isValidConnection:Fx,onError:Vx,style:jx,id:xf,nodeDragThreshold:Wx,connectionDragThreshold:Ux,viewport:Yx,onViewportChange:qx,width:Xx,height:Gx,colorMode:Zx="light",debug:Qx,onScroll:Ef,ariaLabelConfig:Kx,zIndexMode:Sf="basic",...Jx},eE){let aa=xf||"1",tE=Tb(Zx),nE=(0,T.useCallback)(kf=>{kf.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ef?.(kf)},[Ef]);return(0,D.jsx)("div",{"data-testid":"rf__wrapper",...Jx,onScroll:nE,style:{...jx,...tI},ref:eE,className:Se(["react-flow",o,tE]),id:xf,role:"application",children:(0,D.jsxs)(eI,{nodes:e,edges:t,width:Xx,height:Gx,fitView:yf,fitViewOptions:vf,minZoom:qt,maxZoom:Xt,nodeOrigin:Yt,nodeExtent:la,zIndexMode:Sf,children:[(0,D.jsx)(Ob,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:g,nodesDraggable:Te,autoPanOnNodeFocus:Ut,nodesConnectable:Ot,nodesFocusable:Tt,edgesFocusable:wo,edgesReconnectable:jn,elementsSelectable:Wn,elevateNodesOnSelect:Lx,elevateEdgesOnSelect:zx,minZoom:qt,maxZoom:Xt,nodeExtent:la,onNodesChange:Cx,onEdgesChange:bx,snapToGrid:Z,snapGrid:J,connectionMode:H,translateExtent:Un,connectOnClick:Px,defaultEdgeOptions:Dx,fitView:yf,fitViewOptions:vf,onNodesDelete:A,onEdgesDelete:R,onDelete:V,onNodeDragStart:_,onNodeDrag:N,onNodeDragStop:M,onSelectionDrag:b,onSelectionDragStart:E,onSelectionDragStop:I,onMove:c,onMoveStart:f,onMoveEnd:d,noPanClassName:mf,nodeOrigin:Yt,rfId:aa,autoPanOnConnect:Ax,autoPanOnNodeDrag:Rx,autoPanSpeed:Bx,onError:Vx,connectionRadius:Hx,isValidConnection:Fx,selectNodesOnDrag:se,nodeDragThreshold:Wx,connectionDragThreshold:Ux,onBeforeDelete:F,debug:Qx,ariaLabelConfig:Kx,zIndexMode:Sf}),(0,D.jsx)(QM,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:y,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:k,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:Y,connectionLineStyle:ne,connectionLineComponent:U,connectionLineContainerStyle:te,selectionKeyCode:ee,selectionOnDrag:$,selectionMode:G,deleteKeyCode:re,multiSelectionKeyCode:W,panActivationKeyCode:O,zoomActivationKeyCode:q,onlyRenderVisibleElements:ie,defaultViewport:wt,translateExtent:Un,minZoom:qt,maxZoom:Xt,preventScrolling:sa,zoomOnScroll:tx,zoomOnPinch:nx,zoomOnDoubleClick:sx,panOnScroll:rx,panOnScrollSpeed:ox,panOnScrollMode:ix,panOnDrag:lx,autoPanOnSelection:$x,onPaneClick:ax,onPaneMouseEnter:ux,onPaneMouseMove:cx,onPaneMouseLeave:dx,onPaneScroll:fx,onPaneContextMenu:hx,paneClickDistance:px,nodeClickDistance:gx,onSelectionContextMenu:P,onSelectionStart:L,onSelectionEnd:z,onReconnect:yx,onReconnectStart:vx,onReconnectEnd:wx,onEdgeContextMenu:xx,onEdgeDoubleClick:Ex,onEdgeMouseEnter:Sx,onEdgeMouseMove:kx,onEdgeMouseLeave:_x,reconnectRadius:Nx,defaultMarkerColor:ex,noDragClassName:Mx,noWheelClassName:Ix,noPanClassName:mf,rfId:aa,disableKeyboardA11y:wf,nodeExtent:la,viewport:Yx,onViewportChange:qx,nodesDraggable:Te}),(0,D.jsx)(bb,{onSelectionChange:B}),mx,(0,D.jsx)(Sb,{proOptions:Tx,position:Ox}),(0,D.jsx)(Eb,{rfId:aa,disableKeyboardA11y:wf})]})})}var xv=Xy(nI);function Ev(e){let[t,n]=(0,T.useState)(e),r=(0,T.useCallback)(o=>n(i=>Yy(o,i)),[]);return[t,n,r]}function Sv(e){let[t,n]=(0,T.useState)(e),r=(0,T.useCallback)(o=>n(i=>qy(o,i)),[]);return[t,n,r]}var TD=st.error014();function rI({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,D.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Se(["react-flow__background-pattern",n,r])})}function oI({radius:e,className:t}){return(0,D.jsx)("circle",{cx:e,cy:e,r:e,className:Se(["react-flow__background-pattern","dots",t])})}var Vn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Vn||(Vn={}));var iI={[Vn.Dots]:1,[Vn.Lines]:1,[Vn.Cross]:6},sI=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function kv({id:e,variant:t=Vn.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:a,className:u,patternClassName:c}){let f=(0,T.useRef)(null),{transform:d,patternId:h}=ue(sI,ye),m=r||iI[t],w=t===Vn.Dots,x=t===Vn.Cross,g=Array.isArray(n)?n:[n,n],y=[g[0]*d[2]||1,g[1]*d[2]||1],p=m*d[2],v=Array.isArray(i)?i:[i,i],k=x?[p,p]:y,S=[v[0]*d[2]+k[0]/2,v[1]*d[2]+k[1]/2],_=`${h}${e||""}`;return(0,D.jsxs)("svg",{className:Se(["react-flow__background",u]),style:{...a,...Kl,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[(0,D.jsx)("pattern",{id:_,x:d[0]%y[0],y:d[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:w?(0,D.jsx)(oI,{radius:p/2,className:c}):(0,D.jsx)(rI,{dimensions:k,lineWidth:o,variant:t,className:c})}),(0,D.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${_})`})]})}kv.displayName="Background";var _v=(0,T.memo)(kv);function lI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,D.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function aI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,D.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function uI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,D.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function cI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,D.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function dI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,D.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Xl({children:e,className:t,...n}){return(0,D.jsx)("button",{type:"button",className:Se(["react-flow__controls-button",t]),...n,children:e})}var fI=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Nv({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:c,position:f="bottom-left",orientation:d="vertical","aria-label":h}){let m=ge(),{isInteractive:w,minZoomReached:x,maxZoomReached:g,ariaLabelConfig:y}=ue(fI,ye),{zoomIn:p,zoomOut:v,fitView:k}=Ti(),S=()=>{p(),i?.()},_=()=>{v(),s?.()},N=()=>{k(o),l?.()},M=()=>{m.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a?.(!w)};return(0,D.jsxs)(Ql,{className:Se(["react-flow__controls",d==="horizontal"?"horizontal":"vertical",u]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??y["controls.ariaLabel"],children:[t&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Xl,{onClick:S,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:g,children:(0,D.jsx)(lI,{})}),(0,D.jsx)(Xl,{onClick:_,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:x,children:(0,D.jsx)(aI,{})})]}),n&&(0,D.jsx)(Xl,{className:"react-flow__controls-fitview",onClick:N,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,D.jsx)(uI,{})}),r&&(0,D.jsx)(Xl,{className:"react-flow__controls-interactive",onClick:M,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:w?(0,D.jsx)(dI,{}):(0,D.jsx)(cI,{})}),c]})}Nv.displayName="Controls";var DD=(0,T.memo)(Nv);function hI({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:c,shapeRendering:f,selected:d,onClick:h}){let{background:m,backgroundColor:w}=i||{},x=s||m||w;return(0,D.jsx)("rect",{className:Se(["react-flow__minimap-node",{selected:d},u]),x:t,y:n,rx:c,ry:c,width:r,height:o,style:{fill:x,stroke:l,strokeWidth:a},shapeRendering:f,onClick:h?g=>h(g,e):void 0})}var pI=(0,T.memo)(hI),gI=e=>e.nodes.map(t=>t.id),jd=e=>e instanceof Function?e:()=>e;function mI({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=pI,onClick:s}){let l=ue(gI,ye),a=jd(t),u=jd(e),c=jd(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,D.jsx)(D.Fragment,{children:l.map(d=>(0,D.jsx)(vI,{id:d,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:f},d))})}function yI({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:a}){let{node:u,x:c,y:f,width:d,height:h}=ue(m=>{let w=m.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};let x=w.internals.userNode,{x:g,y}=w.internals.positionAbsolute,{width:p,height:v}=mt(x);return{node:x,x:g,y,width:p,height:v}},ye);return!u||u.hidden||!bd(u)?null:(0,D.jsx)(l,{x:c,y:f,width:d,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:a,id:u.id})}var vI=(0,T.memo)(yI),wI=(0,T.memo)(mI),xI=200,EI=150,SI=e=>!e.hidden,kI=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let r of e.nodeLookup.values())if(!r.hidden){n=!0;break}return{viewBB:t,boundingRect:n?_d(fo(e.nodeLookup,{filter:SI}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Hy=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,_I=(e,t)=>Hy(e.viewBB,t.viewBB)&&Hy(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,NI="react-flow__minimap-desc";function Cv({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:c,maskStrokeWidth:f,position:d="bottom-right",onClick:h,onNodeClick:m,pannable:w=!1,zoomable:x=!1,ariaLabel:g,inversePan:y,zoomStep:p=1,offsetScale:v=5}){let k=ge(),S=(0,T.useRef)(null),{boundingRect:_,panZoom:N,viewBB:M,rfId:A,translateExtent:R,flowWidth:V,flowHeight:B,ariaLabelConfig:E}=ue(kI,_I),b=e?.width??xI,I=e?.height??EI,P=_.width/b,L=_.height/I,z=Math.max(P,L),F=z*b,H=z*I,Y=v*z,ne=_.x-(F-_.width)/2-Y,U=_.y-(H-_.height)/2-Y,te=F+Y*2,re=H+Y*2,ee=`${NI}-${A}`,$=(0,T.useRef)(0),G=(0,T.useRef)();$.current=z,(0,T.useEffect)(()=>{let J=k.getState().panZoom;if(S.current&&J)return G.current=X0({domNode:S.current,panZoom:J,getTransform:()=>k.getState().transform,getViewScale:()=>$.current}),()=>{G.current?.destroy()}},[N]),(0,T.useEffect)(()=>{G.current?.update({translateExtent:R,width:V,height:B,inversePan:y,pannable:w,zoomStep:p,zoomable:x})},[w,x,y,p,R,V,B]);let O=h?J=>{let[ie,se]=G.current?.pointer(J)||[0,0];h(J,{x:ie,y:se})}:void 0,W=(0,T.useCallback)((J,ie)=>{let se=k.getState().nodeLookup.get(ie).internals.userNode;m?.(J,se)},[m]),q=m?W:void 0,Z=g??E["minimap.ariaLabel"];return(0,D.jsx)(Ql,{position:d,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*z:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Se(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,D.jsxs)("svg",{width:b,height:I,viewBox:`${ne} ${U} ${te} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:S,onClick:O,children:[Z&&(0,D.jsx)("title",{id:ee,children:Z}),(0,D.jsx)(wI,{onClick:q,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),(0,D.jsx)("path",{className:"react-flow__minimap-mask",d:`M${ne-Y},${U-Y}h${te+Y*2}v${re+Y*2}h${-te-Y*2}z
1840
+ M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Cv.displayName="MiniMap";var bv=(0,T.memo)(Cv),CI=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,bI={[Fn.Line]:"right",[Fn.Handle]:"bottom-right"};function MI({nodeId:e,position:t,variant:n=Fn.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:d,autoScale:h=!0,shouldResize:m,onResizeStart:w,onResize:x,onResizeEnd:g}){let y=Jy(),p=typeof e=="string"?e:y,v=ge(),k=(0,T.useRef)(null),S=n===Fn.Handle,_=ue((0,T.useCallback)(CI(S&&h),[S,h]),ye),N=(0,T.useRef)(null),M=t??bI[n];(0,T.useEffect)(()=>{if(!(!k.current||!p))return N.current||(N.current=J0({domNode:k.current,nodeId:p,getStoreItems:()=>{let{nodeLookup:R,transform:V,snapGrid:B,snapToGrid:E,nodeOrigin:b,domNode:I}=v.getState();return{nodeLookup:R,transform:V,snapGrid:B,snapToGrid:E,nodeOrigin:b,paneDomNode:I}},onChange:(R,V)=>{let{triggerNodeChanges:B,nodeLookup:E,parentLookup:b,nodeOrigin:I}=v.getState(),P=[],L={x:R.x,y:R.y},z=E.get(p);if(z&&z.expandParent&&z.parentId){let F=z.origin??I,H=R.width??z.measured.width??0,Y=R.height??z.measured.height??0,ne={id:z.id,parentId:z.parentId,rect:{width:H,height:Y,...Md({x:R.x??z.position.x,y:R.y??z.position.y},{width:H,height:Y},z.parentId,E,F)}},U=jl([ne],E,b,I);P.push(...U),L.x=R.x?Math.max(F[0]*H,R.x):void 0,L.y=R.y?Math.max(F[1]*Y,R.y):void 0}if(L.x!==void 0&&L.y!==void 0){let F={id:p,type:"position",position:{...L}};P.push(F)}if(R.width!==void 0&&R.height!==void 0){let H={id:p,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:R.width,height:R.height}};P.push(H)}for(let F of V){let H={...F,type:"position"};P.push(H)}B(P)},onEnd:({width:R,height:V})=>{let B={id:p,type:"dimensions",resizing:!1,dimensions:{width:R,height:V}};v.getState().triggerNodeChanges([B])}})),N.current.update({controlPosition:M,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:c},keepAspectRatio:f,resizeDirection:d,onResizeStart:w,onResize:x,onResizeEnd:g,shouldResize:m}),()=>{N.current?.destroy()}},[M,l,a,u,c,f,w,x,g,m]);let A=M.split("-");return(0,D.jsx)("div",{className:Se(["react-flow__resize-control","nodrag",...A,n,r]),ref:k,style:{...o,scale:_,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}var LD=(0,T.memo)(MI);var pf=Dt(Z1(),1),C=Dt(il(),1),Q1={zh:{skipToCanvas:"\u8DF3\u8F6C\u5230\u4EA4\u4E92\u753B\u5E03",modelPrefix:"\u751F\u6210\u6A21\u578B\uFF1A",backParent:"\u8FD4\u56DE\u4E0A\u7EA7\u5730\u56FE",levelOverview:"L0 \u5168\u666F\u56FE\u8C31",levelSubPrefix:"L1+ \u6DF1\u5EA6\u4E13\u9898\uFF1A",allStreams:"\u5168\u90E8\u8109\u7EDC",searchLabel:"\u641C\u7D22\u8282\u70B9\u4E0E\u63D0\u793A\u8BCD",searchPlaceholder:"\u641C\u7D22\u6982\u5FF5\u3001\u673A\u5236\u3001\u8DEF\u5F84\u6216\u8FFD\u95EE\u2026",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",lock:"\u9501\u5B9A\u4F4D\u7F6E",unlock:"\u5DF2\u9501\u5B9A",fitView:"\u9002\u914D\u5168\u56FE",reset:"\u91CD\u7F6E",legend:"\u56FE\u4F8B",scopeNotes:"\u8303\u56F4\u4E0E\u5F85\u786E\u8BA4",learningPath:"\u63A8\u8350\u987A\u5E8F",expandDetail:"\u5C55\u5F00\u7EC6\u8282",collapseDetail:"\u6536\u8D77\u7EC6\u8282",detailEdgeLabel:"\u4E0B\u94BB\u7EC6\u8282",deepDiveBadgeTitle:"\u6253\u5F00\u7EE7\u7EED\u6DF1\u6316\u63D0\u793A\u8BCD",deepDiveModalTitle:"\u7EE7\u7EED\u6DF1\u6F5C\uFF08Atlas Loop\uFF09",tabAsk:"\u5B9A\u5411\u8FFD\u95EE",tabRecursive:"\u9012\u5F52\u751F\u6210\u5B50\u5730\u56FE",copyBtn:"\u590D\u5236\u63D0\u793A\u8BCD",copiedBtn:"\u5DF2\u590D\u5236",copySnippet:"\u590D\u5236\u7247\u6BB5",openInEditor:"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00",editorConfirmHint:"\u9996\u6B21\u70B9\u51FB\u65F6\u6D4F\u89C8\u5668\u53EF\u80FD\u4F1A\u8BF7\u6C42\u6253\u5F00\u5916\u90E8\u7F16\u8F91\u5668\u6743\u9650\uFF1B\u82E5\u6587\u4EF6\u79FB\u52A8\u8BF7\u91CD\u65B0\u751F\u6210\u3002",recursiveUsageHint:"\u5C06\u4E0B\u65B9\u63D0\u793A\u8BCD\u53D1\u9001\u7ED9 AI\uFF0C\u5373\u53EF\u56F4\u7ED5\u5F53\u524D\u8282\u70B9\u9012\u5F52\u751F\u6210\u4E0B\u4E00\u5C42\u72EC\u7ACB\u4EA4\u4E92\u5F0F HTML \u5B50\u5730\u56FE\uFF1A",whatItDoes:"\u6838\u5FC3\u8BF4\u660E",whyItMatters:"\u5173\u952E\u4EF7\u503C",inputsLabel:"\u524D\u7F6E / \u8F93\u5165",outputsLabel:"\u7ED3\u679C / \u4EA7\u51FA",mechanismsLabel:"\u5185\u90E8\u673A\u5236\u4E0E\u5F71\u54CD",watchoutsLabel:"\u7406\u89E3\u6CE8\u610F\u70B9",anchorsLabel:"\u5173\u8054\u4F9D\u636E\u4E0E\u951A\u70B9",openDeepDiveBtn:"\u67E5\u770B\u8FDB\u9636\u8FFD\u95EE\u4E0E\u9012\u5F52\u6307\u4EE4",unverifiedTag:"\u5F85\u786E\u8BA4",verifiedTag:"\u5DF2\u6838\u5B9E",uncoveredTitle:"\u672A\u8986\u76D6\u8303\u56F4",unverifiedTitle:"\u5F85\u786E\u8BA4\u9879\u8BF4\u660E",noSearchMatches:"\u65E0\u5339\u914D\u8282\u70B9",nestedBadge:"\u5185\u90E8\u7EC6\u8282",close:"\u5173\u95ED",roles:{entry:"\u8D77\u70B9 / \u547D\u9898",core:"\u6838\u5FC3\u673A\u5236",branch:"\u5224\u65AD / \u5206\u5C94",foundation:"\u5E95\u5C42\u57FA\u77F3",context:"\u5916\u90E8\u5173\u8054",extension:"\u5EF6\u4F38\u6F14\u5316",outcome:"\u6700\u7EC8\u7ED3\u8BBA"}},en:{skipToCanvas:"Skip to interactive canvas",modelPrefix:"Model: ",backParent:"Back to Parent Atlas",levelOverview:"L0 Overview",levelSubPrefix:"L1+ Focus: ",allStreams:"All Streams",searchLabel:"Search nodes & prompts",searchPlaceholder:"Search concepts, paths, or prompts\u2026",zoomIn:"Zoom In",zoomOut:"Zoom Out",lock:"Lock",unlock:"Locked",fitView:"Fit View",reset:"Reset",legend:"Legend",scopeNotes:"Scope & Notes",learningPath:"Learning Order",expandDetail:"Details",collapseDetail:"Collapse",detailEdgeLabel:"Drill-down",deepDiveBadgeTitle:"Open deep-dive prompts",deepDiveModalTitle:"Deep Dive (Atlas Loop)",tabAsk:"Follow-Up Prompts",tabRecursive:"Recursive Sub-Atlas",copyBtn:"Copy Prompt",copiedBtn:"Copied",copySnippet:"Copy Snippet",openInEditor:"Open in Editor",editorConfirmHint:"Your browser may ask permission to open the external editor. Regenerate if files move.",recursiveUsageHint:"Send this prompt to your AI agent to generate a linked child HTML atlas for this node:",whatItDoes:"Summary",whyItMatters:"Why It Matters",inputsLabel:"Inputs / Conditions",outputsLabel:"Outputs / Effects",mechanismsLabel:"Mechanism & Side Effects",watchoutsLabel:"Watchouts",anchorsLabel:"Evidence & Anchors",openDeepDiveBtn:"View Deep-Dive & Recursive Prompts",unverifiedTag:"Unverified",verifiedTag:"Verified",uncoveredTitle:"Uncovered Scope",unverifiedTitle:"Unverified Items",noSearchMatches:"No matching nodes",nestedBadge:"Sub-node",close:"Close",roles:{entry:"Entry / Thesis",core:"Core Mechanism",branch:"Decision / Branch",foundation:"Foundation",context:"Context",extension:"Extension",outcome:"Outcome"}}};function $T(e={}){let n=String(e.language||"en").toLowerCase().startsWith("zh")?Q1.zh:Q1.en,r=e.uiLabels&&typeof e.uiLabels=="object"?e.uiLabels:{};return{...n,...r,roles:{...n.roles,...r.roles||{}}}}var ia={entry:"#18181b",core:"#52525b",branch:"#b45309",foundation:"#334155",context:"#a1a1aa",extension:"#6366f1",outcome:"#15803d"};function BT(){return(0,C.jsxs)("svg",{className:"atlas-search-icon",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,C.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,C.jsx)("path",{d:"m21 21-4.3-4.3"})]})}function HT({locked:e}){return e?(0,C.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,C.jsx)("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),(0,C.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}):(0,C.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,C.jsx)("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),(0,C.jsx)("path",{d:"M7 11V7a5 5 0 0 1 9.9-1"})]})}function FT(){return(0,C.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,C.jsx)("path",{d:"m15 18-6-6 6-6"})})}function VT(e){return navigator.clipboard&&typeof navigator.clipboard.writeText=="function"?navigator.clipboard.writeText(e).catch(()=>K1(e)):Promise.resolve(K1(e))}function K1(e){let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch{}return document.body.removeChild(t),!0}function jT(e,t,n,r,o){let i=new pf.default.graphlib.Graph;i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:"LR",nodesep:64,ranksep:116,marginx:44,marginy:44});let s=Array.isArray(e.nodes)?e.nodes:[],l=Array.isArray(e.edges)?e.edges:[],a=s.filter(h=>t==="all"?!0:Array.isArray(h.streamIds)&&h.streamIds.includes(t)),u=new Set(a.map(h=>h.id)),c=[],f=[];for(let h of a){let m=Array.isArray(h.detailGraph?.nodes)?h.detailGraph.nodes.length:0,w=n.has(h.id)&&m>0,x=296,g=144;if(i.setNode(h.id,{width:x,height:g}),c.push({id:h.id,type:"atlasNode",position:{x:0,y:0},data:{item:h,isSubNode:!1,detailCount:m,isExpanded:w,t:r,...o},style:{width:x,minHeight:g}}),w){let y=h.detailGraph.nodes||[],p=h.detailGraph.edges||[],v=new Map;for(let k of y)v.set(k.id,0);for(let k of p)v.has(k.target)&&v.set(k.target,v.get(k.target)+1);for(let k of y){let S=`${h.id}::${k.id}`,_=264,N=120;if(i.setNode(S,{width:_,height:N}),c.push({id:S,type:"atlasNode",position:{x:0,y:0},data:{item:{...k,parentTitle:h.title,parentId:h.id},isSubNode:!0,detailCount:0,isExpanded:!1,t:r,...o},style:{width:_,minHeight:N}}),(v.get(k.id)||0)===0){let M=`bridge::${h.id}->${S}`;i.setEdge(h.id,S),f.push({id:M,source:h.id,target:S,label:r.detailEdgeLabel,style:{stroke:"#71717a",strokeWidth:1.4,strokeDasharray:"4 4"},labelStyle:{fill:"#52525b",fontSize:10.5,fontWeight:500},labelBgStyle:{fill:"#fafafa",fillOpacity:.94},labelBgPadding:[5,2],markerEnd:{type:Wt.ArrowClosed,color:"#71717a"}})}}for(let k=0;k<p.length;k++){let S=p[k],_=`${h.id}::${S.source}`,N=`${h.id}::${S.target}`;i.setEdge(_,N),f.push({id:`subedge::${h.id}::${S.id||k}`,source:_,target:N,label:S.label||"",style:{stroke:"#a1a1aa",strokeWidth:1.4},labelStyle:{fill:"#52525b",fontSize:10.5,fontWeight:500},labelBgStyle:{fill:"#ffffff",fillOpacity:.94},labelBgPadding:[5,2],markerEnd:{type:Wt.ArrowClosed,color:"#a1a1aa"}})}}}for(let h=0;h<l.length;h++){let m=l[h];!u.has(m.source)||!u.has(m.target)||(i.setEdge(m.source,m.target),f.push({id:m.id||`edge-${h}`,source:m.source,target:m.target,label:m.label||"",style:{stroke:"#71717a",strokeWidth:1.5},labelStyle:{fill:"#27272a",fontSize:11,fontWeight:500},labelBgStyle:{fill:"#ffffff",fillOpacity:.95},labelBgPadding:[6,3],labelBgBorderRadius:4,markerEnd:{type:Wt.ArrowClosed,color:"#71717a"}}))}return pf.default.layout(i),{nodes:c.map(h=>{let m=i.node(h.id),w=h.style.width||296,x=h.style.minHeight||144;return{...h,targetPosition:Q.Left,sourcePosition:Q.Right,position:{x:Math.round((m?m.x:0)-w/2),y:Math.round((m?m.y:0)-x/2)}}}),edges:f}}function WT({id:e,data:t,selected:n}){let{item:r,isSubNode:o,detailCount:i,isExpanded:s,t:l,onToggleExpand:a,onOpenDeepDive:u,onSelectNode:c}=t,[f,d]=(0,oe.useState)(!1),h=ia[r.role]?r.role:"core",m=ia[h],w=!!(r.deepDive&&(Array.isArray(r.deepDive.askPrompts)&&r.deepDive.askPrompts.length>0||r.deepDive.subAtlasPrompt)),x=Array.isArray(r.anchors)?r.anchors.length:0;return(0,C.jsxs)("div",{"data-testid":o?"atlas-subnode-card":"atlas-node-card","data-node-id":e,className:`atlas-node ${o?"atlas-node-sub":""} ${n?"atlas-node-selected":""}`,children:[(0,C.jsx)(xr,{type:"target",position:Q.Left,className:"atlas-handle"}),(0,C.jsxs)("div",{className:"atlas-node-header",children:[(0,C.jsxs)("div",{className:"atlas-node-badges",children:[(0,C.jsxs)("span",{className:"atlas-role-badge",children:[(0,C.jsx)("span",{className:"atlas-role-dot",style:{backgroundColor:m},"aria-hidden":"true"}),(0,C.jsx)("span",{children:l.roles[h]||r.role})]}),o&&(0,C.jsx)("span",{className:"atlas-sub-pill",children:l.nestedBadge}),r.confidence==="unverified"&&(0,C.jsx)("span",{className:"atlas-unverified-pill",children:l.unverifiedTag})]}),w&&(0,C.jsxs)("div",{className:"atlas-help-wrap nodrag nopan",children:[(0,C.jsx)("button",{type:"button","data-testid":"node-deep-dive-btn","data-for-node":e,"aria-label":`${l.deepDiveBadgeTitle}: ${r.title}`,className:"atlas-help-btn nodrag nopan",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onFocus:()=>d(!0),onBlur:()=>d(!1),onPointerDown:g=>g.stopPropagation(),onMouseDown:g=>g.stopPropagation(),onClick:g=>{g.stopPropagation(),d(!1),u({title:r.title,deepDive:r.deepDive})},children:"?"}),f&&(0,C.jsx)("div",{role:"tooltip","data-testid":"deep-dive-tooltip",className:"atlas-help-tooltip",children:r.deepDive.hoverHint||l.deepDiveBadgeTitle})]})]}),(0,C.jsxs)("div",{className:"atlas-node-body",children:[(0,C.jsx)("div",{className:"atlas-node-title",children:r.title}),r.summary&&(0,C.jsx)("div",{className:"atlas-node-summary",children:r.summary})]}),(i>0||x>0)&&(0,C.jsxs)("div",{className:"atlas-node-footer nodrag nopan",children:[i>0?(0,C.jsx)("button",{type:"button","data-testid":"node-expand-btn","data-for-node":e,"aria-expanded":s,className:`atlas-expand-btn nodrag nopan ${s?"active":""}`,onPointerDown:g=>g.stopPropagation(),onMouseDown:g=>g.stopPropagation(),onClick:g=>{g.stopPropagation(),a(e)},children:s?`${l.collapseDetail} (${i})`:`${l.expandDetail} (${i})`}):(0,C.jsx)("span",{}),x>0&&(0,C.jsxs)("span",{className:"atlas-anchor-count",translate:"no",children:["#",x]})]}),(0,C.jsx)(xr,{type:"source",position:Q.Right,className:"atlas-handle"})]})}var UT={atlasNode:WT};function gf({text:e,label:t,copiedLabel:n,testId:r="btn-copy-prompt",small:o=!1}){let[i,s]=(0,oe.useState)(!1),l=(0,oe.useRef)(null);return(0,oe.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("button",{type:"button","data-testid":r,"data-copied":i?"true":"false",onClick:()=>{VT(e).then(()=>{s(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>s(!1),1800)})},className:`atlas-copy-btn ${o?"small":""} ${i?"copied":""}`,children:i?n:t}),(0,C.jsx)("span",{className:"sr-only","aria-live":"polite",children:i?n:""})]})}function YT({target:e,t,onClose:n}){let[r,o]=(0,oe.useState)("ask");if((0,oe.useEffect)(()=>{o("ask")},[e]),(0,oe.useEffect)(()=>{if(!e)return;let l=a=>{a.key==="Escape"&&n()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,n]),!e||!e.deepDive)return null;let i=Array.isArray(e.deepDive.askPrompts)?e.deepDive.askPrompts:[],s=e.deepDive.subAtlasPrompt||"";return(0,C.jsx)("div",{className:"atlas-modal-backdrop","data-testid":"deep-dive-backdrop",role:"presentation",onMouseDown:l=>{l.target===l.currentTarget&&n()},children:(0,C.jsxs)("div",{className:"atlas-modal",role:"dialog","aria-modal":"true","aria-labelledby":"atlas-dive-modal-title","data-testid":"deep-dive-panel",children:[(0,C.jsxs)("div",{className:"atlas-modal-header",children:[(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"atlas-modal-kicker",children:t.deepDiveModalTitle}),(0,C.jsx)("h3",{id:"atlas-dive-modal-title",className:"atlas-modal-title",children:e.title})]}),(0,C.jsx)("button",{type:"button","data-testid":"btn-close-deep-dive","aria-label":t.close,className:"atlas-icon-close",onClick:n,children:t.close})]}),(0,C.jsxs)("div",{className:"atlas-modal-tabs",role:"tablist",children:[(0,C.jsxs)("button",{type:"button",role:"tab","aria-selected":r==="ask","data-testid":"tab-ask-prompts",className:`atlas-tab-btn ${r==="ask"?"active":""}`,onClick:()=>o("ask"),children:[t.tabAsk," (",i.length,")"]}),s&&(0,C.jsx)("button",{type:"button",role:"tab","aria-selected":r==="recursive","data-testid":"tab-recursive-prompt",className:`atlas-tab-btn ${r==="recursive"?"active":""}`,onClick:()=>o("recursive"),children:t.tabRecursive})]}),(0,C.jsxs)("div",{className:"atlas-modal-body",children:[r==="ask"&&(0,C.jsx)("div",{className:"atlas-prompt-list",children:i.map((l,a)=>(0,C.jsxs)("div",{className:"atlas-prompt-card","data-testid":"ask-prompt-card",children:[(0,C.jsxs)("div",{className:"atlas-prompt-card-head",children:[(0,C.jsx)("strong",{children:l.title}),(0,C.jsx)(gf,{text:l.prompt,label:t.copyBtn,copiedLabel:t.copiedBtn,testId:`btn-copy-ask-${a}`})]}),(0,C.jsx)("pre",{className:"atlas-prompt-pre","data-testid":"ask-prompt-text",children:l.prompt})]},a))}),r==="recursive"&&s&&(0,C.jsxs)("div",{className:"atlas-prompt-card","data-testid":"recursive-prompt-card",children:[(0,C.jsx)("p",{className:"atlas-hint-p",children:t.recursiveUsageHint}),(0,C.jsxs)("div",{className:"atlas-prompt-card-head",children:[(0,C.jsx)("strong",{translate:"no",children:"Atlas Loop \xB7 L1+"}),(0,C.jsx)(gf,{text:s,label:t.copyBtn,copiedLabel:t.copiedBtn,testId:"btn-copy-recursive"})]}),(0,C.jsx)("pre",{className:"atlas-prompt-pre","data-testid":"recursive-prompt-text",children:s})]})]})]})})}function qT({open:e,uncoveredScopes:t,unverifiedNotes:n,t:r,onClose:o}){return(0,oe.useEffect)(()=>{if(!e)return;let i=s=>{s.key==="Escape"&&o()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[e,o]),e?(0,C.jsx)("div",{className:"atlas-modal-backdrop",role:"presentation",onMouseDown:i=>{i.target===i.currentTarget&&o()},children:(0,C.jsxs)("div",{className:"atlas-modal",role:"dialog","aria-modal":"true","aria-labelledby":"atlas-scope-modal-title",children:[(0,C.jsxs)("div",{className:"atlas-modal-header",children:[(0,C.jsx)("h3",{id:"atlas-scope-modal-title",className:"atlas-modal-title",children:r.scopeNotes}),(0,C.jsx)("button",{type:"button","aria-label":r.close,className:"atlas-icon-close",onClick:o,children:r.close})]}),(0,C.jsxs)("div",{className:"atlas-modal-body",children:[t.length>0&&(0,C.jsxs)("section",{className:"atlas-sec",style:{marginTop:0,paddingTop:0,borderTop:"none"},children:[(0,C.jsx)("h4",{children:r.uncoveredTitle}),(0,C.jsx)("ul",{children:t.map((i,s)=>(0,C.jsx)("li",{children:i},s))})]}),n.length>0&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:r.unverifiedTitle}),(0,C.jsx)("ul",{children:n.map((i,s)=>(0,C.jsx)("li",{children:i},s))})]})]})]})}):null}function XT({data:e}){let t=e.meta||{},n=(0,oe.useMemo)(()=>$T(t),[t]),r=Array.isArray(e.streams)?e.streams:[],[o,i]=(0,oe.useState)("all"),[s,l]=(0,oe.useState)(()=>new Set),[a,u]=(0,oe.useState)(!1),[c,f]=(0,oe.useState)(!1),[d,h]=(0,oe.useState)(!1),[m,w]=(0,oe.useState)(""),[x,g]=(0,oe.useState)(null),[y,p]=(0,oe.useState)(null),[v,k]=(0,oe.useState)(0),S=Ti(),_=(0,oe.useRef)(null),N=(0,oe.useCallback)(O=>{l(W=>{let q=new Set(W);return q.has(O)?q.delete(O):q.add(O),q})},[]),M=(0,oe.useCallback)(O=>{p(O)},[]),A=(0,oe.useCallback)(O=>{g(O)},[]),R=(0,oe.useMemo)(()=>({onToggleExpand:N,onOpenDeepDive:M,onSelectNode:A}),[N,M,A]),V=(0,oe.useMemo)(()=>jT(e,o,s,n,R),[e,o,s,n,R,v]),[B,E,b]=Ev(V.nodes),[I,P,L]=Sv(V.edges);(0,oe.useEffect)(()=>{E(V.nodes),P(V.edges)},[V,E,P]),(0,oe.useEffect)(()=>{E(O=>O.map(W=>{let q=W.id===x;return W.selected===q?W:{...W,selected:q}}))},[x,E]),(0,oe.useEffect)(()=>{if(_.current){let O=_.current;B.some(q=>q.id===O)&&(_.current=null,requestAnimationFrame(()=>{S.fitView({nodes:[{id:O}],padding:.45,duration:0})}))}},[B,S]);let z=(0,oe.useCallback)(()=>{S.fitView({padding:.18,duration:0})},[S]),F=(0,oe.useCallback)(()=>{i("all"),l(new Set),w(""),g(null),p(null),h(!1),u(!1),k(O=>O+1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{S.fitView({padding:.18,duration:0})})})},[S]),H=(0,oe.useMemo)(()=>{let O=[];for(let W of e.nodes||[]){let q=(W.anchors||[]).map(J=>[J.label,J.filePath,J.symbol,J.content,J.citation,J.url].filter(Boolean).join(" ")).join(" "),Z=(W.deepDive?.askPrompts||[]).map(J=>`${J.title} ${J.prompt}`).join(" ");O.push({flowId:W.id,parentId:null,title:W.title,summary:W.summary||"",isSub:!1,haystack:`${W.title} ${W.summary||""} ${W.whyItMatters||""} ${q} ${Z}`.toLowerCase()});for(let J of W.detailGraph?.nodes||[]){let ie=(J.anchors||[]).map(se=>[se.label,se.filePath,se.symbol,se.content,se.citation,se.url].filter(Boolean).join(" ")).join(" ");O.push({flowId:`${W.id}::${J.id}`,parentId:W.id,title:J.title,summary:`${W.title} \u2192 ${J.summary||""}`,isSub:!0,haystack:`${J.title} ${J.summary||""} ${W.title} ${ie}`.toLowerCase()})}}return O},[e.nodes]),Y=(0,oe.useMemo)(()=>{let O=m.trim().toLowerCase();return O?H.filter(W=>W.haystack.includes(O)).slice(0,12):[]},[m,H]),ne=O=>{o!=="all"&&i("all"),O.parentId&&!s.has(O.parentId)&&l(q=>{let Z=new Set(q);return Z.add(O.parentId),Z}),g(O.flowId),_.current=O.flowId,w(""),B.some(q=>q.id===O.flowId)&&(_.current=null,requestAnimationFrame(()=>{S.fitView({nodes:[{id:O.flowId}],padding:.45,duration:0})}))},U=(0,oe.useMemo)(()=>{if(!x)return null;if(x.includes("::")){let[O,W]=x.split("::"),q=(e.nodes||[]).find(J=>J.id===O),Z=(q?.detailGraph?.nodes||[]).find(J=>J.id===W);return Z?{...Z,_parentTitle:q?.title}:null}return(e.nodes||[]).find(O=>O.id===x)||null},[x,e.nodes]),te=(0,oe.useMemo)(()=>o==="all"?r[0]||null:r.find(O=>O.id===o)||null,[o,r]),re=(0,oe.useMemo)(()=>{let O=new Map;for(let W of e.nodes||[])O.set(W.id,W.title);return O},[e.nodes]),ee=Array.isArray(t.uncoveredScopes)?t.uncoveredScopes:[],$=Array.isArray(t.unverifiedNotes)?t.unverifiedNotes:[],G=ee.length+$.length;return(0,C.jsxs)("div",{className:"atlas-shell-root",children:[(0,C.jsx)("a",{href:"#atlas-main",className:"atlas-skip-link",children:n.skipToCanvas}),(0,C.jsxs)("header",{className:"atlas-topbar","data-testid":"atlas-topbar",children:[(0,C.jsxs)("div",{className:"atlas-topbar-left",children:[(0,C.jsxs)("div",{className:"atlas-top-badges",children:[t.parentMapHtml&&(0,C.jsxs)("a",{href:t.parentMapHtml,"data-testid":"parent-map-link",className:"atlas-parent-link",children:[(0,C.jsx)(FT,{}),(0,C.jsx)("span",{children:n.backParent})]}),t.subjectTag&&(0,C.jsx)("span",{className:"atlas-subject-badge",children:t.subjectTag}),(0,C.jsx)("span",{className:"atlas-level-badge","data-testid":"level-badge",children:t.level&&Number(t.level)>0&&t.drillDownTarget?`${n.levelSubPrefix}${t.drillDownTarget}`:n.levelOverview})]}),(0,C.jsxs)("div",{className:"atlas-title-row",children:[(0,C.jsx)("h1",{className:"atlas-main-title",children:t.title}),t.subtitle&&(0,C.jsx)("p",{className:"atlas-subtitle",children:t.subtitle})]})]}),(0,C.jsxs)("div",{className:"atlas-topbar-right",children:[(0,C.jsxs)("div",{className:"atlas-model-pill","data-testid":"model-badge",children:[(0,C.jsx)("span",{children:n.modelPrefix}),(0,C.jsx)("span",{translate:"no",children:t.generatedByModel})]}),G>0&&(0,C.jsxs)("button",{type:"button","data-testid":"btn-scope-notes",className:"atlas-scope-btn",onClick:()=>h(!0),children:[n.scopeNotes," (",G,")"]})]})]}),(0,C.jsxs)("div",{className:"atlas-toolbar-row",children:[(0,C.jsxs)("div",{className:"atlas-streams-bar","data-testid":"stream-filter-bar",children:[(0,C.jsx)("button",{type:"button","data-testid":"stream-btn-all","data-active":o==="all"?"true":"false",className:`atlas-stream-pill ${o==="all"?"active":""}`,onClick:()=>i("all"),children:n.allStreams}),r.map(O=>{let W=o===O.id,q=!!(O.deepDive&&(O.deepDive.askPrompts&&O.deepDive.askPrompts.length>0||O.deepDive.subAtlasPrompt));return(0,C.jsxs)("div",{className:`atlas-stream-pill-group ${W?"active":""}`,children:[(0,C.jsx)("button",{type:"button","data-testid":`stream-btn-${O.id}`,"data-active":W?"true":"false",className:`atlas-stream-pill ${W?"active":""}`,onClick:()=>i(O.id),children:O.title}),q&&(0,C.jsx)("button",{type:"button","aria-label":`${n.deepDiveBadgeTitle}: ${O.title}`,title:O.deepDive.hoverHint||n.deepDiveBadgeTitle,"data-testid":`stream-deep-dive-${O.id}`,className:"atlas-stream-help-btn",onClick:()=>p({title:O.title,deepDive:O.deepDive}),children:"?"})]},O.id)})]}),(0,C.jsxs)("div",{className:"atlas-controls-group",children:[(0,C.jsxs)("div",{className:"atlas-search-box",children:[(0,C.jsxs)("label",{htmlFor:"atlas-search-input",className:"atlas-search-field",children:[(0,C.jsx)("span",{className:"sr-only",children:n.searchLabel}),(0,C.jsx)(BT,{}),(0,C.jsx)("input",{id:"atlas-search-input",name:"q",type:"search",autoComplete:"off",spellCheck:!1,"data-testid":"search-input",value:m,onChange:O=>w(O.target.value),placeholder:n.searchPlaceholder,className:"atlas-search-input"})]}),m.trim()!==""&&(0,C.jsx)("div",{className:"atlas-search-dropdown","data-testid":"search-results","aria-live":"polite",children:Y.length===0?(0,C.jsx)("div",{className:"atlas-search-empty",children:n.noSearchMatches}):Y.map(O=>(0,C.jsxs)("button",{type:"button","data-testid":"search-result-item","data-target-id":O.flowId,className:"atlas-search-item",onClick:()=>ne(O),children:[(0,C.jsxs)("div",{className:"atlas-search-item-title",children:[(0,C.jsx)("span",{children:O.title}),O.isSub&&(0,C.jsx)("span",{className:"atlas-sub-pill",children:n.nestedBadge})]}),O.summary&&(0,C.jsx)("div",{className:"atlas-search-item-sub",children:O.summary})]},O.flowId))})]}),(0,C.jsxs)("div",{className:"atlas-canvas-btns",children:[(0,C.jsxs)("button",{type:"button","data-testid":"btn-zoom-in","aria-label":n.zoomIn,className:"atlas-ctrl-btn",onClick:()=>S.zoomIn({duration:0}),children:["+ ",n.zoomIn]}),(0,C.jsxs)("button",{type:"button","data-testid":"btn-zoom-out","aria-label":n.zoomOut,className:"atlas-ctrl-btn",onClick:()=>S.zoomOut({duration:0}),children:["\u2212 ",n.zoomOut]}),(0,C.jsxs)("button",{type:"button","data-testid":"btn-lock","data-locked":a?"true":"false","aria-pressed":a,className:`atlas-ctrl-btn ${a?"locked":""}`,onClick:()=>u(O=>!O),children:[(0,C.jsx)(HT,{locked:a}),(0,C.jsx)("span",{children:a?n.unlock:n.lock})]}),(0,C.jsx)("button",{type:"button","data-testid":"btn-fit-view",className:"atlas-ctrl-btn",onClick:z,children:n.fitView}),(0,C.jsx)("button",{type:"button","data-testid":"btn-reset",className:"atlas-ctrl-btn",onClick:F,children:n.reset}),(0,C.jsx)("button",{type:"button","data-testid":"btn-legend","aria-pressed":c,className:`atlas-ctrl-btn ${c?"active":""}`,onClick:()=>f(O=>!O),children:n.legend})]})]})]}),te&&Array.isArray(te.learningOrder)&&te.learningOrder.length>0&&(0,C.jsxs)("nav",{className:"atlas-reading-bar","aria-label":n.learningPath,"data-testid":"learning-order-bar",children:[(0,C.jsx)("span",{className:"atlas-reading-label",children:n.learningPath}),(0,C.jsx)("div",{className:"atlas-reading-steps",children:te.learningOrder.map((O,W)=>{let q=re.get(O)||O;return(0,C.jsxs)("button",{type:"button","data-testid":`learning-step-${W}`,className:`atlas-step-chip ${x===O?"active":""}`,onClick:()=>{g(O),S.fitView({nodes:[{id:O}],padding:.45,duration:0})},children:[(0,C.jsx)("span",{className:"atlas-step-num",children:W+1}),(0,C.jsx)("span",{children:q})]},O)})})]}),(0,C.jsxs)("main",{id:"atlas-main",className:"atlas-main-workspace",children:[(0,C.jsxs)("div",{className:"atlas-canvas-container","data-testid":"atlas-canvas-wrap",children:[(0,C.jsxs)(xv,{nodes:B,edges:I,nodeTypes:UT,onNodesChange:b,onEdgesChange:L,onNodeClick:(O,W)=>g(W.id),nodesDraggable:!a,nodesConnectable:!1,elementsSelectable:!0,fitView:!0,fitViewOptions:{padding:.18},minZoom:.15,maxZoom:2.5,proOptions:{hideAttribution:!0},children:[(0,C.jsx)(_v,{gap:22,size:1,color:"#e4e4e7"}),(0,C.jsx)(bv,{pannable:!0,zoomable:!0,maskColor:"rgba(244, 244, 245, 0.7)",nodeColor:O=>{let W=O.data?.item?.role;return ia[W]||"#71717a"}})]}),c&&(0,C.jsx)("div",{className:"atlas-legend-card","data-testid":"legend-panel",children:Object.entries(ia).map(([O,W])=>(0,C.jsxs)("div",{className:"atlas-legend-row",children:[(0,C.jsx)("span",{className:"atlas-legend-swatch",style:{backgroundColor:W},"aria-hidden":"true"}),(0,C.jsx)("span",{children:n.roles[O]||O})]},O))})]}),U&&(0,C.jsxs)("aside",{className:"atlas-inspector","data-testid":"inspector-panel",children:[(0,C.jsxs)("div",{className:"atlas-inspector-head",children:[(0,C.jsxs)("div",{className:"atlas-inspector-head-text",children:[U._parentTitle&&(0,C.jsx)("div",{className:"atlas-inspector-parent",children:U._parentTitle}),(0,C.jsx)("h2",{className:"atlas-inspector-title",children:U.title})]}),(0,C.jsx)("button",{type:"button","data-testid":"btn-close-inspector","aria-label":n.close,className:"atlas-icon-close",onClick:()=>g(null),children:n.close})]}),(0,C.jsxs)("div",{className:"atlas-inspector-meta",children:[(0,C.jsxs)("span",{className:"atlas-conf-badge",children:[(0,C.jsx)("span",{className:"atlas-role-dot",style:{backgroundColor:U.confidence==="unverified"?"#b45309":"#15803d"},"aria-hidden":"true"}),(0,C.jsx)("span",{children:U.confidence==="unverified"?n.unverifiedTag:n.verifiedTag})]}),U.unverifiedReason&&(0,C.jsx)("p",{className:"atlas-unverified-note",children:U.unverifiedReason})]}),U.summary&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.whatItDoes}),(0,C.jsx)("p",{children:U.summary})]}),U.whyItMatters&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.whyItMatters}),(0,C.jsx)("p",{children:U.whyItMatters})]}),(U.keyFactors?.inputs||U.keyFactors?.outputs)&&(0,C.jsxs)("section",{className:"atlas-sec",children:[U.keyFactors.inputs&&(0,C.jsxs)("div",{className:"atlas-kv",children:[(0,C.jsxs)("strong",{children:[n.inputsLabel,"\uFF1A"]}),(0,C.jsx)("span",{children:U.keyFactors.inputs})]}),U.keyFactors.outputs&&(0,C.jsxs)("div",{className:"atlas-kv",children:[(0,C.jsxs)("strong",{children:[n.outputsLabel,"\uFF1A"]}),(0,C.jsx)("span",{children:U.keyFactors.outputs})]})]}),U.mechanismsAndEffects&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.mechanismsLabel}),(0,C.jsx)("p",{children:U.mechanismsAndEffects})]}),U.watchouts&&(0,C.jsxs)("section",{className:"atlas-sec atlas-watchout-box",children:[(0,C.jsx)("h4",{children:n.watchoutsLabel}),(0,C.jsx)("p",{children:U.watchouts})]}),Array.isArray(U.anchors)&&U.anchors.length>0&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.anchorsLabel}),(0,C.jsx)("div",{className:"atlas-anchor-list",children:U.anchors.map((O,W)=>(0,C.jsxs)("div",{className:"atlas-anchor-card","data-testid":"anchor-item",children:[(0,C.jsx)("div",{className:"atlas-anchor-label",children:O.label}),O.kind==="editor"&&(0,C.jsxs)("div",{className:"atlas-anchor-editor",children:[(0,C.jsxs)("code",{translate:"no",children:[O.filePath,":",O.line||1,O.symbol?` (${O.symbol})`:""]}),O.unsupportedNote?(0,C.jsx)("div",{className:"atlas-unverified-note",children:O.unsupportedNote}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("a",{href:O.editorUri,"data-testid":"editor-jump-link",className:"atlas-editor-btn",children:[n.openInEditor," (",(O.editor||"vscode").toUpperCase(),")"]}),(0,C.jsx)("div",{className:"atlas-editor-hint",children:n.editorConfirmHint})]})]}),O.kind==="snippet"&&(0,C.jsxs)("div",{className:"atlas-anchor-snippet",children:[(0,C.jsx)("pre",{translate:"no",children:O.content}),(0,C.jsx)(gf,{text:O.content||"",label:n.copySnippet,copiedLabel:n.copiedBtn,testId:`btn-copy-snippet-${W}`,small:!0})]}),O.kind==="link"&&(0,C.jsx)("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:"atlas-ext-link",translate:"no",children:O.url}),O.kind==="source"&&(0,C.jsx)("div",{className:"atlas-source-cite",children:O.citation})]},W))})]}),U.deepDive&&(0,C.jsx)("section",{className:"atlas-sec",children:(0,C.jsxs)("button",{type:"button","data-testid":"inspector-open-deep-dive",className:"atlas-open-dive-btn",onClick:()=>p({title:U.title,deepDive:U.deepDive}),children:["? ",n.openDeepDiveBtn]})})]})]}),(0,C.jsx)(YT,{target:y,t:n,onClose:()=>p(null)}),(0,C.jsx)(qT,{open:d,uncoveredScopes:ee,unverifiedNotes:$,t:n,onClose:()=>h(!1)})]})}function GT(){let e=document.getElementById("atlas-data-json"),t=e?JSON.parse(e.textContent):window.__ATLAS_DATA__||{},n=document.getElementById("root");(0,J1.createRoot)(n).render((0,C.jsx)(Yd,{children:(0,C.jsx)(XT,{data:t})}))}GT();})();
1841
+ /*! Bundled license information:
1842
+
1843
+ react/cjs/react.production.min.js:
1844
+ (**
1845
+ * @license React
1846
+ * react.production.min.js
1847
+ *
1848
+ * Copyright (c) Facebook, Inc. and its affiliates.
1849
+ *
1850
+ * This source code is licensed under the MIT license found in the
1851
+ * LICENSE file in the root directory of this source tree.
1852
+ *)
1853
+
1854
+ scheduler/cjs/scheduler.production.min.js:
1855
+ (**
1856
+ * @license React
1857
+ * scheduler.production.min.js
1858
+ *
1859
+ * Copyright (c) Facebook, Inc. and its affiliates.
1860
+ *
1861
+ * This source code is licensed under the MIT license found in the
1862
+ * LICENSE file in the root directory of this source tree.
1863
+ *)
1864
+
1865
+ react-dom/cjs/react-dom.production.min.js:
1866
+ (**
1867
+ * @license React
1868
+ * react-dom.production.min.js
1869
+ *
1870
+ * Copyright (c) Facebook, Inc. and its affiliates.
1871
+ *
1872
+ * This source code is licensed under the MIT license found in the
1873
+ * LICENSE file in the root directory of this source tree.
1874
+ *)
1875
+
1876
+ react/cjs/react-jsx-runtime.production.min.js:
1877
+ (**
1878
+ * @license React
1879
+ * react-jsx-runtime.production.min.js
1880
+ *
1881
+ * Copyright (c) Facebook, Inc. and its affiliates.
1882
+ *
1883
+ * This source code is licensed under the MIT license found in the
1884
+ * LICENSE file in the root directory of this source tree.
1885
+ *)
1886
+
1887
+ use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
1888
+ (**
1889
+ * @license React
1890
+ * use-sync-external-store-shim.production.js
1891
+ *
1892
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1893
+ *
1894
+ * This source code is licensed under the MIT license found in the
1895
+ * LICENSE file in the root directory of this source tree.
1896
+ *)
1897
+
1898
+ use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
1899
+ (**
1900
+ * @license React
1901
+ * use-sync-external-store-shim/with-selector.production.js
1902
+ *
1903
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
1904
+ *
1905
+ * This source code is licensed under the MIT license found in the
1906
+ * LICENSE file in the root directory of this source tree.
1907
+ *)
1908
+ */
1383
1909
  </script>
1384
1910
  </body>
1385
1911
  </html>