InputJax.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.AbstractInputJax = void 0;
  4. var Options_js_1 = require("../util/Options.js");
  5. var FunctionList_js_1 = require("../util/FunctionList.js");
  6. var AbstractInputJax = (function () {
  7. function AbstractInputJax(options) {
  8. if (options === void 0) { options = {}; }
  9. this.adaptor = null;
  10. this.mmlFactory = null;
  11. var CLASS = this.constructor;
  12. this.options = (0, Options_js_1.userOptions)((0, Options_js_1.defaultOptions)({}, CLASS.OPTIONS), options);
  13. this.preFilters = new FunctionList_js_1.FunctionList();
  14. this.postFilters = new FunctionList_js_1.FunctionList();
  15. }
  16. Object.defineProperty(AbstractInputJax.prototype, "name", {
  17. get: function () {
  18. return this.constructor.NAME;
  19. },
  20. enumerable: false,
  21. configurable: true
  22. });
  23. AbstractInputJax.prototype.setAdaptor = function (adaptor) {
  24. this.adaptor = adaptor;
  25. };
  26. AbstractInputJax.prototype.setMmlFactory = function (mmlFactory) {
  27. this.mmlFactory = mmlFactory;
  28. };
  29. AbstractInputJax.prototype.initialize = function () {
  30. };
  31. AbstractInputJax.prototype.reset = function () {
  32. var _args = [];
  33. for (var _i = 0; _i < arguments.length; _i++) {
  34. _args[_i] = arguments[_i];
  35. }
  36. };
  37. Object.defineProperty(AbstractInputJax.prototype, "processStrings", {
  38. get: function () {
  39. return true;
  40. },
  41. enumerable: false,
  42. configurable: true
  43. });
  44. AbstractInputJax.prototype.findMath = function (_node, _options) {
  45. return [];
  46. };
  47. AbstractInputJax.prototype.executeFilters = function (filters, math, document, data) {
  48. var args = { math: math, document: document, data: data };
  49. filters.execute(args);
  50. return args.data;
  51. };
  52. AbstractInputJax.NAME = 'generic';
  53. AbstractInputJax.OPTIONS = {};
  54. return AbstractInputJax;
  55. }());
  56. exports.AbstractInputJax = AbstractInputJax;
  57. //# sourceMappingURL=InputJax.js.map