@opengeoweb/taf 16.0.0 → 17.0.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.
Files changed (134) hide show
  1. package/index.esm.js +879 -349
  2. package/package.json +8 -8
  3. package/src/index.d.ts +0 -7
  4. package/src/lib/NafDemo.stories.d.ts +0 -7
  5. package/src/lib/TafDemo.stories.d.ts +0 -8
  6. package/src/lib/components/AutoTaf/AutoTaf.d.ts +0 -9
  7. package/src/lib/components/AutoTaf/AutoTaf.spec.d.ts +0 -1
  8. package/src/lib/components/AutoTaf/AutoTaf.stories.d.ts +0 -8
  9. package/src/lib/components/AutoTaf/index.d.ts +0 -1
  10. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.d.ts +0 -38
  11. package/src/lib/components/ComponentsLookUp/ComponentsLookUp.spec.d.ts +0 -1
  12. package/src/lib/components/ComponentsLookUp/index.d.ts +0 -1
  13. package/src/lib/components/IssuesPane/IssuesButton.d.ts +0 -10
  14. package/src/lib/components/IssuesPane/IssuesButton.spec.d.ts +0 -1
  15. package/src/lib/components/IssuesPane/IssuesPane.d.ts +0 -14
  16. package/src/lib/components/IssuesPane/IssuesPane.spec.d.ts +0 -1
  17. package/src/lib/components/IssuesPane/IssuesPane.stories.d.ts +0 -9
  18. package/src/lib/components/IssuesPane/IssuesPaneWrapper.d.ts +0 -4
  19. package/src/lib/components/IssuesPane/IssuesPaneWrapper.spec.d.ts +0 -1
  20. package/src/lib/components/IssuesPane/index.d.ts +0 -2
  21. package/src/lib/components/IssuesPane/types.d.ts +0 -16
  22. package/src/lib/components/IssuesPane/utils.d.ts +0 -8
  23. package/src/lib/components/IssuesPane/utils.spec.d.ts +0 -1
  24. package/src/lib/components/Providers/Providers.d.ts +0 -22
  25. package/src/lib/components/Providers/index.d.ts +0 -1
  26. package/src/lib/components/ResponsiveWrapper/ResponsiveWrapper.d.ts +0 -4
  27. package/src/lib/components/ResponsiveWrapper/ResponsiveWrapper.spec.d.ts +0 -1
  28. package/src/lib/components/Spinner/Spinner.d.ts +0 -4
  29. package/src/lib/components/Spinner/Spinner.spec.d.ts +0 -1
  30. package/src/lib/components/Spinner/Spinner.stories.d.ts +0 -10
  31. package/src/lib/components/StatusIcon/StatusIcon.d.ts +0 -8
  32. package/src/lib/components/StatusIcon/StatusIcon.spec.d.ts +0 -1
  33. package/src/lib/components/TabPanel/TabPanel.d.ts +0 -8
  34. package/src/lib/components/TabPanel/TabPanel.spec.d.ts +0 -1
  35. package/src/lib/components/TabPanel/index.d.ts +0 -1
  36. package/src/lib/components/TafAvatar/TafAvatar.d.ts +0 -8
  37. package/src/lib/components/TafAvatar/index.d.ts +0 -1
  38. package/src/lib/components/TafForm/TafForm.d.ts +0 -16
  39. package/src/lib/components/TafForm/TafForm.editor.spec.d.ts +0 -1
  40. package/src/lib/components/TafForm/TafForm.spec.d.ts +0 -1
  41. package/src/lib/components/TafForm/TafForm.statusChanges.spec.d.ts +0 -1
  42. package/src/lib/components/TafForm/TafForm.stories.d.ts +0 -27
  43. package/src/lib/components/TafForm/TafForm.validations.spec.d.ts +0 -1
  44. package/src/lib/components/TafForm/TafFormButtons/TafFormButtons.d.ts +0 -12
  45. package/src/lib/components/TafForm/TafFormButtons/TafFormButtons.spec.d.ts +0 -1
  46. package/src/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.d.ts +0 -11
  47. package/src/lib/components/TafForm/TafFormButtons/TafFormOptionsButton.spec.d.ts +0 -1
  48. package/src/lib/components/TafForm/TafFormRow/DragHandle.d.ts +0 -8
  49. package/src/lib/components/TafForm/TafFormRow/DragHandle.spec.d.ts +0 -1
  50. package/src/lib/components/TafForm/TafFormRow/TafFormRow.d.ts +0 -4
  51. package/src/lib/components/TafForm/TafFormRow/TafFormRow.spec.d.ts +0 -1
  52. package/src/lib/components/TafForm/TafFormRow/TafFormTextField.d.ts +0 -30
  53. package/src/lib/components/TafForm/TafFormRow/TafFormTextField.spec.d.ts +0 -1
  54. package/src/lib/components/TafForm/TafFormRow/types.d.ts +0 -31
  55. package/src/lib/components/TafForm/TafFormRow/validations/change.d.ts +0 -4
  56. package/src/lib/components/TafForm/TafFormRow/validations/change.spec.d.ts +0 -1
  57. package/src/lib/components/TafForm/TafFormRow/validations/clouds.d.ts +0 -34
  58. package/src/lib/components/TafForm/TafFormRow/validations/clouds.spec.d.ts +0 -1
  59. package/src/lib/components/TafForm/TafFormRow/validations/probability.d.ts +0 -2
  60. package/src/lib/components/TafForm/TafFormRow/validations/probability.spec.d.ts +0 -1
  61. package/src/lib/components/TafForm/TafFormRow/validations/utils.d.ts +0 -2
  62. package/src/lib/components/TafForm/TafFormRow/validations/utils.spec.d.ts +0 -1
  63. package/src/lib/components/TafForm/TafFormRow/validations/validField.d.ts +0 -21
  64. package/src/lib/components/TafForm/TafFormRow/validations/validField.spec.d.ts +0 -1
  65. package/src/lib/components/TafForm/TafFormRow/validations/visibility.d.ts +0 -12
  66. package/src/lib/components/TafForm/TafFormRow/validations/visibility.spec.d.ts +0 -1
  67. package/src/lib/components/TafForm/TafFormRow/validations/weather.d.ts +0 -15
  68. package/src/lib/components/TafForm/TafFormRow/validations/weather.spec.d.ts +0 -1
  69. package/src/lib/components/TafForm/TafFormRow/validations/wind.d.ts +0 -16
  70. package/src/lib/components/TafForm/TafFormRow/validations/wind.spec.d.ts +0 -1
  71. package/src/lib/components/TafForm/index.d.ts +0 -1
  72. package/src/lib/components/TafForm/utils.d.ts +0 -73
  73. package/src/lib/components/TafForm/utils.spec.d.ts +0 -1
  74. package/src/lib/components/TafHeader/TafHeader.d.ts +0 -8
  75. package/src/lib/components/TafHeader/TafHeader.spec.d.ts +0 -1
  76. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.d.ts +0 -10
  77. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.spec.d.ts +0 -1
  78. package/src/lib/components/TafLayout/LocationTabs/LocationTabs.stories.d.ts +0 -8
  79. package/src/lib/components/TafLayout/LocationTabs/index.d.ts +0 -1
  80. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.d.ts +0 -8
  81. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.spec.d.ts +0 -1
  82. package/src/lib/components/TafLayout/TacOverview/AdverseWeatherTacMessage.stories.d.ts +0 -8
  83. package/src/lib/components/TafLayout/TacOverview/ExportButton.d.ts +0 -7
  84. package/src/lib/components/TafLayout/TacOverview/ExportButton.spec.d.ts +0 -1
  85. package/src/lib/components/TafLayout/TacOverview/TacContainer.d.ts +0 -13
  86. package/src/lib/components/TafLayout/TacOverview/TacContainer.spec.d.ts +0 -1
  87. package/src/lib/components/TafLayout/TacOverview/TacContainerLayout.d.ts +0 -10
  88. package/src/lib/components/TafLayout/TacOverview/TacOverview.d.ts +0 -12
  89. package/src/lib/components/TafLayout/TacOverview/TacOverview.spec.d.ts +0 -1
  90. package/src/lib/components/TafLayout/TacOverview/TacOverview.stories.d.ts +0 -10
  91. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.d.ts +0 -12
  92. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.spec.d.ts +0 -1
  93. package/src/lib/components/TafLayout/TacOverview/TacOverviewMobile.stories.d.ts +0 -9
  94. package/src/lib/components/TafLayout/TacOverview/index.d.ts +0 -2
  95. package/src/lib/components/TafLayout/TafLayout.d.ts +0 -10
  96. package/src/lib/components/TafLayout/TafLayout.issuespane.spec.d.ts +0 -1
  97. package/src/lib/components/TafLayout/TafLayout.snackbar.spec.d.ts +0 -1
  98. package/src/lib/components/TafLayout/TafLayout.spec.d.ts +0 -1
  99. package/src/lib/components/TafLayout/TafLayout.stories.d.ts +0 -13
  100. package/src/lib/components/TafLayout/TafLayout.tacoverview.spec.d.ts +0 -1
  101. package/src/lib/components/TafLayout/TafPanel/TafPanel.d.ts +0 -23
  102. package/src/lib/components/TafLayout/TafPanel/TafPanel.spec.d.ts +0 -1
  103. package/src/lib/components/TafLayout/TafPanel/TafPanel.stories.d.ts +0 -11
  104. package/src/lib/components/TafLayout/TafPanel/index.d.ts +0 -1
  105. package/src/lib/components/TafLayout/TopTabs/TopTabs.d.ts +0 -9
  106. package/src/lib/components/TafLayout/TopTabs/TopTabs.spec.d.ts +0 -1
  107. package/src/lib/components/TafLayout/TopTabs/TopTabs.stories.d.ts +0 -8
  108. package/src/lib/components/TafLayout/TopTabs/index.d.ts +0 -1
  109. package/src/lib/components/TafLayout/utils.d.ts +0 -47
  110. package/src/lib/components/TafLayout/utils.spec.d.ts +0 -1
  111. package/src/lib/components/TafModule/TafModule.d.ts +0 -9
  112. package/src/lib/components/TafModule/TafModule.spec.d.ts +0 -1
  113. package/src/lib/components/TafModule/TafModule.stories.d.ts +0 -62
  114. package/src/lib/components/TafModule/TafModuleProvider.d.ts +0 -23
  115. package/src/lib/components/TafModule/index.d.ts +0 -1
  116. package/src/lib/components/TafRemarkField/TafRemarkField.d.ts +0 -7
  117. package/src/lib/components/TafRemarkField/TafRemarkField.spec.d.ts +0 -1
  118. package/src/lib/components/TafRemarkField/index.d.ts +0 -1
  119. package/src/lib/components/TafWrapper/TafConfigWrapper.d.ts +0 -13
  120. package/src/lib/components/TafWrapper/TafWrapper.d.ts +0 -3
  121. package/src/lib/components/TafWrapper/TafWrapper.spec.d.ts +0 -1
  122. package/src/lib/components/TafWrapper/index.d.ts +0 -1
  123. package/src/lib/types.d.ts +0 -173
  124. package/src/lib/utils/dateFormats.d.ts +0 -2
  125. package/src/lib/utils/i18n.d.ts +0 -6
  126. package/src/lib/utils/mockdata/fakeTafConfig.d.ts +0 -2
  127. package/src/lib/utils/mockdata/fakeTafList.d.ts +0 -26
  128. package/src/lib/utils/mockdata/naf/fakeNafConfig.d.ts +0 -2
  129. package/src/lib/utils/mockdata/naf/fakeNafList.d.ts +0 -12
  130. package/src/lib/utils/taf-api/api.d.ts +0 -7
  131. package/src/lib/utils/taf-api/fakeApi.d.ts +0 -4
  132. package/src/lib/utils/taf-api/hooks.d.ts +0 -25
  133. package/src/lib/utils/utils.d.ts +0 -1
  134. package/src/lib/utils/weatherPhenomena.d.ts +0 -422
package/index.esm.js CHANGED
@@ -1,4 +1,3 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
1
  import { Chip, Box, Typography, Grid, Button, TextField, LinearProgress, MenuList, MenuItem, Card, Tabs, Tab, Backdrop, CircularProgress } from '@mui/material';
3
2
  import React, { useState, useEffect } from 'react';
4
3
  import { useFormContext, useFieldArray, Controller } from 'react-hook-form';
@@ -11,6 +10,7 @@ import { SHARED_NAMESPACE, CustomTooltip, ToolContainerDraggable, Avatar, getIni
11
10
  import { snackbarActions, snackbarTypes } from '@opengeoweb/snackbar';
12
11
  import 'i18next';
13
12
  import { useTranslation } from 'react-i18next';
13
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
14
14
  import ReactDOM from 'react-dom';
15
15
  import { ThumbsUp, DragHandle as DragHandle$1, Add, Delete, Close, Clock, Cancel, Success, Edit, Export, ListItem } from '@opengeoweb/theme';
16
16
  import { isEqual } from 'lodash';
@@ -679,6 +679,7 @@ function _regeneratorRuntime() {
679
679
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
680
680
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
681
681
  * */
682
+
682
683
  var getCustomError = function getCustomError(error, isChangeGroup, rowIndex) {
683
684
  return Object.assign({}, error, {
684
685
  isChangeGroup: isChangeGroup,
@@ -766,12 +767,30 @@ var getErrors = function getErrors(errors) {
766
767
  * Copyright 2024 - Finnish Meteorological Institute (FMI)
767
768
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
768
769
  * */
770
+
769
771
  var TAF_NAMESPACE = 'taf';
770
772
  var ns = [TAF_NAMESPACE, SHARED_NAMESPACE];
771
773
  var useTafTranslation = function useTafTranslation() {
772
774
  return useTranslation(ns);
773
775
  };
774
776
 
777
+ /* *
778
+ * Licensed under the Apache License, Version 2.0 (the "License");
779
+ * you may not use this file except in compliance with the License.
780
+ * You may obtain a copy of the License at
781
+ *
782
+ * http://www.apache.org/licenses/LICENSE-2.0
783
+ *
784
+ * Unless required by applicable law or agreed to in writing, software
785
+ * distributed under the License is distributed on an "AS IS" BASIS,
786
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
787
+ * See the License for the specific language governing permissions and
788
+ * limitations under the License.
789
+ *
790
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
791
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
792
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
793
+ * */
775
794
  var IssuesButton = function IssuesButton(_ref) {
776
795
  var _ref$errors = _ref.errors,
777
796
  errors = _ref$errors === void 0 ? {} : _ref$errors,
@@ -806,9 +825,9 @@ var IssuesButton = function IssuesButton(_ref) {
806
825
  };
807
826
  toggleIssuesPane(newPosition);
808
827
  };
809
- return jsx(CustomTooltip, {
828
+ return /*#__PURE__*/jsx(CustomTooltip, {
810
829
  title: t('issues-button-title'),
811
- children: jsx(Chip, {
830
+ children: /*#__PURE__*/jsx(Chip, {
812
831
  className: "status-" + errorStatus,
813
832
  "data-testid": "issuesButton",
814
833
  label: getIssuesLabel(totalErrors, t),
@@ -830,6 +849,23 @@ var IssuesButton = function IssuesButton(_ref) {
830
849
  });
831
850
  };
832
851
 
852
+ /* *
853
+ * Licensed under the Apache License, Version 2.0 (the "License");
854
+ * you may not use this file except in compliance with the License.
855
+ * You may obtain a copy of the License at
856
+ *
857
+ * http://www.apache.org/licenses/LICENSE-2.0
858
+ *
859
+ * Unless required by applicable law or agreed to in writing, software
860
+ * distributed under the License is distributed on an "AS IS" BASIS,
861
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
862
+ * See the License for the specific language governing permissions and
863
+ * limitations under the License.
864
+ *
865
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
866
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
867
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
868
+ * */
833
869
  var getPaneTitle = function getPaneTitle(sumOfErrors, t) {
834
870
  switch (sumOfErrors) {
835
871
  case 0:
@@ -899,7 +935,7 @@ var IssuesPane = function IssuesPane(_ref) {
899
935
  var _useTafTranslation = useTafTranslation(),
900
936
  t = _useTafTranslation.t;
901
937
  var rootElement = document.getElementById(MODAL_DIALOG_ELEMENT) || document.body;
902
- return /*#__PURE__*/ReactDOM.createPortal(jsx(ToolContainerDraggable, {
938
+ return /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsx(ToolContainerDraggable, {
903
939
  bounds: "parent",
904
940
  cancel: "",
905
941
  "data-testid": "moveable-issues-pane",
@@ -917,27 +953,30 @@ var IssuesPane = function IssuesPane(_ref) {
917
953
  height: '200px'
918
954
  },
919
955
  title: getPaneTitle(errorList.length, t),
920
- children: jsxs(Box, {
956
+ children: /*#__PURE__*/jsxs(Box, {
921
957
  component: "div",
922
958
  sx: {
923
959
  marginTop: '16px',
924
960
  marginLeft: '24px'
925
961
  },
926
- children: [errorList.length === 0 && jsx(Box, {
962
+ children: [errorList.length === 0 && /*#__PURE__*/jsx(Box, {
927
963
  component: "div",
928
964
  "data-testid": "zeroIssuesImage",
929
965
  sx: {
930
966
  fontSize: '4rem'
931
967
  },
932
- children: jsx(ThumbsUp, {
968
+ children: /*#__PURE__*/jsx(ThumbsUp, {
933
969
  sx: {
934
970
  height: '69px',
935
971
  width: '58px'
936
972
  }
937
973
  })
938
974
  }), errorList.length > 0 && errorList.map(function (error, index) {
939
- return jsx(Typography, {
940
- "data-testid": "errorMessage",
975
+ return /*#__PURE__*/jsx(Typography, {
976
+ "data-testid": "errorMessage"
977
+ // eslint-disable-next-line react/no-array-index-key
978
+ ,
979
+
941
980
  variant: "body1",
942
981
  children: getErrorMessage(error, index)
943
982
  }, "message-" + index);
@@ -946,15 +985,33 @@ var IssuesPane = function IssuesPane(_ref) {
946
985
  }), rootElement);
947
986
  };
948
987
 
988
+ /* *
989
+ * Licensed under the Apache License, Version 2.0 (the "License");
990
+ * you may not use this file except in compliance with the License.
991
+ * You may obtain a copy of the License at
992
+ *
993
+ * http://www.apache.org/licenses/LICENSE-2.0
994
+ *
995
+ * Unless required by applicable law or agreed to in writing, software
996
+ * distributed under the License is distributed on an "AS IS" BASIS,
997
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
998
+ * See the License for the specific language governing permissions and
999
+ * limitations under the License.
1000
+ *
1001
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1002
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
1003
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1004
+ * */
1005
+
949
1006
  var TafAvatar = function TafAvatar(_ref) {
950
1007
  var editor = _ref.editor,
951
1008
  _ref$tooltipPlacement = _ref.tooltipPlacement,
952
1009
  tooltipPlacement = _ref$tooltipPlacement === void 0 ? 'bottom' : _ref$tooltipPlacement;
953
- return jsx(CustomTooltip, {
1010
+ return /*#__PURE__*/jsx(CustomTooltip, {
954
1011
  placement: tooltipPlacement,
955
1012
  title: "Editor: " + editor,
956
- children: jsx("span", {
957
- children: jsx(Avatar, {
1013
+ children: /*#__PURE__*/jsx("span", {
1014
+ children: /*#__PURE__*/jsx(Avatar, {
958
1015
  size: "small",
959
1016
  children: getInitials(editor)
960
1017
  })
@@ -962,6 +1019,23 @@ var TafAvatar = function TafAvatar(_ref) {
962
1019
  });
963
1020
  };
964
1021
 
1022
+ /* *
1023
+ * Licensed under the Apache License, Version 2.0 (the "License");
1024
+ * you may not use this file except in compliance with the License.
1025
+ * You may obtain a copy of the License at
1026
+ *
1027
+ * http://www.apache.org/licenses/LICENSE-2.0
1028
+ *
1029
+ * Unless required by applicable law or agreed to in writing, software
1030
+ * distributed under the License is distributed on an "AS IS" BASIS,
1031
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1032
+ * See the License for the specific language governing permissions and
1033
+ * limitations under the License.
1034
+ *
1035
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1036
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
1037
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1038
+ * */
965
1039
  var tafActionToDraftAction = function tafActionToDraftAction(tafAction) {
966
1040
  switch (tafAction) {
967
1041
  case 'AMEND':
@@ -1005,22 +1079,22 @@ var ViewModeButtons = function ViewModeButtons(_ref) {
1005
1079
  onTafViewModeButtonPress = _ref.onTafViewModeButtonPress;
1006
1080
  var _useTafTranslation = useTafTranslation(),
1007
1081
  t = _useTafTranslation.t;
1008
- return !canBe.includes('CANCELLED') && !canBe.includes('CORRECTED') && !canBe.includes('AMENDED') ? null : jsxs(Fragment, {
1009
- children: [canBe.includes('CANCELLED') && jsx(Button, {
1082
+ return !canBe.includes('CANCELLED') && !canBe.includes('CORRECTED') && !canBe.includes('AMENDED') ? null : /*#__PURE__*/jsxs(Fragment, {
1083
+ children: [canBe.includes('CANCELLED') && /*#__PURE__*/jsx(Button, {
1010
1084
  "data-testid": "canceltaf",
1011
1085
  onClick: function onClick() {
1012
1086
  return onTafViewModeButtonPress('CANCEL');
1013
1087
  },
1014
1088
  variant: "tertiary",
1015
1089
  children: t('button-cancel')
1016
- }), canBe.includes('CORRECTED') && jsx(Button, {
1090
+ }), canBe.includes('CORRECTED') && /*#__PURE__*/jsx(Button, {
1017
1091
  "data-testid": "correcttaf",
1018
1092
  onClick: function onClick() {
1019
1093
  return onTafViewModeButtonPress('CORRECT');
1020
1094
  },
1021
1095
  variant: "tertiary",
1022
1096
  children: t('button-correct')
1023
- }), canBe.includes('AMENDED') && jsx(Button, {
1097
+ }), canBe.includes('AMENDED') && /*#__PURE__*/jsx(Button, {
1024
1098
  "data-testid": "amendtaf",
1025
1099
  onClick: function onClick() {
1026
1100
  return onTafViewModeButtonPress('AMEND');
@@ -1040,13 +1114,13 @@ var TafFormButtons = function TafFormButtons(_ref2) {
1040
1114
  onTafViewModeButtonPress = _ref2.onTafViewModeButtonPress;
1041
1115
  var _useTafTranslation2 = useTafTranslation(),
1042
1116
  t = _useTafTranslation2.t;
1043
- return jsxs(Grid, {
1117
+ return /*#__PURE__*/jsxs(Grid, {
1044
1118
  columns: 24,
1045
1119
  container: true,
1046
1120
  sx: [{
1047
1121
  justifyContent: 'flex-end'
1048
1122
  }].concat(Array.isArray(buttonsStyle) ? buttonsStyle : [buttonsStyle]),
1049
- children: [jsx(Grid, {
1123
+ children: [/*#__PURE__*/jsx(Grid, {
1050
1124
  columns: 24,
1051
1125
  container: true,
1052
1126
  size: {
@@ -1056,11 +1130,11 @@ var TafFormButtons = function TafFormButtons(_ref2) {
1056
1130
  sx: {
1057
1131
  justifyContent: 'flex-end'
1058
1132
  },
1059
- children: isFormDisabled ? jsx(ViewModeButtons, {
1133
+ children: isFormDisabled ? /*#__PURE__*/jsx(ViewModeButtons, {
1060
1134
  canBe: canBe,
1061
1135
  onTafViewModeButtonPress: onTafViewModeButtonPress
1062
- }) : jsxs(Fragment, {
1063
- children: [jsx(Button, {
1136
+ }) : /*#__PURE__*/jsxs(Fragment, {
1137
+ children: [/*#__PURE__*/jsx(Button, {
1064
1138
  "data-testid": "cleartaf",
1065
1139
  onClick: function onClick() {
1066
1140
  // Simply discard the changes and close the dialog.
@@ -1068,37 +1142,39 @@ var TafFormButtons = function TafFormButtons(_ref2) {
1068
1142
  },
1069
1143
  variant: "tertiary",
1070
1144
  children: t('button-clear')
1071
- }), jsx(Button, {
1145
+ }), /*#__PURE__*/jsx(Button, {
1072
1146
  "data-testid": "savedrafttaf",
1073
1147
  onClick: function onClick() {
1074
- /* Save the TAF as draft:
1148
+ /* Save the TAF as draft:
1075
1149
  if action NEW or DRAFT - new status will be DRAFT -- default
1076
- if action AMEND - new status will be DRAFT_AMENDED
1150
+ if action AMEND - new status will be DRAFT_AMENDED
1077
1151
  if action CORRECT - new status will be DRAFT_CORRECTED
1078
1152
  if action DRAFT_AMEND - new status will be DRAFT_AMENDED
1079
1153
  if action DRAFT_CORRECT - new status will be DRAFT_CORRECTED
1080
1154
  */
1155
+
1081
1156
  onTafEditModeButtonPress(tafActionToDraftAction(tafAction));
1082
1157
  },
1083
1158
  variant: "tertiary",
1084
1159
  children: t('button-save')
1085
- }), jsx(Button, {
1160
+ }), /*#__PURE__*/jsx(Button, {
1086
1161
  "data-testid": "publishtaf",
1087
1162
  onClick: function onClick() {
1088
- /* Publish the TAF:
1163
+ /* Publish the TAF:
1089
1164
  if action NEW or DRAFT - new status will be PUBLISHED -- default
1090
- if action AMEND - new status will be AMENDED
1165
+ if action AMEND - new status will be AMENDED
1091
1166
  if action CORRECT - new status will be CORRECTED
1092
1167
  if action DRAFT_AMEND - new status will be AMENDED
1093
1168
  if action DRAFT_CORRECT - new status will be CORRECTED
1094
1169
  */
1170
+
1095
1171
  onTafEditModeButtonPress(tafActionToPublishAction(tafAction));
1096
1172
  },
1097
1173
  variant: "tertiary",
1098
1174
  children: t('button-publish')
1099
1175
  })]
1100
1176
  })
1101
- }), jsx(Grid, {
1177
+ }), /*#__PURE__*/jsx(Grid, {
1102
1178
  columns: 24,
1103
1179
  size: {
1104
1180
  sm: 1
@@ -1107,13 +1183,30 @@ var TafFormButtons = function TafFormButtons(_ref2) {
1107
1183
  });
1108
1184
  };
1109
1185
 
1186
+ /* *
1187
+ * Licensed under the Apache License, Version 2.0 (the "License");
1188
+ * you may not use this file except in compliance with the License.
1189
+ * You may obtain a copy of the License at
1190
+ *
1191
+ * http://www.apache.org/licenses/LICENSE-2.0
1192
+ *
1193
+ * Unless required by applicable law or agreed to in writing, software
1194
+ * distributed under the License is distributed on an "AS IS" BASIS,
1195
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1196
+ * See the License for the specific language governing permissions and
1197
+ * limitations under the License.
1198
+ *
1199
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
1200
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
1201
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
1202
+ * */
1110
1203
  var DragHandle = function DragHandle(_ref) {
1111
1204
  var _ref$isSorting = _ref.isSorting,
1112
1205
  isSorting = _ref$isSorting === void 0 ? false : _ref$isSorting,
1113
1206
  _ref$isDisabled = _ref.isDisabled,
1114
1207
  isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
1115
1208
  index = _ref.index;
1116
- return jsx(CustomIconButton, {
1209
+ return /*#__PURE__*/jsx(CustomIconButton, {
1117
1210
  className: "handle",
1118
1211
  "data-testid": "dragHandle-" + index,
1119
1212
  disableRipple: true,
@@ -1129,7 +1222,7 @@ var DragHandle = function DragHandle(_ref) {
1129
1222
  }
1130
1223
  }
1131
1224
  },
1132
- children: jsx(DragHandle$1, {})
1225
+ children: /*#__PURE__*/jsx(DragHandle$1, {})
1133
1226
  });
1134
1227
  };
1135
1228
 
@@ -1192,6 +1285,7 @@ var formatCloudsToString = function formatCloudsToString(clouds) {
1192
1285
  // Format Cloud
1193
1286
  return Object.assign({}, list, (_Object$assign2 = {}, _Object$assign2[key] = formatSingleCloud(clouds[key]), _Object$assign2));
1194
1287
  }
1288
+
1195
1289
  // Format No Significant Clouds
1196
1290
  return Object.assign({}, list, (_Object$assign3 = {}, _Object$assign3[key] = clouds[key], _Object$assign3));
1197
1291
  }
@@ -1206,6 +1300,7 @@ var formatCloudsToString = function formatCloudsToString(clouds) {
1206
1300
  return list;
1207
1301
  }, clouds);
1208
1302
  };
1303
+
1209
1304
  // parsers
1210
1305
  var parseSingleCloud = function parseSingleCloud(value) {
1211
1306
  if (!value) {
@@ -1261,6 +1356,7 @@ var parseCloudsToObject = function parseCloudsToObject(clouds) {
1261
1356
  return rest;
1262
1357
  }, clouds);
1263
1358
  };
1359
+
1264
1360
  // messages
1265
1361
  var invalidCloud1Message = 'Invalid cloud input, expected either <coverage><height><type(optional)> with coverage FEW, SCT, BKN or OVC and height consisting of 3 digits or NSC';
1266
1362
  var invalidCloudMessage = 'Invalid cloud input, expected <coverage><height><type(optional)> with coverage FEW, SCT, BKN or OVC and height consisting of 3 digits';
@@ -1282,6 +1378,7 @@ var invalidCloudWithNSCMessage = 'Invalid cloud input, other cloud groups are no
1282
1378
  var invalidCloudWithPreviousType = 'Invalid cloud input, only one significant convective cloud group with CB/TCU is allowed';
1283
1379
  var invalidCloudCAVOKMessage = 'Invalid cloud input, when CAVOK is used, cloud groups must be empty';
1284
1380
  var invalidCloud4TypeMissingMessage = 'Invalid cloud input for fourth group, CB or TCU required if no other significant convective cloud group present';
1381
+
1285
1382
  // validations
1286
1383
  var isLengthValid = function isLengthValid(value) {
1287
1384
  var onlyDigitsOrSpecificLetters = /^[0-9FEWSCTBKNOVU]+$/;
@@ -1295,10 +1392,12 @@ var isHeightValid = function isHeightValid(height) {
1295
1392
  if (!/^[0-9]+$/.exec(height)) {
1296
1393
  return invalidCloudHeightMessage;
1297
1394
  }
1395
+
1298
1396
  // check if its 3 digits
1299
1397
  if (height.length !== 3) {
1300
1398
  return invalidCloudHeightMessage;
1301
1399
  }
1400
+
1302
1401
  // Parse to integer to check for steps
1303
1402
  var intHeight = parseInt(height, 10);
1304
1403
  if (intHeight > 49) {
@@ -1325,6 +1424,7 @@ var isVerticalVisibilityValid = function isVerticalVisibilityValid(value, weathe
1325
1424
  if (!/^[0-9]+$/.exec(value)) {
1326
1425
  return invalidVerticalVisibilityMessage;
1327
1426
  }
1427
+
1328
1428
  // check if its 3 digits
1329
1429
  if (value.length !== 3) {
1330
1430
  return invalidVerticalVisibilityMessage;
@@ -1352,11 +1452,13 @@ var sharedCloudValidations = function sharedCloudValidations(_ref) {
1352
1452
  if (!isLengthValid(value)) {
1353
1453
  errorMessages.push(canBeNSC ? invalidCloud1Message : invalidCloudMessage);
1354
1454
  }
1455
+
1355
1456
  // Validate coverage
1356
1457
  var coverage = value.substring(0, 3);
1357
1458
  if (!isCoverageValid(coverage)) {
1358
1459
  errorMessages.push(invalidCloudCoverageMessage);
1359
1460
  }
1461
+
1360
1462
  // Validate height
1361
1463
  var height = value.substring(3, 6);
1362
1464
  var isValidHeight = isHeightValid(height);
@@ -1364,11 +1466,13 @@ var sharedCloudValidations = function sharedCloudValidations(_ref) {
1364
1466
  // Return height errors if any
1365
1467
  errorMessages.push(isValidHeight);
1366
1468
  }
1469
+
1367
1470
  // Validate type
1368
1471
  var type = value.substring(6, 9);
1369
1472
  if (!isTypeValid(type)) {
1370
1473
  errorMessages.push(invalidCLoudTypeMessage);
1371
1474
  }
1475
+
1372
1476
  // Validate combination of height and type
1373
1477
  if (!isHeightAllowedWithType(height, type)) {
1374
1478
  errorMessages.push(invalidHeightTypeCombinationMessage);
@@ -1386,6 +1490,7 @@ var validateFirstCloud = function validateFirstCloud(value, visibilityValue, wea
1386
1490
  var trimmedWeather1Value = getFieldValue(weatherfield1);
1387
1491
  var trimmedWeather2Value = getFieldValue(weatherfield2);
1388
1492
  var trimmedWeather3Value = getFieldValue(weatherfield3);
1493
+
1389
1494
  // Field can be left empty
1390
1495
  if (!trimmedValueFirstCloud.length) {
1391
1496
  return true;
@@ -1393,10 +1498,12 @@ var validateFirstCloud = function validateFirstCloud(value, visibilityValue, wea
1393
1498
  if (trimmedValueFirstCloud && trimmedValueVisibility === 'CAVOK') {
1394
1499
  return invalidCloudCAVOKMessage;
1395
1500
  }
1501
+
1396
1502
  // Check for No Signicant Clouds
1397
1503
  if (trimmedValueFirstCloud === 'NSC') {
1398
1504
  return true;
1399
1505
  }
1506
+
1400
1507
  // Validate Vertical Visibility
1401
1508
  if (isVerticalVisibility(trimmedValueFirstCloud)) {
1402
1509
  if (
@@ -1414,6 +1521,7 @@ var validateFirstCloud = function validateFirstCloud(value, visibilityValue, wea
1414
1521
  canBeNSC: true
1415
1522
  }),
1416
1523
  errorMessages = _sharedCloudValidatio.errorMessages;
1524
+
1417
1525
  // Return first error if any
1418
1526
  return errorMessages.length ? errorMessages[0] : true;
1419
1527
  };
@@ -1421,18 +1529,22 @@ var validateSecondCloud = function validateSecondCloud(firstCloudValue, secondCl
1421
1529
  var trimmedValueFirstCloud = getFieldValue(firstCloudValue);
1422
1530
  var trimmedValueSecondCloud = getFieldValue(secondCloudValue);
1423
1531
  var visibilityValue = getFieldValue(visibilityFieldValue);
1532
+
1424
1533
  // Field can be left empty
1425
1534
  if (!trimmedValueSecondCloud.length) {
1426
1535
  return true;
1427
1536
  }
1537
+
1428
1538
  // If Cloud1 is NSC, Cloud2 has to be empty
1429
1539
  if (trimmedValueFirstCloud === 'NSC' && trimmedValueSecondCloud !== '') {
1430
1540
  return invalidCloudWithNSCMessage;
1431
1541
  }
1542
+
1432
1543
  // If Cloud1 is empty Cloud2 should be empty
1433
1544
  if (trimmedValueFirstCloud === '') {
1434
1545
  return invalidCloudWithPreviousEmptyCloud;
1435
1546
  }
1547
+
1436
1548
  // Generic validations
1437
1549
  var _sharedCloudValidatio2 = sharedCloudValidations({
1438
1550
  value: trimmedValueSecondCloud
@@ -1445,6 +1557,7 @@ var validateSecondCloud = function validateSecondCloud(firstCloudValue, secondCl
1445
1557
  if (errorMessages.length) {
1446
1558
  return errorMessages[0];
1447
1559
  }
1560
+
1448
1561
  // Cloud2 specific validations - only to be applied when cloud1 does not contain type CB/TCU
1449
1562
  var typeCloud1 = trimmedValueFirstCloud.substring(6, 9);
1450
1563
  if (typeCloud1 !== 'CB' && typeCloud1 !== 'TCU') {
@@ -1458,10 +1571,12 @@ var validateSecondCloud = function validateSecondCloud(firstCloudValue, secondCl
1458
1571
  if (validateFirstCloud(trimmedValueFirstCloud, visibilityValue, '', '', '') !== true) {
1459
1572
  return true;
1460
1573
  }
1574
+
1461
1575
  // If Cloud1 contains a type, Cloud2 cannot contain a type
1462
1576
  if (type !== '' && typeCloud1 !== '') {
1463
1577
  return invalidCloudWithPreviousType;
1464
1578
  }
1579
+
1465
1580
  // Cloud2 height has to be greater than Cloud1 height
1466
1581
  if (!isVerticalVisibility(trimmedValueFirstCloud)) {
1467
1582
  var cloud1Height = trimmedValueFirstCloud.substring(3, 6);
@@ -1469,6 +1584,7 @@ var validateSecondCloud = function validateSecondCloud(firstCloudValue, secondCl
1469
1584
  return invalidCloudHeightComparedToPreviousMessage;
1470
1585
  }
1471
1586
  }
1587
+
1472
1588
  // If Cloud1 contains Vertical Visibility then Cloud2 type is required
1473
1589
  if (isVerticalVisibility(trimmedValueFirstCloud) && type === '') {
1474
1590
  return invalidCloud2WithVerticalVisibilityMessage;
@@ -1480,18 +1596,22 @@ var validateThirdCloud = function validateThirdCloud(firstCloudValue, secondClou
1480
1596
  var trimmedValueSecondCloud = getFieldValue(secondCloudValue);
1481
1597
  var trimmedValueThirdCloud = getFieldValue(thirdCloudValue);
1482
1598
  var visibilityValue = getFieldValue(visibilityFieldValue);
1599
+
1483
1600
  // Field can be left empty
1484
1601
  if (!trimmedValueThirdCloud.length) {
1485
1602
  return true;
1486
1603
  }
1604
+
1487
1605
  // If Cloud1 is NSC, Cloud3 has to be empty
1488
1606
  if (trimmedValueFirstCloud === 'NSC' && trimmedValueThirdCloud !== '') {
1489
1607
  return invalidCloudWithNSCMessage;
1490
1608
  }
1609
+
1491
1610
  // If Cloud1 or Cloud2 is empty Cloud3 should be empty
1492
1611
  if (trimmedValueFirstCloud === '' || trimmedValueSecondCloud === '') {
1493
1612
  return invalidCloudWithPreviousEmptyCloud;
1494
1613
  }
1614
+
1495
1615
  // Generic validations
1496
1616
  var _sharedCloudValidatio3 = sharedCloudValidations({
1497
1617
  value: trimmedValueThirdCloud
@@ -1504,6 +1624,7 @@ var validateThirdCloud = function validateThirdCloud(firstCloudValue, secondClou
1504
1624
  if (errorMessages.length) {
1505
1625
  return errorMessages[0];
1506
1626
  }
1627
+
1507
1628
  // Cloud3 specific validations
1508
1629
  // Without a type specified in cloud group 1 or 2, this group counts as #3 and coverage can not be FEW or SCT
1509
1630
  var typeCloud1 = trimmedValueFirstCloud.substring(6, 9);
@@ -1516,24 +1637,29 @@ var validateThirdCloud = function validateThirdCloud(firstCloudValue, secondClou
1516
1637
  // In case we do have a CB/TCU group in one of the previous clouf groups. This cloudgroup should be evaluated as if it was the second group
1517
1638
  return invalidCloud2CoverageTypeCombinationMessage;
1518
1639
  }
1640
+
1519
1641
  // If Cloud1 is not valid, skip further validation of Cloud3
1520
1642
  // No need to pass the weatherfields as their content does not influence what happens below
1521
1643
  // Since in case of VV the third field should be empty anyways
1522
1644
  if (validateFirstCloud(trimmedValueFirstCloud, visibilityValue, '', '', '') !== true) {
1523
1645
  return true;
1524
1646
  }
1647
+
1525
1648
  // If Cloud1 contains Vertical Visibility then Cloud3 should be empty
1526
1649
  if (isVerticalVisibility(trimmedValueFirstCloud)) {
1527
1650
  return invalidCloudWithVerticalVisibilityMessage;
1528
1651
  }
1652
+
1529
1653
  // If Cloud2 is not valid, skip further validation of Cloud3
1530
1654
  if (validateSecondCloud(trimmedValueFirstCloud, trimmedValueSecondCloud, visibilityValue) !== true) {
1531
1655
  return true;
1532
1656
  }
1657
+
1533
1658
  // If one of the previous groups contains a type, Cloud3 cannot contain a type
1534
1659
  if (type !== '' && (typeCloud1 !== '' || typeCloud2 !== '')) {
1535
1660
  return invalidCloudWithPreviousType;
1536
1661
  }
1662
+
1537
1663
  // Cloud3 height has to be greater than Cloud2 height
1538
1664
  var cloud2Height = trimmedValueSecondCloud.substring(3, 6);
1539
1665
  if (height <= cloud2Height) {
@@ -1547,18 +1673,22 @@ var validateFourthCloud = function validateFourthCloud(firstCloudValue, secondCl
1547
1673
  var trimmedValueThirdCloud = getFieldValue(thirdCloudValue);
1548
1674
  var trimmedValueFourthCloud = getFieldValue(fourthCloudValue);
1549
1675
  var visibilityValue = getFieldValue(visibilityFieldValue);
1676
+
1550
1677
  // Field can be left empty
1551
1678
  if (!trimmedValueFourthCloud.length) {
1552
1679
  return true;
1553
1680
  }
1681
+
1554
1682
  // If Cloud1 is NSC, Cloud4 has to be empty
1555
1683
  if (trimmedValueFirstCloud === 'NSC' && trimmedValueFourthCloud !== '') {
1556
1684
  return invalidCloudWithNSCMessage;
1557
1685
  }
1686
+
1558
1687
  // If Cloud 1, 2 or 3 is empty Cloud4 should be empty
1559
1688
  if (trimmedValueFirstCloud === '' || trimmedValueSecondCloud === '' || trimmedValueThirdCloud === '') {
1560
1689
  return invalidCloudWithPreviousEmptyCloud;
1561
1690
  }
1691
+
1562
1692
  // Generic validations
1563
1693
  var _sharedCloudValidatio4 = sharedCloudValidations({
1564
1694
  value: trimmedValueFourthCloud
@@ -1571,6 +1701,7 @@ var validateFourthCloud = function validateFourthCloud(firstCloudValue, secondCl
1571
1701
  if (errorMessages.length) {
1572
1702
  return errorMessages[0];
1573
1703
  }
1704
+
1574
1705
  // Cloud4 specific validations
1575
1706
  // If none of the previous cloud groups contains a type, the fourth group must contain a type if not empty
1576
1707
  var typeCloud1 = trimmedValueFirstCloud.substring(6, 9);
@@ -1584,6 +1715,7 @@ var validateFourthCloud = function validateFourthCloud(firstCloudValue, secondCl
1584
1715
  // We have a CB/TCU group in one of the previous cloud groups. This group should be evaluated as if it was the third group
1585
1716
  return invalidCloud3CoverageTypeCombinationMessage;
1586
1717
  }
1718
+
1587
1719
  // If Cloud1 is not valid, skip further validation of Cloud4
1588
1720
  // No need to pass the weatherfields as their content does not influence what happens below
1589
1721
  // Since in case of VV the fourth field should be empty anyways
@@ -1594,6 +1726,7 @@ var validateFourthCloud = function validateFourthCloud(firstCloudValue, secondCl
1594
1726
  if (isVerticalVisibility(trimmedValueFirstCloud)) {
1595
1727
  return invalidCloudWithVerticalVisibilityMessage;
1596
1728
  }
1729
+
1597
1730
  // If Cloud3 is not valid, skip further validation of Cloud4
1598
1731
  if (validateThirdCloud(trimmedValueFirstCloud, trimmedValueSecondCloud, trimmedValueThirdCloud, visibilityValue) !== true) {
1599
1732
  return true;
@@ -1602,6 +1735,7 @@ var validateFourthCloud = function validateFourthCloud(firstCloudValue, secondCl
1602
1735
  if (type !== '' && (typeCloud1 !== '' || typeCloud2 !== '' || typeCloud3 !== '')) {
1603
1736
  return invalidCloudWithPreviousType;
1604
1737
  }
1738
+
1605
1739
  // Cloud4 height has to be greater than Cloud3 height
1606
1740
  var cloud3Height = trimmedValueThirdCloud.substring(3, 6);
1607
1741
  if (height <= cloud3Height) {
@@ -1631,6 +1765,7 @@ var FORMAT_DAYS_HOURS = 'ddHH';
1631
1765
  var FORMAT_DAYS_HOURS_MINUTES = 'ddHHmm';
1632
1766
  var lengthFM = 6;
1633
1767
  var lengthBECMGTEMPO = 9;
1768
+
1634
1769
  // formatters
1635
1770
  var formatValidToString = function formatValidToString(valid) {
1636
1771
  // Ensure end of valid period if midnight is shown as 24 and not 00
@@ -1655,12 +1790,14 @@ var getValidityTimeStamp = function getValidityTimeStamp(sectionType, sections,
1655
1790
  seconds: 0,
1656
1791
  milliseconds: 0
1657
1792
  });
1793
+
1658
1794
  // if start and hour is the same but minutes != 00 for the startTaf - set the minutes to account for AMENDED tafs which do not start on the hour
1659
1795
  var shouldUpdateMinutesSeconds = sectionType === 'start' && startTaf.getDate() === clonedStartTafDate.getDate() && startTaf.getUTCHours() === clonedStartTafDate.getUTCHours() && startTaf.getMinutes() !== clonedStartTafDate.getMinutes();
1660
1796
  var updatedStartTafDate = shouldUpdateMinutesSeconds ? dateUtils.set(clonedStartTafDate, {
1661
1797
  minutes: startTaf.getMinutes(),
1662
1798
  seconds: startTaf.getSeconds()
1663
1799
  }) : clonedStartTafDate;
1800
+
1664
1801
  // Only proceed if has not bubbled dates overflow to months and not bubbled hours overflow to days
1665
1802
  var isSameTime = updatedStartTafDate.getDate() === sections.day && updatedStartTafDate.getUTCHours() === sections.hour && updatedStartTafDate.getMinutes() === sections.min;
1666
1803
  var isOverflowing = updatedStartTafDate.getDate() === sections.day + 1 && sections.hour === 24 && sections.min === 0;
@@ -1674,6 +1811,7 @@ var getValidityTimeStamp = function getValidityTimeStamp(sectionType, sections,
1674
1811
  }
1675
1812
  return updatedStartTafDate;
1676
1813
  };
1814
+
1677
1815
  // parsers
1678
1816
  var parseValidToObject = function parseValidToObject(value, tafStart, tafEnd) {
1679
1817
  if (!value) {
@@ -1688,6 +1826,7 @@ var parseValidToObject = function parseValidToObject(value, tafStart, tafEnd) {
1688
1826
  var startSections = getSections(startEnd[0], format);
1689
1827
  var startDate = getValidityTimeStamp('start', startSections, tafStartDate, tafEndDate);
1690
1828
  var startString = dateUtils.dateToString(startDate);
1829
+
1691
1830
  // If we only have start value - return that otherwise, also get end time
1692
1831
  if (startEnd.length < 2) {
1693
1832
  return {
@@ -1702,6 +1841,7 @@ var parseValidToObject = function parseValidToObject(value, tafStart, tafEnd) {
1702
1841
  end: endString
1703
1842
  };
1704
1843
  };
1844
+
1705
1845
  // messages
1706
1846
  var invalidValidityDaysHoursStartMessage = 'Invalid validity start period, expected a date value between 00 and 31 and an hour value between 00 and 23';
1707
1847
  var invalidValidityDaysHoursEndMessage = 'Invalid validity end period, expected a date value between 00 and 31 and an hour value between 01 and 24';
@@ -1713,7 +1853,9 @@ var invalidChangeValidInterFieldMessage = 'Invalid validity period, expected DDH
1713
1853
  var invalidBECMGDurationValidInterFieldMessage = 'Invalid validity period, for BECMG only validity periods with a duration of 1, 2, 3 or 4 hours are allowed';
1714
1854
  var invalidTEMPODurationValidInterfieldMessage = 'Invalid validity period, for TEMPO a validity period of at least 1 hour is required';
1715
1855
  var invalidChangeGroupOverlapsWithFM = 'The valid time of a change group cannot overlap with the valid time of a following FM group. This change group should end before or at the hour of the start of the FM group';
1856
+
1716
1857
  // Validations
1858
+
1717
1859
  // Ensure all individual sections are correct (DD HH mm etc)
1718
1860
  var validateValidSections = function validateValidSections(sections, isStartEnd) {
1719
1861
  var validateMsg = [];
@@ -1727,6 +1869,7 @@ var validateValidSections = function validateValidSections(sections, isStartEnd)
1727
1869
  }
1728
1870
  return validateMsg;
1729
1871
  };
1872
+
1730
1873
  // Validate to ensure valid dates are passed
1731
1874
  var validateIsValidDates = function validateIsValidDates(value, tafStart, tafEnd) {
1732
1875
  var tafStartDate = dateUtils.utc(tafStart);
@@ -1734,8 +1877,10 @@ var validateIsValidDates = function validateIsValidDates(value, tafStart, tafEnd
1734
1877
  var startEnd = value.split('/');
1735
1878
  var format = !value.includes('/') ? FORMAT_DAYS_HOURS_MINUTES : FORMAT_DAYS_HOURS;
1736
1879
  var validateMsg = [];
1880
+
1737
1881
  // Validate start time
1738
1882
  var startSections = getSections(startEnd[0], format);
1883
+
1739
1884
  // Validate individual sections for start
1740
1885
  var sectionValidationStart = validateValidSections(startSections, 'start');
1741
1886
  // If invalid start - return with errors
@@ -1743,13 +1888,16 @@ var validateIsValidDates = function validateIsValidDates(value, tafStart, tafEnd
1743
1888
  return sectionValidationStart;
1744
1889
  }
1745
1890
  var startTimestamp = getValidityTimeStamp('start', startSections, tafStartDate, tafEndDate);
1891
+
1746
1892
  // Validate start is within the taf validity bounds
1747
1893
  if (startTimestamp < tafStartDate || startTimestamp > tafEndDate) {
1748
1894
  validateMsg.push(invalidValidityStartTimeMessage);
1749
1895
  }
1896
+
1750
1897
  // Validate end time
1751
1898
  if (startEnd.length > 1) {
1752
1899
  var endSections = getSections(startEnd[1], FORMAT_DAYS_HOURS);
1900
+
1753
1901
  // Validate individual sections for end
1754
1902
  var sectionValidationEnd = validateValidSections(endSections, 'end');
1755
1903
  // If invalid end - return with errors
@@ -1757,10 +1905,12 @@ var validateIsValidDates = function validateIsValidDates(value, tafStart, tafEnd
1757
1905
  return sectionValidationEnd;
1758
1906
  }
1759
1907
  var endTimestamp = getValidityTimeStamp('end', endSections, tafStartDate, tafEndDate);
1908
+
1760
1909
  // Validate end is not before start
1761
1910
  if (endTimestamp < startTimestamp) {
1762
1911
  validateMsg.push(invalidValidityPeriodMessage);
1763
1912
  }
1913
+
1764
1914
  // Validate end is within the taf validity bounds
1765
1915
  if (endTimestamp < tafStartDate || endTimestamp > tafEndDate) {
1766
1916
  validateMsg.push(invalidValidityEndTimeMessage);
@@ -1768,18 +1918,21 @@ var validateIsValidDates = function validateIsValidDates(value, tafStart, tafEnd
1768
1918
  }
1769
1919
  return validateMsg;
1770
1920
  };
1921
+
1771
1922
  // Main validation function
1772
1923
  var validateValidField = function validateValidField(value, tafStart, tafEnd) {
1773
1924
  var trimmedValue = getFieldValue(value);
1774
1925
  if (!trimmedValue.length) {
1775
1926
  return true;
1776
1927
  }
1928
+
1777
1929
  // Validate length and ensure it doesn't contain any other characters than numbers and / and has either XXXX/XXXX or XXXXXX format
1778
1930
  if (trimmedValue.length < lengthFM || trimmedValue.length > lengthBECMGTEMPO || !(/^[0-9]{4}\/[0-9]{4}$/.exec(trimmedValue) || /^[0-9]{6}$/.exec(trimmedValue)) ||
1779
1931
  // only allow dates with / fully typed
1780
1932
  tafStart != null && tafStart.includes('/') && trimmedValue.length !== lengthBECMGTEMPO || tafEnd != null && tafEnd.includes('/') && trimmedValue.length !== lengthBECMGTEMPO) {
1781
1933
  return invalidChangeValidInterFieldMessage;
1782
1934
  }
1935
+
1783
1936
  // Ensure valid date(s) can be made
1784
1937
  var validDateErrors = validateIsValidDates(trimmedValue, tafStart, tafEnd);
1785
1938
  if (validDateErrors.length !== 0) {
@@ -1813,18 +1966,21 @@ var validateValidChangeGroupInterField = function validateValidChangeGroupInterF
1813
1966
  trimmedValue.length < lengthBECMGTEMPO && trimmedValueChange !== 'FM') {
1814
1967
  return invalidChangeValidInterFieldMessage;
1815
1968
  }
1969
+
1816
1970
  // Ensure BECMG changegroup duration for BECMG and TEMPO
1817
1971
  if (trimmedValueChange === 'BECMG' || trimmedValueChange === 'TEMPO') {
1818
1972
  var tafStartDate = dateUtils.utc(tafStart);
1819
1973
  var tafEndDate = dateUtils.utc(tafEnd);
1820
1974
  var startEnd = trimmedValue.split('/');
1821
1975
  var format = !trimmedValue.includes('/') ? FORMAT_DAYS_HOURS_MINUTES : FORMAT_DAYS_HOURS;
1976
+
1822
1977
  // Validate start time
1823
1978
  var startSections = getSections(startEnd[0], format);
1824
1979
  var startTimestamp = getValidityTimeStamp('start', startSections, tafStartDate, tafEndDate);
1825
1980
  var endSections = getSections(startEnd[1], FORMAT_DAYS_HOURS);
1826
1981
  var endTimestamp = getValidityTimeStamp('end', endSections, tafStartDate, tafEndDate);
1827
1982
  var timeDifference = dateUtils.differenceInHours(endTimestamp, startTimestamp, 'ceil');
1983
+
1828
1984
  // Ensure BECMG changegroup has duration of 1,2,3,4 hours
1829
1985
  if (trimmedValueChange === 'BECMG') {
1830
1986
  if (
@@ -1844,6 +2000,7 @@ var validateValidChangeGroupInterField = function validateValidChangeGroupInterF
1844
2000
  }
1845
2001
  return true;
1846
2002
  };
2003
+
1847
2004
  // validate previous changeGroup
1848
2005
  var validProbChangeOrder = ['FM', 'BECMG', 'TEMPO', 'PROB40', 'PROB30', 'PROB40 TEMPO', 'PROB30 TEMPO'];
1849
2006
  var invalidPreviousChangeGroupIsBeforeMessage = 'Valid time should be after previous valid time';
@@ -1857,18 +2014,21 @@ var validatePreviousChangeGroup = function validatePreviousChangeGroup(currentCh
1857
2014
  var previousValid = getFieldValue(previousChangeGroup.valid);
1858
2015
  var previousChange = getFieldValue(previousChangeGroup.change || '');
1859
2016
  var previousProbability = getFieldValue(previousChangeGroup.probability || '');
2017
+
1860
2018
  // get the parsed values
1861
2019
  var validValue = parseValidToObject(valid, tafStart, tafEnd);
1862
2020
  var previousValidValue = parseValidToObject(previousValid, tafStart, tafEnd);
1863
2021
  if (!validValue || !previousValidValue || !change.length && !probability.length) {
1864
2022
  return true;
1865
2023
  }
2024
+
1866
2025
  // validate is valid time before
1867
2026
  var currentStartTime = dateUtils.utc(validValue.start);
1868
2027
  var previousRowStartTime = dateUtils.utc(previousValidValue.start);
1869
2028
  if (dateUtils.isBefore(currentStartTime, previousRowStartTime)) {
1870
2029
  return invalidPreviousChangeGroupIsBeforeMessage;
1871
2030
  }
2031
+
1872
2032
  // validate same valid time
1873
2033
  if (dateUtils.isEqual(currentStartTime, previousRowStartTime)) {
1874
2034
  // validate change/probability order
@@ -1884,6 +2044,7 @@ var validatePreviousChangeGroup = function validatePreviousChangeGroup(currentCh
1884
2044
  }
1885
2045
  return true;
1886
2046
  };
2047
+
1887
2048
  // validate overlapping validity when one of the following changegroups is FM
1888
2049
  var validateOverlapWithFM = function validateOverlapWithFM(currentChangeGroup, nextChangeGroups, tafStart, tafEnd) {
1889
2050
  var valid = getFieldValue(currentChangeGroup.valid);
@@ -1938,6 +2099,7 @@ function (list, item) {
1938
2099
  var _Object$assign;
1939
2100
  return Object.assign({}, list, (_Object$assign = {}, _Object$assign[item.key] = item, _Object$assign));
1940
2101
  }, {});
2102
+
1941
2103
  // formatters
1942
2104
  // if passed true - visibility is CAVOK, if passed a number - prepend zeroes to size 4
1943
2105
  var formatVisibilityToString = function formatVisibilityToString(value) {
@@ -1953,6 +2115,7 @@ var formatVisibilityToString = function formatVisibilityToString(value) {
1953
2115
  var size = configAsObject$1.range.size;
1954
2116
  return prependZeroes(value.range, size);
1955
2117
  };
2118
+
1956
2119
  // parsers
1957
2120
  // returns object with validity if passed numbers - returns object with cavOK: true if passed CAVOK
1958
2121
  var parseVisibilityToObject = function parseVisibilityToObject(value) {
@@ -1969,12 +2132,14 @@ var parseVisibilityToObject = function parseVisibilityToObject(value) {
1969
2132
  }
1970
2133
  };
1971
2134
  };
2135
+
1972
2136
  // messages
1973
2137
  var invalidVisibilityMessage = 'Invalid visibility, expected either a 4 digit visibility range in meters or CAVOK';
1974
2138
  var invalidVisibilityRangeMessage = 'Invalid visibility, expected a 4 digit range in meters';
1975
2139
  var invalidVisibilityRange50mStepMessage = 'Invalid visibility, a range between 0000 and 0800 must be rounded to the nearest 50m';
1976
2140
  var invalidVisibilityRange100mStepMessage = 'Invalid visibility, a range between 0800 and 5000 must be rounded to the nearest 100m';
1977
2141
  var invalidVisibilityRange1000mStepMessage = 'Invalid visibility, a range between 5000 and 9000 must be rounded to the nearest 1000m';
2142
+
1978
2143
  // validations
1979
2144
  var validateRange = function validateRange(value) {
1980
2145
  // check if not too many digits
@@ -1994,6 +2159,7 @@ var validateRange = function validateRange(value) {
1994
2159
  }
1995
2160
  return true;
1996
2161
  };
2162
+
1997
2163
  // Main validation function
1998
2164
  var validateVisibilityField = function validateVisibilityField(value) {
1999
2165
  var trimmedValue = getFieldValue(value);
@@ -2004,12 +2170,15 @@ var validateVisibilityField = function validateVisibilityField(value) {
2004
2170
  if (trimmedValue.length < 4 || trimmedValue.length > 5 || !/^[0-9CAVOK]+$/.exec(trimmedValue)) {
2005
2171
  return invalidVisibilityMessage;
2006
2172
  }
2173
+
2007
2174
  // if not a number - only option is CAVOK
2008
2175
  if (!/^[0-9]+$/.exec(trimmedValue)) {
2009
2176
  return trimmedValue === 'CAVOK' || invalidVisibilityMessage;
2010
2177
  }
2178
+
2011
2179
  // validate range
2012
2180
  var rangeValidation = validateRange(trimmedValue);
2181
+
2013
2182
  // return first error, if no error then no error!
2014
2183
  return rangeValidation === true || rangeValidation;
2015
2184
  };
@@ -2032,9 +2201,7 @@ var validateVisibilityField = function validateVisibilityField(value) {
2032
2201
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2033
2202
  * */
2034
2203
  // Source: http://codes.wmo.int/49-2/_AerodromePresentOrForecastWeather
2035
- var WeatherPhenomena;
2036
- (function (WeatherPhenomena) {
2037
- // weather phenomena from http://codes.wmo.int/49-2/_AerodromePresentOrForecastWeather
2204
+ var WeatherPhenomena = /*#__PURE__*/function (WeatherPhenomena) {
2038
2205
  WeatherPhenomena["+DS"] = "+DS";
2039
2206
  WeatherPhenomena["+DZ"] = "+DZ";
2040
2207
  WeatherPhenomena["+DZPL"] = "+DZPL";
@@ -2434,11 +2601,9 @@ var WeatherPhenomena;
2434
2601
  WeatherPhenomena["VCSS"] = "VCSS";
2435
2602
  WeatherPhenomena["VCTS"] = "VCTS";
2436
2603
  WeatherPhenomena["VCVA"] = "VCVA";
2437
- // Additional codes from https://codes.wmo.int/306/4678
2438
2604
  WeatherPhenomena["+FC"] = "+FC";
2439
2605
  WeatherPhenomena["-DS"] = "-DS";
2440
2606
  WeatherPhenomena["-SS"] = "-SS";
2441
- // Additional codes added o fmi-avi-msgconverter
2442
2607
  WeatherPhenomena["FZRASN"] = "FZRASN";
2443
2608
  WeatherPhenomena["FZRAPL"] = "FZRAPL";
2444
2609
  WeatherPhenomena["FZRASG"] = "FZRASG";
@@ -2457,7 +2622,8 @@ var WeatherPhenomena;
2457
2622
  WeatherPhenomena["+FZDZSG"] = "+FZDZSG";
2458
2623
  WeatherPhenomena["+FZDZSN"] = "+FZDZSN";
2459
2624
  WeatherPhenomena["+FZDZPL"] = "+FZDZPL";
2460
- })(WeatherPhenomena || (WeatherPhenomena = {}));
2625
+ return WeatherPhenomena;
2626
+ }({});
2461
2627
 
2462
2628
  /* *
2463
2629
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -2476,6 +2642,7 @@ var WeatherPhenomena;
2476
2642
  * Copyright 2021 - Finnish Meteorological Institute (FMI)
2477
2643
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
2478
2644
  * */
2645
+
2479
2646
  // messages
2480
2647
  var invalidWeatherMessage = 'Invalid weather input, expected NSW or a valid weather code';
2481
2648
  var invalidWeatherCodeMessage = 'Invalid weather input, invalid weather code';
@@ -2487,6 +2654,7 @@ var invalidWeatherCAVOKMessage = 'Invalid weather input, when CAVOK is used, wea
2487
2654
  var invalidWeatherVisibilityBelow5000 = 'Invalid weather input, weather codes FU, DU, HZ, DRDU and BLDU need to be combined with a visibility of 5000m or less';
2488
2655
  var invalidWeatherBRVisibility = 'Invalid weather input, weather code BR needs to be combined with a visibility between 1000 and 5000m';
2489
2656
  var invalidWeatherFGVisibility = 'Invalid weather input, weather code FG needs to be combined with a visibility below 1000m';
2657
+
2490
2658
  // validations
2491
2659
  var WeatherVisibilityBelow5000 = [WeatherPhenomena.FU, WeatherPhenomena.DU, WeatherPhenomena.HZ, WeatherPhenomena.DRDU, WeatherPhenomena.BLDU];
2492
2660
  var validateWeatherField = function validateWeatherField(value, visibilityFieldValue, NSWAllowed) {
@@ -2495,22 +2663,27 @@ var validateWeatherField = function validateWeatherField(value, visibilityFieldV
2495
2663
  }
2496
2664
  var trimmedValue = getFieldValue(value);
2497
2665
  var visibilityValue = getFieldValue(visibilityFieldValue);
2666
+
2498
2667
  // if empty, validate as true
2499
2668
  if (trimmedValue === '') {
2500
2669
  return true;
2501
2670
  }
2671
+
2502
2672
  // In case of NSW - validate if allowed
2503
2673
  if (trimmedValue === 'NSW' && !NSWAllowed) {
2504
2674
  return invalidWeatherNSWMessage;
2505
2675
  }
2676
+
2506
2677
  // Check if cavOK - then weather group should be empty
2507
2678
  if (trimmedValue && visibilityValue === 'CAVOK') {
2508
2679
  return invalidWeatherCAVOKMessage;
2509
2680
  }
2681
+
2510
2682
  // Validate if entered weather is one of the allowed weather phenomena
2511
2683
  if (!(trimmedValue in WeatherPhenomena) && trimmedValue !== 'NSW') {
2512
2684
  return NSWAllowed ? invalidWeatherMessage : invalidWeatherCodeMessage;
2513
2685
  }
2686
+
2514
2687
  // Validate the weather code in combination with the visibility range
2515
2688
  var visibilityRange = parseInt(visibilityValue, 10);
2516
2689
  if (WeatherVisibilityBelow5000.includes(trimmedValue) && visibilityRange > 5000) {
@@ -2522,25 +2695,30 @@ var validateWeatherField = function validateWeatherField(value, visibilityFieldV
2522
2695
  if (trimmedValue === WeatherPhenomena.FG && visibilityRange >= 1000) {
2523
2696
  return invalidWeatherFGVisibility;
2524
2697
  }
2698
+
2525
2699
  // Everything validated ok - return true
2526
2700
  return true;
2527
2701
  };
2528
2702
  var validateSecondWeatherField = function validateSecondWeatherField(weather1Value, weather2Value, visibilityFieldValue) {
2529
2703
  var trimmedWeather2Value = getFieldValue(weather2Value);
2530
2704
  var visibilityValue = getFieldValue(visibilityFieldValue);
2705
+
2531
2706
  // Field can be left empty
2532
2707
  if (!trimmedWeather2Value.length) {
2533
2708
  return true;
2534
2709
  }
2535
2710
  var trimmedWeather1Value = getFieldValue(weather1Value);
2711
+
2536
2712
  // If weather1 is NSW weather2 should be empty
2537
2713
  if (trimmedWeather1Value === 'NSW' && trimmedWeather2Value !== '') {
2538
2714
  return invalidWeatherNonEmptyNSWGroups;
2539
2715
  }
2716
+
2540
2717
  // If weather1 is empty weather2 should be empty
2541
2718
  if (trimmedWeather1Value === '') {
2542
2719
  return invalidWeatherWithPreviousEmptyWeather;
2543
2720
  }
2721
+
2544
2722
  // If weather1 must be different from weather2
2545
2723
  if (trimmedWeather1Value === trimmedWeather2Value) {
2546
2724
  return invalidWeatherNonUniqueValue;
@@ -2550,20 +2728,24 @@ var validateSecondWeatherField = function validateSecondWeatherField(weather1Val
2550
2728
  var validateThirdWeatherField = function validateThirdWeatherField(weather1Value, weather2Value, weather3Value, visibilityFieldValue) {
2551
2729
  var trimmedWeather3Value = getFieldValue(weather3Value);
2552
2730
  var visibilityValue = getFieldValue(visibilityFieldValue);
2731
+
2553
2732
  // Field can be left empty
2554
2733
  if (!trimmedWeather3Value.length) {
2555
2734
  return true;
2556
2735
  }
2557
2736
  var trimmedWeather1Value = getFieldValue(weather1Value);
2558
2737
  var trimmedWeather2Value = getFieldValue(weather2Value);
2738
+
2559
2739
  // If weather1 is NSW weather3 should be empty
2560
2740
  if (trimmedWeather1Value === 'NSW' && trimmedWeather3Value !== '') {
2561
2741
  return invalidWeatherNonEmptyNSWGroups;
2562
2742
  }
2743
+
2563
2744
  // If weather1 or weather2 is empty weather3 should be empty
2564
2745
  if (trimmedWeather1Value === '' || trimmedWeather2Value === '') {
2565
2746
  return invalidWeatherWithPreviousEmptyWeather;
2566
2747
  }
2748
+
2567
2749
  // If weather3 must be different from weather1 and weather2
2568
2750
  if (trimmedWeather1Value === trimmedWeather3Value || trimmedWeather2Value === trimmedWeather3Value) {
2569
2751
  return invalidWeatherNonUniqueValue;
@@ -2622,6 +2804,7 @@ function (list, item) {
2622
2804
  var _Object$assign;
2623
2805
  return Object.assign({}, list, (_Object$assign = {}, _Object$assign[item.key] = item, _Object$assign));
2624
2806
  }, {});
2807
+
2625
2808
  // wind formatters:
2626
2809
  var formatWindValues = function formatWindValues(key, value) {
2627
2810
  switch (key) {
@@ -2661,6 +2844,7 @@ var formatWindValues = function formatWindValues(key, value) {
2661
2844
  return value;
2662
2845
  }
2663
2846
  };
2847
+
2664
2848
  // Format incoming Wind object
2665
2849
  var formatWindToString = function formatWindToString(value) {
2666
2850
  if (!value) {
@@ -2687,6 +2871,7 @@ var extractValidateWindSections = function extractValidateWindSections(value, va
2687
2871
  // Get first 3 chars as they are ALWAYS the direction
2688
2872
  var direction = obj.remainder.slice(0, size);
2689
2873
  var remainder = obj.remainder.substring(size);
2874
+
2690
2875
  // Validate direction
2691
2876
  if (validation) {
2692
2877
  var valDirection = validateDirection(direction);
@@ -2711,6 +2896,7 @@ var extractValidateWindSections = function extractValidateWindSections(value, va
2711
2896
  var dirLength = obj.remainder.length && obj.remainder.startsWith('P') ? maxSize : minSize;
2712
2897
  var speed = obj.remainder.slice(0, dirLength);
2713
2898
  var _remainder = obj.remainder.substring(dirLength);
2899
+
2714
2900
  // Validate speed
2715
2901
  if (validation) {
2716
2902
  var valSpeed = validateSpeed(speed);
@@ -2739,6 +2925,7 @@ var extractValidateWindSections = function extractValidateWindSections(value, va
2739
2925
  var _dirLength = rest.startsWith('P') ? _maxSize : _minSize;
2740
2926
  var gust = rest.slice(0, _dirLength);
2741
2927
  var _remainder2 = rest.substring(_dirLength);
2928
+
2742
2929
  // Validate gusts
2743
2930
  if (validation) {
2744
2931
  var valGust = validateGust(gust);
@@ -2782,6 +2969,7 @@ var extractValidateWindSections = function extractValidateWindSections(value, va
2782
2969
  validations: []
2783
2970
  });
2784
2971
  };
2972
+
2785
2973
  // parsers
2786
2974
  var parseWindToObject = function parseWindToObject(value) {
2787
2975
  // Create wind object from passed string
@@ -2799,6 +2987,7 @@ var parseWindToObject = function parseWindToObject(value) {
2799
2987
  });
2800
2988
  return windObject;
2801
2989
  };
2990
+
2802
2991
  // messages
2803
2992
  var invalidWindMessage = 'Invalid wind, expected <direction><speed><gusts(optional)> with direction consisting of 3 digits or VRB and speed and gusts of 2 digits or P99';
2804
2993
  var invalidWindDirectionMessage = 'Invalid wind direction, expected a direction equal to 3 digits or VRB';
@@ -2811,12 +3000,14 @@ var invalidGustForWindP99Message = 'Invalid wind speed and gust combination, if
2811
3000
  var invalidWindSpeedForDirectionZeroMessage = 'Invalid wind speed, if direction is 000, speed can only be 00';
2812
3001
  var invalidWindSpeedForDirectionNonZeroMessage = 'Invalid wind speed, if direction is not 000, speed can not be 00';
2813
3002
  var invalidWindVRBWindDirectionMessage = 'Invalid wind direction, VRB can only be used in combination with windspeeds smaller than 3 or in combination with gusts and showers';
3003
+
2814
3004
  // validations
2815
3005
  var validateDirection = function validateDirection(value) {
2816
3006
  // if not a number
2817
3007
  if (!/^[0-9]+$/.exec(value)) {
2818
3008
  return value === 'VRB' || invalidWindDirectionMessage;
2819
3009
  }
3010
+
2820
3011
  // Parse to integer to check for direction min and max
2821
3012
  var intDir = parseInt(value, 10);
2822
3013
  if (intDir > 360 || intDir < 0) {
@@ -2867,6 +3058,7 @@ var validateWindInterSection = function validateWindInterSection(speed, gust, di
2867
3058
  return invalidWindVRBWindDirectionMessage;
2868
3059
  }
2869
3060
  }
3061
+
2870
3062
  // Validate gust
2871
3063
  if (gust === '') {
2872
3064
  return true;
@@ -2879,6 +3071,7 @@ var validateWindInterSection = function validateWindInterSection(speed, gust, di
2879
3071
  }
2880
3072
  return true;
2881
3073
  };
3074
+
2882
3075
  // Main validation function
2883
3076
  var validateWindField = function validateWindField(value, weatherfield1, weatherfield2, weatherfield3) {
2884
3077
  var trimmedWindValue = getFieldValue(value);
@@ -2892,6 +3085,7 @@ var validateWindField = function validateWindField(value, weatherfield1, weather
2892
3085
  if (trimmedWindValue.length < 5 || trimmedWindValue.length > 12 || !/^[0-9VRBPGKT]+$/.exec(trimmedWindValue)) {
2893
3086
  return invalidWindMessage;
2894
3087
  }
3088
+
2895
3089
  // First validate individual sections
2896
3090
  var windValidationIndv = extractValidateWindSections(trimmedWindValue, true);
2897
3091
  if (windValidationIndv.validations.length !== 0) {
@@ -2899,6 +3093,7 @@ var validateWindField = function validateWindField(value, weatherfield1, weather
2899
3093
  return typeof error === 'string';
2900
3094
  });
2901
3095
  }
3096
+
2902
3097
  // Then do any intersection validation
2903
3098
  return validateWindInterSection(windValidationIndv.speed, windValidationIndv.gust, windValidationIndv.direction, trimmedWeather1Value, trimmedWeather2Value, trimmedWeather3Value);
2904
3099
  };
@@ -3045,6 +3240,7 @@ var getTafConfig = /*#__PURE__*/function () {
3045
3240
  * Copyright 2022 - Finnish Meteorological Institute (FMI)
3046
3241
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
3047
3242
  * */
3243
+
3048
3244
  var isTafConfigLocationFixedPeriod = function isTafConfigLocationFixedPeriod(location) {
3049
3245
  return location.activity_period !== undefined;
3050
3246
  };
@@ -3092,6 +3288,7 @@ var getBaseTime = function getBaseTime(baseTime, location, tafConfig) {
3092
3288
  var startTimeIndex = configLocation.valid_start_times.findLastIndex(function (hour) {
3093
3289
  return currentBaseTime.getUTCHours() >= hour;
3094
3290
  });
3291
+
3095
3292
  // when current hour is lower than then first item in valid_start_times. we need to move to the last hour of the previous day
3096
3293
  if (startTimeIndex === -1) {
3097
3294
  var lastStartTimeIndex = configLocation.valid_start_times.length - 1;
@@ -3119,6 +3316,7 @@ var getBaseTime = function getBaseTime(baseTime, location, tafConfig) {
3119
3316
  minutes: 0,
3120
3317
  seconds: 0
3121
3318
  });
3319
+
3122
3320
  // If next start time is earlier than or equal to current start time, it means we've wrapped to the next day
3123
3321
  if (nextStartTimeHour <= configLocation.valid_start_times[startTimeIndex]) {
3124
3322
  nextBaseTime = dateUtils.add(nextBaseTime, {
@@ -3131,6 +3329,7 @@ var getBaseTime = function getBaseTime(baseTime, location, tafConfig) {
3131
3329
  nextBaseTime: nextBaseTime
3132
3330
  };
3133
3331
  };
3332
+
3134
3333
  /**
3135
3334
  * If we don't have a taf to get the baseTime from, we calculate it based on the current time and the activity_period from the config.
3136
3335
  * @param tafConfig
@@ -3590,6 +3789,7 @@ var emptyBaseForecast = {
3590
3789
  }
3591
3790
  };
3592
3791
  var MIN_NUMBER_CHANGE_GROUP = 5;
3792
+
3593
3793
  // formatters
3594
3794
  var formatIssueTime = function formatIssueTime(issueDate) {
3595
3795
  var issueDateAsString = dateUtils.dateToString(new Date(issueDate), DATE_FORMAT_ISSUE_TIME);
@@ -3746,8 +3946,9 @@ function parseFormValues(row, tafStart, tafEnd) {
3746
3946
  case 'probability':
3747
3947
  // If empty, remove it from the list
3748
3948
  if (!reducedRow[key]) {
3749
- list[key];
3750
- var _rest5 = _objectWithoutPropertiesLoose(list, [key].map(_toPropertyKey));
3949
+ var _ref = list;
3950
+ _ref[key];
3951
+ var _rest5 = _objectWithoutPropertiesLoose(_ref, [key].map(_toPropertyKey));
3751
3952
  return _rest5;
3752
3953
  }
3753
3954
  return list;
@@ -3817,6 +4018,7 @@ var convertTafValuesToObject = function convertTafValuesToObject(formData) {
3817
4018
  }
3818
4019
  }, parsedFormValues);
3819
4020
  };
4021
+
3820
4022
  // Ensure we have enough data to retrieve a TAC - we only need to check for wind and visibility/ cavok as those are the only ones required in all cases
3821
4023
  var shouldRetrieveTAC = function shouldRetrieveTAC(product) {
3822
4024
  var _product$baseForecast;
@@ -3890,9 +4092,9 @@ var useDragOrder = function useDragOrder(trigger, move) {
3890
4092
  var _React$useState3 = React.useState([null, null]),
3891
4093
  lastDragOrder = _React$useState3[0],
3892
4094
  setLastDragOrder = _React$useState3[1];
3893
- var onChangeOrder = function onChangeOrder(_ref) {
3894
- var oldIndex = _ref.oldIndex,
3895
- newIndex = _ref.newIndex;
4095
+ var onChangeOrder = function onChangeOrder(_ref2) {
4096
+ var oldIndex = _ref2.oldIndex,
4097
+ newIndex = _ref2.newIndex;
3896
4098
  if (oldIndex === undefined || newIndex === undefined) {
3897
4099
  return;
3898
4100
  }
@@ -3900,10 +4102,11 @@ var useDragOrder = function useDragOrder(trigger, move) {
3900
4102
  setLastDragOrder([oldIndex, newIndex]);
3901
4103
  setActiveDraggingIndex(false);
3902
4104
  };
3903
- var onStartDrag = function onStartDrag(_ref2) {
3904
- var oldIndex = _ref2.oldIndex;
4105
+ var onStartDrag = function onStartDrag(_ref3) {
4106
+ var oldIndex = _ref3.oldIndex;
3905
4107
  return setActiveDraggingIndex(oldIndex);
3906
4108
  };
4109
+
3907
4110
  // triggers validation AFTER render of new sorted elements
3908
4111
  React.useEffect(function () {
3909
4112
  var oldIndex = lastDragOrder[0],
@@ -3919,6 +4122,7 @@ var useDragOrder = function useDragOrder(trigger, move) {
3919
4122
  onStartDrag: onStartDrag
3920
4123
  };
3921
4124
  };
4125
+
3922
4126
  // dialog utils
3923
4127
  var getConfirmationDialogTitle = function getConfirmationDialogTitle(action, t) {
3924
4128
  if (action === 'CLEAR') {
@@ -3938,6 +4142,7 @@ var getConfirmationDialogTitle = function getConfirmationDialogTitle(action, t)
3938
4142
  }
3939
4143
  return t('confirm-cancel-title');
3940
4144
  };
4145
+
3941
4146
  // Check if the amended/corrected TAF has been changed. Only compare the fields users are able to fill in
3942
4147
  // (i.e. exclude baseforecast valid time as that gets updated when doing an amendment automatically outside of the users influence)
3943
4148
  var isTafAmendedCorrectedChanged = function isTafAmendedCorrectedChanged(originalTaf, currentTaf) {
@@ -4034,10 +4239,12 @@ var getMessageType = function getMessageType(taf, tafAction) {
4034
4239
  }
4035
4240
  return taf.messageType;
4036
4241
  };
4242
+
4037
4243
  // For corrections and amendment we need to add the previousValidStart and End for the TAC converter
4038
4244
  var getAmendedCorrectedTafTimes = function getAmendedCorrectedTafTimes(taf, tafAction) {
4039
4245
  var previousValidDateStart = taf.previousValidDateStart && tafAction !== 'AMEND' ? taf.previousValidDateStart : taf.validDateStart;
4040
4246
  var previousValidDateEnd = taf.previousValidDateEnd && tafAction !== 'AMEND' ? taf.previousValidDateEnd : taf.validDateEnd;
4247
+
4041
4248
  // For amendment change valid start time to current time
4042
4249
  // only do this if we're already within the validity period
4043
4250
  var now = dateUtils.utc();
@@ -4233,16 +4440,34 @@ var TafModuleProvider = function TafModuleProvider(_ref3) {
4233
4440
  var contextState = useTafModuleState({
4234
4441
  onPreventCloseView: onPreventCloseView
4235
4442
  });
4236
- return jsx(TafModuleContext.Provider, {
4443
+ return /*#__PURE__*/jsx(TafModuleContext.Provider, {
4237
4444
  value: contextState,
4238
4445
  children: children
4239
4446
  });
4240
4447
  };
4241
4448
 
4449
+ /* *
4450
+ * Licensed under the Apache License, Version 2.0 (the "License");
4451
+ * you may not use this file except in compliance with the License.
4452
+ * You may obtain a copy of the License at
4453
+ *
4454
+ * http://www.apache.org/licenses/LICENSE-2.0
4455
+ *
4456
+ * Unless required by applicable law or agreed to in writing, software
4457
+ * distributed under the License is distributed on an "AS IS" BASIS,
4458
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4459
+ * See the License for the specific language governing permissions and
4460
+ * limitations under the License.
4461
+ *
4462
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4463
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
4464
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4465
+ * */
4466
+
4242
4467
  var TAF_MODULE_ID = 'tafmodule';
4243
4468
  var ResponsiveWrapper = function ResponsiveWrapper(_ref) {
4244
4469
  var children = _ref.children;
4245
- return jsx(Box, {
4470
+ return /*#__PURE__*/jsx(Box, {
4246
4471
  sx: {
4247
4472
  containerType: 'inline-size',
4248
4473
  containerName: TAF_MODULE_ID,
@@ -4352,7 +4577,7 @@ var BaseTextField = /*#__PURE__*/React.memo(function (_ref2) {
4352
4577
  props = _objectWithoutPropertiesLoose(_ref2, _excluded$4);
4353
4578
  var theme = useTheme();
4354
4579
  var styling = textFieldStyle(theme, shouldPreventUppercase);
4355
- return jsx(TextField, Object.assign({
4580
+ return /*#__PURE__*/jsx(TextField, Object.assign({
4356
4581
  "data-text-align": textAlign,
4357
4582
  sx: [styling].concat(Array.isArray(sx) ? sx : [sx]),
4358
4583
  type: "text",
@@ -4439,19 +4664,19 @@ var TafFormTextField = function TafFormTextField(_ref3) {
4439
4664
  onBlur();
4440
4665
  }, [onBlur, name, setValue, shouldPreventUppercase]);
4441
4666
  var hasError = !!fieldErrors;
4442
- return jsx(Grid, {
4667
+ return /*#__PURE__*/jsx(Grid, {
4443
4668
  sx: {
4444
4669
  width: TEXTFIELD_WIDTH_PERCENTAGE + "%",
4445
4670
  minWidth: TEXTFIELD_MIN_WIDTH
4446
4671
  },
4447
- children: jsx(Controller, {
4672
+ children: /*#__PURE__*/jsx(Controller, {
4448
4673
  control: control,
4449
4674
  defaultValue: defaultValue,
4450
4675
  name: name,
4451
4676
  render: function render(_ref4) {
4452
4677
  var field = _ref4.field;
4453
4678
  var displayValue = formatter ? formatter(field.value) : getDisplayValue(field.value, disabled);
4454
- return jsx(BaseTextField, {
4679
+ return /*#__PURE__*/jsx(BaseTextField, {
4455
4680
  autoFocus: autoFocus,
4456
4681
  disabled: disabled,
4457
4682
  error: hasError,
@@ -4481,6 +4706,23 @@ var TafFormTextField = function TafFormTextField(_ref3) {
4481
4706
  });
4482
4707
  };
4483
4708
 
4709
+ /* *
4710
+ * Licensed under the Apache License, Version 2.0 (the "License");
4711
+ * you may not use this file except in compliance with the License.
4712
+ * You may obtain a copy of the License at
4713
+ *
4714
+ * http://www.apache.org/licenses/LICENSE-2.0
4715
+ *
4716
+ * Unless required by applicable law or agreed to in writing, software
4717
+ * distributed under the License is distributed on an "AS IS" BASIS,
4718
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4719
+ * See the License for the specific language governing permissions and
4720
+ * limitations under the License.
4721
+ *
4722
+ * Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4723
+ * Copyright 2026 - Finnish Meteorological Institute (FMI)
4724
+ * Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
4725
+ * */
4484
4726
  var TafRemarkField = function TafRemarkField(_ref) {
4485
4727
  var disabled = _ref.disabled,
4486
4728
  isEditor = _ref.isEditor;
@@ -4490,7 +4732,7 @@ var TafRemarkField = function TafRemarkField(_ref) {
4490
4732
  control = _useFormContext.control,
4491
4733
  setValue = _useFormContext.setValue,
4492
4734
  trigger = _useFormContext.trigger;
4493
- return jsx(Box, {
4735
+ return /*#__PURE__*/jsx(Box, {
4494
4736
  sx: {
4495
4737
  display: 'flex',
4496
4738
  flexDirection: 'row',
@@ -4506,12 +4748,12 @@ var TafRemarkField = function TafRemarkField(_ref) {
4506
4748
  lg: '10px'
4507
4749
  }
4508
4750
  },
4509
- children: jsx(Controller, {
4751
+ children: /*#__PURE__*/jsx(Controller, {
4510
4752
  control: control,
4511
4753
  name: "remark",
4512
4754
  render: function render(_ref2) {
4513
4755
  var field = _ref2.field;
4514
- return jsx(BaseTextField, {
4756
+ return /*#__PURE__*/jsx(BaseTextField, {
4515
4757
  disabled: disabled,
4516
4758
  inputRef: field.ref,
4517
4759
  label: t('remark'),
@@ -4570,9 +4812,12 @@ var TafRemarkField = function TafRemarkField(_ref) {
4570
4812
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4571
4813
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4572
4814
  * */
4815
+
4816
+
4573
4817
  // messages
4574
4818
  var invalidChangeMessage = 'Invalid Change input, only BECMG, TEMPO or FM are allowed';
4575
4819
  var invalidChangeProbCombinationMessage = 'A probability is only allowed in combination with TEMPO or an empty Change input';
4820
+
4576
4821
  // validations
4577
4822
  var validateChangeField = function validateChangeField(value) {
4578
4823
  var trimmedValue = getFieldValue(value);
@@ -4605,8 +4850,11 @@ var validateChangeFieldInterField = function validateChangeFieldInterField(value
4605
4850
  * Copyright 2023 - Finnish Meteorological Institute (FMI)
4606
4851
  * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4607
4852
  * */
4853
+
4854
+
4608
4855
  // messages
4609
4856
  var invalidProbabilityMessage = 'Invalid Probability input, only PROB30 or PROB40 are allowed';
4857
+
4610
4858
  // validations
4611
4859
  var validateProbabilityField = function validateProbabilityField(value) {
4612
4860
  var trimmedValue = getFieldValue(value);
@@ -4678,7 +4926,7 @@ var TafConfigWrapper = function TafConfigWrapper(_ref) {
4678
4926
  };
4679
4927
  }, [tafConfig]);
4680
4928
  if (isLoggedIn && isFetching) {
4681
- return jsx(LinearProgress, {
4929
+ return /*#__PURE__*/jsx(LinearProgress, {
4682
4930
  color: "secondary",
4683
4931
  "data-testid": "tafconfig-loading-bar",
4684
4932
  sx: {
@@ -4687,7 +4935,7 @@ var TafConfigWrapper = function TafConfigWrapper(_ref) {
4687
4935
  });
4688
4936
  }
4689
4937
  if (errorMessage || !tafConfig) {
4690
- return jsx(AlertBanner, {
4938
+ return /*#__PURE__*/jsx(AlertBanner, {
4691
4939
  actionButtonProps: !errorMessage || (errorMessage == null ? void 0 : errorMessage.title) !== ERROR_AUTH ? {
4692
4940
  title: t('error-title-retry'),
4693
4941
  onClick: onFetchConfig
@@ -4698,44 +4946,61 @@ var TafConfigWrapper = function TafConfigWrapper(_ref) {
4698
4946
  title: errorMessage ? errorMessage.title : ERROR_CONFIG
4699
4947
  });
4700
4948
  }
4701
- return jsx(TafConfigContext.Provider, {
4949
+ return /*#__PURE__*/jsx(TafConfigContext.Provider, {
4702
4950
  value: contextValue,
4703
4951
  children: children
4704
4952
  });
4705
4953
  };
4706
4954
 
4707
- var TafFormOptionsButton = function TafFormOptionsButton(_ref) {
4708
- var isChangeGroup = _ref.isChangeGroup,
4709
- addChangeGroupBelow = _ref.addChangeGroupBelow,
4710
- addChangeGroupAbove = _ref.addChangeGroupAbove,
4711
- removeChangeGroup = _ref.removeChangeGroup,
4712
- clearRow = _ref.clearRow,
4955
+ /* *
4956
+ * Licensed under the Apache License, Version 2.0 (the "License");
4957
+ * you may not use this file except in compliance with the License.
4958
+ * You may obtain a copy of the License at
4959
+ *
4960
+ * http://www.apache.org/licenses/LICENSE-2.0
4961
+ *
4962
+ * Unless required by applicable law or agreed to in writing, software
4963
+ * distributed under the License is distributed on an "AS IS" BASIS,
4964
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4965
+ * See the License for the specific language governing permissions and
4966
+ * limitations under the License.
4967
+ *
4968
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
4969
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
4970
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
4971
+ * */
4972
+ var TafFormOptionsButton = function TafFormOptionsButton(_ref) {
4973
+ var isChangeGroup = _ref.isChangeGroup,
4974
+ addChangeGroupBelow = _ref.addChangeGroupBelow,
4975
+ addChangeGroupAbove = _ref.addChangeGroupAbove,
4976
+ removeChangeGroup = _ref.removeChangeGroup,
4977
+ clearRow = _ref.clearRow,
4713
4978
  index = _ref.index;
4714
4979
  var _useTafTranslation = useTafTranslation(),
4715
4980
  t = _useTafTranslation.t;
4716
4981
  var insertAbove = {
4717
4982
  text: t('options-insert-above'),
4718
- icon: jsx(Add, {}),
4983
+ icon: /*#__PURE__*/jsx(Add, {}),
4719
4984
  action: addChangeGroupAbove
4720
4985
  };
4721
4986
  var insertBelow = {
4722
4987
  text: t('options-insert-below'),
4723
- icon: jsx(Add, {}),
4988
+ icon: /*#__PURE__*/jsx(Add, {}),
4724
4989
  action: addChangeGroupBelow
4725
4990
  };
4726
4991
  var deleteRow = {
4727
4992
  text: t('options-delete'),
4728
- icon: jsx(Delete, {}),
4993
+ icon: /*#__PURE__*/jsx(Delete, {}),
4729
4994
  action: removeChangeGroup
4730
4995
  };
4731
4996
  var clear = {
4732
4997
  text: t('options-clear'),
4733
- icon: jsx(Close, {}),
4998
+ icon: /*#__PURE__*/jsx(Close, {}),
4734
4999
  action: clearRow
4735
5000
  };
4736
5001
  var menuItemsBaseForecast = [insertBelow, clear];
4737
5002
  var menuItemsChangeGroup = [insertAbove, insertBelow, deleteRow, clear];
4738
- return jsx(ToggleMenu, {
5003
+ return /*#__PURE__*/jsx(ToggleMenu, {
4739
5004
  buttonSx: {
4740
5005
  marginTop: '10px',
4741
5006
  marginLeft: '4px'
@@ -4787,6 +5052,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4787
5052
  trigger = _useFormContext.trigger;
4788
5053
  var _useTafConfigContext = useTafConfigContext(),
4789
5054
  tafConfig = _useTafConfigContext.tafConfig;
5055
+
4790
5056
  // cross-field required validation
4791
5057
  var _getRequiredCrossFiel = getRequiredCrossFields(fieldNames),
4792
5058
  mainFields = _getRequiredCrossFiel[0],
@@ -4797,24 +5063,29 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4797
5063
  return !!field;
4798
5064
  });
4799
5065
  };
5066
+
4800
5067
  // Used to validate the required field for change groups: Valid
4801
5068
  var validateRequiredMain = function validateRequiredMain(value) {
4802
5069
  return isNotRequiredForAction(value) !== true && isChangeGroup && !value.length && (hasFieldsValue(subFields) || hasFieldsValue(mainFields) || hasFieldsValue(mainOptionalFields)) ? 'Valid is required' : true;
4803
5070
  };
5071
+
4804
5072
  // Used to ensure either probability or change is entered, or both
4805
5073
  var validateRequiredMainOptional = function validateRequiredMainOptional(value) {
4806
5074
  return isNotRequiredForAction(value) !== true && isChangeGroup && (hasFieldsValue(mainFields) || hasFieldsValue(subFields)) && !hasFieldsValue(mainOptionalFields) ? 'Probability or change is required' : true;
4807
5075
  };
5076
+
4808
5077
  // Used to ensure one wind, visibility, weather or cloud is entered when start editing a changegroup and all of these are empty
4809
5078
  var validateRequiredSub = function validateRequiredSub(value) {
4810
5079
  return isNotRequiredForAction(value) !== true && isChangeGroup && (hasFieldsValue(mainFields) || hasFieldsValue(mainOptionalFields)) && !hasFieldsValue(subFields) ? 'Wind, visibility, weather or cloud is required' : true;
4811
5080
  };
5081
+
4812
5082
  // Used to validate the combination of change group and wind, visibility, weather and/or cloud data entered
4813
5083
  var _validateRequiredMainFields = function validateRequiredMainFields(value, fieldName) {
4814
5084
  var changeField = getValues(namePrefix + ".change");
4815
5085
  var visibilityField = getValues(namePrefix + ".visibility");
4816
5086
  var isFM = (changeField == null ? void 0 : changeField.trim()) === 'FM';
4817
5087
  var isCAVOK = (visibilityField == null ? void 0 : visibilityField.trim()) === 'CAVOK';
5088
+
4818
5089
  // it is possible to send a empty row when the remark field has "DUE TO LACK OF DATA NO NAF" in it
4819
5090
  var remark = getValues('remark');
4820
5091
  if ((tafConfig == null ? void 0 : tafConfig.type) === 'NAF' && (remark == null ? void 0 : remark.toUpperCase()) === 'DUE TO LACK OF DATA NO NAF') {
@@ -4873,8 +5144,8 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4873
5144
  return true;
4874
5145
  }, [index, isChangeGroup, getValues]);
4875
5146
  var getPreviousValidFields = function getPreviousValidFields(rowIndex) {
4876
- var _getValues3 = getValues(),
4877
- changeGroups = _getValues3.changeGroups;
5147
+ var _ref2 = getValues(),
5148
+ changeGroups = _ref2.changeGroups;
4878
5149
  var previousChangeGroups = changeGroups.slice(0, rowIndex);
4879
5150
  var validFields = previousChangeGroups.map(function (_element, index) {
4880
5151
  return getFieldFromRow('valid', index)[0];
@@ -4890,7 +5161,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4890
5161
  var clearRow = React.useCallback(function () {
4891
5162
  onClearRow(index);
4892
5163
  }, [onClearRow, index]);
4893
- return jsxs(Grid, Object.assign({
5164
+ return /*#__PURE__*/jsxs(Grid, Object.assign({
4894
5165
  container: true,
4895
5166
  "data-testid": "row-" + namePrefix,
4896
5167
  ref: ref
@@ -4916,30 +5187,30 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4916
5187
  opacity: 0.5
4917
5188
  }
4918
5189
  }].concat(Array.isArray(props.sx) ? props.sx : [props.sx]),
4919
- children: [jsxs(Grid, {
5190
+ children: [/*#__PURE__*/jsxs(Grid, {
4920
5191
  container: true,
4921
5192
  size: "grow",
4922
5193
  sx: {
4923
5194
  justifyContent: 'flex-end'
4924
5195
  },
4925
- children: [!isChangeGroup && jsxs(Fragment, {
4926
- children: [jsx(TafFormTextField, {
5196
+ children: [!isChangeGroup && /*#__PURE__*/jsxs(Fragment, {
5197
+ children: [/*#__PURE__*/jsx(TafFormTextField, {
4927
5198
  disabled: true,
4928
5199
  label: "Type",
4929
5200
  name: fieldNames.messageType
4930
- }), jsx(TafFormTextField, {
5201
+ }), /*#__PURE__*/jsx(TafFormTextField, {
4931
5202
  disabled: true,
4932
5203
  label: "Location",
4933
5204
  name: "location"
4934
- }), jsx(TafFormTextField, {
5205
+ }), /*#__PURE__*/jsx(TafFormTextField, {
4935
5206
  disabled: true,
4936
5207
  formatter: formatIssueTime,
4937
5208
  label: "Issue time",
4938
5209
  name: "issueDate",
4939
5210
  shouldPreventUppercase: true
4940
5211
  })]
4941
- }), isChangeGroup ? jsxs(Fragment, {
4942
- children: [jsx(Box, {
5212
+ }), isChangeGroup ? /*#__PURE__*/jsxs(Fragment, {
5213
+ children: [/*#__PURE__*/jsx(Box, {
4943
5214
  sx: {
4944
5215
  display: 'flex',
4945
5216
  justifyContent: 'center',
@@ -4947,7 +5218,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4947
5218
  minWidth: 60
4948
5219
  },
4949
5220
  children: !disabled && dragHandle
4950
- }), jsx(TafFormTextField, {
5221
+ }), /*#__PURE__*/jsx(TafFormTextField, {
4951
5222
  autoComplete: [{
4952
5223
  key: '3',
4953
5224
  value: 'PROB30'
@@ -4971,7 +5242,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
4971
5242
  validateProbabilityField: validateProbabilityField
4972
5243
  }
4973
5244
  }
4974
- }), jsx(TafFormTextField, {
5245
+ }), /*#__PURE__*/jsx(TafFormTextField, {
4975
5246
  autoComplete: [{
4976
5247
  key: 'T',
4977
5248
  value: 'TEMPO'
@@ -5003,9 +5274,10 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5003
5274
  }
5004
5275
  }
5005
5276
  })]
5006
- }) : null, jsx(TafFormTextField, {
5007
- defaultValue: getDefaultValue('valid', field),
5277
+ }) : null, /*#__PURE__*/jsx(TafFormTextField, {
5278
+ defaultValue: getDefaultValue('valid', field)
5008
5279
  // always disabled for baseforecast row
5280
+ ,
5009
5281
  disabled: !isChangeGroup ? true : disabled,
5010
5282
  label: "Valid",
5011
5283
  name: fieldNames.valid,
@@ -5029,7 +5301,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5029
5301
  validateNextRows: validateNextRows
5030
5302
  }
5031
5303
  }
5032
- }), jsx(TafFormTextField, {
5304
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5033
5305
  autoFocus: !isChangeGroup,
5034
5306
  defaultValue: getDefaultValue('wind', field),
5035
5307
  disabled: disabled,
@@ -5051,7 +5323,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5051
5323
  }
5052
5324
  }
5053
5325
  }
5054
- }), jsx(TafFormTextField, {
5326
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5055
5327
  autoComplete: [{
5056
5328
  key: 'C',
5057
5329
  value: 'CAVOK'
@@ -5073,30 +5345,24 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5073
5345
  validateVisibilityField: validateVisibilityField
5074
5346
  }
5075
5347
  }
5076
- }), jsx(TafFormTextField, {
5348
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5077
5349
  defaultValue: getDefaultValue('weather.weather1', field),
5078
5350
  disabled: disabled,
5079
5351
  label: "Weather",
5080
5352
  name: fieldNames.weather1,
5081
- onBlur: function () {
5082
- var _onBlur = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5083
- var fields;
5084
- return _regeneratorRuntime().wrap(function _callee$(_context) {
5085
- while (1) switch (_context.prev = _context.next) {
5086
- case 0:
5087
- fields = isChangeGroup ? [].concat(subFields, mainFields) : [];
5088
- return _context.abrupt("return", trigger([].concat(fields, [fieldNames.weather2, fieldNames.weather3, fieldNames.wind, fieldNames.cloud1])));
5089
- case 2:
5090
- case "end":
5091
- return _context.stop();
5092
- }
5093
- }, _callee);
5094
- }));
5095
- function onBlur() {
5096
- return _onBlur.apply(this, arguments);
5097
- }
5098
- return onBlur;
5099
- }(),
5353
+ onBlur: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
5354
+ var fields;
5355
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
5356
+ while (1) switch (_context.prev = _context.next) {
5357
+ case 0:
5358
+ fields = isChangeGroup ? [].concat(subFields, mainFields) : [];
5359
+ return _context.abrupt("return", trigger([].concat(fields, [fieldNames.weather2, fieldNames.weather3, fieldNames.wind, fieldNames.cloud1])));
5360
+ case 2:
5361
+ case "end":
5362
+ return _context.stop();
5363
+ }
5364
+ }, _callee);
5365
+ })),
5100
5366
  rules: {
5101
5367
  validate: {
5102
5368
  validateRequiredMainFields: function validateRequiredMainFields(value) {
@@ -5108,30 +5374,24 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5108
5374
  }
5109
5375
  }
5110
5376
  }
5111
- }), jsx(TafFormTextField, {
5377
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5112
5378
  defaultValue: getDefaultValue('weather.weather2', field),
5113
5379
  disabled: disabled,
5114
5380
  label: "Weather",
5115
5381
  name: fieldNames.weather2,
5116
- onBlur: function () {
5117
- var _onBlur2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
5118
- var fields;
5119
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5120
- while (1) switch (_context2.prev = _context2.next) {
5121
- case 0:
5122
- fields = isChangeGroup ? [].concat(subFields, mainFields) : [];
5123
- return _context2.abrupt("return", trigger([].concat(fields, [fieldNames.weather3, fieldNames.wind, fieldNames.cloud1])));
5124
- case 2:
5125
- case "end":
5126
- return _context2.stop();
5127
- }
5128
- }, _callee2);
5129
- }));
5130
- function onBlur() {
5131
- return _onBlur2.apply(this, arguments);
5132
- }
5133
- return onBlur;
5134
- }(),
5382
+ onBlur: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
5383
+ var fields;
5384
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
5385
+ while (1) switch (_context2.prev = _context2.next) {
5386
+ case 0:
5387
+ fields = isChangeGroup ? [].concat(subFields, mainFields) : [];
5388
+ return _context2.abrupt("return", trigger([].concat(fields, [fieldNames.weather3, fieldNames.wind, fieldNames.cloud1])));
5389
+ case 2:
5390
+ case "end":
5391
+ return _context2.stop();
5392
+ }
5393
+ }, _callee2);
5394
+ })),
5135
5395
  rules: {
5136
5396
  validate: {
5137
5397
  validateSecondWeatherField: function validateSecondWeatherField$1(value) {
@@ -5139,28 +5399,22 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5139
5399
  }
5140
5400
  }
5141
5401
  }
5142
- }), jsx(TafFormTextField, {
5402
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5143
5403
  defaultValue: getDefaultValue('weather.weather3', field),
5144
5404
  disabled: disabled,
5145
5405
  label: "Weather",
5146
5406
  name: fieldNames.weather3,
5147
- onBlur: function () {
5148
- var _onBlur3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5149
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5150
- while (1) switch (_context3.prev = _context3.next) {
5151
- case 0:
5152
- return _context3.abrupt("return", trigger([fieldNames.wind, fieldNames.cloud1]));
5153
- case 1:
5154
- case "end":
5155
- return _context3.stop();
5156
- }
5157
- }, _callee3);
5158
- }));
5159
- function onBlur() {
5160
- return _onBlur3.apply(this, arguments);
5161
- }
5162
- return onBlur;
5163
- }(),
5407
+ onBlur: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
5408
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5409
+ while (1) switch (_context3.prev = _context3.next) {
5410
+ case 0:
5411
+ return _context3.abrupt("return", trigger([fieldNames.wind, fieldNames.cloud1]));
5412
+ case 1:
5413
+ case "end":
5414
+ return _context3.stop();
5415
+ }
5416
+ }, _callee3);
5417
+ })),
5164
5418
  rules: {
5165
5419
  validate: {
5166
5420
  validateThirdWeatherField: function validateThirdWeatherField$1(value) {
@@ -5168,30 +5422,24 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5168
5422
  }
5169
5423
  }
5170
5424
  }
5171
- }), jsx(TafFormTextField, {
5425
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5172
5426
  defaultValue: getDefaultValue('cloud.cloud1', field),
5173
5427
  disabled: disabled,
5174
5428
  label: "Cloud",
5175
5429
  name: fieldNames.cloud1,
5176
- onBlur: function () {
5177
- var _onBlur4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
5178
- var fields;
5179
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5180
- while (1) switch (_context4.prev = _context4.next) {
5181
- case 0:
5182
- fields = isChangeGroup ? [].concat(subFields, mainFields) : [];
5183
- return _context4.abrupt("return", trigger([].concat(fields, [fieldNames.cloud2, fieldNames.cloud3, fieldNames.cloud4])));
5184
- case 2:
5185
- case "end":
5186
- return _context4.stop();
5187
- }
5188
- }, _callee4);
5189
- }));
5190
- function onBlur() {
5191
- return _onBlur4.apply(this, arguments);
5192
- }
5193
- return onBlur;
5194
- }(),
5430
+ onBlur: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
5431
+ var fields;
5432
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5433
+ while (1) switch (_context4.prev = _context4.next) {
5434
+ case 0:
5435
+ fields = isChangeGroup ? [].concat(subFields, mainFields) : [];
5436
+ return _context4.abrupt("return", trigger([].concat(fields, [fieldNames.cloud2, fieldNames.cloud3, fieldNames.cloud4])));
5437
+ case 2:
5438
+ case "end":
5439
+ return _context4.stop();
5440
+ }
5441
+ }, _callee4);
5442
+ })),
5195
5443
  rules: {
5196
5444
  validate: {
5197
5445
  validateRequiredMainFields: function validateRequiredMainFields(value) {
@@ -5203,28 +5451,22 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5203
5451
  }
5204
5452
  }
5205
5453
  }
5206
- }), jsx(TafFormTextField, {
5454
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5207
5455
  defaultValue: getDefaultValue('cloud.cloud2', field),
5208
5456
  disabled: disabled,
5209
5457
  label: "Cloud",
5210
5458
  name: fieldNames.cloud2,
5211
- onBlur: function () {
5212
- var _onBlur5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5213
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5214
- while (1) switch (_context5.prev = _context5.next) {
5215
- case 0:
5216
- return _context5.abrupt("return", trigger([fieldNames.cloud3, fieldNames.cloud4]));
5217
- case 1:
5218
- case "end":
5219
- return _context5.stop();
5220
- }
5221
- }, _callee5);
5222
- }));
5223
- function onBlur() {
5224
- return _onBlur5.apply(this, arguments);
5225
- }
5226
- return onBlur;
5227
- }(),
5459
+ onBlur: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
5460
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
5461
+ while (1) switch (_context5.prev = _context5.next) {
5462
+ case 0:
5463
+ return _context5.abrupt("return", trigger([fieldNames.cloud3, fieldNames.cloud4]));
5464
+ case 1:
5465
+ case "end":
5466
+ return _context5.stop();
5467
+ }
5468
+ }, _callee5);
5469
+ })),
5228
5470
  rules: {
5229
5471
  validate: {
5230
5472
  validateSecondCloud: function validateSecondCloud$1(value) {
@@ -5232,28 +5474,22 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5232
5474
  }
5233
5475
  }
5234
5476
  }
5235
- }), jsx(TafFormTextField, {
5477
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5236
5478
  defaultValue: getDefaultValue('cloud.cloud3', field),
5237
5479
  disabled: disabled,
5238
5480
  label: "Cloud",
5239
5481
  name: fieldNames.cloud3,
5240
- onBlur: function () {
5241
- var _onBlur6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5242
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5243
- while (1) switch (_context6.prev = _context6.next) {
5244
- case 0:
5245
- return _context6.abrupt("return", trigger(fieldNames.cloud4));
5246
- case 1:
5247
- case "end":
5248
- return _context6.stop();
5249
- }
5250
- }, _callee6);
5251
- }));
5252
- function onBlur() {
5253
- return _onBlur6.apply(this, arguments);
5254
- }
5255
- return onBlur;
5256
- }(),
5482
+ onBlur: /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
5483
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5484
+ while (1) switch (_context6.prev = _context6.next) {
5485
+ case 0:
5486
+ return _context6.abrupt("return", trigger(fieldNames.cloud4));
5487
+ case 1:
5488
+ case "end":
5489
+ return _context6.stop();
5490
+ }
5491
+ }, _callee6);
5492
+ })),
5257
5493
  rules: {
5258
5494
  validate: {
5259
5495
  validateThirdCloud: function validateThirdCloud$1(value) {
@@ -5261,7 +5497,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5261
5497
  }
5262
5498
  }
5263
5499
  }
5264
- }), jsx(TafFormTextField, {
5500
+ }), /*#__PURE__*/jsx(TafFormTextField, {
5265
5501
  defaultValue: getDefaultValue('cloud.cloud4', field),
5266
5502
  disabled: disabled,
5267
5503
  label: "Cloud",
@@ -5274,7 +5510,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5274
5510
  }
5275
5511
  }
5276
5512
  })]
5277
- }), !disabled && jsx(Grid, {
5513
+ }), !disabled && /*#__PURE__*/jsx(Grid, {
5278
5514
  container: true,
5279
5515
  sx: {
5280
5516
  justifyContent: 'flex-end',
@@ -5283,7 +5519,7 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5283
5519
  marginBottom: '14px',
5284
5520
  minWidth: 28
5285
5521
  },
5286
- children: jsx(TafFormOptionsButton, {
5522
+ children: /*#__PURE__*/jsx(TafFormOptionsButton, {
5287
5523
  addChangeGroupAbove: addChangeGroupAbove,
5288
5524
  addChangeGroupBelow: addChangeGroupBelow,
5289
5525
  clearRow: clearRow,
@@ -5297,7 +5533,6 @@ var TafFormRow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
5297
5533
  }));
5298
5534
  });
5299
5535
 
5300
- // prevents default functionality
5301
5536
  var noop = function noop() {};
5302
5537
  var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5303
5538
  var tafFromBackend = _ref.tafFromBackend,
@@ -5363,11 +5598,12 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5363
5598
  _useTafModuleContext$2 = _useTafModuleContext.onPreventCloseView,
5364
5599
  onPreventCloseView = _useTafModuleContext$2 === void 0 ? function () {} : _useTafModuleContext$2,
5365
5600
  useFieldArrayMethods = _useTafModuleContext.useFieldArrayMethods;
5366
- var fields = useFieldArrayMethods.fields,
5367
- insert = useFieldArrayMethods.insert,
5368
- remove = useFieldArrayMethods.remove,
5369
- move = useFieldArrayMethods.move,
5370
- replace = useFieldArrayMethods.replace;
5601
+ var _ref4 = useFieldArrayMethods,
5602
+ fields = _ref4.fields,
5603
+ insert = _ref4.insert,
5604
+ remove = _ref4.remove,
5605
+ move = _ref4.move,
5606
+ replace = _ref4.replace;
5371
5607
  var _useFormContext = useFormContext(),
5372
5608
  handleSubmit = _useFormContext.handleSubmit,
5373
5609
  trigger = _useFormContext.trigger,
@@ -5382,6 +5618,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5382
5618
  var errors = formState.errors,
5383
5619
  isFormDirty = formState.isDirty;
5384
5620
  usePreventBrowserClose(isFormDirty && !isDisabled);
5621
+
5385
5622
  // Needed to be able to show a confirmation dialog on closing parent view
5386
5623
  React.useEffect(function () {
5387
5624
  onPreventCloseView(isFormDirty);
@@ -5393,7 +5630,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5393
5630
  console.log('submit:', convertTafValuesToObject(data));
5394
5631
  };
5395
5632
  var showConfirmDialog = /*#__PURE__*/function () {
5396
- var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(action) {
5633
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(action) {
5397
5634
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
5398
5635
  while (1) switch (_context3.prev = _context3.next) {
5399
5636
  case 0:
@@ -5413,7 +5650,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5413
5650
  }, _callee3);
5414
5651
  }));
5415
5652
  return function showConfirmDialog(_x) {
5416
- return _ref4.apply(this, arguments);
5653
+ return _ref5.apply(this, arguments);
5417
5654
  };
5418
5655
  }();
5419
5656
  var resetFormValues = function resetFormValues(formData, keepDirty) {
@@ -5453,7 +5690,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5453
5690
  }));
5454
5691
  }, [dispatch]);
5455
5692
  var setIsEditor = /*#__PURE__*/function () {
5456
- var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(checked) {
5693
+ var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(checked) {
5457
5694
  var username, didSucceed;
5458
5695
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
5459
5696
  while (1) switch (_context4.prev = _context4.next) {
@@ -5480,7 +5717,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5480
5717
  }, _callee4);
5481
5718
  }));
5482
5719
  return function setIsEditor(_x2) {
5483
- return _ref5.apply(this, arguments);
5720
+ return _ref6.apply(this, arguments);
5484
5721
  };
5485
5722
  }();
5486
5723
  var onSwitchMode = function onSwitchMode(event) {
@@ -5535,7 +5772,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5535
5772
  case 'PUBLISH':
5536
5773
  toggleIsDraft(false);
5537
5774
  void handleSubmit(/*#__PURE__*/function () {
5538
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(data) {
5775
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(data) {
5539
5776
  var didSucceed;
5540
5777
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
5541
5778
  while (1) switch (_context6.prev = _context6.next) {
@@ -5558,7 +5795,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5558
5795
  }, _callee6);
5559
5796
  }));
5560
5797
  return function (_x3) {
5561
- return _ref7.apply(this, arguments);
5798
+ return _ref8.apply(this, arguments);
5562
5799
  };
5563
5800
  }())().then(function () {
5564
5801
  var hasFormErrors = Object.keys(errors).length;
@@ -5617,6 +5854,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5617
5854
  void trigger(); // trigger all fields validation
5618
5855
  });
5619
5856
  };
5857
+
5620
5858
  // TODO: https://gitlab.com/opengeoweb/opengeoweb/-/issues/726 insert (react-hook-form) does not work well with focus (only last row will get focus), so added this dirty solution. This can be fixed in a better way in react-hook-form v7
5621
5859
  var focusFirstInput = function focusFirstInput(rowIndex) {
5622
5860
  var selector = rowIndex === -1 ? "[name=\"baseForecast.wind\"]" : "[name=\"changeGroups[" + rowIndex + "].probability\"]";
@@ -5625,6 +5863,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5625
5863
  nextRowFirstInput.focus();
5626
5864
  }
5627
5865
  };
5866
+
5628
5867
  // adding rows and validation don't work well combined, with always skipping validation of fields of rows above the one the inserted row. A setTimeout prevents this issue
5629
5868
  var setFocusAndValidate = function setFocusAndValidate(rowIndex) {
5630
5869
  return setTimeout(function () {
@@ -5684,9 +5923,10 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5684
5923
  setIsDisabled(!isEditor || isDefaultDisabled);
5685
5924
  // set validate flag to validate after the values have been set
5686
5925
  setShouldValidate(true);
5926
+
5687
5927
  // register validate method to use in parent components
5688
5928
  var onValidateFormPromise = /*#__PURE__*/function () {
5689
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
5929
+ var _ref0 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
5690
5930
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
5691
5931
  while (1) switch (_context8.prev = _context8.next) {
5692
5932
  case 0:
@@ -5709,7 +5949,7 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5709
5949
  }, _callee8);
5710
5950
  }));
5711
5951
  return function onValidateFormPromise() {
5712
- return _ref9.apply(this, arguments);
5952
+ return _ref0.apply(this, arguments);
5713
5953
  };
5714
5954
  }();
5715
5955
  if (registerValidateForm) {
@@ -5749,8 +5989,8 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5749
5989
  }
5750
5990
  // eslint-disable-next-line react-hooks/exhaustive-deps
5751
5991
  }, [shouldValidate, isDisabled]);
5752
- return jsxs(Fragment, {
5753
- children: [jsxs(Box, {
5992
+ return /*#__PURE__*/jsxs(Fragment, {
5993
+ children: [/*#__PURE__*/jsxs(Box, {
5754
5994
  sx: {
5755
5995
  display: 'flex',
5756
5996
  flexDirection: 'row',
@@ -5765,31 +6005,32 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5765
6005
  sm: '8px'
5766
6006
  }
5767
6007
  },
5768
- children: [jsx(SwitchButton, {
6008
+ children: [/*#__PURE__*/jsx(SwitchButton, {
5769
6009
  checked: isEditor,
5770
6010
  onChange: onSwitchMode
5771
- }), jsx(Box, {
6011
+ }), /*#__PURE__*/jsx(Box, {
5772
6012
  sx: {
5773
6013
  width: '16px',
5774
6014
  marginLeft: 1
5775
6015
  },
5776
- children: !!editor && jsx(TafAvatar, {
6016
+ children: !!editor && /*#__PURE__*/jsx(TafAvatar, {
5777
6017
  editor: editor
5778
6018
  })
5779
6019
  })]
5780
- }), jsxs("form", {
6020
+ }), /*#__PURE__*/jsxs("form", {
5781
6021
  "data-testid": "taf-form",
5782
6022
  onSubmit: handleSubmit(onSubmit),
5783
6023
  ref: formRef,
5784
- children: [jsx(TafFormRow, {
6024
+ children: [/*#__PURE__*/jsx(TafFormRow, {
5785
6025
  disabled: isDisabled,
5786
6026
  isNotRequiredForAction: isNotRequiredForAction,
5787
6027
  onAddChangeGroupBelow: onAddRow,
5788
6028
  onClearRow: _onClearRow
5789
- }), jsx(ReactSortable, {
6029
+ }), /*#__PURE__*/jsx(ReactSortable, {
5790
6030
  animation: 200,
5791
- direction: "vertical",
6031
+ direction: "vertical"
5792
6032
  // hover props
6033
+ ,
5793
6034
  forceFallback: false,
5794
6035
  handle: ".handle",
5795
6036
  list: fields,
@@ -5800,12 +6041,13 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5800
6041
  Sortable.ghost.style.opacity = '1';
5801
6042
  }
5802
6043
  },
5803
- setList: noop,
6044
+ setList: noop // we don't use this function because we order with our own methods
6045
+ ,
5804
6046
  tag: "div",
5805
6047
  children: fields.map(function (item, index) {
5806
- return jsx(TafFormRow, {
6048
+ return /*#__PURE__*/jsx(TafFormRow, {
5807
6049
  disabled: isDisabled,
5808
- dragHandle: jsx(DragHandle, {
6050
+ dragHandle: /*#__PURE__*/jsx(DragHandle, {
5809
6051
  index: index,
5810
6052
  isDisabled: fields.length === 1 || isDisabled,
5811
6053
  isSorting: activeDraggingIndex === index
@@ -5824,10 +6066,10 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5824
6066
  onRemoveChangeGroup: onRemoverow
5825
6067
  }, item.id);
5826
6068
  })
5827
- }), shouldEnableRemark ? jsx(TafRemarkField, {
6069
+ }), shouldEnableRemark ? /*#__PURE__*/jsx(TafRemarkField, {
5828
6070
  disabled: isDisabled,
5829
6071
  isEditor: isEditor
5830
- }) : null, !isDisabled && isEditor ? jsx(Grid, {
6072
+ }) : null, !isDisabled && isEditor ? /*#__PURE__*/jsx(Grid, {
5831
6073
  container: true,
5832
6074
  sx: {
5833
6075
  justifyContent: 'space-between',
@@ -5835,21 +6077,21 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5835
6077
  marginLeft: 1.5,
5836
6078
  marginTop: 1
5837
6079
  },
5838
- children: jsx(Grid, {
5839
- children: jsx(IssuesButton, {
6080
+ children: /*#__PURE__*/jsx(Grid, {
6081
+ children: /*#__PURE__*/jsx(IssuesButton, {
5840
6082
  errors: errors,
5841
6083
  isIssuesPaneOpen: isIssuesPaneOpen,
5842
6084
  setIsIssuesPaneOpen: setIsIssuesPaneOpen
5843
6085
  })
5844
6086
  })
5845
- }) : null, isEditor ? jsx(TafFormButtons, {
6087
+ }) : null, isEditor ? /*#__PURE__*/jsx(TafFormButtons, {
5846
6088
  canBe: tafFromBackend.canbe,
5847
6089
  isFormDisabled: isDisabled,
5848
6090
  onTafEditModeButtonPress: onTafEditModeButtonPress,
5849
6091
  onTafViewModeButtonPress: onTafViewModeButtonPress,
5850
6092
  tafAction: tafAction
5851
6093
  }) : null, hiddenInputFields.map(function (field) {
5852
- return jsx(ReactHookFormHiddenInput, {
6094
+ return /*#__PURE__*/jsx(ReactHookFormHiddenInput, {
5853
6095
  "data-testid": field,
5854
6096
  name: field
5855
6097
  }, field);
@@ -5863,14 +6105,31 @@ var TafForm = /*#__PURE__*/React.memo(function (_ref) {
5863
6105
  prevProps.tafFromBackend.editor === nextProps.tafFromBackend.editor;
5864
6106
  });
5865
6107
 
6108
+ /* *
6109
+ * Licensed under the Apache License, Version 2.0 (the "License");
6110
+ * you may not use this file except in compliance with the License.
6111
+ * You may obtain a copy of the License at
6112
+ *
6113
+ * http://www.apache.org/licenses/LICENSE-2.0
6114
+ *
6115
+ * Unless required by applicable law or agreed to in writing, software
6116
+ * distributed under the License is distributed on an "AS IS" BASIS,
6117
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6118
+ * See the License for the specific language governing permissions and
6119
+ * limitations under the License.
6120
+ *
6121
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6122
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6123
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6124
+ * */
5866
6125
  var IconWithTooltip = function IconWithTooltip(_ref) {
5867
6126
  var title = _ref.title,
5868
6127
  children = _ref.children;
5869
- return jsx(CustomTooltip, {
6128
+ return /*#__PURE__*/jsx(CustomTooltip, {
5870
6129
  "data-testid": "statusIcon-tooltip",
5871
6130
  placement: "right",
5872
6131
  title: title,
5873
- children: jsx(Box, {
6132
+ children: /*#__PURE__*/jsx(Box, {
5874
6133
  component: "span",
5875
6134
  children: children
5876
6135
  })
@@ -5885,9 +6144,9 @@ var StatusIcon = function StatusIcon(_ref2) {
5885
6144
  case 'DRAFT':
5886
6145
  case 'DRAFT_AMENDED':
5887
6146
  case 'DRAFT_CORRECTED':
5888
- return jsx(IconWithTooltip, {
6147
+ return /*#__PURE__*/jsx(IconWithTooltip, {
5889
6148
  title: getTafStatusLabel(t, status),
5890
- children: jsx(Edit, {
6149
+ children: /*#__PURE__*/jsx(Edit, {
5891
6150
  "data-testid": "status-draft",
5892
6151
  sx: {
5893
6152
  color: 'geowebColors.buttons.tertiary.default.color'
@@ -5897,14 +6156,14 @@ var StatusIcon = function StatusIcon(_ref2) {
5897
6156
  case 'PUBLISHED':
5898
6157
  case 'CORRECTED':
5899
6158
  case 'AMENDED':
5900
- return jsx(IconWithTooltip, {
6159
+ return /*#__PURE__*/jsx(IconWithTooltip, {
5901
6160
  title: getTafStatusLabel(t, status),
5902
- children: timeSlot === 'ACTIVE' ? jsx(Success, {
6161
+ children: timeSlot === 'ACTIVE' ? /*#__PURE__*/jsx(Success, {
5903
6162
  "data-testid": "status-active",
5904
6163
  sx: {
5905
6164
  color: 'geowebColors.functional.success'
5906
6165
  }
5907
- }) : jsx(Clock, {
6166
+ }) : /*#__PURE__*/jsx(Clock, {
5908
6167
  "data-testid": "status-upcoming",
5909
6168
  sx: {
5910
6169
  color: 'geowebColors.functional.success'
@@ -5912,9 +6171,9 @@ var StatusIcon = function StatusIcon(_ref2) {
5912
6171
  })
5913
6172
  });
5914
6173
  case 'CANCELLED':
5915
- return jsx(IconWithTooltip, {
6174
+ return /*#__PURE__*/jsx(IconWithTooltip, {
5916
6175
  title: getTafStatusLabel(t, status),
5917
- children: jsx(Cancel, {
6176
+ children: /*#__PURE__*/jsx(Cancel, {
5918
6177
  "data-testid": "status-cancelled",
5919
6178
  sx: {
5920
6179
  color: 'geowebColors.captions.captionError.rgba'
@@ -5922,9 +6181,9 @@ var StatusIcon = function StatusIcon(_ref2) {
5922
6181
  })
5923
6182
  });
5924
6183
  case 'EXPIRED':
5925
- return jsx(IconWithTooltip, {
6184
+ return /*#__PURE__*/jsx(IconWithTooltip, {
5926
6185
  title: getTafStatusLabel(t, status),
5927
- children: jsx(Clock, {
6186
+ children: /*#__PURE__*/jsx(Clock, {
5928
6187
  "data-testid": "status-expired",
5929
6188
  sx: {
5930
6189
  transform: 'scaleX(-1)',
@@ -5938,6 +6197,23 @@ var StatusIcon = function StatusIcon(_ref2) {
5938
6197
  }
5939
6198
  };
5940
6199
 
6200
+ /* *
6201
+ * Licensed under the Apache License, Version 2.0 (the "License");
6202
+ * you may not use this file except in compliance with the License.
6203
+ * You may obtain a copy of the License at
6204
+ *
6205
+ * http://www.apache.org/licenses/LICENSE-2.0
6206
+ *
6207
+ * Unless required by applicable law or agreed to in writing, software
6208
+ * distributed under the License is distributed on an "AS IS" BASIS,
6209
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6210
+ * See the License for the specific language governing permissions and
6211
+ * limitations under the License.
6212
+ *
6213
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6214
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6215
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6216
+ * */
5941
6217
  var LocationTabs = function LocationTabs(_ref) {
5942
6218
  var tafList = _ref.tafList,
5943
6219
  _ref$activeIndex = _ref.activeIndex,
@@ -5947,7 +6223,7 @@ var LocationTabs = function LocationTabs(_ref) {
5947
6223
  timeSlot = _ref.timeSlot;
5948
6224
  var _useFormContext = useFormContext(),
5949
6225
  isDirty = _useFormContext.formState.isDirty;
5950
- return jsx(MenuList, {
6226
+ return /*#__PURE__*/jsx(MenuList, {
5951
6227
  "data-testid": "location-tabs",
5952
6228
  sx: {
5953
6229
  paddingTop: '32px'
@@ -5955,7 +6231,7 @@ var LocationTabs = function LocationTabs(_ref) {
5955
6231
  children: tafList.map(function (_ref2, index) {
5956
6232
  var taf = _ref2.taf,
5957
6233
  editor = _ref2.editor;
5958
- return jsxs(MenuItem, {
6234
+ return /*#__PURE__*/jsxs(MenuItem, {
5959
6235
  onClick: function onClick() {
5960
6236
  return onChangeTab(index, isDirty);
5961
6237
  },
@@ -5978,17 +6254,17 @@ var LocationTabs = function LocationTabs(_ref) {
5978
6254
  zIndex: 1
5979
6255
  }
5980
6256
  },
5981
- children: [editor ? jsx(Box$1, {
6257
+ children: [editor ? /*#__PURE__*/jsx(Box$1, {
5982
6258
  sx: {
5983
6259
  position: 'absolute',
5984
6260
  top: '4px',
5985
6261
  left: '8px'
5986
6262
  },
5987
- children: jsx(TafAvatar, {
6263
+ children: /*#__PURE__*/jsx(TafAvatar, {
5988
6264
  editor: editor,
5989
6265
  tooltipPlacement: "right"
5990
6266
  })
5991
- }) : null, jsx(Box$1, {
6267
+ }) : null, /*#__PURE__*/jsx(Box$1, {
5992
6268
  component: "span",
5993
6269
  "data-testid": "taf-location",
5994
6270
  sx: {
@@ -5997,7 +6273,7 @@ var LocationTabs = function LocationTabs(_ref) {
5997
6273
  letterSpacing: '0.09px'
5998
6274
  },
5999
6275
  children: taf.location
6000
- }), jsx(Box$1, {
6276
+ }), /*#__PURE__*/jsx(Box$1, {
6001
6277
  component: "span",
6002
6278
  sx: {
6003
6279
  position: 'absolute',
@@ -6005,7 +6281,7 @@ var LocationTabs = function LocationTabs(_ref) {
6005
6281
  width: '24px',
6006
6282
  height: '24px'
6007
6283
  },
6008
- children: jsx(StatusIcon, {
6284
+ children: /*#__PURE__*/jsx(StatusIcon, {
6009
6285
  status: taf.status,
6010
6286
  timeSlot: timeSlot
6011
6287
  })
@@ -6021,7 +6297,7 @@ var TabPanel = function TabPanel(_ref) {
6021
6297
  value = _ref.value,
6022
6298
  index = _ref.index,
6023
6299
  other = _objectWithoutPropertiesLoose(_ref, _excluded$2);
6024
- return jsx(Box, Object.assign({
6300
+ return /*#__PURE__*/jsx(Box, Object.assign({
6025
6301
  "aria-labelledby": "simple-tab-" + index,
6026
6302
  "data-testid": "tab-panel-" + index,
6027
6303
  hidden: value !== index,
@@ -6032,11 +6308,29 @@ var TabPanel = function TabPanel(_ref) {
6032
6308
  }));
6033
6309
  };
6034
6310
 
6311
+ /* *
6312
+ * Licensed under the Apache License, Version 2.0 (the "License");
6313
+ * you may not use this file except in compliance with the License.
6314
+ * You may obtain a copy of the License at
6315
+ *
6316
+ * http://www.apache.org/licenses/LICENSE-2.0
6317
+ *
6318
+ * Unless required by applicable law or agreed to in writing, software
6319
+ * distributed under the License is distributed on an "AS IS" BASIS,
6320
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6321
+ * See the License for the specific language governing permissions and
6322
+ * limitations under the License.
6323
+ *
6324
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6325
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6326
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6327
+ * */
6328
+
6035
6329
  var TafHeader = function TafHeader(_ref) {
6036
6330
  var title = _ref.title,
6037
6331
  _ref$sx = _ref.sx,
6038
6332
  sx = _ref$sx === void 0 ? {} : _ref$sx;
6039
- return jsx(Typography, {
6333
+ return /*#__PURE__*/jsx(Typography, {
6040
6334
  sx: Object.assign({
6041
6335
  textAlign: 'center',
6042
6336
  fontWeight: 500,
@@ -6047,10 +6341,28 @@ var TafHeader = function TafHeader(_ref) {
6047
6341
  });
6048
6342
  };
6049
6343
 
6344
+ /* *
6345
+ * Licensed under the Apache License, Version 2.0 (the "License");
6346
+ * you may not use this file except in compliance with the License.
6347
+ * You may obtain a copy of the License at
6348
+ *
6349
+ * http://www.apache.org/licenses/LICENSE-2.0
6350
+ *
6351
+ * Unless required by applicable law or agreed to in writing, software
6352
+ * distributed under the License is distributed on an "AS IS" BASIS,
6353
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6354
+ * See the License for the specific language governing permissions and
6355
+ * limitations under the License.
6356
+ *
6357
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6358
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6359
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6360
+ * */
6361
+
6050
6362
  var AdverseWeatherTACMessage = function AdverseWeatherTACMessage(_ref) {
6051
6363
  var TAC = _ref.TAC,
6052
6364
  isActive = _ref.isActive;
6053
- return jsx(Box$1, {
6365
+ return /*#__PURE__*/jsx(Box$1, {
6054
6366
  "data-testid": "adverse-weather-tac",
6055
6367
  sx: {
6056
6368
  fontSize: '12px',
@@ -6059,13 +6371,13 @@ var AdverseWeatherTACMessage = function AdverseWeatherTACMessage(_ref) {
6059
6371
  color: 'geowebColors.captions.captionStatus.rgba'
6060
6372
  },
6061
6373
  children: TAC == null ? void 0 : TAC.tac.map(function (line, index) {
6062
- return jsx(Box$1, {
6374
+ return /*#__PURE__*/jsx(Box$1, {
6063
6375
  component: "span",
6064
6376
  sx: {
6065
6377
  display: 'block'
6066
6378
  },
6067
6379
  children: line.map(function (word, index) {
6068
- return jsx(Box$1, {
6380
+ return /*#__PURE__*/jsx(Box$1, {
6069
6381
  component: "span",
6070
6382
  sx: Object.assign({
6071
6383
  display: 'inline',
@@ -6085,12 +6397,29 @@ var AdverseWeatherTACMessage = function AdverseWeatherTACMessage(_ref) {
6085
6397
  });
6086
6398
  };
6087
6399
 
6400
+ /* *
6401
+ * Licensed under the Apache License, Version 2.0 (the "License");
6402
+ * you may not use this file except in compliance with the License.
6403
+ * You may obtain a copy of the License at
6404
+ *
6405
+ * http://www.apache.org/licenses/LICENSE-2.0
6406
+ *
6407
+ * Unless required by applicable law or agreed to in writing, software
6408
+ * distributed under the License is distributed on an "AS IS" BASIS,
6409
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6410
+ * See the License for the specific language governing permissions and
6411
+ * limitations under the License.
6412
+ *
6413
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6414
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6415
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6416
+ * */
6088
6417
  var ExportButton = function ExportButton(_ref) {
6089
6418
  var onClick = _ref.onClick,
6090
6419
  isHidden = _ref.isHidden;
6091
6420
  var _useTafTranslation = useTafTranslation(),
6092
6421
  t = _useTafTranslation.t;
6093
- return isHidden ? null : jsx(CustomIconButton, {
6422
+ return isHidden ? null : /*#__PURE__*/jsx(CustomIconButton, {
6094
6423
  "data-testid": "export-tac-button",
6095
6424
  onClick: onClick,
6096
6425
  tooltipProps: {
@@ -6098,14 +6427,32 @@ var ExportButton = function ExportButton(_ref) {
6098
6427
  placement: 'left'
6099
6428
  },
6100
6429
  variant: "tool",
6101
- children: jsx(Export, {})
6430
+ children: /*#__PURE__*/jsx(Export, {})
6102
6431
  });
6103
6432
  };
6104
6433
 
6434
+ /* *
6435
+ * Licensed under the Apache License, Version 2.0 (the "License");
6436
+ * you may not use this file except in compliance with the License.
6437
+ * You may obtain a copy of the License at
6438
+ *
6439
+ * http://www.apache.org/licenses/LICENSE-2.0
6440
+ *
6441
+ * Unless required by applicable law or agreed to in writing, software
6442
+ * distributed under the License is distributed on an "AS IS" BASIS,
6443
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6444
+ * See the License for the specific language governing permissions and
6445
+ * limitations under the License.
6446
+ *
6447
+ * Copyright 2024 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6448
+ * Copyright 2024 - Finnish Meteorological Institute (FMI)
6449
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6450
+ * */
6451
+
6105
6452
  var TacHighLight = function TacHighLight(_ref) {
6106
6453
  var isActive = _ref.isActive,
6107
6454
  children = _ref.children;
6108
- return jsx(Box, {
6455
+ return /*#__PURE__*/jsx(Box, {
6109
6456
  component: "span",
6110
6457
  sx: Object.assign({
6111
6458
  display: 'inline',
@@ -6143,7 +6490,8 @@ var TacContainer = function TacContainer(_ref2) {
6143
6490
  setValue = _useFormContext.setValue;
6144
6491
  var _useTafModuleContext = useTafModuleContext(),
6145
6492
  useFieldArrayMethods = _useTafModuleContext.useFieldArrayMethods;
6146
- var replace = useFieldArrayMethods.replace;
6493
+ var _ref3 = useFieldArrayMethods,
6494
+ replace = _ref3.replace;
6147
6495
  var showSnackbar = React.useCallback(function (message) {
6148
6496
  dispatch(snackbarActions.openSnackbar({
6149
6497
  type: snackbarTypes.SnackbarMessageType.VERBATIM_MESSAGE,
@@ -6181,7 +6529,7 @@ var TacContainer = function TacContainer(_ref2) {
6181
6529
  }
6182
6530
  // eslint-disable-next-line react-hooks/exhaustive-deps
6183
6531
  }, [isActive]);
6184
- return jsxs(Box, {
6532
+ return /*#__PURE__*/jsxs(Box, {
6185
6533
  "aria-label": location,
6186
6534
  className: isActive ? 'active' : undefined,
6187
6535
  "data-location": location,
@@ -6189,19 +6537,19 @@ var TacContainer = function TacContainer(_ref2) {
6189
6537
  sx: {
6190
6538
  marginBottom: '20px'
6191
6539
  },
6192
- children: [jsxs(Box, {
6540
+ children: [/*#__PURE__*/jsxs(Box, {
6193
6541
  sx: {
6194
6542
  display: 'flex',
6195
6543
  alignItems: 'center',
6196
6544
  justifyContent: 'space-between',
6197
6545
  height: 24
6198
6546
  },
6199
- children: [jsxs(Box, {
6547
+ children: [/*#__PURE__*/jsxs(Box, {
6200
6548
  sx: {
6201
6549
  display: 'flex',
6202
6550
  alignItems: 'center'
6203
6551
  },
6204
- children: [jsx(Box, {
6552
+ children: [/*#__PURE__*/jsx(Box, {
6205
6553
  sx: {
6206
6554
  width: 24,
6207
6555
  height: 24,
@@ -6211,11 +6559,11 @@ var TacContainer = function TacContainer(_ref2) {
6211
6559
  alignItems: 'center',
6212
6560
  justifyContent: 'center'
6213
6561
  },
6214
- children: jsx(StatusIcon, {
6562
+ children: /*#__PURE__*/jsx(StatusIcon, {
6215
6563
  status: status,
6216
6564
  timeSlot: timeSlot
6217
6565
  })
6218
- }), jsxs(Typography, {
6566
+ }), /*#__PURE__*/jsxs(Typography, {
6219
6567
  sx: Object.assign({
6220
6568
  lineHeight: 1
6221
6569
  }, isActive && {
@@ -6223,7 +6571,7 @@ var TacContainer = function TacContainer(_ref2) {
6223
6571
  padding: '0 2px',
6224
6572
  marginLeft: '-2px'
6225
6573
  }),
6226
- children: [jsx(Typography, {
6574
+ children: [/*#__PURE__*/jsx(Typography, {
6227
6575
  component: "span",
6228
6576
  "data-testid": "tafLocation",
6229
6577
  sx: {
@@ -6231,7 +6579,7 @@ var TacContainer = function TacContainer(_ref2) {
6231
6579
  color: 'geowebColors.captions.captionInformation.rgba'
6232
6580
  },
6233
6581
  children: location
6234
- }), jsx(Typography, {
6582
+ }), /*#__PURE__*/jsx(Typography, {
6235
6583
  component: "span",
6236
6584
  "data-testid": "tafLocationLabel",
6237
6585
  sx: {
@@ -6241,20 +6589,20 @@ var TacContainer = function TacContainer(_ref2) {
6241
6589
  children: locationLabel
6242
6590
  })]
6243
6591
  })]
6244
- }), jsx(ExportButton, {
6592
+ }), /*#__PURE__*/jsx(ExportButton, {
6245
6593
  isHidden: isFormDisabled || tacHasError(TAC, t),
6246
6594
  onClick: handleExport
6247
6595
  })]
6248
- }), jsx(Box, {
6596
+ }), /*#__PURE__*/jsx(Box, {
6249
6597
  sx: {
6250
6598
  fontSize: '12px',
6251
6599
  letterSpacing: '0.4px',
6252
6600
  color: 'geowebColors.captions.captionStatus.rgba'
6253
6601
  },
6254
- children: typeof TAC === 'string' ? jsx(TacHighLight, {
6602
+ children: typeof TAC === 'string' ? /*#__PURE__*/jsx(TacHighLight, {
6255
6603
  isActive: isActive,
6256
6604
  children: TAC
6257
- }) : jsx(AdverseWeatherTACMessage, {
6605
+ }) : /*#__PURE__*/jsx(AdverseWeatherTACMessage, {
6258
6606
  TAC: TAC,
6259
6607
  isActive: isActive
6260
6608
  })
@@ -6262,6 +6610,23 @@ var TacContainer = function TacContainer(_ref2) {
6262
6610
  });
6263
6611
  };
6264
6612
 
6613
+ /* *
6614
+ * Licensed under the Apache License, Version 2.0 (the "License");
6615
+ * you may not use this file except in compliance with the License.
6616
+ * You may obtain a copy of the License at
6617
+ *
6618
+ * http://www.apache.org/licenses/LICENSE-2.0
6619
+ *
6620
+ * Unless required by applicable law or agreed to in writing, software
6621
+ * distributed under the License is distributed on an "AS IS" BASIS,
6622
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6623
+ * See the License for the specific language governing permissions and
6624
+ * limitations under the License.
6625
+ *
6626
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6627
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
6628
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6629
+ * */
6265
6630
  var TacOverview = function TacOverview(_ref) {
6266
6631
  var _ref$upcomingTafs = _ref.upcomingTafs,
6267
6632
  upcomingTafs = _ref$upcomingTafs === void 0 ? [] : _ref$upcomingTafs,
@@ -6313,7 +6678,7 @@ var TacOverview = function TacOverview(_ref) {
6313
6678
  clearTimeout(timer);
6314
6679
  };
6315
6680
  }, [activeLocation, activeTab]);
6316
- return jsxs(Card, {
6681
+ return /*#__PURE__*/jsxs(Card, {
6317
6682
  sx: {
6318
6683
  maxHeight: '100%',
6319
6684
  overflow: 'hidden',
@@ -6321,18 +6686,18 @@ var TacOverview = function TacOverview(_ref) {
6321
6686
  flexDirection: 'column'
6322
6687
  },
6323
6688
  variant: "outlined",
6324
- children: [jsxs(Box, {
6689
+ children: [/*#__PURE__*/jsxs(Box, {
6325
6690
  sx: {
6326
6691
  zIndex: 1
6327
6692
  },
6328
- children: [!hideTitle && jsx(TafHeader, {
6693
+ children: [!hideTitle && /*#__PURE__*/jsx(TafHeader, {
6329
6694
  title: t('tac-overview')
6330
- }), jsx(Tabs, {
6695
+ }), /*#__PURE__*/jsx(Tabs, {
6331
6696
  "aria-label": "tabs",
6332
6697
  onChange: onChangeTab,
6333
6698
  value: activeTab,
6334
6699
  children: tabs.map(function (tab, index) {
6335
- return jsx(Tab, Object.assign({
6700
+ return /*#__PURE__*/jsx(Tab, Object.assign({
6336
6701
  "data-testid": "tab-" + index,
6337
6702
  label: tab.title,
6338
6703
  sx: {
@@ -6341,7 +6706,7 @@ var TacOverview = function TacOverview(_ref) {
6341
6706
  }, muiTabA11yProps(index)), tab.title);
6342
6707
  })
6343
6708
  })]
6344
- }), jsx(Box, {
6709
+ }), /*#__PURE__*/jsx(Box, {
6345
6710
  ref: scrollRef,
6346
6711
  sx: {
6347
6712
  padding: {
@@ -6354,12 +6719,12 @@ var TacOverview = function TacOverview(_ref) {
6354
6719
  overflow: 'auto'
6355
6720
  },
6356
6721
  children: tabs.map(function (tab, index) {
6357
- return jsx(TabPanel, {
6722
+ return /*#__PURE__*/jsx(TabPanel, {
6358
6723
  index: index,
6359
6724
  value: activeTab,
6360
6725
  children: tab.tafList.map(function (_ref2) {
6361
6726
  var taf = _ref2.taf;
6362
- return jsx(TacContainer, {
6727
+ return /*#__PURE__*/jsx(TacContainer, {
6363
6728
  isActive: isActiveLocation(taf.location),
6364
6729
  isFormDisabled: isFormDisabled,
6365
6730
  taf: taf
@@ -6371,6 +6736,24 @@ var TacOverview = function TacOverview(_ref) {
6371
6736
  });
6372
6737
  };
6373
6738
 
6739
+ /* *
6740
+ * Licensed under the Apache License, Version 2.0 (the "License");
6741
+ * you may not use this file except in compliance with the License.
6742
+ * You may obtain a copy of the License at
6743
+ *
6744
+ * http://www.apache.org/licenses/LICENSE-2.0
6745
+ *
6746
+ * Unless required by applicable law or agreed to in writing, software
6747
+ * distributed under the License is distributed on an "AS IS" BASIS,
6748
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6749
+ * See the License for the specific language governing permissions and
6750
+ * limitations under the License.
6751
+ *
6752
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6753
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
6754
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
6755
+ * */
6756
+
6374
6757
  var TacContainerLayout = function TacContainerLayout(_ref) {
6375
6758
  var location = _ref.location,
6376
6759
  _ref$isActive = _ref.isActive,
@@ -6381,7 +6764,7 @@ var TacContainerLayout = function TacContainerLayout(_ref) {
6381
6764
  var _useTafConfigContext = useTafConfigContext(),
6382
6765
  tafConfig = _useTafConfigContext.tafConfig;
6383
6766
  var locationLabel = getLocationSetting(location, tafConfig.locations).label;
6384
- return jsxs(Box, {
6767
+ return /*#__PURE__*/jsxs(Box, {
6385
6768
  "aria-label": location,
6386
6769
  className: isActive ? 'active' : undefined,
6387
6770
  "data-location": location,
@@ -6389,19 +6772,19 @@ var TacContainerLayout = function TacContainerLayout(_ref) {
6389
6772
  sx: {
6390
6773
  marginBottom: '20px'
6391
6774
  },
6392
- children: [jsxs(Box, {
6775
+ children: [/*#__PURE__*/jsxs(Box, {
6393
6776
  sx: {
6394
6777
  display: 'flex',
6395
6778
  alignItems: 'center',
6396
6779
  justifyContent: 'space-between',
6397
6780
  height: 24
6398
6781
  },
6399
- children: [jsxs(Box, {
6782
+ children: [/*#__PURE__*/jsxs(Box, {
6400
6783
  sx: {
6401
6784
  display: 'flex',
6402
6785
  alignItems: 'center'
6403
6786
  },
6404
- children: [jsx(Box, {
6787
+ children: [/*#__PURE__*/jsx(Box, {
6405
6788
  sx: {
6406
6789
  width: 24,
6407
6790
  height: 24,
@@ -6412,7 +6795,7 @@ var TacContainerLayout = function TacContainerLayout(_ref) {
6412
6795
  justifyContent: 'center'
6413
6796
  },
6414
6797
  children: statusSlot
6415
- }), jsxs(Typography, {
6798
+ }), /*#__PURE__*/jsxs(Typography, {
6416
6799
  sx: Object.assign({
6417
6800
  lineHeight: 1
6418
6801
  }, isActive && {
@@ -6420,7 +6803,7 @@ var TacContainerLayout = function TacContainerLayout(_ref) {
6420
6803
  padding: '0 2px',
6421
6804
  marginLeft: '-2px'
6422
6805
  }),
6423
- children: [jsx(Typography, {
6806
+ children: [/*#__PURE__*/jsx(Typography, {
6424
6807
  component: "span",
6425
6808
  "data-testid": "tafLocation",
6426
6809
  sx: {
@@ -6428,7 +6811,7 @@ var TacContainerLayout = function TacContainerLayout(_ref) {
6428
6811
  color: 'geowebColors.captions.captionInformation.rgba'
6429
6812
  },
6430
6813
  children: location
6431
- }), jsx(Typography, {
6814
+ }), /*#__PURE__*/jsx(Typography, {
6432
6815
  component: "span",
6433
6816
  "data-testid": "tafLocationLabel",
6434
6817
  sx: {
@@ -6439,7 +6822,7 @@ var TacContainerLayout = function TacContainerLayout(_ref) {
6439
6822
  })]
6440
6823
  })]
6441
6824
  }), exportBtnSlot]
6442
- }), jsx(Box, {
6825
+ }), /*#__PURE__*/jsx(Box, {
6443
6826
  sx: {
6444
6827
  fontSize: '12px',
6445
6828
  letterSpacing: '0.4px',
@@ -6450,9 +6833,26 @@ var TacContainerLayout = function TacContainerLayout(_ref) {
6450
6833
  });
6451
6834
  };
6452
6835
 
6836
+ /* *
6837
+ * Licensed under the Apache License, Version 2.0 (the "License");
6838
+ * you may not use this file except in compliance with the License.
6839
+ * You may obtain a copy of the License at
6840
+ *
6841
+ * http://www.apache.org/licenses/LICENSE-2.0
6842
+ *
6843
+ * Unless required by applicable law or agreed to in writing, software
6844
+ * distributed under the License is distributed on an "AS IS" BASIS,
6845
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6846
+ * See the License for the specific language governing permissions and
6847
+ * limitations under the License.
6848
+ *
6849
+ * Copyright 2025 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6850
+ * Copyright 2025 - Finnish Meteorological Institute (FMI)
6851
+ * Copyright 2025 - The Norwegian Meteorological Institute (MET Norway)
6852
+ * */
6453
6853
  var Message = function Message(_ref) {
6454
6854
  var text = _ref.text;
6455
- return jsx(Typography, {
6855
+ return /*#__PURE__*/jsx(Typography, {
6456
6856
  sx: {
6457
6857
  fontSize: '12px',
6458
6858
  fontWeight: 'normal',
@@ -6482,12 +6882,12 @@ var AutoTaf = function AutoTaf(_ref2) {
6482
6882
  var renderAutoTaf = function renderAutoTaf(tafList) {
6483
6883
  var autoTafLocations = getAutoTafLocations(tafConfig == null ? void 0 : tafConfig.autoTAFlocations);
6484
6884
  if (!autoTafLocations) {
6485
- return jsx(Message, {
6885
+ return /*#__PURE__*/jsx(Message, {
6486
6886
  text: t('autotaf-no-config')
6487
6887
  });
6488
6888
  }
6489
6889
  if (tafList.length === 0) {
6490
- return jsx(Message, {
6890
+ return /*#__PURE__*/jsx(Message, {
6491
6891
  text: t('autotaf-no-data')
6492
6892
  });
6493
6893
  }
@@ -6496,23 +6896,23 @@ var AutoTaf = function AutoTaf(_ref2) {
6496
6896
  return tafFromBackend.taf.location === tafLocation;
6497
6897
  });
6498
6898
  if (foundLocation) {
6499
- return jsx(TacContainer, {
6899
+ return /*#__PURE__*/jsx(TacContainer, {
6500
6900
  isActive: foundLocation.taf.location === (activeTaf == null ? void 0 : activeTaf.taf.location),
6501
6901
  isFormDisabled: isFormDisabled,
6502
6902
  taf: foundLocation.taf
6503
6903
  }, tafLocation);
6504
6904
  }
6505
- return jsx(TacContainerLayout, {
6905
+ return /*#__PURE__*/jsx(TacContainerLayout, {
6506
6906
  isActive: tafLocation === (activeTaf == null ? void 0 : activeTaf.taf.location),
6507
6907
  location: tafLocation,
6508
- children: jsx(TacHighLight, {
6908
+ children: /*#__PURE__*/jsx(TacHighLight, {
6509
6909
  isActive: tafLocation === (activeTaf == null ? void 0 : activeTaf.taf.location),
6510
6910
  children: t('autotaf-no-location')
6511
6911
  })
6512
6912
  }, tafLocation);
6513
6913
  });
6514
6914
  };
6515
- return jsxs(Card, {
6915
+ return /*#__PURE__*/jsxs(Card, {
6516
6916
  "data-testid": "autotaf",
6517
6917
  sx: {
6518
6918
  my: 1,
@@ -6525,12 +6925,12 @@ var AutoTaf = function AutoTaf(_ref2) {
6525
6925
  }
6526
6926
  },
6527
6927
  variant: "outlined",
6528
- children: [jsx(TafHeader, {
6928
+ children: [/*#__PURE__*/jsx(TafHeader, {
6529
6929
  sx: {
6530
6930
  textTransform: 'uppercase'
6531
6931
  },
6532
6932
  title: t('autotaf')
6533
- }), jsx(Box, {
6933
+ }), /*#__PURE__*/jsx(Box, {
6534
6934
  ref: scrollRef,
6535
6935
  sx: {
6536
6936
  padding: {
@@ -6546,6 +6946,23 @@ var AutoTaf = function AutoTaf(_ref2) {
6546
6946
  });
6547
6947
  };
6548
6948
 
6949
+ /* *
6950
+ * Licensed under the Apache License, Version 2.0 (the "License");
6951
+ * you may not use this file except in compliance with the License.
6952
+ * You may obtain a copy of the License at
6953
+ *
6954
+ * http://www.apache.org/licenses/LICENSE-2.0
6955
+ *
6956
+ * Unless required by applicable law or agreed to in writing, software
6957
+ * distributed under the License is distributed on an "AS IS" BASIS,
6958
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6959
+ * See the License for the specific language governing permissions and
6960
+ * limitations under the License.
6961
+ *
6962
+ * Copyright 2023 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
6963
+ * Copyright 2023 - Finnish Meteorological Institute (FMI)
6964
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
6965
+ * */
6549
6966
  var TacOverviewMobile = function TacOverviewMobile(_ref) {
6550
6967
  var upcomingTafs = _ref.upcomingTafs,
6551
6968
  currentTafs = _ref.currentTafs,
@@ -6562,8 +6979,8 @@ var TacOverviewMobile = function TacOverviewMobile(_ref) {
6562
6979
  var onClose = function onClose() {
6563
6980
  return setIsOpen(false);
6564
6981
  };
6565
- return jsxs(Fragment, {
6566
- children: [jsx(CustomIconButton, {
6982
+ return /*#__PURE__*/jsxs(Fragment, {
6983
+ children: [/*#__PURE__*/jsx(CustomIconButton, {
6567
6984
  "data-testid": "tac-overview-mobile-button",
6568
6985
  isSelected: isOpen,
6569
6986
  onClick: function onClick() {
@@ -6579,8 +6996,8 @@ var TacOverviewMobile = function TacOverviewMobile(_ref) {
6579
6996
  top: '42px'
6580
6997
  },
6581
6998
  variant: "tool",
6582
- children: jsx(ListItem, {})
6583
- }), jsxs(CustomDialog, {
6999
+ children: /*#__PURE__*/jsx(ListItem, {})
7000
+ }), /*#__PURE__*/jsxs(CustomDialog, {
6584
7001
  "data-testid": "tac-overview-mobile",
6585
7002
  fullWidth: true,
6586
7003
  hasLayout: false,
@@ -6590,18 +7007,18 @@ var TacOverviewMobile = function TacOverviewMobile(_ref) {
6590
7007
  sx: {
6591
7008
  height: '100%'
6592
7009
  },
6593
- children: [jsx(ToolHeader, {
7010
+ children: [/*#__PURE__*/jsx(ToolHeader, {
6594
7011
  isDraggable: false,
6595
7012
  onClose: onClose,
6596
7013
  size: "small",
6597
7014
  title: t('tac-overview')
6598
- }), jsx(TacOverview, {
7015
+ }), /*#__PURE__*/jsx(TacOverview, {
6599
7016
  activeTaf: activeTaf,
6600
7017
  currentTafs: currentTafs,
6601
7018
  expiredTafs: expiredTafs,
6602
7019
  hideTitle: true,
6603
7020
  upcomingTafs: upcomingTafs
6604
- }), !!autoTafs && jsx(AutoTaf, {
7021
+ }), !!autoTafs && /*#__PURE__*/jsx(AutoTaf, {
6605
7022
  activeTaf: activeTaf,
6606
7023
  tafList: autoTafs
6607
7024
  })]
@@ -6609,11 +7026,29 @@ var TacOverviewMobile = function TacOverviewMobile(_ref) {
6609
7026
  });
6610
7027
  };
6611
7028
 
7029
+ /* *
7030
+ * Licensed under the Apache License, Version 2.0 (the "License");
7031
+ * you may not use this file except in compliance with the License.
7032
+ * You may obtain a copy of the License at
7033
+ *
7034
+ * http://www.apache.org/licenses/LICENSE-2.0
7035
+ *
7036
+ * Unless required by applicable law or agreed to in writing, software
7037
+ * distributed under the License is distributed on an "AS IS" BASIS,
7038
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7039
+ * See the License for the specific language governing permissions and
7040
+ * limitations under the License.
7041
+ *
7042
+ * Copyright 2021 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7043
+ * Copyright 2021 - Finnish Meteorological Institute (FMI)
7044
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7045
+ * */
7046
+
6612
7047
  var Spinner = function Spinner(props) {
6613
- return jsx(Backdrop, Object.assign({
7048
+ return /*#__PURE__*/jsx(Backdrop, Object.assign({
6614
7049
  open: true
6615
7050
  }, props, {
6616
- children: jsx(CircularProgress, {
7051
+ children: /*#__PURE__*/jsx(CircularProgress, {
6617
7052
  color: "inherit",
6618
7053
  "data-testid": "spinner"
6619
7054
  })
@@ -6727,29 +7162,29 @@ var TafPanel = function TafPanel(_ref) {
6727
7162
  return _ref4.apply(this, arguments);
6728
7163
  };
6729
7164
  }();
6730
- return jsxs(TabPanel, {
7165
+ return /*#__PURE__*/jsxs(TabPanel, {
6731
7166
  "data-testid": "taf-panel" + (activeTafIndex === index ? '-active' : ''),
6732
7167
  index: index,
6733
7168
  value: activeTafIndex,
6734
- children: [jsx(TafHeader, {
7169
+ children: [/*#__PURE__*/jsx(TafHeader, {
6735
7170
  sx: {
6736
7171
  marginBottom: '4px'
6737
7172
  },
6738
7173
  title: getTafStatusLabel(t, tafFromBackend.taf.status, tafAction, isFormDisabled)
6739
- }), isLoading ? jsx(Spinner, {
7174
+ }), isLoading ? /*#__PURE__*/jsx(Spinner, {
6740
7175
  "data-testid": "taf-loading",
6741
7176
  sx: {
6742
7177
  position: 'absolute',
6743
7178
  zIndex: 1,
6744
7179
  color: 'geowebColors.backdrops.white.fill'
6745
7180
  }
6746
- }) : null, error ? jsx(AlertBanner, {
7181
+ }) : null, error ? /*#__PURE__*/jsx(AlertBanner, {
6747
7182
  dataTestId: "taf-error",
6748
7183
  info: error.message,
6749
7184
  severity: severity,
6750
7185
  shouldClose: true,
6751
7186
  title: error.title
6752
- }) : null, jsx(Box, {
7187
+ }) : null, /*#__PURE__*/jsx(Box, {
6753
7188
  sx: {
6754
7189
  marginTop: {
6755
7190
  xs: '44px',
@@ -6757,7 +7192,7 @@ var TafPanel = function TafPanel(_ref) {
6757
7192
  },
6758
7193
  padding: 1
6759
7194
  },
6760
- children: jsx(TafForm, {
7195
+ children: /*#__PURE__*/jsx(TafForm, {
6761
7196
  isDisabled: isFormDisabled,
6762
7197
  isIssuesPaneOpen: isIssuesPaneOpen,
6763
7198
  onFormAction: onTafAction,
@@ -6772,6 +7207,23 @@ var TafPanel = function TafPanel(_ref) {
6772
7207
  });
6773
7208
  };
6774
7209
 
7210
+ /* *
7211
+ * Licensed under the Apache License, Version 2.0 (the "License");
7212
+ * you may not use this file except in compliance with the License.
7213
+ * You may obtain a copy of the License at
7214
+ *
7215
+ * http://www.apache.org/licenses/LICENSE-2.0
7216
+ *
7217
+ * Unless required by applicable law or agreed to in writing, software
7218
+ * distributed under the License is distributed on an "AS IS" BASIS,
7219
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7220
+ * See the License for the specific language governing permissions and
7221
+ * limitations under the License.
7222
+ *
7223
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7224
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7225
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7226
+ * */
6775
7227
  var TopTabs = function TopTabs(_ref) {
6776
7228
  var timeSlot = _ref.timeSlot,
6777
7229
  tafFromBackend = _ref.tafFromBackend,
@@ -6797,14 +7249,14 @@ var TopTabs = function TopTabs(_ref) {
6797
7249
  var onChangeTab = function onChangeTab(_event, newValue) {
6798
7250
  onChangeTimeSlot(tabs[newValue].timeSlot, isDirty);
6799
7251
  };
6800
- return jsx(Tabs, {
7252
+ return /*#__PURE__*/jsx(Tabs, {
6801
7253
  "aria-label": "timeslot-tabs",
6802
7254
  "data-testid": "timeslot-tabs",
6803
7255
  onChange: onChangeTab,
6804
7256
  value: activeTab,
6805
7257
  variant: "fullWidth",
6806
7258
  children: tabs.map(function (tab, index) {
6807
- return jsx(Tab, Object.assign({
7259
+ return /*#__PURE__*/jsx(Tab, Object.assign({
6808
7260
  "data-testid": "toptab-" + index,
6809
7261
  label: tab.title,
6810
7262
  sx: {
@@ -6815,11 +7267,28 @@ var TopTabs = function TopTabs(_ref) {
6815
7267
  });
6816
7268
  };
6817
7269
 
7270
+ /* *
7271
+ * Licensed under the Apache License, Version 2.0 (the "License");
7272
+ * you may not use this file except in compliance with the License.
7273
+ * You may obtain a copy of the License at
7274
+ *
7275
+ * http://www.apache.org/licenses/LICENSE-2.0
7276
+ *
7277
+ * Unless required by applicable law or agreed to in writing, software
7278
+ * distributed under the License is distributed on an "AS IS" BASIS,
7279
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7280
+ * See the License for the specific language governing permissions and
7281
+ * limitations under the License.
7282
+ *
7283
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7284
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7285
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7286
+ * */
6818
7287
  var IssuesPaneWrapper = function IssuesPaneWrapper(props) {
6819
7288
  var _useFormContext = useFormContext(),
6820
7289
  errors = _useFormContext.formState.errors;
6821
7290
  var errorList = filterDuplicateErrors(getErrors(errors));
6822
- return jsx(IssuesPane, Object.assign({
7291
+ return /*#__PURE__*/jsx(IssuesPane, Object.assign({
6823
7292
  errorList: errorList
6824
7293
  }, props));
6825
7294
  };
@@ -7048,6 +7517,7 @@ var TafLayout = function TafLayout(_ref) {
7048
7517
  var updatedLocations = timeSlot === 'ACTIVE' ? newSortedTafs.current : newSortedTafs.upcoming;
7049
7518
  updateSortedTafs(sortTafTimeSlots(tafList, tafConfig));
7050
7519
  setLocations(updatedLocations);
7520
+
7051
7521
  // update active index
7052
7522
  var previousActiveLocationUUID = (_locations$activeTafI = locations[activeTafIndex]) == null || (_locations$activeTafI = _locations$activeTafI.taf) == null ? void 0 : _locations$activeTafI.uuid;
7053
7523
  var newTafLocationIndex = getNewTafLocationIndex(updatedLocations, previousActiveLocationUUID);
@@ -7068,8 +7538,8 @@ var TafLayout = function TafLayout(_ref) {
7068
7538
  return null;
7069
7539
  }
7070
7540
  var activeTaf = locations[activeTafIndex];
7071
- return jsxs(Fragment, {
7072
- children: [jsx(Box, {
7541
+ return /*#__PURE__*/jsxs(Fragment, {
7542
+ children: [/*#__PURE__*/jsx(Box, {
7073
7543
  component: "div",
7074
7544
  id: MODAL_DIALOG_ELEMENT,
7075
7545
  sx: {
@@ -7079,12 +7549,12 @@ var TafLayout = function TafLayout(_ref) {
7079
7549
  overflow: 'hidden',
7080
7550
  pointerEvents: 'none'
7081
7551
  }
7082
- }), jsx(Box, {
7552
+ }), /*#__PURE__*/jsx(Box, {
7083
7553
  sx: {
7084
7554
  height: '100%',
7085
7555
  maxHeight: '100%'
7086
7556
  },
7087
- children: jsxs(Box, {
7557
+ children: /*#__PURE__*/jsxs(Box, {
7088
7558
  sx: {
7089
7559
  minWidth: 320,
7090
7560
  margin: 'auto',
@@ -7092,35 +7562,35 @@ var TafLayout = function TafLayout(_ref) {
7092
7562
  display: 'flex',
7093
7563
  flexDirection: 'column'
7094
7564
  },
7095
- children: [jsxs(Grid, {
7565
+ children: [/*#__PURE__*/jsxs(Grid, {
7096
7566
  container: true,
7097
7567
  spacing: 2,
7098
7568
  sx: {
7099
7569
  paddingLeft: 1,
7100
7570
  paddingRight: 1
7101
7571
  },
7102
- children: [jsx(Grid, {
7572
+ children: [/*#__PURE__*/jsx(Grid, {
7103
7573
  size: {
7104
7574
  xs: 12,
7105
7575
  sm: 9
7106
7576
  },
7107
- children: jsx(TopTabs, {
7577
+ children: /*#__PURE__*/jsx(TopTabs, {
7108
7578
  onChangeTimeSlot: onChangeTimeSlot,
7109
7579
  tafFromBackend: lastCurrentTaf,
7110
7580
  timeSlot: timeSlot
7111
7581
  })
7112
- }), jsx(Grid, {
7582
+ }), /*#__PURE__*/jsx(Grid, {
7113
7583
  size: {
7114
7584
  xs: 12,
7115
7585
  sm: 3
7116
7586
  },
7117
- children: lastUpdateTime ? jsx(LastUpdateTime, {
7587
+ children: lastUpdateTime ? /*#__PURE__*/jsx(LastUpdateTime, {
7118
7588
  dataTestId: "lastupdated-time",
7119
7589
  lastUpdateTime: lastUpdateTime,
7120
7590
  onPressRefresh: onUpdateTaf
7121
7591
  }) : null
7122
7592
  })]
7123
- }), jsxs(Grid, {
7593
+ }), /*#__PURE__*/jsxs(Grid, {
7124
7594
  container: true,
7125
7595
  spacing: 2,
7126
7596
  sx: {
@@ -7130,27 +7600,27 @@ var TafLayout = function TafLayout(_ref) {
7130
7600
  paddingTop: 2,
7131
7601
  overflow: 'auto'
7132
7602
  },
7133
- children: [jsx(Grid, {
7603
+ children: [/*#__PURE__*/jsx(Grid, {
7134
7604
  size: {
7135
7605
  xs: 3,
7136
7606
  sm: 1
7137
7607
  },
7138
- children: jsx(LocationTabs, {
7608
+ children: /*#__PURE__*/jsx(LocationTabs, {
7139
7609
  activeIndex: activeTafIndex,
7140
7610
  onChangeTab: onChangeLocationTab,
7141
7611
  tafList: locations,
7142
7612
  timeSlot: timeSlot
7143
7613
  })
7144
- }), jsx(Grid, {
7614
+ }), /*#__PURE__*/jsx(Grid, {
7145
7615
  size: "grow",
7146
- children: jsxs(Card, {
7616
+ children: /*#__PURE__*/jsxs(Card, {
7147
7617
  sx: {
7148
7618
  marginBottom: '12px',
7149
7619
  position: 'relative',
7150
7620
  minHeight: locations.length * 62 + 32
7151
7621
  },
7152
7622
  variant: "outlined",
7153
- children: [jsx(TacOverviewMobile, Object.assign({
7623
+ children: [/*#__PURE__*/jsx(TacOverviewMobile, Object.assign({
7154
7624
  activeTaf: activeTaf,
7155
7625
  currentTafs: current,
7156
7626
  expiredTafs: expired,
@@ -7158,7 +7628,7 @@ var TafLayout = function TafLayout(_ref) {
7158
7628
  }, isAutoTafEnabled && {
7159
7629
  autoTafs: autoTafList
7160
7630
  })), locations.length > 0 ? locations.map(function (tafFromBackend, index) {
7161
- return jsx(TafPanel, {
7631
+ return /*#__PURE__*/jsx(TafPanel, {
7162
7632
  activeTafIndex: activeTafIndex,
7163
7633
  error: error,
7164
7634
  index: index,
@@ -7174,7 +7644,7 @@ var TafLayout = function TafLayout(_ref) {
7174
7644
  tafAction: tafAction,
7175
7645
  tafFromBackend: tafFromBackend
7176
7646
  }, tafFromBackend.taf.uuid);
7177
- }) : jsx(Typography, {
7647
+ }) : /*#__PURE__*/jsx(Typography, {
7178
7648
  sx: {
7179
7649
  margin: 1
7180
7650
  },
@@ -7182,7 +7652,7 @@ var TafLayout = function TafLayout(_ref) {
7182
7652
  children: t('no-locations-message')
7183
7653
  })]
7184
7654
  })
7185
- }), jsxs(Grid, {
7655
+ }), /*#__PURE__*/jsxs(Grid, {
7186
7656
  size: {
7187
7657
  xs: 0,
7188
7658
  sm: 3
@@ -7196,13 +7666,13 @@ var TafLayout = function TafLayout(_ref) {
7196
7666
  display: 'flex',
7197
7667
  flexDirection: 'column'
7198
7668
  }),
7199
- children: [jsx(TacOverview, {
7669
+ children: [/*#__PURE__*/jsx(TacOverview, {
7200
7670
  activeTaf: activeTaf,
7201
7671
  currentTafs: current,
7202
7672
  expiredTafs: expired,
7203
7673
  isFormDisabled: isFormDisabled,
7204
7674
  upcomingTafs: upcoming
7205
- }), isAutoTafEnabled ? jsx(AutoTaf, {
7675
+ }), isAutoTafEnabled ? /*#__PURE__*/jsx(AutoTaf, {
7206
7676
  activeTaf: activeTaf,
7207
7677
  isFormDisabled: isFormDisabled,
7208
7678
  tafList: autoTafList
@@ -7210,7 +7680,7 @@ var TafLayout = function TafLayout(_ref) {
7210
7680
  })]
7211
7681
  })]
7212
7682
  })
7213
- }), jsx(IssuesPaneWrapper, {
7683
+ }), /*#__PURE__*/jsx(IssuesPaneWrapper, {
7214
7684
  handleClose: onCloseIssuesPane,
7215
7685
  isOpen: isIssuesPaneOpen,
7216
7686
  onUserHasDragged: onUserHasDragged,
@@ -7223,7 +7693,7 @@ var _excluded$1 = ["children"];
7223
7693
  var TafWrapper = function TafWrapper(_ref) {
7224
7694
  var children = _ref.children,
7225
7695
  props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
7226
- return jsx(ReactHookFormProvider, {
7696
+ return /*#__PURE__*/jsx(ReactHookFormProvider, {
7227
7697
  options: {
7228
7698
  mode: 'onTouched',
7229
7699
  reValidateMode: 'onChange',
@@ -7246,7 +7716,7 @@ var TafWrapper = function TafWrapper(_ref) {
7246
7716
  IS_DRAFT: false
7247
7717
  }
7248
7718
  },
7249
- children: jsx(TafModuleProvider, Object.assign({}, props, {
7719
+ children: /*#__PURE__*/jsx(TafModuleProvider, Object.assign({}, props, {
7250
7720
  children: children
7251
7721
  }))
7252
7722
  });
@@ -7295,21 +7765,21 @@ var TafModule = function TafModule(_ref) {
7295
7765
  setErrorMessage(null);
7296
7766
  }
7297
7767
  }, [t, tafListError]);
7298
- return jsx(ResponsiveWrapper, {
7299
- children: jsxs(Box, {
7768
+ return /*#__PURE__*/jsx(ResponsiveWrapper, {
7769
+ children: /*#__PURE__*/jsxs(Box, {
7300
7770
  component: "div",
7301
7771
  "data-testid": "tafmodule",
7302
7772
  id: "tafmodule",
7303
7773
  sx: {
7304
7774
  height: '100%'
7305
7775
  },
7306
- children: [isFetching ? jsx(LinearProgress$1, {
7776
+ children: [isFetching ? /*#__PURE__*/jsx(LinearProgress$1, {
7307
7777
  color: "secondary",
7308
7778
  "data-testid": "loading-bar",
7309
7779
  sx: {
7310
7780
  marginBottom: '-4px'
7311
7781
  }
7312
- }) : null, errorMessage ? jsx(AlertBanner, {
7782
+ }) : null, errorMessage ? /*#__PURE__*/jsx(AlertBanner, {
7313
7783
  actionButtonProps: {
7314
7784
  title: t('error-title-retry'),
7315
7785
  onClick: onUpdateTaf
@@ -7318,7 +7788,7 @@ var TafModule = function TafModule(_ref) {
7318
7788
  info: errorMessage.info,
7319
7789
  severity: "error",
7320
7790
  title: errorMessage.title
7321
- }) : null, jsx(TafLayout, {
7791
+ }) : null, /*#__PURE__*/jsx(TafLayout, {
7322
7792
  isAutoTafEnabled: isAutoTafEnabled,
7323
7793
  lastUpdateTime: lastUpdateTime,
7324
7794
  onUpdateTaf: onUpdateTaf,
@@ -7333,10 +7803,10 @@ var Wrapper = function Wrapper(_ref3) {
7333
7803
  _ref3$type = _ref3.type,
7334
7804
  type = _ref3$type === void 0 ? 'TAF' : _ref3$type,
7335
7805
  props = _objectWithoutPropertiesLoose(_ref3, _excluded);
7336
- return jsx(TafWrapper, Object.assign({}, props, {
7337
- children: jsx(TafConfigWrapper, {
7806
+ return /*#__PURE__*/jsx(TafWrapper, Object.assign({}, props, {
7807
+ children: /*#__PURE__*/jsx(TafConfigWrapper, {
7338
7808
  type: type,
7339
- children: jsx(TafModule, {
7809
+ children: /*#__PURE__*/jsx(TafModule, {
7340
7810
  isAutoTafEnabled: isAutoTafEnabled,
7341
7811
  type: type
7342
7812
  })
@@ -7344,6 +7814,23 @@ var Wrapper = function Wrapper(_ref3) {
7344
7814
  }));
7345
7815
  };
7346
7816
 
7817
+ /* *
7818
+ * Licensed under the Apache License, Version 2.0 (the "License");
7819
+ * you may not use this file except in compliance with the License.
7820
+ * You may obtain a copy of the License at
7821
+ *
7822
+ * http://www.apache.org/licenses/LICENSE-2.0
7823
+ *
7824
+ * Unless required by applicable law or agreed to in writing, software
7825
+ * distributed under the License is distributed on an "AS IS" BASIS,
7826
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7827
+ * See the License for the specific language governing permissions and
7828
+ * limitations under the License.
7829
+ *
7830
+ * Copyright 2022 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7831
+ * Copyright 2022 - Finnish Meteorological Institute (FMI)
7832
+ * Copyright 2024 - The Norwegian Meteorological Institute (MET Norway)
7833
+ * */
7347
7834
  var tafScreenPreset = {
7348
7835
  id: 'screenConfigTaf',
7349
7836
  title: 'TAF',
@@ -7360,12 +7847,15 @@ var tafScreenPreset = {
7360
7847
  syncGroups: [],
7361
7848
  mosaicNode: 'taf'
7362
7849
  };
7850
+
7851
+ // base type for connected modules
7852
+
7363
7853
  var TafApiWrapper = function TafApiWrapper(_ref) {
7364
7854
  var config = _ref.config,
7365
7855
  onPreventCloseView = _ref.onPreventCloseView,
7366
7856
  initialProps = _ref.initialProps;
7367
- return config ? jsx(ErrorBoundary, {
7368
- children: jsx(Wrapper, {
7857
+ return config ? /*#__PURE__*/jsx(ErrorBoundary, {
7858
+ children: /*#__PURE__*/jsx(Wrapper, {
7369
7859
  isAutoTafEnabled: initialProps == null ? void 0 : initialProps.isAutoTafEnabled,
7370
7860
  onPreventCloseView: onPreventCloseView,
7371
7861
  type: initialProps == null ? void 0 : initialProps.type
@@ -7387,10 +7877,10 @@ ConnectedModuleWrapper) {
7387
7877
  switch (componentType) {
7388
7878
  case 'TafModule':
7389
7879
  if (ConnectedModuleWrapper) {
7390
- return jsx(ConnectedModuleWrapper, {
7880
+ return /*#__PURE__*/jsx(ConnectedModuleWrapper, {
7391
7881
  auth: auth,
7392
7882
  component: function component(props) {
7393
- return jsx(TafApiWrapper, Object.assign({}, props, {
7883
+ return /*#__PURE__*/jsx(TafApiWrapper, Object.assign({}, props, {
7394
7884
  initialProps: initialProps
7395
7885
  }));
7396
7886
  },
@@ -7400,7 +7890,7 @@ ConnectedModuleWrapper) {
7400
7890
  payload: payload
7401
7891
  });
7402
7892
  }
7403
- return jsx(TafApiWrapper, {
7893
+ return /*#__PURE__*/jsx(TafApiWrapper, {
7404
7894
  auth: auth,
7405
7895
  config: config,
7406
7896
  "data-testid": "tafmodule",
@@ -7412,6 +7902,24 @@ ConnectedModuleWrapper) {
7412
7902
  }
7413
7903
  };
7414
7904
 
7905
+ /* *
7906
+ * Licensed under the Apache License, Version 2.0 (the "License");
7907
+ * you may not use this file except in compliance with the License.
7908
+ * You may obtain a copy of the License at
7909
+ *
7910
+ * http://www.apache.org/licenses/LICENSE-2.0
7911
+ *
7912
+ * Unless required by applicable law or agreed to in writing, software
7913
+ * distributed under the License is distributed on an "AS IS" BASIS,
7914
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
7915
+ * See the License for the specific language governing permissions and
7916
+ * limitations under the License.
7917
+ *
7918
+ * Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
7919
+ * Copyright 2026 - Finnish Meteorological Institute (FMI)
7920
+ * Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
7921
+ * */
7922
+
7415
7923
  var fakeTafConfig = {
7416
7924
  type: 'TAF',
7417
7925
  location_indicator_mwo: 'EHDB',
@@ -8539,6 +9047,7 @@ var fakeDraftAmendmentTaf = {
8539
9047
  }]
8540
9048
  }
8541
9049
  };
9050
+
8542
9051
  // Filter out the changegroups for testing purposes as the valid times get adjusted
8543
9052
  var _fakeDraftAmendmentTa = fakeDraftAmendmentTaf.taf;
8544
9053
  _fakeDraftAmendmentTa.changeGroups;
@@ -8561,6 +9070,7 @@ var _fakeDraftAmendmentTa = fakeDraftAmendmentTaf.taf;
8561
9070
  })
8562
9071
  })
8563
9072
  });
9073
+
8564
9074
  // Use as the original previous TAF for TAF above
8565
9075
  ({
8566
9076
  taf: Object.assign({}, fakeDraftAmendmentWithoutChangeGroups, {
@@ -8622,6 +9132,7 @@ var fakeAmendmentTaf = {
8622
9132
  }
8623
9133
  }
8624
9134
  };
9135
+
8625
9136
  // Only use for display purposes in the list!
8626
9137
  ({
8627
9138
  taf: Object.assign({}, fakeAmendmentTaf.taf, {
@@ -8641,6 +9152,24 @@ var fakeAmendmentTaf = {
8641
9152
  })
8642
9153
  });
8643
9154
 
9155
+ /* *
9156
+ * Licensed under the Apache License, Version 2.0 (the "License");
9157
+ * you may not use this file except in compliance with the License.
9158
+ * You may obtain a copy of the License at
9159
+ *
9160
+ * http://www.apache.org/licenses/LICENSE-2.0
9161
+ *
9162
+ * Unless required by applicable law or agreed to in writing, software
9163
+ * distributed under the License is distributed on an "AS IS" BASIS,
9164
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9165
+ * See the License for the specific language governing permissions and
9166
+ * limitations under the License.
9167
+ *
9168
+ * Copyright 2026 - Koninklijk Nederlands Meteorologisch Instituut (KNMI)
9169
+ * Copyright 2026 - Finnish Meteorological Institute (FMI)
9170
+ * Copyright 2026 - The Norwegian Meteorological Institute (MET Norway)
9171
+ * */
9172
+
8644
9173
  var fakeNafConfig = {
8645
9174
  type: 'NAF',
8646
9175
  location_indicator_mwo: 'EHAK',
@@ -8751,6 +9280,7 @@ function withLocationDates(location, cb) {
8751
9280
  currentIndex = locationConfig.valid_start_times.length - 1;
8752
9281
  }
8753
9282
  var upcomingIndex = (currentIndex + 1) % locationConfig.valid_start_times.length;
9283
+
8754
9284
  // If upcoming start time is earlier than or equal to current start time, we've wrapped to the next day
8755
9285
  var upcomingWrapsToNextDay = locationConfig.valid_start_times[upcomingIndex] <= locationConfig.valid_start_times[currentIndex];
8756
9286
  var _getDateRange = getDateRange(locationConfig, currentIndex, currentIsYesterday ? -1 : 0),