@corva/ui 3.30.0-rc.0 → 3.31.0-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/cjs-bundle/components/Drillstring/BHAComponentDetail/constants.js +1 -1
  2. package/cjs-bundle/components/Drillstring/BHAComponentDetail/constants.js.map +1 -1
  3. package/cjs-bundle/components/Drillstring/BHAComponentIcon.js +1 -1
  4. package/cjs-bundle/components/Drillstring/BHAComponentIcon.js.map +1 -1
  5. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  6. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  7. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js +1 -1
  8. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js.map +1 -1
  9. package/cjs-bundle/components/Drillstring/BHASchematic.js +1 -1
  10. package/cjs-bundle/components/Drillstring/BHASchematic.js.map +1 -1
  11. package/cjs-bundle/components/Drillstring/BHATileIcon.js +1 -1
  12. package/cjs-bundle/components/Drillstring/BHATileIcon.js.map +1 -1
  13. package/cjs-bundle/constants/bha.js +1 -1
  14. package/cjs-bundle/constants/bha.js.map +1 -1
  15. package/cjs-bundle/constants/drillstring.js +1 -1
  16. package/cjs-bundle/constants/drillstring.js.map +1 -1
  17. package/cjs-bundle/utils/DrillstringUtils.js +1 -1
  18. package/cjs-bundle/utils/DrillstringUtils.js.map +1 -1
  19. package/cjs-bundle/utils/bha.js +1 -1
  20. package/cjs-bundle/utils/bha.js.map +1 -1
  21. package/cjs-bundle/utils/drillstring/conversion.js +1 -1
  22. package/cjs-bundle/utils/drillstring/conversion.js.map +1 -1
  23. package/cjs-bundle/utils/drillstring/schematic.js +1 -1
  24. package/cjs-bundle/utils/drillstring/schematic.js.map +1 -1
  25. package/cjs-bundle/utils/drillstring/validation.js +1 -1
  26. package/cjs-bundle/utils/drillstring/validation.js.map +1 -1
  27. package/components/Drillstring/BHAComponentDetail/constants.d.ts.map +1 -1
  28. package/components/Drillstring/BHAComponentDetail/constants.js +1 -1
  29. package/components/Drillstring/BHAComponentDetail/constants.js.map +1 -1
  30. package/components/Drillstring/BHAComponentIcon.d.ts.map +1 -1
  31. package/components/Drillstring/BHAComponentIcon.js +1 -1
  32. package/components/Drillstring/BHAComponentIcon.js.map +1 -1
  33. package/components/Drillstring/BHAComponentsTable/components/Component.d.ts.map +1 -1
  34. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  35. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  36. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.d.ts.map +1 -1
  37. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js +1 -1
  38. package/components/Drillstring/BHAComponentsTable/components/EditComponentDialog.js.map +1 -1
  39. package/components/Drillstring/BHASchematic.d.ts.map +1 -1
  40. package/components/Drillstring/BHASchematic.js +1 -1
  41. package/components/Drillstring/BHASchematic.js.map +1 -1
  42. package/components/Drillstring/BHATileIcon.d.ts.map +1 -1
  43. package/components/Drillstring/BHATileIcon.js +1 -1
  44. package/components/Drillstring/BHATileIcon.js.map +1 -1
  45. package/constants/bha.d.ts +1 -0
  46. package/constants/bha.d.ts.map +1 -1
  47. package/constants/bha.js +1 -1
  48. package/constants/bha.js.map +1 -1
  49. package/constants/drillstring.d.ts.map +1 -1
  50. package/constants/drillstring.js +1 -1
  51. package/constants/drillstring.js.map +1 -1
  52. package/package.json +1 -1
  53. package/utils/DrillstringUtils.d.ts.map +1 -1
  54. package/utils/DrillstringUtils.js +1 -1
  55. package/utils/DrillstringUtils.js.map +1 -1
  56. package/utils/bha.js +1 -1
  57. package/utils/bha.js.map +1 -1
  58. package/utils/drillstring/conversion.d.ts.map +1 -1
  59. package/utils/drillstring/conversion.js +1 -1
  60. package/utils/drillstring/conversion.js.map +1 -1
  61. package/utils/drillstring/schematic.js +1 -1
  62. package/utils/drillstring/schematic.js.map +1 -1
  63. package/utils/drillstring/validation.d.ts.map +1 -1
  64. package/utils/drillstring/validation.js +1 -1
  65. package/utils/drillstring/validation.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"validation.js","sources":["../../../../src/utils/drillstring/validation.js"],"sourcesContent":["import moment from 'moment';\nimport { isEmpty, omit, maxBy } from 'lodash';\n\nimport { getUnitPreference, convertValue, getUnitDisplay } from '../convert';\n\nconst ALLOWED_DIFF_OD_BIT_SIZE = 0.1;\n\nconst DEF_MIN_ID = 0;\nconst DEF_MAX_ID = 100;\nconst DEF_MIN_OD = 1;\nconst DEF_MAX_OD = 100;\nconst DEF_MIN_LENGTH = 0;\n\nconst UR_MIN_ID = 0;\nconst UR_MAX_ID = 50;\nconst UR_MIN_BODY_OD = 1;\nconst UR_MAX_BODY_OD = 50;\nconst UR_MIN_OPENED_OD = 1;\nconst UR_MAX_OPENED_OD = 50;\n\nconst CT_MIN_ID = 0;\nconst CT_MAX_ID = 100;\nconst CT_MIN_OD = 1;\nconst CT_MAX_OD = 100;\nconst CT_MIN_RD = 0;\nconst CT_MAX_RD = 500;\nconst CT_MIN_LENGTH = 0;\n\nconst DP_MIN_ID = 1;\nconst DP_MAX_ID = 7;\nconst DP_MIN_OD = 2;\nconst DP_MAX_OD = 8;\nconst DP_MIN_TJ_ID = 1;\nconst DP_MAX_TJ_ID = 7;\nconst DP_MIN_TJ_OD = 2;\nconst DP_MAX_TJ_OD = 10;\nconst DP_MIN_LENGTH = 0;\n\nconst HWDP_MIN_ID = 1;\nconst HWDP_MAX_ID = 7;\nconst HWDP_MIN_OD = 2;\nconst HWDP_MAX_OD = 8;\nconst HWDP_MIN_TJ_ID = 1;\nconst HWDP_MAX_TJ_ID = 7;\nconst HWDP_MIN_TJ_OD = 2;\nconst HWDP_MAX_TJ_OD = 10;\nconst HWDP_MIN_LENGTH = 0;\n\nconst DC_MIN_ID = 0.5;\nconst DC_MAX_ID = 7;\nconst DC_MIN_OD = 2;\nconst DC_MAX_OD = 13;\nconst DC_MIN_LENGTH = 0;\n\nconst STABLE_MIN_ID = 0;\nconst STABLE_MAX_ID = 100;\nconst STABLE_MIN_OD = 1;\nconst STABLE_MAX_OD = 100;\nconst STABLE_MIN_LENGTH = 0;\n\nconst PDM_MIN_OD = 2;\nconst PDM_MAX_OD = 15;\nconst PDM_MIN_ID = 0;\nconst PDM_MAX_ID = 12;\nconst PDM_MIN_LENGTH = 4;\n\nconst PDM_MIN_STATOR = 2;\nconst PDM_MAX_STATOR = 10;\nconst PDM_MIN_ROTOR = 1;\nconst PDM_MAX_ROTOR = 10;\nconst PDM_MIN_RPG = 0;\nconst PDM_MAX_RPG = 10;\nconst PDM_MIN_WOB = 0;\nconst PDM_MAX_WOB = 200;\nconst PDM_MIN_FLOW_RANGE = 0;\nconst PDM_MAX_FLOW_RANGE = 2500;\nconst PDM_MIN_MODP = 0;\nconst PDM_MAX_MODP = 3000;\nconst PDM_MIN_TMODP = 0;\nconst PDM_MAX_TMODP = 40;\nconst PDM_MIN_FLOW_LOSS = 0;\nconst PDM_MAX_FLOW_LOSS = 20;\nconst PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS = 0;\n\nconst MWD_MIN_ID = 0;\nconst MWD_MAX_ID = 12;\nconst MWD_MIN_OD = 2;\nconst MWD_MAX_OD = 13;\nconst MWD_MIN_LENGTH = 1.0;\nconst MWD_MIN_PRESSURE_LOSS = 0;\n\nconst LWD_MIN_ID = 0.1;\nconst LWD_MAX_ID = 7;\nconst LWD_MIN_OD = 2;\nconst LWD_MAX_OD = 9.5;\nconst LWD_MIN_LENGTH = 1.0;\n\nconst RSS_MIN_ID = 0;\nconst RSS_MAX_ID = 12;\nconst RSS_MIN_OD = 2;\nconst RSS_MAX_OD = 13;\nconst RSS_MIN_LENGTH = 1.0;\nconst RSS_MIN_FLOW_LOSS = 0;\nconst RSS_MAX_FLOW_LOSS = 10;\nconst RSS_MIN_PRESSURE_LOSS = 0;\n\nconst AGITATOR_MIN_ID = 0;\nconst AGITATOR_MAX_ID = 12;\nconst AGITATOR_MIN_OD = 2;\nconst AGITATOR_MAX_OD = 13;\nconst AGITATOR_MIN_LENGTH = 1.0;\nconst AGITATOR_MIN_PRESSURE_LOSS = 0;\n\nconst BIT_MIN_TFA = 0;\nconst BIT_MAX_TFA = 20;\n\nconst DEPTH_IN_HOLE_MIN = 0;\nconst DEPTH_IN_HOLE_MAX = 55000;\nconst DEPTH_IN_HOLE_PROHIBITED = 1;\n\nconst NULL_ERROR = { general: { empty: 'It should not be empty.' } };\nconst FAMILY_ERROR = { general: { family: 'Family should be matched.' } };\n\nexport function ctoi(val, unitType, unit, precision = 2) {\n if (val === null || typeof val === 'undefined') {\n return null;\n }\n if (!unitType || !unit) {\n return parseFloat(val);\n }\n return parseFloat(convertValue(val, unitType, getUnitPreference(unitType), unit, precision));\n}\n\nexport function ctop(val, unitType, unit, precision = 2) {\n if (val !== 0 && !val) {\n return null;\n }\n return unitType && unit ? convertValue(val, unitType, unit, null, precision) : val;\n}\n\nexport function isValueEmpty(val) {\n return val === null || typeof val === 'undefined' || val === '';\n}\n\nexport function isValidNumber(num, min, max, { isMinInclusive = true } = {}) {\n const parsedNum = parseFloat(num);\n if (Number.isNaN(parsedNum)) return false;\n if ((isMinInclusive && parsedNum < min) || (!isMinInclusive && parsedNum <= min)) {\n return false;\n }\n if (max && parsedNum > max) return false;\n return true;\n}\n\nexport function isValidLinearWeight(id, od, linearWeight) {\n const prefShortLengthUnit = getUnitPreference('shortLength');\n let convertedId = id;\n let convertedOd = od;\n if (prefShortLengthUnit !== 'in') {\n convertedId = convertValue(id, 'shortLength', prefShortLengthUnit, 'in');\n convertedOd = convertValue(od, 'shortLength', prefShortLengthUnit, 'in');\n }\n const estimation = 2.673 * (convertedOd * convertedOd - convertedId * convertedId);\n const convertedEstimation =\n prefShortLengthUnit !== 'in' ? convertValue(estimation, 'massPerLength', 'lb-ft') : estimation;\n return linearWeight >= convertedEstimation * 0.5 && linearWeight <= convertedEstimation * 1.5;\n}\n\nexport function validateCommon(comp, baseParams, bitSize = null) {\n if (!comp || !baseParams) return NULL_ERROR;\n\n const {\n min_id,\n min_od,\n max_id,\n max_od,\n min_length,\n min_tj_id,\n max_tj_id,\n min_tj_od,\n max_tj_od,\n min_pressure_loss,\n min_off_bottom_pressure_loss,\n } = baseParams;\n\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n const error = {};\n let hasErrors = false;\n\n if (!isValueEmpty(min_id) && !isValueEmpty(min_od)) {\n if (!isValidNumber(comp.inner_diameter, min_id, max_id)) {\n error.inner_diameter = `${min_id.toFixed(1)}~${max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter, min_od, max_od)) {\n error.outer_diameter = `${min_od.toFixed(1)}~${max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (\n isValidNumber(comp.inner_diameter, min_id, max_id) &&\n isValidNumber(comp.outer_diameter, min_od, max_od) &&\n !isValidNumber(comp.inner_diameter, min_id, comp.outer_diameter)\n ) {\n error.outer_diameter = 'O.D > I.D';\n hasErrors = true;\n }\n\n if (!error.outer_diameter && bitSize) {\n if (\n +comp.outer_diameter + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.outer_diameter = ' O.D + 0.1 < Bit Size';\n hasErrors = true;\n }\n }\n\n // only check validity of linear weight when family is not bit\n if (!isValidNumber(comp.linear_weight, 0)) {\n error.linear_weight = 'Invalid value';\n hasErrors = true;\n }\n }\n\n if (!isValueEmpty(min_tj_id) && !isValueEmpty(min_tj_od)) {\n if (!isValidNumber(comp.inner_diameter_tooljoint, min_tj_id, max_tj_id)) {\n error.inner_diameter_tooljoint = `${min_tj_id.toFixed(1)}~${max_tj_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, min_tj_od, max_tj_od)) {\n error.outer_diameter_tooljoint = `${min_tj_od.toFixed(1)}~${max_tj_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, comp.outer_diameter, max_tj_od)) {\n error.outer_diameter_tooljoint = 'Tool Joint O.D >= O.D';\n hasErrors = true;\n }\n }\n\n if (!isValueEmpty(min_length)) {\n if (!isValidNumber(comp.length, min_length)) {\n error.length = 'Invalid value';\n hasErrors = true;\n }\n }\n\n if (!isValueEmpty(comp.length_tooljoint) && !isValueEmpty(comp.component_length)) {\n if (+comp.length_tooljoint > +comp.component_length) {\n error.length_tooljoint = 'Tool Joint Length < Component Length';\n hasErrors = true;\n }\n }\n\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n error.off_bottom_pressure_loss = {};\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const obpsItem = comp.off_bottom_pressure_loss[j];\n error.off_bottom_pressure_loss[j] = {};\n if (isValueEmpty(obpsItem.flow_rate)) {\n error.off_bottom_pressure_loss[j].flow_rate = 'flow rate is required.';\n hasErrors = true;\n }\n if (isValueEmpty(obpsItem.pressure_loss)) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasErrors = true;\n }\n if (\n !isValueEmpty(min_off_bottom_pressure_loss) &&\n !isValidNumber(obpsItem.pressure_loss, min_off_bottom_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'Invalid range';\n hasErrors = true;\n }\n }\n }\n\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n error.pressure_loss = {};\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const pressureLossItem = comp.pressure_loss[j];\n error.pressure_loss[j] = {};\n if (isValueEmpty(pressureLossItem.flow_rate)) {\n error.pressure_loss[j].flow_rate = 'flow rate is required.';\n hasErrors = true;\n }\n if (isValueEmpty(pressureLossItem.pressure_loss)) {\n error.pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasErrors = true;\n }\n if (\n !isValueEmpty(min_pressure_loss) &&\n !isValidNumber(pressureLossItem.pressure_loss, min_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.pressure_loss[j].pressure_loss = 'Invalid range';\n hasErrors = true;\n }\n }\n }\n\n if (comp.has_stabilizer && comp.stabilizer) {\n const stabMinId = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n const stabMaxId = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n const stabMinOd = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n const stabMaxOd = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n const stabMinLength = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n\n if (\n isValidNumber(comp.stabilizer.inner_diameter, stabMinId, stabMaxId) &&\n isValidNumber(comp.stabilizer.outer_diameter, stabMinOd, stabMaxOd) &&\n !isValidNumber(comp.stabilizer.inner_diameter, min_id, comp.stabilizer.outer_diameter)\n ) {\n error.stabilizer_outer_diameter = 'O.D > I.D';\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.stabilizer.inner_diameter, stabMinId, stabMaxId)) {\n error.stabilizer_inner_diameter = `${stabMinId.toFixed(1)}~${stabMaxId.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n if (!isValidNumber(comp.stabilizer.outer_diameter, stabMinOd, stabMaxOd)) {\n error.stabilizer_outer_diameter = `${stabMinOd.toFixed(1)}~${stabMaxOd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n if (!isValueEmpty(stabMinLength)) {\n if (!isValidNumber(comp.stabilizer.length, stabMinLength)) {\n error.stabilizer_length = 'Invalid value';\n hasErrors = true;\n }\n }\n if (isValueEmpty(comp.stabilizer.linear_weight)) {\n error.stabilizer_linear_weight = 'Invalid value';\n hasErrors = true;\n }\n if (!error.stabilizer_outer_diameter && bitSize) {\n if (\n +comp.stabilizer.outer_diameter +\n convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.stabilizer_outer_diameter = ' O.D + 0.1 < Bit Size';\n hasErrors = true;\n }\n }\n }\n\n return hasErrors ? error : null;\n}\n\nexport function validateHeader(header) {\n if (!header) return NULL_ERROR;\n const lengthUnitDisplay = getUnitDisplay('length');\n const errors = {};\n\n if (isValueEmpty(header.id)) {\n errors.id = 'It should not be empty.';\n }\n if (header.start_timestamp_str && !moment(new Date(header.start_timestamp_str)).isValid()) {\n errors.start_timestamp = 'Invalid Date.';\n }\n if (Number.isFinite(header.start_depth)) {\n const minDepth = convertValue(DEPTH_IN_HOLE_MIN, 'length', 'ft');\n const maxDepth = convertValue(DEPTH_IN_HOLE_MAX, 'length', 'ft');\n const prohibitedDepth = convertValue(DEPTH_IN_HOLE_PROHIBITED, 'length', 'ft');\n if (header.start_depth <= minDepth || header.start_depth > maxDepth) {\n errors.start_depth = `Should be a positive number ${minDepth.toFixed(2)}~${maxDepth.toFixed(\n 2\n )} (${lengthUnitDisplay})`;\n }\n if (header.start_depth === prohibitedDepth) {\n errors.start_depth = `Should not be equal to ${prohibitedDepth} (${lengthUnitDisplay})`;\n }\n } else {\n errors.start_depth = 'It should not be empty.';\n }\n\n return isEmpty(errors) ? null : errors;\n}\n\nexport function validateComponentDefaullt(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n const baseParams = {\n min_id: convertValue(DEF_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(DEF_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(DEF_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(DEF_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(DEF_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentDp(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'dp') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(DP_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(DP_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(DP_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(DP_MAX_OD, 'shortLength', 'in'),\n min_tj_id: convertValue(DP_MIN_TJ_ID, 'shortLength', 'in'),\n max_tj_id: convertValue(DP_MAX_TJ_ID, 'shortLength', 'in'),\n min_tj_od: convertValue(DP_MIN_TJ_OD, 'shortLength', 'in'),\n max_tj_od: convertValue(DP_MAX_TJ_OD, 'shortLength', 'in'),\n min_length: convertValue(DP_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentHwdp(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'hwdp') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(HWDP_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(HWDP_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(HWDP_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(HWDP_MAX_OD, 'shortLength', 'in'),\n min_tj_id: convertValue(HWDP_MIN_TJ_ID, 'shortLength', 'in'),\n max_tj_id: convertValue(HWDP_MAX_TJ_ID, 'shortLength', 'in'),\n min_tj_od: convertValue(HWDP_MIN_TJ_OD, 'shortLength', 'in'),\n max_tj_od: convertValue(HWDP_MAX_TJ_OD, 'shortLength', 'in'),\n min_length: convertValue(HWDP_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentDc(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'dc') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(DC_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(DC_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(DC_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(DC_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(DC_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentJar(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n return component.family !== 'jar' ? FAMILY_ERROR : validateComponentDefaullt(component, bitSize);\n}\n\nexport function validateComponentSub(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n return component.family !== 'sub' ? FAMILY_ERROR : validateComponentDefaullt(component, bitSize);\n}\n\nexport function validateComponentBit(component, maxOd = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'bit') return FAMILY_ERROR;\n\n const bitSize = component.size;\n const commonErrors = validateCommon(component, {}, bitSize);\n const error = commonErrors || {};\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n\n if (!isValueEmpty(maxOd) && !isValueEmpty(bitSize)) {\n if (+maxOd + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') > bitSize) {\n error.size = ' max(O.D) + 0.1 < Bit Size';\n }\n }\n if (!isValidNumber(component.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentPdm(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'pdm') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(PDM_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(PDM_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(PDM_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(PDM_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(PDM_MIN_LENGTH, 'length', 'ft'),\n min_off_bottom_pressure_loss: PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n\n let pdmFieldUnitLower;\n let pdmFieldUnitUpper;\n\n if (!isValidNumber(component.number_rotor_lobes, PDM_MIN_ROTOR, PDM_MAX_ROTOR)) {\n error.number_rotor_lobes = `It must be ${PDM_MIN_ROTOR}~${PDM_MAX_ROTOR}`;\n }\n\n if (!isValidNumber(component.number_stator_lobes, PDM_MIN_STATOR, PDM_MAX_STATOR)) {\n error.number_stator_lobes = `It must be ${PDM_MIN_STATOR}~${PDM_MAX_STATOR}`;\n }\n\n if (!isValidNumber(component.rpg, PDM_MIN_RPG, PDM_MAX_RPG)) {\n error.rpg = `It must be ${PDM_MIN_RPG}~${PDM_MAX_RPG}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_WOB, 'force', 'klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_WOB, 'force', 'klbf');\n if (\n !isValueEmpty(component.max_weight_on_bit) &&\n !isValidNumber(component.max_weight_on_bit, pdmFieldUnitLower, pdmFieldUnitUpper)\n ) {\n error.max_weight_on_bit = `It must be ${pdmFieldUnitUpper.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n pdmFieldUnitUpper = convertValue(PDM_MAX_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n if (!isValidNumber(component.min_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.min_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n if (!isValidNumber(component.max_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.max_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_MODP, 'pressure', 'psi');\n pdmFieldUnitUpper = convertValue(PDM_MAX_MODP, 'pressure', 'psi');\n if (\n !isValidNumber(\n component.max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_TMODP, 'torque', 'ft-klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_TMODP, 'torque', 'ft-klbf');\n if (\n !isValidNumber(\n component.torque_at_max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.torque_at_max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n if (!isValidNumber(component.flow_loss_percentage, PDM_MIN_FLOW_LOSS, PDM_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${PDM_MIN_FLOW_LOSS}~${PDM_MAX_FLOW_LOSS}`;\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentLwd(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'lwd') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(LWD_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(LWD_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(LWD_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(LWD_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(LWD_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n let hasErrors = false;\n if (commonErrors) hasErrors = true;\n\n if (component.lwd_measurements && component.lwd_measurements.length > 0) {\n error.lwd_measurements = {};\n for (let j = 0; j < component.lwd_measurements.length; j += 1) {\n const lwdMeasurementItem = component.lwd_measurements[j];\n error.lwd_measurements[j] = {};\n if (isValueEmpty(lwdMeasurementItem.type)) {\n error.lwd_measurements[j].type = 'measurement type is required.';\n hasErrors = true;\n }\n if (isValueEmpty(lwdMeasurementItem.distance)) {\n error.lwd_measurements[j].distance = 'measurement distance is required.';\n hasErrors = true;\n }\n }\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n if (!component.lwd_measurements || !component.lwd_measurements.length) {\n errors.general.lwd_measurements =\n 'LWD Tool requires at least one LWD measurement should be selected.';\n hasErrors = true;\n }\n\n return hasErrors ? errors : null;\n}\n\nexport function validateComponentStabilizer(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'stabilizer') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(STABLE_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(STABLE_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(STABLE_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(STABLE_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(STABLE_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentMwd(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'mwd') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(MWD_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(MWD_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(MWD_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(MWD_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(MWD_MIN_LENGTH, 'length', 'ft'),\n min_pressure_loss: MWD_MIN_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n\n if (component.has_gamma_sensor && !Number.isFinite(component.gamma_sensor_to_bit_distance)) {\n error.gamma_sensor_to_bit_distance = 'This field is required.';\n }\n\n if (component.has_survey_sensor && !Number.isFinite(component.bit_to_survey_distance)) {\n error.bit_to_survey_distance = 'This field is required.';\n } else if (component.has_survey_sensor && component.bit_to_survey_distance <= 0) {\n error.bit_to_survey_distance = 'Should be a positive number.';\n } else if (component.has_survey_sensor && component.bit_to_survey_distance > 150) {\n error.bit_to_survey_distance = 'Should be less then 150.';\n }\n\n if (\n component.has_directional_sensor &&\n !Number.isFinite(component.directional_sensor_to_bit_distance)\n ) {\n error.directional_sensor_to_bit_distance = 'This field is required.';\n } else if (\n component.has_directional_sensor &&\n component.directional_sensor_to_bit_distance <= 0\n ) {\n error.directional_sensor_to_bit_distance = 'Should be a positive number.';\n } else if (\n component.has_directional_sensor &&\n component.directional_sensor_to_bit_distance > 150\n ) {\n error.directional_sensor_to_bit_distance = 'Should be less then 150.';\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentAgitator(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'agitator') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(AGITATOR_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(AGITATOR_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(AGITATOR_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(AGITATOR_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(AGITATOR_MIN_LENGTH, 'length', 'ft'),\n min_pressure_loss: AGITATOR_MIN_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentRss(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'rss') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(RSS_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(RSS_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(RSS_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(RSS_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(RSS_MIN_LENGTH, 'length', 'ft'),\n min_pressure_loss: RSS_MIN_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!isValidNumber(component.flow_loss_percentage, RSS_MIN_FLOW_LOSS, RSS_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${RSS_MIN_FLOW_LOSS}~${RSS_MAX_FLOW_LOSS}`;\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentCt(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'ct') return FAMILY_ERROR;\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n\n const baseParams = {\n min_id: convertValue(CT_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(CT_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(CT_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(CT_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(CT_MIN_LENGTH, 'length', 'ft'),\n };\n const minRd = convertValue(CT_MIN_RD, 'shortLength', 'in');\n const maxRd = convertValue(CT_MAX_RD, 'shortLength', 'in');\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n if (!isValidNumber(component.reel_diameter, minRd, maxRd)) {\n error.reel_diameter = `${minRd.toFixed(1)}~${maxRd.toFixed(1)} (${shortLengthUnitDisplay})`;\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentUr(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'ur') return FAMILY_ERROR;\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n\n const baseParams = {\n min_id: convertValue(UR_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(UR_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(UR_MIN_BODY_OD, 'shortLength', 'in'),\n max_od: convertValue(UR_MAX_BODY_OD, 'shortLength', 'in'),\n };\n const minOpenedOd = convertValue(UR_MIN_OPENED_OD, 'shortLength', 'in');\n const maxOpenedOd = convertValue(UR_MAX_OPENED_OD, 'shortLength', 'in');\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n if (!isValidNumber(component.ur_opened_od, minOpenedOd, maxOpenedOd)) {\n error.ur_opened_od = `${minOpenedOd.toFixed(1)}~${maxOpenedOd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n } else if (component.ur_opened_od < bitSize) {\n error.ur_opened_od = 'Max O.D (Opened) >= Bit Size';\n }\n\n if (!Number.isFinite(component.flow_rate)) {\n error.flow_rate = 'This field is required.';\n }\n\n if (\n component.activation_logic === 'depth_activation' &&\n !Number.isFinite(component.ur_opened_depth)\n ) {\n error.ur_opened_depth = 'This field is required.';\n }\n\n if (!component.activation_logic) {\n error.activation_logic = 'This field is required.';\n }\n\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n if (!isValidNumber(component.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponent(component, bitSize = null, maxOd = null) {\n if (!component) return NULL_ERROR;\n\n switch (component.family) {\n case 'dp':\n return validateComponentDp(component, bitSize);\n case 'hwdp':\n return validateComponentHwdp(component, bitSize);\n case 'dc':\n return validateComponentDc(component, bitSize);\n case 'jar':\n return validateComponentJar(component, bitSize);\n case 'sub':\n return validateComponentSub(component, bitSize);\n case 'bit':\n return validateComponentBit(component, maxOd);\n case 'pdm':\n return validateComponentPdm(component, bitSize);\n case 'lwd':\n return validateComponentLwd(component, bitSize);\n case 'stabilizer':\n return validateComponentStabilizer(component, bitSize);\n case 'mwd':\n return validateComponentMwd(component, bitSize);\n case 'agitator':\n return validateComponentAgitator(component, bitSize);\n case 'rss':\n return validateComponentRss(component, bitSize);\n case 'ct':\n return validateComponentCt(component, bitSize);\n case 'ur':\n return validateComponentUr(component, bitSize);\n default:\n return validateComponentDefaullt(component, bitSize);\n }\n}\n\nexport function validateComponents(components, component = null) {\n if (!components) return NULL_ERROR;\n const bitComponents = components.filter(comp => comp.family === 'bit');\n const bitSize = bitComponents && (bitComponents.length > 0 ? bitComponents[0].size : null);\n const maxOd = maxBy(components, 'outer_diameter')?.outer_diameter;\n const mwdHavingGamma = components.filter(comp => comp.family === 'mwd' && comp.has_gamma_sensor);\n let hasFormErrors = false;\n let errors = {\n general: {},\n components: {},\n specificErrors: {},\n };\n for (let i = 0; i < components.length; i += 1) {\n const comp = components[i];\n if (!component || comp === component) {\n const error = component\n ? validateComponent(comp, bitSize, maxOd)\n : validateComponent(comp, bitSize);\n if (error) {\n hasFormErrors = true;\n errors = {\n ...errors,\n ...omit(error, ['general', 'components']),\n general: { ...errors.general, ...error.general },\n components: { ...errors.components, ...error.components },\n };\n }\n if (comp.family === 'mwd' && mwdHavingGamma.length > 1) {\n errors.components[\n comp.id\n ].gamma_sensor_to_bit_distance = `Only 1 gamma sensor allowed. Currently ${mwdHavingGamma.length}`;\n hasFormErrors = true;\n }\n }\n }\n if (!bitComponents || bitComponents.length !== 1) {\n errors.general.bit_count = 'Number of \"BIT\" components is invalid.';\n hasFormErrors = true;\n } else if (components[components.length - 1].family !== 'bit' && components[0].family !== 'bit') {\n // bit should be top or bottom\n errors.general.bit_position = '\"BIT\" category should be on the bottom of the list.';\n hasFormErrors = true;\n }\n\n if (hasFormErrors) {\n return errors;\n }\n return null;\n}\n\nexport function validate(recordData) {\n if (!recordData) return NULL_ERROR;\n\n const {\n data: { id, start_timestamp_str, start_depth, components },\n } = recordData;\n if (!components) return NULL_ERROR;\n let errors = validateHeader({ id, start_timestamp_str, start_depth });\n const componentsErrors = validateComponents(components);\n\n if (componentsErrors) {\n errors = { ...errors, ...componentsErrors };\n }\n\n return errors;\n}\n"],"names":["NULL_ERROR","general","empty","FAMILY_ERROR","family","ctop","val","unitType","unit","precision","convertValue","isValueEmpty","isValidNumber","num","min","max","_ref","arguments","length","undefined","_ref$isMinInclusive","isMinInclusive","parsedNum","parseFloat","Number","isNaN","isValidLinearWeight","id","od","linearWeight","prefShortLengthUnit","getUnitPreference","convertedId","convertedOd","estimation","convertedEstimation","validateCommon","comp","baseParams","bitSize","min_id","min_od","max_id","max_od","min_length","min_tj_id","max_tj_id","min_tj_od","max_tj_od","min_pressure_loss","min_off_bottom_pressure_loss","shortLengthUnitDisplay","getUnitDisplay","error","hasErrors","inner_diameter","concat","toFixed","outer_diameter","linear_weight","inner_diameter_tooljoint","outer_diameter_tooljoint","length_tooljoint","component_length","off_bottom_pressure_loss","j","obpsItem","flow_rate","pressure_loss","pressureLossItem","has_stabilizer","stabilizer","stabMinId","stabMaxId","stabMinOd","stabMaxOd","stabMinLength","stabilizer_outer_diameter","stabilizer_inner_diameter","stabilizer_length","stabilizer_linear_weight","validateHeader","header","lengthUnitDisplay","errors","start_timestamp_str","moment","Date","isValid","start_timestamp","isFinite","start_depth","minDepth","maxDepth","prohibitedDepth","isEmpty","validateComponentDefaullt","component","commonErrors","components","specificErrors","validateComponentDp","validateComponentHwdp","validateComponentDc","validateComponentJar","validateComponentSub","validateComponentBit","maxOd","size","ratio","lowerLimit","upperLimit","tfa","validateComponentPdm","pdmFieldUnitLower","pdmFieldUnitUpper","number_rotor_lobes","number_stator_lobes","rpg","max_weight_on_bit","min_standard_flowrate","max_standard_flowrate","max_operating_differential_pressure","torque_at_max_operating_differential_pressure","flow_loss_percentage","validateComponentLwd","lwd_measurements","lwdMeasurementItem","type","distance","validateComponentStabilizer","validateComponentMwd","has_gamma_sensor","gamma_sensor_to_bit_distance","has_survey_sensor","bit_to_survey_distance","has_directional_sensor","directional_sensor_to_bit_distance","validateComponentAgitator","validateComponentRss","validateComponentCt","minRd","maxRd","reel_diameter","validateComponentUr","minOpenedOd","maxOpenedOd","ur_opened_od","activation_logic","ur_opened_depth","validateComponent","validateComponents","_maxBy","bitComponents","filter","maxBy","mwdHavingGamma","hasFormErrors","i","omit","_objectSpread","bit_position","bit_count","recordData","data","componentsErrors"],"mappings":"+1BAKA,IAmHMA,EAAa,CAAEC,QAAS,CAAEC,MAAO,4BACjCC,EAAe,CAAEF,QAAS,CAAEG,OAAQ,8BAYnC,SAASC,EAAKC,EAAKC,EAAUC,GAAqB,IAAfC,yDAAY,EACpD,OAAY,IAARH,GAAcA,EAGXC,GAAYC,EAAOE,EAAAA,aAAaJ,EAAKC,EAAUC,EAAM,KAAMC,GAAaH,EAFtE,IAGX,CAEO,SAASK,EAAaL,GAC3B,OAAOA,SAAsD,KAARA,CACvD,CAEO,SAASM,EAAcC,EAAKC,EAAKC,GAAqC,IAAAC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAJ,CAAE,EAAAG,EAAAJ,EAA5BK,eAAAA,cAAqBD,EAC5DE,EAAYC,WAAWV,GAC7B,OAAIW,OAAOC,MAAMH,OACZD,GAAkBC,EAAYR,IAAUO,GAAkBC,GAAaR,MAGxEC,GAAOO,EAAYP,GAEzB,CAEO,SAASW,EAAoBC,EAAIC,EAAIC,GAC1C,IAAMC,EAAsBC,oBAAkB,eAC1CC,EAAcL,EACdM,EAAcL,EACU,OAAxBE,IACFE,EAActB,EAAYA,aAACiB,EAAI,cAAeG,EAAqB,MACnEG,EAAcvB,EAAYA,aAACkB,EAAI,cAAeE,EAAqB,OAErE,IAAMI,EAAa,OAASD,EAAcA,EAAcD,EAAcA,GAChEG,EACoB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OnF,QAAQgK,aAAe,sDAC9BJ,GAAgB,IALhBzE,EAAOnF,QAAQiK,UAAY,yCAC3BL,GAAgB,GAOdA,EACKzE,EAEF,IACT,cAz5BO,SAAc9E,EAAKC,EAAUC,GAAqB,IAAfC,yDAAY,EACpD,OAAIH,QACK,KAEJC,GAAaC,EAGXe,WAAWb,eAAaJ,EAAKC,EAAUwB,oBAAkBxB,GAAWC,EAAMC,IAFxEc,WAAWjB,EAGtB,+GAm5BO,SAAkB6J,GACvB,IAAKA,EAAY,OAAOnK,EAExB,IAEImK,EAAAA,EADFC,KAAQzI,IAAAA,GAAI0D,IAAAA,oBAAqBM,IAAAA,YAAaQ,IAAAA,WAEhD,IAAKA,EAAY,OAAOnG,EACxB,IAAIoF,EAASH,EAAe,CAAEtD,GAAAA,EAAI0D,oBAAAA,EAAqBM,YAAAA,IACjD0E,EAAmBd,EAAmBpD,GAM5C,OAJIkE,IACFjF,EAAcA,EAAAA,EAAAA,CAAAA,EAAAA,GAAWiF,IAGpBjF,CACT"}
1
+ {"version":3,"file":"validation.js","sources":["../../../../src/utils/drillstring/validation.js"],"sourcesContent":["import moment from 'moment';\nimport { isEmpty, omit, maxBy } from 'lodash';\n\nimport { getUnitPreference, convertValue, getUnitDisplay } from '../convert';\n\nconst ALLOWED_DIFF_OD_BIT_SIZE = 0.1;\n\nconst DEF_MIN_ID = 0;\nconst DEF_MAX_ID = 100;\nconst DEF_MIN_OD = 1;\nconst DEF_MAX_OD = 100;\nconst DEF_MIN_LENGTH = 0;\n\nconst UR_MIN_ID = 0;\nconst UR_MAX_ID = 50;\nconst UR_MIN_BODY_OD = 1;\nconst UR_MAX_BODY_OD = 50;\nconst UR_MIN_OPENED_OD = 1;\nconst UR_MAX_OPENED_OD = 50;\n\nconst CT_MIN_ID = 0;\nconst CT_MAX_ID = 100;\nconst CT_MIN_OD = 1;\nconst CT_MAX_OD = 100;\nconst CT_MIN_RD = 0;\nconst CT_MAX_RD = 500;\nconst CT_MIN_LENGTH = 0;\n\nconst DP_MIN_ID = 1;\nconst DP_MAX_ID = 7;\nconst DP_MIN_OD = 2;\nconst DP_MAX_OD = 8;\nconst DP_MIN_TJ_ID = 1;\nconst DP_MAX_TJ_ID = 7;\nconst DP_MIN_TJ_OD = 2;\nconst DP_MAX_TJ_OD = 10;\nconst DP_MIN_LENGTH = 0;\n\nconst HWDP_MIN_ID = 1;\nconst HWDP_MAX_ID = 7;\nconst HWDP_MIN_OD = 2;\nconst HWDP_MAX_OD = 8;\nconst HWDP_MIN_TJ_ID = 1;\nconst HWDP_MAX_TJ_ID = 7;\nconst HWDP_MIN_TJ_OD = 2;\nconst HWDP_MAX_TJ_OD = 10;\nconst HWDP_MIN_LENGTH = 0;\n\nconst DC_MIN_ID = 0.5;\nconst DC_MAX_ID = 7;\nconst DC_MIN_OD = 2;\nconst DC_MAX_OD = 13;\nconst DC_MIN_LENGTH = 0;\n\nconst STABLE_MIN_ID = 0;\nconst STABLE_MAX_ID = 100;\nconst STABLE_MIN_OD = 1;\nconst STABLE_MAX_OD = 100;\nconst STABLE_MIN_LENGTH = 0;\n\nconst PDM_MIN_OD = 2;\nconst PDM_MAX_OD = 15;\nconst PDM_MIN_ID = 0;\nconst PDM_MAX_ID = 12;\nconst PDM_MIN_LENGTH = 4;\n\nconst PDM_MIN_STATOR = 2;\nconst PDM_MAX_STATOR = 10;\nconst PDM_MIN_ROTOR = 1;\nconst PDM_MAX_ROTOR = 10;\nconst PDM_MIN_RPG = 0;\nconst PDM_MAX_RPG = 10;\nconst PDM_MIN_WOB = 0;\nconst PDM_MAX_WOB = 200;\nconst PDM_MIN_FLOW_RANGE = 0;\nconst PDM_MAX_FLOW_RANGE = 2500;\nconst PDM_MIN_MODP = 0;\nconst PDM_MAX_MODP = 3000;\nconst PDM_MIN_TMODP = 0;\nconst PDM_MAX_TMODP = 40;\nconst PDM_MIN_FLOW_LOSS = 0;\nconst PDM_MAX_FLOW_LOSS = 20;\nconst PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS = 0;\n\nconst MWD_MIN_ID = 0;\nconst MWD_MAX_ID = 12;\nconst MWD_MIN_OD = 2;\nconst MWD_MAX_OD = 13;\nconst MWD_MIN_LENGTH = 1.0;\nconst MWD_MIN_PRESSURE_LOSS = 0;\n\nconst LWD_MIN_ID = 0.1;\nconst LWD_MAX_ID = 7;\nconst LWD_MIN_OD = 2;\nconst LWD_MAX_OD = 9.5;\nconst LWD_MIN_LENGTH = 1.0;\n\nconst RSS_MIN_ID = 0;\nconst RSS_MAX_ID = 12;\nconst RSS_MIN_OD = 2;\nconst RSS_MAX_OD = 13;\nconst RSS_MIN_LENGTH = 1.0;\nconst RSS_MIN_FLOW_LOSS = 0;\nconst RSS_MAX_FLOW_LOSS = 10;\nconst RSS_MIN_PRESSURE_LOSS = 0;\n\nconst AGITATOR_MIN_ID = 0;\nconst AGITATOR_MAX_ID = 12;\nconst AGITATOR_MIN_OD = 2;\nconst AGITATOR_MAX_OD = 13;\nconst AGITATOR_MIN_LENGTH = 1.0;\nconst AGITATOR_MIN_PRESSURE_LOSS = 0;\n\nconst BIT_MIN_TFA = 0;\nconst BIT_MAX_TFA = 20;\n\nconst DEPTH_IN_HOLE_MIN = 0;\nconst DEPTH_IN_HOLE_MAX = 55000;\nconst DEPTH_IN_HOLE_PROHIBITED = 1;\n\nconst NULL_ERROR = { general: { empty: 'It should not be empty.' } };\nconst FAMILY_ERROR = { general: { family: 'Family should be matched.' } };\n\nexport function ctoi(val, unitType, unit, precision = 2) {\n if (val === null || typeof val === 'undefined') {\n return null;\n }\n if (!unitType || !unit) {\n return parseFloat(val);\n }\n return parseFloat(convertValue(val, unitType, getUnitPreference(unitType), unit, precision));\n}\n\nexport function ctop(val, unitType, unit, precision = 2) {\n if (val !== 0 && !val) {\n return null;\n }\n return unitType && unit ? convertValue(val, unitType, unit, null, precision) : val;\n}\n\nexport function isValueEmpty(val) {\n return val === null || typeof val === 'undefined' || val === '';\n}\n\nexport function isValidNumber(num, min, max, { isMinInclusive = true } = {}) {\n const parsedNum = parseFloat(num);\n if (Number.isNaN(parsedNum)) return false;\n if ((isMinInclusive && parsedNum < min) || (!isMinInclusive && parsedNum <= min)) {\n return false;\n }\n if (max && parsedNum > max) return false;\n return true;\n}\n\nexport function isValidLinearWeight(id, od, linearWeight) {\n const prefShortLengthUnit = getUnitPreference('shortLength');\n let convertedId = id;\n let convertedOd = od;\n if (prefShortLengthUnit !== 'in') {\n convertedId = convertValue(id, 'shortLength', prefShortLengthUnit, 'in');\n convertedOd = convertValue(od, 'shortLength', prefShortLengthUnit, 'in');\n }\n const estimation = 2.673 * (convertedOd * convertedOd - convertedId * convertedId);\n const convertedEstimation =\n prefShortLengthUnit !== 'in' ? convertValue(estimation, 'massPerLength', 'lb-ft') : estimation;\n return linearWeight >= convertedEstimation * 0.5 && linearWeight <= convertedEstimation * 1.5;\n}\n\nexport function validateCommon(comp, baseParams, bitSize = null) {\n if (!comp || !baseParams) return NULL_ERROR;\n\n const {\n min_id,\n min_od,\n max_id,\n max_od,\n min_length,\n min_tj_id,\n max_tj_id,\n min_tj_od,\n max_tj_od,\n min_pressure_loss,\n min_off_bottom_pressure_loss,\n } = baseParams;\n\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n const error = {};\n let hasErrors = false;\n\n if (!isValueEmpty(min_id) && !isValueEmpty(min_od)) {\n if (!isValidNumber(comp.inner_diameter, min_id, max_id)) {\n error.inner_diameter = `${min_id.toFixed(1)}~${max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter, min_od, max_od)) {\n error.outer_diameter = `${min_od.toFixed(1)}~${max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (\n isValidNumber(comp.inner_diameter, min_id, max_id) &&\n isValidNumber(comp.outer_diameter, min_od, max_od) &&\n !isValidNumber(comp.inner_diameter, min_id, comp.outer_diameter)\n ) {\n error.outer_diameter = 'O.D > I.D';\n hasErrors = true;\n }\n\n if (!error.outer_diameter && bitSize) {\n if (\n +comp.outer_diameter + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.outer_diameter = ' O.D + 0.1 < Bit Size';\n hasErrors = true;\n }\n }\n\n // only check validity of linear weight when family is not bit\n if (!isValidNumber(comp.linear_weight, 0)) {\n error.linear_weight = 'Invalid value';\n hasErrors = true;\n }\n }\n\n if (!isValueEmpty(min_tj_id) && !isValueEmpty(min_tj_od)) {\n if (!isValidNumber(comp.inner_diameter_tooljoint, min_tj_id, max_tj_id)) {\n error.inner_diameter_tooljoint = `${min_tj_id.toFixed(1)}~${max_tj_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, min_tj_od, max_tj_od)) {\n error.outer_diameter_tooljoint = `${min_tj_od.toFixed(1)}~${max_tj_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, comp.outer_diameter, max_tj_od)) {\n error.outer_diameter_tooljoint = 'Tool Joint O.D >= O.D';\n hasErrors = true;\n }\n }\n\n if (!isValueEmpty(min_length)) {\n if (!isValidNumber(comp.length, min_length)) {\n error.length = 'Invalid value';\n hasErrors = true;\n }\n }\n\n if (!isValueEmpty(comp.length_tooljoint) && !isValueEmpty(comp.component_length)) {\n if (+comp.length_tooljoint > +comp.component_length) {\n error.length_tooljoint = 'Tool Joint Length < Component Length';\n hasErrors = true;\n }\n }\n\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n error.off_bottom_pressure_loss = {};\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const obpsItem = comp.off_bottom_pressure_loss[j];\n error.off_bottom_pressure_loss[j] = {};\n if (isValueEmpty(obpsItem.flow_rate)) {\n error.off_bottom_pressure_loss[j].flow_rate = 'flow rate is required.';\n hasErrors = true;\n }\n if (isValueEmpty(obpsItem.pressure_loss)) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasErrors = true;\n }\n if (\n !isValueEmpty(min_off_bottom_pressure_loss) &&\n !isValidNumber(obpsItem.pressure_loss, min_off_bottom_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'Invalid range';\n hasErrors = true;\n }\n }\n }\n\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n error.pressure_loss = {};\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const pressureLossItem = comp.pressure_loss[j];\n error.pressure_loss[j] = {};\n if (isValueEmpty(pressureLossItem.flow_rate)) {\n error.pressure_loss[j].flow_rate = 'flow rate is required.';\n hasErrors = true;\n }\n if (isValueEmpty(pressureLossItem.pressure_loss)) {\n error.pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasErrors = true;\n }\n if (\n !isValueEmpty(min_pressure_loss) &&\n !isValidNumber(pressureLossItem.pressure_loss, min_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.pressure_loss[j].pressure_loss = 'Invalid range';\n hasErrors = true;\n }\n }\n }\n\n if (comp.has_stabilizer && comp.stabilizer) {\n const stabMinId = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n const stabMaxId = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n const stabMinOd = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n const stabMaxOd = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n const stabMinLength = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n\n if (\n isValidNumber(comp.stabilizer.inner_diameter, stabMinId, stabMaxId) &&\n isValidNumber(comp.stabilizer.outer_diameter, stabMinOd, stabMaxOd) &&\n !isValidNumber(comp.stabilizer.inner_diameter, min_id, comp.stabilizer.outer_diameter)\n ) {\n error.stabilizer_outer_diameter = 'O.D > I.D';\n hasErrors = true;\n }\n\n if (!isValidNumber(comp.stabilizer.inner_diameter, stabMinId, stabMaxId)) {\n error.stabilizer_inner_diameter = `${stabMinId.toFixed(1)}~${stabMaxId.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n if (!isValidNumber(comp.stabilizer.outer_diameter, stabMinOd, stabMaxOd)) {\n error.stabilizer_outer_diameter = `${stabMinOd.toFixed(1)}~${stabMaxOd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasErrors = true;\n }\n if (!isValueEmpty(stabMinLength)) {\n if (!isValidNumber(comp.stabilizer.length, stabMinLength)) {\n error.stabilizer_length = 'Invalid value';\n hasErrors = true;\n }\n }\n if (isValueEmpty(comp.stabilizer.linear_weight)) {\n error.stabilizer_linear_weight = 'Invalid value';\n hasErrors = true;\n }\n if (!error.stabilizer_outer_diameter && bitSize) {\n if (\n +comp.stabilizer.outer_diameter +\n convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.stabilizer_outer_diameter = ' O.D + 0.1 < Bit Size';\n hasErrors = true;\n }\n }\n }\n\n return hasErrors ? error : null;\n}\n\nexport function validateHeader(header) {\n if (!header) return NULL_ERROR;\n const lengthUnitDisplay = getUnitDisplay('length');\n const errors = {};\n\n if (isValueEmpty(header.id)) {\n errors.id = 'It should not be empty.';\n }\n if (header.start_timestamp_str && !moment(new Date(header.start_timestamp_str)).isValid()) {\n errors.start_timestamp = 'Invalid Date.';\n }\n if (Number.isFinite(header.start_depth)) {\n const minDepth = convertValue(DEPTH_IN_HOLE_MIN, 'length', 'ft');\n const maxDepth = convertValue(DEPTH_IN_HOLE_MAX, 'length', 'ft');\n const prohibitedDepth = convertValue(DEPTH_IN_HOLE_PROHIBITED, 'length', 'ft');\n if (header.start_depth <= minDepth || header.start_depth > maxDepth) {\n errors.start_depth = `Should be a positive number ${minDepth.toFixed(2)}~${maxDepth.toFixed(\n 2\n )} (${lengthUnitDisplay})`;\n }\n if (header.start_depth === prohibitedDepth) {\n errors.start_depth = `Should not be equal to ${prohibitedDepth} (${lengthUnitDisplay})`;\n }\n } else {\n errors.start_depth = 'It should not be empty.';\n }\n\n return isEmpty(errors) ? null : errors;\n}\n\nexport function validateComponentDefaullt(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n const baseParams = {\n min_id: convertValue(DEF_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(DEF_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(DEF_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(DEF_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(DEF_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentDp(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'dp') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(DP_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(DP_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(DP_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(DP_MAX_OD, 'shortLength', 'in'),\n min_tj_id: convertValue(DP_MIN_TJ_ID, 'shortLength', 'in'),\n max_tj_id: convertValue(DP_MAX_TJ_ID, 'shortLength', 'in'),\n min_tj_od: convertValue(DP_MIN_TJ_OD, 'shortLength', 'in'),\n max_tj_od: convertValue(DP_MAX_TJ_OD, 'shortLength', 'in'),\n min_length: convertValue(DP_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentHwdp(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'hwdp') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(HWDP_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(HWDP_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(HWDP_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(HWDP_MAX_OD, 'shortLength', 'in'),\n min_tj_id: convertValue(HWDP_MIN_TJ_ID, 'shortLength', 'in'),\n max_tj_id: convertValue(HWDP_MAX_TJ_ID, 'shortLength', 'in'),\n min_tj_od: convertValue(HWDP_MIN_TJ_OD, 'shortLength', 'in'),\n max_tj_od: convertValue(HWDP_MAX_TJ_OD, 'shortLength', 'in'),\n min_length: convertValue(HWDP_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentDc(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'dc') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(DC_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(DC_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(DC_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(DC_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(DC_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentJar(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n return component.family !== 'jar' ? FAMILY_ERROR : validateComponentDefaullt(component, bitSize);\n}\n\nexport function validateComponentSub(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n return component.family !== 'sub' ? FAMILY_ERROR : validateComponentDefaullt(component, bitSize);\n}\n\nexport function validateComponentBit(component, maxOd = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'bit') return FAMILY_ERROR;\n\n const bitSize = component.size;\n const commonErrors = validateCommon(component, {}, bitSize);\n const error = commonErrors || {};\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n\n if (!isValueEmpty(maxOd) && !isValueEmpty(bitSize)) {\n if (+maxOd + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') > bitSize) {\n error.size = ' max(O.D) + 0.1 < Bit Size';\n }\n }\n if (!isValidNumber(component.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentPdm(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'pdm') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(PDM_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(PDM_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(PDM_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(PDM_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(PDM_MIN_LENGTH, 'length', 'ft'),\n min_off_bottom_pressure_loss: PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n\n let pdmFieldUnitLower;\n let pdmFieldUnitUpper;\n\n if (!isValidNumber(component.number_rotor_lobes, PDM_MIN_ROTOR, PDM_MAX_ROTOR)) {\n error.number_rotor_lobes = `It must be ${PDM_MIN_ROTOR}~${PDM_MAX_ROTOR}`;\n }\n\n if (!isValidNumber(component.number_stator_lobes, PDM_MIN_STATOR, PDM_MAX_STATOR)) {\n error.number_stator_lobes = `It must be ${PDM_MIN_STATOR}~${PDM_MAX_STATOR}`;\n }\n\n if (!isValidNumber(component.rpg, PDM_MIN_RPG, PDM_MAX_RPG)) {\n error.rpg = `It must be ${PDM_MIN_RPG}~${PDM_MAX_RPG}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_WOB, 'force', 'klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_WOB, 'force', 'klbf');\n if (\n !isValueEmpty(component.max_weight_on_bit) &&\n !isValidNumber(component.max_weight_on_bit, pdmFieldUnitLower, pdmFieldUnitUpper)\n ) {\n error.max_weight_on_bit = `It must be ${pdmFieldUnitUpper.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n pdmFieldUnitUpper = convertValue(PDM_MAX_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n if (!isValidNumber(component.min_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.min_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n if (!isValidNumber(component.max_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.max_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_MODP, 'pressure', 'psi');\n pdmFieldUnitUpper = convertValue(PDM_MAX_MODP, 'pressure', 'psi');\n if (\n !isValidNumber(\n component.max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_TMODP, 'torque', 'ft-klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_TMODP, 'torque', 'ft-klbf');\n if (\n !isValidNumber(\n component.torque_at_max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.torque_at_max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n }\n\n if (!isValidNumber(component.flow_loss_percentage, PDM_MIN_FLOW_LOSS, PDM_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${PDM_MIN_FLOW_LOSS}~${PDM_MAX_FLOW_LOSS}`;\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentLwd(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'lwd') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(LWD_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(LWD_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(LWD_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(LWD_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(LWD_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n let hasErrors = false;\n if (commonErrors) hasErrors = true;\n\n if (component.lwd_measurements && component.lwd_measurements.length > 0) {\n error.lwd_measurements = {};\n for (let j = 0; j < component.lwd_measurements.length; j += 1) {\n const lwdMeasurementItem = component.lwd_measurements[j];\n error.lwd_measurements[j] = {};\n if (isValueEmpty(lwdMeasurementItem.type)) {\n error.lwd_measurements[j].type = 'measurement type is required.';\n hasErrors = true;\n }\n if (isValueEmpty(lwdMeasurementItem.distance)) {\n error.lwd_measurements[j].distance = 'measurement distance is required.';\n hasErrors = true;\n }\n }\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n if (!component.lwd_measurements || !component.lwd_measurements.length) {\n errors.general.lwd_measurements =\n 'LWD Tool requires at least one LWD measurement should be selected.';\n hasErrors = true;\n }\n\n return hasErrors ? errors : null;\n}\n\nexport function validateComponentStabilizer(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'stabilizer') return FAMILY_ERROR;\n\n const baseParams = {\n min_id: convertValue(STABLE_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(STABLE_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(STABLE_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(STABLE_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(STABLE_MIN_LENGTH, 'length', 'ft'),\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentMwd(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'mwd') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(MWD_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(MWD_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(MWD_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(MWD_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(MWD_MIN_LENGTH, 'length', 'ft'),\n min_pressure_loss: MWD_MIN_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n\n if (component.has_gamma_sensor && !Number.isFinite(component.gamma_sensor_to_bit_distance)) {\n error.gamma_sensor_to_bit_distance = 'This field is required.';\n }\n\n if (component.has_survey_sensor && !Number.isFinite(component.bit_to_survey_distance)) {\n error.bit_to_survey_distance = 'This field is required.';\n } else if (component.has_survey_sensor && component.bit_to_survey_distance <= 0) {\n error.bit_to_survey_distance = 'Should be a positive number.';\n } else if (component.has_survey_sensor && component.bit_to_survey_distance > 150) {\n error.bit_to_survey_distance = 'Should be less then 150.';\n }\n\n if (\n component.has_directional_sensor &&\n !Number.isFinite(component.directional_sensor_to_bit_distance)\n ) {\n error.directional_sensor_to_bit_distance = 'This field is required.';\n } else if (\n component.has_directional_sensor &&\n component.directional_sensor_to_bit_distance <= 0\n ) {\n error.directional_sensor_to_bit_distance = 'Should be a positive number.';\n } else if (\n component.has_directional_sensor &&\n component.directional_sensor_to_bit_distance > 150\n ) {\n error.directional_sensor_to_bit_distance = 'Should be less then 150.';\n }\n\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentAgitator(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'agitator') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(AGITATOR_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(AGITATOR_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(AGITATOR_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(AGITATOR_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(AGITATOR_MIN_LENGTH, 'length', 'ft'),\n min_pressure_loss: AGITATOR_MIN_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentRss(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'rss') return FAMILY_ERROR;\n\n const baseParams = {\n min_od: convertValue(RSS_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(RSS_MAX_OD, 'shortLength', 'in'),\n min_id: convertValue(RSS_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(RSS_MAX_ID, 'shortLength', 'in'),\n min_length: convertValue(RSS_MIN_LENGTH, 'length', 'ft'),\n min_pressure_loss: RSS_MIN_PRESSURE_LOSS,\n };\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!isValidNumber(component.flow_loss_percentage, RSS_MIN_FLOW_LOSS, RSS_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${RSS_MIN_FLOW_LOSS}~${RSS_MAX_FLOW_LOSS}`;\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentCt(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'ct') return FAMILY_ERROR;\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n\n const baseParams = {\n min_id: convertValue(CT_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(CT_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(CT_MIN_OD, 'shortLength', 'in'),\n max_od: convertValue(CT_MAX_OD, 'shortLength', 'in'),\n min_length: convertValue(CT_MIN_LENGTH, 'length', 'ft'),\n };\n const minRd = convertValue(CT_MIN_RD, 'shortLength', 'in');\n const maxRd = convertValue(CT_MAX_RD, 'shortLength', 'in');\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n if (!isValidNumber(component.reel_diameter, minRd, maxRd)) {\n error.reel_diameter = `${minRd.toFixed(1)}~${maxRd.toFixed(1)} (${shortLengthUnitDisplay})`;\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponentUr(component, bitSize = null) {\n if (!component) return NULL_ERROR;\n if (component.family !== 'ur') return FAMILY_ERROR;\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n\n const baseParams = {\n min_id: convertValue(UR_MIN_ID, 'shortLength', 'in'),\n max_id: convertValue(UR_MAX_ID, 'shortLength', 'in'),\n min_od: convertValue(UR_MIN_BODY_OD, 'shortLength', 'in'),\n max_od: convertValue(UR_MAX_BODY_OD, 'shortLength', 'in'),\n };\n const minOpenedOd = convertValue(UR_MIN_OPENED_OD, 'shortLength', 'in');\n const maxOpenedOd = convertValue(UR_MAX_OPENED_OD, 'shortLength', 'in');\n const commonErrors = validateCommon(component, baseParams, bitSize);\n const error = commonErrors || {};\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (\n !isValidLinearWeight(\n component.inner_diameter,\n component.outer_diameter,\n component.linear_weight\n )\n ) {\n error.linear_weight = 'Invalid range';\n }\n }\n if (!isValidNumber(component.ur_opened_od, minOpenedOd, maxOpenedOd)) {\n error.ur_opened_od = `${minOpenedOd.toFixed(1)}~${maxOpenedOd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n } else if (component.ur_opened_od < bitSize) {\n error.ur_opened_od = 'Max O.D (Opened) >= Bit Size';\n }\n\n if (!Number.isFinite(component.flow_rate)) {\n error.flow_rate = 'This field is required.';\n }\n\n if (\n component.activation_logic === 'depth_activation' &&\n !Number.isFinite(component.ur_opened_depth)\n ) {\n error.ur_opened_depth = 'This field is required.';\n }\n\n if (!component.activation_logic) {\n error.activation_logic = 'This field is required.';\n }\n\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n if (!isValidNumber(component.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n }\n const errors = {\n general: {},\n components: {\n [component.id]: error,\n },\n specificErrors: {},\n };\n\n return isEmpty(error) ? null : errors;\n}\n\nexport function validateComponent(component, bitSize = null, maxOd = null) {\n if (!component) return NULL_ERROR;\n\n switch (component.family) {\n case 'dp':\n return validateComponentDp(component, bitSize);\n case 'hwdp':\n return validateComponentHwdp(component, bitSize);\n case 'dc':\n return validateComponentDc(component, bitSize);\n case 'jar':\n return validateComponentJar(component, bitSize);\n case 'sub':\n return validateComponentSub(component, bitSize);\n case 'bit':\n return validateComponentBit(component, maxOd);\n case 'pdm':\n return validateComponentPdm(component, bitSize);\n case 'lwd':\n return validateComponentLwd(component, bitSize);\n case 'stabilizer':\n case 'ags':\n return validateComponentStabilizer(component, bitSize);\n case 'mwd':\n return validateComponentMwd(component, bitSize);\n case 'agitator':\n return validateComponentAgitator(component, bitSize);\n case 'rss':\n return validateComponentRss(component, bitSize);\n case 'ct':\n return validateComponentCt(component, bitSize);\n case 'ur':\n return validateComponentUr(component, bitSize);\n default:\n return validateComponentDefaullt(component, bitSize);\n }\n}\n\nexport function validateComponents(components, component = null) {\n if (!components) return NULL_ERROR;\n const bitComponents = components.filter(comp => comp.family === 'bit');\n const bitSize = bitComponents && (bitComponents.length > 0 ? bitComponents[0].size : null);\n const maxOd = maxBy(components, 'outer_diameter')?.outer_diameter;\n const mwdHavingGamma = components.filter(comp => comp.family === 'mwd' && comp.has_gamma_sensor);\n let hasFormErrors = false;\n let errors = {\n general: {},\n components: {},\n specificErrors: {},\n };\n for (let i = 0; i < components.length; i += 1) {\n const comp = components[i];\n if (!component || comp === component) {\n const error = component\n ? validateComponent(comp, bitSize, maxOd)\n : validateComponent(comp, bitSize);\n if (error) {\n hasFormErrors = true;\n errors = {\n ...errors,\n ...omit(error, ['general', 'components']),\n general: { ...errors.general, ...error.general },\n components: { ...errors.components, ...error.components },\n };\n }\n if (comp.family === 'mwd' && mwdHavingGamma.length > 1) {\n errors.components[\n comp.id\n ].gamma_sensor_to_bit_distance = `Only 1 gamma sensor allowed. Currently ${mwdHavingGamma.length}`;\n hasFormErrors = true;\n }\n }\n }\n if (!bitComponents || bitComponents.length !== 1) {\n errors.general.bit_count = 'Number of \"BIT\" components is invalid.';\n hasFormErrors = true;\n } else if (components[components.length - 1].family !== 'bit' && components[0].family !== 'bit') {\n // bit should be top or bottom\n errors.general.bit_position = '\"BIT\" category should be on the bottom of the list.';\n hasFormErrors = true;\n }\n\n if (hasFormErrors) {\n return errors;\n }\n return null;\n}\n\nexport function validate(recordData) {\n if (!recordData) return NULL_ERROR;\n\n const {\n data: { id, start_timestamp_str, start_depth, components },\n } = recordData;\n if (!components) return NULL_ERROR;\n let errors = validateHeader({ id, start_timestamp_str, start_depth });\n const componentsErrors = validateComponents(components);\n\n if (componentsErrors) {\n errors = { ...errors, ...componentsErrors };\n }\n\n return errors;\n}\n"],"names":["NULL_ERROR","general","empty","FAMILY_ERROR","family","ctop","val","unitType","unit","precision","convertValue","isValueEmpty","isValidNumber","num","min","max","_ref","arguments","length","undefined","_ref$isMinInclusive","isMinInclusive","parsedNum","parseFloat","Number","isNaN","isValidLinearWeight","id","od","linearWeight","prefShortLengthUnit","getUnitPreference","convertedId","convertedOd","estimation","convertedEstimation","validateCommon","comp","baseParams","bitSize","min_id","min_od","max_id","max_od","min_length","min_tj_id","max_tj_id","min_tj_od","max_tj_od","min_pressure_loss","min_off_bottom_pressure_loss","shortLengthUnitDisplay","getUnitDisplay","error","hasErrors","inner_diameter","concat","toFixed","outer_diameter","linear_weight","inner_diameter_tooljoint","outer_diameter_tooljoint","length_tooljoint","component_length","off_bottom_pressure_loss","j","obpsItem","flow_rate","pressure_loss","pressureLossItem","has_stabilizer","stabilizer","stabMinId","stabMaxId","stabMinOd","stabMaxOd","stabMinLength","stabilizer_outer_diameter","stabilizer_inner_diameter","stabilizer_length","stabilizer_linear_weight","validateHeader","header","lengthUnitDisplay","errors","start_timestamp_str","moment","Date","isValid","start_timestamp","isFinite","start_depth","minDepth","maxDepth","prohibitedDepth","isEmpty","validateComponentDefaullt","component","commonErrors","components","specificErrors","validateComponentDp","validateComponentHwdp","validateComponentDc","validateComponentJar","validateComponentSub","validateComponentBit","maxOd","size","ratio","lowerLimit","upperLimit","tfa","validateComponentPdm","pdmFieldUnitLower","pdmFieldUnitUpper","number_rotor_lobes","number_stator_lobes","rpg","max_weight_on_bit","min_standard_flowrate","max_standard_flowrate","max_operating_differential_pressure","torque_at_max_operating_differential_pressure","flow_loss_percentage","validateComponentLwd","lwd_measurements","lwdMeasurementItem","type","distance","validateComponentStabilizer","validateComponentMwd","has_gamma_sensor","gamma_sensor_to_bit_distance","has_survey_sensor","bit_to_survey_distance","has_directional_sensor","directional_sensor_to_bit_distance","validateComponentAgitator","validateComponentRss","validateComponentCt","minRd","maxRd","reel_diameter","validateComponentUr","minOpenedOd","maxOpenedOd","ur_opened_od","activation_logic","ur_opened_depth","validateComponent","validateComponents","_maxBy","bitComponents","filter","maxBy","mwdHavingGamma","hasFormErrors","i","omit","_objectSpread","bit_position","bit_count","recordData","data","componentsErrors"],"mappings":"+1BAKA,IAmHMA,EAAa,CAAEC,QAAS,CAAEC,MAAO,4BACjCC,EAAe,CAAEF,QAAS,CAAEG,OAAQ,8BAYnC,SAASC,EAAKC,EAAKC,EAAUC,GAAqB,IAAfC,yDAAY,EACpD,OAAY,IAARH,GAAcA,EAGXC,GAAYC,EAAOE,EAAAA,aAAaJ,EAAKC,EAAUC,EAAM,KAAMC,GAAaH,EAFtE,IAGX,CAEO,SAASK,EAAaL,GAC3B,OAAOA,SAAsD,KAARA,CACvD,CAEO,SAASM,EAAcC,EAAKC,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illstring/BHAComponentDetail/constants.js"],"names":[],"mappings":";;;;;AAMA;;;IAIE;;;;;;;;;;;;;AAaF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2aE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgEE;AAEF;;;;;IAGE;AAEF;;;;;;;;;;;;;;;KAQE;AAEF;;;;;;;;;;;;;;;KAcE"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/Drillstring/BHAComponentDetail/constants.js"],"names":[],"mappings":";;;;;AAMA;;;IAIE;;;;;;;;;;;;;AAaF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAicE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgEE;AAEF;;;;;IAGE;AAEF;;;;;;;;;;;;;;;KAQE;AAEF;;;;;;;;;;;;;;;KAcE"}
@@ -1,2 +1,2 @@
1
- var e={FLOW_ACTIVATED:"flow_activated",OPEN_HOLE_ACTIVATED:"open_hole_activated",DEPTH_ACTIVATION:"depth_activation"},t=[{name:"Flow Activated",type:e.FLOW_ACTIVATED},{name:"Open Hole Activation",type:e.OPEN_HOLE_ACTIVATED},{name:"Depth Activation",type:e.DEPTH_ACTIVATION}],a={drilling:{unitType:"volumeFlowRate",unit:"gal/min"},completion:{unitType:"oilFlowRate",unit:"bbl/min"}},i=[{family:"ct",data:[{key:"ct-1",col_size:4,fields:["outer_diameter","inner_diameter","reel_diameter","component_length","length","linear_weight","weight","grade","material","class"]}]},{family:"dp",data:[{key:"dp-1",col_size:4,fields:["outer_diameter","inner_diameter","number_of_joints","component_length","length","linear_weight","weight","grade","outer_diameter_tooljoint","inner_diameter_tooljoint","length_tooljoint","connection_type","material","class"]}]},{family:"hwdp",data:[{key:"hwdp-1",col_size:4,fields:["sub_category","outer_diameter","inner_diameter","number_of_joints","component_length","length","linear_weight","weight","grade","outer_diameter_tooljoint","inner_diameter_tooljoint","length_tooljoint","connection_type","material","class"]}]},{family:"pdm",data:[{key:"pdm-1",col_size:4,fields:["outer_diameter","inner_diameter","rpg","length","linear_weight","weight","stages","number_rotor_lobes","number_stator_lobes","bend_range","max_weight_on_bit","make","bit_to_bend","name","model"]},{key:"pdm-standard-flow-range",col_size:4,sub_title:"Standard Flow Range",fields:["min_standard_flowrate","max_standard_flowrate"]},{key:"pdm-op-diff-pressure",col_size:3,fields:["max_operating_differential_pressure","torque_at_max_operating_differential_pressure"]},{key:"pdm-flow-loss",col_size:3,fields:["flow_loss_percentage"]},{key:"pdm-pressure-loss",col_size:3,sub_title:"Off Bottom Pressure Loss",tb_field:"off_bottom_pressure_loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]},{key:"pdm-stabilizer-1",col_size:2,sub_title:"Stabilizer",stablizer_fields:["name","outer_diameter","inner_diameter","length","linear_weight","weight","outer_diameter"]},{key:"pdm-stabilizer-2",col_size:2,stablizer_fields:["gauge_od","gauge_length","no_of_blades","stab_centerpoint_to_bit","blade_width","connection_type","material"]}]},{family:"bit",data:[{key:"bit-1",col_size:3,fields:["size","bit_type","length","weight"]},{key:"bit-nozzles",col_size:3,tb_field:"nozzle_sizes",tb_head:["# of this size","Nozzle Size"],tb_body:[{field:"count",isNumber:!1},{field:"size",isNumber:!0}]},{key:"bit-3",col_size:3,fields:["shank_od","make","serial_number","model","tfa","bit_reason_pulled"]}]},{family:"dc",data:[{key:"dc-1",col_size:4,fields:["sub_category","outer_diameter","inner_diameter","number_of_joints","component_length","length","linear_weight","weight","connection_type","material"]}]},{family:"stabilizer",data:[{key:"stabilizer-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","gauge_od","gauge_length","no_of_blades","blade_width","connection_type","material"]}]},{family:"sub",data:[{key:"sub-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]}]},{family:"mwd",data:[{key:"mwd-1",col_size:3,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material","gamma_sensor_to_bit_distance","bit_to_survey_distance","vibration_source"]},{key:"mwd-pressure-loss",col_size:3,tb_field:"pressure_loss",sub_title:"Pressure Loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]}]},{family:"rss",data:[{key:"rss-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material","vibration_source","flow_loss_percentage"]},{key:"rss-pressure-loss",col_size:4,tb_field:"pressure_loss",sub_title:"Pressure Loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]}]},{family:"ur",data:[{key:"ur-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material","name"]},{key:"ur-nozzles",col_size:4,tb_field:"nozzle_sizes",tb_head:["# of this size","Nozzle Size"],tb_body:[{field:"count",isNumber:!1},{field:"size",isNumber:!0}]},{key:"ur-configuration-block",col_size:4,sub_title:"Under Reamer Configuration",sub_key:"ur-configuration-info",sub_fields:["ur_opened_od","gauge_length","no_of_blades","blade_width","ur_to_bit","flow_rate","tfa","ur_opened_depth"]}]},{family:"lwd",data:[{key:"lwd-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]},{key:"lwd-measurements",col_size:4,tb_field:"lwd_measurements",tb_head:["Type","Name","Distance"],tb_body:[{field:"type",isNumber:!1},{field:"name",isNumber:!1},{field:"distance",isNumber:!0}]}]},{family:"agitator",data:[{key:"agitator-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]},{key:"agitator-pressure-loss",col_size:4,tb_field:"pressure_loss",sub_title:"Pressure Loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]}]},{family:"jar",data:[{key:"jar-1",col_size:4,fields:["sub_category","outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]}]}],l=[{name:"sub_category",label:"Sub Category"},{name:"outer_diameter",label:"OD",unit:"shortLength"},{name:"inner_diameter",label:"ID",unit:"shortLength"},{name:"reel_diameter",label:"Reel Diameter",unit:"shortLength"},{name:"number_of_joints",label:"# of Joints"},{name:"component_length",label:"Component Length",unit:"length"},{name:"size",label:"Size",unit:"shortLength"},{name:"bit_type",label:"Bit Type"},{name:"rpg",label:"RPG",unit:"revolutionPerVolume"},{name:"length",label:"Total Length",unit:"length"},{name:"linear_weight",label:"Adjusted Linear Weight",unit:"massPerLength"},{name:"weight",label:"Total Weight",unit:"mass"},{name:"grade",label:"Grade"},{name:"gauge_od",label:"Gauge OD",unit:"shortLength"},{name:"outer_diameter_tooljoint",label:"TJ OD"},{name:"inner_diameter_tooljoint",label:"TJ ID"},{name:"length_tooljoint",label:"TJ Length per Joint",unit:"length"},{name:"gauge_length",label:"Gauge Length",unit:"shortLength"},{name:"no_of_blades",label:"# of Blades"},{name:"blade_width",label:"Blade Width",unit:"shortLength"},{name:"connection_type",label:"Connection Type"},{name:"material",label:"Material",unit:"shortLength"},{name:"stages",label:"# of stages"},{name:"number_rotor_lobes",label:"# of rotor lobes"},{name:"number_stator_lobes",label:"# of stator lobes"},{name:"bend_range",label:"Bend Range"},{name:"max_weight_on_bit",label:"Max WOB",unit:"force"},{name:"shank_od",label:"Shank OD",unit:"shortLength"},{name:"make",label:"Make"},{name:"bit_to_bend",label:"Bit to Bend",unit:"length"},{name:"name",label:"Name"},{name:"gamma_sensor_to_bit_distance",label:"Gamma Sensor To Bit Distance",cond:"has_gamma_sensor",unit:"length"},{name:"bit_to_survey_distance",label:"Survey Sensor to Bit Distance",cond:"has_survey_sensor",unit:"length"},{name:"vibration_source",label:"Vibration Sensor"},{name:"class",label:"Class"},{name:"serial_number",label:"Serial Number"},{name:"model",label:"Model"},{name:"tfa",label:"TFA"},{name:"bit_reason_pulled",label:"Reason Pulled"},{name:"max_operating_differential_pressure",label:"Max Operating Diff Pressure",unit:"pressure",col_size:3},{name:"torque_at_max_operating_differential_pressure",label:"Torque at Max Operating Diff Pressure",unit:"torque",col_size:3},{name:"flow_loss_percentage",label:"% Actuator Flow Loss",col_size:5,family:"rss"},{name:"flow_loss_percentage",label:"% Leakage Flow Loss",col_size:3,family:"pdm"}],n=[{name:"min_standard_flowrate",label:"Min",col_size:3,unit:"volumeFlowRate"},{name:"max_standard_flowrate",label:"Max",col_size:3,unit:"volumeFlowRate"}],o=[{name:"ur_opened_od",label:"Max OD (Opened)",unit:"shortLength"},{name:"gauge_length",label:"Gauge Length",unit:"shortLength"},{name:"no_of_blades",label:"# of Blades"},{name:"blade_width",label:"Blade Width",unit:"shortLength"},{name:"ur_to_bit",label:"Reamer to Bit Distance",unit:"shortLength"},{name:"flow_rate",label:"Activation Flow Rate",unit_from_segment:!0},{name:"tfa",label:"TFA"}],r=[{name:"name",label:"Name"},{name:"outer_diameter",label:"OD",unit:"shortLength"},{name:"inner_diameter",label:"ID"},{name:"length",label:"Total Length",unit:"length"},{name:"linear_weight",label:"Adjusted Linear Weight",unit:"massPerLength"},{name:"weight",label:"Total Weight",unit:"mass"},{name:"gauge_od",label:"Gauge OD",unit:"shortLength"},{name:"gauge_length",label:"Gauge Length",unit:"shortLength"},{name:"no_of_blades",label:"# of Blades"},{name:"stab_centerpoint_to_bit",label:"Stab Centerpoint To Bit",unit:"length"},{name:"blade_width",label:"Blade Width",unit:"shortLength"},{name:"connection_type",label:"Connection Type"},{name:"material",label:"Material",col_size:2}];export{n as BHA_ALTERNATIVE_FIELD_TYPES,i as BHA_COMPONENT_TYPES,l as BHA_GENERAL_FIELD_TYPES,r as BHA_STABILIZER_FIELD_TYPES,o as BHA_TABLE_FIELD_TYPES,a as FLOW_RATE_UNIT,e as UR_ACTIVATION_LOGIC_KEYS,t as UR_ACTIVATION_LOGIC_TYPES};
1
+ var e={FLOW_ACTIVATED:"flow_activated",OPEN_HOLE_ACTIVATED:"open_hole_activated",DEPTH_ACTIVATION:"depth_activation"},t=[{name:"Flow Activated",type:e.FLOW_ACTIVATED},{name:"Open Hole Activation",type:e.OPEN_HOLE_ACTIVATED},{name:"Depth Activation",type:e.DEPTH_ACTIVATION}],a={drilling:{unitType:"volumeFlowRate",unit:"gal/min"},completion:{unitType:"oilFlowRate",unit:"bbl/min"}},i=[{family:"ct",data:[{key:"ct-1",col_size:4,fields:["outer_diameter","inner_diameter","reel_diameter","component_length","length","linear_weight","weight","grade","material","class"]}]},{family:"dp",data:[{key:"dp-1",col_size:4,fields:["outer_diameter","inner_diameter","number_of_joints","component_length","length","linear_weight","weight","grade","outer_diameter_tooljoint","inner_diameter_tooljoint","length_tooljoint","connection_type","material","class"]}]},{family:"hwdp",data:[{key:"hwdp-1",col_size:4,fields:["sub_category","outer_diameter","inner_diameter","number_of_joints","component_length","length","linear_weight","weight","grade","outer_diameter_tooljoint","inner_diameter_tooljoint","length_tooljoint","connection_type","material","class"]}]},{family:"pdm",data:[{key:"pdm-1",col_size:4,fields:["outer_diameter","inner_diameter","rpg","length","linear_weight","weight","stages","number_rotor_lobes","number_stator_lobes","bend_range","max_weight_on_bit","make","bit_to_bend","name","model"]},{key:"pdm-standard-flow-range",col_size:4,sub_title:"Standard Flow Range",fields:["min_standard_flowrate","max_standard_flowrate"]},{key:"pdm-op-diff-pressure",col_size:3,fields:["max_operating_differential_pressure","torque_at_max_operating_differential_pressure"]},{key:"pdm-flow-loss",col_size:3,fields:["flow_loss_percentage"]},{key:"pdm-pressure-loss",col_size:3,sub_title:"Off Bottom Pressure Loss",tb_field:"off_bottom_pressure_loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]},{key:"pdm-stabilizer-1",col_size:2,sub_title:"Stabilizer",stablizer_fields:["name","outer_diameter","inner_diameter","length","linear_weight","weight","outer_diameter"]},{key:"pdm-stabilizer-2",col_size:2,stablizer_fields:["gauge_od","gauge_length","no_of_blades","stab_centerpoint_to_bit","blade_width","connection_type","material"]}]},{family:"bit",data:[{key:"bit-1",col_size:3,fields:["size","bit_type","length","weight"]},{key:"bit-nozzles",col_size:3,tb_field:"nozzle_sizes",tb_head:["# of this size","Nozzle Size"],tb_body:[{field:"count",isNumber:!1},{field:"size",isNumber:!0}]},{key:"bit-3",col_size:3,fields:["shank_od","make","serial_number","model","tfa","bit_reason_pulled"]}]},{family:"dc",data:[{key:"dc-1",col_size:4,fields:["sub_category","outer_diameter","inner_diameter","number_of_joints","component_length","length","linear_weight","weight","connection_type","material"]}]},{family:"stabilizer",data:[{key:"stabilizer-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","gauge_od","gauge_length","no_of_blades","blade_width","connection_type","material"]}]},{family:"ags",data:[{key:"ags-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","gauge_od","gauge_length","no_of_blades","blade_width","connection_type","material"]}]},{family:"sub",data:[{key:"sub-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]}]},{family:"mwd",data:[{key:"mwd-1",col_size:3,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material","gamma_sensor_to_bit_distance","bit_to_survey_distance","vibration_source"]},{key:"mwd-pressure-loss",col_size:3,tb_field:"pressure_loss",sub_title:"Pressure Loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]}]},{family:"rss",data:[{key:"rss-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material","vibration_source","flow_loss_percentage"]},{key:"rss-pressure-loss",col_size:4,tb_field:"pressure_loss",sub_title:"Pressure Loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]}]},{family:"ur",data:[{key:"ur-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material","name"]},{key:"ur-nozzles",col_size:4,tb_field:"nozzle_sizes",tb_head:["# of this size","Nozzle Size"],tb_body:[{field:"count",isNumber:!1},{field:"size",isNumber:!0}]},{key:"ur-configuration-block",col_size:4,sub_title:"Under Reamer Configuration",sub_key:"ur-configuration-info",sub_fields:["ur_opened_od","gauge_length","no_of_blades","blade_width","ur_to_bit","flow_rate","tfa","ur_opened_depth"]}]},{family:"lwd",data:[{key:"lwd-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]},{key:"lwd-measurements",col_size:4,tb_field:"lwd_measurements",tb_head:["Type","Name","Distance"],tb_body:[{field:"type",isNumber:!1},{field:"name",isNumber:!1},{field:"distance",isNumber:!0}]}]},{family:"agitator",data:[{key:"agitator-1",col_size:4,fields:["outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]},{key:"agitator-pressure-loss",col_size:4,tb_field:"pressure_loss",sub_title:"Pressure Loss",tb_head:["Flow Rate","Pressure Loss"],tb_body:[{field:"flow_rate",isNumber:!0},{field:"pressure_loss",isNumber:!0}]}]},{family:"jar",data:[{key:"jar-1",col_size:4,fields:["sub_category","outer_diameter","inner_diameter","length","linear_weight","weight","connection_type","material"]}]}],l=[{name:"sub_category",label:"Sub Category"},{name:"outer_diameter",label:"OD",unit:"shortLength"},{name:"inner_diameter",label:"ID",unit:"shortLength"},{name:"reel_diameter",label:"Reel Diameter",unit:"shortLength"},{name:"number_of_joints",label:"# of Joints"},{name:"component_length",label:"Component Length",unit:"length"},{name:"size",label:"Size",unit:"shortLength"},{name:"bit_type",label:"Bit Type"},{name:"rpg",label:"RPG",unit:"revolutionPerVolume"},{name:"length",label:"Total Length",unit:"length"},{name:"linear_weight",label:"Adjusted Linear Weight",unit:"massPerLength"},{name:"weight",label:"Total Weight",unit:"mass"},{name:"grade",label:"Grade"},{name:"gauge_od",label:"Gauge OD",unit:"shortLength"},{name:"outer_diameter_tooljoint",label:"TJ OD"},{name:"inner_diameter_tooljoint",label:"TJ ID"},{name:"length_tooljoint",label:"TJ Length per Joint",unit:"length"},{name:"gauge_length",label:"Gauge Length",unit:"shortLength"},{name:"no_of_blades",label:"# of Blades"},{name:"blade_width",label:"Blade Width",unit:"shortLength"},{name:"connection_type",label:"Connection Type"},{name:"material",label:"Material",unit:"shortLength"},{name:"stages",label:"# of stages"},{name:"number_rotor_lobes",label:"# of rotor lobes"},{name:"number_stator_lobes",label:"# of stator lobes"},{name:"bend_range",label:"Bend Range"},{name:"max_weight_on_bit",label:"Max WOB",unit:"force"},{name:"shank_od",label:"Shank OD",unit:"shortLength"},{name:"make",label:"Make"},{name:"bit_to_bend",label:"Bit to Bend",unit:"length"},{name:"name",label:"Name"},{name:"gamma_sensor_to_bit_distance",label:"Gamma Sensor To Bit Distance",cond:"has_gamma_sensor",unit:"length"},{name:"bit_to_survey_distance",label:"Survey Sensor to Bit Distance",cond:"has_survey_sensor",unit:"length"},{name:"vibration_source",label:"Vibration Sensor"},{name:"class",label:"Class"},{name:"serial_number",label:"Serial Number"},{name:"model",label:"Model"},{name:"tfa",label:"TFA"},{name:"bit_reason_pulled",label:"Reason Pulled"},{name:"max_operating_differential_pressure",label:"Max Operating Diff Pressure",unit:"pressure",col_size:3},{name:"torque_at_max_operating_differential_pressure",label:"Torque at Max Operating Diff Pressure",unit:"torque",col_size:3},{name:"flow_loss_percentage",label:"% Actuator Flow Loss",col_size:5,family:"rss"},{name:"flow_loss_percentage",label:"% Leakage Flow Loss",col_size:3,family:"pdm"}],n=[{name:"min_standard_flowrate",label:"Min",col_size:3,unit:"volumeFlowRate"},{name:"max_standard_flowrate",label:"Max",col_size:3,unit:"volumeFlowRate"}],o=[{name:"ur_opened_od",label:"Max OD (Opened)",unit:"shortLength"},{name:"gauge_length",label:"Gauge Length",unit:"shortLength"},{name:"no_of_blades",label:"# of Blades"},{name:"blade_width",label:"Blade Width",unit:"shortLength"},{name:"ur_to_bit",label:"Reamer to Bit Distance",unit:"shortLength"},{name:"flow_rate",label:"Activation Flow Rate",unit_from_segment:!0},{name:"tfa",label:"TFA"}],r=[{name:"name",label:"Name"},{name:"outer_diameter",label:"OD",unit:"shortLength"},{name:"inner_diameter",label:"ID"},{name:"length",label:"Total Length",unit:"length"},{name:"linear_weight",label:"Adjusted Linear Weight",unit:"massPerLength"},{name:"weight",label:"Total Weight",unit:"mass"},{name:"gauge_od",label:"Gauge OD",unit:"shortLength"},{name:"gauge_length",label:"Gauge Length",unit:"shortLength"},{name:"no_of_blades",label:"# of Blades"},{name:"stab_centerpoint_to_bit",label:"Stab Centerpoint To Bit",unit:"length"},{name:"blade_width",label:"Blade Width",unit:"shortLength"},{name:"connection_type",label:"Connection Type"},{name:"material",label:"Material",col_size:2}];export{n as BHA_ALTERNATIVE_FIELD_TYPES,i as BHA_COMPONENT_TYPES,l as BHA_GENERAL_FIELD_TYPES,r as BHA_STABILIZER_FIELD_TYPES,o as BHA_TABLE_FIELD_TYPES,a as FLOW_RATE_UNIT,e as UR_ACTIVATION_LOGIC_KEYS,t as UR_ACTIVATION_LOGIC_TYPES};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/components/Drillstring/BHAComponentDetail/constants.js"],"sourcesContent":["export const UR_ACTIVATION_LOGIC_KEYS = {\n FLOW_ACTIVATED: 'flow_activated',\n OPEN_HOLE_ACTIVATED: 'open_hole_activated',\n DEPTH_ACTIVATION: 'depth_activation',\n};\n\nexport const UR_ACTIVATION_LOGIC_TYPES = [\n { name: 'Flow Activated', type: UR_ACTIVATION_LOGIC_KEYS.FLOW_ACTIVATED },\n { name: 'Open Hole Activation', type: UR_ACTIVATION_LOGIC_KEYS.OPEN_HOLE_ACTIVATED },\n { name: 'Depth Activation', type: UR_ACTIVATION_LOGIC_KEYS.DEPTH_ACTIVATION },\n];\n\nexport const FLOW_RATE_UNIT = {\n drilling: {\n unitType: 'volumeFlowRate',\n unit: 'gal/min',\n },\n completion: {\n unitType: 'oilFlowRate',\n unit: 'bbl/min',\n },\n};\n\nexport const BHA_COMPONENT_TYPES = [\n {\n family: 'ct',\n data: [\n {\n key: 'ct-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'reel_diameter',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'grade',\n 'material',\n 'class',\n ],\n },\n ],\n },\n {\n family: 'dp',\n data: [\n {\n key: 'dp-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'number_of_joints',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'grade',\n 'outer_diameter_tooljoint',\n 'inner_diameter_tooljoint',\n 'length_tooljoint',\n 'connection_type',\n 'material',\n 'class',\n ],\n },\n ],\n },\n {\n family: 'hwdp',\n data: [\n {\n key: 'hwdp-1',\n col_size: 4,\n fields: [\n 'sub_category',\n 'outer_diameter',\n 'inner_diameter',\n 'number_of_joints',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'grade',\n 'outer_diameter_tooljoint',\n 'inner_diameter_tooljoint',\n 'length_tooljoint',\n 'connection_type',\n 'material',\n 'class',\n ],\n },\n ],\n },\n {\n family: 'pdm',\n data: [\n {\n key: 'pdm-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'rpg',\n 'length',\n 'linear_weight',\n 'weight',\n 'stages',\n 'number_rotor_lobes',\n 'number_stator_lobes',\n 'bend_range',\n 'max_weight_on_bit',\n 'make',\n 'bit_to_bend',\n 'name',\n 'model',\n ],\n },\n {\n key: 'pdm-standard-flow-range',\n col_size: 4,\n sub_title: 'Standard Flow Range',\n fields: ['min_standard_flowrate', 'max_standard_flowrate'],\n },\n {\n key: 'pdm-op-diff-pressure',\n col_size: 3,\n fields: [\n 'max_operating_differential_pressure',\n 'torque_at_max_operating_differential_pressure',\n ],\n },\n {\n key: 'pdm-flow-loss',\n col_size: 3,\n fields: ['flow_loss_percentage'],\n },\n {\n key: 'pdm-pressure-loss',\n col_size: 3,\n sub_title: 'Off Bottom Pressure Loss',\n tb_field: 'off_bottom_pressure_loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n {\n key: 'pdm-stabilizer-1',\n col_size: 2,\n sub_title: 'Stabilizer',\n stablizer_fields: [\n 'name',\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'outer_diameter',\n ],\n },\n {\n key: 'pdm-stabilizer-2',\n col_size: 2,\n stablizer_fields: [\n 'gauge_od',\n 'gauge_length',\n 'no_of_blades',\n 'stab_centerpoint_to_bit',\n 'blade_width',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'bit',\n data: [\n {\n key: 'bit-1',\n col_size: 3,\n fields: ['size', 'bit_type', 'length', 'weight'],\n },\n {\n key: 'bit-nozzles',\n col_size: 3,\n tb_field: 'nozzle_sizes',\n tb_head: ['# of this size', 'Nozzle Size'],\n tb_body: [\n { field: 'count', isNumber: false },\n { field: 'size', isNumber: true },\n ],\n },\n {\n key: 'bit-3',\n col_size: 3,\n fields: ['shank_od', 'make', 'serial_number', 'model', 'tfa', 'bit_reason_pulled'],\n },\n ],\n },\n {\n family: 'dc',\n data: [\n {\n key: 'dc-1',\n col_size: 4,\n fields: [\n 'sub_category',\n 'outer_diameter',\n 'inner_diameter',\n 'number_of_joints',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'stabilizer',\n data: [\n {\n key: 'stabilizer-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'gauge_od',\n 'gauge_length',\n 'no_of_blades',\n 'blade_width',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'sub',\n data: [\n {\n key: 'sub-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'mwd',\n data: [\n {\n key: 'mwd-1',\n col_size: 3,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n 'gamma_sensor_to_bit_distance',\n 'bit_to_survey_distance',\n 'vibration_source',\n ],\n },\n {\n key: 'mwd-pressure-loss',\n col_size: 3,\n tb_field: 'pressure_loss',\n sub_title: 'Pressure Loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'rss',\n data: [\n {\n key: 'rss-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n 'vibration_source',\n 'flow_loss_percentage',\n ],\n },\n {\n key: 'rss-pressure-loss',\n col_size: 4,\n tb_field: 'pressure_loss',\n sub_title: 'Pressure Loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'ur',\n data: [\n {\n key: 'ur-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n 'name',\n ],\n },\n {\n key: 'ur-nozzles',\n col_size: 4,\n tb_field: 'nozzle_sizes',\n tb_head: ['# of this size', 'Nozzle Size'],\n tb_body: [\n { field: 'count', isNumber: false },\n { field: 'size', isNumber: true },\n ],\n },\n {\n key: 'ur-configuration-block',\n col_size: 4,\n sub_title: 'Under Reamer Configuration',\n sub_key: 'ur-configuration-info',\n sub_fields: [\n 'ur_opened_od',\n 'gauge_length',\n 'no_of_blades',\n 'blade_width',\n 'ur_to_bit',\n 'flow_rate',\n 'tfa',\n 'ur_opened_depth',\n ],\n },\n ],\n },\n {\n family: 'lwd',\n data: [\n {\n key: 'lwd-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n {\n key: 'lwd-measurements',\n col_size: 4,\n tb_field: 'lwd_measurements',\n tb_head: ['Type', 'Name', 'Distance'],\n tb_body: [\n { field: 'type', isNumber: false },\n { field: 'name', isNumber: false },\n { field: 'distance', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'agitator',\n data: [\n {\n key: 'agitator-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n {\n key: 'agitator-pressure-loss',\n col_size: 4,\n tb_field: 'pressure_loss',\n sub_title: 'Pressure Loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'jar',\n data: [\n {\n key: 'jar-1',\n col_size: 4,\n fields: [\n 'sub_category',\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n];\n\nexport const BHA_GENERAL_FIELD_TYPES = [\n { name: 'sub_category', label: 'Sub Category' },\n { name: 'outer_diameter', label: 'OD', unit: 'shortLength' },\n { name: 'inner_diameter', label: 'ID', unit: 'shortLength' },\n { name: 'reel_diameter', label: 'Reel Diameter', unit: 'shortLength' },\n { name: 'number_of_joints', label: '# of Joints' },\n { name: 'component_length', label: 'Component Length', unit: 'length' },\n { name: 'size', label: 'Size', unit: 'shortLength' },\n { name: 'bit_type', label: 'Bit Type' },\n { name: 'rpg', label: 'RPG', unit: 'revolutionPerVolume' },\n { name: 'length', label: 'Total Length', unit: 'length' },\n { name: 'linear_weight', label: 'Adjusted Linear Weight', unit: 'massPerLength' },\n { name: 'weight', label: 'Total Weight', unit: 'mass' },\n { name: 'grade', label: 'Grade' },\n { name: 'gauge_od', label: 'Gauge OD', unit: 'shortLength' },\n { name: 'outer_diameter_tooljoint', label: 'TJ OD' },\n { name: 'inner_diameter_tooljoint', label: 'TJ ID' },\n { name: 'length_tooljoint', label: 'TJ Length per Joint', unit: 'length' },\n { name: 'gauge_length', label: 'Gauge Length', unit: 'shortLength' },\n { name: 'no_of_blades', label: '# of Blades' },\n { name: 'blade_width', label: 'Blade Width', unit: 'shortLength' },\n { name: 'connection_type', label: 'Connection Type' },\n { name: 'material', label: 'Material', unit: 'shortLength' },\n { name: 'stages', label: '# of stages' },\n { name: 'number_rotor_lobes', label: '# of rotor lobes' },\n { name: 'number_stator_lobes', label: '# of stator lobes' },\n { name: 'bend_range', label: 'Bend Range' },\n { name: 'max_weight_on_bit', label: 'Max WOB', unit: 'force' },\n { name: 'shank_od', label: 'Shank OD', unit: 'shortLength' },\n { name: 'make', label: 'Make' },\n { name: 'bit_to_bend', label: 'Bit to Bend', unit: 'length' },\n { name: 'name', label: 'Name' },\n {\n name: 'gamma_sensor_to_bit_distance',\n label: 'Gamma Sensor To Bit Distance',\n cond: 'has_gamma_sensor',\n unit: 'length',\n },\n {\n name: 'bit_to_survey_distance',\n label: 'Survey Sensor to Bit Distance',\n cond: 'has_survey_sensor',\n unit: 'length',\n },\n { name: 'vibration_source', label: 'Vibration Sensor' },\n { name: 'class', label: 'Class' },\n { name: 'serial_number', label: 'Serial Number' },\n { name: 'model', label: 'Model' },\n { name: 'tfa', label: 'TFA' },\n { name: 'bit_reason_pulled', label: 'Reason Pulled' },\n {\n name: 'max_operating_differential_pressure',\n label: 'Max Operating Diff Pressure',\n unit: 'pressure',\n col_size: 3,\n },\n {\n name: 'torque_at_max_operating_differential_pressure',\n label: 'Torque at Max Operating Diff Pressure',\n unit: 'torque',\n col_size: 3,\n },\n { name: 'flow_loss_percentage', label: '% Actuator Flow Loss', col_size: 5, family: 'rss' },\n { name: 'flow_loss_percentage', label: '% Leakage Flow Loss', col_size: 3, family: 'pdm' },\n];\n\nexport const BHA_ALTERNATIVE_FIELD_TYPES = [\n { name: 'min_standard_flowrate', label: 'Min', col_size: 3, unit: 'volumeFlowRate' },\n { name: 'max_standard_flowrate', label: 'Max', col_size: 3, unit: 'volumeFlowRate' },\n];\n\nexport const BHA_TABLE_FIELD_TYPES = [\n { name: 'ur_opened_od', label: 'Max OD (Opened)', unit: 'shortLength' },\n { name: 'gauge_length', label: 'Gauge Length', unit: 'shortLength' },\n { name: 'no_of_blades', label: '# of Blades' },\n { name: 'blade_width', label: 'Blade Width', unit: 'shortLength' },\n { name: 'ur_to_bit', label: 'Reamer to Bit Distance', unit: 'shortLength' },\n { name: 'flow_rate', label: 'Activation Flow Rate', unit_from_segment: true },\n { name: 'tfa', label: 'TFA' },\n];\n\nexport const BHA_STABILIZER_FIELD_TYPES = [\n { name: 'name', label: 'Name' },\n { name: 'outer_diameter', label: 'OD', unit: 'shortLength' },\n { name: 'inner_diameter', label: 'ID' },\n { name: 'length', label: 'Total Length', unit: 'length' },\n { name: 'linear_weight', label: 'Adjusted Linear Weight', unit: 'massPerLength' },\n { name: 'weight', label: 'Total Weight', unit: 'mass' },\n { name: 'gauge_od', label: 'Gauge OD', unit: 'shortLength' },\n { name: 'gauge_length', label: 'Gauge Length', unit: 'shortLength' },\n { name: 'no_of_blades', label: '# of Blades' },\n { name: 'stab_centerpoint_to_bit', label: 'Stab Centerpoint To Bit', unit: 'length' },\n { name: 'blade_width', label: 'Blade Width', unit: 'shortLength' },\n { name: 'connection_type', label: 'Connection Type' },\n { name: 'material', label: 'Material', col_size: 2 },\n];\n"],"names":["UR_ACTIVATION_LOGIC_KEYS","FLOW_ACTIVATED","OPEN_HOLE_ACTIVATED","DEPTH_ACTIVATION","UR_ACTIVATION_LOGIC_TYPES","name","type","FLOW_RATE_UNIT","drilling","unitType","unit","completion","BHA_COMPONENT_TYPES","family","data","key","col_size","fields","sub_title","tb_field","tb_head","tb_body","field","isNumber","stablizer_fields","sub_key","sub_fields","BHA_GENERAL_FIELD_TYPES","label","cond","BHA_ALTERNATIVE_FIELD_TYPES","BHA_TABLE_FIELD_TYPES","unit_from_segment","BHA_STABILIZER_FIELD_TYPES"],"mappings":"AAAO,IAAMA,EAA2B,CACtCC,eAAgB,iBAChBC,oBAAqB,sBACrBC,iBAAkB,oBAGPC,EAA4B,CACvC,CAAEC,KAAM,iBAAkBC,KAAMN,EAAyBC,gBACzD,CAAEI,KAAM,uBAAwBC,KAAMN,EAAyBE,qBAC/D,CAAEG,KAAM,mBAAoBC,KAAMN,EAAyBG,mBAGhDI,EAAiB,CAC5BC,SAAU,CACRC,SAAU,iBACVC,KAAM,WAERC,WAAY,CACVF,SAAU,cACVC,KAAM,YAIGE,EAAsB,CACjC,CACEC,OAAQ,KACRC,KAAM,CACJ,CACEC,IAAK,OACLC,SAAU,EACVC,OAAQ,CACN,iBACA,iBACA,gBACA,mBACA,SACA,gBACA,SACA,QACA,WACA,YAKR,CACEJ,OAAQ,KACRC,KAAM,CACJ,CACEC,IAAK,OACLC,SAAU,EACVC,OAAQ,CACN,iBACA,iBACA,mBACA,mBACA,SACA,gBACA,SACA,QACA,2BACA,2BACA,mBACA,kBACA,WACA,YAKR,CACEJ,OAAQ,OACRC,KAAM,CACJ,CACEC,IAAK,SACLC,SAAU,EACVC,OAAQ,CACN,eACA,iBACA,iBACA,mBACA,mBACA,SACA,gBACA,SACA,QACA,2BACA,2BACA,mBACA,kBACA,WACA,YAKR,CACEJ,OAAQ,MACRC,KAAM,CACJ,CACEC,IAAK,QACLC,SAAU,EACVC,OAAQ,CACN,iBACA,iBACA,MACA,SACA,gBACA,SACA,SACA,qBACA,sBACA,aACA,oB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AAM,wBAAyBuB,MAAO,MAAOZ,SAAU,EAAGN,KAAM,kBAClE,CAAEL,KAAM,wBAAyBuB,MAAO,MAAOZ,SAAU,EAAGN,KAAM,mBAGvDqB,EAAwB,CACnC,CAAE1B,KAAM,eAAgBuB,MAAO,kBAAmBlB,KAAM,eACxD,CAAEL,KAAM,eAAgBuB,MAAO,eAAgBlB,KAAM,eACrD,CAAEL,KAAM,eAAgBuB,MAAO,eAC/B,CAAEvB,KAAM,cAAeuB,MAAO,cAAelB,KAAM,eACnD,CAAEL,KAAM,YAAauB,MAAO,yBAA0BlB,KAAM,eAC5D,CAAEL,KAAM,YAAauB,MAAO,uBAAwBI,mBAAmB,GACvE,CAAE3B,KAAM,MAAOuB,MAAO,QAGXK,EAA6B,CACxC,CAAE5B,KAAM,OAAQuB,MAAO,QACvB,CAAEvB,KAAM,iBAAkBuB,MAAO,KAAMlB,KAAM,eAC7C,CAAEL,KAAM,iBAAkBuB,MAAO,MACjC,CAAEvB,KAAM,SAAUuB,MAAO,eAAgBlB,KAAM,UAC/C,CAAEL,KAAM,gBAAiBuB,MAAO,yBAA0BlB,KAAM,iBAChE,CAAEL,KAAM,SAAUuB,MAAO,eAAgBlB,KAAM,QAC/C,CAAEL,KAAM,WAAYuB,MAAO,WAAYlB,KAAM,eAC7C,CAAEL,KAAM,eAAgBuB,MAAO,eAAgBlB,KAAM,eACrD,CAAEL,KAAM,eAAgBuB,MAAO,eAC/B,CAAEvB,KAAM,0BAA2BuB,MAAO,0BAA2BlB,KAAM,UAC3E,CAAEL,KAAM,cAAeuB,MAAO,cAAelB,KAAM,eACnD,CAAEL,KAAM,kBAAmBuB,MAAO,mBAClC,CAAEvB,KAAM,WAAYuB,MAAO,WAAYZ,SAAU"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/Drillstring/BHAComponentDetail/constants.js"],"sourcesContent":["export const UR_ACTIVATION_LOGIC_KEYS = {\n FLOW_ACTIVATED: 'flow_activated',\n OPEN_HOLE_ACTIVATED: 'open_hole_activated',\n DEPTH_ACTIVATION: 'depth_activation',\n};\n\nexport const UR_ACTIVATION_LOGIC_TYPES = [\n { name: 'Flow Activated', type: UR_ACTIVATION_LOGIC_KEYS.FLOW_ACTIVATED },\n { name: 'Open Hole Activation', type: UR_ACTIVATION_LOGIC_KEYS.OPEN_HOLE_ACTIVATED },\n { name: 'Depth Activation', type: UR_ACTIVATION_LOGIC_KEYS.DEPTH_ACTIVATION },\n];\n\nexport const FLOW_RATE_UNIT = {\n drilling: {\n unitType: 'volumeFlowRate',\n unit: 'gal/min',\n },\n completion: {\n unitType: 'oilFlowRate',\n unit: 'bbl/min',\n },\n};\n\nexport const BHA_COMPONENT_TYPES = [\n {\n family: 'ct',\n data: [\n {\n key: 'ct-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'reel_diameter',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'grade',\n 'material',\n 'class',\n ],\n },\n ],\n },\n {\n family: 'dp',\n data: [\n {\n key: 'dp-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'number_of_joints',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'grade',\n 'outer_diameter_tooljoint',\n 'inner_diameter_tooljoint',\n 'length_tooljoint',\n 'connection_type',\n 'material',\n 'class',\n ],\n },\n ],\n },\n {\n family: 'hwdp',\n data: [\n {\n key: 'hwdp-1',\n col_size: 4,\n fields: [\n 'sub_category',\n 'outer_diameter',\n 'inner_diameter',\n 'number_of_joints',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'grade',\n 'outer_diameter_tooljoint',\n 'inner_diameter_tooljoint',\n 'length_tooljoint',\n 'connection_type',\n 'material',\n 'class',\n ],\n },\n ],\n },\n {\n family: 'pdm',\n data: [\n {\n key: 'pdm-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'rpg',\n 'length',\n 'linear_weight',\n 'weight',\n 'stages',\n 'number_rotor_lobes',\n 'number_stator_lobes',\n 'bend_range',\n 'max_weight_on_bit',\n 'make',\n 'bit_to_bend',\n 'name',\n 'model',\n ],\n },\n {\n key: 'pdm-standard-flow-range',\n col_size: 4,\n sub_title: 'Standard Flow Range',\n fields: ['min_standard_flowrate', 'max_standard_flowrate'],\n },\n {\n key: 'pdm-op-diff-pressure',\n col_size: 3,\n fields: [\n 'max_operating_differential_pressure',\n 'torque_at_max_operating_differential_pressure',\n ],\n },\n {\n key: 'pdm-flow-loss',\n col_size: 3,\n fields: ['flow_loss_percentage'],\n },\n {\n key: 'pdm-pressure-loss',\n col_size: 3,\n sub_title: 'Off Bottom Pressure Loss',\n tb_field: 'off_bottom_pressure_loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n {\n key: 'pdm-stabilizer-1',\n col_size: 2,\n sub_title: 'Stabilizer',\n stablizer_fields: [\n 'name',\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'outer_diameter',\n ],\n },\n {\n key: 'pdm-stabilizer-2',\n col_size: 2,\n stablizer_fields: [\n 'gauge_od',\n 'gauge_length',\n 'no_of_blades',\n 'stab_centerpoint_to_bit',\n 'blade_width',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'bit',\n data: [\n {\n key: 'bit-1',\n col_size: 3,\n fields: ['size', 'bit_type', 'length', 'weight'],\n },\n {\n key: 'bit-nozzles',\n col_size: 3,\n tb_field: 'nozzle_sizes',\n tb_head: ['# of this size', 'Nozzle Size'],\n tb_body: [\n { field: 'count', isNumber: false },\n { field: 'size', isNumber: true },\n ],\n },\n {\n key: 'bit-3',\n col_size: 3,\n fields: ['shank_od', 'make', 'serial_number', 'model', 'tfa', 'bit_reason_pulled'],\n },\n ],\n },\n {\n family: 'dc',\n data: [\n {\n key: 'dc-1',\n col_size: 4,\n fields: [\n 'sub_category',\n 'outer_diameter',\n 'inner_diameter',\n 'number_of_joints',\n 'component_length',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'stabilizer',\n data: [\n {\n key: 'stabilizer-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'gauge_od',\n 'gauge_length',\n 'no_of_blades',\n 'blade_width',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'ags',\n data: [\n {\n key: 'ags-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'gauge_od',\n 'gauge_length',\n 'no_of_blades',\n 'blade_width',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'sub',\n data: [\n {\n key: 'sub-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n {\n family: 'mwd',\n data: [\n {\n key: 'mwd-1',\n col_size: 3,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n 'gamma_sensor_to_bit_distance',\n 'bit_to_survey_distance',\n 'vibration_source',\n ],\n },\n {\n key: 'mwd-pressure-loss',\n col_size: 3,\n tb_field: 'pressure_loss',\n sub_title: 'Pressure Loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'rss',\n data: [\n {\n key: 'rss-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n 'vibration_source',\n 'flow_loss_percentage',\n ],\n },\n {\n key: 'rss-pressure-loss',\n col_size: 4,\n tb_field: 'pressure_loss',\n sub_title: 'Pressure Loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'ur',\n data: [\n {\n key: 'ur-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n 'name',\n ],\n },\n {\n key: 'ur-nozzles',\n col_size: 4,\n tb_field: 'nozzle_sizes',\n tb_head: ['# of this size', 'Nozzle Size'],\n tb_body: [\n { field: 'count', isNumber: false },\n { field: 'size', isNumber: true },\n ],\n },\n {\n key: 'ur-configuration-block',\n col_size: 4,\n sub_title: 'Under Reamer Configuration',\n sub_key: 'ur-configuration-info',\n sub_fields: [\n 'ur_opened_od',\n 'gauge_length',\n 'no_of_blades',\n 'blade_width',\n 'ur_to_bit',\n 'flow_rate',\n 'tfa',\n 'ur_opened_depth',\n ],\n },\n ],\n },\n {\n family: 'lwd',\n data: [\n {\n key: 'lwd-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n {\n key: 'lwd-measurements',\n col_size: 4,\n tb_field: 'lwd_measurements',\n tb_head: ['Type', 'Name', 'Distance'],\n tb_body: [\n { field: 'type', isNumber: false },\n { field: 'name', isNumber: false },\n { field: 'distance', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'agitator',\n data: [\n {\n key: 'agitator-1',\n col_size: 4,\n fields: [\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n {\n key: 'agitator-pressure-loss',\n col_size: 4,\n tb_field: 'pressure_loss',\n sub_title: 'Pressure Loss',\n tb_head: ['Flow Rate', 'Pressure Loss'],\n tb_body: [\n { field: 'flow_rate', isNumber: true },\n { field: 'pressure_loss', isNumber: true },\n ],\n },\n ],\n },\n {\n family: 'jar',\n data: [\n {\n key: 'jar-1',\n col_size: 4,\n fields: [\n 'sub_category',\n 'outer_diameter',\n 'inner_diameter',\n 'length',\n 'linear_weight',\n 'weight',\n 'connection_type',\n 'material',\n ],\n },\n ],\n },\n];\n\nexport const BHA_GENERAL_FIELD_TYPES = [\n { name: 'sub_category', label: 'Sub Category' },\n { name: 'outer_diameter', label: 'OD', unit: 'shortLength' },\n { name: 'inner_diameter', label: 'ID', unit: 'shortLength' },\n { name: 'reel_diameter', label: 'Reel Diameter', unit: 'shortLength' },\n { name: 'number_of_joints', label: '# of Joints' },\n { name: 'component_length', label: 'Component Length', unit: 'length' },\n { name: 'size', label: 'Size', unit: 'shortLength' },\n { name: 'bit_type', label: 'Bit Type' },\n { name: 'rpg', label: 'RPG', unit: 'revolutionPerVolume' },\n { name: 'length', label: 'Total Length', unit: 'length' },\n { name: 'linear_weight', label: 'Adjusted Linear Weight', unit: 'massPerLength' },\n { name: 'weight', label: 'Total Weight', unit: 'mass' },\n { name: 'grade', label: 'Grade' },\n { name: 'gauge_od', label: 'Gauge OD', unit: 'shortLength' },\n { name: 'outer_diameter_tooljoint', label: 'TJ OD' },\n { name: 'inner_diameter_tooljoint', label: 'TJ ID' },\n { name: 'length_tooljoint', label: 'TJ Length per Joint', unit: 'length' },\n { name: 'gauge_length', label: 'Gauge Length', unit: 'shortLength' },\n { name: 'no_of_blades', label: '# of Blades' },\n { name: 'blade_width', label: 'Blade Width', unit: 'shortLength' },\n { name: 'connection_type', label: 'Connection Type' },\n { name: 'material', label: 'Material', unit: 'shortLength' },\n { name: 'stages', label: '# of stages' },\n { name: 'number_rotor_lobes', label: '# of rotor lobes' },\n { name: 'number_stator_lobes', label: '# of stator lobes' },\n { name: 'bend_range', label: 'Bend Range' },\n { name: 'max_weight_on_bit', label: 'Max WOB', unit: 'force' },\n { name: 'shank_od', label: 'Shank OD', unit: 'shortLength' },\n { name: 'make', label: 'Make' },\n { name: 'bit_to_bend', label: 'Bit to Bend', unit: 'length' },\n { name: 'name', label: 'Name' },\n {\n name: 'gamma_sensor_to_bit_distance',\n label: 'Gamma Sensor To Bit Distance',\n cond: 'has_gamma_sensor',\n unit: 'length',\n },\n {\n name: 'bit_to_survey_distance',\n label: 'Survey Sensor to Bit Distance',\n cond: 'has_survey_sensor',\n unit: 'length',\n },\n { name: 'vibration_source', label: 'Vibration Sensor' },\n { name: 'class', label: 'Class' },\n { name: 'serial_number', label: 'Serial Number' },\n { name: 'model', label: 'Model' },\n { name: 'tfa', label: 'TFA' },\n { name: 'bit_reason_pulled', label: 'Reason Pulled' },\n {\n name: 'max_operating_differential_pressure',\n label: 'Max Operating Diff Pressure',\n unit: 'pressure',\n col_size: 3,\n },\n {\n name: 'torque_at_max_operating_differential_pressure',\n label: 'Torque at Max Operating Diff Pressure',\n unit: 'torque',\n col_size: 3,\n },\n { name: 'flow_loss_percentage', label: '% Actuator Flow Loss', col_size: 5, family: 'rss' },\n { name: 'flow_loss_percentage', label: '% Leakage Flow Loss', col_size: 3, family: 'pdm' },\n];\n\nexport const BHA_ALTERNATIVE_FIELD_TYPES = [\n { name: 'min_standard_flowrate', label: 'Min', col_size: 3, unit: 'volumeFlowRate' },\n { name: 'max_standard_flowrate', label: 'Max', col_size: 3, unit: 'volumeFlowRate' },\n];\n\nexport const BHA_TABLE_FIELD_TYPES = [\n { name: 'ur_opened_od', label: 'Max OD (Opened)', unit: 'shortLength' },\n { name: 'gauge_length', label: 'Gauge Length', unit: 'shortLength' },\n { name: 'no_of_blades', label: '# of Blades' },\n { name: 'blade_width', label: 'Blade Width', unit: 'shortLength' },\n { name: 'ur_to_bit', label: 'Reamer to Bit Distance', unit: 'shortLength' },\n { name: 'flow_rate', label: 'Activation Flow Rate', unit_from_segment: true },\n { name: 'tfa', label: 'TFA' },\n];\n\nexport const BHA_STABILIZER_FIELD_TYPES = [\n { name: 'name', label: 'Name' },\n { name: 'outer_diameter', label: 'OD', unit: 'shortLength' },\n { name: 'inner_diameter', label: 'ID' },\n { name: 'length', label: 'Total Length', unit: 'length' },\n { name: 'linear_weight', label: 'Adjusted Linear Weight', unit: 'massPerLength' },\n { name: 'weight', label: 'Total Weight', unit: 'mass' },\n { name: 'gauge_od', label: 'Gauge OD', unit: 'shortLength' },\n { name: 'gauge_length', label: 'Gauge Length', unit: 'shortLength' },\n { name: 'no_of_blades', label: '# of Blades' },\n { name: 'stab_centerpoint_to_bit', label: 'Stab Centerpoint To Bit', unit: 'length' },\n { name: 'blade_width', label: 'Blade Width', unit: 'shortLength' },\n { name: 'connection_type', label: 'Connection Type' },\n { name: 'material', label: 'Material', col_size: 2 },\n];\n"],"names":["UR_ACTIVATION_LOGIC_KEYS","FLOW_ACTIVATED","OPEN_HOLE_ACTIVATED","DEPTH_ACTIVATION","UR_ACTIVATION_LOGIC_TYPES","name","type","FLOW_RATE_UNIT","drilling","unitType","unit","completion","BHA_COMPONENT_TYPES","family","data","key","col_size","fields","sub_title","tb_field","tb_head","tb_body","field","isNumber","stablizer_fields","sub_key","sub_fields","BHA_GENERAL_FIELD_TYPES","label","cond","BHA_ALTERNATIVE_FIELD_TYPES","BHA_TABLE_FIELD_TYPES","unit_from_segment","BHA_STABILIZER_FIELD_TYPES"],"mappings":"AAAO,IAAMA,EAA2B,CACtCC,eAAgB,iBAChBC,oBAAqB,sBACrBC,iBAAkB,oBAGPC,EAA4B,CACvC,CAAEC,KAAM,iBAAkBC,KAAMN,EAAyBC,gBACzD,CAAEI,KAAM,uBAAwBC,KAAMN,EAAyBE,qBAC/D,CAAEG,KAAM,mBAAoBC,KAAMN,EAAyBG,mBAGhDI,EAAiB,CAC5BC,SAAU,CACRC,SAAU,iBACVC,KAAM,WAERC,WAAY,CACVF,SAAU,cACVC,KAAM,YAIGE,EAAsB,CACjC,CACEC,OAAQ,KACRC,KAAM,CACJ,CACEC,IAAK,OACLC,SAAU,EACVC,OAAQ,CACN,iBACA,iBACA,gBACA,mBACA,SACA,gBACA,SACA,QACA,WAC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AC/C,CAAEL,KAAM,gBAAiBuB,MAAO,yBAA0BlB,KAAM,iBAChE,CAAEL,KAAM,SAAUuB,MAAO,eAAgBlB,KAAM,QAC/C,CAAEL,KAAM,WAAYuB,MAAO,WAAYlB,KAAM,eAC7C,CAAEL,KAAM,eAAgBuB,MAAO,eAAgBlB,KAAM,eACrD,CAAEL,KAAM,eAAgBuB,MAAO,eAC/B,CAAEvB,KAAM,0BAA2BuB,MAAO,0BAA2BlB,KAAM,UAC3E,CAAEL,KAAM,cAAeuB,MAAO,cAAelB,KAAM,eACnD,CAAEL,KAAM,kBAAmBuB,MAAO,mBAClC,CAAEvB,KAAM,WAAYuB,MAAO,WAAYZ,SAAU"}
@@ -1 +1 @@
1
- {"version":3,"file":"BHAComponentIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Drillstring/BHAComponentIcon.js"],"names":[],"mappings":";AAmBA;;;;gBAoCC;;;;;;;;;;;;;;;;;;sBAvDqB,YAAY"}
1
+ {"version":3,"file":"BHAComponentIcon.d.ts","sourceRoot":"","sources":["../../../src/components/Drillstring/BHAComponentIcon.js"],"names":[],"mappings":";AAmBA;;;;gBAsCC;;;;;;;;;;;;;;;;;;sBAzDqB,YAAY"}
@@ -1,2 +1,2 @@
1
- import a from"prop-types";import{jsx as e}from"react/jsx-runtime";function t(a){var t=a.component,i=a.width,d=a.height,c=t.family,b=t.material,p=t.bit_type;return e("img",{src:"dp"===c?"/static/media/006c9aec83e4e1d5623a520c6debe5ec.png":"dc"===c?"Steel"!==b?"/static/media/e0ba9254af3c235797de1b8660630ac0.png":"/static/media/bd46ae1cd29ed1553fd36d3fb9b6ca9e.png":"hwdp"===c?"/static/media/771d537f0b0f13e9da457cd7a6902e94.png":"pdm"===c?"/static/media/79993ae531d2a8a81347b11de94542cb.png":"mwd"===c?"/static/media/6fb9ebec6308b35528b84a41acf93ed7.png":"jar"===c?"/static/media/083546083cd132bbaffd6620db709516.png":"rss"===c?"/static/media/bb8a5a297df74bbdabbe557e02e969eb.png":"sub"===c?"Steel"!==b?"/static/media/66ac95b0480ac2a8f3220f469b68ca5b.png":"/static/media/bd46ae1cd29ed1553fd36d3fb9b6ca9e.png":"agitator"===c?"/static/media/72e175107512ebef943c463d4539f556.png":"stabilizer"===c?"/static/media/17b94ca82a36d5d09ab8825006835a59.png":"bit"===c?"Tri Cone"===p?"/static/media/f5e653a472efce6a197a32e0946db802.png":"/static/media/4e12a801cf281b17a26a017c395a778e.png":"ur"===c?"/static/media/81eb00627fd05e4ca52b335a7ac52e25.png":"lwd"===c?"/static/media/7f0a9a40a7f11250ce780c274026ff30.png":null,alt:c,width:i,height:d})}t.propTypes={width:a.number,height:a.number,component:a.shape({family:a.string,material:a.string,bit_type:a.string}).isRequired},t.defaultProps={width:32,height:48};export{t as default};
1
+ import a from"prop-types";import{jsx as e}from"react/jsx-runtime";var t="/static/media/17b94ca82a36d5d09ab8825006835a59.png";function i(a){var i=a.component,d=a.width,c=a.height,b=i.family,p=i.material,m=i.bit_type;return e("img",{src:"dp"===b?"/static/media/006c9aec83e4e1d5623a520c6debe5ec.png":"dc"===b?"Steel"!==p?"/static/media/e0ba9254af3c235797de1b8660630ac0.png":"/static/media/bd46ae1cd29ed1553fd36d3fb9b6ca9e.png":"hwdp"===b?"/static/media/771d537f0b0f13e9da457cd7a6902e94.png":"pdm"===b?"/static/media/79993ae531d2a8a81347b11de94542cb.png":"mwd"===b?"/static/media/6fb9ebec6308b35528b84a41acf93ed7.png":"jar"===b?"/static/media/083546083cd132bbaffd6620db709516.png":"rss"===b?"/static/media/bb8a5a297df74bbdabbe557e02e969eb.png":"sub"===b?"Steel"!==p?"/static/media/66ac95b0480ac2a8f3220f469b68ca5b.png":"/static/media/bd46ae1cd29ed1553fd36d3fb9b6ca9e.png":"agitator"===b?"/static/media/72e175107512ebef943c463d4539f556.png":"stabilizer"===b||"ags"===b?t:"bit"===b?"Tri Cone"===m?"/static/media/f5e653a472efce6a197a32e0946db802.png":"/static/media/4e12a801cf281b17a26a017c395a778e.png":"ur"===b?"/static/media/81eb00627fd05e4ca52b335a7ac52e25.png":"lwd"===b?"/static/media/7f0a9a40a7f11250ce780c274026ff30.png":null,alt:b,width:d,height:c})}i.propTypes={width:a.number,height:a.number,component:a.shape({family:a.string,material:a.string,bit_type:a.string}).isRequired},i.defaultProps={width:32,height:48};export{i as default};
2
2
  //# sourceMappingURL=BHAComponentIcon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BHAComponentIcon.js","sources":["../../../src/components/Drillstring/BHAComponentIcon.js"],"sourcesContent":["import PropTypes from 'prop-types';\n\nimport DrillPipe from './assets/regular-bha/drill_pipe.png';\nimport DrillCollar from './assets/regular-bha/drill_collar.png';\nimport DrillCollarWhite from './assets/regular-bha/drill_collar_white.png';\nimport HeavyWeightDrillPipe from './assets/regular-bha/heavy_weight_drill_pipe.png';\nimport Jar from './assets/regular-bha/jar.png';\nimport Motor from './assets/regular-bha/motor.png';\nimport Mwd from './assets/regular-bha/mwd.png';\nimport Rss from './assets/regular-bha/rss.png';\nimport Sub from './assets/regular-bha/sub.png';\nimport SubWhite from './assets/regular-bha/sub_white.png';\nimport Agitator from './assets/regular-bha/agitator.png';\nimport Stabilizer from './assets/regular-bha/stabilizer.png';\nimport BitPdc from './assets/regular-bha/pdcbit.png';\nimport BitCone from './assets/regular-bha/rollerconebit.png';\nimport UnderReamer from './assets/regular-bha/ur.png';\nimport Lwd from './assets/regular-bha/lwd.png';\n\nfunction ComponentIcon({ component, width, height }) {\n const { family, material, bit_type: bitType } = component;\n\n let icon;\n\n if (family === 'dp') {\n icon = DrillPipe;\n } else if (family === 'dc') {\n icon = material !== 'Steel' ? DrillCollarWhite : DrillCollar;\n } else if (family === 'hwdp') {\n icon = HeavyWeightDrillPipe;\n } else if (family === 'pdm') {\n icon = Motor;\n } else if (family === 'mwd') {\n icon = Mwd;\n } else if (family === 'jar') {\n icon = Jar;\n } else if (family === 'rss') {\n icon = Rss;\n } else if (family === 'sub') {\n icon = material !== 'Steel' ? SubWhite : Sub;\n } else if (family === 'agitator') {\n icon = Agitator;\n } else if (family === 'stabilizer') {\n icon = Stabilizer;\n } else if (family === 'bit') {\n icon = bitType === 'Tri Cone' ? BitCone : BitPdc;\n } else if (family === 'ur') {\n icon = UnderReamer;\n } else if (family === 'lwd') {\n icon = Lwd;\n } else {\n icon = null;\n }\n\n return <img src={icon} alt={family} width={width} height={height} />;\n}\n\nComponentIcon.propTypes = {\n width: PropTypes.number,\n height: PropTypes.number,\n component: PropTypes.shape({\n family: PropTypes.string,\n material: PropTypes.string,\n bit_type: PropTypes.string,\n }).isRequired,\n};\n\nComponentIcon.defaultProps = {\n width: 32,\n height: 48,\n};\n\nexport default ComponentIcon;\n"],"names":["ComponentIcon","_ref","component","width","height","family","material","bitType","bit_type","_jsx","src","alt","propTypes","PropTypes","number","shape","string","isRequired","defaultProps"],"mappings":"kEAmBA,SAASA,EAA4CC,GAAA,IAA5BC,IAAAA,UAAWC,IAAAA,MAAOC,IAAAA,OACjCC,EAAwCH,EAAxCG,OAAQC,EAAgCJ,EAAhCI,SAAoBC,EAAYL,EAAtBM,SAkC1B,OAAOC,EAAA,MAAA,CAAKC,IA9BG,OAAXL,EAxB6B,qDA0BX,OAAXA,EACW,UAAbC,EA3BwB,qDAAA,qDA4BX,SAAXD,EA5BsB,qDA8BX,QAAXA,EA9BsB,qDAgCX,QAAXA,EAhCsB,qDAkCX,QAAXA,EAlCsB,qDAoCX,QAAXA,EApCsB,qDAsCX,QAAXA,EACW,UAAbC,EAvCwB,qDAAA,qDAwCX,aAAXD,EAxCsB,qDA0CX,eAAXA,EA1CsB,qDA4CX,QAAXA,EACU,aAAZE,EA7CwB,qDAAA,qDA8CX,OAAXF,EA9CsB,qDAgDX,QAAXA,EAhDsB,qDAmDxB,KAGcM,IAAKN,EAAQF,MAAOA,EAAOC,OAAQA,GAC5D,CAEAJ,EAAcY,UAAY,CACxBT,MAAOU,EAAUC,OACjBV,OAAQS,EAAUC,OAClBZ,UAAWW,EAAUE,MAAM,CACzBV,OAAQQ,EAAUG,OAClBV,SAAUO,EAAUG,OACpBR,SAAUK,EAAUG,SACnBC,YAGLjB,EAAckB,aAAe,CAC3Bf,MAAO,GACPC,OAAQ"}
1
+ {"version":3,"file":"BHAComponentIcon.js","sources":["../../../src/components/Drillstring/BHAComponentIcon.js"],"sourcesContent":["import PropTypes from 'prop-types';\n\nimport DrillPipe from './assets/regular-bha/drill_pipe.png';\nimport DrillCollar from './assets/regular-bha/drill_collar.png';\nimport DrillCollarWhite from './assets/regular-bha/drill_collar_white.png';\nimport HeavyWeightDrillPipe from './assets/regular-bha/heavy_weight_drill_pipe.png';\nimport Jar from './assets/regular-bha/jar.png';\nimport Motor from './assets/regular-bha/motor.png';\nimport Mwd from './assets/regular-bha/mwd.png';\nimport Rss from './assets/regular-bha/rss.png';\nimport Sub from './assets/regular-bha/sub.png';\nimport SubWhite from './assets/regular-bha/sub_white.png';\nimport Agitator from './assets/regular-bha/agitator.png';\nimport Stabilizer from './assets/regular-bha/stabilizer.png';\nimport BitPdc from './assets/regular-bha/pdcbit.png';\nimport BitCone from './assets/regular-bha/rollerconebit.png';\nimport UnderReamer from './assets/regular-bha/ur.png';\nimport Lwd from './assets/regular-bha/lwd.png';\n\nfunction ComponentIcon({ component, width, height }) {\n const { family, material, bit_type: bitType } = component;\n\n let icon;\n\n if (family === 'dp') {\n icon = DrillPipe;\n } else if (family === 'dc') {\n icon = material !== 'Steel' ? DrillCollarWhite : DrillCollar;\n } else if (family === 'hwdp') {\n icon = HeavyWeightDrillPipe;\n } else if (family === 'pdm') {\n icon = Motor;\n } else if (family === 'mwd') {\n icon = Mwd;\n } else if (family === 'jar') {\n icon = Jar;\n } else if (family === 'rss') {\n icon = Rss;\n } else if (family === 'sub') {\n icon = material !== 'Steel' ? SubWhite : Sub;\n } else if (family === 'agitator') {\n icon = Agitator;\n } else if (family === 'stabilizer') {\n icon = Stabilizer;\n } else if (family === 'ags') {\n icon = Stabilizer;\n } else if (family === 'bit') {\n icon = bitType === 'Tri Cone' ? BitCone : BitPdc;\n } else if (family === 'ur') {\n icon = UnderReamer;\n } else if (family === 'lwd') {\n icon = Lwd;\n } else {\n icon = null;\n }\n\n return <img src={icon} alt={family} width={width} height={height} />;\n}\n\nComponentIcon.propTypes = {\n width: PropTypes.number,\n height: PropTypes.number,\n component: PropTypes.shape({\n family: PropTypes.string,\n material: PropTypes.string,\n bit_type: PropTypes.string,\n }).isRequired,\n};\n\nComponentIcon.defaultProps = {\n width: 32,\n height: 48,\n};\n\nexport default ComponentIcon;\n"],"names":["Stabilizer","ComponentIcon","_ref","component","width","height","family","material","bitType","bit_type","_jsx","src","alt","propTypes","PropTypes","number","shape","string","isRequired","defaultProps"],"mappings":"kEAAmC,IAAAA,EAAA,qDAmBnC,SAASC,EAA4CC,GAAA,IAA5BC,IAAAA,UAAWC,IAAAA,MAAOC,IAAAA,OACjCC,EAAwCH,EAAxCG,OAAQC,EAAgCJ,EAAhCI,SAAoBC,EAAYL,EAAtBM,SAoC1B,OAAOC,EAAA,MAAA,CAAKC,IAhCG,OAAXL,EAxB6B,qDA0BX,OAAXA,EACW,UAAbC,EA3BwB,qDAAA,qDA4BX,SAAXD,EA5BsB,qDA8BX,QAAXA,EA9BsB,qDAgCX,QAAXA,EAhCsB,qDAkCX,QAAXA,EAlCsB,qDAoCX,QAAXA,EApCsB,qDAsCX,QAAXA,EACW,UAAbC,EAvCwB,qDAAA,qDAwCX,aAAXD,EAxCsB,qDA0CX,eAAXA,GAEW,QAAXA,EADFN,EAGa,QAAXM,EACU,aAAZE,EA/CwB,qDAAA,qDAgDX,OAAXF,EAhDsB,qDAkDX,QAAXA,EAlDsB,qDAqDxB,KAGcM,IAAKN,EAAQF,MAAOA,EAAOC,OAAQA,GAC5D,CAEAJ,EAAcY,UAAY,CACxBT,MAAOU,EAAUC,OACjBV,OAAQS,EAAUC,OAClBZ,UAAWW,EAAUE,MAAM,CACzBV,OAAQQ,EAAUG,OAClBV,SAAUO,EAAUG,OACpBR,SAAUK,EAAUG,SACnBC,YAGLjB,EAAckB,aAAe,CAC3Bf,MAAO,GACPC,OAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../../../src/components/Drillstring/BHAComponentsTable/components/Component.js"],"names":[],"mappings":";;AAqCA;;;;;;;;;;;;;gBAmVC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBArXqB,YAAY"}
1
+ {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../../../src/components/Drillstring/BHAComponentsTable/components/Component.js"],"names":[],"mappings":";;AAqCA;;;;;;;;;;;;;gBAyVC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA3XqB,YAAY"}