{"version":3,"file":"binaryOperators.cjs","sources":["../../../src/utils/binaryOperators.ts"],"sourcesContent":["import { RegistryItem, Registry } from './Registry';\n\nexport enum BinaryOperationID {\n  Add = '+',\n  Subtract = '-',\n  Divide = '/',\n  Multiply = '*',\n}\n\nexport type BinaryOperation = (left: number, right: number) => number;\n\ninterface BinaryOperatorInfo extends RegistryItem {\n  operation: BinaryOperation;\n  binaryOperationID: BinaryOperationID;\n}\n\nexport const binaryOperators = new Registry<BinaryOperatorInfo>(() => {\n  return [\n    {\n      id: BinaryOperationID.Add,\n      name: 'Add',\n      operation: (a: number, b: number) => a + b,\n      binaryOperationID: BinaryOperationID.Add,\n    },\n    {\n      id: BinaryOperationID.Subtract,\n      name: 'Subtract',\n      operation: (a: number, b: number) => a - b,\n      binaryOperationID: BinaryOperationID.Subtract,\n    },\n    {\n      id: BinaryOperationID.Multiply,\n      name: 'Multiply',\n      operation: (a: number, b: number) => a * b,\n      binaryOperationID: BinaryOperationID.Multiply,\n    },\n    {\n      id: BinaryOperationID.Divide,\n      name: 'Divide',\n      operation: (a: number, b: number) => a / b,\n      binaryOperationID: BinaryOperationID.Divide,\n    },\n  ];\n});\n"],"names":["BinaryOperationID","Registry"],"mappings":";;;;;;;AAEO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACL,EAAAA,mBAAA,KAAA,CAAA,GAAM,GAAA;AACN,EAAAA,mBAAA,UAAA,CAAA,GAAW,GAAA;AACX,EAAAA,mBAAA,QAAA,CAAA,GAAS,GAAA;AACT,EAAAA,mBAAA,UAAA,CAAA,GAAW,GAAA;AAJD,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA;AAcL,MAAM,eAAA,GAAkB,IAAIC,iBAAA,CAA6B,MAAM;AACpE,EAAA,OAAO;AAAA,IACL;AAAA,MACE,EAAA,EAAI,GAAA;AAAA,MACJ,IAAA,EAAM,KAAA;AAAA,MACN,SAAA,EAAW,CAAC,CAAA,EAAW,CAAA,KAAc,CAAA,GAAI,CAAA;AAAA,MACzC,iBAAA,EAAmB,GAAA;AAAA,KACrB;AAAA,IACA;AAAA,MACE,EAAA,EAAI,GAAA;AAAA,MACJ,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,CAAA,EAAW,CAAA,KAAc,CAAA,GAAI,CAAA;AAAA,MACzC,iBAAA,EAAmB,GAAA;AAAA,KACrB;AAAA,IACA;AAAA,MACE,EAAA,EAAI,GAAA;AAAA,MACJ,IAAA,EAAM,UAAA;AAAA,MACN,SAAA,EAAW,CAAC,CAAA,EAAW,CAAA,KAAc,CAAA,GAAI,CAAA;AAAA,MACzC,iBAAA,EAAmB,GAAA;AAAA,KACrB;AAAA,IACA;AAAA,MACE,EAAA,EAAI,GAAA;AAAA,MACJ,IAAA,EAAM,QAAA;AAAA,MACN,SAAA,EAAW,CAAC,CAAA,EAAW,CAAA,KAAc,CAAA,GAAI,CAAA;AAAA,MACzC,iBAAA,EAAmB,GAAA;AAAA;AACrB,GACF;AACF,CAAC;;;;;"}