{
  "schemaVersion": 1,
  "slug": "ham-cooking-time-calculator",
  "category": "cooking",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "b18d0da671cc7eaaef73005bc51ffc3b6ca2225db0dd699a34d97265af8477ed",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/ham-cooking-time-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "min = W×r×2.2046",
    "vars": [
      [
        "W",
        "Ham weight, kg"
      ],
      [
        "r",
        "Cooking rate, minutes per pound"
      ],
      [
        "min",
        "Cooking time, minutes"
      ]
    ],
    "note": "Approximate rates at 325°F: fully cooked 15, spiral 12, fresh 22 min/lb; country ham assumes simmering after soaking, about 25 min/lb. Time is not a doneness test. Reheat fully cooked ham to 140°F only when packaged in a USDA-inspected plant; otherwise reheat to 165°F. Fresh ham: 145°F plus 3-minute rest. Follow package instructions and verify with a thermometer."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const R={fully:15,spiral:12,fresh:22,country:25}; const minutes=weightKg*(R[hamType]||15)*2.2046226218; const cooked=hamType==='fully'||hamType==='spiral'; const targetTemp=cooked?(reheatRule==='usdaPackaged'?140:165):145; const restMinutes=cooked?0:3; return {minutes,hours:minutes/60,targetTemp,restMinutes};",
    "inputs": [
      {
        "name": "weightKg",
        "type": "number",
        "default": 4,
        "min": 0.5,
        "max": 30,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "hamType",
        "type": "select",
        "default": "fully",
        "options": [
          {
            "value": "fully"
          },
          {
            "value": "spiral"
          },
          {
            "value": "fresh"
          },
          {
            "value": "country"
          }
        ]
      },
      {
        "name": "reheatRule",
        "type": "select",
        "default": "other",
        "options": [
          {
            "value": "usdaPackaged"
          },
          {
            "value": "other"
          }
        ]
      }
    ],
    "outputs": [
      {
        "name": "minutes",
        "precision": 0,
        "unit": "min"
      },
      {
        "name": "hours",
        "precision": 2,
        "unit": "h"
      },
      {
        "name": "targetTemp",
        "precision": 0,
        "unit": "°F"
      },
      {
        "name": "restMinutes",
        "precision": 0,
        "unit": "min"
      }
    ],
    "interpret": null
  }
}
