Javascript: move constant definitions back into `inputdata`