@corva/ui 0.25.0-4 → 0.25.0-8

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 (89) hide show
  1. package/CLI/components/App/App.css.js +1 -1
  2. package/CLI/components/App/App.js +1 -1
  3. package/CLI/components/App/components/AppBar/AppBar.js +1 -1
  4. package/CLI/hocs/constants.js +1 -0
  5. package/CLI/hocs/utils.js +1 -1
  6. package/CLI/hocs/withAppDataProviderHOC.js +1 -1
  7. package/CLI/hocs/withCorvaMagicHOC.js +1 -1
  8. package/CLI/hocs/withDevCenterRouterHOC.js +1 -1
  9. package/CLI/hocs/withGridLayoutHOC/withGridLayoutHOC.js +1 -1
  10. package/CLI/hocs/withMUIProvidersHOC.js +1 -1
  11. package/CLI/hocs/withPDFLayoutHOC.js +1 -0
  12. package/CLI/hocs/withReactRouterHOC.js +1 -1
  13. package/CLI/screens/OAuthCallbackScreen/index.js +1 -1
  14. package/clients/api/apiCore.js +1 -1
  15. package/clients/clientStorage/core.js +1 -1
  16. package/components/Annotations/AnnotationsContext.js +1 -1
  17. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  18. package/components/Annotations/components/AnnotationsList/components/AnnotationComments/index.js +1 -1
  19. package/components/AssetEditor/effects/index.js +1 -1
  20. package/components/Attachment/index.js +1 -1
  21. package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  22. package/components/BICOffsetPickerDialog/components/WellSection/AutoCompleteAssetSearch/utils/apiCalls.js +1 -1
  23. package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  24. package/components/BICOffsetPickerDialog/index.js +1 -1
  25. package/components/Breadcrumbs/index.js +1 -1
  26. package/components/CollapsableSidebar.js +1 -1
  27. package/components/Comment/index.js +1 -1
  28. package/components/CommentInput/index.js +1 -1
  29. package/components/DevCenter/AppHeader/AppHeader.js +1 -1
  30. package/components/DevCenter/AppHeader/PadMode.js +1 -1
  31. package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
  32. package/components/DevCenter/AppsDataProvider/effects/dataResolvers.js +1 -1
  33. package/components/DevCenter/AppsDataProvider/effects/useAppsData.js +1 -1
  34. package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  35. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  36. package/components/DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js +1 -1
  37. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  38. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/RemoveAppButton.js +1 -1
  39. package/components/DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js +1 -1
  40. package/components/DevCenter/DevCenterAppContainer/effects/useAnnotationsData.js +1 -1
  41. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  42. package/components/FileUploadIconButton.js +1 -1
  43. package/components/FilesLoader/FilesLoader.js +1 -1
  44. package/components/FilesLoader/partials/Icons/DocFileIcon.js +1 -0
  45. package/components/FilesLoader/partials/Icons/ExelFileIcon.js +1 -0
  46. package/components/FilesLoader/partials/Icons/IconCancel.js +1 -0
  47. package/components/FilesLoader/partials/Icons/IconSuccess.js +1 -0
  48. package/components/FilesLoader/partials/Icons/IconWarning.js +1 -0
  49. package/components/FilesLoader/partials/Icons/PdfFileIcon.js +1 -0
  50. package/components/FilesLoader/partials/Icons/UnknownFileIcon.js +1 -0
  51. package/components/FilesLoader/partials/UploadingFileState/FileLoadingProgress.js +1 -0
  52. package/components/HeaderLayout/HeaderLayout.js +1 -1
  53. package/components/HeaderLayout/utils.js +1 -1
  54. package/components/InfiniteList/index.js +1 -1
  55. package/components/Notifications/NotificationsContainer.js +1 -1
  56. package/components/OffsetWellPickerV2/components/Table/index.js +1 -1
  57. package/components/OffsetWellPickerV2/constants.js +1 -1
  58. package/components/OffsetWellPickerV2/effects/index.js +1 -1
  59. package/components/OffsetWellPickerV2/utils/apiCalls.js +1 -1
  60. package/components/PadModeSelect/PadModeSelect.js +1 -1
  61. package/components/ParameterCharts/AddEditTrack.js +1 -1
  62. package/components/ParameterCharts/components/Track.js +1 -1
  63. package/components/ParameterCharts/components/TrackSettings.js +1 -1
  64. package/components/PostPreviewDialog/index.js +1 -1
  65. package/components/SlateFormattedText/SlateFormattedText.js +1 -1
  66. package/components/Template/TemplateSharingDialog/ChipSelector.js +1 -1
  67. package/components/VirtualizedTable/VirtualizedTable.js +1 -1
  68. package/components/WellSummary/WellSummaryItemValue.js +1 -1
  69. package/components/WellSummary/effects/useWellSummaryData.js +1 -1
  70. package/constants/apps.js +1 -1
  71. package/constants/index.js +1 -1
  72. package/constants/theme.js +1 -0
  73. package/package.json +1 -1
  74. package/utils/DrillstringUtils.js +1 -1
  75. package/utils/FluidCheckUtils.js +1 -1
  76. package/utils/apps.js +1 -0
  77. package/utils/casing/conversion.js +1 -1
  78. package/utils/casing/validation.js +1 -1
  79. package/utils/completion.js +1 -1
  80. package/utils/dashboardReports.js +1 -0
  81. package/utils/devcenter.js +1 -1
  82. package/utils/index.js +1 -1
  83. package/utils/lasParser.js +1 -1
  84. package/utils/main.js +1 -1
  85. package/utils/torqueAndHookloadUtils.js +1 -1
  86. package/components/FilesLoader/constants.js +0 -1
  87. package/components/FilesLoader/effects/useUploadingFile.js +0 -1
  88. package/components/FilesLoader/partials/FileIcon/FileIcon.js +0 -1
  89. package/components/FilesLoader/partials/UploadingFileState/UploadingFileState.js +0 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"lodash/set";import r from"lodash/get";import i from"moment";import{getUnitPreference as s,convertValue as o,getUnitDisplay as n}from"./convert.js";function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function l(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?a(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function _(e){return null==e||""===e}function h(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=i.isMinInclusive,o=void 0===s||s,n=parseFloat(e);return!Number.isNaN(n)&&(!(o&&n<t||!o&&n<=t)&&!(r&&n>r))}function g(e,t,r){var i=s("shortLength"),n=e,a=t;"in"!==i&&(n=o(e,"shortLength",i,"in"),a=o(t,"shortLength",i,"in"));var l=2.673*(a*a-n*n),_="in"!==i?o(l,"massPerLength","lb-ft"):l;return r>=.5*_&&r<=1.5*_}function d(e){var t=e.toJS().data,r=t.id,s=t.start_timestamp_str,a=t.start_depth,l=t.components,_=n("shortLength"),d=n("length"),m={general:{},components:{},specificErrors:{}},u=l.filter((function(e){return"bit"===e.family})),f=u.length>0?u[0].size:null,b=l.filter((function(e){return"mwd"===e.family&&e.has_gamma_sensor})),p=!1;if(isValueEmpty(r)&&(m.id="It should not be empty.",p=!0),s&&!i(new Date(s)).isValid()&&(p=!0,m.start_timestamp="Invalid Date."),Number.isFinite(a)){var v=o(0,"length","ft"),z=o(55e3,"length","ft"),w=o(1,"length","ft");(a<=v||a>z)&&(p=!0,m.start_depth="Should be a positive number ".concat(v.toFixed(2),"~").concat(z.toFixed(2)," (").concat(d,")")),a===w&&(p=!0,m.start_depth="Should not be equal to ".concat(w," (").concat(d,")"))}else p=!0,m.start_depth="It should not be empty.";for(var L=0;L<l.length;L+=1){var y=void 0,x=void 0,F=void 0,j=void 0,I=void 0,O=void 0,V=void 0,E=void 0,q=void 0,k=void 0,D=void 0,P=void 0,S=void 0,N=void 0,R=void 0,T=l[L],B={};switch(T.family){case"ct":y=o(0,"shortLength","in"),F=o(100,"shortLength","in"),x=o(1,"shortLength","in"),j=o(100,"shortLength","in"),N=o(0,"shortLength","in"),R=o(500,"shortLength","in"),V=o(0,"length","ft");break;case"dp":case"hwdp":y=o(1,"shortLength","in"),F=o(7,"shortLength","in"),x=o(2,"shortLength","in"),j=o(8,"shortLength","in"),E=o(1,"shortLength","in"),q=o(7,"shortLength","in"),k=o(2,"shortLength","in"),D=o(10,"shortLength","in"),V=o(0,"length","ft");break;case"dc":y=o(.5,"shortLength","in"),F=o(7,"shortLength","in"),x=o(2,"shortLength","in"),j=o(13,"shortLength","in"),V=o(0,"length","ft");break;case"stabilizer":y=o(0,"shortLength","in"),F=o(100,"shortLength","in"),x=o(1,"shortLength","in"),j=o(100,"shortLength","in"),V=o(0,"length","ft");break;case"pdm":x=o(2,"shortLength","in"),j=o(15,"shortLength","in"),y=o(0,"shortLength","in"),F=o(12,"shortLength","in"),V=o(4,"length","ft"),S=0;break;case"mwd":case"agitator":case"rss":x=o(2,"shortLength","in"),j=o(13,"shortLength","in"),y=o(0,"shortLength","in"),F=o(12,"shortLength","in"),V=o(1,"length","ft"),P=0;break;case"ur":y=o(0,"shortLength","in"),F=o(50,"shortLength","in"),x=o(1,"shortLength","in"),j=o(50,"shortLength","in"),I=o(1,"shortLength","in"),O=o(50,"shortLength","in");break;case"bit":break;default:y=o(0,"shortLength","in"),F=o(100,"shortLength","in"),x=o(1,"shortLength","in"),j=o(100,"shortLength","in"),V=o(0,"length","ft")}if(isValueEmpty(y)||isValueEmpty(x)||(h(T.inner_diameter,y,F)||(B.inner_diameter="".concat(y.toFixed(1),"~").concat(F.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter,x,j)||(B.outer_diameter="".concat(x.toFixed(1),"~").concat(j.toFixed(1)," (").concat(_,")"),p=!0),h(T.inner_diameter,y,F)&&h(T.outer_diameter,x,j)&&!h(T.inner_diameter,y,T.outer_diameter)&&(B.outer_diameter="O.D > I.D",p=!0),!B.outer_diameter&&f&&+T.outer_diameter+o(.1,"shortLength","in")>f&&(B.outer_diameter=" O.D + 0.1 < Bit Size",p=!0),h(T.linear_weight,0)||(B.linear_weight="Invalid value",p=!0),"dp"!==T.family&&"hwdp"!==T.family&&"dc"!==T.family&&"ct"!==T.family&&"ur"!==T.family||B.inner_diameter||B.outer_diameter||B.linear_weight||g(T.inner_diameter,T.outer_diameter,T.linear_weight)||(B.linear_weight="Invalid range",p=!0)),"ur"===T.family&&(h(T.ur_opened_od,I,O)?T.ur_opened_od<f&&(B.ur_opened_od="Max O.D (Opened) >= Bit Size",p=!0):(B.ur_opened_od="".concat(I.toFixed(1),"~").concat(O.toFixed(1)," (").concat(_,")"),p=!0)),isValueEmpty(E)||isValueEmpty(k)||(h(T.inner_diameter_tooljoint,E,q)||(B.inner_diameter_tooljoint="".concat(E.toFixed(1),"~").concat(q.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter_tooljoint,k,D)||(B.outer_diameter_tooljoint="".concat(k.toFixed(1),"~").concat(D.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter_tooljoint,T.outer_diameter,D)||(B.outer_diameter_tooljoint="Tool Joint O.D >= O.D",p=!0)),isValueEmpty(V)||h(T.length,V)||(B.length="Invalid value",p=!0),isValueEmpty(T.length_tooljoint)||isValueEmpty(T.component_length)||+T.length_tooljoint>+T.component_length&&(B.length_tooljoint="Tool Joint Length < Component Length",p=!0),T.off_bottom_pressure_loss&&T.off_bottom_pressure_loss.length>0){B.off_bottom_pressure_loss={};for(var J=0;J<T.off_bottom_pressure_loss.length;J+=1){var M=T.off_bottom_pressure_loss[J];B.off_bottom_pressure_loss[J]={},isValueEmpty(M.flow_rate)&&(B.off_bottom_pressure_loss[J].flow_rate="flow rate is required.",p=!0),isValueEmpty(M.pressure_loss)&&(B.off_bottom_pressure_loss[J].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(S)||h(M.pressure_loss,S,null,{isMinInclusive:!1})||(B.off_bottom_pressure_loss[J].pressure_loss="Invalid range",p=!0)}}if(T.pressure_loss&&T.pressure_loss.length>0){B.pressure_loss={};for(var C=0;C<T.pressure_loss.length;C+=1){var A=T.pressure_loss[C];B.pressure_loss[C]={},isValueEmpty(A.flow_rate)&&(B.pressure_loss[C].flow_rate="flow rate is required.",p=!0),isValueEmpty(A.pressure_loss)&&(B.pressure_loss[C].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(P)||h(A.pressure_loss,P,null,{isMinInclusive:!1})||(B.pressure_loss[C].pressure_loss="Invalid range",p=!0)}}if(T.has_stabilizer&&T.stabilizer){var G=o(0,"shortLength","in"),H=o(100,"shortLength","in"),K=o(1,"shortLength","in"),Q=o(100,"shortLength","in"),U=o(0,"length","ft");h(T.stabilizer.inner_diameter,G,H)&&h(T.stabilizer.outer_diameter,K,Q)&&!h(T.stabilizer.inner_diameter,y,T.stabilizer.outer_diameter)&&(B.stabilizer_outer_diameter="O.D > I.D",p=!0),h(T.stabilizer.inner_diameter,G,H)||(B.stabilizer_inner_diameter="".concat(G.toFixed(1),"~").concat(H.toFixed(1)," (").concat(_,")"),p=!0),h(T.stabilizer.outer_diameter,K,Q)||(B.stabilizer_outer_diameter="".concat(K.toFixed(1),"~").concat(Q.toFixed(1)," (").concat(_,")"),p=!0),isValueEmpty(U)||h(T.stabilizer.length,U)||(B.stabilizer_length="Invalid value",p=!0),isValueEmpty(T.stabilizer.linear_weight)&&(B.stabilizer_linear_weight="Invalid value",p=!0),!B.stabilizer_outer_diameter&&f&&+T.stabilizer.outer_diameter+o(.1,"shortLength","in")>f&&(B.stabilizer_outer_diameter=" O.D + 0.1 < Bit Size",p=!0)}if("ct"===T.family&&(h(T.reel_diameter,N,R)||(B.reel_diameter="".concat(N.toFixed(1),"~").concat(R.toFixed(1)," (").concat(_,")"),p=!0)),"bit"===T.family){var W=c(1,"shortLength","in"),X=W*W*0,Y=W*W*20;h(T.tfa,X,Y)||(B.tfa="TFA must be ".concat(X.toFixed(2),"~").concat(20..toFixed(2)),p=!0)}if("rss"===T.family&&(h(T.flow_loss_percentage,0,10)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(10),p=!0)),"mwd"===T.family&&(b.length>1?(B.gamma_sensor_to_bit_distance="Only 1 gamma sensor allowed. Currently ".concat(b.length),p=!0):T.has_gamma_sensor&&!Number.isFinite(T.gamma_sensor_to_bit_distance)&&(B.gamma_sensor_to_bit_distance="This field is required.",p=!0),T.has_survey_sensor&&!Number.isFinite(T.bit_to_survey_distance)?(B.bit_to_survey_distance="This field is required.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance<=0?(B.bit_to_survey_distance="Should be a positive number.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance>150&&(B.bit_to_survey_distance="Should be less then 150.",p=!0),T.has_directional_sensor&&!Number.isFinite(T.directional_sensor_to_bit_distance)?(B.directional_sensor_to_bit_distance="This field is required.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance<=0?(B.directional_sensor_to_bit_distance="Should be a positive number.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance>150&&(B.directional_sensor_to_bit_distance="Should be less then 150.",p=!0)),"pdm"===T.family){var Z=void 0,$=void 0;h(T.number_rotor_lobes,1,10)||(B.number_rotor_lobes="It must be ".concat(1,"~").concat(10),p=!0),h(T.number_stator_lobes,2,10)||(B.number_stator_lobes="It must be ".concat(2,"~").concat(10),p=!0),h(T.rpg,0,10)||(B.rpg="It must be ".concat(0,"~").concat(10),p=!0),Z=o(0,"force","klbf"),$=o(200,"force","klbf"),isValueEmpty(T.max_weight_on_bit)||h(T.max_weight_on_bit,Z,$)||(B.max_weight_on_bit="It must be ".concat($.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=o(0,"volumeFlowRate","gal/min"),$=o(2500,"volumeFlowRate","gal/min"),h(T.min_standard_flowrate,Z,$)||(B.min_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),h(T.max_standard_flowrate,Z,$)||(B.max_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=o(0,"pressure","psi"),$=o(3e3,"pressure","psi"),h(T.max_operating_differential_pressure,Z,$)||(B.max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=o(0,"torque","ft-klbf"),$=o(40,"torque","ft-klbf"),h(T.torque_at_max_operating_differential_pressure,Z,$)||(B.torque_at_max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),h(T.flow_loss_percentage,0,20)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(20),p=!0)}m.components[T.id]=B}return 1!==u.length&&(m.general.bit_count='Number of "BIT" components is invalid.',p=!0),1===u.length&&"bit"!==l[l.length-1].family&&"bit"!==l[0].family&&(m.general.bit_position='"BIT" category should be on the bottom of the list.',p=!0),p?m:null}function m(e){var s=r(e,["data","components"]);"bit"===r(s,[0,"family"])&&(s=s.reverse().map((function(e,t){return l(l({},e),{},{order:t})})),e=t(e,["data","components"],s));var o=e.toJS().data,n=o.start_timestamp_str&&i(new Date(o.start_timestamp_str));return n&&n.isValid()&&(o.start_timestamp=n.unix()),delete o.start_timestamp_str,o.start_depth=u(o.start_depth,"length","ft"),o.components=o.components.map((function(e){var t=Object.assign({},e);if(t.inner_diameter=u(t.inner_diameter,"shortLength","in"),t.outer_diameter=u(t.outer_diameter,"shortLength","in",4),t.linear_weight=u(t.linear_weight,"massPerLength","lb-ft"),t.weight=u(t.weight,"mass","lb"),t.length=u(t.length,"length","ft"),t.component_length=u(t.component_length,"length","ft"),t.outer_diameter_tooljoint=u(t.outer_diameter_tooljoint,"shortLength","in"),t.inner_diameter_tooljoint=u(t.inner_diameter_tooljoint,"shortLength","in"),t.length_tooljoint=u(t.length_tooljoint,"length","ft"),"bit"===t.family||"ur"===t.family){var r=u(1,"shortLength","in");if(t.size=u(t.size,"shortLength","in",3),t.nozzle_sizes&&t.nozzle_sizes.length>0)for(var i=0;i<t.nozzle_sizes.length;i+=1){var s=t.nozzle_sizes[i];s.size=1!==r?32*u(s.size,"shortLength","in"):s.size}t.tfa=1!==r?t.tfa*(r*r):t.tfa}if("pdm"===t.family){if(t.max_weight_on_bit=u(t.max_weight_on_bit,"force","klbf"),t.min_standard_flowrate=u(t.min_standard_flowrate,"volumeFlowRate","gal/min"),t.max_standard_flowrate=u(t.max_standard_flowrate,"volumeFlowRate","gal/min"),t.max_operating_differential_pressure=u(t.max_operating_differential_pressure,"pressure","psi"),t.torque_at_max_operating_differential_pressure=u(t.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),t.rpg=u(t.rpg,"revolutionPerVolume","rpg"),t.off_bottom_pressure_loss&&t.off_bottom_pressure_loss.length>0)for(var o=0;o<t.off_bottom_pressure_loss.length;o+=1){var n=t.off_bottom_pressure_loss[o];n.flow_rate=u(n.flow_rate,"volumeFlowRate","gal/min"),n.pressure_loss=u(n.pressure_loss,"pressure","psi")}t.has_stabilizer||delete t.stabilizer,t.stabilizer&&(t.stabilizer.inner_diameter=t.stabilizer.inner_diameter&&u(t.stabilizer.inner_diameter,"shortLength","in"),t.stabilizer.outer_diameter=t.stabilizer.outer_diameter&&u(t.stabilizer.outer_diameter,"shortLength","in"),t.stabilizer.linear_weight=t.stabilizer.linear_weight&&u(t.stabilizer.linear_weight,"massPerLength","lb-ft"),t.stabilizer.weight=t.stabilizer.weight&&u(t.stabilizer.weight,"mass","lb"),t.stabilizer.length=t.length&&u(t.stabilizer.length,"length","ft"),t.stabilizer.gauge_od=t.stabilizer.gauge_od&&u(t.stabilizer.gauge_od,"shortLength","in"),t.stabilizer.gauge_length=t.stabilizer.gauge_length&&u(t.stabilizer.gauge_length,"shortLength","in"),t.stabilizer.blade_width=t.stabilizer.blade_width&&u(t.stabilizer.blade_width,"shortLength","in"),t.stabilizer.stab_centerpoint_to_bit=t.stabilizer.stab_centerpoint_to_bit&&u(t.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"===t.family&&(t.gauge_od=u(t.gauge_od,"shortLength","in"),t.gauge_length=u(t.gauge_length,"shortLength","in"),t.blade_width=u(t.blade_width,"shortLength","in")),("mwd"===t.family||"rss"===t.family||"agitator"===t.family)&&t.pressure_loss&&t.pressure_loss.length>0)for(var a=0;a<t.pressure_loss.length;a+=1){var l=t.pressure_loss[a];l.flow_rate=u(l.flow_rate,"volumeFlowRate","gal/min"),l.pressure_loss=u(l.pressure_loss,"pressure","psi")}return"bit"!==t.family&&delete t.bit_type,!t.has_gamma_sensor&&Number.isFinite(t.gamma_sensor_to_bit_distance)&&delete t.gamma_sensor_to_bit_distance,!t.has_survey_sensor&&Number.isFinite(t.bit_to_survey_distance)&&delete t.bit_to_survey_distance,!t.has_directional_sensor&&Number.isFinite(t.directional_sensor_to_bit_distance)&&delete t.directional_sensor_to_bit_distance,delete t.c_length,t})),l(l({},e),{},{data:o})}function u(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return null==e?null:t&&r?parseFloat(o(e,t,s(t),r,i)):parseFloat(e)}function f(e){var t=e.toJS().data,r=t.components;if(t.start_depth=c(t.start_depth,"length","ft"),r.length>0)if("bit"===r[0].family){r[0].c_length=r[0].length||0;for(var i=1;i<r.length;i+=1)r[i].c_length=parseFloat(r[i-1].c_length)+parseFloat(r[i].length||0)}else{var s=r.length-1;r[s].c_length=r[s].length||0;for(var o=s-1;o>=0;o-=1)r[o].c_length=parseFloat(r[o+1].c_length)+parseFloat(r[o].length||0)}for(var n=0;n<r.length;n+=1){var a=r[n];if(a.inner_diameter=c(a.inner_diameter,"shortLength","in"),a.outer_diameter=c(a.outer_diameter,"shortLength","in",4),a.linear_weight=c(a.linear_weight,"massPerLength","lb-ft"),a.weight=c(a.weight,"mass","lb"),a.length=c(a.length,"length","ft"),a.component_length=c(a.component_length,"length","ft"),a.outer_diameter_tooljoint=c(a.outer_diameter_tooljoint,"shortLength","in"),a.inner_diameter_tooljoint=c(a.inner_diameter_tooljoint,"shortLength","in"),a.length_tooljoint=c(a.length_tooljoint,"length","ft"),a.c_length=c(a.c_length,"length","ft"),a.gamma_sensor_to_bit_distance=c(a.gamma_sensor_to_bit_distance,"length","ft"),"bit"===a.family||"ur"===a.family){var _=c(1,"shortLength","in");if(a.size=c(a.size,"shortLength","in"),a.nozzle_sizes&&a.nozzle_sizes.length>0)for(var h=0;h<a.nozzle_sizes.length;h+=1){var g=a.nozzle_sizes[h];g.size=1!==_?c(g.size,"shortLength","in")/32:g.size}a.tfa=1!==_?a.tfa*(_*_):a.tfa}if("pdm"===a.family){if(a.max_weight_on_bit=c(a.max_weight_on_bit,"force","klbf"),a.min_standard_flowrate=c(a.min_standard_flowrate,"volumeFlowRate","gal/min"),a.max_standard_flowrate=c(a.max_standard_flowrate,"volumeFlowRate","gal/min"),a.max_operating_differential_pressure=c(a.max_operating_differential_pressure,"pressure","psi"),a.torque_at_max_operating_differential_pressure=c(a.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),a.off_bottom_pressure_loss&&a.off_bottom_pressure_loss.length>0)for(var d=0;d<a.off_bottom_pressure_loss.length;d+=1){var m=a.off_bottom_pressure_loss[d];m.flow_rate=c(m.flow_rate,"volumeFlowRate","gal/min"),m.pressure_loss=c(m.pressure_loss,"pressure","psi")}a.rpg=c(a.rpg,"revolutionPerVolume","rpg"),a.has_stabilizer&&a.stabilizer&&(a.stabilizer.inner_diameter=c(a.stabilizer.inner_diameter,"shortLength","in"),a.stabilizer.outer_diameter=c(a.stabilizer.outer_diameter,"shortLength","in"),a.stabilizer.linear_weight=c(a.stabilizer.linear_weight,"massPerLength","lb-ft"),a.stabilizer.weight=c(a.stabilizer.weight,"mass","lb"),a.stabilizer.length=c(a.stabilizer.length,"length","ft"),a.stabilizer.gauge_od=c(a.stabilizer.gauge_od,"shortLength","in"),a.stabilizer.gauge_length=c(a.stabilizer.gauge_length,"shortLength","in"),a.stabilizer.blade_width=c(a.stabilizer.blade_width,"shortLength","in"),a.stabilizer.stab_centerpoint_to_bit=c(a.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"===a.family&&(a.gauge_od=c(a.gauge_od,"shortLength","in"),a.gauge_length=c(a.gauge_length,"shortLength","in"),a.blade_width=c(a.blade_width,"shortLength","in")),("mwd"===a.family||"rss"===a.family||"agitator"===a.family)&&a.pressure_loss&&a.pressure_loss.length>0)for(var u=0;u<a.pressure_loss.length;u+=1){var f=a.pressure_loss[u];f.flow_rate=c(f.flow_rate,"volumeFlowRate","gal/min"),f.pressure_loss=c(f.pressure_loss,"pressure","psi")}}return l(l({},e),{},{data:t})}function c(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return 0===e||e?t&&r?o(e,t,r,null,i):e:null}export{m as convertRecordBackToImperialUnit,f as convertRecordtoPrefUnit,u as ctoi,c as ctop,g as isValidLinearWeight,h as isValidNumber,_ as sValueEmpty,d as validate};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"moment";import{getUnitPreference as r,convertValue as i,getUnitDisplay as s}from"./convert.js";import o from"lodash/get";import n from"lodash/set";function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function l(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?a(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):a(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function _(e){return null==e||""===e}function h(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=i.isMinInclusive,o=void 0===s||s,n=parseFloat(e);return!Number.isNaN(n)&&(!(o&&n<t||!o&&n<=t)&&!(r&&n>r))}function g(e,t,s){var o=r("shortLength"),n=e,a=t;"in"!==o&&(n=i(e,"shortLength",o,"in"),a=i(t,"shortLength",o,"in"));var l=2.673*(a*a-n*n),_="in"!==o?i(l,"massPerLength","lb-ft"):l;return s>=.5*_&&s<=1.5*_}function d(e){var r=e.toJS().data,o=r.id,n=r.start_timestamp_str,a=r.start_depth,l=r.components,_=s("shortLength"),d=s("length"),m={general:{},components:{},specificErrors:{}},u=l.filter((function(e){return"bit"===e.family})),f=u.length>0?u[0].size:null,b=l.filter((function(e){return"mwd"===e.family&&e.has_gamma_sensor})),p=!1;if(isValueEmpty(o)&&(m.id="It should not be empty.",p=!0),n&&!t(new Date(n)).isValid()&&(p=!0,m.start_timestamp="Invalid Date."),Number.isFinite(a)){var v=i(0,"length","ft"),z=i(55e3,"length","ft"),w=i(1,"length","ft");(a<=v||a>z)&&(p=!0,m.start_depth="Should be a positive number ".concat(v.toFixed(2),"~").concat(z.toFixed(2)," (").concat(d,")")),a===w&&(p=!0,m.start_depth="Should not be equal to ".concat(w," (").concat(d,")"))}else p=!0,m.start_depth="It should not be empty.";for(var L=0;L<l.length;L+=1){var y=void 0,x=void 0,F=void 0,j=void 0,I=void 0,O=void 0,V=void 0,E=void 0,q=void 0,k=void 0,D=void 0,P=void 0,S=void 0,N=void 0,R=void 0,T=l[L],B={};switch(T.family){case"ct":y=i(0,"shortLength","in"),F=i(100,"shortLength","in"),x=i(1,"shortLength","in"),j=i(100,"shortLength","in"),N=i(0,"shortLength","in"),R=i(500,"shortLength","in"),V=i(0,"length","ft");break;case"dp":case"hwdp":y=i(1,"shortLength","in"),F=i(7,"shortLength","in"),x=i(2,"shortLength","in"),j=i(8,"shortLength","in"),E=i(1,"shortLength","in"),q=i(7,"shortLength","in"),k=i(2,"shortLength","in"),D=i(10,"shortLength","in"),V=i(0,"length","ft");break;case"dc":y=i(.5,"shortLength","in"),F=i(7,"shortLength","in"),x=i(2,"shortLength","in"),j=i(13,"shortLength","in"),V=i(0,"length","ft");break;case"stabilizer":y=i(0,"shortLength","in"),F=i(100,"shortLength","in"),x=i(1,"shortLength","in"),j=i(100,"shortLength","in"),V=i(0,"length","ft");break;case"pdm":x=i(2,"shortLength","in"),j=i(15,"shortLength","in"),y=i(0,"shortLength","in"),F=i(12,"shortLength","in"),V=i(4,"length","ft"),S=0;break;case"mwd":case"agitator":case"rss":x=i(2,"shortLength","in"),j=i(13,"shortLength","in"),y=i(0,"shortLength","in"),F=i(12,"shortLength","in"),V=i(1,"length","ft"),P=0;break;case"ur":y=i(0,"shortLength","in"),F=i(50,"shortLength","in"),x=i(1,"shortLength","in"),j=i(50,"shortLength","in"),I=i(1,"shortLength","in"),O=i(50,"shortLength","in");break;case"bit":break;default:y=i(0,"shortLength","in"),F=i(100,"shortLength","in"),x=i(1,"shortLength","in"),j=i(100,"shortLength","in"),V=i(0,"length","ft")}if(isValueEmpty(y)||isValueEmpty(x)||(h(T.inner_diameter,y,F)||(B.inner_diameter="".concat(y.toFixed(1),"~").concat(F.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter,x,j)||(B.outer_diameter="".concat(x.toFixed(1),"~").concat(j.toFixed(1)," (").concat(_,")"),p=!0),h(T.inner_diameter,y,F)&&h(T.outer_diameter,x,j)&&!h(T.inner_diameter,y,T.outer_diameter)&&(B.outer_diameter="O.D > I.D",p=!0),!B.outer_diameter&&f&&+T.outer_diameter+i(.1,"shortLength","in")>f&&(B.outer_diameter=" O.D + 0.1 < Bit Size",p=!0),h(T.linear_weight,0)||(B.linear_weight="Invalid value",p=!0),"dp"!==T.family&&"hwdp"!==T.family&&"dc"!==T.family&&"ct"!==T.family&&"ur"!==T.family||B.inner_diameter||B.outer_diameter||B.linear_weight||g(T.inner_diameter,T.outer_diameter,T.linear_weight)||(B.linear_weight="Invalid range",p=!0)),"ur"===T.family&&(h(T.ur_opened_od,I,O)?T.ur_opened_od<f&&(B.ur_opened_od="Max O.D (Opened) >= Bit Size",p=!0):(B.ur_opened_od="".concat(I.toFixed(1),"~").concat(O.toFixed(1)," (").concat(_,")"),p=!0)),isValueEmpty(E)||isValueEmpty(k)||(h(T.inner_diameter_tooljoint,E,q)||(B.inner_diameter_tooljoint="".concat(E.toFixed(1),"~").concat(q.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter_tooljoint,k,D)||(B.outer_diameter_tooljoint="".concat(k.toFixed(1),"~").concat(D.toFixed(1)," (").concat(_,")"),p=!0),h(T.outer_diameter_tooljoint,T.outer_diameter,D)||(B.outer_diameter_tooljoint="Tool Joint O.D >= O.D",p=!0)),isValueEmpty(V)||h(T.length,V)||(B.length="Invalid value",p=!0),isValueEmpty(T.length_tooljoint)||isValueEmpty(T.component_length)||+T.length_tooljoint>+T.component_length&&(B.length_tooljoint="Tool Joint Length < Component Length",p=!0),T.off_bottom_pressure_loss&&T.off_bottom_pressure_loss.length>0){B.off_bottom_pressure_loss={};for(var J=0;J<T.off_bottom_pressure_loss.length;J+=1){var M=T.off_bottom_pressure_loss[J];B.off_bottom_pressure_loss[J]={},isValueEmpty(M.flow_rate)&&(B.off_bottom_pressure_loss[J].flow_rate="flow rate is required.",p=!0),isValueEmpty(M.pressure_loss)&&(B.off_bottom_pressure_loss[J].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(S)||h(M.pressure_loss,S,null,{isMinInclusive:!1})||(B.off_bottom_pressure_loss[J].pressure_loss="Invalid range",p=!0)}}if(T.pressure_loss&&T.pressure_loss.length>0){B.pressure_loss={};for(var C=0;C<T.pressure_loss.length;C+=1){var A=T.pressure_loss[C];B.pressure_loss[C]={},isValueEmpty(A.flow_rate)&&(B.pressure_loss[C].flow_rate="flow rate is required.",p=!0),isValueEmpty(A.pressure_loss)&&(B.pressure_loss[C].pressure_loss="pressure loss is required.",p=!0),isValueEmpty(P)||h(A.pressure_loss,P,null,{isMinInclusive:!1})||(B.pressure_loss[C].pressure_loss="Invalid range",p=!0)}}if(T.has_stabilizer&&T.stabilizer){var G=i(0,"shortLength","in"),H=i(100,"shortLength","in"),K=i(1,"shortLength","in"),Q=i(100,"shortLength","in"),U=i(0,"length","ft");h(T.stabilizer.inner_diameter,G,H)&&h(T.stabilizer.outer_diameter,K,Q)&&!h(T.stabilizer.inner_diameter,y,T.stabilizer.outer_diameter)&&(B.stabilizer_outer_diameter="O.D > I.D",p=!0),h(T.stabilizer.inner_diameter,G,H)||(B.stabilizer_inner_diameter="".concat(G.toFixed(1),"~").concat(H.toFixed(1)," (").concat(_,")"),p=!0),h(T.stabilizer.outer_diameter,K,Q)||(B.stabilizer_outer_diameter="".concat(K.toFixed(1),"~").concat(Q.toFixed(1)," (").concat(_,")"),p=!0),isValueEmpty(U)||h(T.stabilizer.length,U)||(B.stabilizer_length="Invalid value",p=!0),isValueEmpty(T.stabilizer.linear_weight)&&(B.stabilizer_linear_weight="Invalid value",p=!0),!B.stabilizer_outer_diameter&&f&&+T.stabilizer.outer_diameter+i(.1,"shortLength","in")>f&&(B.stabilizer_outer_diameter=" O.D + 0.1 < Bit Size",p=!0)}if("ct"===T.family&&(h(T.reel_diameter,N,R)||(B.reel_diameter="".concat(N.toFixed(1),"~").concat(R.toFixed(1)," (").concat(_,")"),p=!0)),"bit"===T.family){var W=c(1,"shortLength","in"),X=W*W*0,Y=W*W*20;h(T.tfa,X,Y)||(B.tfa="TFA must be ".concat(X.toFixed(2),"~").concat(20..toFixed(2)),p=!0)}if("rss"===T.family&&(h(T.flow_loss_percentage,0,10)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(10),p=!0)),"mwd"===T.family&&(b.length>1?(B.gamma_sensor_to_bit_distance="Only 1 gamma sensor allowed. Currently ".concat(b.length),p=!0):T.has_gamma_sensor&&!Number.isFinite(T.gamma_sensor_to_bit_distance)&&(B.gamma_sensor_to_bit_distance="This field is required.",p=!0),T.has_survey_sensor&&!Number.isFinite(T.bit_to_survey_distance)?(B.bit_to_survey_distance="This field is required.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance<=0?(B.bit_to_survey_distance="Should be a positive number.",p=!0):T.has_survey_sensor&&T.bit_to_survey_distance>150&&(B.bit_to_survey_distance="Should be less then 150.",p=!0),T.has_directional_sensor&&!Number.isFinite(T.directional_sensor_to_bit_distance)?(B.directional_sensor_to_bit_distance="This field is required.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance<=0?(B.directional_sensor_to_bit_distance="Should be a positive number.",p=!0):T.has_directional_sensor&&T.directional_sensor_to_bit_distance>150&&(B.directional_sensor_to_bit_distance="Should be less then 150.",p=!0)),"pdm"===T.family){var Z=void 0,$=void 0;h(T.number_rotor_lobes,1,10)||(B.number_rotor_lobes="It must be ".concat(1,"~").concat(10),p=!0),h(T.number_stator_lobes,2,10)||(B.number_stator_lobes="It must be ".concat(2,"~").concat(10),p=!0),h(T.rpg,0,10)||(B.rpg="It must be ".concat(0,"~").concat(10),p=!0),Z=i(0,"force","klbf"),$=i(200,"force","klbf"),isValueEmpty(T.max_weight_on_bit)||h(T.max_weight_on_bit,Z,$)||(B.max_weight_on_bit="It must be ".concat($.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=i(0,"volumeFlowRate","gal/min"),$=i(2500,"volumeFlowRate","gal/min"),h(T.min_standard_flowrate,Z,$)||(B.min_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),h(T.max_standard_flowrate,Z,$)||(B.max_standard_flowrate="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=i(0,"pressure","psi"),$=i(3e3,"pressure","psi"),h(T.max_operating_differential_pressure,Z,$)||(B.max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),Z=i(0,"torque","ft-klbf"),$=i(40,"torque","ft-klbf"),h(T.torque_at_max_operating_differential_pressure,Z,$)||(B.torque_at_max_operating_differential_pressure="It must be ".concat(Z.toFixed(2),"~").concat($.toFixed(2)),p=!0),h(T.flow_loss_percentage,0,20)||(B.flow_loss_percentage="It must be ".concat(0,"~").concat(20),p=!0)}m.components[T.id]=B}return 1!==u.length&&(m.general.bit_count='Number of "BIT" components is invalid.',p=!0),1===u.length&&"bit"!==l[l.length-1].family&&"bit"!==l[0].family&&(m.general.bit_position='"BIT" category should be on the bottom of the list.',p=!0),p?m:null}function m(e){var r=o(e,["data","components"]);"bit"===o(r,[0,"family"])&&(r=r.reverse().map((function(e,t){return l(l({},e),{},{order:t})})),e=n(e,["data","components"],r));var i=e.toJS().data,s=i.start_timestamp_str&&t(new Date(i.start_timestamp_str));return s&&s.isValid()&&(i.start_timestamp=s.unix()),delete i.start_timestamp_str,i.start_depth=u(i.start_depth,"length","ft"),i.components=i.components.map((function(e){var t=Object.assign({},e);if(t.inner_diameter=u(t.inner_diameter,"shortLength","in"),t.outer_diameter=u(t.outer_diameter,"shortLength","in",4),t.linear_weight=u(t.linear_weight,"massPerLength","lb-ft"),t.weight=u(t.weight,"mass","lb"),t.length=u(t.length,"length","ft"),t.component_length=u(t.component_length,"length","ft"),t.outer_diameter_tooljoint=u(t.outer_diameter_tooljoint,"shortLength","in"),t.inner_diameter_tooljoint=u(t.inner_diameter_tooljoint,"shortLength","in"),t.length_tooljoint=u(t.length_tooljoint,"length","ft"),"bit"===t.family||"ur"===t.family){var r=u(1,"shortLength","in");if(t.size=u(t.size,"shortLength","in",3),t.nozzle_sizes&&t.nozzle_sizes.length>0)for(var i=0;i<t.nozzle_sizes.length;i+=1){var s=t.nozzle_sizes[i];s.size=1!==r?32*u(s.size,"shortLength","in"):s.size}t.tfa=1!==r?t.tfa*(r*r):t.tfa}if("pdm"===t.family){if(t.max_weight_on_bit=u(t.max_weight_on_bit,"force","klbf"),t.min_standard_flowrate=u(t.min_standard_flowrate,"volumeFlowRate","gal/min"),t.max_standard_flowrate=u(t.max_standard_flowrate,"volumeFlowRate","gal/min"),t.max_operating_differential_pressure=u(t.max_operating_differential_pressure,"pressure","psi"),t.torque_at_max_operating_differential_pressure=u(t.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),t.rpg=u(t.rpg,"revolutionPerVolume","rpg"),t.off_bottom_pressure_loss&&t.off_bottom_pressure_loss.length>0)for(var o=0;o<t.off_bottom_pressure_loss.length;o+=1){var n=t.off_bottom_pressure_loss[o];n.flow_rate=u(n.flow_rate,"volumeFlowRate","gal/min"),n.pressure_loss=u(n.pressure_loss,"pressure","psi")}t.has_stabilizer||delete t.stabilizer,t.stabilizer&&(t.stabilizer.inner_diameter=t.stabilizer.inner_diameter&&u(t.stabilizer.inner_diameter,"shortLength","in"),t.stabilizer.outer_diameter=t.stabilizer.outer_diameter&&u(t.stabilizer.outer_diameter,"shortLength","in"),t.stabilizer.linear_weight=t.stabilizer.linear_weight&&u(t.stabilizer.linear_weight,"massPerLength","lb-ft"),t.stabilizer.weight=t.stabilizer.weight&&u(t.stabilizer.weight,"mass","lb"),t.stabilizer.length=t.length&&u(t.stabilizer.length,"length","ft"),t.stabilizer.gauge_od=t.stabilizer.gauge_od&&u(t.stabilizer.gauge_od,"shortLength","in"),t.stabilizer.gauge_length=t.stabilizer.gauge_length&&u(t.stabilizer.gauge_length,"shortLength","in"),t.stabilizer.blade_width=t.stabilizer.blade_width&&u(t.stabilizer.blade_width,"shortLength","in"),t.stabilizer.stab_centerpoint_to_bit=t.stabilizer.stab_centerpoint_to_bit&&u(t.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"===t.family&&(t.gauge_od=u(t.gauge_od,"shortLength","in"),t.gauge_length=u(t.gauge_length,"shortLength","in"),t.blade_width=u(t.blade_width,"shortLength","in")),("mwd"===t.family||"rss"===t.family||"agitator"===t.family)&&t.pressure_loss&&t.pressure_loss.length>0)for(var a=0;a<t.pressure_loss.length;a+=1){var l=t.pressure_loss[a];l.flow_rate=u(l.flow_rate,"volumeFlowRate","gal/min"),l.pressure_loss=u(l.pressure_loss,"pressure","psi")}return"bit"!==t.family&&delete t.bit_type,!t.has_gamma_sensor&&Number.isFinite(t.gamma_sensor_to_bit_distance)&&delete t.gamma_sensor_to_bit_distance,!t.has_survey_sensor&&Number.isFinite(t.bit_to_survey_distance)&&delete t.bit_to_survey_distance,!t.has_directional_sensor&&Number.isFinite(t.directional_sensor_to_bit_distance)&&delete t.directional_sensor_to_bit_distance,delete t.c_length,t})),l(l({},e),{},{data:i})}function u(e,t,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return null==e?null:t&&s?parseFloat(i(e,t,r(t),s,o)):parseFloat(e)}function f(e){var t=e.toJS().data,r=t.components;if(t.start_depth=c(t.start_depth,"length","ft"),r.length>0)if("bit"===r[0].family){r[0].c_length=r[0].length||0;for(var i=1;i<r.length;i+=1)r[i].c_length=parseFloat(r[i-1].c_length)+parseFloat(r[i].length||0)}else{var s=r.length-1;r[s].c_length=r[s].length||0;for(var o=s-1;o>=0;o-=1)r[o].c_length=parseFloat(r[o+1].c_length)+parseFloat(r[o].length||0)}for(var n=0;n<r.length;n+=1){var a=r[n];if(a.inner_diameter=c(a.inner_diameter,"shortLength","in"),a.outer_diameter=c(a.outer_diameter,"shortLength","in",4),a.linear_weight=c(a.linear_weight,"massPerLength","lb-ft"),a.weight=c(a.weight,"mass","lb"),a.length=c(a.length,"length","ft"),a.component_length=c(a.component_length,"length","ft"),a.outer_diameter_tooljoint=c(a.outer_diameter_tooljoint,"shortLength","in"),a.inner_diameter_tooljoint=c(a.inner_diameter_tooljoint,"shortLength","in"),a.length_tooljoint=c(a.length_tooljoint,"length","ft"),a.c_length=c(a.c_length,"length","ft"),a.gamma_sensor_to_bit_distance=c(a.gamma_sensor_to_bit_distance,"length","ft"),"bit"===a.family||"ur"===a.family){var _=c(1,"shortLength","in");if(a.size=c(a.size,"shortLength","in"),a.nozzle_sizes&&a.nozzle_sizes.length>0)for(var h=0;h<a.nozzle_sizes.length;h+=1){var g=a.nozzle_sizes[h];g.size=1!==_?c(g.size,"shortLength","in")/32:g.size}a.tfa=1!==_?a.tfa*(_*_):a.tfa}if("pdm"===a.family){if(a.max_weight_on_bit=c(a.max_weight_on_bit,"force","klbf"),a.min_standard_flowrate=c(a.min_standard_flowrate,"volumeFlowRate","gal/min"),a.max_standard_flowrate=c(a.max_standard_flowrate,"volumeFlowRate","gal/min"),a.max_operating_differential_pressure=c(a.max_operating_differential_pressure,"pressure","psi"),a.torque_at_max_operating_differential_pressure=c(a.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),a.off_bottom_pressure_loss&&a.off_bottom_pressure_loss.length>0)for(var d=0;d<a.off_bottom_pressure_loss.length;d+=1){var m=a.off_bottom_pressure_loss[d];m.flow_rate=c(m.flow_rate,"volumeFlowRate","gal/min"),m.pressure_loss=c(m.pressure_loss,"pressure","psi")}a.rpg=c(a.rpg,"revolutionPerVolume","rpg"),a.has_stabilizer&&a.stabilizer&&(a.stabilizer.inner_diameter=c(a.stabilizer.inner_diameter,"shortLength","in"),a.stabilizer.outer_diameter=c(a.stabilizer.outer_diameter,"shortLength","in"),a.stabilizer.linear_weight=c(a.stabilizer.linear_weight,"massPerLength","lb-ft"),a.stabilizer.weight=c(a.stabilizer.weight,"mass","lb"),a.stabilizer.length=c(a.stabilizer.length,"length","ft"),a.stabilizer.gauge_od=c(a.stabilizer.gauge_od,"shortLength","in"),a.stabilizer.gauge_length=c(a.stabilizer.gauge_length,"shortLength","in"),a.stabilizer.blade_width=c(a.stabilizer.blade_width,"shortLength","in"),a.stabilizer.stab_centerpoint_to_bit=c(a.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"===a.family&&(a.gauge_od=c(a.gauge_od,"shortLength","in"),a.gauge_length=c(a.gauge_length,"shortLength","in"),a.blade_width=c(a.blade_width,"shortLength","in")),("mwd"===a.family||"rss"===a.family||"agitator"===a.family)&&a.pressure_loss&&a.pressure_loss.length>0)for(var u=0;u<a.pressure_loss.length;u+=1){var f=a.pressure_loss[u];f.flow_rate=c(f.flow_rate,"volumeFlowRate","gal/min"),f.pressure_loss=c(f.pressure_loss,"pressure","psi")}}return l(l({},e),{},{data:t})}function c(e,t,r){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return 0===e||e?t&&r?i(e,t,r,null,s):e:null}export{m as convertRecordBackToImperialUnit,f as convertRecordtoPrefUnit,u as ctoi,c as ctop,g as isValidLinearWeight,h as isValidNumber,_ as sValueEmpty,d as validate};
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import i from"lodash/get";import r from"moment";import{convertValue as e,getUnitPreference as s}from"./convert.js";import a from"lodash/isNumber";function n(t,i){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);i&&(e=e.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,e)}return r}function o(i){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?n(Object(e),!0).forEach((function(r){t(i,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):n(Object(e)).forEach((function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}))}return i}function d(t){return 0!==t&&!t}function p(t,i,r,e){return this.isValueEmpty(t)?!!e:a(t)&&t>i&&t<r}function c(t,i,r){return a(t)?i&&r?parseFloat(e(t,i,r)):parseFloat(t):null}function u(t,i,r){return a(t)?i&&r?e(t,i,s(i),r):parseFloat(t):null}function l(t){var r=this.ctop(i(t,["data","mud_density"]),"density","ppg"),e=this.ctop(i(t,["data","depth"]),"length","ft"),s=this.ctop(i(t,["data","viscosity","yp"]),"yp","hsf");return o(o({},t),{},{data:o(o({},t.data),{},{mud_density:r,depth:e,viscosity:o(o({},t.data.viscosity),{},{yp:s})})})}function y(t){var r=this.ctoi(i(t,["data","mud_density"]),"density","ppg"),e=this.ctoi(i(t,["data","depth"]),"length","ft"),s=this.ctoi(i(t,["data","viscosity","yp"]),"yp","hsf");return o(o({},t),{},{data:o(o({},t.data),{},{mud_density:r,depth:e,viscosity:o(o({},t.data.viscosity),{},{yp:s}),date_str:null})})}function h(t){var i=t.data,e=i.date_str,s=i.mud_density,a=i.viscosity,n=a.pv,o=a.yp,d=a.rpm_readings,p=!1,c={viscosity:{rpm_readings:[]}};e&&!r(new Date(e)).isValid()&&(p=!0,c.date="Invalid Date.");var u=this.ctop(5,"density","ppg"),l=this.ctop(20,"density","ppg");this.isValueValid(s,u,l,!1)||(p=!0,c.mud_density="It should be ".concat(u," ~ ").concat(l)),(this.isValueEmpty(n)||this.isValueEmpty(o))&&d.length<2&&(p=!0,c.viscosity.rpm_readings_required="At least 2 paris of rpm and dial_reading required."),this.isValueValid(n,0,200,!c.viscosity.rpm_readings_required)||(p=!0,c.viscosity.pv="It should be 0~200"),this.isValueValid(o,0,200,!c.viscosity.rpm_readings_required)||(p=!0,c.viscosity.yp="It should be 0~200");for(var y=[],h=0;h<d.length;h+=1){c.viscosity.rpm_readings[h]={};var m=c.viscosity.rpm_readings[h];this.isValueValid(d[h].rpm,0,1e3)||(p=!0,m.rpm="It should be 0~1000"),this.isValueValid(d[h].dial_reading,0,300)||(p=!0,m.dial_reading="It should be 0~300"),-1!==y.indexOf(d[h].rpm)&&(p=!0,m.rpm="Duplicated RPM value"),y.push(d[h].rpm),d[h].originalIndex=h}var f=d.sort((function(t,i){return t.rpm-i.rpm}));return f.forEach((function(t,i){var r=c.viscosity.rpm_readings[t.originalIndex];f[i-1]&&t.dial_reading<f[i-1].dial_reading&&(p=!0,r.dial_reading="Dial Readings should be in increasing order")})),{hasErrors:p,errors:c}}export{y as convertToImperialUnit,l as convertToPrefUnit,u as ctoi,c as ctop,d as isValueEmpty,p as isValueValid,h as validate};
1
+ import t from"@babel/runtime/helpers/defineProperty";import i from"moment";import{convertValue as r,getUnitPreference as e}from"./convert.js";import s from"lodash/get";import a from"lodash/isNumber";function n(t,i){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);i&&(e=e.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),r.push.apply(r,e)}return r}function o(i){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?n(Object(e),!0).forEach((function(r){t(i,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):n(Object(e)).forEach((function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))}))}return i}function d(t){return 0!==t&&!t}function p(t,i,r,e){return this.isValueEmpty(t)?!!e:a(t)&&t>i&&t<r}function c(t,i,e){return a(t)?i&&e?parseFloat(r(t,i,e)):parseFloat(t):null}function u(t,i,s){return a(t)?i&&s?r(t,i,e(i),s):parseFloat(t):null}function l(t){var i=this.ctop(s(t,["data","mud_density"]),"density","ppg"),r=this.ctop(s(t,["data","depth"]),"length","ft"),e=this.ctop(s(t,["data","viscosity","yp"]),"yp","hsf");return o(o({},t),{},{data:o(o({},t.data),{},{mud_density:i,depth:r,viscosity:o(o({},t.data.viscosity),{},{yp:e})})})}function y(t){var i=this.ctoi(s(t,["data","mud_density"]),"density","ppg"),r=this.ctoi(s(t,["data","depth"]),"length","ft"),e=this.ctoi(s(t,["data","viscosity","yp"]),"yp","hsf");return o(o({},t),{},{data:o(o({},t.data),{},{mud_density:i,depth:r,viscosity:o(o({},t.data.viscosity),{},{yp:e}),date_str:null})})}function h(t){var r=t.data,e=r.date_str,s=r.mud_density,a=r.viscosity,n=a.pv,o=a.yp,d=a.rpm_readings,p=!1,c={viscosity:{rpm_readings:[]}};e&&!i(new Date(e)).isValid()&&(p=!0,c.date="Invalid Date.");var u=this.ctop(5,"density","ppg"),l=this.ctop(20,"density","ppg");this.isValueValid(s,u,l,!1)||(p=!0,c.mud_density="It should be ".concat(u," ~ ").concat(l)),(this.isValueEmpty(n)||this.isValueEmpty(o))&&d.length<2&&(p=!0,c.viscosity.rpm_readings_required="At least 2 paris of rpm and dial_reading required."),this.isValueValid(n,0,200,!c.viscosity.rpm_readings_required)||(p=!0,c.viscosity.pv="It should be 0~200"),this.isValueValid(o,0,200,!c.viscosity.rpm_readings_required)||(p=!0,c.viscosity.yp="It should be 0~200");for(var y=[],h=0;h<d.length;h+=1){c.viscosity.rpm_readings[h]={};var m=c.viscosity.rpm_readings[h];this.isValueValid(d[h].rpm,0,1e3)||(p=!0,m.rpm="It should be 0~1000"),this.isValueValid(d[h].dial_reading,0,300)||(p=!0,m.dial_reading="It should be 0~300"),-1!==y.indexOf(d[h].rpm)&&(p=!0,m.rpm="Duplicated RPM value"),y.push(d[h].rpm),d[h].originalIndex=h}var f=d.sort((function(t,i){return t.rpm-i.rpm}));return f.forEach((function(t,i){var r=c.viscosity.rpm_readings[t.originalIndex];f[i-1]&&t.dial_reading<f[i-1].dial_reading&&(p=!0,r.dial_reading="Dial Readings should be in increasing order")})),{hasErrors:p,errors:c}}export{y as convertToImperialUnit,l as convertToPrefUnit,u as ctoi,c as ctop,d as isValueEmpty,p as isValueValid,h as validate};
package/utils/apps.js ADDED
@@ -0,0 +1 @@
1
+ import{DEFAULT_GRID_LAYOUT_PADDING as i,GRID_ROW_HEIGHT as t,GRID_COLUMN_SIZES as e}from"../constants/apps.js";import{isMobileDetected as r,isNativeDetected as o}from"./mobileDetect.js";import"./index.js";var n=function(n){var a=n.coordinates,s=n.dashboardWidth,d=n.isMaximized;return{pixelHeight:d?window.innerHeight-2*i:a.h*(t+i)-i,pixelWidth:d||r||o?s-2*i:(s-i)*a.w/e.large-i}};export{n as getAppSize};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import{convertValue as t}from"../convert.js";import{COMPONENT_FAMILIES as r}from"../../constants/casing.js";function n(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 i=null!=arguments[r]?arguments[r]:{};r%2?n(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(e){var t=r.find((function(t){return t.type===e}));return t?t.name:""}function c(e){for(var r=[],n=0,c=0;c<e.length;c+=1){var a=e[c],f=i(i({},a),{},{family_name:o(a.family),inner_diameter:t(a.inner_diameter,"shortLength","in"),outer_diameter:t(a.outer_diameter,"shortLength","in"),linear_weight:t(a.linear_weight,"massPerLength","lb-ft"),weight:t(a.linear_weight,"mass","lb"),length:t(a.linear_weight,"length","ft")});n+=f.length,f.cum_length=n,r.push(f)}return r}export{c as convertComponents,o as getFamilyName};
1
+ import e from"@babel/runtime/helpers/defineProperty";import{COMPONENT_FAMILIES as t}from"../../constants/casing.js";import{convertValue as r}from"../convert.js";function n(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 i=null!=arguments[r]?arguments[r]:{};r%2?n(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(e){var r=t.find((function(t){return t.type===e}));return r?r.name:""}function c(e){for(var t=[],n=0,c=0;c<e.length;c+=1){var a=e[c],f=i(i({},a),{},{family_name:o(a.family),inner_diameter:r(a.inner_diameter,"shortLength","in"),outer_diameter:r(a.outer_diameter,"shortLength","in"),linear_weight:r(a.linear_weight,"massPerLength","lb-ft"),weight:r(a.linear_weight,"mass","lb"),length:r(a.linear_weight,"length","ft")});n+=f.length,f.cum_length=n,t.push(f)}return t}export{c as convertComponents,o as getFamilyName};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"moment";import{getUnitDisplay as r,getUnitPreference as n,convertValue as i}from"../convert.js";import{MIN_ID as o,MAX_ID as a,MIN_OD as h,MAX_OD as l,MIN_TOP_DEPTH as m,MAX_TOP_DEPTH as s,MIN_BOTTOM_DEPTH as u,MAX_BOTTOM_DEPTH as _,DP_MIN_ID as d,DP_MIN_OD as g,DP_MAX_ID as p,DP_MAX_OD as f,DP_MIN_TJ_ID as c,DP_MIN_TJ_OD as b,DP_MAX_TJ_ID as j,DP_MAX_TJ_OD as O,DP_MIN_LENGTH as F,DP_MAX_LENGTH as w,HWDP_MIN_ID as y,HWDP_MIN_OD as L,HWDP_MAX_ID as v,HWDP_MAX_OD as D,HWDP_MIN_TJ_ID as I,HWDP_MIN_TJ_OD as N,HWDP_MAX_TJ_ID as P,HWDP_MAX_TJ_OD as V,HWDP_MIN_LENGTH as q,HWDP_MAX_LENGTH as k}from"../../constants/casing.js";function x(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 A(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?x(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S=r("shortLength"),T=r("length");function E(e,t,r,n){var i=r?e.toFixed(r):e,o=r?t.toFixed(r):t;return"".concat(i,"~").concat(o).concat(n?" (".concat(n,")"):"")}function J(e,t,r){return!(Number.isFinite(e)&&Number.isFinite(t)&&Number.isFinite(r))||(e<t||e>r)}function B(e,t){var r=n("shortLength"),o="in"!==r?i(e,"shortLength",r,"in"):e,a="in"!==r?i(t,"shortLength",r,"in"):t,h=2.673*(o*o-a*a);return"in"!==r?i(h,"massPerLength","lb-ft"):h}function C(e,t,r){var n=B(e,t);return r>=.5*n&&r<=1.5*n}function W(e){var t=function(e){return A(A({},e),{},{inner_diameter:parseFloat(e.inner_diameter),outer_diameter:parseFloat(e.outer_diameter),linear_weight:parseFloat(e.linear_weight),number_of_joints:parseFloat(e.number_of_joints),component_length:parseFloat(e.component_length),length:parseFloat(e.length),weight:parseFloat(e.weight),outer_diameter_tooljoint:parseFloat(e.outer_diameter_tooljoint),inner_diameter_tooljoint:parseFloat(e.inner_diameter_tooljoint),length_tooljoint:parseFloat(e.length_tooljoint)})}(e),r=A(A({},function(e){var t={};return Number.isFinite(e.inner_diameter)||(t.inner_diameter="It must be a number."),Number.isFinite(e.outer_diameter)||(t.outer_diameter="It must be a number."),Number.isFinite(e.linear_weight)||(t.linear_weight="It must be a number."),t.inner_diameter||t.outer_diameter||(e.outer_diameter<e.inner_diameter?t.outer_diameter="O.D > I.D":t.linear_weight||C(e.outer_diameter,e.inner_diameter,e.linear_weight)||(t.linear_weight="Invalid linear weight")),Number.isFinite(e.number_of_joints)||(t.number_of_joints="It must be a number."),Number.isFinite(e.component_length)||(t.component_length="It must be a number."),Number.isFinite(e.length)||(t.length="It must be a number."),Number.isFinite(e.weight)||(t.weight="It must be a number."),t}(t)),function(e){var t,r,n,o,a,h,l,m,s,u,_=e.family,x={};return"dp"!==_&&"hwdp"!==_||("dp"===_?(t=d,r=g,n=p,o=f,a=c,h=b,l=j,m=O,s=F,u=w):(t=y,r=L,n=v,o=D,a=I,h=N,l=P,m=V,s=q,u=k),t=i(t,"shortLength","in"),r=i(r,"shortLength","in"),n=i(n,"shortLength","in"),o=i(o,"shortLength","in"),a=i(a,"shortLength","in"),h=i(h,"shortLength","in"),l=i(l,"shortLength","in"),m=i(m,"shortLength","in"),s=i(s,"length","ft"),u=i(u,"length","ft"),J(e.inner_diameter,t,n)&&(x.inner_diameter=E(t,n,2,S)),J(e.outer_diameter,r,o)&&(x.outer_diameter=E(r,o,2,S)),J(e.inner_diameter_tooljoint,a,l)&&(x.inner_diameter_tooljoint=E(a,l,2,S)),J(e.outer_diameter_tooljoint,h,m)&&(x.outer_diameter_tooljoint=E(h,m,2,S)),J(e.length,s,u)&&(x.length=E(s,u,2,T)),!x.outer_diameter_tooljoint&&e.outer_diameter_tooljoint<e.outer_diameter&&(x.outer_diameter_tooljoint="Tool Joint O.D >= O.D"),e.length_tooljoint>e.component_length&&(x.length_tooljoint="Tool Joint Length < Component Length")),x}(t));return Object.keys(r).length>0?{isValid:!1,errors:r}:{isValid:!0}}function z(e,t){var r=[];if(t.length&&!e){var n=t.filter((function(e){return"casing_joints"===e.family})),i=t.filter((function(e){return"float_shoe"===e.family})),o=t[t.length-1],a=t[0];n.length<1&&r.push("At least one casing joints required."),0===i.length?r.push("At least one float shoe required."):i.length>1?r.push("Only one float shoe required."):"float_shoe"!==a.family&&"float_shoe"!==o.family&&r.push("Float Shoe should be on the bottom of the list")}if(e){var h=t.filter((function(e){return"riser"===e.family}));0===h.length?r.push("At least one riser required."):h.length>1&&r.push("Only one riser required.")}return r.length>0?{isValid:!1,errors:r}:{isValid:!0}}function G(e){var r=e.data,n={},d=i(o,"shortLength","in"),g=i(a,"shortLength","in"),p=i(h,"shortLength","in"),f=i(l,"shortLength","in"),c=i(m,"length","ft"),b=i(s,"length","ft"),j=i(u,"length","ft"),O=i(_,"length","ft");return r.start_timestamp&&!t(new Date(r.start_timestamp)).isValid()&&(n.start_timestamp="Invalid Date."),J(r.inner_diameter,d,g)&&(n.inner_diameter=E(d,g,2,S)),J(r.outer_diameter,p,f)&&(n.outer_diameter=E(p,f,2,S)),!n.inner_diameter&&!n.outer_diamter&&r.inner_diamter>r.outer_diameter&&(n.outer_diameter="O.D > I.D"),J(r.top_depth,c,b)&&(n.top_depth=E(c,b,2,T)),J(r.bottom_depth,j,O)&&(n.bottom_depth=E(j,O,2,T)),!n.top_depth&&!n.bottom_depth&&r.top_depth>r.bottom_depth&&(n.bottom_depth="Bottom Depth > Top Depth"),n.inner_diameter||n.outer_diameter||!C(r.outer_diameter,r.inner_diameter,r.linear_weight)||(n.linear_weight="Invalid Linear Weight"),Object.keys(n).length>0?{isValid:!1,errors:n}:{isValid:!0}}export{B as calculateLinearWeight,C as isValidLinearWeight,W as validateComponent,z as validateInterComponents,G as validateMainFields};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"moment";import{MIN_ID as r,MAX_ID as n,MIN_OD as i,MAX_OD as o,MIN_TOP_DEPTH as a,MAX_TOP_DEPTH as h,MIN_BOTTOM_DEPTH as l,MAX_BOTTOM_DEPTH as m,DP_MIN_ID as s,DP_MIN_OD as u,DP_MAX_ID as _,DP_MAX_OD as d,DP_MIN_TJ_ID as g,DP_MIN_TJ_OD as p,DP_MAX_TJ_ID as f,DP_MAX_TJ_OD as c,DP_MIN_LENGTH as b,DP_MAX_LENGTH as j,HWDP_MIN_ID as O,HWDP_MIN_OD as F,HWDP_MAX_ID as w,HWDP_MAX_OD as y,HWDP_MIN_TJ_ID as L,HWDP_MIN_TJ_OD as v,HWDP_MAX_TJ_ID as D,HWDP_MAX_TJ_OD as I,HWDP_MIN_LENGTH as N,HWDP_MAX_LENGTH as P}from"../../constants/casing.js";import{getUnitDisplay as V,getUnitPreference as q,convertValue as k}from"../convert.js";function x(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 A(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?x(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var S=V("shortLength"),T=V("length");function E(e,t,r,n){var i=r?e.toFixed(r):e,o=r?t.toFixed(r):t;return"".concat(i,"~").concat(o).concat(n?" (".concat(n,")"):"")}function J(e,t,r){return!(Number.isFinite(e)&&Number.isFinite(t)&&Number.isFinite(r))||(e<t||e>r)}function B(e,t){var r=q("shortLength"),n="in"!==r?k(e,"shortLength",r,"in"):e,i="in"!==r?k(t,"shortLength",r,"in"):t,o=2.673*(n*n-i*i);return"in"!==r?k(o,"massPerLength","lb-ft"):o}function C(e,t,r){var n=B(e,t);return r>=.5*n&&r<=1.5*n}function W(e){var t=function(e){return A(A({},e),{},{inner_diameter:parseFloat(e.inner_diameter),outer_diameter:parseFloat(e.outer_diameter),linear_weight:parseFloat(e.linear_weight),number_of_joints:parseFloat(e.number_of_joints),component_length:parseFloat(e.component_length),length:parseFloat(e.length),weight:parseFloat(e.weight),outer_diameter_tooljoint:parseFloat(e.outer_diameter_tooljoint),inner_diameter_tooljoint:parseFloat(e.inner_diameter_tooljoint),length_tooljoint:parseFloat(e.length_tooljoint)})}(e),r=A(A({},function(e){var t={};return Number.isFinite(e.inner_diameter)||(t.inner_diameter="It must be a number."),Number.isFinite(e.outer_diameter)||(t.outer_diameter="It must be a number."),Number.isFinite(e.linear_weight)||(t.linear_weight="It must be a number."),t.inner_diameter||t.outer_diameter||(e.outer_diameter<e.inner_diameter?t.outer_diameter="O.D > I.D":t.linear_weight||C(e.outer_diameter,e.inner_diameter,e.linear_weight)||(t.linear_weight="Invalid linear weight")),Number.isFinite(e.number_of_joints)||(t.number_of_joints="It must be a number."),Number.isFinite(e.component_length)||(t.component_length="It must be a number."),Number.isFinite(e.length)||(t.length="It must be a number."),Number.isFinite(e.weight)||(t.weight="It must be a number."),t}(t)),function(e){var t,r,n,i,o,a,h,l,m,V,q=e.family,x={};return"dp"!==q&&"hwdp"!==q||("dp"===q?(t=s,r=u,n=_,i=d,o=g,a=p,h=f,l=c,m=b,V=j):(t=O,r=F,n=w,i=y,o=L,a=v,h=D,l=I,m=N,V=P),t=k(t,"shortLength","in"),r=k(r,"shortLength","in"),n=k(n,"shortLength","in"),i=k(i,"shortLength","in"),o=k(o,"shortLength","in"),a=k(a,"shortLength","in"),h=k(h,"shortLength","in"),l=k(l,"shortLength","in"),m=k(m,"length","ft"),V=k(V,"length","ft"),J(e.inner_diameter,t,n)&&(x.inner_diameter=E(t,n,2,S)),J(e.outer_diameter,r,i)&&(x.outer_diameter=E(r,i,2,S)),J(e.inner_diameter_tooljoint,o,h)&&(x.inner_diameter_tooljoint=E(o,h,2,S)),J(e.outer_diameter_tooljoint,a,l)&&(x.outer_diameter_tooljoint=E(a,l,2,S)),J(e.length,m,V)&&(x.length=E(m,V,2,T)),!x.outer_diameter_tooljoint&&e.outer_diameter_tooljoint<e.outer_diameter&&(x.outer_diameter_tooljoint="Tool Joint O.D >= O.D"),e.length_tooljoint>e.component_length&&(x.length_tooljoint="Tool Joint Length < Component Length")),x}(t));return Object.keys(r).length>0?{isValid:!1,errors:r}:{isValid:!0}}function z(e,t){var r=[];if(t.length&&!e){var n=t.filter((function(e){return"casing_joints"===e.family})),i=t.filter((function(e){return"float_shoe"===e.family})),o=t[t.length-1],a=t[0];n.length<1&&r.push("At least one casing joints required."),0===i.length?r.push("At least one float shoe required."):i.length>1?r.push("Only one float shoe required."):"float_shoe"!==a.family&&"float_shoe"!==o.family&&r.push("Float Shoe should be on the bottom of the list")}if(e){var h=t.filter((function(e){return"riser"===e.family}));0===h.length?r.push("At least one riser required."):h.length>1&&r.push("Only one riser required.")}return r.length>0?{isValid:!1,errors:r}:{isValid:!0}}function G(e){var s=e.data,u={},_=k(r,"shortLength","in"),d=k(n,"shortLength","in"),g=k(i,"shortLength","in"),p=k(o,"shortLength","in"),f=k(a,"length","ft"),c=k(h,"length","ft"),b=k(l,"length","ft"),j=k(m,"length","ft");return s.start_timestamp&&!t(new Date(s.start_timestamp)).isValid()&&(u.start_timestamp="Invalid Date."),J(s.inner_diameter,_,d)&&(u.inner_diameter=E(_,d,2,S)),J(s.outer_diameter,g,p)&&(u.outer_diameter=E(g,p,2,S)),!u.inner_diameter&&!u.outer_diamter&&s.inner_diamter>s.outer_diameter&&(u.outer_diameter="O.D > I.D"),J(s.top_depth,f,c)&&(u.top_depth=E(f,c,2,T)),J(s.bottom_depth,b,j)&&(u.bottom_depth=E(b,j,2,T)),!u.top_depth&&!u.bottom_depth&&s.top_depth>s.bottom_depth&&(u.bottom_depth="Bottom Depth > Top Depth"),u.inner_diameter||u.outer_diameter||!C(s.outer_diameter,s.inner_diameter,s.linear_weight)||(u.linear_weight="Invalid Linear Weight"),Object.keys(u).length>0?{isValid:!1,errors:u}:{isValid:!0}}export{B as calculateLinearWeight,C as isValidLinearWeight,W as validateComponent,z as validateInterComponents,G as validateMainFields};
@@ -1 +1 @@
1
- import{set as t}from"lodash";import{COMPLETION_APPTYPE_MODES_DICT as a,COMPLETION_APP_TYPES as e}from"../constants/completion.js";var n=function(t,a){return t?"pad--".concat(t.current_pad_id):a?"well--".concat(a.id):"common"},r=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.fracMultiWellApp,c={};return t?c={mode:a[r][0]}:n&&(c={mode:"custom",selectedAssets:[n.id]}),c},c=function(a){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,n){var r=(n.app_streams||[]).find((function(t){return"frac"===t.source_type&&(e||"active"===t.status)}));return!r||a&&a.last_frac_at>r.last_active_at?a:t(n,"last_frac_at",r.last_active_at)}),null)},i=function(a){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,n){var r=(n.app_streams||[]).find((function(t){return"wireline"===t.source_type&&(e||"active"===t.status)}));return!r||a&&a.last_wireline_at>r.last_active_at?a:t(n,"last_wireline_at",r.last_active_at)}),null)},u=function(a){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a.reduce((function(a,n){var r=(n.app_streams||[]).find((function(t){return"pumpdown"===t.source_type&&(e||"active"===t.status)}));return!r||a&&a.last_pumpdown_at>r.last_active_at?a:t(n,"last_pumpdown_at",r.last_active_at)}),null)};export{n as getAssetKey,r as getDefaultPadModeSetting,c as resolveActiveFracAsset,u as resolveActivePumpdownAsset,i as resolveActiveWirelineAsset};
1
+ import{COMPLETION_APPTYPE_MODES_DICT as t,COMPLETION_APP_TYPES as a}from"../constants/completion.js";import{set as e}from"lodash";var n=function(t,a){return t?"pad--".concat(t.current_pad_id):a?"well--".concat(a.id):"common"},r=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.fracMultiWellApp,c={};return e?c={mode:t[r][0]}:n&&(c={mode:"custom",selectedAssets:[n.id]}),c},c=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.reduce((function(t,n){var r=(n.app_streams||[]).find((function(t){return"frac"===t.source_type&&(a||"active"===t.status)}));return!r||t&&t.last_frac_at>r.last_active_at?t:e(n,"last_frac_at",r.last_active_at)}),null)},i=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.reduce((function(t,n){var r=(n.app_streams||[]).find((function(t){return"wireline"===t.source_type&&(a||"active"===t.status)}));return!r||t&&t.last_wireline_at>r.last_active_at?t:e(n,"last_wireline_at",r.last_active_at)}),null)},u=function(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.reduce((function(t,n){var r=(n.app_streams||[]).find((function(t){return"pumpdown"===t.source_type&&(a||"active"===t.status)}));return!r||t&&t.last_pumpdown_at>r.last_active_at?t:e(n,"last_pumpdown_at",r.last_active_at)}),null)};export{n as getAssetKey,r as getDefaultPadModeSetting,c as resolveActiveFracAsset,u as resolveActivePumpdownAsset,i as resolveActiveWirelineAsset};
@@ -0,0 +1 @@
1
+ import t from"@babel/runtime/helpers/toConsumableArray";var r="SMALL",n="MEDIUM",e="LARGE",o="XLARGE",i=37.7952755906,a=18.8976377953,s=function(t){var r=t.width,n=t.height;return{pixelWidth:Math.round(18.8976377953*r),pixelHeight:Math.round(18.8976377953*n)}},u={NORMAL:{type:"NORMAL",columns:{min:1,max:7},rows:{min:1,max:1e3},slots:1,height:17.5,width:20.8},WIDE:{type:"WIDE",columns:{min:8,max:12},rows:{min:1,max:25},slots:2,height:17.5,width:41.8},HALFSCREEN:{type:"HALFSCREEN",columns:{min:8,max:12},rows:{min:26,max:40},slots:4,height:26.5,width:41.8},FULLSCREEN:{type:"FULLSCREEN",columns:{min:8,max:12},rows:{min:41,max:1e3},slots:6,height:53.3,width:41.8}};function c(t){return t.concat().sort((function(t,r){var n=t.coordinates.y,e=r.coordinates.y;if(n<e)return-1;if(n>e)return 1;if(n===e){var o=t.coordinates.x,i=r.coordinates.x;if(o<i)return-1;if(o>i)return 1}return 0}))}function m(t){var r=t.coordinates,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"dashboard";if("singleApp"===n)return u.FULLSCREEN;var e=r.w,o=r.h;return Object.values(u).find((function(t){return e>=t.columns.min&&e<=t.columns.max&&o>=t.rows.min&&o<=t.rows.max}))}function l(r,n){var e,o=[],i=[o],a=0;return r.reduce((function(i,s,c){e=!1;var l=m(s,n),h=l.slots,f=l.type;if(f!==u.FULLSCREEN.type){var p=r[c+1];if(p){var d=m(p,n);if(a%2==0&&1===h&&d.slots%2==0){var E=u.WIDE;h=E.slots,f=E.type}}else if(c%2==0){var v=u.WIDE;h=v.slots,f=v.type}}a+=h;var L={app:s,slots:h,reportAppSize:l},x=i.map((function(r){if(e)return r;var n=6-r.reduce((function(t,r){return t+r.slots}),0);return n>=h&&(e=!0),n>=h?[].concat(t(r),[L]):r}));return e?x:[].concat(t(x),[[].concat(o,[L])])}),i)}function h(t){var i=t.w,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return a?o:i>=5?e:i>=3?n:r}export{a as PDF_REPORT_PIXEL_RATIO,i as PIXELS_IN_CM,s as getAppPixelSize,m as getAppType,h as getPDFAppSize,l as getPages,c as sortPDFDashboardApps};
@@ -1 +1 @@
1
- import"lodash";import"../constants/goals.js";import"../constants/apps.js";import"../constants/completion.js";import"../constants/segment.js";import"../constants/alerts.js";import{DEV_CENTER_CLI_APP_ID as n}from"../constants/devcenter.js";import"../constants/drillstring.js";var t=function(n,t){return n?"".concat(n.replace(/\./g,"_"),"-").concat(t):""},o=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return o===+(null==t?void 0:t.maximizeDC)};function a(n){return{push:function(t){"string"==typeof t?n.push(t):n.push({pathname:t.pathname,query:t.query})},location:{pathname:n.location.pathname,query:n.location.query}}}var r=function(n){return n?+(n.split("#")[2]||"").replace("}",""):void 0},e=function(n){var t,o;return null!==(t=null==n||null===(o=n.package)||void 0===o?void 0:o.manifest.application.name)&&void 0!==t?t:n.name},i=function(n){return"dev_center"===n.app.platform};export{a as createDevCenterRouter,t as getAppIdentifier,e as getAppName,r as getTimestampFromQuery,o as isAppMaximized,i as isDevCenterApp};
1
+ import"../constants/completion.js";import"../constants/alerts.js";import"lodash";import{DEV_CENTER_CLI_APP_ID as n}from"../constants/devcenter.js";import"../constants/goals.js";import"../constants/segment.js";import"../constants/apps.js";import"../constants/drillstring.js";var t=function(n,t){return n?"".concat(n.replace(/\./g,"_"),"-").concat(t):""},o=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return o===+(null==t?void 0:t.maximizeDC)};function a(n){return{push:function(t){"string"==typeof t?n.push(t):n.push({pathname:t.pathname,query:t.query})},location:{pathname:n.location.pathname,query:n.location.query}}}var r=function(n){return n?+(n.split("#")[2]||"").replace("}",""):void 0},e=function(n){var t,o;return null!==(t=null==n||null===(o=n.package)||void 0===o?void 0:o.manifest.application.name)&&void 0!==t?t:n.name},i=function(n){return"dev_center"===n.app.platform};export{a as createDevCenterRouter,t as getAppIdentifier,e as getAppName,r as getTimestampFromQuery,o as isAppMaximized,i as isDevCenterApp};
package/utils/index.js CHANGED
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";export{default as AccuracyUtils}from"./AccuracyUtils.js";import{convertArray as t,convertValue as o,getAllUnitTypes as e,getDefaultImperialUnit as s,getDefaultUnits as i,getUnitDescription as a,getUnitDisplay as n,getUnitPlural as p,getUnitPreference as m,getUnitsByType as f,getUnitSingular as c,getUnitSystem as l,updateUserUnits as j,getUserUnits as u,subscribeForUserUnitsUpdates as x,convertImmutables as g,convertImmutablesByBatch as y,getUniqueUnitsByType as U}from"./convert.js";import*as b from"./convert.js";export{b as convert};import*as v from"./DrillstringUtils.js";export{v as drillstringUtils};import*as d from"./FluidCheckUtils.js";export{d as fluidCheckUtils};import*as O from"./chartSeries.js";export{O as chartSeries};import*as h from"./metrics/index.js";export{h as metricsUtils};import*as P from"./main.js";export{P as main};import*as w from"./sqlParser.js";export{w as sqlParser};import*as D from"./completion.js";export{D as completion};import*as S from"./mapUnits.js";export{S as mapUnits};import*as A from"./time.js";export{A as time};import*as C from"./components.js";import*as N from"./mapbox.js";import*as T from"./torqueAndHookloadUtils.js";export{T as torqueAndHookloadUtils};import*as k from"./StageDesignVActualUtils.js";export{k as StageDesignVActualUtils};import*as B from"./reports.js";export{B as reports};import*as E from"./ga.js";export{E as ga};import*as I from"./nativeMessages.js";export{I as nativeMessages};import*as K from"./goals.js";export{K as goals};import*as q from"./notifications.js";export{q as notifications};import*as F from"./permissions.js";export{F as permissions};import*as J from"./alerts.js";export{J as alerts};import*as V from"./lasParser.js";export{V as lasParser};import*as H from"./audio.js";export{H as audio};import*as M from"./loadable.js";export{M as loadable};import*as W from"./rollbar.js";export{W as rollbar};import*as z from"./devcenter.js";export{z as devcenter};import*as G from"./mobileDetect.js";export{G as mobileDetect};import*as L from"./drillstring/index.js";export{L as drillstring};import*as Q from"./casing/index.js";export{Q as casing};import*as R from"./csvExport.js";export{R as csvExport};import*as X from"./formatting.js";export{X as formatting};export{createNotification,removeNotification,showErrorNotification,showInfoNotification,showSuccessNotification,showWarningNotification}from"./notificationToasts.js";export{convertKeysToCamelCase,convertKeysToSnakeCase,getConvertKeys}from"./convertKeys.js";function Y(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.push.apply(o,e)}return o}var Z={get:function(r,t){var o=r[t];return"function"==typeof o?function(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return o.apply(r,e.map((function(r){return r.toJS?r.toJS():r})))}:o}};function $(t){return new Proxy(function(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?Y(Object(e),!0).forEach((function(o){r(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Y(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({},t),Z)}var _=t,rr=o,tr=e,or=s,er=i,sr=a,ir=n,ar=p,nr=m,pr=f,mr=c,fr=l,cr=j,lr=u,jr=x,ur=g,xr=y,gr=U,yr=$(N),Ur=$(C);export{Ur as components,_ as convertArray,ur as convertImmutables,xr as convertImmutablesByBatch,rr as convertValue,tr as getAllUnitTypes,or as getDefaultImperialUnit,er as getDefaultUnits,gr as getUniqueUnitsByType,sr as getUnitDescription,ir as getUnitDisplay,ar as getUnitPlural,nr as getUnitPreference,mr as getUnitSingular,fr as getUnitSystem,pr as getUnitsByType,lr as getUserUnits,yr as mapbox,jr as subscribeForUserUnitsUpdates,cr as updateUserUnits};
1
+ import r from"@babel/runtime/helpers/defineProperty";import*as t from"./StageDesignVActualUtils.js";export{t as StageDesignVActualUtils};import*as o from"./alerts.js";export{o as alerts};import*as e from"./audio.js";export{e as audio};import{convertArray as s,convertValue as i,getAllUnitTypes as a,getDefaultImperialUnit as p,getDefaultUnits as n,getUnitDescription as m,getUnitDisplay as f,getUnitPlural as c,getUnitPreference as l,getUnitsByType as j,getUnitSingular as x,getUnitSystem as u,updateUserUnits as g,getUserUnits as y,subscribeForUserUnitsUpdates as U,convertImmutables as b,convertImmutablesByBatch as v,getUniqueUnitsByType as d}from"./convert.js";import*as O from"./convert.js";export{O as convert};import*as h from"./casing/index.js";export{h as casing};import*as P from"./chartSeries.js";export{P as chartSeries};import*as w from"./completion.js";export{w as completion};import*as D from"./components.js";import*as S from"./csvExport.js";export{S as csvExport};import*as A from"./metrics/index.js";export{A as metricsUtils};import*as C from"./devcenter.js";export{C as devcenter};import*as N from"./drillstring/index.js";export{N as drillstring};import*as T from"./DrillstringUtils.js";export{T as drillstringUtils};import*as k from"./FluidCheckUtils.js";export{k as fluidCheckUtils};import*as B from"./formatting.js";export{B as formatting};import*as E from"./reports.js";export{E as reports};import*as I from"./ga.js";export{I as ga};import*as K from"./goals.js";export{K as goals};import*as q from"./lasParser.js";export{q as lasParser};import*as F from"./loadable.js";export{F as loadable};import*as J from"./main.js";export{J as main};import*as V from"./mapUnits.js";export{V as mapUnits};import*as H from"./mapbox.js";import*as M from"./mobileDetect.js";export{M as mobileDetect};import*as R from"./nativeMessages.js";export{R as nativeMessages};import*as W from"./notifications.js";export{W as notifications};import*as z from"./permissions.js";export{z as permissions};import*as G from"./rollbar.js";export{G as rollbar};import*as L from"./sqlParser.js";export{L as sqlParser};import*as Q from"./time.js";export{Q as time};import*as X from"./torqueAndHookloadUtils.js";export{X as torqueAndHookloadUtils};export{default as AccuracyUtils}from"./AccuracyUtils.js";export{createNotification,removeNotification,showErrorNotification,showInfoNotification,showSuccessNotification,showWarningNotification}from"./notificationToasts.js";export{convertKeysToCamelCase,convertKeysToSnakeCase,getConvertKeys}from"./convertKeys.js";import*as Y from"./dashboardReports.js";export{Y as dashboardReports};import*as Z from"./apps.js";export{Z as apps};function $(r,t){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.push.apply(o,e)}return o}var _={get:function(r,t){var o=r[t];return"function"==typeof o?function(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return o.apply(r,e.map((function(r){return r.toJS?r.toJS():r})))}:o}};function rr(t){return new Proxy(function(t){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?$(Object(e),!0).forEach((function(o){r(t,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):$(Object(e)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}))}return t}({},t),_)}var tr=s,or=i,er=a,sr=p,ir=n,ar=m,pr=f,nr=c,mr=l,fr=j,cr=x,lr=u,jr=g,xr=y,ur=U,gr=b,yr=v,Ur=d,br=rr(H),vr=rr(D);export{vr as components,tr as convertArray,gr as convertImmutables,yr as convertImmutablesByBatch,or as convertValue,er as getAllUnitTypes,sr as getDefaultImperialUnit,ir as getDefaultUnits,Ur as getUniqueUnitsByType,ar as getUnitDescription,pr as getUnitDisplay,nr as getUnitPlural,mr as getUnitPreference,cr as getUnitSingular,lr as getUnitSystem,fr as getUnitsByType,xr as getUserUnits,br as mapbox,ur as subscribeForUserUnitsUpdates,jr as updateUserUnits};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import e from"@babel/runtime/helpers/slicedToArray";function n(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function i(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}var s=function n(){var s=this;t(this,n),r(this,"getConfiguration",(function(r){var t=null,n=null,i=null,o=!1;r.forEach((function(r){if(r.toLowerCase().startsWith("~version"))o=!0;else if(r.toLowerCase().startsWith("~"))o=!1;else{if(o){var a=r.split(" ").filter(Boolean),u=e(a,3),l=u[0],c=u[1],f=u[2];switch(l){case"VERS.":t=c;break;case"WRAP.":n=c;break;case"DLM":i=f}}s.config={version:t,wrap:n,delimiter:i}}}))})),r(this,"parseHeaders",(function(r){var t=r.split("\n");s.getConfiguration(t);var e=!1;return t.reduce((function(r,t){if(t.toLowerCase().startsWith("~curve"))return e=!0,r;if(t.startsWith("~")&&(e=!1),e&&!t.startsWith("#")&&!t.startsWith("\r")){var n=t.split(" ").filter(Boolean);return n?r.push(n[0]):r}return r}),[])})),r(this,"parseData",(function(t,e,n){var s=t.split("\n"),o=!1;return s.reduce((function(t,s){if(s.toLowerCase().startsWith("~a"))return o=!0,t;if(s.startsWith("~")&&(o=!1),o){var a=s.split(/[\t\s,]/).filter(Boolean).reduce((function(t,s,o){var a=e[o],u=n.find((function(r){return r.parsingKey===a}));if(u){var l=u.innerKey;return i(i({},t),{},r({},l,parseFloat(s,2)))}return t}),{});return a.isEmpty()?t:t.push(a)}return t}),[])})),this.config={version:null,wrap:null,delimiter:null}};export default s;
1
+ import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/classCallCheck";function n(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function i(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?n(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):n(Object(i)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(i,r))}))}return t}var s=function n(){var s=this;e(this,n),r(this,"getConfiguration",(function(r){var e=null,n=null,i=null,o=!1;r.forEach((function(r){if(r.toLowerCase().startsWith("~version"))o=!0;else if(r.toLowerCase().startsWith("~"))o=!1;else{if(o){var a=r.split(" ").filter(Boolean),u=t(a,3),l=u[0],c=u[1],f=u[2];switch(l){case"VERS.":e=c;break;case"WRAP.":n=c;break;case"DLM":i=f}}s.config={version:e,wrap:n,delimiter:i}}}))})),r(this,"parseHeaders",(function(r){var t=r.split("\n");s.getConfiguration(t);var e=!1;return t.reduce((function(r,t){if(t.toLowerCase().startsWith("~curve"))return e=!0,r;if(t.startsWith("~")&&(e=!1),e&&!t.startsWith("#")&&!t.startsWith("\r")){var n=t.split(" ").filter(Boolean);return n?r.push(n[0]):r}return r}),[])})),r(this,"parseData",(function(t,e,n){var s=t.split("\n"),o=!1;return s.reduce((function(t,s){if(s.toLowerCase().startsWith("~a"))return o=!0,t;if(s.startsWith("~")&&(o=!1),o){var a=s.split(/[\t\s,]/).filter(Boolean).reduce((function(t,s,o){var a=e[o],u=n.find((function(r){return r.parsingKey===a}));if(u){var l=u.innerKey;return i(i({},t),{},r({},l,parseFloat(s,2)))}return t}),{});return a.isEmpty()?t:t.push(a)}return t}),[])})),this.config={version:null,wrap:null,delimiter:null}};export default s;
package/utils/main.js CHANGED
@@ -1 +1 @@
1
- import e from"lodash/isNumber";import t from"@babel/runtime/regenerator";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/toConsumableArray";import o from"file-saver";import i from"chroma-js";import a from"lodash/round";import u from"lodash/isNaN";import c from"html2canvas";import m from"@material-ui/core/colors/grey";import s from"@material-ui/core/colors/red";import l from"@material-ui/core/colors/yellow";import f from"@material-ui/core/colors/blue";import p from"@material-ui/core/colors/green";import{SUPPORTED_DRILLING_OPERATIONS as h,DEFAULT_DRILLING_OPERATION_TYPE as d}from"../constants/apps.js";var g=m[500],v=s[500],b=l[500],N=f[500],F=p[500],w={formatValuePrecision:function(e){return Number.isFinite(e)?e<100&&e>-100?e.formatNumeral("0,0.00"):e.formatNumeral("0,0.0"):e},downloadPDF:function(e,t){var r=new File([t],"".concat(e,".pdf"),{type:"application/pdf;charset=utf-8"});o.saveAs(r)},unescapeLineBreaks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/\\n/g,"\n")},dataURLtoBlob:function(e){for(var t=window.atob(e.split(",")[1]),r=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),o=new Uint8Array(n),i=0;i<t.length;i+=1)o[i]=t.charCodeAt(i);return new Blob([n],{type:r})},banchmarkTimer:function(e){var t=new Date;return{stop:function(){var r=(new Date).getTime()-t.getTime();console.info("Timer:",e,"finished in",r,"ms")}}},convertToPercent:function(e,t){return e&&Number.isFinite(t)&&0!==t?Math.round(100*e/t*100)/100:0},getAverageByColumnsForCSV:function(t){var r=this,o=t.split("\n"),i=o[0].split(","),c=o[1].split(",").map((function(e){return[r.parseNumberFromString(e)]})),m=this.getLinesFrequency(o.length);o.shift();var s=o.reduce((function(t,o,i){if(i%m==0){var a=o.split(",").map(r.parseNumberFromString);return t.map((function(t,r){var o=+a[r];return e(o)&&!u(o)&&o>0?[].concat(n(t),[o]):t}))}return t}),c).map((function(e){return e.reduce((function(e,t){return e+t}))/e.length}));return s.map((function(e,t){return{header:i[t],value:a(e,5)}}))},parseNumberFromString:function(e){var t=+e;return u(t)?0:t},getLinesFrequency:function(e){var t="".concat(e);if(t.length<=4)return 1;var r=t.slice(4).length;return 1*Math.pow(10,r)},getColorFromString:function(e){return this.intToRGB(this.hashCode(e))},intToRGB:function(e){var t=(16777215&e).toString(16).toUpperCase();return"00000".substring(0,6-t.length)+t},hashCode:function(e){for(var t=0,r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t);return t},throttledEventListener:function(e,t,r,n){var o=!1,i=function(){o||(o=!0,window.requestAnimationFrame((function(){r.call(n),o=!1})))};return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}},getSnapshotForElement:function(e){return r(t.mark((function r(){var n,o,i,a;return t.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=window.document.getElementById(e)){t.next=3;break}return t.abrupt("return",null);case 3:return o=n.clientHeight,i=n.clientWidth,t.next=6,c(n,{height:o,width:i,logging:!1});case 6:return a=t.sent,t.abrupt("return",a.toDataURL());case 8:case"end":return t.stop()}}),r)})))()},getAssetStatusColor:function(e){return"active"===e?F:"complete"===e?N:"paused"===e?b:"idle"===e||"unknown"===e?g:v},closest:function(e,t){return e.reduce((function(e,r){return Math.abs(r-t)<Math.abs(e-t)?r:e}))},mathMax:function(e,t){return Number.isFinite(e)?Number.isFinite(t)?Math.max(e,t):e:t},mathMin:function(e,t){return Number.isFinite(e)?Number.isFinite(t)?Math.min(e,t):e:t},getOperationByType:function(e){return Object.values(h).find((function(t){return t.value===e||d}))},getUserFullName:function(e){return e?"".concat(e.first_name," ").concat(e.last_name):""},getNameInitials:function(e){return e.split(" ").slice(0,2).map((function(e){return e.substr(0,1)})).join("")},getS3BucketName:function(){return"development"===process.env.REACT_APP_ENVIRONMENT||"qa"===process.env.REACT_APP_ENVIRONMENT?"corva-files-qa":"corva-files"},getS3FileUrl:function(e,t){return"https://".concat(e,".s3.amazonaws.com/").concat(t)},getFileNameWithExtensionFromPath:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/^.*[\\/]/,"")},hexToRgbA:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=i(e).rgba();return r[r.length-1]=t,"rgba(".concat(r.join(","),")")},truncateString:function(e,t){return e.length>t?"".concat(e.substr(0,t-1),"&hellip;"):e},copyToClipboard:function(e){var t=document.createElement("textarea");t.textContent=e,document.body.appendChild(t);var r=document.getSelection(),n=document.createRange();n.selectNode(t),r.removeAllRanges(),r.addRange(n),document.execCommand("copy"),r.removeAllRanges(),document.body.removeChild(t)}};window.getSnapshotForElement=w.getSnapshotForElement;export default w;
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"file-saver";import{SUPPORTED_DRILLING_OPERATIONS as r,DEFAULT_DRILLING_OPERATION_TYPE as n}from"../constants/apps.js";import o from"lodash/isNumber";import i from"@babel/runtime/regenerator";import a from"@babel/runtime/helpers/asyncToGenerator";import u from"chroma-js";import c from"lodash/round";import m from"lodash/isNaN";import s from"html2canvas";import l from"@material-ui/core/colors/grey";import f from"@material-ui/core/colors/red";import p from"@material-ui/core/colors/yellow";import h from"@material-ui/core/colors/blue";import d from"@material-ui/core/colors/green";var g=l[500],v=f[500],b=p[500],N=h[500],F=d[500],w={formatValuePrecision:function(e){return Number.isFinite(e)?e<100&&e>-100?e.formatNumeral("0,0.00"):e.formatNumeral("0,0.0"):e},downloadPDF:function(e,r){var n=new File([r],"".concat(e,".pdf"),{type:"application/pdf;charset=utf-8"});t.saveAs(n)},unescapeLineBreaks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/\\n/g,"\n")},dataURLtoBlob:function(e){for(var t=window.atob(e.split(",")[1]),r=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),o=new Uint8Array(n),i=0;i<t.length;i+=1)o[i]=t.charCodeAt(i);return new Blob([n],{type:r})},banchmarkTimer:function(e){var t=new Date;return{stop:function(){var r=(new Date).getTime()-t.getTime();console.info("Timer:",e,"finished in",r,"ms")}}},convertToPercent:function(e,t){return e&&Number.isFinite(t)&&0!==t?Math.round(100*e/t*100)/100:0},getAverageByColumnsForCSV:function(t){var r=this,n=t.split("\n"),i=n[0].split(","),a=n[1].split(",").map((function(e){return[r.parseNumberFromString(e)]})),u=this.getLinesFrequency(n.length);n.shift();var s=n.reduce((function(t,n,i){if(i%u==0){var a=n.split(",").map(r.parseNumberFromString);return t.map((function(t,r){var n=+a[r];return o(n)&&!m(n)&&n>0?[].concat(e(t),[n]):t}))}return t}),a).map((function(e){return e.reduce((function(e,t){return e+t}))/e.length}));return s.map((function(e,t){return{header:i[t],value:c(e,5)}}))},parseNumberFromString:function(e){var t=+e;return m(t)?0:t},getLinesFrequency:function(e){var t="".concat(e);if(t.length<=4)return 1;var r=t.slice(4).length;return 1*Math.pow(10,r)},getColorFromString:function(e){return this.intToRGB(this.hashCode(e))},intToRGB:function(e){var t=(16777215&e).toString(16).toUpperCase();return"00000".substring(0,6-t.length)+t},hashCode:function(e){for(var t=0,r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t);return t},throttledEventListener:function(e,t,r,n){var o=!1,i=function(){o||(o=!0,window.requestAnimationFrame((function(){r.call(n),o=!1})))};return e.addEventListener(t,i),function(){e.removeEventListener(t,i)}},getSnapshotForElement:function(e){return a(i.mark((function t(){var r,n,o,a;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=window.document.getElementById(e)){t.next=3;break}return t.abrupt("return",null);case 3:return n=r.clientHeight,o=r.clientWidth,t.next=6,s(r,{height:n,width:o,logging:!1});case 6:return a=t.sent,t.abrupt("return",a.toDataURL());case 8:case"end":return t.stop()}}),t)})))()},getAssetStatusColor:function(e){return"active"===e?F:"complete"===e?N:"paused"===e?b:"idle"===e||"unknown"===e?g:v},closest:function(e,t){return e.reduce((function(e,r){return Math.abs(r-t)<Math.abs(e-t)?r:e}))},mathMax:function(e,t){return Number.isFinite(e)?Number.isFinite(t)?Math.max(e,t):e:t},mathMin:function(e,t){return Number.isFinite(e)?Number.isFinite(t)?Math.min(e,t):e:t},getOperationByType:function(e){return Object.values(r).find((function(t){return t.value===e||n}))},getUserFullName:function(e){return e?"".concat(e.first_name," ").concat(e.last_name):""},getNameInitials:function(e){return e.split(" ").slice(0,2).map((function(e){return e.substr(0,1)})).join("")},getS3BucketName:function(){return"development"===process.env.REACT_APP_ENVIRONMENT||"qa"===process.env.REACT_APP_ENVIRONMENT?"corva-files-qa":"corva-files"},getS3FileUrl:function(e,t){return"https://".concat(e,".s3.amazonaws.com/").concat(t)},getFileNameWithExtensionFromPath:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/^.*[\\/]/,"")},hexToRgbA:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=u(e).rgba();return r[r.length-1]=t,"rgba(".concat(r.join(","),")")},truncateString:function(e,t){return e.length>t?"".concat(e.substr(0,t-1),"&hellip;"):e},copyToClipboard:function(e){var t=document.createElement("textarea");t.textContent=e,document.body.appendChild(t);var r=document.getSelection(),n=document.createRange();n.selectNode(t),r.removeAllRanges(),r.addRange(n),document.execCommand("copy"),r.removeAllRanges(),document.body.removeChild(t)}};window.getSnapshotForElement=w.getSnapshotForElement;export default w;
@@ -1 +1 @@
1
- import a from"lodash/get";import t from"@babel/runtime/helpers/slicedToArray";var r=function(r,i){var e=a(i,["data","activity_groups","start_timestamp"]),o=a(i,["data","activity_groups","end_timestamp"]),m=t(r,2),p=m[0],s=m[1],l=p&&s&&p!==s&&p>=e&&p<=o&&s>=e&&s<=o?r:[e,o];return{playbackValue:l,isValidPlayback:l[0]&&l[1]&&l[0]!==l[1]}};export{r as getPlaybackValue};
1
+ import a from"@babel/runtime/helpers/slicedToArray";import t from"lodash/get";var r=function(r,i){var e=t(i,["data","activity_groups","start_timestamp"]),o=t(i,["data","activity_groups","end_timestamp"]),m=a(r,2),p=m[0],s=m[1],l=p&&s&&p!==s&&p>=e&&p<=o&&s>=e&&s<=o?r:[e,o];return{playbackValue:l,isValidPlayback:l[0]&&l[1]&&l[0]!==l[1]}};export{r as getPlaybackValue};
@@ -1 +0,0 @@
1
- var B={B:"B",KB:"KB",MB:"MB"},e={MB:1e6,KB:1e3};export{e as BYTES_IN,B as SIZE_UNIT};
@@ -1 +0,0 @@
1
- import{round as e}from"lodash";import t from"@babel/runtime/helpers/slicedToArray";import{useMemo as r,useState as n,useEffect as i}from"react";import{BYTES_IN as o,SIZE_UNIT as a}from"../constants.js";var s=function(s,d){var u=n(0),f=t(u,2),c=f[0],m=f[1],l=n(!1),v=t(l,2),g=v[0],p=v[1],B=n(!1),z=t(B,2),L=z[0],E=z[1],T=n(!1),b=t(T,2),K=b[0],M=b[1],S=function(){p(!0)},h=function(e){m(e.loaded)},x=function(e){setTimeout((function(){p(!1),E(!0),setTimeout((function(){return M(!0)}),1e3),d(e.target.result)}),400)},A=function(){};i((function(){if(s){var e=new FileReader;e.addEventListener("loadstart",S),e.addEventListener("progress",h),e.addEventListener("load",x),e.addEventListener("error",A),e.readAsText(s)}}),[s]);var F=function(){return 100*c/(s.size||1)},P=function(t){return t>o.MB?e(t/o.MB,1):t>o.KB?e(t/o.KB,1):t},j=function(e){return e>1048576?a.MB:e>1024?a.KB:a.B};return r((function(){return{getProgressPercent:F,getFormattedSize:P,getSizeUnit:j,isLoading:g,isLoaded:L,isDeletable:K,loadedSize:c,size:s.size,name:s.name}}),[s,c,g,L,K])};export{s as useUploadingFile};
@@ -1 +0,0 @@
1
- import{jsx as C}from"react/jsx-runtime";var V=function(){return C("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:C("path",{d:"M31.3357 2.784H18.6638V0.696C18.6681 0.661463 18.6681 0.626537 18.6638 0.592V0.592C18.6685 0.554811 18.6685 0.517189 18.6638 0.48V0.48C18.6473 0.440114 18.6258 0.402481 18.5998 0.368V0.368C18.5569 0.277435 18.4945 0.197482 18.417 0.133863C18.3396 0.0702436 18.249 0.0245322 18.1518 0L17.9038 0L0.567954 2.792C0.407636 2.81876 0.262204 2.90205 0.158007 3.02679C0.0538104 3.15154 -0.00225866 3.30948 -4.13915e-05 3.472V28.52C-0.00254391 28.6835 0.053243 28.8425 0.157323 28.9685C0.261404 29.0946 0.406975 29.1795 0.567954 29.208L17.8958 32H18.1438C18.2902 31.9641 18.4199 31.8794 18.5118 31.76V31.76C18.5377 31.7284 18.5592 31.6934 18.5758 31.656V31.656C18.5804 31.6215 18.5804 31.5865 18.5758 31.552C18.5789 31.5388 18.5789 31.5252 18.5758 31.512V31.512C18.5798 31.4774 18.5798 31.4426 18.5758 31.408V31.408V29.328H31.3357C31.516 29.3238 31.6873 29.2482 31.8118 29.1177C31.9363 28.9873 32.0039 28.8127 31.9997 28.6324V3.48C32.0018 3.39069 31.9864 3.30185 31.9541 3.21853C31.9219 3.13521 31.8736 3.05906 31.8119 2.99443C31.7503 2.92979 31.6765 2.87794 31.5948 2.84184C31.513 2.80573 31.425 2.78608 31.3357 2.784V2.784ZM30.6637 27.824H18.6638V4.208H30.6637V27.824Z",fill:"#616161"})})};export{V as FileIcon};
@@ -1 +0,0 @@
1
- import{jsxs as e,jsx as i,Fragment as l}from"react/jsx-runtime";import{makeStyles as a,Typography as r,LinearProgress as t}from"@material-ui/core";import s from"prop-types";import{CheckCircleOutline as o,Delete as n}from"@material-ui/icons";import{FileIcon as c}from"../FileIcon/FileIcon.js";import{useUploadingFile as p}from"../../effects/useUploadingFile.js";var d=a((function(e){return{fileStateWrapper:{display:"flex",alignItems:"center"},fileIconContainer:{display:"flex",alignItems:"center",marginRight:"10px"},fileState:{display:"flex",flexGrow:"1",alignItems:"center"},fileStateProgress:{flexGrow:"1"},fileNameWrapper:{display:"table",tableLayout:"fixed",width:"100%"},fileName:{display:"table-cell",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontSize:"14px",lineHeight:"16px"},fileSize:{fontSize:"11px",lineHeight:"12px",color:e.palette.primary.text6},checkIcon:{color:e.palette.success.bright},deleteIcon:{color:"#DADADA",cursor:"pointer"},progressBar:{borderRadius:"2px",height:"2px",margin:"4px 0"},fileActions:{display:"flex",alignItems:"center",paddingLeft:"24px"}}}));function f(a){var s=d(),f=a.file,m=a.onLoad,g=a.onDelete,h=p(f,m);return e("div",{className:s.fileStateWrapper,children:[i("div",{className:s.fileIconContainer,children:i(c,{})}),e("div",{className:s.fileState,children:[e("div",{className:s.fileStateProgress,children:[i("div",{className:s.fileNameWrapper,children:i(r,{className:s.fileName,children:h.name})}),h.isLoading&&e(l,{children:[i(t,{className:s.progressBar,variant:"determinate",value:h.getProgressPercent()}),e(r,{className:s.fileSize,children:[h.getFormattedSize(h.loadedSize)," of ",h.getFormattedSize(h.size)," ",h.getSizeUnit(h.size)]})]})]}),e("div",{className:s.fileActions,children:[h.isLoaded&&!h.isDeletable&&i(o,{className:s.checkIcon}),h.isDeletable&&i(n,{className:s.deleteIcon,onClick:g})]})]})]})}f.propTypes={file:s.shape({}).isRequired,onLoad:s.func.isRequired,onDelete:s.func.isRequired};export default f;