@syncfusion/ej2-office-common 35.1.37 → 35.1.42
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.
- package/dist/ej2-office-common.umd.min.js +2 -2
- package/dist/ej2-office-common.umd.min.js.map +1 -1
- package/dist/es6/ej2-office-common.es2015.js +5421 -6017
- package/dist/es6/ej2-office-common.es2015.js.map +1 -1
- package/dist/es6/ej2-office-common.es5.js +6270 -7203
- package/dist/es6/ej2-office-common.es5.js.map +1 -1
- package/dist/global/ej2-office-common.min.js +2 -2
- package/dist/global/ej2-office-common.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/office-common.js +4 -0
- package/package.json +11 -7
- package/src/index.d.ts +3 -17
- package/src/index.js +3 -18
- package/src/office-common/features/index.d.ts +6 -0
- package/src/office-common/features/index.js +6 -0
- package/src/office-common/features/mathml/index.d.ts +25 -0
- package/src/office-common/features/mathml/index.js +22 -0
- package/src/office-common/features/mathml/latex/latex-generator.d.ts +8 -0
- package/src/office-common/features/mathml/latex/latex-generator.js +357 -0
- package/src/office-common/features/mathml/latex/latex-parser.d.ts +87 -0
- package/src/office-common/features/mathml/latex/latex-parser.js +1206 -0
- package/src/office-common/features/mathml/latex/latex-symbols.d.ts +13 -0
- package/src/office-common/features/mathml/latex/latex-symbols.js +681 -0
- package/src/office-common/features/mathml/math-settings.d.ts +54 -0
- package/src/office-common/features/mathml/math-settings.js +174 -0
- package/src/office-common/features/mathml/office-math/adapter.d.ts +59 -0
- package/src/office-common/features/mathml/office-math/adapter.js +6 -0
- package/src/office-common/features/mathml/office-math/basic.d.ts +91 -0
- package/src/office-common/features/mathml/office-math/basic.js +93 -0
- package/src/office-common/features/mathml/office-math/break.d.ts +30 -0
- package/src/office-common/features/mathml/office-math/break.js +75 -0
- package/src/office-common/features/mathml/office-math/collection.d.ts +104 -0
- package/src/office-common/features/mathml/office-math/collection.js +170 -0
- package/src/office-common/features/mathml/office-math/entity.d.ts +12 -0
- package/src/office-common/features/mathml/office-math/entity.js +3 -0
- package/src/office-common/features/mathml/office-math/enums.d.ts +97 -0
- package/src/office-common/features/mathml/office-math/enums.js +108 -0
- package/src/office-common/features/mathml/office-math/format.d.ts +28 -0
- package/src/office-common/features/mathml/office-math/format.js +90 -0
- package/src/office-common/features/mathml/office-math/function-base.d.ts +27 -0
- package/src/office-common/features/mathml/office-math/function-base.js +69 -0
- package/src/office-common/features/mathml/office-math/function-collection.d.ts +29 -0
- package/src/office-common/features/mathml/office-math/function-collection.js +76 -0
- package/src/office-common/features/mathml/office-math/functions-basic.d.ts +118 -0
- package/src/office-common/features/mathml/office-math/functions-basic.js +331 -0
- package/src/office-common/features/mathml/office-math/functions-multi.d.ts +156 -0
- package/src/office-common/features/mathml/office-math/functions-multi.js +407 -0
- package/src/office-common/features/mathml/office-math/index.d.ts +27 -0
- package/src/office-common/features/mathml/office-math/index.js +25 -0
- package/src/office-common/features/mathml/office-math/keys.d.ts +6 -0
- package/src/office-common/features/mathml/office-math/keys.js +20 -0
- package/src/office-common/features/mathml/office-math/math-clone.d.ts +20 -0
- package/src/office-common/features/mathml/office-math/math-clone.js +203 -0
- package/src/office-common/features/mathml/office-math/math-collection.d.ts +19 -0
- package/src/office-common/features/mathml/office-math/math-collection.js +41 -0
- package/src/office-common/features/mathml/office-math/math-equality.d.ts +21 -0
- package/src/office-common/features/mathml/office-math/math-equality.js +115 -0
- package/src/office-common/features/mathml/office-math/math-paragraph.d.ts +58 -0
- package/src/office-common/features/mathml/office-math/math-paragraph.js +126 -0
- package/src/office-common/features/mathml/office-math/math-traversal.d.ts +23 -0
- package/src/office-common/features/mathml/office-math/math-traversal.js +95 -0
- package/src/office-common/features/mathml/office-math/matrix-collections.d.ts +54 -0
- package/src/office-common/features/mathml/office-math/matrix-collections.js +113 -0
- package/src/office-common/features/mathml/office-math/matrix-column.d.ts +43 -0
- package/src/office-common/features/mathml/office-math/matrix-column.js +96 -0
- package/src/office-common/features/mathml/office-math/matrix-row.d.ts +38 -0
- package/src/office-common/features/mathml/office-math/matrix-row.js +71 -0
- package/src/office-common/features/mathml/office-math/matrix.d.ts +62 -0
- package/src/office-common/features/mathml/office-math/matrix.js +158 -0
- package/src/office-common/features/mathml/office-math/office-math.d.ts +55 -0
- package/src/office-common/features/mathml/office-math/office-math.js +116 -0
- package/src/office-common/features/mathml/office-math/owner-holder.d.ts +42 -0
- package/src/office-common/features/mathml/office-math/owner-holder.js +87 -0
- package/src/office-common/features/mathml/office-math/property-store.d.ts +66 -0
- package/src/office-common/features/mathml/office-math/property-store.js +99 -0
- package/src/office-common/features/mathml/office-math/run-element.d.ts +31 -0
- package/src/office-common/features/mathml/office-math/run-element.js +97 -0
- package/src/office-common/features/mathml/office-math/unknown-element.d.ts +37 -0
- package/src/office-common/features/mathml/office-math/unknown-element.js +62 -0
- package/src/office-common/features/mathml/office-math/xml-equal.d.ts +13 -0
- package/src/office-common/features/mathml/office-math/xml-equal.js +24 -0
- package/src/office-common/features/mathml/parse/office-math-parser.d.ts +24 -0
- package/src/office-common/features/mathml/parse/office-math-parser.js +396 -0
- package/src/office-common/features/mathml/parse/office-math-properties.d.ts +165 -0
- package/src/office-common/features/mathml/parse/office-math-properties.js +432 -0
- package/src/office-common/features/mathml/parse/parse-options.d.ts +22 -0
- package/src/office-common/features/mathml/parse/parse-options.js +3 -0
- package/src/office-common/features/mathml/serialize/office-math-properties-writer.d.ts +38 -0
- package/src/office-common/features/mathml/serialize/office-math-properties-writer.js +267 -0
- package/src/office-common/features/mathml/serialize/office-math-serializer.d.ts +23 -0
- package/src/office-common/features/mathml/serialize/office-math-serializer.js +306 -0
- package/src/office-common/features/mathml/serialize/omml-writer.d.ts +123 -0
- package/src/office-common/features/mathml/serialize/omml-writer.js +135 -0
- package/src/office-common/index.d.ts +10 -0
- package/src/office-common/index.js +10 -0
- package/.eslintrc.json +0 -263
- package/.prettierrc.json +0 -5
- package/api-extractor.json +0 -35
- package/core.js +0 -4
- package/encryption.js +0 -4
- package/features.js +0 -4
- package/global.json +0 -6
- package/nuget.config +0 -7
- package/src/all.d.ts +0 -41
- package/src/all.js +0 -38
- package/src/features/index.d.ts +0 -11
- package/src/features/index.js +0 -11
- package/src/features/mathml/index.d.ts +0 -30
- package/src/features/mathml/index.js +0 -22
- package/src/features/mathml/math-factory.d.ts +0 -26
- package/src/features/mathml/math-factory.js +0 -568
- package/src/features/mathml/model/controls.d.ts +0 -896
- package/src/features/mathml/model/controls.js +0 -1541
- package/src/features/mathml/model/math-element.d.ts +0 -173
- package/src/features/mathml/model/math-element.js +0 -315
- package/src/features/mathml/model/roots.d.ts +0 -82
- package/src/features/mathml/model/roots.js +0 -177
- package/src/features/mathml/parse/math-parser.d.ts +0 -43
- package/src/features/mathml/parse/math-parser.js +0 -636
- package/src/features/mathml/serialize/math-serializer.d.ts +0 -34
- package/src/features/mathml/serialize/math-serializer.js +0 -749
- package/tsconfig.build.json +0 -13
- package/tsconfig.harness.json +0 -32
- package/tslint.json +0 -111
- /package/src/{core → office-common/core}/index.d.ts +0 -0
- /package/src/{core → office-common/core}/index.js +0 -0
- /package/src/{core → office-common/core}/xml/index.d.ts +0 -0
- /package/src/{core → office-common/core}/xml/index.js +0 -0
- /package/src/{core → office-common/core}/xml/model.d.ts +0 -0
- /package/src/{core → office-common/core}/xml/model.js +0 -0
- /package/src/{encryption → office-common/encryption}/agile-constants.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/agile-constants.js +0 -0
- /package/src/{encryption → office-common/encryption}/agile-encryption-info.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/agile-encryption-info.js +0 -0
- /package/src/{encryption → office-common/encryption}/agile-password.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/agile-password.js +0 -0
- /package/src/{encryption → office-common/encryption}/cfb-reader.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/cfb-reader.js +0 -0
- /package/src/{encryption → office-common/encryption}/crypto-primitives.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/crypto-primitives.js +0 -0
- /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/decrypt-encrypted-package.js +0 -0
- /package/src/{encryption → office-common/encryption}/encryption-info-xml.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/encryption-info-xml.js +0 -0
- /package/src/{encryption → office-common/encryption}/errors.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/errors.js +0 -0
- /package/src/{encryption → office-common/encryption}/index.d.ts +0 -0
- /package/src/{encryption → office-common/encryption}/index.js +0 -0
- /package/src/{features → office-common/features}/diagrams/constants.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/constants.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-data-model.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-data-model.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-parsers.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-parsers.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-serializers.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-serializers.js +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-views.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/diagram-views.js +0 -0
- /package/src/{features → office-common/features}/diagrams/element-tree.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/element-tree.js +0 -0
- /package/src/{features → office-common/features}/diagrams/errors.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/errors.js +0 -0
- /package/src/{features → office-common/features}/diagrams/index.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/index.js +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-catalog.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-catalog.js +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-diagram.d.ts +0 -0
- /package/src/{features → office-common/features}/diagrams/smart-art-diagram.js +0 -0
- /package/src/{features → office-common/features}/ink/constants.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/constants.js +0 -0
- /package/src/{features → office-common/features}/ink/index.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/index.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-effects.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-effects.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-model.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-model.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-parser.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-parser.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-serializer.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-serializer.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-units.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-units.js +0 -0
- /package/src/{features → office-common/features}/ink/ink-xml.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/ink-xml.js +0 -0
- /package/src/{features → office-common/features}/ink/trace-codec.d.ts +0 -0
- /package/src/{features → office-common/features}/ink/trace-codec.js +0 -0
- /package/src/{features → office-common/features}/mathml/constants.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/constants.js +0 -0
- /package/src/{features → office-common/features}/mathml/errors.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/errors.js +0 -0
- /package/src/{features → office-common/features}/mathml/model/enums.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/model/enums.js +0 -0
- /package/src/{features → office-common/features}/mathml/openxml.d.ts +0 -0
- /package/src/{features → office-common/features}/mathml/openxml.js +0 -0
- /package/src/{features → office-common/features}/smart-art/diagram-xml.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/diagram-xml.js +0 -0
- /package/src/{features → office-common/features}/smart-art/errors.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/errors.js +0 -0
- /package/src/{features → office-common/features}/smart-art/index.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/index.js +0 -0
- /package/src/{features → office-common/features}/smart-art/minimal-samples.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/minimal-samples.js +0 -0
- /package/src/{features → office-common/features}/smart-art/mutators.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/mutators.js +0 -0
- /package/src/{features → office-common/features}/smart-art/namespaces.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/namespaces.js +0 -0
- /package/src/{features → office-common/features}/smart-art/package-graph.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/package-graph.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-colors.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-colors.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-data.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-data.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-layout.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-layout.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-rel-ids.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-rel-ids.js +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-style.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/parse-style.js +0 -0
- /package/src/{features → office-common/features}/smart-art/point-text.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/point-text.js +0 -0
- /package/src/{features → office-common/features}/smart-art/register.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/register.js +0 -0
- /package/src/{features → office-common/features}/smart-art/serialize.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/serialize.js +0 -0
- /package/src/{features → office-common/features}/smart-art/types.d.ts +0 -0
- /package/src/{features → office-common/features}/smart-art/types.js +0 -0
|
@@ -1,1541 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed OMML control classes (EG_OMathMathElements).
|
|
3
|
-
*
|
|
4
|
-
* Source: ECMA-376-4 Annex A.8.1; mathml-spec §7 / §11.2.
|
|
5
|
-
* Constructors take props bag + fixed-sequence children (no boolean traps).
|
|
6
|
-
*/
|
|
7
|
-
var __extends = (this && this.__extends) || (function () {
|
|
8
|
-
var extendStatics = function (d, b) {
|
|
9
|
-
extendStatics = Object.setPrototypeOf ||
|
|
10
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
11
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
12
|
-
return extendStatics(d, b);
|
|
13
|
-
};
|
|
14
|
-
return function (d, b) {
|
|
15
|
-
extendStatics(d, b);
|
|
16
|
-
function __() { this.constructor = d; }
|
|
17
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
-
};
|
|
19
|
-
})();
|
|
20
|
-
var __assign = (this && this.__assign) || function () {
|
|
21
|
-
__assign = Object.assign || function(t) {
|
|
22
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
23
|
-
s = arguments[i];
|
|
24
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
25
|
-
t[p] = s[p];
|
|
26
|
-
}
|
|
27
|
-
return t;
|
|
28
|
-
};
|
|
29
|
-
return __assign.apply(this, arguments);
|
|
30
|
-
};
|
|
31
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
32
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
33
|
-
if (!m) return o;
|
|
34
|
-
var i = m.call(o), r, ar = [], e;
|
|
35
|
-
try {
|
|
36
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
37
|
-
}
|
|
38
|
-
catch (error) { e = { error: error }; }
|
|
39
|
-
finally {
|
|
40
|
-
try {
|
|
41
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
42
|
-
}
|
|
43
|
-
finally { if (e) throw e.error; }
|
|
44
|
-
}
|
|
45
|
-
return ar;
|
|
46
|
-
};
|
|
47
|
-
var __spread = (this && this.__spread) || function () {
|
|
48
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
49
|
-
return ar;
|
|
50
|
-
};
|
|
51
|
-
import { MathmlValidationError } from '../errors';
|
|
52
|
-
import { MathArgument, MathElement, MathText } from './math-element';
|
|
53
|
-
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
54
|
-
function freezeProps(props) {
|
|
55
|
-
return Object.freeze(__assign({}, props));
|
|
56
|
-
}
|
|
57
|
-
function asArg(value) {
|
|
58
|
-
return value instanceof MathArgument ? value : new MathArgument({}, value);
|
|
59
|
-
}
|
|
60
|
-
function requireArgs(path, count, args) {
|
|
61
|
-
for (var i = 0; i < count; i++) {
|
|
62
|
-
if (args[i] === undefined) {
|
|
63
|
-
throw new MathmlValidationError("Missing required argument at position " + String(i), path, 'required-child');
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
// ─── Controls ────────────────────────────────────────────────────────────────
|
|
68
|
-
/**
|
|
69
|
-
* Accent math structure — a base expression with a combining accent character.
|
|
70
|
-
*
|
|
71
|
-
* @public
|
|
72
|
-
*/
|
|
73
|
-
var MathAccent = /** @class */ (function (_super) {
|
|
74
|
-
__extends(MathAccent, _super);
|
|
75
|
-
function MathAccent(properties, base) {
|
|
76
|
-
if (properties === void 0) { properties = {}; }
|
|
77
|
-
if (base === void 0) { base = []; }
|
|
78
|
-
var _this = _super.call(this) || this;
|
|
79
|
-
/**
|
|
80
|
-
* Discriminator for this math control kind.
|
|
81
|
-
*
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
84
|
-
_this.type = 'acc';
|
|
85
|
-
_this._properties = freezeProps(properties);
|
|
86
|
-
_this._base = asArg(base);
|
|
87
|
-
return _this;
|
|
88
|
-
}
|
|
89
|
-
Object.defineProperty(MathAccent.prototype, "properties", {
|
|
90
|
-
/**
|
|
91
|
-
* Gets or sets accent configuration such as the accent character.
|
|
92
|
-
*
|
|
93
|
-
* @public
|
|
94
|
-
*/
|
|
95
|
-
get: function () {
|
|
96
|
-
return this._properties;
|
|
97
|
-
},
|
|
98
|
-
set: function (next) {
|
|
99
|
-
this.assertMutable();
|
|
100
|
-
this._properties = freezeProps(next);
|
|
101
|
-
this.notifyMutated();
|
|
102
|
-
},
|
|
103
|
-
enumerable: true,
|
|
104
|
-
configurable: true
|
|
105
|
-
});
|
|
106
|
-
Object.defineProperty(MathAccent.prototype, "base", {
|
|
107
|
-
/**
|
|
108
|
-
* Gets or sets the base mathematical expression under the accent.
|
|
109
|
-
*
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
|
-
get: function () {
|
|
113
|
-
return this._base;
|
|
114
|
-
},
|
|
115
|
-
set: function (next) {
|
|
116
|
-
this.assertMutable();
|
|
117
|
-
this._base = next;
|
|
118
|
-
this.notifyMutated();
|
|
119
|
-
},
|
|
120
|
-
enumerable: true,
|
|
121
|
-
configurable: true
|
|
122
|
-
});
|
|
123
|
-
return MathAccent;
|
|
124
|
-
}(MathElement));
|
|
125
|
-
export { MathAccent };
|
|
126
|
-
/**
|
|
127
|
-
* Over/under bar structure (`m:bar`) — a base expression with a bar accent.
|
|
128
|
-
*
|
|
129
|
-
* Child sequence: `barPr?`, `e`.
|
|
130
|
-
*
|
|
131
|
-
* @public
|
|
132
|
-
*/
|
|
133
|
-
var MathBar = /** @class */ (function (_super) {
|
|
134
|
-
__extends(MathBar, _super);
|
|
135
|
-
function MathBar(properties, base) {
|
|
136
|
-
if (properties === void 0) { properties = {}; }
|
|
137
|
-
if (base === void 0) { base = []; }
|
|
138
|
-
var _this = _super.call(this) || this;
|
|
139
|
-
/**
|
|
140
|
-
* Math element type for this control (`bar`).
|
|
141
|
-
*/
|
|
142
|
-
_this.type = 'bar';
|
|
143
|
-
_this._properties = freezeProps(properties);
|
|
144
|
-
_this._base = asArg(base);
|
|
145
|
-
return _this;
|
|
146
|
-
}
|
|
147
|
-
Object.defineProperty(MathBar.prototype, "properties", {
|
|
148
|
-
/**
|
|
149
|
-
* Bar configuration (`m:barPr`), such as bar position (`pos`).
|
|
150
|
-
*/
|
|
151
|
-
get: function () {
|
|
152
|
-
return this._properties;
|
|
153
|
-
},
|
|
154
|
-
set: function (next) {
|
|
155
|
-
this.assertMutable();
|
|
156
|
-
this._properties = freezeProps(next);
|
|
157
|
-
this.notifyMutated();
|
|
158
|
-
},
|
|
159
|
-
enumerable: true,
|
|
160
|
-
configurable: true
|
|
161
|
-
});
|
|
162
|
-
Object.defineProperty(MathBar.prototype, "base", {
|
|
163
|
-
/**
|
|
164
|
-
* Base mathematical expression under the bar (`m:e`).
|
|
165
|
-
*/
|
|
166
|
-
get: function () {
|
|
167
|
-
return this._base;
|
|
168
|
-
},
|
|
169
|
-
set: function (next) {
|
|
170
|
-
this.assertMutable();
|
|
171
|
-
this._base = next;
|
|
172
|
-
this.notifyMutated();
|
|
173
|
-
},
|
|
174
|
-
enumerable: true,
|
|
175
|
-
configurable: true
|
|
176
|
-
});
|
|
177
|
-
return MathBar;
|
|
178
|
-
}(MathElement));
|
|
179
|
-
export { MathBar };
|
|
180
|
-
/**
|
|
181
|
-
* Layout box structure (`m:box`) — groups a base for operator emulation and breaks.
|
|
182
|
-
*
|
|
183
|
-
* Child sequence: `boxPr?`, `e`.
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
*/
|
|
187
|
-
var MathBox = /** @class */ (function (_super) {
|
|
188
|
-
__extends(MathBox, _super);
|
|
189
|
-
function MathBox(properties, base) {
|
|
190
|
-
if (properties === void 0) { properties = {}; }
|
|
191
|
-
if (base === void 0) { base = []; }
|
|
192
|
-
var _this = _super.call(this) || this;
|
|
193
|
-
/**
|
|
194
|
-
* Math element type for this control (`box`).
|
|
195
|
-
*/
|
|
196
|
-
_this.type = 'box';
|
|
197
|
-
_this._properties = freezeProps(properties);
|
|
198
|
-
_this._base = asArg(base);
|
|
199
|
-
return _this;
|
|
200
|
-
}
|
|
201
|
-
Object.defineProperty(MathBox.prototype, "properties", {
|
|
202
|
-
/**
|
|
203
|
-
* Box configuration (`m:boxPr`), such as operator emulation and break flags.
|
|
204
|
-
*/
|
|
205
|
-
get: function () {
|
|
206
|
-
return this._properties;
|
|
207
|
-
},
|
|
208
|
-
set: function (next) {
|
|
209
|
-
this.assertMutable();
|
|
210
|
-
this._properties = freezeProps(next);
|
|
211
|
-
this.notifyMutated();
|
|
212
|
-
},
|
|
213
|
-
enumerable: true,
|
|
214
|
-
configurable: true
|
|
215
|
-
});
|
|
216
|
-
Object.defineProperty(MathBox.prototype, "base", {
|
|
217
|
-
/**
|
|
218
|
-
* Base mathematical expression inside the box (`m:e`).
|
|
219
|
-
*/
|
|
220
|
-
get: function () {
|
|
221
|
-
return this._base;
|
|
222
|
-
},
|
|
223
|
-
set: function (next) {
|
|
224
|
-
this.assertMutable();
|
|
225
|
-
this._base = next;
|
|
226
|
-
this.notifyMutated();
|
|
227
|
-
},
|
|
228
|
-
enumerable: true,
|
|
229
|
-
configurable: true
|
|
230
|
-
});
|
|
231
|
-
return MathBox;
|
|
232
|
-
}(MathElement));
|
|
233
|
-
export { MathBox };
|
|
234
|
-
/**
|
|
235
|
-
* Border box structure (`m:borderBox`) — a base expression with optional borders and strikes.
|
|
236
|
-
*
|
|
237
|
-
* Child sequence: `borderBoxPr?`, `e`.
|
|
238
|
-
*
|
|
239
|
-
* @public
|
|
240
|
-
*/
|
|
241
|
-
var MathBorderBox = /** @class */ (function (_super) {
|
|
242
|
-
__extends(MathBorderBox, _super);
|
|
243
|
-
function MathBorderBox(properties, base) {
|
|
244
|
-
if (properties === void 0) { properties = {}; }
|
|
245
|
-
if (base === void 0) { base = []; }
|
|
246
|
-
var _this = _super.call(this) || this;
|
|
247
|
-
/**
|
|
248
|
-
* Math element type for this control (`borderBox`).
|
|
249
|
-
*/
|
|
250
|
-
_this.type = 'borderBox';
|
|
251
|
-
_this._properties = freezeProps(properties);
|
|
252
|
-
_this._base = asArg(base);
|
|
253
|
-
return _this;
|
|
254
|
-
}
|
|
255
|
-
Object.defineProperty(MathBorderBox.prototype, "properties", {
|
|
256
|
-
/**
|
|
257
|
-
* Border-box configuration (`m:borderBoxPr`), such as hidden sides and strike flags.
|
|
258
|
-
*/
|
|
259
|
-
get: function () {
|
|
260
|
-
return this._properties;
|
|
261
|
-
},
|
|
262
|
-
set: function (next) {
|
|
263
|
-
this.assertMutable();
|
|
264
|
-
this._properties = freezeProps(next);
|
|
265
|
-
this.notifyMutated();
|
|
266
|
-
},
|
|
267
|
-
enumerable: true,
|
|
268
|
-
configurable: true
|
|
269
|
-
});
|
|
270
|
-
Object.defineProperty(MathBorderBox.prototype, "base", {
|
|
271
|
-
/**
|
|
272
|
-
* Base mathematical expression inside the border box (`m:e`).
|
|
273
|
-
*/
|
|
274
|
-
get: function () {
|
|
275
|
-
return this._base;
|
|
276
|
-
},
|
|
277
|
-
set: function (next) {
|
|
278
|
-
this.assertMutable();
|
|
279
|
-
this._base = next;
|
|
280
|
-
this.notifyMutated();
|
|
281
|
-
},
|
|
282
|
-
enumerable: true,
|
|
283
|
-
configurable: true
|
|
284
|
-
});
|
|
285
|
-
return MathBorderBox;
|
|
286
|
-
}(MathElement));
|
|
287
|
-
export { MathBorderBox };
|
|
288
|
-
/**
|
|
289
|
-
* Delimiter structure (`m:d`) — one or more arguments between begin/end characters.
|
|
290
|
-
*
|
|
291
|
-
* Child sequence: `dPr?`, `e` (1..∞).
|
|
292
|
-
*
|
|
293
|
-
* @public
|
|
294
|
-
*/
|
|
295
|
-
var MathDelimiter = /** @class */ (function (_super) {
|
|
296
|
-
__extends(MathDelimiter, _super);
|
|
297
|
-
function MathDelimiter(properties, elements) {
|
|
298
|
-
if (properties === void 0) { properties = {}; }
|
|
299
|
-
if (elements === void 0) { elements = []; }
|
|
300
|
-
var _this = _super.call(this) || this;
|
|
301
|
-
/**
|
|
302
|
-
* Math element type for this control (`d`).
|
|
303
|
-
*/
|
|
304
|
-
_this.type = 'd';
|
|
305
|
-
_this._properties = freezeProps(properties);
|
|
306
|
-
_this._elements = elements.map(function (e) { return asArg(e); });
|
|
307
|
-
return _this;
|
|
308
|
-
}
|
|
309
|
-
Object.defineProperty(MathDelimiter.prototype, "properties", {
|
|
310
|
-
/**
|
|
311
|
-
* Delimiter configuration (`m:dPr`), such as begin/end characters and grow.
|
|
312
|
-
*/
|
|
313
|
-
get: function () {
|
|
314
|
-
return this._properties;
|
|
315
|
-
},
|
|
316
|
-
set: function (next) {
|
|
317
|
-
this.assertMutable();
|
|
318
|
-
this._properties = freezeProps(next);
|
|
319
|
-
this.notifyMutated();
|
|
320
|
-
},
|
|
321
|
-
enumerable: true,
|
|
322
|
-
configurable: true
|
|
323
|
-
});
|
|
324
|
-
Object.defineProperty(MathDelimiter.prototype, "elements", {
|
|
325
|
-
/**
|
|
326
|
-
* Ordered delimiter arguments (`m:e`), each an {@link MathArgument}.
|
|
327
|
-
*/
|
|
328
|
-
get: function () {
|
|
329
|
-
return this._elements;
|
|
330
|
-
},
|
|
331
|
-
/**
|
|
332
|
-
* Replaces the ordered delimiter arguments (`m:e`) in document order.
|
|
333
|
-
*/
|
|
334
|
-
set: function (next) {
|
|
335
|
-
this.assertMutable();
|
|
336
|
-
this._elements = __spread(next);
|
|
337
|
-
this.notifyMutated();
|
|
338
|
-
},
|
|
339
|
-
enumerable: true,
|
|
340
|
-
configurable: true
|
|
341
|
-
});
|
|
342
|
-
/**
|
|
343
|
-
* Validates that this delimiter has at least one argument before serialization.
|
|
344
|
-
*
|
|
345
|
-
* @private
|
|
346
|
-
* Called by the OMML serializer; not part of the public authoring API.
|
|
347
|
-
*/
|
|
348
|
-
MathDelimiter.prototype.assertSerializable = function (path) {
|
|
349
|
-
if (path === void 0) { path = 'd'; }
|
|
350
|
-
if (this._elements.length < 1) {
|
|
351
|
-
throw new MathmlValidationError('m:d requires at least one m:e (CT_D)', path, 'required-child');
|
|
352
|
-
}
|
|
353
|
-
};
|
|
354
|
-
return MathDelimiter;
|
|
355
|
-
}(MathElement));
|
|
356
|
-
export { MathDelimiter };
|
|
357
|
-
/**
|
|
358
|
-
* Equation array structure (`m:eqArr`) — stacked equation rows as arguments.
|
|
359
|
-
*
|
|
360
|
-
* Child sequence: `eqArrPr?`, `e` (1..∞).
|
|
361
|
-
*
|
|
362
|
-
* @public
|
|
363
|
-
*/
|
|
364
|
-
var MathEquationArray = /** @class */ (function (_super) {
|
|
365
|
-
__extends(MathEquationArray, _super);
|
|
366
|
-
function MathEquationArray(properties, elements) {
|
|
367
|
-
if (properties === void 0) { properties = {}; }
|
|
368
|
-
if (elements === void 0) { elements = []; }
|
|
369
|
-
var _this = _super.call(this) || this;
|
|
370
|
-
/**
|
|
371
|
-
* Math element type for this control (`eqArr`).
|
|
372
|
-
*/
|
|
373
|
-
_this.type = 'eqArr';
|
|
374
|
-
_this._properties = freezeProps(properties);
|
|
375
|
-
_this._elements = elements.map(function (e) { return asArg(e); });
|
|
376
|
-
return _this;
|
|
377
|
-
}
|
|
378
|
-
Object.defineProperty(MathEquationArray.prototype, "properties", {
|
|
379
|
-
/**
|
|
380
|
-
* Equation-array configuration (`m:eqArrPr`), such as base justification and distribution.
|
|
381
|
-
*/
|
|
382
|
-
get: function () {
|
|
383
|
-
return this._properties;
|
|
384
|
-
},
|
|
385
|
-
set: function (next) {
|
|
386
|
-
this.assertMutable();
|
|
387
|
-
this._properties = freezeProps(next);
|
|
388
|
-
this.notifyMutated();
|
|
389
|
-
},
|
|
390
|
-
enumerable: true,
|
|
391
|
-
configurable: true
|
|
392
|
-
});
|
|
393
|
-
Object.defineProperty(MathEquationArray.prototype, "elements", {
|
|
394
|
-
/**
|
|
395
|
-
* Ordered equation-array rows (`m:e`), each an {@link MathArgument}.
|
|
396
|
-
*/
|
|
397
|
-
get: function () {
|
|
398
|
-
return this._elements;
|
|
399
|
-
},
|
|
400
|
-
/**
|
|
401
|
-
* Replaces the ordered equation-array rows (`m:e`) in document order.
|
|
402
|
-
*/
|
|
403
|
-
set: function (next) {
|
|
404
|
-
this.assertMutable();
|
|
405
|
-
this._elements = __spread(next);
|
|
406
|
-
this.notifyMutated();
|
|
407
|
-
},
|
|
408
|
-
enumerable: true,
|
|
409
|
-
configurable: true
|
|
410
|
-
});
|
|
411
|
-
/**
|
|
412
|
-
* Validates that this equation array has at least one row before serialization.
|
|
413
|
-
*
|
|
414
|
-
* @private
|
|
415
|
-
* Called by the OMML serializer; not part of the public authoring API.
|
|
416
|
-
*/
|
|
417
|
-
MathEquationArray.prototype.assertSerializable = function (path) {
|
|
418
|
-
if (path === void 0) { path = 'eqArr'; }
|
|
419
|
-
if (this._elements.length < 1) {
|
|
420
|
-
throw new MathmlValidationError('m:eqArr requires at least one m:e (CT_EqArr)', path, 'required-child');
|
|
421
|
-
}
|
|
422
|
-
};
|
|
423
|
-
return MathEquationArray;
|
|
424
|
-
}(MathElement));
|
|
425
|
-
export { MathEquationArray };
|
|
426
|
-
/**
|
|
427
|
-
* Fraction math structure — numerator over denominator with optional fraction style.
|
|
428
|
-
*
|
|
429
|
-
* @public
|
|
430
|
-
*/
|
|
431
|
-
var MathFraction = /** @class */ (function (_super) {
|
|
432
|
-
__extends(MathFraction, _super);
|
|
433
|
-
function MathFraction(properties, numerator, denominator) {
|
|
434
|
-
if (properties === void 0) { properties = {}; }
|
|
435
|
-
if (numerator === void 0) { numerator = []; }
|
|
436
|
-
if (denominator === void 0) { denominator = []; }
|
|
437
|
-
var _this = _super.call(this) || this;
|
|
438
|
-
/**
|
|
439
|
-
* Discriminator for this math control kind.
|
|
440
|
-
*
|
|
441
|
-
* @public
|
|
442
|
-
*/
|
|
443
|
-
_this.type = 'f';
|
|
444
|
-
_this._properties = freezeProps(properties);
|
|
445
|
-
_this._numerator = asArg(numerator);
|
|
446
|
-
_this._denominator = asArg(denominator);
|
|
447
|
-
return _this;
|
|
448
|
-
}
|
|
449
|
-
Object.defineProperty(MathFraction.prototype, "properties", {
|
|
450
|
-
/**
|
|
451
|
-
* Gets or sets fraction configuration such as bar, skewed, linear, or no-bar style.
|
|
452
|
-
*
|
|
453
|
-
* @public
|
|
454
|
-
*/
|
|
455
|
-
get: function () {
|
|
456
|
-
return this._properties;
|
|
457
|
-
},
|
|
458
|
-
set: function (next) {
|
|
459
|
-
this.assertMutable();
|
|
460
|
-
this._properties = freezeProps(next);
|
|
461
|
-
this.notifyMutated();
|
|
462
|
-
},
|
|
463
|
-
enumerable: true,
|
|
464
|
-
configurable: true
|
|
465
|
-
});
|
|
466
|
-
Object.defineProperty(MathFraction.prototype, "numerator", {
|
|
467
|
-
/**
|
|
468
|
-
* Gets or sets the numerator of the fraction.
|
|
469
|
-
*
|
|
470
|
-
* @public
|
|
471
|
-
*/
|
|
472
|
-
get: function () {
|
|
473
|
-
return this._numerator;
|
|
474
|
-
},
|
|
475
|
-
set: function (next) {
|
|
476
|
-
this.assertMutable();
|
|
477
|
-
this._numerator = next;
|
|
478
|
-
this.notifyMutated();
|
|
479
|
-
},
|
|
480
|
-
enumerable: true,
|
|
481
|
-
configurable: true
|
|
482
|
-
});
|
|
483
|
-
Object.defineProperty(MathFraction.prototype, "denominator", {
|
|
484
|
-
/**
|
|
485
|
-
* Gets or sets the denominator of the fraction.
|
|
486
|
-
*
|
|
487
|
-
* @public
|
|
488
|
-
*/
|
|
489
|
-
get: function () {
|
|
490
|
-
return this._denominator;
|
|
491
|
-
},
|
|
492
|
-
set: function (next) {
|
|
493
|
-
this.assertMutable();
|
|
494
|
-
this._denominator = next;
|
|
495
|
-
this.notifyMutated();
|
|
496
|
-
},
|
|
497
|
-
enumerable: true,
|
|
498
|
-
configurable: true
|
|
499
|
-
});
|
|
500
|
-
return MathFraction;
|
|
501
|
-
}(MathElement));
|
|
502
|
-
export { MathFraction };
|
|
503
|
-
/**
|
|
504
|
-
* Function-apply structure (`m:func`) — function name applied to a base expression.
|
|
505
|
-
*
|
|
506
|
-
* Child sequence: `funcPr?`, `fName`, `e`.
|
|
507
|
-
*
|
|
508
|
-
* @public
|
|
509
|
-
*/
|
|
510
|
-
var MathFunction = /** @class */ (function (_super) {
|
|
511
|
-
__extends(MathFunction, _super);
|
|
512
|
-
function MathFunction(properties, name, base) {
|
|
513
|
-
if (properties === void 0) { properties = {}; }
|
|
514
|
-
if (name === void 0) { name = []; }
|
|
515
|
-
if (base === void 0) { base = []; }
|
|
516
|
-
var _this = _super.call(this) || this;
|
|
517
|
-
/**
|
|
518
|
-
* Math element type for this control (`func`).
|
|
519
|
-
*/
|
|
520
|
-
_this.type = 'func';
|
|
521
|
-
_this._properties = freezeProps(properties);
|
|
522
|
-
_this._name = asArg(name);
|
|
523
|
-
_this._base = asArg(base);
|
|
524
|
-
return _this;
|
|
525
|
-
}
|
|
526
|
-
Object.defineProperty(MathFunction.prototype, "properties", {
|
|
527
|
-
/**
|
|
528
|
-
* Function-apply configuration (`m:funcPr`).
|
|
529
|
-
*/
|
|
530
|
-
get: function () {
|
|
531
|
-
return this._properties;
|
|
532
|
-
},
|
|
533
|
-
set: function (next) {
|
|
534
|
-
this.assertMutable();
|
|
535
|
-
this._properties = freezeProps(next);
|
|
536
|
-
this.notifyMutated();
|
|
537
|
-
},
|
|
538
|
-
enumerable: true,
|
|
539
|
-
configurable: true
|
|
540
|
-
});
|
|
541
|
-
Object.defineProperty(MathFunction.prototype, "name", {
|
|
542
|
-
/**
|
|
543
|
-
* Function name argument (`m:fName`), for example `sin` or `log`.
|
|
544
|
-
*/
|
|
545
|
-
get: function () {
|
|
546
|
-
return this._name;
|
|
547
|
-
},
|
|
548
|
-
set: function (next) {
|
|
549
|
-
this.assertMutable();
|
|
550
|
-
this._name = next;
|
|
551
|
-
this.notifyMutated();
|
|
552
|
-
},
|
|
553
|
-
enumerable: true,
|
|
554
|
-
configurable: true
|
|
555
|
-
});
|
|
556
|
-
Object.defineProperty(MathFunction.prototype, "base", {
|
|
557
|
-
/**
|
|
558
|
-
* Base mathematical expression the function applies to (`m:e`).
|
|
559
|
-
*/
|
|
560
|
-
get: function () {
|
|
561
|
-
return this._base;
|
|
562
|
-
},
|
|
563
|
-
set: function (next) {
|
|
564
|
-
this.assertMutable();
|
|
565
|
-
this._base = next;
|
|
566
|
-
this.notifyMutated();
|
|
567
|
-
},
|
|
568
|
-
enumerable: true,
|
|
569
|
-
configurable: true
|
|
570
|
-
});
|
|
571
|
-
return MathFunction;
|
|
572
|
-
}(MathElement));
|
|
573
|
-
export { MathFunction };
|
|
574
|
-
/**
|
|
575
|
-
* Group-character structure (`m:groupChr`) — a base with a grouping character above or below.
|
|
576
|
-
*
|
|
577
|
-
* Child sequence: `groupChrPr?`, `e`.
|
|
578
|
-
*
|
|
579
|
-
* @public
|
|
580
|
-
*/
|
|
581
|
-
var MathGroupCharacter = /** @class */ (function (_super) {
|
|
582
|
-
__extends(MathGroupCharacter, _super);
|
|
583
|
-
function MathGroupCharacter(properties, base) {
|
|
584
|
-
if (properties === void 0) { properties = {}; }
|
|
585
|
-
if (base === void 0) { base = []; }
|
|
586
|
-
var _this = _super.call(this) || this;
|
|
587
|
-
/**
|
|
588
|
-
* Math element type for this control (`groupChr`).
|
|
589
|
-
*/
|
|
590
|
-
_this.type = 'groupChr';
|
|
591
|
-
_this._properties = freezeProps(properties);
|
|
592
|
-
_this._base = asArg(base);
|
|
593
|
-
return _this;
|
|
594
|
-
}
|
|
595
|
-
Object.defineProperty(MathGroupCharacter.prototype, "properties", {
|
|
596
|
-
/**
|
|
597
|
-
* Group-character configuration (`m:groupChrPr`), such as character and position.
|
|
598
|
-
*/
|
|
599
|
-
get: function () {
|
|
600
|
-
return this._properties;
|
|
601
|
-
},
|
|
602
|
-
set: function (next) {
|
|
603
|
-
this.assertMutable();
|
|
604
|
-
this._properties = freezeProps(next);
|
|
605
|
-
this.notifyMutated();
|
|
606
|
-
},
|
|
607
|
-
enumerable: true,
|
|
608
|
-
configurable: true
|
|
609
|
-
});
|
|
610
|
-
Object.defineProperty(MathGroupCharacter.prototype, "base", {
|
|
611
|
-
/**
|
|
612
|
-
* Base mathematical expression under the group character (`m:e`).
|
|
613
|
-
*/
|
|
614
|
-
get: function () {
|
|
615
|
-
return this._base;
|
|
616
|
-
},
|
|
617
|
-
set: function (next) {
|
|
618
|
-
this.assertMutable();
|
|
619
|
-
this._base = next;
|
|
620
|
-
this.notifyMutated();
|
|
621
|
-
},
|
|
622
|
-
enumerable: true,
|
|
623
|
-
configurable: true
|
|
624
|
-
});
|
|
625
|
-
return MathGroupCharacter;
|
|
626
|
-
}(MathElement));
|
|
627
|
-
export { MathGroupCharacter };
|
|
628
|
-
/**
|
|
629
|
-
* Lower-limit structure (`m:limLow`) — a base expression with a limit below it.
|
|
630
|
-
*
|
|
631
|
-
* Child sequence: `limLowPr?`, `e`, `lim`.
|
|
632
|
-
*
|
|
633
|
-
* @public
|
|
634
|
-
*/
|
|
635
|
-
var MathLimitLower = /** @class */ (function (_super) {
|
|
636
|
-
__extends(MathLimitLower, _super);
|
|
637
|
-
function MathLimitLower(properties, base, lim) {
|
|
638
|
-
if (properties === void 0) { properties = {}; }
|
|
639
|
-
if (base === void 0) { base = []; }
|
|
640
|
-
if (lim === void 0) { lim = []; }
|
|
641
|
-
var _this = _super.call(this) || this;
|
|
642
|
-
/**
|
|
643
|
-
* Math element type for this control (`limLow`).
|
|
644
|
-
*/
|
|
645
|
-
_this.type = 'limLow';
|
|
646
|
-
_this._properties = freezeProps(properties);
|
|
647
|
-
_this._base = asArg(base);
|
|
648
|
-
_this._lim = asArg(lim);
|
|
649
|
-
return _this;
|
|
650
|
-
}
|
|
651
|
-
Object.defineProperty(MathLimitLower.prototype, "properties", {
|
|
652
|
-
/**
|
|
653
|
-
* Lower-limit configuration (`m:limLowPr`).
|
|
654
|
-
*/
|
|
655
|
-
get: function () {
|
|
656
|
-
return this._properties;
|
|
657
|
-
},
|
|
658
|
-
set: function (next) {
|
|
659
|
-
this.assertMutable();
|
|
660
|
-
this._properties = freezeProps(next);
|
|
661
|
-
this.notifyMutated();
|
|
662
|
-
},
|
|
663
|
-
enumerable: true,
|
|
664
|
-
configurable: true
|
|
665
|
-
});
|
|
666
|
-
Object.defineProperty(MathLimitLower.prototype, "base", {
|
|
667
|
-
/**
|
|
668
|
-
* Base mathematical expression above the lower limit (`m:e`).
|
|
669
|
-
*/
|
|
670
|
-
get: function () {
|
|
671
|
-
return this._base;
|
|
672
|
-
},
|
|
673
|
-
set: function (next) {
|
|
674
|
-
this.assertMutable();
|
|
675
|
-
this._base = next;
|
|
676
|
-
this.notifyMutated();
|
|
677
|
-
},
|
|
678
|
-
enumerable: true,
|
|
679
|
-
configurable: true
|
|
680
|
-
});
|
|
681
|
-
Object.defineProperty(MathLimitLower.prototype, "lim", {
|
|
682
|
-
/**
|
|
683
|
-
* Lower-limit argument drawn beneath the base (`m:lim`).
|
|
684
|
-
*/
|
|
685
|
-
get: function () {
|
|
686
|
-
return this._lim;
|
|
687
|
-
},
|
|
688
|
-
set: function (next) {
|
|
689
|
-
this.assertMutable();
|
|
690
|
-
this._lim = next;
|
|
691
|
-
this.notifyMutated();
|
|
692
|
-
},
|
|
693
|
-
enumerable: true,
|
|
694
|
-
configurable: true
|
|
695
|
-
});
|
|
696
|
-
return MathLimitLower;
|
|
697
|
-
}(MathElement));
|
|
698
|
-
export { MathLimitLower };
|
|
699
|
-
/**
|
|
700
|
-
* Upper-limit structure (`m:limUpp`) — a base expression with a limit above it.
|
|
701
|
-
*
|
|
702
|
-
* Child sequence: `limUppPr?`, `e`, `lim`.
|
|
703
|
-
*
|
|
704
|
-
* @public
|
|
705
|
-
*/
|
|
706
|
-
var MathLimitUpper = /** @class */ (function (_super) {
|
|
707
|
-
__extends(MathLimitUpper, _super);
|
|
708
|
-
function MathLimitUpper(properties, base, lim) {
|
|
709
|
-
if (properties === void 0) { properties = {}; }
|
|
710
|
-
if (base === void 0) { base = []; }
|
|
711
|
-
if (lim === void 0) { lim = []; }
|
|
712
|
-
var _this = _super.call(this) || this;
|
|
713
|
-
/**
|
|
714
|
-
* Math element type for this control (`limUpp`).
|
|
715
|
-
*/
|
|
716
|
-
_this.type = 'limUpp';
|
|
717
|
-
_this._properties = freezeProps(properties);
|
|
718
|
-
_this._base = asArg(base);
|
|
719
|
-
_this._lim = asArg(lim);
|
|
720
|
-
return _this;
|
|
721
|
-
}
|
|
722
|
-
Object.defineProperty(MathLimitUpper.prototype, "properties", {
|
|
723
|
-
/**
|
|
724
|
-
* Upper-limit configuration (`m:limUppPr`).
|
|
725
|
-
*/
|
|
726
|
-
get: function () {
|
|
727
|
-
return this._properties;
|
|
728
|
-
},
|
|
729
|
-
set: function (next) {
|
|
730
|
-
this.assertMutable();
|
|
731
|
-
this._properties = freezeProps(next);
|
|
732
|
-
this.notifyMutated();
|
|
733
|
-
},
|
|
734
|
-
enumerable: true,
|
|
735
|
-
configurable: true
|
|
736
|
-
});
|
|
737
|
-
Object.defineProperty(MathLimitUpper.prototype, "base", {
|
|
738
|
-
/**
|
|
739
|
-
* Base mathematical expression below the upper limit (`m:e`).
|
|
740
|
-
*/
|
|
741
|
-
get: function () {
|
|
742
|
-
return this._base;
|
|
743
|
-
},
|
|
744
|
-
set: function (next) {
|
|
745
|
-
this.assertMutable();
|
|
746
|
-
this._base = next;
|
|
747
|
-
this.notifyMutated();
|
|
748
|
-
},
|
|
749
|
-
enumerable: true,
|
|
750
|
-
configurable: true
|
|
751
|
-
});
|
|
752
|
-
Object.defineProperty(MathLimitUpper.prototype, "lim", {
|
|
753
|
-
/**
|
|
754
|
-
* Upper-limit argument drawn above the base (`m:lim`).
|
|
755
|
-
*/
|
|
756
|
-
get: function () {
|
|
757
|
-
return this._lim;
|
|
758
|
-
},
|
|
759
|
-
set: function (next) {
|
|
760
|
-
this.assertMutable();
|
|
761
|
-
this._lim = next;
|
|
762
|
-
this.notifyMutated();
|
|
763
|
-
},
|
|
764
|
-
enumerable: true,
|
|
765
|
-
configurable: true
|
|
766
|
-
});
|
|
767
|
-
return MathLimitUpper;
|
|
768
|
-
}(MathElement));
|
|
769
|
-
export { MathLimitUpper };
|
|
770
|
-
/**
|
|
771
|
-
* Matrix row (`m:mr`) — one row of matrix cell arguments.
|
|
772
|
-
*
|
|
773
|
-
* Child sequence: `e` (1..∞).
|
|
774
|
-
*
|
|
775
|
-
* @public
|
|
776
|
-
*/
|
|
777
|
-
var MathMatrixRow = /** @class */ (function (_super) {
|
|
778
|
-
__extends(MathMatrixRow, _super);
|
|
779
|
-
function MathMatrixRow(elements) {
|
|
780
|
-
if (elements === void 0) { elements = []; }
|
|
781
|
-
var _this = _super.call(this) || this;
|
|
782
|
-
/**
|
|
783
|
-
* Math element type for this control (`mr`).
|
|
784
|
-
*/
|
|
785
|
-
_this.type = 'mr';
|
|
786
|
-
_this._elements = elements.map(function (e) { return asArg(e); });
|
|
787
|
-
return _this;
|
|
788
|
-
}
|
|
789
|
-
Object.defineProperty(MathMatrixRow.prototype, "elements", {
|
|
790
|
-
/**
|
|
791
|
-
* Ordered cell arguments in this matrix row (`m:e`), each an {@link MathArgument}.
|
|
792
|
-
*/
|
|
793
|
-
get: function () {
|
|
794
|
-
return this._elements;
|
|
795
|
-
},
|
|
796
|
-
enumerable: true,
|
|
797
|
-
configurable: true
|
|
798
|
-
});
|
|
799
|
-
/**
|
|
800
|
-
* Replaces the ordered cell arguments (`m:e`) in this matrix row.
|
|
801
|
-
*/
|
|
802
|
-
MathMatrixRow.prototype.setElements = function (next) {
|
|
803
|
-
this.assertMutable();
|
|
804
|
-
this._elements = __spread(next);
|
|
805
|
-
this.notifyMutated();
|
|
806
|
-
};
|
|
807
|
-
/**
|
|
808
|
-
* Validates that this matrix row has at least one cell before serialization.
|
|
809
|
-
*
|
|
810
|
-
* @private
|
|
811
|
-
* Called by the OMML serializer; not part of the public authoring API.
|
|
812
|
-
*/
|
|
813
|
-
MathMatrixRow.prototype.assertSerializable = function (path) {
|
|
814
|
-
if (path === void 0) { path = 'mr'; }
|
|
815
|
-
if (this._elements.length < 1) {
|
|
816
|
-
throw new MathmlValidationError('m:mr requires at least one m:e (CT_MR)', path, 'required-child');
|
|
817
|
-
}
|
|
818
|
-
};
|
|
819
|
-
return MathMatrixRow;
|
|
820
|
-
}(MathElement));
|
|
821
|
-
export { MathMatrixRow };
|
|
822
|
-
/**
|
|
823
|
-
* Matrix structure (`m:m`) — a grid of matrix rows.
|
|
824
|
-
*
|
|
825
|
-
* Child sequence: `mPr?`, `mr` (1..∞).
|
|
826
|
-
*
|
|
827
|
-
* @public
|
|
828
|
-
*/
|
|
829
|
-
var MathMatrix = /** @class */ (function (_super) {
|
|
830
|
-
__extends(MathMatrix, _super);
|
|
831
|
-
function MathMatrix(properties, rows) {
|
|
832
|
-
if (properties === void 0) { properties = {}; }
|
|
833
|
-
if (rows === void 0) { rows = []; }
|
|
834
|
-
var _this = _super.call(this) || this;
|
|
835
|
-
/**
|
|
836
|
-
* Math element type for this control (`m`).
|
|
837
|
-
*/
|
|
838
|
-
_this.type = 'm';
|
|
839
|
-
_this._properties = freezeProps(properties);
|
|
840
|
-
_this._rows = __spread(rows);
|
|
841
|
-
return _this;
|
|
842
|
-
}
|
|
843
|
-
Object.defineProperty(MathMatrix.prototype, "properties", {
|
|
844
|
-
/**
|
|
845
|
-
* Matrix configuration (`m:mPr`), such as base justification and placeholder visibility.
|
|
846
|
-
*/
|
|
847
|
-
get: function () {
|
|
848
|
-
return this._properties;
|
|
849
|
-
},
|
|
850
|
-
set: function (next) {
|
|
851
|
-
this.assertMutable();
|
|
852
|
-
this._properties = freezeProps(next);
|
|
853
|
-
this.notifyMutated();
|
|
854
|
-
},
|
|
855
|
-
enumerable: true,
|
|
856
|
-
configurable: true
|
|
857
|
-
});
|
|
858
|
-
Object.defineProperty(MathMatrix.prototype, "rows", {
|
|
859
|
-
/**
|
|
860
|
-
* Ordered matrix rows (`m:mr`), each a {@link MathMatrixRow}.
|
|
861
|
-
*/
|
|
862
|
-
get: function () {
|
|
863
|
-
return this._rows;
|
|
864
|
-
},
|
|
865
|
-
enumerable: true,
|
|
866
|
-
configurable: true
|
|
867
|
-
});
|
|
868
|
-
/**
|
|
869
|
-
* Replaces the ordered matrix rows (`m:mr`) in document order.
|
|
870
|
-
*/
|
|
871
|
-
MathMatrix.prototype.setRows = function (next) {
|
|
872
|
-
this.assertMutable();
|
|
873
|
-
this._rows = __spread(next);
|
|
874
|
-
this.notifyMutated();
|
|
875
|
-
};
|
|
876
|
-
/**
|
|
877
|
-
* Validates that this matrix has at least one row (and each row is valid) before serialization.
|
|
878
|
-
*
|
|
879
|
-
* @private
|
|
880
|
-
* Called by the OMML serializer; not part of the public authoring API.
|
|
881
|
-
*/
|
|
882
|
-
MathMatrix.prototype.assertSerializable = function (path) {
|
|
883
|
-
if (path === void 0) { path = 'm'; }
|
|
884
|
-
if (this._rows.length < 1) {
|
|
885
|
-
throw new MathmlValidationError('m:m requires at least one m:mr (CT_M)', path, 'required-child');
|
|
886
|
-
}
|
|
887
|
-
this._rows.forEach(function (row, i) { return row.assertSerializable(path + ".mr[" + String(i) + "]"); });
|
|
888
|
-
};
|
|
889
|
-
return MathMatrix;
|
|
890
|
-
}(MathElement));
|
|
891
|
-
export { MathMatrix };
|
|
892
|
-
/**
|
|
893
|
-
* N-ary operator structure (`m:nary`) — integral, sum, product, and similar operators.
|
|
894
|
-
*
|
|
895
|
-
* Child sequence: `naryPr?`, `sub`, `sup`, `e`.
|
|
896
|
-
*
|
|
897
|
-
* @public
|
|
898
|
-
*/
|
|
899
|
-
var MathNaryOperator = /** @class */ (function (_super) {
|
|
900
|
-
__extends(MathNaryOperator, _super);
|
|
901
|
-
function MathNaryOperator(properties, sub, sup, base) {
|
|
902
|
-
if (properties === void 0) { properties = {}; }
|
|
903
|
-
if (sub === void 0) { sub = []; }
|
|
904
|
-
if (sup === void 0) { sup = []; }
|
|
905
|
-
if (base === void 0) { base = []; }
|
|
906
|
-
var _this = _super.call(this) || this;
|
|
907
|
-
/**
|
|
908
|
-
* Math element type for this control (`nary`).
|
|
909
|
-
*/
|
|
910
|
-
_this.type = 'nary';
|
|
911
|
-
_this._properties = freezeProps(properties);
|
|
912
|
-
_this._sub = asArg(sub);
|
|
913
|
-
_this._sup = asArg(sup);
|
|
914
|
-
_this._base = asArg(base);
|
|
915
|
-
return _this;
|
|
916
|
-
}
|
|
917
|
-
Object.defineProperty(MathNaryOperator.prototype, "properties", {
|
|
918
|
-
/**
|
|
919
|
-
* N-ary operator configuration (`m:naryPr`), such as operator character, limit location, and hide flags.
|
|
920
|
-
*/
|
|
921
|
-
get: function () {
|
|
922
|
-
return this._properties;
|
|
923
|
-
},
|
|
924
|
-
set: function (next) {
|
|
925
|
-
this.assertMutable();
|
|
926
|
-
this._properties = freezeProps(next);
|
|
927
|
-
this.notifyMutated();
|
|
928
|
-
},
|
|
929
|
-
enumerable: true,
|
|
930
|
-
configurable: true
|
|
931
|
-
});
|
|
932
|
-
Object.defineProperty(MathNaryOperator.prototype, "subscript", {
|
|
933
|
-
/**
|
|
934
|
-
* Lower (subscript) limit of the n-ary operator (`m:sub`).
|
|
935
|
-
*/
|
|
936
|
-
get: function () {
|
|
937
|
-
return this._sub;
|
|
938
|
-
},
|
|
939
|
-
set: function (next) {
|
|
940
|
-
this.assertMutable();
|
|
941
|
-
this._sub = next;
|
|
942
|
-
this.notifyMutated();
|
|
943
|
-
},
|
|
944
|
-
enumerable: true,
|
|
945
|
-
configurable: true
|
|
946
|
-
});
|
|
947
|
-
Object.defineProperty(MathNaryOperator.prototype, "superscript", {
|
|
948
|
-
/**
|
|
949
|
-
* Upper (superscript) limit of the n-ary operator (`m:sup`).
|
|
950
|
-
*/
|
|
951
|
-
get: function () {
|
|
952
|
-
return this._sup;
|
|
953
|
-
},
|
|
954
|
-
set: function (next) {
|
|
955
|
-
this.assertMutable();
|
|
956
|
-
this._sup = next;
|
|
957
|
-
this.notifyMutated();
|
|
958
|
-
},
|
|
959
|
-
enumerable: true,
|
|
960
|
-
configurable: true
|
|
961
|
-
});
|
|
962
|
-
Object.defineProperty(MathNaryOperator.prototype, "base", {
|
|
963
|
-
/**
|
|
964
|
-
* Base mathematical expression the n-ary operator applies to (`m:e`).
|
|
965
|
-
*/
|
|
966
|
-
get: function () {
|
|
967
|
-
return this._base;
|
|
968
|
-
},
|
|
969
|
-
set: function (next) {
|
|
970
|
-
this.assertMutable();
|
|
971
|
-
this._base = next;
|
|
972
|
-
this.notifyMutated();
|
|
973
|
-
},
|
|
974
|
-
enumerable: true,
|
|
975
|
-
configurable: true
|
|
976
|
-
});
|
|
977
|
-
return MathNaryOperator;
|
|
978
|
-
}(MathElement));
|
|
979
|
-
export { MathNaryOperator };
|
|
980
|
-
/**
|
|
981
|
-
* Phantom structure (`m:phant`) — layout spacing from content that may be hidden.
|
|
982
|
-
*
|
|
983
|
-
* Child sequence: `phantPr?`, `e`.
|
|
984
|
-
*
|
|
985
|
-
* @public
|
|
986
|
-
*/
|
|
987
|
-
var MathPhantom = /** @class */ (function (_super) {
|
|
988
|
-
__extends(MathPhantom, _super);
|
|
989
|
-
function MathPhantom(properties, base) {
|
|
990
|
-
if (properties === void 0) { properties = {}; }
|
|
991
|
-
if (base === void 0) { base = []; }
|
|
992
|
-
var _this = _super.call(this) || this;
|
|
993
|
-
/**
|
|
994
|
-
* Math element type for this control (`phant`).
|
|
995
|
-
*/
|
|
996
|
-
_this.type = 'phant';
|
|
997
|
-
_this._properties = freezeProps(properties);
|
|
998
|
-
_this._base = asArg(base);
|
|
999
|
-
return _this;
|
|
1000
|
-
}
|
|
1001
|
-
Object.defineProperty(MathPhantom.prototype, "properties", {
|
|
1002
|
-
/**
|
|
1003
|
-
* Phantom configuration (`m:phantPr`), such as show and zero-width/ascender/descender flags.
|
|
1004
|
-
*/
|
|
1005
|
-
get: function () {
|
|
1006
|
-
return this._properties;
|
|
1007
|
-
},
|
|
1008
|
-
set: function (next) {
|
|
1009
|
-
this.assertMutable();
|
|
1010
|
-
this._properties = freezeProps(next);
|
|
1011
|
-
this.notifyMutated();
|
|
1012
|
-
},
|
|
1013
|
-
enumerable: true,
|
|
1014
|
-
configurable: true
|
|
1015
|
-
});
|
|
1016
|
-
Object.defineProperty(MathPhantom.prototype, "base", {
|
|
1017
|
-
/**
|
|
1018
|
-
* Base mathematical expression used for phantom layout (`m:e`).
|
|
1019
|
-
*/
|
|
1020
|
-
get: function () {
|
|
1021
|
-
return this._base;
|
|
1022
|
-
},
|
|
1023
|
-
set: function (next) {
|
|
1024
|
-
this.assertMutable();
|
|
1025
|
-
this._base = next;
|
|
1026
|
-
this.notifyMutated();
|
|
1027
|
-
},
|
|
1028
|
-
enumerable: true,
|
|
1029
|
-
configurable: true
|
|
1030
|
-
});
|
|
1031
|
-
return MathPhantom;
|
|
1032
|
-
}(MathElement));
|
|
1033
|
-
export { MathPhantom };
|
|
1034
|
-
/**
|
|
1035
|
-
* Radical structure (`m:rad`) — square root or nth-root with optional degree.
|
|
1036
|
-
*
|
|
1037
|
-
* Child sequence: `radPr?`, `deg`, `e`.
|
|
1038
|
-
*
|
|
1039
|
-
* @public
|
|
1040
|
-
*/
|
|
1041
|
-
var MathRadical = /** @class */ (function (_super) {
|
|
1042
|
-
__extends(MathRadical, _super);
|
|
1043
|
-
function MathRadical(properties, deg, base) {
|
|
1044
|
-
if (properties === void 0) { properties = {}; }
|
|
1045
|
-
if (deg === void 0) { deg = []; }
|
|
1046
|
-
if (base === void 0) { base = []; }
|
|
1047
|
-
var _this = _super.call(this) || this;
|
|
1048
|
-
/**
|
|
1049
|
-
* Math element type for this control (`rad`).
|
|
1050
|
-
*/
|
|
1051
|
-
_this.type = 'rad';
|
|
1052
|
-
_this._properties = freezeProps(properties);
|
|
1053
|
-
_this._deg = asArg(deg);
|
|
1054
|
-
_this._base = asArg(base);
|
|
1055
|
-
return _this;
|
|
1056
|
-
}
|
|
1057
|
-
Object.defineProperty(MathRadical.prototype, "properties", {
|
|
1058
|
-
/**
|
|
1059
|
-
* Radical configuration (`m:radPr`), such as whether the degree is hidden.
|
|
1060
|
-
*/
|
|
1061
|
-
get: function () {
|
|
1062
|
-
return this._properties;
|
|
1063
|
-
},
|
|
1064
|
-
set: function (next) {
|
|
1065
|
-
this.assertMutable();
|
|
1066
|
-
this._properties = freezeProps(next);
|
|
1067
|
-
this.notifyMutated();
|
|
1068
|
-
},
|
|
1069
|
-
enumerable: true,
|
|
1070
|
-
configurable: true
|
|
1071
|
-
});
|
|
1072
|
-
Object.defineProperty(MathRadical.prototype, "deg", {
|
|
1073
|
-
/**
|
|
1074
|
-
* Degree argument of the radical (`m:deg`), for example the index of an nth root.
|
|
1075
|
-
*/
|
|
1076
|
-
get: function () {
|
|
1077
|
-
return this._deg;
|
|
1078
|
-
},
|
|
1079
|
-
set: function (next) {
|
|
1080
|
-
this.assertMutable();
|
|
1081
|
-
this._deg = next;
|
|
1082
|
-
this.notifyMutated();
|
|
1083
|
-
},
|
|
1084
|
-
enumerable: true,
|
|
1085
|
-
configurable: true
|
|
1086
|
-
});
|
|
1087
|
-
Object.defineProperty(MathRadical.prototype, "base", {
|
|
1088
|
-
/**
|
|
1089
|
-
* Radicand — the expression under the radical sign (`m:e`).
|
|
1090
|
-
*/
|
|
1091
|
-
get: function () {
|
|
1092
|
-
return this._base;
|
|
1093
|
-
},
|
|
1094
|
-
set: function (next) {
|
|
1095
|
-
this.assertMutable();
|
|
1096
|
-
this._base = next;
|
|
1097
|
-
this.notifyMutated();
|
|
1098
|
-
},
|
|
1099
|
-
enumerable: true,
|
|
1100
|
-
configurable: true
|
|
1101
|
-
});
|
|
1102
|
-
return MathRadical;
|
|
1103
|
-
}(MathElement));
|
|
1104
|
-
export { MathRadical };
|
|
1105
|
-
/**
|
|
1106
|
-
* Pre-sub-superscript structure (`m:sPre`) — scripts placed before the base.
|
|
1107
|
-
*
|
|
1108
|
-
* Child sequence: `sPrePr?`, `sub`, `sup`, `e`.
|
|
1109
|
-
*
|
|
1110
|
-
* @public
|
|
1111
|
-
*/
|
|
1112
|
-
var MathPreSubSuperscript = /** @class */ (function (_super) {
|
|
1113
|
-
__extends(MathPreSubSuperscript, _super);
|
|
1114
|
-
function MathPreSubSuperscript(properties, sub, sup, base) {
|
|
1115
|
-
if (properties === void 0) { properties = {}; }
|
|
1116
|
-
if (sub === void 0) { sub = []; }
|
|
1117
|
-
if (sup === void 0) { sup = []; }
|
|
1118
|
-
if (base === void 0) { base = []; }
|
|
1119
|
-
var _this = _super.call(this) || this;
|
|
1120
|
-
/**
|
|
1121
|
-
* Math element type for this control (`sPre`).
|
|
1122
|
-
*/
|
|
1123
|
-
_this.type = 'sPre';
|
|
1124
|
-
_this._properties = freezeProps(properties);
|
|
1125
|
-
_this._sub = asArg(sub);
|
|
1126
|
-
_this._sup = asArg(sup);
|
|
1127
|
-
_this._base = asArg(base);
|
|
1128
|
-
return _this;
|
|
1129
|
-
}
|
|
1130
|
-
Object.defineProperty(MathPreSubSuperscript.prototype, "properties", {
|
|
1131
|
-
/**
|
|
1132
|
-
* Pre-script configuration (`m:sPrePr`), such as script alignment.
|
|
1133
|
-
*/
|
|
1134
|
-
get: function () {
|
|
1135
|
-
return this._properties;
|
|
1136
|
-
},
|
|
1137
|
-
set: function (next) {
|
|
1138
|
-
this.assertMutable();
|
|
1139
|
-
this._properties = freezeProps(next);
|
|
1140
|
-
this.notifyMutated();
|
|
1141
|
-
},
|
|
1142
|
-
enumerable: true,
|
|
1143
|
-
configurable: true
|
|
1144
|
-
});
|
|
1145
|
-
Object.defineProperty(MathPreSubSuperscript.prototype, "sub", {
|
|
1146
|
-
/**
|
|
1147
|
-
* Subscript argument placed before the base (`m:sub`).
|
|
1148
|
-
*/
|
|
1149
|
-
get: function () {
|
|
1150
|
-
return this._sub;
|
|
1151
|
-
},
|
|
1152
|
-
set: function (next) {
|
|
1153
|
-
this.assertMutable();
|
|
1154
|
-
this._sub = next;
|
|
1155
|
-
this.notifyMutated();
|
|
1156
|
-
},
|
|
1157
|
-
enumerable: true,
|
|
1158
|
-
configurable: true
|
|
1159
|
-
});
|
|
1160
|
-
Object.defineProperty(MathPreSubSuperscript.prototype, "sup", {
|
|
1161
|
-
/**
|
|
1162
|
-
* Superscript argument placed before the base (`m:sup`).
|
|
1163
|
-
*/
|
|
1164
|
-
get: function () {
|
|
1165
|
-
return this._sup;
|
|
1166
|
-
},
|
|
1167
|
-
set: function (next) {
|
|
1168
|
-
this.assertMutable();
|
|
1169
|
-
this._sup = next;
|
|
1170
|
-
this.notifyMutated();
|
|
1171
|
-
},
|
|
1172
|
-
enumerable: true,
|
|
1173
|
-
configurable: true
|
|
1174
|
-
});
|
|
1175
|
-
Object.defineProperty(MathPreSubSuperscript.prototype, "base", {
|
|
1176
|
-
/**
|
|
1177
|
-
* Base mathematical expression after the pre-scripts (`m:e`).
|
|
1178
|
-
*/
|
|
1179
|
-
get: function () {
|
|
1180
|
-
return this._base;
|
|
1181
|
-
},
|
|
1182
|
-
set: function (next) {
|
|
1183
|
-
this.assertMutable();
|
|
1184
|
-
this._base = next;
|
|
1185
|
-
this.notifyMutated();
|
|
1186
|
-
},
|
|
1187
|
-
enumerable: true,
|
|
1188
|
-
configurable: true
|
|
1189
|
-
});
|
|
1190
|
-
return MathPreSubSuperscript;
|
|
1191
|
-
}(MathElement));
|
|
1192
|
-
export { MathPreSubSuperscript };
|
|
1193
|
-
/**
|
|
1194
|
-
* Subscript structure (`m:sSub`) — a base with a subscript.
|
|
1195
|
-
*
|
|
1196
|
-
* Child sequence: `sSubPr?`, `e`, `sub`.
|
|
1197
|
-
*
|
|
1198
|
-
* @public
|
|
1199
|
-
*/
|
|
1200
|
-
var MathSubscript = /** @class */ (function (_super) {
|
|
1201
|
-
__extends(MathSubscript, _super);
|
|
1202
|
-
function MathSubscript(properties, base, sub) {
|
|
1203
|
-
if (properties === void 0) { properties = {}; }
|
|
1204
|
-
if (base === void 0) { base = []; }
|
|
1205
|
-
if (sub === void 0) { sub = []; }
|
|
1206
|
-
var _this = _super.call(this) || this;
|
|
1207
|
-
/**
|
|
1208
|
-
* Math element type for this control (`sSub`).
|
|
1209
|
-
*/
|
|
1210
|
-
_this.type = 'sSub';
|
|
1211
|
-
_this._properties = freezeProps(properties);
|
|
1212
|
-
_this._base = asArg(base);
|
|
1213
|
-
_this._sub = asArg(sub);
|
|
1214
|
-
return _this;
|
|
1215
|
-
}
|
|
1216
|
-
Object.defineProperty(MathSubscript.prototype, "properties", {
|
|
1217
|
-
/**
|
|
1218
|
-
* Subscript configuration (`m:sSubPr`), such as script alignment.
|
|
1219
|
-
*/
|
|
1220
|
-
get: function () {
|
|
1221
|
-
return this._properties;
|
|
1222
|
-
},
|
|
1223
|
-
set: function (next) {
|
|
1224
|
-
this.assertMutable();
|
|
1225
|
-
this._properties = freezeProps(next);
|
|
1226
|
-
this.notifyMutated();
|
|
1227
|
-
},
|
|
1228
|
-
enumerable: true,
|
|
1229
|
-
configurable: true
|
|
1230
|
-
});
|
|
1231
|
-
Object.defineProperty(MathSubscript.prototype, "base", {
|
|
1232
|
-
/**
|
|
1233
|
-
* Base mathematical expression carrying the subscript (`m:e`).
|
|
1234
|
-
*/
|
|
1235
|
-
get: function () {
|
|
1236
|
-
return this._base;
|
|
1237
|
-
},
|
|
1238
|
-
set: function (next) {
|
|
1239
|
-
this.assertMutable();
|
|
1240
|
-
this._base = next;
|
|
1241
|
-
this.notifyMutated();
|
|
1242
|
-
},
|
|
1243
|
-
enumerable: true,
|
|
1244
|
-
configurable: true
|
|
1245
|
-
});
|
|
1246
|
-
Object.defineProperty(MathSubscript.prototype, "subscript", {
|
|
1247
|
-
/**
|
|
1248
|
-
* Subscript argument (`m:sub`).
|
|
1249
|
-
*/
|
|
1250
|
-
get: function () {
|
|
1251
|
-
return this._sub;
|
|
1252
|
-
},
|
|
1253
|
-
set: function (next) {
|
|
1254
|
-
this.assertMutable();
|
|
1255
|
-
this._sub = next;
|
|
1256
|
-
this.notifyMutated();
|
|
1257
|
-
},
|
|
1258
|
-
enumerable: true,
|
|
1259
|
-
configurable: true
|
|
1260
|
-
});
|
|
1261
|
-
return MathSubscript;
|
|
1262
|
-
}(MathElement));
|
|
1263
|
-
export { MathSubscript };
|
|
1264
|
-
/**
|
|
1265
|
-
* Sub-superscript structure (`m:sSubSup`) — a base with both subscript and superscript.
|
|
1266
|
-
*
|
|
1267
|
-
* Child sequence: `sSubSupPr?`, `e`, `sub`, `sup`.
|
|
1268
|
-
*
|
|
1269
|
-
* @public
|
|
1270
|
-
*/
|
|
1271
|
-
var MathSubSuperscript = /** @class */ (function (_super) {
|
|
1272
|
-
__extends(MathSubSuperscript, _super);
|
|
1273
|
-
function MathSubSuperscript(properties, base, sub, sup) {
|
|
1274
|
-
if (properties === void 0) { properties = {}; }
|
|
1275
|
-
if (base === void 0) { base = []; }
|
|
1276
|
-
if (sub === void 0) { sub = []; }
|
|
1277
|
-
if (sup === void 0) { sup = []; }
|
|
1278
|
-
var _this = _super.call(this) || this;
|
|
1279
|
-
/**
|
|
1280
|
-
* Math element type for this control (`sSubSup`).
|
|
1281
|
-
*/
|
|
1282
|
-
_this.type = 'sSubSup';
|
|
1283
|
-
_this._properties = freezeProps(properties);
|
|
1284
|
-
_this._base = asArg(base);
|
|
1285
|
-
_this._sub = asArg(sub);
|
|
1286
|
-
_this._sup = asArg(sup);
|
|
1287
|
-
return _this;
|
|
1288
|
-
}
|
|
1289
|
-
Object.defineProperty(MathSubSuperscript.prototype, "properties", {
|
|
1290
|
-
/**
|
|
1291
|
-
* Sub-superscript configuration (`m:sSubSupPr`), such as script alignment.
|
|
1292
|
-
*/
|
|
1293
|
-
get: function () {
|
|
1294
|
-
return this._properties;
|
|
1295
|
-
},
|
|
1296
|
-
set: function (next) {
|
|
1297
|
-
this.assertMutable();
|
|
1298
|
-
this._properties = freezeProps(next);
|
|
1299
|
-
this.notifyMutated();
|
|
1300
|
-
},
|
|
1301
|
-
enumerable: true,
|
|
1302
|
-
configurable: true
|
|
1303
|
-
});
|
|
1304
|
-
Object.defineProperty(MathSubSuperscript.prototype, "base", {
|
|
1305
|
-
/**
|
|
1306
|
-
* Base mathematical expression carrying both scripts (`m:e`).
|
|
1307
|
-
*/
|
|
1308
|
-
get: function () {
|
|
1309
|
-
return this._base;
|
|
1310
|
-
},
|
|
1311
|
-
set: function (next) {
|
|
1312
|
-
this.assertMutable();
|
|
1313
|
-
this._base = next;
|
|
1314
|
-
this.notifyMutated();
|
|
1315
|
-
},
|
|
1316
|
-
enumerable: true,
|
|
1317
|
-
configurable: true
|
|
1318
|
-
});
|
|
1319
|
-
Object.defineProperty(MathSubSuperscript.prototype, "subscript", {
|
|
1320
|
-
/**
|
|
1321
|
-
* Subscript argument (`m:sub`).
|
|
1322
|
-
*/
|
|
1323
|
-
get: function () {
|
|
1324
|
-
return this._sub;
|
|
1325
|
-
},
|
|
1326
|
-
set: function (next) {
|
|
1327
|
-
this.assertMutable();
|
|
1328
|
-
this._sub = next;
|
|
1329
|
-
this.notifyMutated();
|
|
1330
|
-
},
|
|
1331
|
-
enumerable: true,
|
|
1332
|
-
configurable: true
|
|
1333
|
-
});
|
|
1334
|
-
Object.defineProperty(MathSubSuperscript.prototype, "superscript", {
|
|
1335
|
-
/**
|
|
1336
|
-
* Superscript argument (`m:sup`).
|
|
1337
|
-
*/
|
|
1338
|
-
get: function () {
|
|
1339
|
-
return this._sup;
|
|
1340
|
-
},
|
|
1341
|
-
set: function (next) {
|
|
1342
|
-
this.assertMutable();
|
|
1343
|
-
this._sup = next;
|
|
1344
|
-
this.notifyMutated();
|
|
1345
|
-
},
|
|
1346
|
-
enumerable: true,
|
|
1347
|
-
configurable: true
|
|
1348
|
-
});
|
|
1349
|
-
return MathSubSuperscript;
|
|
1350
|
-
}(MathElement));
|
|
1351
|
-
export { MathSubSuperscript };
|
|
1352
|
-
/**
|
|
1353
|
-
* Superscript structure (`m:sSup`) — a base with a superscript.
|
|
1354
|
-
*
|
|
1355
|
-
* Child sequence: `sSupPr?`, `e`, `sup`.
|
|
1356
|
-
*
|
|
1357
|
-
* @public
|
|
1358
|
-
*/
|
|
1359
|
-
var MathSuperscript = /** @class */ (function (_super) {
|
|
1360
|
-
__extends(MathSuperscript, _super);
|
|
1361
|
-
function MathSuperscript(properties, base, sup) {
|
|
1362
|
-
if (properties === void 0) { properties = {}; }
|
|
1363
|
-
if (base === void 0) { base = []; }
|
|
1364
|
-
if (sup === void 0) { sup = []; }
|
|
1365
|
-
var _this = _super.call(this) || this;
|
|
1366
|
-
/**
|
|
1367
|
-
* Math element type for this control (`sSup`).
|
|
1368
|
-
*/
|
|
1369
|
-
_this.type = 'sSup';
|
|
1370
|
-
_this._properties = freezeProps(properties);
|
|
1371
|
-
_this._base = asArg(base);
|
|
1372
|
-
_this._sup = asArg(sup);
|
|
1373
|
-
return _this;
|
|
1374
|
-
}
|
|
1375
|
-
Object.defineProperty(MathSuperscript.prototype, "properties", {
|
|
1376
|
-
/**
|
|
1377
|
-
* Superscript configuration (`m:sSupPr`), such as script alignment.
|
|
1378
|
-
*/
|
|
1379
|
-
get: function () {
|
|
1380
|
-
return this._properties;
|
|
1381
|
-
},
|
|
1382
|
-
set: function (next) {
|
|
1383
|
-
this.assertMutable();
|
|
1384
|
-
this._properties = freezeProps(next);
|
|
1385
|
-
this.notifyMutated();
|
|
1386
|
-
},
|
|
1387
|
-
enumerable: true,
|
|
1388
|
-
configurable: true
|
|
1389
|
-
});
|
|
1390
|
-
Object.defineProperty(MathSuperscript.prototype, "base", {
|
|
1391
|
-
/**
|
|
1392
|
-
* Base mathematical expression carrying the superscript (`m:e`).
|
|
1393
|
-
*/
|
|
1394
|
-
get: function () {
|
|
1395
|
-
return this._base;
|
|
1396
|
-
},
|
|
1397
|
-
set: function (next) {
|
|
1398
|
-
this.assertMutable();
|
|
1399
|
-
this._base = next;
|
|
1400
|
-
this.notifyMutated();
|
|
1401
|
-
},
|
|
1402
|
-
enumerable: true,
|
|
1403
|
-
configurable: true
|
|
1404
|
-
});
|
|
1405
|
-
Object.defineProperty(MathSuperscript.prototype, "superscript", {
|
|
1406
|
-
/**
|
|
1407
|
-
* Superscript argument (`m:sup`).
|
|
1408
|
-
*/
|
|
1409
|
-
get: function () {
|
|
1410
|
-
return this._sup;
|
|
1411
|
-
},
|
|
1412
|
-
set: function (next) {
|
|
1413
|
-
this.assertMutable();
|
|
1414
|
-
this._sup = next;
|
|
1415
|
-
this.notifyMutated();
|
|
1416
|
-
},
|
|
1417
|
-
enumerable: true,
|
|
1418
|
-
configurable: true
|
|
1419
|
-
});
|
|
1420
|
-
return MathSuperscript;
|
|
1421
|
-
}(MathElement));
|
|
1422
|
-
export { MathSuperscript };
|
|
1423
|
-
/**
|
|
1424
|
-
* Math run (`m:r`) — text and optional opaque WML run content inside an equation.
|
|
1425
|
-
*
|
|
1426
|
-
* Child sequence: `rPr?`, optional `w:rPr`, then (`m:t` | WML run content)*.
|
|
1427
|
-
* The constructor accepts a string (single {@link MathText}) or a children list.
|
|
1428
|
-
*
|
|
1429
|
-
* @public
|
|
1430
|
-
*/
|
|
1431
|
-
var MathRun = /** @class */ (function (_super) {
|
|
1432
|
-
__extends(MathRun, _super);
|
|
1433
|
-
function MathRun(textOrChildren, properties, wRPr, opaqueChildren) {
|
|
1434
|
-
if (textOrChildren === void 0) { textOrChildren = []; }
|
|
1435
|
-
if (properties === void 0) { properties = {}; }
|
|
1436
|
-
if (opaqueChildren === void 0) { opaqueChildren = []; }
|
|
1437
|
-
var _this = _super.call(this) || this;
|
|
1438
|
-
/**
|
|
1439
|
-
* Math element type for this control (`r`).
|
|
1440
|
-
*/
|
|
1441
|
-
_this.type = 'r';
|
|
1442
|
-
_this._properties = freezeProps(properties);
|
|
1443
|
-
_this._wRPr = wRPr;
|
|
1444
|
-
_this._opaqueChildren = __spread(opaqueChildren);
|
|
1445
|
-
if (typeof textOrChildren === 'string') {
|
|
1446
|
-
_this._children = [new MathText(textOrChildren)];
|
|
1447
|
-
}
|
|
1448
|
-
else {
|
|
1449
|
-
_this._children = __spread(textOrChildren);
|
|
1450
|
-
}
|
|
1451
|
-
return _this;
|
|
1452
|
-
}
|
|
1453
|
-
Object.defineProperty(MathRun.prototype, "properties", {
|
|
1454
|
-
/**
|
|
1455
|
-
* Math run configuration (`m:rPr`), such as literal/normal flags, script, and style.
|
|
1456
|
-
*/
|
|
1457
|
-
get: function () {
|
|
1458
|
-
return this._properties;
|
|
1459
|
-
},
|
|
1460
|
-
set: function (next) {
|
|
1461
|
-
this.assertMutable();
|
|
1462
|
-
this._properties = freezeProps(next);
|
|
1463
|
-
this.notifyMutated();
|
|
1464
|
-
},
|
|
1465
|
-
enumerable: true,
|
|
1466
|
-
configurable: true
|
|
1467
|
-
});
|
|
1468
|
-
Object.defineProperty(MathRun.prototype, "wRPr", {
|
|
1469
|
-
/**
|
|
1470
|
-
* Optional WordprocessingML run properties (`w:rPr`) nested under this math run.
|
|
1471
|
-
*
|
|
1472
|
-
* @private
|
|
1473
|
-
* Opaque WML carrier for round-trip; not part of the public MathML authoring API.
|
|
1474
|
-
*/
|
|
1475
|
-
get: function () {
|
|
1476
|
-
return this._wRPr;
|
|
1477
|
-
},
|
|
1478
|
-
/**
|
|
1479
|
-
* @private
|
|
1480
|
-
*
|
|
1481
|
-
*/
|
|
1482
|
-
set: function (next) {
|
|
1483
|
-
this.assertMutable();
|
|
1484
|
-
this._wRPr = next;
|
|
1485
|
-
this.notifyMutated();
|
|
1486
|
-
},
|
|
1487
|
-
enumerable: true,
|
|
1488
|
-
configurable: true
|
|
1489
|
-
});
|
|
1490
|
-
Object.defineProperty(MathRun.prototype, "children", {
|
|
1491
|
-
/**
|
|
1492
|
-
* Ordered math children of this run (typically {@link MathText} nodes).
|
|
1493
|
-
*/
|
|
1494
|
-
get: function () {
|
|
1495
|
-
return this._children;
|
|
1496
|
-
},
|
|
1497
|
-
enumerable: true,
|
|
1498
|
-
configurable: true
|
|
1499
|
-
});
|
|
1500
|
-
Object.defineProperty(MathRun.prototype, "opaqueChildren", {
|
|
1501
|
-
/**
|
|
1502
|
-
* Opaque non-math WML run-content siblings preserved in order with math texts.
|
|
1503
|
-
*
|
|
1504
|
-
* @private
|
|
1505
|
-
* Used by parse/serialize for round-trip fidelity; not part of the public authoring API.
|
|
1506
|
-
*/
|
|
1507
|
-
get: function () {
|
|
1508
|
-
return this._opaqueChildren;
|
|
1509
|
-
},
|
|
1510
|
-
enumerable: true,
|
|
1511
|
-
configurable: true
|
|
1512
|
-
});
|
|
1513
|
-
/**
|
|
1514
|
-
* Replaces the ordered math children of this run.
|
|
1515
|
-
*/
|
|
1516
|
-
MathRun.prototype.setChildren = function (next) {
|
|
1517
|
-
this.assertMutable();
|
|
1518
|
-
this._children = __spread(next);
|
|
1519
|
-
this.notifyMutated();
|
|
1520
|
-
};
|
|
1521
|
-
Object.defineProperty(MathRun.prototype, "text", {
|
|
1522
|
-
/**
|
|
1523
|
-
* Concatenated text of all {@link MathText} children (full UTF-8 passthrough).
|
|
1524
|
-
* Assigning a value replaces children with a single {@link MathText}.
|
|
1525
|
-
*/
|
|
1526
|
-
get: function () {
|
|
1527
|
-
return this._children.filter(function (c) { return c.type === 't'; }).map(function (t) { return t.value; }).join('');
|
|
1528
|
-
},
|
|
1529
|
-
set: function (next) {
|
|
1530
|
-
this.assertMutable();
|
|
1531
|
-
this._children = [new MathText(next)];
|
|
1532
|
-
this.notifyMutated();
|
|
1533
|
-
},
|
|
1534
|
-
enumerable: true,
|
|
1535
|
-
configurable: true
|
|
1536
|
-
});
|
|
1537
|
-
return MathRun;
|
|
1538
|
-
}(MathElement));
|
|
1539
|
-
export { MathRun };
|
|
1540
|
-
// Suppress unused helper warning while keeping for serializer validation hooks.
|
|
1541
|
-
void requireArgs;
|