@corva/ui 3.77.0-5 → 3.77.0-7

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 (650) hide show
  1. package/README.md +2 -2
  2. package/cjs-bundle/clients/jsonApi/index.js +1 -1
  3. package/cjs-bundle/clients/jsonApi/index.js.map +1 -1
  4. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  5. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  6. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  7. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  8. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  9. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  10. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js +1 -1
  11. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  12. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  13. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  14. package/cjs-bundle/components/Attachment/index.js +1 -1
  15. package/cjs-bundle/components/Attachment/index.js.map +1 -1
  16. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  17. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  18. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  19. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  20. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  21. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  22. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  23. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  24. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  25. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  26. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  27. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  28. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  29. package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
  30. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  31. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  32. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  33. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  34. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  35. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  36. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  37. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  38. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  39. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  40. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  41. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  42. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  43. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  44. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  45. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  46. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  47. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  48. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  49. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  50. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  51. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  52. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  53. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  54. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  55. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  56. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  57. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  58. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  59. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  60. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  61. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  62. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  63. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  64. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  65. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  66. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  67. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  68. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  69. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  70. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  71. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  72. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  73. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  74. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  75. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  76. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  77. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js +1 -1
  78. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  79. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  80. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  81. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  82. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  83. package/cjs-bundle/components/FeedItem/components/Content.js +1 -1
  84. package/cjs-bundle/components/FeedItem/components/Content.js.map +1 -1
  85. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  86. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  87. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  88. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  89. package/cjs-bundle/components/FilesLoaderV2/utils.js +1 -1
  90. package/cjs-bundle/components/FilesLoaderV2/utils.js.map +1 -1
  91. package/cjs-bundle/components/GradientManager/GradientManager.js +1 -1
  92. package/cjs-bundle/components/GradientManager/GradientManager.js.map +1 -1
  93. package/cjs-bundle/components/GradientManager/GradientSelect.js +1 -1
  94. package/cjs-bundle/components/GradientManager/GradientSelect.js.map +1 -1
  95. package/cjs-bundle/components/InfiniteList/index.js +1 -1
  96. package/cjs-bundle/components/InfiniteList/index.js.map +1 -1
  97. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js +1 -1
  98. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  99. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  100. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  101. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  102. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  103. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  104. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  105. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  106. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  107. package/cjs-bundle/components/OffsetWellPickerV2/constants.js +1 -1
  108. package/cjs-bundle/components/OffsetWellPickerV2/constants.js.map +1 -1
  109. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js +1 -1
  110. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  111. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  112. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  113. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  114. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  115. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  116. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  117. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  118. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  123. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  124. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  125. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  126. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  127. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  128. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  129. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  130. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  131. package/cjs-bundle/components/OffsetWellPickerV3/index.js +1 -1
  132. package/cjs-bundle/components/OffsetWellPickerV3/index.js.map +1 -1
  133. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  134. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  135. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  136. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  137. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  138. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  139. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  140. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  141. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  142. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  143. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  144. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  145. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  146. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  147. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  148. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  149. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  150. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  151. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  152. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  153. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  154. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  155. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  156. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  157. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  158. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  159. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  160. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  161. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  162. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  163. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  164. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  165. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  166. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  167. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  168. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  169. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  170. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  171. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  172. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  173. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  174. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  175. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  176. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  177. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  178. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  179. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  180. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  181. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  182. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  183. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  184. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  185. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  186. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  187. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  188. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  189. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  190. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  191. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  192. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  193. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  194. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  195. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  196. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  197. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  198. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  199. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  200. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  201. package/cjs-bundle/components/OffsetWellPickerV5/constants.js +1 -1
  202. package/cjs-bundle/components/OffsetWellPickerV5/constants.js.map +1 -1
  203. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  204. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  205. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  206. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  207. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  208. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  209. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  210. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  211. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  212. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  213. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  214. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  215. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  216. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  217. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  218. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  219. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  220. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  221. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  222. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  223. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  224. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  225. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  226. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  227. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  228. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  229. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  230. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  231. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  232. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  233. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  234. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  235. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  236. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  237. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  238. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  239. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  240. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  241. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  242. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  243. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  244. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  245. package/cjs-bundle/componentsV2/FilesDropzone/utils.js +1 -1
  246. package/cjs-bundle/componentsV2/FilesDropzone/utils.js.map +1 -1
  247. package/cjs-bundle/componentsV2/FilesLoader/utils.js +1 -1
  248. package/cjs-bundle/componentsV2/FilesLoader/utils.js.map +1 -1
  249. package/cjs-bundle/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  250. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  251. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  252. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  253. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  254. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  255. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  256. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  257. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  258. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  259. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  260. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  261. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  262. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  263. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  264. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  265. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  266. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  267. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  268. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  269. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  270. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  271. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  272. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  273. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  274. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  275. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  276. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  277. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  278. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  279. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  280. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  281. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  282. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  283. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  284. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  285. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  286. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js +1 -1
  287. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  288. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
  289. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  290. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  291. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  292. package/cjs-bundle/constants/notifications.js +1 -1
  293. package/cjs-bundle/constants/notifications.js.map +1 -1
  294. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js +1 -1
  295. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js.map +1 -1
  296. package/cjs-bundle/effects/useSharedDCStore.js +1 -1
  297. package/cjs-bundle/effects/useSharedDCStore.js.map +1 -1
  298. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  299. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  300. package/cjs-bundle/utils/DrillstringUtils.js +1 -1
  301. package/cjs-bundle/utils/DrillstringUtils.js.map +1 -1
  302. package/cjs-bundle/utils/apps.js +1 -1
  303. package/cjs-bundle/utils/apps.js.map +1 -1
  304. package/cjs-bundle/utils/convert.js +1 -1
  305. package/cjs-bundle/utils/convert.js.map +1 -1
  306. package/cjs-bundle/utils/devcenter.js +1 -1
  307. package/cjs-bundle/utils/devcenter.js.map +1 -1
  308. package/cjs-bundle/utils/index.js +1 -1
  309. package/cjs-bundle/utils/index.js.map +1 -1
  310. package/cjs-bundle/utils/lasParser.js +1 -1
  311. package/cjs-bundle/utils/lasParser.js.map +1 -1
  312. package/cjs-bundle/utils/time.js.map +1 -1
  313. package/clients/jsonApi/index.js +1 -1
  314. package/clients/jsonApi/index.js.map +1 -1
  315. package/components/AddComment/Popover.js +1 -1
  316. package/components/AddComment/Popover.js.map +1 -1
  317. package/components/AddComment/components/Content.js +1 -1
  318. package/components/AddComment/components/Content.js.map +1 -1
  319. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  320. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  321. package/components/Annotations/components/AnnotationsList/index.js +1 -1
  322. package/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  323. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  324. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  325. package/components/Attachment/index.js +1 -1
  326. package/components/Attachment/index.js.map +1 -1
  327. package/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  328. package/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  329. package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  330. package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  331. package/components/BICOffsetPickerDialog/index.js +1 -1
  332. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  333. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  334. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  335. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  336. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  337. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  338. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  339. package/components/CollapsableSidebar.js +1 -1
  340. package/components/CollapsableSidebar.js.map +1 -1
  341. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  342. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  343. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  344. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  345. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  346. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  347. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  348. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  349. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  350. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  351. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  352. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  353. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  354. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  355. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.d.ts.map +1 -1
  356. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  357. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  358. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.d.ts.map +1 -1
  359. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  360. package/components/DocumentViewer/DocumentViewer.js +1 -1
  361. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  362. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  363. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  364. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  365. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  366. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  367. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  368. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  369. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  370. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  371. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  372. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  373. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  374. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  375. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  376. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  377. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  378. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  379. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  380. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  381. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  382. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  383. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  384. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  385. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  386. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  387. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  388. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  389. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  390. package/components/EmbeddedApp/EmbeddedApp.d.ts.map +1 -1
  391. package/components/EmbeddedApp/EmbeddedApp.js +1 -1
  392. package/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  393. package/components/FeedItem/FeedItem.js +1 -1
  394. package/components/FeedItem/FeedItem.js.map +1 -1
  395. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  396. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  397. package/components/FeedItem/components/Content.d.ts.map +1 -1
  398. package/components/FeedItem/components/Content.js +1 -1
  399. package/components/FeedItem/components/Content.js.map +1 -1
  400. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.d.ts.map +1 -1
  401. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  402. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  403. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.d.ts.map +1 -1
  404. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  405. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  406. package/components/FilesLoaderV2/utils.js +1 -1
  407. package/components/FilesLoaderV2/utils.js.map +1 -1
  408. package/components/GradientManager/GradientManager.js +1 -1
  409. package/components/GradientManager/GradientManager.js.map +1 -1
  410. package/components/GradientManager/GradientSelect.js +1 -1
  411. package/components/GradientManager/GradientSelect.js.map +1 -1
  412. package/components/InfiniteList/index.d.ts.map +1 -1
  413. package/components/InfiniteList/index.js +1 -1
  414. package/components/InfiniteList/index.js.map +1 -1
  415. package/components/OffsetWellMap/OffsetWellMap.js +1 -1
  416. package/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  417. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  418. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  419. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  420. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  421. package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  422. package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  423. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  424. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  425. package/components/OffsetWellPickerV2/constants.js +1 -1
  426. package/components/OffsetWellPickerV2/constants.js.map +1 -1
  427. package/components/OffsetWellPickerV2/effects/index.js +1 -1
  428. package/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  429. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  430. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  431. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  432. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  433. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  434. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  435. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  436. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  437. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  438. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  439. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  440. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  441. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  442. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  443. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  444. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  445. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  446. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  447. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  448. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  449. package/components/OffsetWellPickerV3/index.js +1 -1
  450. package/components/OffsetWellPickerV3/index.js.map +1 -1
  451. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  452. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  453. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  454. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  455. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  456. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  457. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  458. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  459. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  460. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  461. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  462. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  463. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  464. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  465. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  466. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  467. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  468. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  469. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  470. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  471. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  472. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  473. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  474. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  475. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  476. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  477. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  478. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  479. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  480. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  481. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  482. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  483. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  484. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  485. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  486. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  487. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  488. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  489. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  490. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  491. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  492. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  493. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  494. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  495. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  496. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  497. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  498. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  499. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  500. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  501. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  502. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  503. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  504. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  505. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  506. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  507. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  508. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  509. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  510. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  511. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  512. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  513. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  514. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  515. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  516. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  517. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  518. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  519. package/components/OffsetWellPickerV5/constants.js +1 -1
  520. package/components/OffsetWellPickerV5/constants.js.map +1 -1
  521. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  522. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  523. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  524. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  525. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  526. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  527. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  528. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  529. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  530. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  531. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  532. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  533. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  534. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  535. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.d.ts.map +1 -1
  536. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  537. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  538. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  539. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  540. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  541. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  542. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  543. package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  544. package/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  545. package/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  546. package/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  547. package/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  548. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  549. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  550. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  551. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  552. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  553. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  554. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  555. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  556. package/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  557. package/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  558. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  559. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  560. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  561. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  562. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  563. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  564. package/componentsV2/FilesDropzone/utils.js +1 -1
  565. package/componentsV2/FilesDropzone/utils.js.map +1 -1
  566. package/componentsV2/FilesLoader/utils.js +1 -1
  567. package/componentsV2/FilesLoader/utils.js.map +1 -1
  568. package/componentsV2/IndicatorLive/IndicatorLive.d.ts.map +1 -1
  569. package/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  570. package/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  571. package/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  572. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  573. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  574. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  575. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  576. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  577. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  578. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  579. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  580. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  581. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  582. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  583. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  584. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  585. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  586. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  587. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  588. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  589. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  590. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  591. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  592. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  593. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  594. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  595. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  596. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  597. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  598. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  599. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  600. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  601. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  602. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  603. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  604. package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  605. package/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  606. package/componentsV2/TextInputBase/TextInputBase.js +1 -1
  607. package/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  608. package/componentsV2/TextInputNext/TextInputNext.js +1 -1
  609. package/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  610. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  611. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  612. package/constants/assets.d.ts +40 -1
  613. package/constants/assets.d.ts.map +1 -1
  614. package/constants/bha.d.ts +4 -4
  615. package/constants/notifications.d.ts +5 -2
  616. package/constants/notifications.d.ts.map +1 -1
  617. package/constants/notifications.js +1 -1
  618. package/constants/notifications.js.map +1 -1
  619. package/effects/useGlobalOffsetWellsSync.js +1 -1
  620. package/effects/useGlobalOffsetWellsSync.js.map +1 -1
  621. package/effects/useSharedDCStore.js +1 -1
  622. package/effects/useSharedDCStore.js.map +1 -1
  623. package/mcp-server/server.mjs +49 -91
  624. package/package.json +1 -2
  625. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  626. package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  627. package/tsconfig.tsbuildinfo +1 -1
  628. package/utils/DrillstringUtils.d.ts.map +1 -1
  629. package/utils/DrillstringUtils.js +1 -1
  630. package/utils/DrillstringUtils.js.map +1 -1
  631. package/utils/apps.js +1 -1
  632. package/utils/apps.js.map +1 -1
  633. package/utils/convert.d.ts +0 -19
  634. package/utils/convert.d.ts.map +1 -1
  635. package/utils/convert.js +1 -1
  636. package/utils/convert.js.map +1 -1
  637. package/utils/devcenter.d.ts.map +1 -1
  638. package/utils/devcenter.js +1 -1
  639. package/utils/devcenter.js.map +1 -1
  640. package/utils/index.d.ts +4 -4
  641. package/utils/index.d.ts.map +1 -1
  642. package/utils/index.js +1 -1
  643. package/utils/index.js.map +1 -1
  644. package/utils/lasParser.d.ts.map +1 -1
  645. package/utils/lasParser.js +1 -1
  646. package/utils/lasParser.js.map +1 -1
  647. package/utils/time.d.ts.map +1 -1
  648. package/utils/time.js.map +1 -1
  649. package/utils/HeatmapUtils.d.ts +0 -1
  650. package/utils/HeatmapUtils.d.ts.map +0 -1
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import{useState as n,useEffect as i}from"react";import"lodash";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{fetchCompanyGoals as e}from"../../api/companies/fetchCompanyGoals.js";import{METRICS_LIST as a,MAX_MANUAL_METRICS_COUNT as p}from"../../constants.js";import"../../api/shared/dataFormatter.js";import"../../../../utils/index.js";import{BENCHMARK_METRIC_GOAL as m}from"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import{getCompanyGoalSetting as c}from"../../../../utils/goals.js";var l=new Set(a.map((function(t){return t.key}))),u=function(t){return t.filter((function(t){return l.has(t)}))},f=function(a,l){var f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hole_depth_change",j=n([]),h=o(j,2),d=h[0],b=h[1];return i((function(){function t(){return(t=s(r.mark((function t(){var s,o;return r.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(a);case 2:s=t.sent,o=c(s,m),b(o?u([o]):[]);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}null!==f?l?b(u(l)):a&&function(){t.apply(this,arguments)}():b([])}),[a,l,f]),f&&!d.includes(f)&&b((function(s){return[f].concat(t(s)).slice(0,p+1)})),[d,b]};export{f as useCompanyMetricKey};
1
+ import t from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/regenerator";import{useState as r,useEffect as e}from"react";import"lodash";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{fetchCompanyGoals as n}from"../../api/companies/fetchCompanyGoals.js";import{METRICS_LIST as m,MAX_MANUAL_METRICS_COUNT as p}from"../../constants.js";import"../../api/shared/dataFormatter.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"file-saver";import"query-string";import{BENCHMARK_METRIC_GOAL as a}from"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/drillstring/conversion.js";import"lodash/cloneDeep";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import{getCompanyGoalSetting as l}from"../../../../utils/goals.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";var c=new Set(m.map((function(t){return t.key}))),u=function(t){return t.filter((function(t){return c.has(t)}))},j=function(m,c){var j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hole_depth_change",f=r([]),h=i(f,2),d=h[0],b=h[1];return e((function(){function t(){return(t=s(o.mark((function t(){var s,i;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n(m);case 2:s=t.sent,i=l(s,a),b(i?u([i]):[]);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}null!==j?c?b(u(c)):m&&function(){t.apply(this,arguments)}():b([])}),[m,c,j]),j&&!d.includes(j)&&b((function(s){return[j].concat(t(s)).slice(0,p+1)})),[d,b]};export{j as useCompanyMetricKey};
2
2
  //# sourceMappingURL=useCompanyMetricKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCompanyMetricKey.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.ts"],"sourcesContent":["import { useState, useEffect, type Dispatch, type SetStateAction } from 'react';\n\nimport { fetchCompanyGoals } from '../../api';\nimport { METRICS_LIST, MAX_MANUAL_METRICS_COUNT } from '../../constants';\n\nimport { goals } from '~/utils';\nimport { goals as goalsConstants } from '~/constants';\n\nconst validMetricKeys = new Set(METRICS_LIST.map(m => m.key));\nconst filterValidMetrics = (keys: string[]) => keys.filter(key => validMetricKeys.has(key));\n\nexport const useCompanyMetricKey = (\n companyId: number | undefined,\n savedMetricsKeys: string[] | undefined,\n defaultMetricKey: string | null = 'hole_depth_change'\n): [string[], Dispatch<SetStateAction<string[]>>] => {\n const [metricKeys, setMetricKeys] = useState<string[]>([]);\n\n useEffect(() => {\n if (defaultMetricKey === null) {\n setMetricKeys([]);\n return;\n }\n\n async function handleFetchCompanyMetric() {\n const companyGoals = await fetchCompanyGoals(companyId);\n const companyMetricKey = goals.getCompanyGoalSetting(\n companyGoals,\n goalsConstants.BENCHMARK_METRIC_GOAL\n );\n\n if (companyMetricKey) {\n setMetricKeys(filterValidMetrics([companyMetricKey]));\n } else {\n setMetricKeys([]);\n }\n }\n\n if (savedMetricsKeys) {\n setMetricKeys(filterValidMetrics(savedMetricsKeys));\n } else if (companyId) {\n handleFetchCompanyMetric();\n }\n }, [companyId, savedMetricsKeys, defaultMetricKey]);\n\n if (defaultMetricKey && !metricKeys.includes(defaultMetricKey)) {\n // Total = the always-present default metric + the user's manual picks.\n setMetricKeys(prev => [defaultMetricKey, ...prev].slice(0, MAX_MANUAL_METRICS_COUNT + 1));\n }\n return [metricKeys, setMetricKeys];\n};\n"],"names":["validMetricKeys","Set","METRICS_LIST","map","m","key","filterValidMetrics","keys","filter","has","useCompanyMetricKey","companyId","savedMetricsKeys","defaultMetricKey","useState","_useState2","_slicedToArray","_useState","metricKeys","setMetricKeys","useEffect","_handleFetchCompanyMetric","_asyncToGenerator","_regeneratorRuntime","mark","_callee","companyGoals","companyMetricKey","wrap","_context","prev","next","fetchCompanyGoals","sent","goals","goalsConstants","stop","apply","this","arguments","handleFetchCompanyMetric","includes","slice","MAX_MANUAL_METRICS_COUNT"],"mappings":"4pDAQA,IAAMA,EAAkB,IAAIC,IAAIC,EAAaC,KAAI,SAAAC,GAAC,OAAIA,EAAEC,GAAG,KACrDC,EAAqB,SAACC,GAAc,OAAKA,EAAKC,QAAO,SAAAH,GAAG,OAAIL,EAAgBS,IAAIJ,KAAK,EAE9EK,EAAsB,SACjCC,EACAC,GAEmD,IADnDC,yDAAkC,oBAEEC,EAAAA,EAAmB,IAAGC,EAAAC,EAAAC,EAAA,GAAnDC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAiChC,OA/BAK,GAAU,WAM+B,SAAAC,IAYtC,OAZsCA,EAAvCC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAA,OAAAJ,EAAAK,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EAC6BC,EAAkBrB,GAAU,KAAA,EAAjDe,EAAYG,EAAAI,KACZN,EAAmBO,EACvBR,EACAS,GAIAhB,EADEQ,EACYrB,EAAmB,CAACqB,IAEpB,IACf,KAAA,EAAA,IAAA,MAAA,OAAAE,EAAAO,OAAA,GAAAX,EACF,MAAAY,MAAAC,KAAAC,UAAA,CAjBwB,OAArB1B,EAmBAD,EACFO,EAAcb,EAAmBM,IACxBD,GAlBV,WAEsCU,EAAAgB,MAAAC,KAAAC,UAAA,CAiBrCC,GArBArB,EAAc,GAuBjB,GAAE,CAACR,EAAWC,EAAkBC,IAE7BA,IAAqBK,EAAWuB,SAAS5B,IAE3CM,GAAc,SAAAW,GAAI,MAAI,CAACjB,GAAqBiB,OAAAA,EAAAA,IAAMY,MAAM,EAAGC,EAA2B,MAEjF,CAACzB,EAAYC,EACtB"}
1
+ {"version":3,"file":"useCompanyMetricKey.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.ts"],"sourcesContent":["import { useState, useEffect, type Dispatch, type SetStateAction } from 'react';\n\nimport { fetchCompanyGoals } from '../../api';\nimport { METRICS_LIST, MAX_MANUAL_METRICS_COUNT } from '../../constants';\n\nimport { goals } from '~/utils';\nimport { goals as goalsConstants } from '~/constants';\n\nconst validMetricKeys = new Set(METRICS_LIST.map(m => m.key));\nconst filterValidMetrics = (keys: string[]) => keys.filter(key => validMetricKeys.has(key));\n\nexport const useCompanyMetricKey = (\n companyId: number | undefined,\n savedMetricsKeys: string[] | undefined,\n defaultMetricKey: string | null = 'hole_depth_change'\n): [string[], Dispatch<SetStateAction<string[]>>] => {\n const [metricKeys, setMetricKeys] = useState<string[]>([]);\n\n useEffect(() => {\n if (defaultMetricKey === null) {\n setMetricKeys([]);\n return;\n }\n\n async function handleFetchCompanyMetric() {\n const companyGoals = await fetchCompanyGoals(companyId);\n const companyMetricKey = goals.getCompanyGoalSetting(\n companyGoals,\n goalsConstants.BENCHMARK_METRIC_GOAL\n );\n\n if (companyMetricKey) {\n setMetricKeys(filterValidMetrics([companyMetricKey]));\n } else {\n setMetricKeys([]);\n }\n }\n\n if (savedMetricsKeys) {\n setMetricKeys(filterValidMetrics(savedMetricsKeys));\n } else if (companyId) {\n handleFetchCompanyMetric();\n }\n }, [companyId, savedMetricsKeys, defaultMetricKey]);\n\n if (defaultMetricKey && !metricKeys.includes(defaultMetricKey)) {\n // Total = the always-present default metric + the user's manual picks.\n setMetricKeys(prev => [defaultMetricKey, ...prev].slice(0, MAX_MANUAL_METRICS_COUNT + 1));\n }\n return [metricKeys, setMetricKeys];\n};\n"],"names":["validMetricKeys","Set","METRICS_LIST","map","m","key","filterValidMetrics","keys","filter","has","useCompanyMetricKey","companyId","savedMetricsKeys","defaultMetricKey","useState","_useState2","_slicedToArray","_useState","metricKeys","setMetricKeys","useEffect","_handleFetchCompanyMetric","_asyncToGenerator","_regeneratorRuntime","mark","_callee","companyGoals","companyMetricKey","wrap","_context","prev","next","fetchCompanyGoals","sent","goals","goalsConstants","stop","apply","this","arguments","handleFetchCompanyMetric","includes","slice","MAX_MANUAL_METRICS_COUNT"],"mappings":"4vFAQA,IAAMA,EAAkB,IAAIC,IAAIC,EAAaC,KAAI,SAAAC,GAAC,OAAIA,EAAEC,GAAG,KACrDC,EAAqB,SAACC,GAAc,OAAKA,EAAKC,QAAO,SAAAH,GAAG,OAAIL,EAAgBS,IAAIJ,KAAK,EAE9EK,EAAsB,SACjCC,EACAC,GAEmD,IADnDC,yDAAkC,oBAEEC,EAAAA,EAAmB,IAAGC,EAAAC,EAAAC,EAAA,GAAnDC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAiChC,OA/BAK,GAAU,WAM+B,SAAAC,IAYtC,OAZsCA,EAAvCC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAA,OAAAJ,EAAAK,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EAC6BC,EAAkBrB,GAAU,KAAA,EAAjDe,EAAYG,EAAAI,KACZN,EAAmBO,EACvBR,EACAS,GAIAhB,EADEQ,EACYrB,EAAmB,CAACqB,IAEpB,IACf,KAAA,EAAA,IAAA,MAAA,OAAAE,EAAAO,OAAA,GAAAX,EACF,MAAAY,MAAAC,KAAAC,UAAA,CAjBwB,OAArB1B,EAmBAD,EACFO,EAAcb,EAAmBM,IACxBD,GAlBV,WAEsCU,EAAAgB,MAAAC,KAAAC,UAAA,CAiBrCC,GArBArB,EAAc,GAuBjB,GAAE,CAACR,EAAWC,EAAkBC,IAE7BA,IAAqBK,EAAWuB,SAAS5B,IAE3CM,GAAc,SAAAW,GAAI,MAAI,CAACjB,GAAqBiB,OAAAA,EAAAA,IAAMY,MAAM,EAAGC,EAA2B,MAEjF,CAACzB,EAAYC,EACtB"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useMemo as r,useEffect as o}from"react";import"../../stores/viewport-store/ViewportStoreContext.js";import"../../stores/viewport-store/ViewportStoreProvider.js";import"zustand";import"lodash/isEqual";import{useViewportStore as s}from"../../stores/viewport-store/useViewportStore.js";import{areWellMapsEqual as n}from"../../stores/viewport-store/utils/areWellMapsEqual.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as i}from"../../stores/company-safeguard/useCompanySafeguard.js";import{useFilterStore as l}from"../../stores/filter-store/useFilterStore.js";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import"react/jsx-runtime";import{usePickerPropsStore as a}from"../../stores/picker-props-store/usePickerPropsStore.js";import{ALL_SECTION_KEY as p}from"../../constants.js";import{isDrillingOnlyWell as m}from"../../utils/isDrillingOnlyWell.js";import{isInterventionOnlyWell as u}from"../../utils/isInterventionOnlyWell.js";import{useViewportWells as c}from"../useViewportWells/useViewportWells.js";import{useTileLoading as d}from"../useTileLoading.js";import{usePinnedWells as f}from"../usePinnedWells.js";import{useExternalOffsets as j}from"../useExternalOffsets.js";import"../../stores/idas-resync-store/IdasResyncStoreContext.js";import"../../stores/idas-resync-store/IdasResyncStoreProvider.js";import{useIdasResyncSync as v}from"../../stores/idas-resync-store/useIdasResyncSync.js";import{getSegmentConfig as y}from"../../segment-config/index.js";import{useSearchedWells as g}from"./useSearchedWells.js";import{useCompanyProvider as b}from"./useCompanyProvider.js";import{useFetchSubjectWell as W}from"./useFetchSubjectWell.js";import{useCompanyMetricKey as h}from"./useCompanyMetricKey.js";import{useAdvancedWells as w}from"./useAdvancedWells.js";import{computeIsAllWellsLoaded as S}from"./utils/computeIsAllWellsLoaded.js";import{useInterventionEnrichment as P,enrichWellsWithInterventionData as C}from"./useInterventionEnrichment.js";import{usePadEnrichment as I,enrichWellsWithPadData as O}from"./usePadEnrichment.js";import"../../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/index.js";import"uuid";import"jsona";import"../../../../utils/env.js";import"../../../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../../constants/streamSourceType.js";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppPanel/AppPanelsContext.js";import{useGlobalOffsetWellsSync as A}from"../../../../effects/useGlobalOffsetWellsSync.js";function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function L(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?x(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):x(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var E=function(e){var x,E,V=e.subjectWellId,D=e.assetCompanyId,k=e.offsetSettings,N=e.maxOffsetWellNumber,T=e.isLoadAllWells,K=e.open,M=e.onSave,R=a((function(e){return e.segment})),q="intervention"===R,B=s((function(e){return e.wells}),n),G=s((function(e){return e.bounds})),z=l((function(e){var t;return null===(t=e.filters.drillingWells)||void 0===t||t})),F=l((function(e){var t;return null===(t=e.filters.interventionWells)||void 0===t||t})),H=W(V),J=t(H,1)[0],Q=r((function(){var e,r=null==J||null===(e=J.topHole)||void 0===e?void 0:e.coordinates;if(!r)return null;var o=t(r,2);return{latitude:o[0],longitude:o[1]}}),[J]);A(k,M,N);var U=i(),X=U.companies,Y=U.canViewCompanies,Z=U.resetSafeguard;c(!T);var $=d(),_=r((function(){return Array.from(B.values())}),[B]),ee=$||0===_.length&&null===G,te=f(null==k?void 0:k.selectedWellIds),re=t(te,2),oe=re[0],se=re[1],ne=g(),ie=t(ne,3),le=ie[0],ae=ie[1],pe=ie[2],me=r((function(){if(!_)return null;var e=function(e,t){if(null==t||!t.length)return e;var r=new Set(e.map((function(e){return e.id}))),o=t.filter((function(e){return!r.has(e.id)}));return o.length>0?e.concat(o):e},t=_;return t=e(t,oe),t=e(t,le),"drilling"===R&&z&&(t=t.filter((function(e){return m(e)}))),"intervention"===R&&F&&(t=t.filter((function(e){return u(e)}))),J&&!t.some((function(e){return e.id===J.id}))&&(t=[J].concat(t)),t}),[_,J,oe,le,z,F,R]),ue=b(D),ce=t(ue,1)[0],de=j(V,me),fe=de.offsets,je=de.setOffsets,ve=de.loadExternalOffsets;v({assetId:V,loadExternalOffsets:ve});var ye=fe.wellSections,ge=fe.offsetWellsBySection,be=fe.taScores,We=fe.idasWellIds,he=fe.owsWellIds,we=fe.wellhubWellIds,Se=fe.loadedAssetId,Pe=r((function(){return!!ye&&ye.some((function(e){return e.value!==p}))}),[ye]);o((function(){je((function(e){return L(L({},e),{},{wellSections:null,offsetWellsBySection:null})}))}),[je,V]),o((function(){var e;if(ge){var t=new Set(null!==(e=null==me?void 0:me.map((function(e){return e.id})))&&void 0!==e?e:[]),r=new Set;Object.values(ge).forEach((function(e){(null!=e?e:[]).forEach((function(e){null==e||e===V||t.has(e)||r.add(e)}))})),r.size>0&&pe(Array.from(r))}}),[ge,me,V,pe]);var Ce=y(R).defaultMetricKey,Ie=h(D,null==k?void 0:k.metricsKeys,Ce),Oe=t(Ie,2),Ae=Oe[0],xe=Oe[1],Le=w(me,ye,ge,V,Ae,K),Ee=t(Le,4),Ve=Ee[0],De=Ee[1],ke=Ee[2],Ne=Ee[3],Te=P(q),Ke=Te.wellIdToInterventionNames,Me=Te.activeInterventionWellIds,Re=Te.isLoading,qe=I(q),Be=qe.assetIdToPadName,Ge=qe.isLoading,ze=Ve||ke,Fe=r((function(){if(!ze||null==X||!X.length)return ze;var e={};X.forEach((function(t){e[t.id]=t.name}));var t=ze.map((function(t){return L(L({},t),{},{companyName:e[Number(t.companyId)]||"Null"})}));return q&&(t=C(t,Ke),t=O(t,Be)),t}),[ze,X,q,Ke,Be]),He=r((function(){return J?Fe&&Fe.find((function(e){return e.id===J.id}))||J:null}),[J,Fe]),Je=a((function(e){return e.allWellsLoadProgress})),Qe=S({isLoadAllWells:T,allWellsLoadProgress:Je,wellsLength:null!==(x=null==Fe?void 0:Fe.length)&&void 0!==x?x:0,rawWellsCount:null!==(E=null==me?void 0:me.length)&&void 0!==E?E:0,areRawWellsLoading:ee,areAdvancedWellsLoading:De||Re||Ge,arePinnedWellsLoading:se,areSearchedWellsLoading:ae});return{wells:Fe,subjectWell:He,subjectWellCoords:Q,rawWellsWithSubject:me,wellSections:ye,externalOffsets:ge,taScores:be,idasWellIds:We,owsWellIds:he,wellhubWellIds:we,loadedAssetId:Se,isWellSectionColumnVisible:Pe,metricsKeys:Ae,setMetricsKeys:xe,loadingWellIds:Ne,isAllWellsLoaded:Qe,areRawWellsLoading:ee,companies:X,canViewCompanies:Y,companyProvider:ce,pinnedWells:oe,fetchSearchedWells:pe,resetSafeguard:Z,activeInterventionWellIds:Me}};export{E as useWellDataPipeline};
1
+ import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useMemo as r,useEffect as o}from"react";import"../../stores/viewport-store/ViewportStoreContext.js";import"../../stores/viewport-store/ViewportStoreProvider.js";import"zustand";import"lodash/isEqual";import{useViewportStore as s}from"../../stores/viewport-store/useViewportStore.js";import{areWellMapsEqual as i}from"../../stores/viewport-store/utils/areWellMapsEqual.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as n}from"../../stores/company-safeguard/useCompanySafeguard.js";import{useFilterStore as l}from"../../stores/filter-store/useFilterStore.js";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import"react/jsx-runtime";import{usePickerPropsStore as a}from"../../stores/picker-props-store/usePickerPropsStore.js";import{ALL_SECTION_KEY as m}from"../../constants.js";import{isDrillingOnlyWell as p}from"../../utils/isDrillingOnlyWell.js";import{isInterventionOnlyWell as u}from"../../utils/isInterventionOnlyWell.js";import{useViewportWells as c}from"../useViewportWells/useViewportWells.js";import{useTileLoading as d}from"../useTileLoading.js";import{usePinnedWells as f}from"../usePinnedWells.js";import{useExternalOffsets as j}from"../useExternalOffsets.js";import"../../stores/idas-resync-store/IdasResyncStoreContext.js";import"../../stores/idas-resync-store/IdasResyncStoreProvider.js";import{useIdasResyncSync as v}from"../../stores/idas-resync-store/useIdasResyncSync.js";import{getSegmentConfig as g}from"../../segment-config/index.js";import{useSearchedWells as h}from"./useSearchedWells.js";import{useCompanyProvider as y}from"./useCompanyProvider.js";import{useFetchSubjectWell as b}from"./useFetchSubjectWell.js";import{useCompanyMetricKey as W}from"./useCompanyMetricKey.js";import{useAdvancedWells as w}from"./useAdvancedWells.js";import{computeIsAllWellsLoaded as S}from"./utils/computeIsAllWellsLoaded.js";import{useInterventionEnrichment as C,enrichWellsWithInterventionData as P}from"./useInterventionEnrichment.js";import{usePadEnrichment as I,enrichWellsWithPadData as O}from"./usePadEnrichment.js";import"../../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"moment";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"../../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";import"uuid";import"../../../StatusBadge/constants.js";import"lodash/unset";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppPanel/AppPanelsContext.js";import{useGlobalOffsetWellsSync as x}from"../../../../effects/useGlobalOffsetWellsSync.js";function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function L(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?A(Object(o),!0).forEach((function(r){t(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):A(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var E=function(t){var A,E,V=t.subjectWellId,D=t.assetCompanyId,N=t.offsetSettings,k=t.maxOffsetWellNumber,M=t.isLoadAllWells,R=t.open,T=t.onSave,K=a((function(t){return t.segment})),q="intervention"===K,B=s((function(t){return t.wells}),i),z=s((function(t){return t.bounds})),F=l((function(t){var e;return null===(e=t.filters.drillingWells)||void 0===e||e})),G=l((function(t){var e;return null===(e=t.filters.interventionWells)||void 0===e||e})),H=b(V),U=e(H,1)[0],J=r((function(){var t,r=null==U||null===(t=U.topHole)||void 0===t?void 0:t.coordinates;if(!r)return null;var o=e(r,2);return{latitude:o[0],longitude:o[1]}}),[U]);x(N,T,k);var Q=n(),X=Q.companies,Y=Q.canViewCompanies,Z=Q.resetSafeguard;c(!M);var $=d(),_=r((function(){return Array.from(B.values())}),[B]),tt=$||0===_.length&&null===z,et=f(null==N?void 0:N.selectedWellIds),rt=e(et,2),ot=rt[0],st=rt[1],it=h(),nt=e(it,3),lt=nt[0],at=nt[1],mt=nt[2],pt=r((function(){if(!_)return null;var t=function(t,e){if(null==e||!e.length)return t;var r=new Set(t.map((function(t){return t.id}))),o=e.filter((function(t){return!r.has(t.id)}));return o.length>0?t.concat(o):t},e=_;return e=t(e,ot),e=t(e,lt),"drilling"===K&&F&&(e=e.filter((function(t){return p(t)}))),"intervention"===K&&G&&(e=e.filter((function(t){return u(t)}))),U&&!e.some((function(t){return t.id===U.id}))&&(e=[U].concat(e)),e}),[_,U,ot,lt,F,G,K]),ut=y(D),ct=e(ut,1)[0],dt=j(V,pt),ft=dt.offsets,jt=dt.setOffsets,vt=dt.loadExternalOffsets;v({assetId:V,loadExternalOffsets:vt});var gt=ft.wellSections,ht=ft.offsetWellsBySection,yt=ft.taScores,bt=ft.idasWellIds,Wt=ft.owsWellIds,wt=ft.wellhubWellIds,St=ft.loadedAssetId,Ct=r((function(){return!!gt&&gt.some((function(t){return t.value!==m}))}),[gt]);o((function(){jt((function(t){return L(L({},t),{},{wellSections:null,offsetWellsBySection:null})}))}),[jt,V]),o((function(){var t;if(ht){var e=new Set(null!==(t=null==pt?void 0:pt.map((function(t){return t.id})))&&void 0!==t?t:[]),r=new Set;Object.values(ht).forEach((function(t){(null!=t?t:[]).forEach((function(t){null==t||t===V||e.has(t)||r.add(t)}))})),r.size>0&&mt(Array.from(r))}}),[ht,pt,V,mt]);var Pt=g(K).defaultMetricKey,It=W(D,null==N?void 0:N.metricsKeys,Pt),Ot=e(It,2),xt=Ot[0],At=Ot[1],Lt=w(pt,gt,ht,V,xt,R),Et=e(Lt,4),Vt=Et[0],Dt=Et[1],Nt=Et[2],kt=Et[3],Mt=C(q),Rt=Mt.wellIdToInterventionNames,Tt=Mt.activeInterventionWellIds,Kt=Mt.isLoading,qt=I(q),Bt=qt.assetIdToPadName,zt=qt.isLoading,Ft=Vt||Nt,Gt=r((function(){if(!Ft||null==X||!X.length)return Ft;var t={};X.forEach((function(e){t[e.id]=e.name}));var e=Ft.map((function(e){return L(L({},e),{},{companyName:t[Number(e.companyId)]||"Null"})}));return q&&(e=P(e,Rt),e=O(e,Bt)),e}),[Ft,X,q,Rt,Bt]),Ht=r((function(){return U?Gt&&Gt.find((function(t){return t.id===U.id}))||U:null}),[U,Gt]),Ut=a((function(t){return t.allWellsLoadProgress})),Jt=S({isLoadAllWells:M,allWellsLoadProgress:Ut,wellsLength:null!==(A=null==Gt?void 0:Gt.length)&&void 0!==A?A:0,rawWellsCount:null!==(E=null==pt?void 0:pt.length)&&void 0!==E?E:0,areRawWellsLoading:tt,areAdvancedWellsLoading:Dt||Kt||zt,arePinnedWellsLoading:st,areSearchedWellsLoading:at});return{wells:Gt,subjectWell:Ht,subjectWellCoords:J,rawWellsWithSubject:pt,wellSections:gt,externalOffsets:ht,taScores:yt,idasWellIds:bt,owsWellIds:Wt,wellhubWellIds:wt,loadedAssetId:St,isWellSectionColumnVisible:Ct,metricsKeys:xt,setMetricsKeys:At,loadingWellIds:kt,isAllWellsLoaded:Jt,areRawWellsLoading:tt,companies:X,canViewCompanies:Y,companyProvider:ct,pinnedWells:ot,fetchSearchedWells:mt,resetSafeguard:Z,activeInterventionWellIds:Tt}};export{E as useWellDataPipeline};
2
2
  //# sourceMappingURL=useWellDataPipeline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useWellDataPipeline.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.ts"],"sourcesContent":["import { useEffect, useMemo, type Dispatch, type SetStateAction } from 'react';\n\nimport { useViewportStore } from '../../stores/viewport-store';\nimport { areWellMapsEqual } from '../../stores/viewport-store/utils/areWellMapsEqual';\nimport { useCompanySafeguard } from '../../stores/company-safeguard';\nimport type { Company } from '../../stores/company-safeguard/CompanySafeguardContext';\nimport { useFilterStore } from '../../stores/filter-store/useFilterStore';\nimport { usePickerPropsStore } from '../../stores/picker-props-store';\nimport { ALL_SECTION_KEY } from '../../constants';\nimport { isDrillingOnlyWell } from '../../utils/isDrillingOnlyWell';\nimport { isInterventionOnlyWell } from '../../utils/isInterventionOnlyWell';\nimport type { FilterableWell } from '../../utils/doesWellPassFilters';\nimport type {\n OffsetWell,\n OffsetSettingsInput,\n OffsetSettingsOutput,\n} from '../../OffsetWellPickerV5.types';\nimport type { FetchedOffsetWell } from '../../api/shared/types';\nimport { useViewportWells } from '../useViewportWells';\nimport { useTileLoading } from '../useTileLoading';\nimport { usePinnedWells } from '../usePinnedWells';\nimport {\n useExternalOffsets,\n type WellSection,\n type OffsetWellsBySection,\n type TaScore,\n} from '../useExternalOffsets';\nimport { useIdasResyncSync } from '../../stores/idas-resync-store';\nimport { getSegmentConfig } from '../../segment-config';\n\nimport { useSearchedWells } from './useSearchedWells';\nimport { useCompanyProvider } from './useCompanyProvider';\nimport { useFetchSubjectWell } from './useFetchSubjectWell';\nimport { useCompanyMetricKey } from './useCompanyMetricKey';\nimport { useAdvancedWells, type TransformedWell } from './useAdvancedWells';\nimport { computeIsAllWellsLoaded } from './utils/computeIsAllWellsLoaded';\nimport {\n useInterventionEnrichment,\n enrichWellsWithInterventionData,\n} from './useInterventionEnrichment';\nimport { usePadEnrichment, enrichWellsWithPadData } from './usePadEnrichment';\n\nimport { useGlobalOffsetWellsSync } from '~/effects';\n\ntype UseWellDataPipelineParams = {\n subjectWellId: number | null;\n assetCompanyId: number | undefined;\n offsetSettings: OffsetSettingsInput | undefined;\n maxOffsetWellNumber: number;\n isLoadAllWells: boolean;\n open: boolean | undefined;\n onSave:\n | ((offsetSettings: OffsetSettingsOutput, selectedWells?: OffsetWell[]) => void)\n | undefined;\n};\n\ntype UseWellDataPipelineReturn = {\n wells: TransformedWell[] | null;\n subjectWell: TransformedWell | FetchedOffsetWell | null;\n subjectWellCoords: { latitude: number; longitude: number } | null;\n rawWellsWithSubject: FetchedOffsetWell[] | null;\n wellSections: WellSection[] | null;\n externalOffsets: OffsetWellsBySection | null;\n taScores: TaScore[];\n idasWellIds: number[];\n owsWellIds: number[];\n wellhubWellIds: number[];\n loadedAssetId: number | null;\n isWellSectionColumnVisible: boolean;\n metricsKeys: string[];\n setMetricsKeys: Dispatch<SetStateAction<string[]>>;\n loadingWellIds: Set<number>;\n isAllWellsLoaded: boolean;\n areRawWellsLoading: boolean;\n companies: Company[];\n canViewCompanies: boolean;\n companyProvider: string | null;\n pinnedWells: OffsetWell[] | null;\n fetchSearchedWells: (wellIds: number[]) => Promise<OffsetWell[]>;\n resetSafeguard: () => void;\n activeInterventionWellIds: Set<number>;\n};\n\nexport const useWellDataPipeline = ({\n subjectWellId,\n assetCompanyId,\n offsetSettings,\n maxOffsetWellNumber,\n isLoadAllWells,\n open,\n onSave,\n}: UseWellDataPipelineParams): UseWellDataPipelineReturn => {\n const segment = usePickerPropsStore(state => state.segment);\n const isIntervention = segment === 'intervention';\n const viewportWells = useViewportStore(state => state.wells, areWellMapsEqual);\n const viewportBounds = useViewportStore(state => state.bounds);\n const drillingWells = useFilterStore(state => state.filters.drillingWells ?? true);\n const interventionWells = useFilterStore(state => state.filters.interventionWells ?? true);\n\n const [fetchedSubjectWell] = useFetchSubjectWell(subjectWellId);\n\n const subjectWellCoords = useMemo(() => {\n const coords = fetchedSubjectWell?.topHole?.coordinates;\n if (!coords) return null;\n const [latitude, longitude] = coords;\n return { latitude, longitude };\n }, [fetchedSubjectWell]);\n\n useGlobalOffsetWellsSync(offsetSettings, onSave, maxOffsetWellNumber);\n\n const { companies, canViewCompanies, resetSafeguard } = useCompanySafeguard();\n\n useViewportWells(!isLoadAllWells);\n const isTileLoading = useTileLoading();\n\n const rawWells = useMemo(\n () => Array.from(viewportWells.values()) as FetchedOffsetWell[],\n [viewportWells]\n );\n const areRawWellsLoading = isTileLoading || (rawWells.length === 0 && viewportBounds === null);\n\n const [pinnedWells, arePinnedWellsLoading] = usePinnedWells(offsetSettings?.selectedWellIds);\n const [searchedWells, areSearchedWellsLoading, fetchSearchedWells] = useSearchedWells();\n\n const rawWellsWithSubject = useMemo((): FetchedOffsetWell[] | null => {\n if (!rawWells) return null;\n\n const mergeUniqueById = (\n target: FetchedOffsetWell[],\n extras: OffsetWell[] | null\n ): FetchedOffsetWell[] => {\n if (!extras?.length) {\n return target;\n }\n\n const existingIds = new Set(target.map(w => w.id));\n const missing = (extras as unknown as FetchedOffsetWell[]).filter(\n w => !existingIds.has(w.id)\n );\n\n return missing.length > 0 ? target.concat(missing) : target;\n };\n\n let result: FetchedOffsetWell[] = rawWells;\n result = mergeUniqueById(result, pinnedWells);\n result = mergeUniqueById(result, searchedWells);\n\n if (segment === 'drilling' && drillingWells) {\n result = result.filter(w => isDrillingOnlyWell(w as unknown as FilterableWell));\n }\n\n if (segment === 'intervention' && interventionWells) {\n result = result.filter(w => isInterventionOnlyWell(w as unknown as FilterableWell));\n }\n\n // Subject well is prepended AFTER filtering so its full data (BIC, advanced\n // metrics, distance) always loads even when it is not a drilling well.\n if (fetchedSubjectWell && !result.some(w => w.id === fetchedSubjectWell.id)) {\n result = [fetchedSubjectWell].concat(result);\n }\n\n return result;\n }, [\n rawWells,\n fetchedSubjectWell,\n pinnedWells,\n searchedWells,\n drillingWells,\n interventionWells,\n segment,\n ]);\n\n const [companyProvider] = useCompanyProvider(assetCompanyId);\n\n const { offsets, setOffsets, loadExternalOffsets } = useExternalOffsets(\n subjectWellId,\n rawWellsWithSubject\n );\n useIdasResyncSync({ assetId: subjectWellId, loadExternalOffsets });\n const {\n wellSections,\n offsetWellsBySection: externalOffsets,\n taScores,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n loadedAssetId,\n } = offsets;\n\n const isWellSectionColumnVisible = useMemo(() => {\n if (!wellSections) return false;\n return wellSections.some(section => section.value !== ALL_SECTION_KEY);\n }, [wellSections]);\n\n useEffect(() => {\n setOffsets(prev => ({ ...prev, wellSections: null, offsetWellsBySection: null }));\n }, [setOffsets, subjectWellId]);\n\n // Pre-fetch synced offset wells that aren't in the local pool yet, so the Reset\n // button visibility (`useSaveResetDerivedState`) can synchronously distinguish\n // \"real well outside map radius\" from \"stale/unresolvable IDAS ID\". Results land\n // in `searchedWells` via `useSearchedWells.wellsCacheRef` and flow into\n // `rawWellsWithSubject` through `mergeUniqueById` above.\n useEffect(() => {\n if (!externalOffsets) return;\n const loaded = new Set(rawWellsWithSubject?.map(w => w.id) ?? []);\n const missing = new Set<number>();\n Object.values(externalOffsets).forEach(sectionIds => {\n (sectionIds ?? []).forEach(id => {\n if (id != null && id !== subjectWellId && !loaded.has(id)) missing.add(id);\n });\n });\n if (missing.size > 0) {\n fetchSearchedWells(Array.from(missing));\n }\n }, [externalOffsets, rawWellsWithSubject, subjectWellId, fetchSearchedWells]);\n\n const { defaultMetricKey } = getSegmentConfig(segment);\n\n const [metricsKeys, setMetricsKeys] = useCompanyMetricKey(\n assetCompanyId as number,\n offsetSettings?.metricsKeys,\n defaultMetricKey\n ) as [string[], Dispatch<SetStateAction<string[]>>];\n\n const [wellsWithMetrics, areAdvancedWellsLoading, transformedWells, loadingWellIds] =\n useAdvancedWells(\n rawWellsWithSubject,\n wellSections,\n externalOffsets,\n subjectWellId,\n metricsKeys,\n open\n );\n\n const {\n wellIdToInterventionNames,\n activeInterventionWellIds,\n isLoading: isInterventionLoading,\n } = useInterventionEnrichment(isIntervention);\n\n const { assetIdToPadName, isLoading: isPadLoading } = usePadEnrichment(isIntervention);\n\n const wellsWithoutCompanyName = wellsWithMetrics || transformedWells;\n\n const wells = useMemo(() => {\n if (!wellsWithoutCompanyName || !companies?.length) return wellsWithoutCompanyName;\n\n const companyMap: Record<number, string> = {};\n companies.forEach(company => {\n companyMap[company.id] = company.name;\n });\n\n let result = wellsWithoutCompanyName.map(well => ({\n ...well,\n companyName: companyMap[Number(well.companyId)] || 'Null',\n }));\n\n if (isIntervention) {\n result = enrichWellsWithInterventionData(result, wellIdToInterventionNames);\n result = enrichWellsWithPadData(result, assetIdToPadName);\n }\n\n return result;\n }, [\n wellsWithoutCompanyName,\n companies,\n isIntervention,\n wellIdToInterventionNames,\n assetIdToPadName,\n ]);\n\n const subjectWell = useMemo(() => {\n if (!fetchedSubjectWell) return null;\n if (!wells) return fetchedSubjectWell;\n return wells.find(w => w.id === fetchedSubjectWell.id) || fetchedSubjectWell;\n }, [fetchedSubjectWell, wells]);\n\n const allWellsLoadProgress = usePickerPropsStore(state => state.allWellsLoadProgress);\n\n const isAllWellsLoaded = computeIsAllWellsLoaded({\n isLoadAllWells,\n allWellsLoadProgress,\n wellsLength: wells?.length ?? 0,\n rawWellsCount: rawWellsWithSubject?.length ?? 0,\n areRawWellsLoading,\n areAdvancedWellsLoading: areAdvancedWellsLoading || isInterventionLoading || isPadLoading,\n arePinnedWellsLoading,\n areSearchedWellsLoading,\n });\n\n return {\n wells,\n subjectWell,\n subjectWellCoords,\n rawWellsWithSubject,\n wellSections,\n externalOffsets,\n taScores,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n loadedAssetId,\n isWellSectionColumnVisible,\n metricsKeys,\n setMetricsKeys,\n loadingWellIds,\n isAllWellsLoaded,\n areRawWellsLoading,\n companies,\n canViewCompanies,\n companyProvider,\n pinnedWells,\n fetchSearchedWells,\n resetSafeguard,\n activeInterventionWellIds,\n };\n};\n"],"names":["useWellDataPipeline","_ref","_wells$length","_rawWellsWithSubject$2","subjectWellId","assetCompanyId","offsetSettings","maxOffsetWellNumber","isLoadAllWells","open","onSave","segment","usePickerPropsStore","state","isIntervention","viewportWells","useViewportStore","wells","areWellMapsEqual","viewportBounds","bounds","drillingWells","useFilterStore","_state$filters$drilli","filters","interventionWells","_state$filters$interv","useFetchSubjectWell","fetchedSubjectWell","_slicedToArray","_useFetchSubjectWell","subjectWellCoords","useMemo","_fetchedSubjectWell$t","coords","topHole","coordinates","_coords","latitude","longitude","useGlobalOffsetWellsSync","_useCompanySafeguard","useCompanySafeguard","companies","canViewCompanies","resetSafeguard","useViewportWells","isTileLoading","useTileLoading","rawWells","Array","from","values","areRawWellsLoading","length","usePinnedWells","selectedWellIds","_usePinnedWells2","_usePinnedWells","pinnedWells","arePinnedWellsLoading","_useSearchedWells","useSearchedWells","_useSearchedWells2","searchedWells","areSearchedWellsLoading","fetchSearchedWells","rawWellsWithSubject","mergeUniqueById","target","extras","existingIds","Set","map","w","id","missing","filter","has","concat","result","isDrillingOnlyWell","isInterventionOnlyWell","some","useCompanyProvider","companyProvider","_useCompanyProvider","_useExternalOffsets","useExternalOffsets","offsets","setOffsets","loadExternalOffsets","useIdasResyncSync","assetId","wellSections","externalOffsets","offsetWellsBySection","taScores","idasWellIds","owsWellIds","wellhubWellIds","loadedAssetId","isWellSectionColumnVisible","section","value","ALL_SECTION_KEY","useEffect","prev","_objectSpread","_rawWellsWithSubject$","loaded","Object","forEach","sectionIds","add","size","defaultMetricKey","getSegmentConfig","_ref2","useCompanyMetricKey","metricsKeys","_ref3","setMetricsKeys","_useAdvancedWells","useAdvancedWells","_useAdvancedWells2","wellsWithMetrics","areAdvancedWellsLoading","transformedWells","loadingWellIds","useInterventionEnrichment","wellIdToInterventionNames","activeInterventionWellIds","isInterventionLoading","isLoading","usePadEnrichment","assetIdToPadName","isPadLoading","wellsWithoutCompanyName","companyMap","company","name","well","companyName","Number","companyId","enrichWellsWithInterventionData","enrichWellsWithPadData","subjectWell","find","allWellsLoadProgress","isAllWellsLoaded","computeIsAllWellsLoaded","wellsLength","rawWellsCount"],"mappings":"6sJAmFaA,IAAAA,EAAsB,SAQyBC,GAAA,IAAAC,EAAAC,EAP1DC,IAAAA,cACAC,IAAAA,eACAC,IAAAA,eACAC,IAAAA,oBACAC,IAAAA,eACAC,IAAAA,KACAC,IAAAA,OAEMC,EAAUC,GAAoB,SAAAC,GAAK,OAAIA,EAAMF,WAC7CG,EAA6B,iBAAZH,EACjBI,EAAgBC,GAAiB,SAAAH,GAAK,OAAIA,EAAMI,KAAK,GAAEC,GACvDC,EAAiBH,GAAiB,SAAAH,GAAK,OAAIA,EAAMO,UACjDC,EAAgBC,GAAe,SAAAT,GAAK,IAAAU,EAAA,eAAAA,EAAIV,EAAMW,QAAQH,iCACtDI,EAAoBH,GAAe,SAAAT,GAAK,IAAAa,EAAA,eAAAA,EAAIb,EAAMW,QAAQC,qCAEnCE,EAAAA,EAAoBvB,GAA1CwB,EAAwDC,EAAAC,EAAA,GAAtC,GAEnBC,EAAoBC,GAAQ,WAAM,IAAAC,EAChCC,EAASN,SAAA,QAAAA,EAAAA,EAAoBO,eAApB,IAAAF,OAAAL,EAAAK,EAA6BG,YAC5C,IAAKF,EAAQ,OAAO,KACpB,IAAAG,EAAAR,EAA8BK,EAAM,GACpC,MAAO,CAAEI,SADMD,EAAA,GACIE,UADOF,EAAA,GAE5B,GAAG,CAACT,IAEJY,EAAyBlC,EAAgBI,EAAQH,GAEjD,IAAAkC,EAAwDC,IAAhDC,IAAAA,UAAWC,IAAAA,iBAAkBC,IAAAA,eAErCC,GAAkBtC,GAClB,IAAMuC,EAAgBC,IAEhBC,EAAWjB,GACf,WAAA,OAAMkB,MAAMC,KAAKpC,EAAcqC,SAAS,GACxC,CAACrC,IAEGsC,GAAqBN,GAAsC,IAAp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aAAAA,GACAC,gBAAAA,GACAE,SAAAA,GACAC,YAAAA,GACAC,WAAAA,GACAC,eAAAA,GACAC,cAAAA,GACAC,2BAAAA,GACAkB,YAAAA,GACAE,eAAAA,GACAO,eAAAA,GACAsB,iBAAAA,GACAlG,mBAAAA,GACAV,UAAAA,EACAC,iBAAAA,EACAyC,gBAAAA,GACA1B,YAAAA,GACAO,mBAAAA,GACArB,eAAAA,EACAuF,0BAAAA,GAEJ"}
1
+ {"version":3,"file":"useWellDataPipeline.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.ts"],"sourcesContent":["import { useEffect, useMemo, type Dispatch, type SetStateAction } from 'react';\n\nimport { useViewportStore } from '../../stores/viewport-store';\nimport { areWellMapsEqual } from '../../stores/viewport-store/utils/areWellMapsEqual';\nimport { useCompanySafeguard } from '../../stores/company-safeguard';\nimport type { Company } from '../../stores/company-safeguard/CompanySafeguardContext';\nimport { useFilterStore } from '../../stores/filter-store/useFilterStore';\nimport { usePickerPropsStore } from '../../stores/picker-props-store';\nimport { ALL_SECTION_KEY } from '../../constants';\nimport { isDrillingOnlyWell } from '../../utils/isDrillingOnlyWell';\nimport { isInterventionOnlyWell } from '../../utils/isInterventionOnlyWell';\nimport type { FilterableWell } from '../../utils/doesWellPassFilters';\nimport type {\n OffsetWell,\n OffsetSettingsInput,\n OffsetSettingsOutput,\n} from '../../OffsetWellPickerV5.types';\nimport type { FetchedOffsetWell } from '../../api/shared/types';\nimport { useViewportWells } from '../useViewportWells';\nimport { useTileLoading } from '../useTileLoading';\nimport { usePinnedWells } from '../usePinnedWells';\nimport {\n useExternalOffsets,\n type WellSection,\n type OffsetWellsBySection,\n type TaScore,\n} from '../useExternalOffsets';\nimport { useIdasResyncSync } from '../../stores/idas-resync-store';\nimport { getSegmentConfig } from '../../segment-config';\n\nimport { useSearchedWells } from './useSearchedWells';\nimport { useCompanyProvider } from './useCompanyProvider';\nimport { useFetchSubjectWell } from './useFetchSubjectWell';\nimport { useCompanyMetricKey } from './useCompanyMetricKey';\nimport { useAdvancedWells, type TransformedWell } from './useAdvancedWells';\nimport { computeIsAllWellsLoaded } from './utils/computeIsAllWellsLoaded';\nimport {\n useInterventionEnrichment,\n enrichWellsWithInterventionData,\n} from './useInterventionEnrichment';\nimport { usePadEnrichment, enrichWellsWithPadData } from './usePadEnrichment';\n\nimport { useGlobalOffsetWellsSync } from '~/effects';\n\ntype UseWellDataPipelineParams = {\n subjectWellId: number | null;\n assetCompanyId: number | undefined;\n offsetSettings: OffsetSettingsInput | undefined;\n maxOffsetWellNumber: number;\n isLoadAllWells: boolean;\n open: boolean | undefined;\n onSave:\n | ((offsetSettings: OffsetSettingsOutput, selectedWells?: OffsetWell[]) => void)\n | undefined;\n};\n\ntype UseWellDataPipelineReturn = {\n wells: TransformedWell[] | null;\n subjectWell: TransformedWell | FetchedOffsetWell | null;\n subjectWellCoords: { latitude: number; longitude: number } | null;\n rawWellsWithSubject: FetchedOffsetWell[] | null;\n wellSections: WellSection[] | null;\n externalOffsets: OffsetWellsBySection | null;\n taScores: TaScore[];\n idasWellIds: number[];\n owsWellIds: number[];\n wellhubWellIds: number[];\n loadedAssetId: number | null;\n isWellSectionColumnVisible: boolean;\n metricsKeys: string[];\n setMetricsKeys: Dispatch<SetStateAction<string[]>>;\n loadingWellIds: Set<number>;\n isAllWellsLoaded: boolean;\n areRawWellsLoading: boolean;\n companies: Company[];\n canViewCompanies: boolean;\n companyProvider: string | null;\n pinnedWells: OffsetWell[] | null;\n fetchSearchedWells: (wellIds: number[]) => Promise<OffsetWell[]>;\n resetSafeguard: () => void;\n activeInterventionWellIds: Set<number>;\n};\n\nexport const useWellDataPipeline = ({\n subjectWellId,\n assetCompanyId,\n offsetSettings,\n maxOffsetWellNumber,\n isLoadAllWells,\n open,\n onSave,\n}: UseWellDataPipelineParams): UseWellDataPipelineReturn => {\n const segment = usePickerPropsStore(state => state.segment);\n const isIntervention = segment === 'intervention';\n const viewportWells = useViewportStore(state => state.wells, areWellMapsEqual);\n const viewportBounds = useViewportStore(state => state.bounds);\n const drillingWells = useFilterStore(state => state.filters.drillingWells ?? true);\n const interventionWells = useFilterStore(state => state.filters.interventionWells ?? true);\n\n const [fetchedSubjectWell] = useFetchSubjectWell(subjectWellId);\n\n const subjectWellCoords = useMemo(() => {\n const coords = fetchedSubjectWell?.topHole?.coordinates;\n if (!coords) return null;\n const [latitude, longitude] = coords;\n return { latitude, longitude };\n }, [fetchedSubjectWell]);\n\n useGlobalOffsetWellsSync(offsetSettings, onSave, maxOffsetWellNumber);\n\n const { companies, canViewCompanies, resetSafeguard } = useCompanySafeguard();\n\n useViewportWells(!isLoadAllWells);\n const isTileLoading = useTileLoading();\n\n const rawWells = useMemo(\n () => Array.from(viewportWells.values()) as FetchedOffsetWell[],\n [viewportWells]\n );\n const areRawWellsLoading = isTileLoading || (rawWells.length === 0 && viewportBounds === null);\n\n const [pinnedWells, arePinnedWellsLoading] = usePinnedWells(offsetSettings?.selectedWellIds);\n const [searchedWells, areSearchedWellsLoading, fetchSearchedWells] = useSearchedWells();\n\n const rawWellsWithSubject = useMemo((): FetchedOffsetWell[] | null => {\n if (!rawWells) return null;\n\n const mergeUniqueById = (\n target: FetchedOffsetWell[],\n extras: OffsetWell[] | null\n ): FetchedOffsetWell[] => {\n if (!extras?.length) {\n return target;\n }\n\n const existingIds = new Set(target.map(w => w.id));\n const missing = (extras as unknown as FetchedOffsetWell[]).filter(\n w => !existingIds.has(w.id)\n );\n\n return missing.length > 0 ? target.concat(missing) : target;\n };\n\n let result: FetchedOffsetWell[] = rawWells;\n result = mergeUniqueById(result, pinnedWells);\n result = mergeUniqueById(result, searchedWells);\n\n if (segment === 'drilling' && drillingWells) {\n result = result.filter(w => isDrillingOnlyWell(w as unknown as FilterableWell));\n }\n\n if (segment === 'intervention' && interventionWells) {\n result = result.filter(w => isInterventionOnlyWell(w as unknown as FilterableWell));\n }\n\n // Subject well is prepended AFTER filtering so its full data (BIC, advanced\n // metrics, distance) always loads even when it is not a drilling well.\n if (fetchedSubjectWell && !result.some(w => w.id === fetchedSubjectWell.id)) {\n result = [fetchedSubjectWell].concat(result);\n }\n\n return result;\n }, [\n rawWells,\n fetchedSubjectWell,\n pinnedWells,\n searchedWells,\n drillingWells,\n interventionWells,\n segment,\n ]);\n\n const [companyProvider] = useCompanyProvider(assetCompanyId);\n\n const { offsets, setOffsets, loadExternalOffsets } = useExternalOffsets(\n subjectWellId,\n rawWellsWithSubject\n );\n useIdasResyncSync({ assetId: subjectWellId, loadExternalOffsets });\n const {\n wellSections,\n offsetWellsBySection: externalOffsets,\n taScores,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n loadedAssetId,\n } = offsets;\n\n const isWellSectionColumnVisible = useMemo(() => {\n if (!wellSections) return false;\n return wellSections.some(section => section.value !== ALL_SECTION_KEY);\n }, [wellSections]);\n\n useEffect(() => {\n setOffsets(prev => ({ ...prev, wellSections: null, offsetWellsBySection: null }));\n }, [setOffsets, subjectWellId]);\n\n // Pre-fetch synced offset wells that aren't in the local pool yet, so the Reset\n // button visibility (`useSaveResetDerivedState`) can synchronously distinguish\n // \"real well outside map radius\" from \"stale/unresolvable IDAS ID\". Results land\n // in `searchedWells` via `useSearchedWells.wellsCacheRef` and flow into\n // `rawWellsWithSubject` through `mergeUniqueById` above.\n useEffect(() => {\n if (!externalOffsets) return;\n const loaded = new Set(rawWellsWithSubject?.map(w => w.id) ?? []);\n const missing = new Set<number>();\n Object.values(externalOffsets).forEach(sectionIds => {\n (sectionIds ?? []).forEach(id => {\n if (id != null && id !== subjectWellId && !loaded.has(id)) missing.add(id);\n });\n });\n if (missing.size > 0) {\n fetchSearchedWells(Array.from(missing));\n }\n }, [externalOffsets, rawWellsWithSubject, subjectWellId, fetchSearchedWells]);\n\n const { defaultMetricKey } = getSegmentConfig(segment);\n\n const [metricsKeys, setMetricsKeys] = useCompanyMetricKey(\n assetCompanyId as number,\n offsetSettings?.metricsKeys,\n defaultMetricKey\n ) as [string[], Dispatch<SetStateAction<string[]>>];\n\n const [wellsWithMetrics, areAdvancedWellsLoading, transformedWells, loadingWellIds] =\n useAdvancedWells(\n rawWellsWithSubject,\n wellSections,\n externalOffsets,\n subjectWellId,\n metricsKeys,\n open\n );\n\n const {\n wellIdToInterventionNames,\n activeInterventionWellIds,\n isLoading: isInterventionLoading,\n } = useInterventionEnrichment(isIntervention);\n\n const { assetIdToPadName, isLoading: isPadLoading } = usePadEnrichment(isIntervention);\n\n const wellsWithoutCompanyName = wellsWithMetrics || transformedWells;\n\n const wells = useMemo(() => {\n if (!wellsWithoutCompanyName || !companies?.length) return wellsWithoutCompanyName;\n\n const companyMap: Record<number, string> = {};\n companies.forEach(company => {\n companyMap[company.id] = company.name;\n });\n\n let result = wellsWithoutCompanyName.map(well => ({\n ...well,\n companyName: companyMap[Number(well.companyId)] || 'Null',\n }));\n\n if (isIntervention) {\n result = enrichWellsWithInterventionData(result, wellIdToInterventionNames);\n result = enrichWellsWithPadData(result, assetIdToPadName);\n }\n\n return result;\n }, [\n wellsWithoutCompanyName,\n companies,\n isIntervention,\n wellIdToInterventionNames,\n assetIdToPadName,\n ]);\n\n const subjectWell = useMemo(() => {\n if (!fetchedSubjectWell) return null;\n if (!wells) return fetchedSubjectWell;\n return wells.find(w => w.id === fetchedSubjectWell.id) || fetchedSubjectWell;\n }, [fetchedSubjectWell, wells]);\n\n const allWellsLoadProgress = usePickerPropsStore(state => state.allWellsLoadProgress);\n\n const isAllWellsLoaded = computeIsAllWellsLoaded({\n isLoadAllWells,\n allWellsLoadProgress,\n wellsLength: wells?.length ?? 0,\n rawWellsCount: rawWellsWithSubject?.length ?? 0,\n areRawWellsLoading,\n areAdvancedWellsLoading: areAdvancedWellsLoading || isInterventionLoading || isPadLoading,\n arePinnedWellsLoading,\n areSearchedWellsLoading,\n });\n\n return {\n wells,\n subjectWell,\n subjectWellCoords,\n rawWellsWithSubject,\n wellSections,\n externalOffsets,\n taScores,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n loadedAssetId,\n isWellSectionColumnVisible,\n metricsKeys,\n setMetricsKeys,\n loadingWellIds,\n isAllWellsLoaded,\n areRawWellsLoading,\n companies,\n canViewCompanies,\n companyProvider,\n pinnedWells,\n fetchSearchedWells,\n resetSafeguard,\n activeInterventionWellIds,\n };\n};\n"],"names":["useWellDataPipeline","_ref","_wells$length","_rawWellsWithSubject$2","subjectWellId","assetCompanyId","offsetSettings","maxOffsetWellNumber","isLoadAllWells","open","onSave","segment","usePickerPropsStore","state","isIntervention","viewportWells","useViewportStore","wells","areWellMapsEqual","viewportBounds","bounds","drillingWells","useFilterStore","_state$filters$drilli","filters","interventionWells","_state$filters$interv","useFetchSubjectWell","fetchedSubjectWell","_slicedToArray","_useFetchSubjectWell","subjectWellCoords","useMemo","_fetchedSubjectWell$t","coords","topHole","coordinates","_coords","latitude","longitude","useGlobalOffsetWellsSync","_useCompanySafeguard","useCompanySafeguard","companies","canViewCompanies","resetSafeguard","useViewportWells","isTileLoading","useTileLoading","rawWells","Array","from","values","areRawWellsLoading","length","usePinnedWells","selectedWellIds","_usePinnedWells2","_usePinnedWells","pinnedWells","arePinnedWellsLoading","_useSearchedWells","useSearchedWells","_useSearchedWells2","searchedWells","areSearchedWellsLoading","fetchSearchedWells","rawWellsWithSubject","mergeUniqueById","target","extras","existingIds","Set","map","w","id","missing","filter","has","concat","result","isDrillingOnlyWell","isInterventionOnlyWell","some","useCompanyProvider","companyProvider","_useCompanyProvider","_useExternalOffsets","useExternalOffsets","offsets","setOffsets","loadExternalOffsets","useIdasResyncSync","assetId","wellSections","externalOffsets","offsetWellsBySection","taScores","idasWellIds","owsWellIds","wellhubWellIds","loadedAssetId","isWellSectionColumnVisible","section","value","ALL_SECTION_KEY","useEffect","prev","_objectSpread","_rawWellsWithSubject$","loaded","Object","forEach","sectionIds","add","size","defaultMetricKey","getSegmentConfig","_ref2","useCompanyMetricKey","metricsKeys","_ref3","setMetricsKeys","_useAdvancedWells","useAdvancedWells","_useAdvancedWells2","wellsWithMetrics","areAdvancedWellsLoading","transformedWells","loadingWellIds","useInterventionEnrichment","wellIdToInterventionNames","activeInterventionWellIds","isInterventionLoading","isLoading","usePadEnrichment","assetIdToPadName","isPadLoading","wellsWithoutCompanyName","companyMap","company","name","well","companyName","Number","companyId","enrichWellsWithInterventionData","enrichWellsWithPadData","subjectWell","find","allWellsLoadProgress","isAllWellsLoaded","computeIsAllWellsLoaded","wellsLength","rawWellsCount"],"mappings":"8mLAmFaA,IAAAA,EAAsB,SAQyBC,GAAA,IAAAC,EAAAC,EAP1DC,IAAAA,cACAC,IAAAA,eACAC,IAAAA,eACAC,IAAAA,oBACAC,IAAAA,eACAC,IAAAA,KACAC,IAAAA,OAEMC,EAAUC,GAAoB,SAAAC,GAAK,OAAIA,EAAMF,WAC7CG,EAA6B,iBAAZH,EACjBI,EAAgBC,GAAiB,SAAAH,GAAK,OAAIA,EAAMI,KAAK,GAAEC,GACvDC,EAAiBH,GAAiB,SAAAH,GAAK,OAAIA,EAAMO,UACjDC,EAAgBC,GAAe,SAAAT,GAAK,IAAAU,EAAA,eAAAA,EAAIV,EAAMW,QAAQH,iCACtDI,EAAoBH,GAAe,SAAAT,GAAK,IAAAa,EAAA,eAAAA,EAAIb,EAAMW,QAAQC,qCAEnCE,EAAAA,EAAoBvB,GAA1CwB,EAAwDC,EAAAC,EAAA,GAAtC,GAEnBC,EAAoBC,GAAQ,WAAM,IAAAC,EAChCC,EAASN,SAAA,QAAAA,EAAAA,EAAoBO,eAApB,IAAAF,OAAAL,EAAAK,EAA6BG,YAC5C,IAAKF,EAAQ,OAAO,KACpB,IAAAG,EAAAR,EAA8BK,EAAM,GACpC,MAAO,CAAEI,SADMD,EAAA,GACIE,UADOF,EAAA,GAE5B,GAAG,CAACT,IAEJY,EAAyBlC,EAAgBI,EAAQH,GAEjD,IAAAkC,EAAwDC,IAAhDC,IAAAA,UAAWC,IAAAA,iBAAkBC,IAAAA,eAErCC,GAAkBtC,GAClB,IAAMuC,E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BI,GAC7E7E,sBAAAA,GACAK,wBAAAA,KAGF,MAAO,CACLhD,MAAAA,GACAmI,YAAAA,GACArH,kBAAAA,EACAoC,oBAAAA,GACA2B,aAAAA,GACAC,gBAAAA,GACAE,SAAAA,GACAC,YAAAA,GACAC,WAAAA,GACAC,eAAAA,GACAC,cAAAA,GACAC,2BAAAA,GACAkB,YAAAA,GACAE,eAAAA,GACAO,eAAAA,GACAsB,iBAAAA,GACAlG,mBAAAA,GACAV,UAAAA,EACAC,iBAAAA,EACAyC,gBAAAA,GACA1B,YAAAA,GACAO,mBAAAA,GACArB,eAAAA,EACAuF,0BAAAA,GAEJ"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import{ALL_SECTION_KEY as e,ColumnType as r}from"../../constants.js";import{mapbox as n}from"../../../../utils/index.js";function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?o(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c=function(t,e){if(!t||!e)return t;var r=t.find((function(t){return t.id===e})),o=r&&n.getAssetV2Coordinates(r,"topHole");return o?t.map((function(t){try{var e=n.getAssetV2Coordinates(t,"topHole");if(e){var r=parseFloat(n.getDistanceByCoordinates(o,e));return i(i({},t),{},{distance:parseFloat(r.toFixed(2))})}return t}catch(e){return t}})):t},u=function(n,o,c){if(!n||!o||!c)return n;var u=o.filter((function(t){return t.value!==e})),a=new Map;return u.forEach((function(t){(c[t.value]||[]).forEach((function(e){var r=a.get(e);r?r.push(t.label):a.set(e,[t.label])}))})),n.map((function(e){var n=a.get(e.id);return n&&n.length>0?i(i({},e),{},t({},r.wellSection,n)):e}))},a=function(t,e,r,n){if(!t)return null;var o=c(t,null!=e?e:void 0);return u(o,r,n)};export{c as addCoordinatesToWells,u as addSectionsToWells,a as transformWells};
1
+ import t from"@babel/runtime/helpers/defineProperty";import{ALL_SECTION_KEY as r,ColumnType as e}from"../../constants.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"moment";import"../../../../constants/alerts.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../utils/casing/validation.js";import"@babel/runtime/helpers/slicedToArray";import"lodash/mean";import"lodash";import"../../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import{getAssetV2Coordinates as o,getDistanceByCoordinates as i}from"../../../../utils/mapbox.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"../../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";function s(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,o)}return e}function n(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?s(Object(o),!0).forEach((function(e){t(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(o,t))}))}return r}var a=function(t,r){if(!t||!r)return t;var e=t.find((function(t){return t.id===r})),s=e&&o(e,"topHole");return s?t.map((function(t){try{var r=o(t,"topHole");if(r){var e=i(s,r);return n(n({},t),{},{distance:parseFloat(e.toFixed(2))})}return t}catch(r){return t}})):t},p=function(o,i,s){if(!o||!i||!s)return o;var a=i.filter((function(t){return t.value!==r})),p=new Map;return a.forEach((function(t){(s[t.value]||[]).forEach((function(r){var e=p.get(r);e?e.push(t.label):p.set(r,[t.label])}))})),o.map((function(r){var o=p.get(r.id);return o&&o.length>0?n(n({},r),{},t({},e.wellSection,o)):r}))},m=function(t,r,e,o){if(!t)return null;var i=a(t,null!=r?r:void 0);return p(i,e,o)};export{a as addCoordinatesToWells,p as addSectionsToWells,m as transformWells};
2
2
  //# sourceMappingURL=wellTransformations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wellTransformations.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.ts"],"sourcesContent":["import { ColumnType, ALL_SECTION_KEY } from '../../constants';\n\nimport { mapbox } from '~/utils';\n\ntype WellWithId = { id: number };\n\ntype WellSection = {\n value: string;\n label: string;\n};\n\ntype OffsetWellsBySection = Record<string, number[]>;\n\ntype WithDistance = { distance?: number };\ntype WithWellSection = Partial<Record<typeof ColumnType.wellSection, string[]>>;\n\n/**\n * Adds distance coordinates to wells relative to a subject well\n */\nexport const addCoordinatesToWells = <T extends WellWithId>(\n wells: T[],\n subjectWellId: number | undefined\n): (T & WithDistance)[] => {\n if (!wells || !subjectWellId) return wells;\n\n const subjectWell = wells.find(well => well.id === subjectWellId);\n const subjectWellCoord = subjectWell && mapbox.getAssetV2Coordinates(subjectWell, 'topHole');\n\n if (!subjectWellCoord) {\n return wells;\n }\n\n return wells.map(well => {\n try {\n const coord = mapbox.getAssetV2Coordinates(well, 'topHole');\n if (coord) {\n const distance = parseFloat(mapbox.getDistanceByCoordinates(subjectWellCoord, coord));\n return { ...well, distance: parseFloat(distance.toFixed(2)) };\n }\n return well;\n } catch {\n return well;\n }\n });\n};\n\n/**\n * Adds section information to wells based on section membership\n */\nexport const addSectionsToWells = <T extends WellWithId>(\n wells: T[],\n wellSections: WellSection[] | undefined | null,\n offsetWellsBySection: OffsetWellsBySection | undefined | null\n): (T & WithWellSection)[] => {\n if (!wells || !wellSections || !offsetWellsBySection) return wells;\n\n const filteredSections = wellSections.filter(item => item.value !== ALL_SECTION_KEY);\n\n // Pre-build well ID -> section labels Map for O(1) lookups\n const wellToSections = new Map<number, string[]>();\n filteredSections.forEach(section => {\n const wellIds = offsetWellsBySection[section.value] || [];\n wellIds.forEach(wellId => {\n const existing = wellToSections.get(wellId);\n if (existing) {\n existing.push(section.label);\n } else {\n wellToSections.set(wellId, [section.label]);\n }\n });\n });\n\n return wells.map(well => {\n const sectionNames = wellToSections.get(well.id);\n if (sectionNames && sectionNames.length > 0) {\n return { ...well, [ColumnType.wellSection]: sectionNames };\n }\n return well;\n });\n};\n\n/**\n * Transforms wells by adding coordinates and section information in one pass\n */\nexport const transformWells = <T extends WellWithId>(\n rawWells: T[] | null | undefined,\n subjectWellId: number | undefined | null,\n wellSections: WellSection[] | undefined | null,\n offsetWellsBySection: OffsetWellsBySection | undefined | null\n): (T & WithDistance & WithWellSection)[] | null => {\n if (!rawWells) return null;\n\n const wellsWithCoordinates = addCoordinatesToWells(rawWells, subjectWellId ?? undefined);\n\n return addSectionsToWells(wellsWithCoordinates, wellSections, offsetWellsBySection);\n};\n"],"names":["addCoordinatesToWells","wells","subjectWellId","subjectWell","find","well","id","subjectWellCoord","mapbox","getAssetV2Coordinates","map","coord","distance","parseFloat","getDistanceByCoordinates","_objectSpread","toFixed","_unused","addSectionsToWells","wellSections","offsetWellsBySection","filteredSections","filter","item","value","ALL_SECTION_KEY","wellToSections","Map","forEach","section","wellId","existing","get","push","label","set","sectionNames","length","ColumnType","wellSection","transformWells","rawWells","wellsWithCoordinates","undefined"],"mappings":"6uBAmBO,IAAMA,EAAwB,SACnCC,EACAC,GAEA,IAAKD,IAAUC,EAAe,OAAOD,EAErC,IAAME,EAAcF,EAAMG,MAAK,SAAAC,GAAI,OAAIA,EAAKC,KAAOJ,KAC7CK,EAAmBJ,GAAeK,EAAOC,sBAAsBN,EAAa,WAElF,OAAKI,EAIEN,EAAMS,KAAI,SAAAL,GACf,IACE,IAAMM,EAAQH,EAAOC,sBAAsBJ,EAAM,WACjD,GAAIM,EAAO,CACT,IAAMC,EAAWC,WAAWL,EAAOM,yBAAyBP,EAAkBI,IAC9E,OAAAI,EAAAA,EAAA,CAAA,EAAYV,GAAI,CAAA,EAAA,CAAEO,SAAUC,WAAWD,EAASI,QAAQ,KAC1D,CACA,OAAOX,CAGT,CAFE,MAAMY,GACN,OAAOZ,CACT,CACF,IAdSJ,CAeX,EAKaiB,EAAqB,SAChCjB,EACAkB,EACAC,GAEA,IAAKnB,IAAUkB,IAAiBC,EAAsB,OAAOnB,EAE7D,IAAMoB,EAAmBF,EAAaG,QAAO,SAAAC,GAAI,OAAIA,EAAKC,QAAUC,KAG9DC,EAAiB,IAAIC,IAa3B,OAZAN,EAAiBO,SAAQ,SAAAC,IACPT,EAAqBS,EAAQL,QAAU,IAC/CI,SAAQ,SAAAE,GACd,IAAMC,EAAWL,EAAeM,IAAIF,GAChCC,EACFA,EAASE,KAAKJ,EAAQK,OAEtBR,EAAeS,IAAIL,EAAQ,CAACD,EAAQK,OAExC,GACF,IAEOjC,EAAMS,KAAI,SAAAL,GACf,IAAM+B,EAAeV,EAAeM,IAAI3B,EAAKC,IAC7C,OAAI8B,GAAgBA,EAAaC,OAAS,EACxCtB,EAAAA,EAAA,CAAA,EAAYV,GAAOiC,CAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAWC,YAAcH,IAEvC/B,CACT,GACF,EAKamC,EAAiB,SAC5BC,EACAvC,EACAiB,EACAC,GAEA,IAAKqB,EAAU,OAAO,KAEtB,IAAMC,EAAuB1C,EAAsByC,EAAUvC,QAAAA,OAAiByC,GAE9E,OAAOzB,EAAmBwB,EAAsBvB,EAAcC,EAChE"}
1
+ {"version":3,"file":"wellTransformations.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.ts"],"sourcesContent":["import { ColumnType, ALL_SECTION_KEY } from '../../constants';\n\nimport { mapbox } from '~/utils';\n\ntype WellWithId = { id: number };\n\ntype WellSection = {\n value: string;\n label: string;\n};\n\ntype OffsetWellsBySection = Record<string, number[]>;\n\ntype WithDistance = { distance?: number };\ntype WithWellSection = Partial<Record<typeof ColumnType.wellSection, string[]>>;\n\n/**\n * Adds distance coordinates to wells relative to a subject well\n */\nexport const addCoordinatesToWells = <T extends WellWithId>(\n wells: T[],\n subjectWellId: number | undefined\n): (T & WithDistance)[] => {\n if (!wells || !subjectWellId) return wells;\n\n const subjectWell = wells.find(well => well.id === subjectWellId);\n const subjectWellCoord = subjectWell && mapbox.getAssetV2Coordinates(subjectWell, 'topHole');\n\n if (!subjectWellCoord) {\n return wells;\n }\n\n return wells.map(well => {\n try {\n const coord = mapbox.getAssetV2Coordinates(well, 'topHole');\n if (coord) {\n const distance = mapbox.getDistanceByCoordinates(subjectWellCoord, coord);\n return { ...well, distance: parseFloat(distance.toFixed(2)) };\n }\n return well;\n } catch {\n return well;\n }\n });\n};\n\n/**\n * Adds section information to wells based on section membership\n */\nexport const addSectionsToWells = <T extends WellWithId>(\n wells: T[],\n wellSections: WellSection[] | undefined | null,\n offsetWellsBySection: OffsetWellsBySection | undefined | null\n): (T & WithWellSection)[] => {\n if (!wells || !wellSections || !offsetWellsBySection) return wells;\n\n const filteredSections = wellSections.filter(item => item.value !== ALL_SECTION_KEY);\n\n // Pre-build well ID -> section labels Map for O(1) lookups\n const wellToSections = new Map<number, string[]>();\n filteredSections.forEach(section => {\n const wellIds = offsetWellsBySection[section.value] || [];\n wellIds.forEach(wellId => {\n const existing = wellToSections.get(wellId);\n if (existing) {\n existing.push(section.label);\n } else {\n wellToSections.set(wellId, [section.label]);\n }\n });\n });\n\n return wells.map(well => {\n const sectionNames = wellToSections.get(well.id);\n if (sectionNames && sectionNames.length > 0) {\n return { ...well, [ColumnType.wellSection]: sectionNames };\n }\n return well;\n });\n};\n\n/**\n * Transforms wells by adding coordinates and section information in one pass\n */\nexport const transformWells = <T extends WellWithId>(\n rawWells: T[] | null | undefined,\n subjectWellId: number | undefined | null,\n wellSections: WellSection[] | undefined | null,\n offsetWellsBySection: OffsetWellsBySection | undefined | null\n): (T & WithDistance & WithWellSection)[] | null => {\n if (!rawWells) return null;\n\n const wellsWithCoordinates = addCoordinatesToWells(rawWells, subjectWellId ?? undefined);\n\n return addSectionsToWells(wellsWithCoordinates, wellSections, offsetWellsBySection);\n};\n"],"names":["addCoordinatesToWells","wells","subjectWellId","subjectWell","find","well","id","subjectWellCoord","mapbox","map","coord","distance","_objectSpread","parseFloat","toFixed","_unused","addSectionsToWells","wellSections","offsetWellsBySection","filteredSections","filter","item","value","ALL_SECTION_KEY","wellToSections","Map","forEach","section","wellId","existing","get","push","label","set","sectionNames","length","ColumnType","wellSection","transformWells","rawWells","wellsWithCoordinates","undefined"],"mappings":"0sFAmBO,IAAMA,EAAwB,SACnCC,EACAC,GAEA,IAAKD,IAAUC,EAAe,OAAOD,EAErC,IAAME,EAAcF,EAAMG,MAAK,SAAAC,GAAI,OAAIA,EAAKC,KAAOJ,KAC7CK,EAAmBJ,GAAeK,EAA6BL,EAAa,WAElF,OAAKI,EAIEN,EAAMQ,KAAI,SAAAJ,GACf,IACE,IAAMK,EAAQF,EAA6BH,EAAM,WACjD,GAAIK,EAAO,CACT,IAAMC,EAAWH,EAAgCD,EAAkBG,GACnE,OAAAE,EAAAA,EAAA,CAAA,EAAYP,GAAI,CAAA,EAAA,CAAEM,SAAUE,WAAWF,EAASG,QAAQ,KAC1D,CACA,OAAOT,CAGT,CAFE,MAAMU,GACN,OAAOV,CACT,CACF,IAdSJ,CAeX,EAKae,EAAqB,SAChCf,EACAgB,EACAC,GAEA,IAAKjB,IAAUgB,IAAiBC,EAAsB,OAAOjB,EAE7D,IAAMkB,EAAmBF,EAAaG,QAAO,SAAAC,GAAI,OAAIA,EAAKC,QAAUC,KAG9DC,EAAiB,IAAIC,IAa3B,OAZAN,EAAiBO,SAAQ,SAAAC,IACPT,EAAqBS,EAAQL,QAAU,IAC/CI,SAAQ,SAAAE,GACd,IAAMC,EAAWL,EAAeM,IAAIF,GAChCC,EACFA,EAASE,KAAKJ,EAAQK,OAEtBR,EAAeS,IAAIL,EAAQ,CAACD,EAAQK,OAExC,GACF,IAEO/B,EAAMQ,KAAI,SAAAJ,GACf,IAAM6B,EAAeV,EAAeM,IAAIzB,EAAKC,IAC7C,OAAI4B,GAAgBA,EAAaC,OAAS,EACxCvB,EAAAA,EAAA,CAAA,EAAYP,GAAO+B,CAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAWC,YAAcH,IAEvC7B,CACT,GACF,EAKaiC,EAAiB,SAC5BC,EACArC,EACAe,EACAC,GAEA,IAAKqB,EAAU,OAAO,KAEtB,IAAMC,EAAuBxC,EAAsBuC,EAAUrC,QAAAA,OAAiBuC,GAE9E,OAAOzB,EAAmBwB,EAAsBvB,EAAcC,EAChE"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/slicedToArray";import l from"@babel/runtime/regenerator";import{useState as n,useEffect as s}from"react";import{ALL_SECTION_KEY as o}from"../constants.js";import{getCoordinatedWells as i}from"../utils/getCoordinatedWells.js";import"geolib";import"../../../utils/convert.js";import"moment";import"../../../utils/index.js";import"lodash";import{partitionSelectedWellIds as c,applyPartitionToOffsetSettings as a}from"./use-save-reset/partitionSelectedWellIds.js";function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function u(t){for(var r=1;r<arguments.length;r++){var l=null!=arguments[r]?arguments[r]:{};r%2?d(Object(l),!0).forEach((function(r){e(t,r,l[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(l)):d(Object(l)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(l,e))}))}return t}var f=function(e){var d=e.isAllWellsLoaded,f=e.syncAutoEnabled,p=e.isXtoIdas,b=e.offsetSettings,m=e.externalOffsets,W=e.subjectWellId,v=e.maxOffsetWellNumber,I=e.localMaxOffsetSize,j=e.idasWellIds,O=e.owsWellIds,y=e.wellhubWellIds,h=e.onSave,w=n(!0),g=r(w,2),x=g[0],S=g[1];s((function(){S(!0)}),[W]),s((function(){if(!p&&d){var e=function(){var e=t(l.mark((function e(){var t,r,n,s,d,f,p,w,g,x,S,P,k,D,A;return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m&&null!==W){e.next=2;break}return e.abrupt("return");case 2:if(t=void 0===(null==b?void 0:b.isSynced)||(null==b?void 0:b.isSynced),r=!0,!t){e.next=23;break}if(s=m[o]||[],d=new Set(s),f=((null==b?void 0:b.selectedWellIds)||[]).every((function(e){return d.has(e)})),s.length===(null==b||null===(n=b.selectedWellIds)||void 0===n?void 0:n.length)&&f){e.next=20;break}return e.next=11,i(s,W);case 11:p=e.sent,w=p.slice(0,I+1).map((function(e){return e.id})),g=c({selectedWellIds:w,subjectWellId:null!=W?W:void 0,idasWellIds:j,owsWellIds:O,wellhubWellIds:y}),x=a(u(u({},b),{},{subjectWellId:W,selectedWellIds:w,offsetWellsLimited:v<=w.length}),g),S=new Set(w),P=p.filter((function(e){return S.has(e.id)})),h(x,P),e.next=21;break;case 20:r=!1;case 21:e.next=24;break;case 23:r=!1;case 24:if(r){e.next=31;break}return e.next=27,i((null==b?void 0:b.selectedWellIds)||[],W);case 27:k=e.sent,D=c({selectedWellIds:(null==b?void 0:b.selectedWellIds)||[],subjectWellId:null!=W?W:void 0,idasWellIds:j,owsWellIds:O,wellhubWellIds:y}),A=a(u({},b),D),h(A,k);case 31:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();f&&x&&b&&m&&(e(),S(!1))}}),[b,m,W,v,f,p,d,x,I,j,O,y,h])};export{f as useAutoSyncOffsetWells};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/regenerator";import{useState as o,useEffect as i}from"react";import{ALL_SECTION_KEY as n}from"../constants.js";import{getCoordinatedWells as l}from"../utils/getCoordinatedWells.js";import"geolib";import"../../../utils/convert.js";import"moment";import"../../UserMention/utils/index.js";import"../../../constants/completion.js";import"../../../constants/alerts.js";import"../../../utils/casing/validation.js";import"lodash/mean";import"lodash";import"../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"query-string";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../utils/ga.js";import"../../../utils/goalsConfig/goalsConfig.js";import"../../../utils/lasParser.js";import"../../../utils/main.js";import"../../../utils/metrics/metricsConfig.js";import"../../../utils/mobileDetect.js";import"../../../utils/feed.js";import"../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../utils/dashboardReports.js";import"../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../utils/jsonaDataFormatter.js";import"../../../utils/bha.js";import"jsona";import"../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../utils/charts/Styles.scss.js";import"../../../utils/getSingleAsset.js";import{partitionSelectedWellIds as a,applyPartitionToOffsetSettings as p}from"./use-save-reset/partitionSelectedWellIds.js";function m(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,r)}return s}function c(t){for(var s=1;s<arguments.length;s++){var r=null!=arguments[s]?arguments[s]:{};s%2?m(Object(r),!0).forEach((function(s){e(t,s,r[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var u=function(e){var m=e.isAllWellsLoaded,u=e.syncAutoEnabled,d=e.isXtoIdas,f=e.offsetSettings,j=e.externalOffsets,b=e.subjectWellId,g=e.maxOffsetWellNumber,h=e.localMaxOffsetSize,v=e.idasWellIds,W=e.owsWellIds,y=e.wellhubWellIds,I=e.onSave,O=o(!0),x=s(O,2),w=x[0],S=x[1];i((function(){S(!0)}),[b]),i((function(){if(!d&&m){var e=function(){var e=t(r.mark((function e(){var t,s,o,i,m,u,d,O,x,w,S,P,k,D,A;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j&&null!==b){e.next=2;break}return e.abrupt("return");case 2:if(t=void 0===(null==f?void 0:f.isSynced)||(null==f?void 0:f.isSynced),s=!0,!t){e.next=23;break}if(i=j[n]||[],m=new Set(i),u=((null==f?void 0:f.selectedWellIds)||[]).every((function(e){return m.has(e)})),i.length===(null==f||null===(o=f.selectedWellIds)||void 0===o?void 0:o.length)&&u){e.next=20;break}return e.next=11,l(i,b);case 11:d=e.sent,O=d.slice(0,h+1).map((function(e){return e.id})),x=a({selectedWellIds:O,subjectWellId:null!=b?b:void 0,idasWellIds:v,owsWellIds:W,wellhubWellIds:y}),w=p(c(c({},f),{},{subjectWellId:b,selectedWellIds:O,offsetWellsLimited:g<=O.length}),x),S=new Set(O),P=d.filter((function(e){return S.has(e.id)})),I(w,P),e.next=21;break;case 20:s=!1;case 21:e.next=24;break;case 23:s=!1;case 24:if(s){e.next=31;break}return e.next=27,l((null==f?void 0:f.selectedWellIds)||[],b);case 27:k=e.sent,D=a({selectedWellIds:(null==f?void 0:f.selectedWellIds)||[],subjectWellId:null!=b?b:void 0,idasWellIds:v,owsWellIds:W,wellhubWellIds:y}),A=p(c({},f),D),I(A,k);case 31:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();u&&w&&f&&j&&(e(),S(!1))}}),[f,j,b,g,u,d,m,w,h,v,W,y,I])};export{u as useAutoSyncOffsetWells};
2
2
  //# sourceMappingURL=useAutoSyncOffsetWells.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoSyncOffsetWells.js","sources":["../../../../src/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { ALL_SECTION_KEY } from '../constants';\nimport { getCoordinatedWells } from '../utils';\nimport type {\n OffsetSettingsInput,\n OffsetSettingsOutput,\n OffsetWell,\n} from '../OffsetWellPickerV5.types';\n\nimport type { OffsetWellsBySection } from './useExternalOffsets';\nimport {\n partitionSelectedWellIds,\n applyPartitionToOffsetSettings,\n} from './use-save-reset/partitionSelectedWellIds';\n\ntype UseAutoSyncOffsetWellsParams = {\n isAllWellsLoaded: boolean;\n syncAutoEnabled: boolean;\n isXtoIdas: boolean;\n offsetSettings: OffsetSettingsInput | undefined;\n externalOffsets: OffsetWellsBySection | null;\n subjectWellId: number | null;\n maxOffsetWellNumber: number;\n localMaxOffsetSize: number;\n idasWellIds: number[];\n owsWellIds: number[];\n wellhubWellIds: number[];\n onSave: (offsetSettings: OffsetSettingsOutput, selectedWells?: OffsetWell[]) => void;\n};\n\n/**\n * Auto-syncs offset wells from BIC well recommendations when syncAutoEnabled is true.\n * Runs once when the app first loads with valid offset settings and BIC data.\n *\n * Skipped for XTO IDAS users: their authoritative path is the explicit \"Sync with\n * IDAS\" header action, which triggers a backend recompute. Auto-saving the initial\n * BIC snapshot on mount would silently pin pre-resync state and make Cancel a no-op.\n */\nexport const useAutoSyncOffsetWells = ({\n isAllWellsLoaded,\n syncAutoEnabled,\n isXtoIdas,\n offsetSettings,\n externalOffsets,\n subjectWellId,\n maxOffsetWellNumber,\n localMaxOffsetSize,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n onSave,\n}: UseAutoSyncOffsetWellsParams): void => {\n const [appLoading, setAppLoading] = useState(true);\n\n // Reset appLoading when subject well changes so sync can re-trigger\n useEffect(() => {\n setAppLoading(true);\n }, [subjectWellId]);\n\n useEffect(() => {\n if (isXtoIdas) {\n return;\n }\n if (!isAllWellsLoaded) {\n return;\n }\n\n const syncOffsetWells = async () => {\n if (!externalOffsets || subjectWellId === null) return;\n\n const isSynced = typeof offsetSettings?.isSynced === 'undefined' || offsetSettings?.isSynced;\n\n let offsetWellsChanged = true;\n\n if (isSynced) {\n const externalOffsetsIds = externalOffsets[ALL_SECTION_KEY] || [];\n const externalOffsetsIdsSet = new Set(externalOffsetsIds);\n const isMatched = (offsetSettings?.selectedWellIds || []).every(wellId =>\n externalOffsetsIdsSet.has(wellId)\n );\n\n if (externalOffsetsIds.length !== offsetSettings?.selectedWellIds?.length || !isMatched) {\n const wellsByDistance = await getCoordinatedWells(externalOffsetsIds, subjectWellId);\n const selectedWellIds = wellsByDistance\n .slice(0, localMaxOffsetSize + 1)\n .map((well: { id: number }) => well.id);\n const partition = partitionSelectedWellIds({\n selectedWellIds,\n subjectWellId: subjectWellId ?? undefined,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n });\n const newOffsetSetting = applyPartitionToOffsetSettings(\n {\n ...offsetSettings,\n subjectWellId,\n selectedWellIds,\n offsetWellsLimited: maxOffsetWellNumber <= selectedWellIds.length,\n },\n partition\n );\n const selectedWellIdsSet = new Set(selectedWellIds);\n const offsetWells = wellsByDistance.filter((well: { id: number }) =>\n selectedWellIdsSet.has(well.id)\n );\n\n onSave(newOffsetSetting as OffsetSettingsOutput, offsetWells as OffsetWell[]);\n } else {\n offsetWellsChanged = false;\n }\n } else {\n offsetWellsChanged = false;\n }\n\n if (!offsetWellsChanged) {\n const offsetWells = await getCoordinatedWells(\n offsetSettings?.selectedWellIds || [],\n subjectWellId\n );\n const partition = partitionSelectedWellIds({\n selectedWellIds: offsetSettings?.selectedWellIds || [],\n subjectWellId: subjectWellId ?? undefined,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n });\n const newOffsetSetting = applyPartitionToOffsetSettings({ ...offsetSettings }, partition);\n onSave(newOffsetSetting as OffsetSettingsOutput, offsetWells as OffsetWell[]);\n }\n };\n\n if (syncAutoEnabled && appLoading && offsetSettings && externalOffsets) {\n syncOffsetWells();\n setAppLoading(false);\n }\n }, [\n offsetSettings,\n externalOffsets,\n subjectWellId,\n maxOffsetWellNumber,\n syncAutoEnabled,\n isXtoIdas,\n isAllWellsLoaded,\n appLoading,\n localMaxOffsetSize,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n onSave,\n ]);\n};\n"],"names":["useAutoSyncOffsetWells","_ref","isAllWellsLoaded","syncAutoEnabled","isXtoIdas","offsetSettings","externalOffsets","subjectWellId","maxOffsetWellNumber","localMaxOffsetSize","idasWellIds","owsWellIds","wellhubWellIds","onSave","useState","_useState2","_slicedToArray","_useState","appLoading","setAppLoading","useEffect","syncOffsetWells","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","isSynced","offsetWellsChanged","_offsetSettings$selec","externalOffsetsIds","externalOffsetsIdsSet","isMatched","wellsByDistance","selectedWellIds","partition","newOffsetSetting","selectedWellIdsSet","offsetWells","_offsetWells","_partition","_newOffsetSetting","wrap","_context","prev","next","abrupt","ALL_SECTION_KEY","Set","every","wellId","has","length","getCoordinatedWells","sent","slice","map","well","id","partitionSelectedWellIds","undefined","applyPartitionToOffsetSettings","_objectSpread","offsetWellsLimited","filter","stop","apply","this","arguments"],"mappings":"4pCAuCaA,IAAAA,EAAyB,SAaIC,GAAA,IAZxCC,IAAAA,iBACAC,IAAAA,gBACAC,IAAAA,UACAC,IAAAA,eACAC,IAAAA,gBACAC,IAAAA,cACAC,IAAAA,oBACAC,IAAAA,mBACAC,IAAAA,YACAC,IAAAA,WACAC,IAAAA,eACAC,IAAAA,OAEoCC,EAAAA,GAAS,GAAKC,EAAAC,EAAAC,EAAA,GAA3CC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAGhCK,GAAU,WACRD,GAAc,EAChB,GAAG,CAACZ,IAEJa,GAAU,WACR,IAAIhB,GAGCF,EAAL,CAIA,IAAMmB,EAAe,WAAA,IAAGC,EAAAC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAjB,EAAAkB,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,GACjBvC,GAAqC,OAAlBC,EAAsB,CAAAoC,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAG,OAAA,UAAA,KAAA,EAIjB,GAFvBnB,OAA+C,KAA7BtB,aAAc,EAAdA,EAAgBsB,YAA4BtB,aAAAA,EAAAA,EAAgBsB,UAEhFC,GAAqB,GAErBD,EAAQ,CAAAgB,EAAAE,KAAA,GAAA,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B7B,eAAAA,EAAgB6B,kBAAmB,GACpD3B,cAAeA,QAAAA,OAAiBqD,EAChClD,YAAAA,EACAC,WAAAA,EACAC,eAAAA,IAEIwB,EAAmByB,EAA8BC,EAAA,CAAA,EAAMzD,GAAkB8B,GAC/EtB,EAAOuB,EAA0CE,GAA6B,KAAA,GAAA,IAAA,MAAA,OAAAK,EAAAsB,OAAA,GAAAvC,EAEjF,KAAA,OAAA,WA/DoB,OAAAJ,EAAA4C,MAAAC,KAAAC,UAAA,EAAA,GAiEjBjE,GAAmBe,GAAcb,GAAkBC,IACrDe,IACAF,GAAc,GArEhB,CAuEF,GAAG,CACDd,EACAC,EACAC,EACAC,EACAL,EACAC,EACAF,EACAgB,EACAT,EACAC,EACAC,EACAC,EACAC,GAEJ"}
1
+ {"version":3,"file":"useAutoSyncOffsetWells.js","sources":["../../../../src/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { ALL_SECTION_KEY } from '../constants';\nimport { getCoordinatedWells } from '../utils';\nimport type {\n OffsetSettingsInput,\n OffsetSettingsOutput,\n OffsetWell,\n} from '../OffsetWellPickerV5.types';\n\nimport type { OffsetWellsBySection } from './useExternalOffsets';\nimport {\n partitionSelectedWellIds,\n applyPartitionToOffsetSettings,\n} from './use-save-reset/partitionSelectedWellIds';\n\ntype UseAutoSyncOffsetWellsParams = {\n isAllWellsLoaded: boolean;\n syncAutoEnabled: boolean;\n isXtoIdas: boolean;\n offsetSettings: OffsetSettingsInput | undefined;\n externalOffsets: OffsetWellsBySection | null;\n subjectWellId: number | null;\n maxOffsetWellNumber: number;\n localMaxOffsetSize: number;\n idasWellIds: number[];\n owsWellIds: number[];\n wellhubWellIds: number[];\n onSave: (offsetSettings: OffsetSettingsOutput, selectedWells?: OffsetWell[]) => void;\n};\n\n/**\n * Auto-syncs offset wells from BIC well recommendations when syncAutoEnabled is true.\n * Runs once when the app first loads with valid offset settings and BIC data.\n *\n * Skipped for XTO IDAS users: their authoritative path is the explicit \"Sync with\n * IDAS\" header action, which triggers a backend recompute. Auto-saving the initial\n * BIC snapshot on mount would silently pin pre-resync state and make Cancel a no-op.\n */\nexport const useAutoSyncOffsetWells = ({\n isAllWellsLoaded,\n syncAutoEnabled,\n isXtoIdas,\n offsetSettings,\n externalOffsets,\n subjectWellId,\n maxOffsetWellNumber,\n localMaxOffsetSize,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n onSave,\n}: UseAutoSyncOffsetWellsParams): void => {\n const [appLoading, setAppLoading] = useState(true);\n\n // Reset appLoading when subject well changes so sync can re-trigger\n useEffect(() => {\n setAppLoading(true);\n }, [subjectWellId]);\n\n useEffect(() => {\n if (isXtoIdas) {\n return;\n }\n if (!isAllWellsLoaded) {\n return;\n }\n\n const syncOffsetWells = async () => {\n if (!externalOffsets || subjectWellId === null) return;\n\n const isSynced = typeof offsetSettings?.isSynced === 'undefined' || offsetSettings?.isSynced;\n\n let offsetWellsChanged = true;\n\n if (isSynced) {\n const externalOffsetsIds = externalOffsets[ALL_SECTION_KEY] || [];\n const externalOffsetsIdsSet = new Set(externalOffsetsIds);\n const isMatched = (offsetSettings?.selectedWellIds || []).every(wellId =>\n externalOffsetsIdsSet.has(wellId)\n );\n\n if (externalOffsetsIds.length !== offsetSettings?.selectedWellIds?.length || !isMatched) {\n const wellsByDistance = await getCoordinatedWells(externalOffsetsIds, subjectWellId);\n const selectedWellIds = wellsByDistance\n .slice(0, localMaxOffsetSize + 1)\n .map((well: { id: number }) => well.id);\n const partition = partitionSelectedWellIds({\n selectedWellIds,\n subjectWellId: subjectWellId ?? undefined,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n });\n const newOffsetSetting = applyPartitionToOffsetSettings(\n {\n ...offsetSettings,\n subjectWellId,\n selectedWellIds,\n offsetWellsLimited: maxOffsetWellNumber <= selectedWellIds.length,\n },\n partition\n );\n const selectedWellIdsSet = new Set(selectedWellIds);\n const offsetWells = wellsByDistance.filter((well: { id: number }) =>\n selectedWellIdsSet.has(well.id)\n );\n\n onSave(newOffsetSetting as OffsetSettingsOutput, offsetWells as OffsetWell[]);\n } else {\n offsetWellsChanged = false;\n }\n } else {\n offsetWellsChanged = false;\n }\n\n if (!offsetWellsChanged) {\n const offsetWells = await getCoordinatedWells(\n offsetSettings?.selectedWellIds || [],\n subjectWellId\n );\n const partition = partitionSelectedWellIds({\n selectedWellIds: offsetSettings?.selectedWellIds || [],\n subjectWellId: subjectWellId ?? undefined,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n });\n const newOffsetSetting = applyPartitionToOffsetSettings({ ...offsetSettings }, partition);\n onSave(newOffsetSetting as OffsetSettingsOutput, offsetWells as OffsetWell[]);\n }\n };\n\n if (syncAutoEnabled && appLoading && offsetSettings && externalOffsets) {\n syncOffsetWells();\n setAppLoading(false);\n }\n }, [\n offsetSettings,\n externalOffsets,\n subjectWellId,\n maxOffsetWellNumber,\n syncAutoEnabled,\n isXtoIdas,\n isAllWellsLoaded,\n appLoading,\n localMaxOffsetSize,\n idasWellIds,\n owsWellIds,\n wellhubWellIds,\n onSave,\n ]);\n};\n"],"names":["useAutoSyncOffsetWells","_ref","isAllWellsLoaded","syncAutoEnabled","isXtoIdas","offsetSettings","externalOffsets","subjectWellId","maxOffsetWellNumber","localMaxOffsetSize","idasWellIds","owsWellIds","wellhubWellIds","onSave","useState","_useState2","_slicedToArray","_useState","appLoading","setAppLoading","useEffect","syncOffsetWells","_ref2","_asyncToGenerator","_regeneratorRuntime","mark","_callee","isSynced","offsetWellsChanged","_offsetSettings$selec","externalOffsetsIds","externalOffsetsIdsSet","isMatched","wellsByDistance","selectedWellIds","partition","newOffsetSetting","selectedWellIdsSet","offsetWells","_offsetWells","_partition","_newOffsetSetting","wrap","_context","prev","next","abrupt","ALL_SECTION_KEY","Set","every","wellId","has","length","getCoordinatedWells","sent","slice","map","well","id","partitionSelectedWellIds","undefined","applyPartitionToOffsetSettings","_objectSpread","offsetWellsLimited","filter","stop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KAAAC,UAAA,EAAA,GAiEjBjE,GAAmBe,GAAcb,GAAkBC,IACrDe,IACAF,GAAc,GArEhB,CAuEF,GAAG,CACDd,EACAC,EACAC,EACAC,EACAL,EACAC,EACAF,EACAgB,EACAT,EACAC,EACAC,EACAC,EACAC,GAEJ"}
@@ -1,2 +1,2 @@
1
- import{checkIsUserAdmin as t}from"../utils/checkIsUserAdmin.js";import{usePickerPropsStore as s}from"../stores/picker-props-store/usePickerPropsStore.js";import"../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"querystring";import"react";import"uuid/v1";import"lodash";import"../../../clients/subscriptions.v1.js";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"immutable";import"query-string";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/index.js";import"uuid";import"jsona";import"../../../utils/env.js";import"../../StatusBadge/constants.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../constants/streamSourceType.js";import"../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import{useAppCommons as o}from"../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../componentsV2/AppPanel/AppPanelsContext.js";var r=function(){var r,i=null===(r=o())||void 0===r?void 0:r.currentUser,n=s((function(t){return t.currentUser}));return t(null!=i?i:n)};export{r as useIsAdmin};
1
+ import{checkIsUserAdmin as t}from"../utils/checkIsUserAdmin.js";import{usePickerPropsStore as s}from"../stores/picker-props-store/usePickerPropsStore.js";import"../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/regenerator";import"querystring";import"react";import"uuid/v1";import"lodash";import"../../../clients/subscriptions.v1.js";import"../../../clients/jsonApi/index.js";import"../../../clients/subscriptions/subscriptions-client.factory.js";import"query-string";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/alerts.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/completion.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import"../../UserMention/utils/index.js";import"../../../utils/convert.js";import"moment";import"../../../utils/casing/validation.js";import"lodash/mean";import"../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../utils/ga.js";import"../../../utils/goalsConfig/goalsConfig.js";import"../../../utils/lasParser.js";import"../../../utils/main.js";import"../../../utils/metrics/metricsConfig.js";import"../../../utils/mobileDetect.js";import"../../../utils/feed.js";import"../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../utils/dashboardReports.js";import"../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../utils/jsonaDataFormatter.js";import"../../../utils/bha.js";import"jsona";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../utils/charts/Styles.scss.js";import"../../../utils/getSingleAsset.js";import"uuid";import"../../StatusBadge/constants.js";import"lodash/unset";import"../../../clients/api/apiCore.js";import"../../../clients/constants.js";import"../../../clients/sso/auth0.js";import"../../../clients/sso/oauth2.js";import"../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import{useAppCommons as o}from"../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../componentsV2/AppPanel/AppPanelsContext.js";var i=function(){var i,r=null===(i=o())||void 0===i?void 0:i.currentUser,e=s((function(t){return t.currentUser}));return t(null!=r?r:e)};export{i as useIsAdmin};
2
2
  //# sourceMappingURL=useIsAdmin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useIsAdmin.js","sources":["../../../../src/components/OffsetWellPickerV5/hooks/useIsAdmin.ts"],"sourcesContent":["import { checkIsUserAdmin } from '../utils/checkIsUserAdmin';\nimport { usePickerPropsStore } from '../stores/picker-props-store/usePickerPropsStore';\n\nimport { useAppCommons } from '~/effects';\n\nexport const useIsAdmin = (): boolean => {\n const appCommonsUser = useAppCommons()?.currentUser;\n const pickerPropsUser = usePickerPropsStore(state => state.currentUser);\n\n return checkIsUserAdmin(appCommonsUser ?? pickerPropsUser);\n};\n"],"names":["useIsAdmin","_useAppCommons","appCommonsUser","useAppCommons","currentUser","pickerPropsUser","usePickerPropsStore","state","checkIsUserAdmin"],"mappings":"u8DAKaA,IAAAA,EAAa,WAAe,IAAAC,EACjCC,EAAgC,QAAfC,EAAAA,WAAe,IAAAF,OAAA,EAAfA,EAAiBG,YAClCC,EAAkBC,GAAoB,SAAAC,GAAK,OAAIA,EAAMH,eAE3D,OAAOI,EAAiBN,QAAAA,EAAkBG,EAC5C"}
1
+ {"version":3,"file":"useIsAdmin.js","sources":["../../../../src/components/OffsetWellPickerV5/hooks/useIsAdmin.ts"],"sourcesContent":["import { checkIsUserAdmin } from '../utils/checkIsUserAdmin';\nimport { usePickerPropsStore } from '../stores/picker-props-store/usePickerPropsStore';\n\nimport { useAppCommons } from '~/effects';\n\nexport const useIsAdmin = (): boolean => {\n const appCommonsUser = useAppCommons()?.currentUser;\n const pickerPropsUser = usePickerPropsStore(state => state.currentUser);\n\n return checkIsUserAdmin(appCommonsUser ?? pickerPropsUser);\n};\n"],"names":["useIsAdmin","_useAppCommons","appCommonsUser","useAppCommons","currentUser","pickerPropsUser","usePickerPropsStore","state","checkIsUserAdmin"],"mappings":"+2FAKaA,IAAAA,EAAa,WAAe,IAAAC,EACjCC,EAAgC,QAAfC,EAAAA,WAAe,IAAAF,OAAA,EAAfA,EAAiBG,YAClCC,EAAkBC,GAAoB,SAAAC,GAAK,OAAIA,EAAMH,eAE3D,OAAOI,EAAiBN,QAAAA,EAAkBG,EAC5C"}
@@ -1,2 +1,2 @@
1
- import{useEffect as t}from"react";import"../../../utils/index.js";import{showInfoNotification as o}from"../../../utils/notificationToasts.js";var i=function(i,n,r){t((function(){i&&n&&o("App can't process more than (".concat(r-1,") Offset Wells."))}),[n,i,r])};export{i as useLimitNotification};
1
+ import{useEffect as t}from"react";import"../../UserMention/utils/index.js";import"@babel/runtime/helpers/defineProperty";import"../../../utils/convert.js";import"../../../constants/completion.js";import"moment";import"../../../constants/alerts.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../utils/casing/validation.js";import"@babel/runtime/helpers/slicedToArray";import"lodash/mean";import"lodash";import"../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"query-string";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../utils/ga.js";import"../../../utils/goalsConfig/goalsConfig.js";import"../../../utils/lasParser.js";import"../../../utils/main.js";import"../../../utils/metrics/metricsConfig.js";import"../../../utils/mobileDetect.js";import"../../../utils/feed.js";import"../../../utils/reports.js";import"moment-timezone";import{showInfoNotification as s}from"../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../utils/dashboardReports.js";import"../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../utils/jsonaDataFormatter.js";import"../../../utils/bha.js";import"jsona";import"../../../clients/jsonApi/index.js";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../utils/charts/Styles.scss.js";import"../../../utils/getSingleAsset.js";var o=function(o,i,r){t((function(){o&&i&&s("App can't process more than (".concat(r-1,") Offset Wells."))}),[i,o,r])};export{o as useLimitNotification};
2
2
  //# sourceMappingURL=useLimitNotification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLimitNotification.js","sources":["../../../../src/components/OffsetWellPickerV5/hooks/useLimitNotification.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { showInfoNotification } from '~/utils';\n\nexport const useLimitNotification = (\n open: boolean | undefined,\n isLimitedOffsetWells: boolean,\n maxOffsetWellNumber: number\n): void => {\n useEffect(() => {\n if (open && isLimitedOffsetWells) {\n showInfoNotification(\n `App can't process more than (${maxOffsetWellNumber - 1}) Offset Wells.`\n );\n }\n }, [isLimitedOffsetWells, open, maxOffsetWellNumber]);\n};\n"],"names":["useLimitNotification","open","isLimitedOffsetWells","maxOffsetWellNumber","useEffect","showInfoNotification"],"mappings":"8IAIO,IAAMA,EAAuB,SAClCC,EACAC,EACAC,GAEAC,GAAU,WACJH,GAAQC,GACVG,EACkCF,gCAAAA,OAAAA,EAAsB,EACvD,mBAEJ,GAAE,CAACD,EAAsBD,EAAME,GAClC"}
1
+ {"version":3,"file":"useLimitNotification.js","sources":["../../../../src/components/OffsetWellPickerV5/hooks/useLimitNotification.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { showInfoNotification } from '~/utils';\n\nexport const useLimitNotification = (\n open: boolean | undefined,\n isLimitedOffsetWells: boolean,\n maxOffsetWellNumber: number\n): void => {\n useEffect(() => {\n if (open && isLimitedOffsetWells) {\n showInfoNotification(\n `App can't process more than (${maxOffsetWellNumber - 1}) Offset Wells.`\n );\n }\n }, [isLimitedOffsetWells, open, maxOffsetWellNumber]);\n};\n"],"names":["useLimitNotification","open","isLimitedOffsetWells","maxOffsetWellNumber","useEffect","showInfoNotification"],"mappings":"2+DAIO,IAAMA,EAAuB,SAClCC,EACAC,EACAC,GAEAC,GAAU,WACJH,GAAQC,GACVG,EACkCF,gCAAAA,OAAAA,EAAsB,EACvD,mBAEJ,GAAE,CAACD,EAAsBD,EAAME,GAClC"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/regenerator";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";import"@babel/runtime/helpers/slicedToArray";import{resyncIdasWells as r}from"../../api/external-offsets/resyncIdasWells.js";import{IdasResyncStatus as n}from"./idas-resync.types.js";import{getIdasResyncChannel as s}from"./idasResyncChannel.js";import{subscribeToIdasResync as i}from"./subscribeToIdasResync.js";import"../../../../utils/index.js";import{showErrorNotification as o,showSuccessNotification as a}from"../../../../utils/notificationToasts.js";var u={multiline:!0,autoHideDuration:1e4},c=function(){},l=function(l){var p,f=null,m=null,d=!1,v={assetId:null,currentUser:void 0,loadExternalOffsets:(p=t(e.mark((function t(){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",void 0);case 1:case"end":return t.stop()}}),t)}))),function(){return p.apply(this,arguments)})},h=function(t){var e;l.setState({status:t,isResyncInFlight:(e=t,e===n.TRIGGERED||e===n.RUNNING)})},b=function(){var t;null===(t=m)||void 0===t||t(),m=null},y=function(){f=null},j=function(){b(),y()},I=function(t){d&&(o(t,u),h(n.FAILED))},x=function(t,e){d&&t===f&&(y(),a(e,u),h(n.SUCCEEDED))},g=function(){var r=t(e.mark((function t(r,n){return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,v.loadExternalOffsets();case 3:return t.prev=3,x(r,n),t.finish(3);case 6:case"end":return t.stop()}}),t,null,[[0,,3,6]])})));return function(t,e){return r.apply(this,arguments)}}(),R=function(t,e){t===f&&(j(),I(e||"Re-sync wells from IDAS failed"))},E=function(){var n=t(e.mark((function t(n){var s,i;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(s=v.currentUser)&&s.id){t.next=4;break}return R(n,void 0),t.abrupt("return");case 4:return t.prev=4,t.next=7,r(s,n);case 7:"failed"===(null==(i=t.sent)?void 0:i.state)&&R(n,i.fail_reason),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),R(n,t.t0 instanceof Error?t.t0.message:void 0);case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(t){return n.apply(this,arguments)}}(),w=function(){var t=v,e=t.assetId,r=t.currentUser;if(e&&null!=r&&r.id&&null===f){var o=e;f=o;var a=s(o);m=i(a,(function(t){return function(t,e){d&&t===f&&(b(),"success"===(null==e?void 0:e.status)?g(t,e.message):(y(),I((null==e?void 0:e.message)||"Re-sync wells from IDAS failed")))}(o,t)})),h(n.RUNNING),E(o)}};return{activate:function(){d=!0,l.setState({triggerResync:w})},deactivate:function(){d=!1,j(),l.setState({triggerResync:c})},update:function(t){null!==f&&t.assetId!==f&&l.getState().isResyncInFlight&&(j(),h(n.INITIAL)),v=t}}};export{l as createIdasResyncController};
1
+ import t from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/regenerator";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";import"@babel/runtime/helpers/slicedToArray";import{resyncIdasWells as r}from"../../api/external-offsets/resyncIdasWells.js";import{IdasResyncStatus as i}from"./idas-resync.types.js";import{getIdasResyncChannel as e}from"./idasResyncChannel.js";import{subscribeToIdasResync as n}from"./subscribeToIdasResync.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"file-saver";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/drillstring/conversion.js";import"lodash/cloneDeep";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import{showErrorNotification as o,showSuccessNotification as a}from"../../../../utils/notificationToasts.js";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";var p={multiline:!0,autoHideDuration:1e4},l=function(){},m=function(m){var u,c=null,f=null,d=!1,j={assetId:null,currentUser:void 0,loadExternalOffsets:(u=t(s.mark((function t(){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",void 0);case 1:case"end":return t.stop()}}),t)}))),function(){return u.apply(this,arguments)})},v=function(t){var s;m.setState({status:t,isResyncInFlight:(s=t,s===i.TRIGGERED||s===i.RUNNING)})},h=function(){var t;null===(t=f)||void 0===t||t(),f=null},b=function(){c=null},g=function(){h(),b()},y=function(t){d&&(o(t,p),v(i.FAILED))},I=function(t,s){d&&t===c&&(b(),a(s,p),v(i.SUCCEEDED))},x=function(){var r=t(s.mark((function t(r,i){return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,j.loadExternalOffsets();case 3:return t.prev=3,I(r,i),t.finish(3);case 6:case"end":return t.stop()}}),t,null,[[0,,3,6]])})));return function(t,s){return r.apply(this,arguments)}}(),R=function(t,s){t===c&&(g(),y(s||"Re-sync wells from IDAS failed"))},D=function(){var i=t(s.mark((function t(i){var e,n;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(e=j.currentUser)&&e.id){t.next=4;break}return R(i,void 0),t.abrupt("return");case 4:return t.prev=4,t.next=7,r(e,i);case 7:"failed"===(null==(n=t.sent)?void 0:n.state)&&R(i,n.fail_reason),t.next=14;break;case 11:t.prev=11,t.t0=t.catch(4),R(i,t.t0 instanceof Error?t.t0.message:void 0);case 14:case"end":return t.stop()}}),t,null,[[4,11]])})));return function(t){return i.apply(this,arguments)}}(),S=function(){var t=j,s=t.assetId,r=t.currentUser;if(s&&null!=r&&r.id&&null===c){var o=s;c=o;var a=e(o);f=n(a,(function(t){return function(t,s){d&&t===c&&(h(),"success"===(null==s?void 0:s.status)?x(t,s.message):(b(),y((null==s?void 0:s.message)||"Re-sync wells from IDAS failed")))}(o,t)})),v(i.RUNNING),D(o)}};return{activate:function(){d=!0,m.setState({triggerResync:S})},deactivate:function(){d=!1,g(),m.setState({triggerResync:l})},update:function(t){null!==c&&t.assetId!==c&&m.getState().isResyncInFlight&&(g(),v(i.INITIAL)),j=t}}};export{m as createIdasResyncController};
2
2
  //# sourceMappingURL=createIdasResyncController.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createIdasResyncController.js","sources":["../../../../../src/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.ts"],"sourcesContent":["import { resyncIdasWells } from '../../api';\nimport type { PickerPropsStore } from '../picker-props-store';\n\nimport type { IdasResyncStoreApi } from './createIdasResyncStore';\nimport {\n IdasResyncStatus,\n type IdasResyncStatusValue,\n type IdasSubscriptionPayload,\n} from './idas-resync.types';\nimport { getIdasResyncChannel } from './idasResyncChannel';\nimport { subscribeToIdasResync } from './subscribeToIdasResync';\n\nimport { showErrorNotification, showSuccessNotification } from '~/utils';\n\ntype ControllerUser = PickerPropsStore['currentUser'];\n\nexport type IdasResyncControllerInputs = {\n assetId: number | null;\n currentUser: ControllerUser;\n loadExternalOffsets: () => Promise<void>;\n};\n\nexport type IdasResyncController = {\n activate: () => void;\n deactivate: () => void;\n update: (inputs: IdasResyncControllerInputs) => void;\n};\n\nconst RESYNC_FAILED_FALLBACK = 'Re-sync wells from IDAS failed';\n\nconst TOAST_OPTIONS = { multiline: true, autoHideDuration: 10_000 };\n\nconst noop = (): void => undefined;\n\nconst isInFlightStatus = (status: IdasResyncStatusValue): boolean =>\n status === IdasResyncStatus.TRIGGERED || status === IdasResyncStatus.RUNNING;\n\n/**\n * Drives the IDAS re-sync state machine for a subject asset and writes its\n * state into `IdasResyncStore`. Consumers (e.g. `HeaderActions`,\n * `PickerModalActions`, `OffsetWellPickerV5`) subscribe via\n * `useIdasResyncStore` instead of having props drilled through the tree.\n *\n * Flow: subscribe → POST task → resolve via subscription event\n * ({ status, message }). The task-app response is used only for dual-track\n * failure detection (state === 'failed'); the underlying app's outcome is\n * carried by the subscription message.\n *\n * The socket is wired manually via `subscribeToIdasResync` rather than\n * `useSubscriptionsV2` because we want no historical fetch and explicit\n * single-shot teardown. See `subscribeToIdasResync.ts` for the rationale.\n *\n * We do NOT gate the POST on a socket ack: the upstream `_emit`\n * mis-routes the ack callback so it would never fire. The theoretical\n * race window (local listener attached but channel not yet registered\n * server-side) is dwarfed by worker latency.\n *\n * KNOWN LIMITATION: the subscription payload has no correlation/request id,\n * so a delayed event from a previous same-asset run — or another user's\n * same-asset run — could resolve the current run with the wrong outcome.\n * Tracked separately; backend needs to attach a request_id to the payload.\n *\n * Construction is side-effect-free. `activate()` installs `triggerResync`\n * into the store and arms the controller; `deactivate()` aborts any in-flight\n * resync and resets the store's `triggerResync` back to a noop. The pair is\n * idempotent so it survives React 18 StrictMode setup→cleanup→setup replay.\n */\nexport const createIdasResyncController = (storeApi: IdasResyncStoreApi): IdasResyncController => {\n let triggeredAssetId: number | null = null;\n let unsubscribe: (() => void) | null = null;\n let mounted = false;\n let inputs: IdasResyncControllerInputs = {\n assetId: null,\n currentUser: undefined,\n loadExternalOffsets: async () => undefined,\n };\n\n const setStatus = (next: IdasResyncStatusValue): void => {\n storeApi.setState({ status: next, isResyncInFlight: isInFlightStatus(next) });\n };\n\n const stopSubscription = (): void => {\n unsubscribe?.();\n unsubscribe = null;\n };\n\n const clearActive = (): void => {\n triggeredAssetId = null;\n };\n\n const abort = (): void => {\n stopSubscription();\n clearActive();\n };\n\n const showError = (message: string): void => {\n if (!mounted) {\n return;\n }\n\n showErrorNotification(message, TOAST_OPTIONS);\n setStatus(IdasResyncStatus.FAILED);\n };\n\n const finalizeSuccessIfCurrent = (capturedAssetId: number, message: string): void => {\n if (!mounted) {\n return;\n }\n\n if (capturedAssetId !== triggeredAssetId) {\n return;\n }\n\n clearActive();\n showSuccessNotification(message, TOAST_OPTIONS);\n setStatus(IdasResyncStatus.SUCCEEDED);\n };\n\n const finishSuccess = async (capturedAssetId: number, message: string): Promise<void> => {\n try {\n await inputs.loadExternalOffsets();\n } finally {\n finalizeSuccessIfCurrent(capturedAssetId, message);\n }\n };\n\n const handleSubscriptionMessage = (\n capturedAssetId: number,\n payload: IdasSubscriptionPayload\n ): void => {\n if (!mounted) {\n return;\n }\n\n if (capturedAssetId !== triggeredAssetId) {\n return;\n }\n\n stopSubscription();\n\n if (payload?.status === 'success') {\n finishSuccess(capturedAssetId, payload.message);\n } else {\n clearActive();\n showError(payload?.message || RESYNC_FAILED_FALLBACK);\n }\n };\n\n const handleTaskAppFailure = (capturedAssetId: number, reason: string | undefined): void => {\n if (capturedAssetId !== triggeredAssetId) {\n return;\n }\n\n abort();\n showError(reason || RESYNC_FAILED_FALLBACK);\n };\n\n const postResyncTask = async (capturedAssetId: number): Promise<void> => {\n const user = inputs.currentUser;\n\n if (!user?.id) {\n handleTaskAppFailure(capturedAssetId, undefined);\n return;\n }\n\n try {\n const response = await resyncIdasWells(user, capturedAssetId);\n\n if (response?.state === 'failed') {\n handleTaskAppFailure(capturedAssetId, response.fail_reason);\n }\n } catch (err) {\n handleTaskAppFailure(capturedAssetId, err instanceof Error ? err.message : undefined);\n }\n };\n\n const triggerResync = (): void => {\n const { assetId, currentUser } = inputs;\n\n if (!assetId || !currentUser?.id) {\n return;\n }\n\n // Ref-based in-flight guard so two synchronous calls (e.g. double-click\n // before React commits state) collapse to one subscribe.\n if (triggeredAssetId !== null) {\n return;\n }\n\n const capturedAssetId = assetId;\n triggeredAssetId = capturedAssetId;\n\n const channel = getIdasResyncChannel(capturedAssetId);\n\n unsubscribe = subscribeToIdasResync(channel, payload =>\n handleSubscriptionMessage(capturedAssetId, payload)\n );\n\n // We deliberately skip socket-ack gating and fire the POST immediately:\n // the upstream `SubscriptionsClientV2._emit` mis-uses `emitWithAck`, so\n // any ack we register never fires. Worker latency dwarfs the\n // listener-vs-channel-registration window, so the race is harmless in\n // practice.\n setStatus(IdasResyncStatus.RUNNING);\n postResyncTask(capturedAssetId);\n };\n\n return {\n activate: () => {\n mounted = true;\n storeApi.setState({ triggerResync });\n },\n deactivate: () => {\n mounted = false;\n abort();\n storeApi.setState({ triggerResync: noop });\n },\n update: next => {\n if (\n triggeredAssetId !== null &&\n next.assetId !== triggeredAssetId &&\n storeApi.getState().isResyncInFlight\n ) {\n abort();\n setStatus(IdasResyncStatus.INITIAL);\n }\n inputs = next;\n },\n };\n};\n"],"names":["TOAST_OPTIONS","multiline","autoHideDuration","noop","createIdasResyncController","storeApi","_loadExternalOffsets","triggeredAssetId","unsubscribe","mounted","inputs","assetId","currentUser","undefined","loadExternalOffsets","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","abrupt","stop","apply","this","arguments","setStatus","status","setState","isResyncInFlight","IdasResyncStatus","TRIGGERED","RUNNING","stopSubscription","_unsubscribe","clearActive","abort","showError","message","showErrorNotification","FAILED","finalizeSuccessIfCurrent","capturedAssetId","showSuccessNotification","SUCCEEDED","finishSuccess","_ref","_callee2","_context2","finish","_x","_x2","handleTaskAppFailure","reason","postResyncTask","_ref2","user","response","_context3","id","resyncIdasWells","sent","state","fail_reason","t0","Error","_callee3","_x3","triggerResync","_inputs","channel","getIdasResyncChannel","subscribeToIdasResync","payload","handleSubscriptionMessage","activate","deactivate","update","getState","INITIAL"],"mappings":"uuCA4BA,IAEMA,EAAgB,CAAEC,WAAW,EAAMC,iBAAkB,KAErDC,EAAO,WAAqB,EAmCrBC,EAA6B,SAACC,GACzC,IAMuBC,EANnBC,EAAkC,KAClCC,EAAmC,KACnCC,GAAU,EACVC,EAAqC,CACvCC,QAAS,KACTC,iBAAaC,EACbC,qBAAqBR,EAAAS,EAAAC,EAAAC,MAAA,SAAAC,IAAA,OAAAF,EAAAG,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,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,UAEvCH,IACAE,GAAUoC,aAAAA,EAAAA,EAASnC,UApHM,oCAuKzBoC,CAA0BhC,EAAiB+B,MAQ7C/C,EAAUI,EAAiBE,SAC3BsB,EAAeZ,EAjBf,GAoBF,MAAO,CACLiC,SAAU,WACRpE,GAAU,EACVJ,EAASyB,SAAS,CAAEwC,cAAAA,GACrB,EACDQ,WAAY,WACVrE,GAAU,EACV6B,IACAjC,EAASyB,SAAS,CAAEwC,cAAenE,GACpC,EACD4E,OAAQ,SAAAzD,GAEiB,OAArBf,GACAe,EAAKX,UAAYJ,GACjBF,EAAS2E,WAAWjD,mBAEpBO,IACAV,EAAUI,EAAiBiD,UAE7BvE,EAASY,CACX,EAEJ"}
1
+ {"version":3,"file":"createIdasResyncController.js","sources":["../../../../../src/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.ts"],"sourcesContent":["import { resyncIdasWells } from '../../api';\nimport type { PickerPropsStore } from '../picker-props-store';\n\nimport type { IdasResyncStoreApi } from './createIdasResyncStore';\nimport {\n IdasResyncStatus,\n type IdasResyncStatusValue,\n type IdasSubscriptionPayload,\n} from './idas-resync.types';\nimport { getIdasResyncChannel } from './idasResyncChannel';\nimport { subscribeToIdasResync } from './subscribeToIdasResync';\n\nimport { showErrorNotification, showSuccessNotification } from '~/utils';\n\ntype ControllerUser = PickerPropsStore['currentUser'];\n\nexport type IdasResyncControllerInputs = {\n assetId: number | null;\n currentUser: ControllerUser;\n loadExternalOffsets: () => Promise<void>;\n};\n\nexport type IdasResyncController = {\n activate: () => void;\n deactivate: () => void;\n update: (inputs: IdasResyncControllerInputs) => void;\n};\n\nconst RESYNC_FAILED_FALLBACK = 'Re-sync wells from IDAS failed';\n\nconst TOAST_OPTIONS = { multiline: true, autoHideDuration: 10_000 };\n\nconst noop = (): void => undefined;\n\nconst isInFlightStatus = (status: IdasResyncStatusValue): boolean =>\n status === IdasResyncStatus.TRIGGERED || status === IdasResyncStatus.RUNNING;\n\n/**\n * Drives the IDAS re-sync state machine for a subject asset and writes its\n * state into `IdasResyncStore`. Consumers (e.g. `HeaderActions`,\n * `PickerModalActions`, `OffsetWellPickerV5`) subscribe via\n * `useIdasResyncStore` instead of having props drilled through the tree.\n *\n * Flow: subscribe → POST task → resolve via subscription event\n * ({ status, message }). The task-app response is used only for dual-track\n * failure detection (state === 'failed'); the underlying app's outcome is\n * carried by the subscription message.\n *\n * The socket is wired manually via `subscribeToIdasResync` rather than\n * `useSubscriptionsV2` because we want no historical fetch and explicit\n * single-shot teardown. See `subscribeToIdasResync.ts` for the rationale.\n *\n * We do NOT gate the POST on a socket ack: the upstream `_emit`\n * mis-routes the ack callback so it would never fire. The theoretical\n * race window (local listener attached but channel not yet registered\n * server-side) is dwarfed by worker latency.\n *\n * KNOWN LIMITATION: the subscription payload has no correlation/request id,\n * so a delayed event from a previous same-asset run — or another user's\n * same-asset run — could resolve the current run with the wrong outcome.\n * Tracked separately; backend needs to attach a request_id to the payload.\n *\n * Construction is side-effect-free. `activate()` installs `triggerResync`\n * into the store and arms the controller; `deactivate()` aborts any in-flight\n * resync and resets the store's `triggerResync` back to a noop. The pair is\n * idempotent so it survives React 18 StrictMode setup→cleanup→setup replay.\n */\nexport const createIdasResyncController = (storeApi: IdasResyncStoreApi): IdasResyncController => {\n let triggeredAssetId: number | null = null;\n let unsubscribe: (() => void) | null = null;\n let mounted = false;\n let inputs: IdasResyncControllerInputs = {\n assetId: null,\n currentUser: undefined,\n loadExternalOffsets: async () => undefined,\n };\n\n const setStatus = (next: IdasResyncStatusValue): void => {\n storeApi.setState({ status: next, isResyncInFlight: isInFlightStatus(next) });\n };\n\n const stopSubscription = (): void => {\n unsubscribe?.();\n unsubscribe = null;\n };\n\n const clearActive = (): void => {\n triggeredAssetId = null;\n };\n\n const abort = (): void => {\n stopSubscription();\n clearActive();\n };\n\n const showError = (message: string): void => {\n if (!mounted) {\n return;\n }\n\n showErrorNotification(message, TOAST_OPTIONS);\n setStatus(IdasResyncStatus.FAILED);\n };\n\n const finalizeSuccessIfCurrent = (capturedAssetId: number, message: string): void => {\n if (!mounted) {\n return;\n }\n\n if (capturedAssetId !== triggeredAssetId) {\n return;\n }\n\n clearActive();\n showSuccessNotification(message, TOAST_OPTIONS);\n setStatus(IdasResyncStatus.SUCCEEDED);\n };\n\n const finishSuccess = async (capturedAssetId: number, message: string): Promise<void> => {\n try {\n await inputs.loadExternalOffsets();\n } finally {\n finalizeSuccessIfCurrent(capturedAssetId, message);\n }\n };\n\n const handleSubscriptionMessage = (\n capturedAssetId: number,\n payload: IdasSubscriptionPayload\n ): void => {\n if (!mounted) {\n return;\n }\n\n if (capturedAssetId !== triggeredAssetId) {\n return;\n }\n\n stopSubscription();\n\n if (payload?.status === 'success') {\n finishSuccess(capturedAssetId, payload.message);\n } else {\n clearActive();\n showError(payload?.message || RESYNC_FAILED_FALLBACK);\n }\n };\n\n const handleTaskAppFailure = (capturedAssetId: number, reason: string | undefined): void => {\n if (capturedAssetId !== triggeredAssetId) {\n return;\n }\n\n abort();\n showError(reason || RESYNC_FAILED_FALLBACK);\n };\n\n const postResyncTask = async (capturedAssetId: number): Promise<void> => {\n const user = inputs.currentUser;\n\n if (!user?.id) {\n handleTaskAppFailure(capturedAssetId, undefined);\n return;\n }\n\n try {\n const response = await resyncIdasWells(user, capturedAssetId);\n\n if (response?.state === 'failed') {\n handleTaskAppFailure(capturedAssetId, response.fail_reason);\n }\n } catch (err) {\n handleTaskAppFailure(capturedAssetId, err instanceof Error ? err.message : undefined);\n }\n };\n\n const triggerResync = (): void => {\n const { assetId, currentUser } = inputs;\n\n if (!assetId || !currentUser?.id) {\n return;\n }\n\n // Ref-based in-flight guard so two synchronous calls (e.g. double-click\n // before React commits state) collapse to one subscribe.\n if (triggeredAssetId !== null) {\n return;\n }\n\n const capturedAssetId = assetId;\n triggeredAssetId = capturedAssetId;\n\n const channel = getIdasResyncChannel(capturedAssetId);\n\n unsubscribe = subscribeToIdasResync(channel, payload =>\n handleSubscriptionMessage(capturedAssetId, payload)\n );\n\n // We deliberately skip socket-ack gating and fire the POST immediately:\n // the upstream `SubscriptionsClientV2._emit` mis-uses `emitWithAck`, so\n // any ack we register never fires. Worker latency dwarfs the\n // listener-vs-channel-registration window, so the race is harmless in\n // practice.\n setStatus(IdasResyncStatus.RUNNING);\n postResyncTask(capturedAssetId);\n };\n\n return {\n activate: () => {\n mounted = true;\n storeApi.setState({ triggerResync });\n },\n deactivate: () => {\n mounted = false;\n abort();\n storeApi.setState({ triggerResync: noop });\n },\n update: next => {\n if (\n triggeredAssetId !== null &&\n next.assetId !== triggeredAssetId &&\n storeApi.getState().isResyncInFlight\n ) {\n abort();\n setStatus(IdasResyncStatus.INITIAL);\n }\n inputs = next;\n },\n };\n};\n"],"names":["TOAST_OPTIONS","multiline","autoHideDuration","noop","createIdasResyncController","storeApi","_loadExternalOffsets","triggeredAssetId","unsubscribe","mounted","inputs","assetId","currentUser","undefined","loadExternalOffsets","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_context","prev","next","abrupt","stop","apply","this","arguments","setStatus","status","setState","isResyncInFlight","IdasResyncStatus","TRIGGERED","RUNNING","stopSubscription","_unsubscribe","clearActive","abort","showError","message","showErrorNotification","FAILED","finalizeSuccessIfCurrent","capturedAssetId","showSuccessNotification","SUCCEEDED","finishSuccess","_ref","_callee2","_context2","finish","_x","_x2","handleTaskAppFailure","reason","postResyncTask","_ref2","user","response","_context3","id","resyncIdasWells","sent","state","fail_reason","t0","Error","_callee3","_x3","triggerResync","_inputs","channel","getIdasResyncChannel","subscribeToIdasResync","payload","handleSubscriptionMessage","activate","deactivate","update","getState","INITIAL"],"mappings":"i1FA4BA,IAEMA,EAAgB,CAAEC,WAAW,EAAMC,iBAAkB,KAErDC,EAAO,WAAqB,EAmCrBC,EAA6B,SAACC,GACzC,IAMuBC,EANnBC,EAAkC,KAClCC,EAAmC,KACnCC,GAAU,EACVC,EAAqC,CACvCC,QAAS,KACTC,iBAAaC,EACbC,qBAAqBR,EAAAS,EAAAC,EAAA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IxB4B,IAEwB,aAApBwC,aAAO,EAAPA,EAAS9C,QACXkB,EAAcH,EAAiB+B,EAAQnC,UAEvCH,IACAE,GAAUoC,aAAAA,EAAAA,EAASnC,UApHM,oCAuKzBoC,CAA0BhC,EAAiB+B,MAQ7C/C,EAAUI,EAAiBE,SAC3BsB,EAAeZ,EAjBf,GAoBF,MAAO,CACLiC,SAAU,WACRpE,GAAU,EACVJ,EAASyB,SAAS,CAAEwC,cAAAA,GACrB,EACDQ,WAAY,WACVrE,GAAU,EACV6B,IACAjC,EAASyB,SAAS,CAAEwC,cAAenE,GACpC,EACD4E,OAAQ,SAAAzD,GAEiB,OAArBf,GACAe,EAAKX,UAAYJ,GACjBF,EAAS2E,WAAWjD,mBAEpBO,IACAV,EAAUI,EAAiBiD,UAE7BvE,EAASY,CACX,EAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"getCoordinatedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV5/utils/getCoordinatedWells.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA8BF,eAAO,MAAM,mBAAmB,YACrB,MAAM,EAAE,iBACF,MAAM,KACpB,OAAO,CAAC,eAAe,EAAE,CA0B3B,CAAC"}
1
+ {"version":3,"file":"getCoordinatedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV5/utils/getCoordinatedWells.ts"],"names":[],"mappings":"AAKA,KAAK,eAAe,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA8BF,eAAO,MAAM,mBAAmB,YACrB,MAAM,EAAE,iBACF,MAAM,KACpB,OAAO,CAAC,eAAe,EAAE,CAwB3B,CAAC"}
@@ -1,2 +1,2 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/regenerator";import{sortBy as n,get as a}from"lodash";import{getAssets as o}from"../../../clients/jsonApi/index.js";import{mapbox as s}from"../../../utils/index.js";function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=function(){var e=t(r.mark((function e(t){var n;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,null==t||!t.length){e.next=11;break}return e.prev=2,e.next=5,o({ids:t,fields:["asset.name","asset.top_hole","asset.settings"]});case 5:n=e.sent,e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:return e.abrupt("return",n?n.data.map((function(e){var t;return{id:Number(e.id),name:a(e,"attributes.name"),topHole:null!==(t=a(e,"attributes.top_hole"))&&void 0!==t?t:a(e,"attributes.settings.top_hole")}})):[]);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}(),p=function(){var e=t(r.mark((function e(a,o){var u,p,l,f;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c(a);case 2:if(u=e.sent,p=u.find((function(e){return e.id===o})),l=p&&s.getAssetV2Coordinates(p,"topHole")){e.next=7;break}return e.abrupt("return",u);case 7:return e.next=9,Promise.all(u.map(function(){var e=t(r.mark((function e(t){var n,a;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,s.getAssetV2Coordinates(t,"topHole");case 3:if(!(n=e.sent)){e.next=13;break}return e.t0=parseFloat,e.next=8,s.getDistanceByCoordinates(l,n);case 8:return e.t1=e.sent,a=(0,e.t0)(e.t1),e.abrupt("return",i(i({},t),{},{distance:parseFloat(a.toFixed(2))}));case 13:return e.abrupt("return",t);case 14:e.next=19;break;case 16:return e.prev=16,e.t2=e.catch(0),e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(t){return e.apply(this,arguments)}}()));case 9:return f=e.sent,e.abrupt("return",n(f,"distance"));case 11:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();export{p as getCoordinatedWells};
1
+ import t from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/regenerator";import{sortBy as s,get as n}from"lodash";import{getAssets as o}from"../../../clients/jsonApi/index.js";import"../../UserMention/utils/index.js";import"../../../utils/convert.js";import"../../../constants/completion.js";import"moment";import"../../../constants/alerts.js";import"../../../utils/casing/validation.js";import"@babel/runtime/helpers/slicedToArray";import"lodash/mean";import"../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"query-string";import"../../../constants/goals.js";import"../../../constants/segment.js";import"../../../constants/apps.js";import"../../../constants/drillstring.js";import"../../../constants/appPackages.js";import"../../../constants/notifications.js";import"../../../constants/feed.js";import"../../../constants/bha.js";import"../../../constants/corvaCompanyId.js";import"../../GradientManager/configuration/constants.js";import"../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../utils/ga.js";import"../../../utils/goalsConfig/goalsConfig.js";import"../../../utils/lasParser.js";import"../../../utils/main.js";import{getDistanceByCoordinates as i,getAssetV2Coordinates as a}from"../../../utils/mapbox.js";import"../../../utils/metrics/metricsConfig.js";import"../../../utils/mobileDetect.js";import"../../../utils/feed.js";import"../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../utils/dashboardReports.js";import"../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../utils/jsonaDataFormatter.js";import"../../../utils/bha.js";import"jsona";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../utils/charts/Styles.scss.js";import"../../../utils/getSingleAsset.js";function p(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);r&&(s=s.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,s)}return e}function m(r){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?p(Object(s),!0).forEach((function(e){t(r,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(s)):p(Object(s)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(s,t))}))}return r}var u=function(){var t=r(e.mark((function t(r){var s;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=null,null==r||!r.length){t.next=11;break}return t.prev=2,t.next=5,o({ids:r,fields:["asset.name","asset.top_hole","asset.settings"]});case 5:s=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0);case 11:return t.abrupt("return",s?s.data.map((function(t){var r;return{id:Number(t.id),name:n(t,"attributes.name"),topHole:null!==(r=n(t,"attributes.top_hole"))&&void 0!==r?r:n(t,"attributes.settings.top_hole")}})):[]);case 12:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(r){return t.apply(this,arguments)}}(),c=function(){var t=r(e.mark((function t(n,o){var p,c,l,b;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u(n);case 2:if(p=t.sent,c=p.find((function(t){return t.id===o})),l=c&&a(c,"topHole")){t.next=7;break}return t.abrupt("return",p);case 7:return t.next=9,Promise.all(p.map(function(){var t=r(e.mark((function t(r){var s,n;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,a(r,"topHole");case 3:if(!(s=t.sent)){t.next=9;break}return n=i(l,s),t.abrupt("return",m(m({},r),{},{distance:parseFloat(n.toFixed(2))}));case 9:return t.abrupt("return",r);case 10:t.next=15;break;case 12:return t.prev=12,t.t0=t.catch(0),t.abrupt("return",r);case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(r){return t.apply(this,arguments)}}()));case 9:return b=t.sent,t.abrupt("return",s(b,"distance"));case 11:case"end":return t.stop()}}),t)})));return function(r,e){return t.apply(this,arguments)}}();export{c as getCoordinatedWells};
2
2
  //# sourceMappingURL=getCoordinatedWells.js.map