add initial marp implementation with sample content and build configuration
This commit is contained in:
44
node_modules/mathjax-full/ts/util/AsyncLoad.ts
generated
vendored
Normal file
44
node_modules/mathjax-full/ts/util/AsyncLoad.ts
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements asynchronous loading of files
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
import {mathjax} from '../mathjax.js';
|
||||
|
||||
/**
|
||||
* Load a file asynchronously using the mathjax.asynchLoad method, if there is one
|
||||
*
|
||||
* @param {string} name The name of the file to load
|
||||
* @return {Promise} The promise that is satisfied when the file is loaded
|
||||
*/
|
||||
export function asyncLoad(name: string): Promise<void> {
|
||||
if (!mathjax.asyncLoad) {
|
||||
return Promise.reject(`Can't load '${name}': No asyncLoad method specified`);
|
||||
}
|
||||
return new Promise((ok, fail) => {
|
||||
const result = mathjax.asyncLoad(name);
|
||||
if (result instanceof Promise) {
|
||||
result.then((value: any) => ok(value)).catch((err: Error) => fail(err));
|
||||
} else {
|
||||
ok(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
174
node_modules/mathjax-full/ts/util/BBox.ts
generated
vendored
Normal file
174
node_modules/mathjax-full/ts/util/BBox.ts
generated
vendored
Normal file
@@ -0,0 +1,174 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements a bounding-box object and operations on it
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
import {BIGDIMEN} from './lengths.js';
|
||||
|
||||
/**
|
||||
* The data used to initialize a BBox
|
||||
*/
|
||||
export type BBoxData = {
|
||||
w?: number,
|
||||
h?: number,
|
||||
d?: number
|
||||
};
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* The BBox class
|
||||
*/
|
||||
|
||||
export class BBox {
|
||||
/**
|
||||
* Constant for pwidth of full width box
|
||||
*/
|
||||
public static fullWidth = '100%';
|
||||
|
||||
/**
|
||||
* CSS styles that affect BBoxes
|
||||
*/
|
||||
public static StyleAdjust: [string, string, number?][] = [
|
||||
['borderTopWidth', 'h'],
|
||||
['borderRightWidth', 'w'],
|
||||
['borderBottomWidth', 'd'],
|
||||
['borderLeftWidth', 'w', 0],
|
||||
['paddingTop', 'h'],
|
||||
['paddingRight', 'w'],
|
||||
['paddingBottom', 'd'],
|
||||
['paddingLeft', 'w', 0]
|
||||
];
|
||||
|
||||
/**
|
||||
* These are the data stored for a bounding box
|
||||
*/
|
||||
/* tslint:disable:jsdoc-require */
|
||||
public w: number;
|
||||
public h: number;
|
||||
public d: number;
|
||||
public scale: number;
|
||||
public rscale: number; // scale relative to the parent's scale
|
||||
public L: number; // extra space on the left
|
||||
public R: number; // extra space on the right
|
||||
public pwidth: string; // percentage width (for tables)
|
||||
public ic: number; // italic correction
|
||||
public sk: number; // skew
|
||||
public dx: number; // offset for combining characters as accents
|
||||
/* tslint:enable */
|
||||
|
||||
/**
|
||||
* @return {BBox} A BBox initialized to zeros
|
||||
*/
|
||||
public static zero(): BBox {
|
||||
return new BBox({h: 0, d: 0, w: 0});
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {BBox} A BBox with height and depth not set
|
||||
*/
|
||||
public static empty(): BBox {
|
||||
return new BBox();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {BBoxData} def The data with which to initialize the BBox
|
||||
*
|
||||
* @constructor
|
||||
*/
|
||||
constructor(def: BBoxData = {w: 0, h: -BIGDIMEN, d: -BIGDIMEN}) {
|
||||
this.w = def.w || 0;
|
||||
this.h = ('h' in def ? def.h : -BIGDIMEN);
|
||||
this.d = ('d' in def ? def.d : -BIGDIMEN);
|
||||
this.L = this.R = this.ic = this.sk = this.dx = 0;
|
||||
this.scale = this.rscale = 1;
|
||||
this.pwidth = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up a bbox for append() and combine() operations
|
||||
* @return {BBox} the boox itself (for chaining calls)
|
||||
*/
|
||||
public empty(): BBox {
|
||||
this.w = 0;
|
||||
this.h = this.d = -BIGDIMEN;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert any unspecified values into zeros
|
||||
*/
|
||||
public clean () {
|
||||
if (this.w === -BIGDIMEN) this.w = 0;
|
||||
if (this.h === -BIGDIMEN) this.h = 0;
|
||||
if (this.d === -BIGDIMEN) this.d = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} scale The scale to use to modify the bounding box size
|
||||
*/
|
||||
public rescale(scale: number) {
|
||||
this.w *= scale;
|
||||
this.h *= scale;
|
||||
this.d *= scale;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {BBox} cbox A bounding to combine with this one
|
||||
* @param {number} x An x-offest for the child bounding box
|
||||
* @param {number} y A y-offset for the child bounding box
|
||||
*/
|
||||
public combine(cbox: BBox, x: number = 0, y: number = 0) {
|
||||
let rscale = cbox.rscale;
|
||||
let w = x + rscale * (cbox.w + cbox.L + cbox.R);
|
||||
let h = y + rscale * cbox.h;
|
||||
let d = rscale * cbox.d - y;
|
||||
if (w > this.w) this.w = w;
|
||||
if (h > this.h) this.h = h;
|
||||
if (d > this.d) this.d = d;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {BBox} cbox A bounding box to be added to the right of this one
|
||||
*/
|
||||
public append(cbox: BBox) {
|
||||
let scale = cbox.rscale;
|
||||
this.w += scale * (cbox.w + cbox.L + cbox.R);
|
||||
if (scale * cbox.h > this.h) {
|
||||
this.h = scale * cbox.h;
|
||||
}
|
||||
if (scale * cbox.d > this.d) {
|
||||
this.d = scale * cbox.d;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {BBox} cbox The bounding box to use to overwrite this one
|
||||
*/
|
||||
public updateFrom(cbox: BBox) {
|
||||
this.h = cbox.h;
|
||||
this.d = cbox.d;
|
||||
this.w = cbox.w;
|
||||
if (cbox.pwidth) {
|
||||
this.pwidth = cbox.pwidth;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
121
node_modules/mathjax-full/ts/util/BitField.ts
generated
vendored
Normal file
121
node_modules/mathjax-full/ts/util/BitField.ts
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2018-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements bit-fields with extendable field names
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
export class BitField {
|
||||
|
||||
/**
|
||||
* The largest bit available
|
||||
*/
|
||||
protected static MAXBIT = 1 << 31;
|
||||
|
||||
/**
|
||||
* The next bit to be allocated
|
||||
*/
|
||||
protected static next: number = 1;
|
||||
|
||||
/**
|
||||
* The map of names to bit positions
|
||||
*/
|
||||
protected static names: Map<string, number> = new Map();
|
||||
|
||||
/**
|
||||
* The bits that are set
|
||||
*/
|
||||
protected bits: number = 0;
|
||||
|
||||
/**
|
||||
* @param {string} names The names of the bit positions to reserve
|
||||
*/
|
||||
public static allocate(...names: string[]) {
|
||||
for (const name of names) {
|
||||
if (this.has(name)) {
|
||||
throw new Error('Bit already allocated for ' + name);
|
||||
}
|
||||
if (this.next === BitField.MAXBIT) {
|
||||
throw new Error('Maximum number of bits already allocated');
|
||||
}
|
||||
this.names.set(name, this.next);
|
||||
this.next <<= 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the bit to check for being defined
|
||||
* @return {boolean} True if the named bit is already allocated
|
||||
*/
|
||||
public static has(name: string): boolean {
|
||||
return this.names.has(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the bit position to set
|
||||
*/
|
||||
public set(name: string) {
|
||||
this.bits |= this.getBit(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the bit position to clear
|
||||
*/
|
||||
public clear(name: string) {
|
||||
this.bits &= ~this.getBit(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the bit to check if set
|
||||
* @return {boolean} True if the named bit is set
|
||||
*/
|
||||
public isSet(name: string): boolean {
|
||||
return !!(this.bits & this.getBit(name));
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all bits
|
||||
*/
|
||||
public reset() {
|
||||
this.bits = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name whose bit position is needed (error if not defined)
|
||||
* @return {number} The position of the named bit
|
||||
*/
|
||||
protected getBit(name: string): number {
|
||||
const bit = (this.constructor as typeof BitField).names.get(name);
|
||||
if (!bit) {
|
||||
throw new Error('Unknown bit-field name: ' + name);
|
||||
}
|
||||
return bit;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string[]} names The name of the positions to allocate initially
|
||||
* @return {typeof AbstractBitField} The bit-field class with names allocated
|
||||
*/
|
||||
export function BitFieldClass(...names: string[]): typeof BitField {
|
||||
const Bits = class extends BitField {};
|
||||
Bits.allocate(...names);
|
||||
return Bits;
|
||||
}
|
||||
525
node_modules/mathjax-full/ts/util/Entities.ts
generated
vendored
Normal file
525
node_modules/mathjax-full/ts/util/Entities.ts
generated
vendored
Normal file
@@ -0,0 +1,525 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Converts named entities to unicode characters
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
import {retryAfter} from './Retries.js';
|
||||
import {asyncLoad} from './AsyncLoad.js';
|
||||
import {OptionList} from './Options.js';
|
||||
|
||||
/**
|
||||
* The type for lists of entities
|
||||
*/
|
||||
export type EntityList = {[name: string]: string};
|
||||
|
||||
|
||||
/**
|
||||
* Options controlling the process of conversion
|
||||
*/
|
||||
export const options: OptionList = {
|
||||
loadMissingEntities: true // True means load entity files dynamically if needed
|
||||
};
|
||||
|
||||
/**
|
||||
* The entity name-to-value translation table
|
||||
* (basic math entities -- others are loaded from external files)
|
||||
*/
|
||||
export const entities: EntityList = {
|
||||
ApplyFunction: '\u2061',
|
||||
Backslash: '\u2216',
|
||||
Because: '\u2235',
|
||||
Breve: '\u02D8',
|
||||
Cap: '\u22D2',
|
||||
CenterDot: '\u00B7',
|
||||
CircleDot: '\u2299',
|
||||
CircleMinus: '\u2296',
|
||||
CirclePlus: '\u2295',
|
||||
CircleTimes: '\u2297',
|
||||
Congruent: '\u2261',
|
||||
ContourIntegral: '\u222E',
|
||||
Coproduct: '\u2210',
|
||||
Cross: '\u2A2F',
|
||||
Cup: '\u22D3',
|
||||
CupCap: '\u224D',
|
||||
Dagger: '\u2021',
|
||||
Del: '\u2207',
|
||||
Delta: '\u0394',
|
||||
Diamond: '\u22C4',
|
||||
DifferentialD: '\u2146',
|
||||
DotEqual: '\u2250',
|
||||
DoubleDot: '\u00A8',
|
||||
DoubleRightTee: '\u22A8',
|
||||
DoubleVerticalBar: '\u2225',
|
||||
DownArrow: '\u2193',
|
||||
DownLeftVector: '\u21BD',
|
||||
DownRightVector: '\u21C1',
|
||||
DownTee: '\u22A4',
|
||||
Downarrow: '\u21D3',
|
||||
Element: '\u2208',
|
||||
EqualTilde: '\u2242',
|
||||
Equilibrium: '\u21CC',
|
||||
Exists: '\u2203',
|
||||
ExponentialE: '\u2147',
|
||||
FilledVerySmallSquare: '\u25AA',
|
||||
ForAll: '\u2200',
|
||||
Gamma: '\u0393',
|
||||
Gg: '\u22D9',
|
||||
GreaterEqual: '\u2265',
|
||||
GreaterEqualLess: '\u22DB',
|
||||
GreaterFullEqual: '\u2267',
|
||||
GreaterLess: '\u2277',
|
||||
GreaterSlantEqual: '\u2A7E',
|
||||
GreaterTilde: '\u2273',
|
||||
Hacek: '\u02C7',
|
||||
Hat: '\u005E',
|
||||
HumpDownHump: '\u224E',
|
||||
HumpEqual: '\u224F',
|
||||
Im: '\u2111',
|
||||
ImaginaryI: '\u2148',
|
||||
Integral: '\u222B',
|
||||
Intersection: '\u22C2',
|
||||
InvisibleComma: '\u2063',
|
||||
InvisibleTimes: '\u2062',
|
||||
Lambda: '\u039B',
|
||||
Larr: '\u219E',
|
||||
LeftAngleBracket: '\u27E8',
|
||||
LeftArrow: '\u2190',
|
||||
LeftArrowRightArrow: '\u21C6',
|
||||
LeftCeiling: '\u2308',
|
||||
LeftDownVector: '\u21C3',
|
||||
LeftFloor: '\u230A',
|
||||
LeftRightArrow: '\u2194',
|
||||
LeftTee: '\u22A3',
|
||||
LeftTriangle: '\u22B2',
|
||||
LeftTriangleEqual: '\u22B4',
|
||||
LeftUpVector: '\u21BF',
|
||||
LeftVector: '\u21BC',
|
||||
Leftarrow: '\u21D0',
|
||||
Leftrightarrow: '\u21D4',
|
||||
LessEqualGreater: '\u22DA',
|
||||
LessFullEqual: '\u2266',
|
||||
LessGreater: '\u2276',
|
||||
LessSlantEqual: '\u2A7D',
|
||||
LessTilde: '\u2272',
|
||||
Ll: '\u22D8',
|
||||
Lleftarrow: '\u21DA',
|
||||
LongLeftArrow: '\u27F5',
|
||||
LongLeftRightArrow: '\u27F7',
|
||||
LongRightArrow: '\u27F6',
|
||||
Longleftarrow: '\u27F8',
|
||||
Longleftrightarrow: '\u27FA',
|
||||
Longrightarrow: '\u27F9',
|
||||
Lsh: '\u21B0',
|
||||
MinusPlus: '\u2213',
|
||||
NestedGreaterGreater: '\u226B',
|
||||
NestedLessLess: '\u226A',
|
||||
NotDoubleVerticalBar: '\u2226',
|
||||
NotElement: '\u2209',
|
||||
NotEqual: '\u2260',
|
||||
NotExists: '\u2204',
|
||||
NotGreater: '\u226F',
|
||||
NotGreaterEqual: '\u2271',
|
||||
NotLeftTriangle: '\u22EA',
|
||||
NotLeftTriangleEqual: '\u22EC',
|
||||
NotLess: '\u226E',
|
||||
NotLessEqual: '\u2270',
|
||||
NotPrecedes: '\u2280',
|
||||
NotPrecedesSlantEqual: '\u22E0',
|
||||
NotRightTriangle: '\u22EB',
|
||||
NotRightTriangleEqual: '\u22ED',
|
||||
NotSubsetEqual: '\u2288',
|
||||
NotSucceeds: '\u2281',
|
||||
NotSucceedsSlantEqual: '\u22E1',
|
||||
NotSupersetEqual: '\u2289',
|
||||
NotTilde: '\u2241',
|
||||
NotVerticalBar: '\u2224',
|
||||
Omega: '\u03A9',
|
||||
OverBar: '\u203E',
|
||||
OverBrace: '\u23DE',
|
||||
PartialD: '\u2202',
|
||||
Phi: '\u03A6',
|
||||
Pi: '\u03A0',
|
||||
PlusMinus: '\u00B1',
|
||||
Precedes: '\u227A',
|
||||
PrecedesEqual: '\u2AAF',
|
||||
PrecedesSlantEqual: '\u227C',
|
||||
PrecedesTilde: '\u227E',
|
||||
Product: '\u220F',
|
||||
Proportional: '\u221D',
|
||||
Psi: '\u03A8',
|
||||
Rarr: '\u21A0',
|
||||
Re: '\u211C',
|
||||
ReverseEquilibrium: '\u21CB',
|
||||
RightAngleBracket: '\u27E9',
|
||||
RightArrow: '\u2192',
|
||||
RightArrowLeftArrow: '\u21C4',
|
||||
RightCeiling: '\u2309',
|
||||
RightDownVector: '\u21C2',
|
||||
RightFloor: '\u230B',
|
||||
RightTee: '\u22A2',
|
||||
RightTeeArrow: '\u21A6',
|
||||
RightTriangle: '\u22B3',
|
||||
RightTriangleEqual: '\u22B5',
|
||||
RightUpVector: '\u21BE',
|
||||
RightVector: '\u21C0',
|
||||
Rightarrow: '\u21D2',
|
||||
Rrightarrow: '\u21DB',
|
||||
Rsh: '\u21B1',
|
||||
Sigma: '\u03A3',
|
||||
SmallCircle: '\u2218',
|
||||
Sqrt: '\u221A',
|
||||
Square: '\u25A1',
|
||||
SquareIntersection: '\u2293',
|
||||
SquareSubset: '\u228F',
|
||||
SquareSubsetEqual: '\u2291',
|
||||
SquareSuperset: '\u2290',
|
||||
SquareSupersetEqual: '\u2292',
|
||||
SquareUnion: '\u2294',
|
||||
Star: '\u22C6',
|
||||
Subset: '\u22D0',
|
||||
SubsetEqual: '\u2286',
|
||||
Succeeds: '\u227B',
|
||||
SucceedsEqual: '\u2AB0',
|
||||
SucceedsSlantEqual: '\u227D',
|
||||
SucceedsTilde: '\u227F',
|
||||
SuchThat: '\u220B',
|
||||
Sum: '\u2211',
|
||||
Superset: '\u2283',
|
||||
SupersetEqual: '\u2287',
|
||||
Supset: '\u22D1',
|
||||
Therefore: '\u2234',
|
||||
Theta: '\u0398',
|
||||
Tilde: '\u223C',
|
||||
TildeEqual: '\u2243',
|
||||
TildeFullEqual: '\u2245',
|
||||
TildeTilde: '\u2248',
|
||||
UnderBar: '\u005F',
|
||||
UnderBrace: '\u23DF',
|
||||
Union: '\u22C3',
|
||||
UnionPlus: '\u228E',
|
||||
UpArrow: '\u2191',
|
||||
UpDownArrow: '\u2195',
|
||||
UpTee: '\u22A5',
|
||||
Uparrow: '\u21D1',
|
||||
Updownarrow: '\u21D5',
|
||||
Upsilon: '\u03A5',
|
||||
Vdash: '\u22A9',
|
||||
Vee: '\u22C1',
|
||||
VerticalBar: '\u2223',
|
||||
VerticalTilde: '\u2240',
|
||||
Vvdash: '\u22AA',
|
||||
Wedge: '\u22C0',
|
||||
Xi: '\u039E',
|
||||
amp: '\u0026',
|
||||
acute: '\u00B4',
|
||||
aleph: '\u2135',
|
||||
alpha: '\u03B1',
|
||||
amalg: '\u2A3F',
|
||||
and: '\u2227',
|
||||
ang: '\u2220',
|
||||
angmsd: '\u2221',
|
||||
angsph: '\u2222',
|
||||
ape: '\u224A',
|
||||
backprime: '\u2035',
|
||||
backsim: '\u223D',
|
||||
backsimeq: '\u22CD',
|
||||
beta: '\u03B2',
|
||||
beth: '\u2136',
|
||||
between: '\u226C',
|
||||
bigcirc: '\u25EF',
|
||||
bigodot: '\u2A00',
|
||||
bigoplus: '\u2A01',
|
||||
bigotimes: '\u2A02',
|
||||
bigsqcup: '\u2A06',
|
||||
bigstar: '\u2605',
|
||||
bigtriangledown: '\u25BD',
|
||||
bigtriangleup: '\u25B3',
|
||||
biguplus: '\u2A04',
|
||||
blacklozenge: '\u29EB',
|
||||
blacktriangle: '\u25B4',
|
||||
blacktriangledown: '\u25BE',
|
||||
blacktriangleleft: '\u25C2',
|
||||
bowtie: '\u22C8',
|
||||
boxdl: '\u2510',
|
||||
boxdr: '\u250C',
|
||||
boxminus: '\u229F',
|
||||
boxplus: '\u229E',
|
||||
boxtimes: '\u22A0',
|
||||
boxul: '\u2518',
|
||||
boxur: '\u2514',
|
||||
bsol: '\u005C',
|
||||
bull: '\u2022',
|
||||
cap: '\u2229',
|
||||
check: '\u2713',
|
||||
chi: '\u03C7',
|
||||
circ: '\u02C6',
|
||||
circeq: '\u2257',
|
||||
circlearrowleft: '\u21BA',
|
||||
circlearrowright: '\u21BB',
|
||||
circledR: '\u00AE',
|
||||
circledS: '\u24C8',
|
||||
circledast: '\u229B',
|
||||
circledcirc: '\u229A',
|
||||
circleddash: '\u229D',
|
||||
clubs: '\u2663',
|
||||
colon: '\u003A',
|
||||
comp: '\u2201',
|
||||
ctdot: '\u22EF',
|
||||
cuepr: '\u22DE',
|
||||
cuesc: '\u22DF',
|
||||
cularr: '\u21B6',
|
||||
cup: '\u222A',
|
||||
curarr: '\u21B7',
|
||||
curlyvee: '\u22CE',
|
||||
curlywedge: '\u22CF',
|
||||
dagger: '\u2020',
|
||||
daleth: '\u2138',
|
||||
ddarr: '\u21CA',
|
||||
deg: '\u00B0',
|
||||
delta: '\u03B4',
|
||||
digamma: '\u03DD',
|
||||
div: '\u00F7',
|
||||
divideontimes: '\u22C7',
|
||||
dot: '\u02D9',
|
||||
doteqdot: '\u2251',
|
||||
dotplus: '\u2214',
|
||||
dotsquare: '\u22A1',
|
||||
dtdot: '\u22F1',
|
||||
ecir: '\u2256',
|
||||
efDot: '\u2252',
|
||||
egs: '\u2A96',
|
||||
ell: '\u2113',
|
||||
els: '\u2A95',
|
||||
empty: '\u2205',
|
||||
epsi: '\u03B5',
|
||||
epsiv: '\u03F5',
|
||||
erDot: '\u2253',
|
||||
eta: '\u03B7',
|
||||
eth: '\u00F0',
|
||||
flat: '\u266D',
|
||||
fork: '\u22D4',
|
||||
frown: '\u2322',
|
||||
gEl: '\u2A8C',
|
||||
gamma: '\u03B3',
|
||||
gap: '\u2A86',
|
||||
gimel: '\u2137',
|
||||
gnE: '\u2269',
|
||||
gnap: '\u2A8A',
|
||||
gne: '\u2A88',
|
||||
gnsim: '\u22E7',
|
||||
gt: '\u003E',
|
||||
gtdot: '\u22D7',
|
||||
harrw: '\u21AD',
|
||||
hbar: '\u210F',
|
||||
hellip: '\u2026',
|
||||
hookleftarrow: '\u21A9',
|
||||
hookrightarrow: '\u21AA',
|
||||
imath: '\u0131',
|
||||
infin: '\u221E',
|
||||
intcal: '\u22BA',
|
||||
iota: '\u03B9',
|
||||
jmath: '\u0237',
|
||||
kappa: '\u03BA',
|
||||
kappav: '\u03F0',
|
||||
lEg: '\u2A8B',
|
||||
lambda: '\u03BB',
|
||||
lap: '\u2A85',
|
||||
larrlp: '\u21AB',
|
||||
larrtl: '\u21A2',
|
||||
lbrace: '\u007B',
|
||||
lbrack: '\u005B',
|
||||
le: '\u2264',
|
||||
leftleftarrows: '\u21C7',
|
||||
leftthreetimes: '\u22CB',
|
||||
lessdot: '\u22D6',
|
||||
lmoust: '\u23B0',
|
||||
lnE: '\u2268',
|
||||
lnap: '\u2A89',
|
||||
lne: '\u2A87',
|
||||
lnsim: '\u22E6',
|
||||
longmapsto: '\u27FC',
|
||||
looparrowright: '\u21AC',
|
||||
lowast: '\u2217',
|
||||
loz: '\u25CA',
|
||||
lt: '\u003C',
|
||||
ltimes: '\u22C9',
|
||||
ltri: '\u25C3',
|
||||
macr: '\u00AF',
|
||||
malt: '\u2720',
|
||||
mho: '\u2127',
|
||||
mu: '\u03BC',
|
||||
multimap: '\u22B8',
|
||||
nLeftarrow: '\u21CD',
|
||||
nLeftrightarrow: '\u21CE',
|
||||
nRightarrow: '\u21CF',
|
||||
nVDash: '\u22AF',
|
||||
nVdash: '\u22AE',
|
||||
natur: '\u266E',
|
||||
nearr: '\u2197',
|
||||
nharr: '\u21AE',
|
||||
nlarr: '\u219A',
|
||||
not: '\u00AC',
|
||||
nrarr: '\u219B',
|
||||
nu: '\u03BD',
|
||||
nvDash: '\u22AD',
|
||||
nvdash: '\u22AC',
|
||||
nwarr: '\u2196',
|
||||
omega: '\u03C9',
|
||||
omicron: '\u03BF',
|
||||
or: '\u2228',
|
||||
osol: '\u2298',
|
||||
period: '\u002E',
|
||||
phi: '\u03C6',
|
||||
phiv: '\u03D5',
|
||||
pi: '\u03C0',
|
||||
piv: '\u03D6',
|
||||
prap: '\u2AB7',
|
||||
precnapprox: '\u2AB9',
|
||||
precneqq: '\u2AB5',
|
||||
precnsim: '\u22E8',
|
||||
prime: '\u2032',
|
||||
psi: '\u03C8',
|
||||
quot: '\u0022',
|
||||
rarrtl: '\u21A3',
|
||||
rbrace: '\u007D',
|
||||
rbrack: '\u005D',
|
||||
rho: '\u03C1',
|
||||
rhov: '\u03F1',
|
||||
rightrightarrows: '\u21C9',
|
||||
rightthreetimes: '\u22CC',
|
||||
ring: '\u02DA',
|
||||
rmoust: '\u23B1',
|
||||
rtimes: '\u22CA',
|
||||
rtri: '\u25B9',
|
||||
scap: '\u2AB8',
|
||||
scnE: '\u2AB6',
|
||||
scnap: '\u2ABA',
|
||||
scnsim: '\u22E9',
|
||||
sdot: '\u22C5',
|
||||
searr: '\u2198',
|
||||
sect: '\u00A7',
|
||||
sharp: '\u266F',
|
||||
sigma: '\u03C3',
|
||||
sigmav: '\u03C2',
|
||||
simne: '\u2246',
|
||||
smile: '\u2323',
|
||||
spades: '\u2660',
|
||||
sub: '\u2282',
|
||||
subE: '\u2AC5',
|
||||
subnE: '\u2ACB',
|
||||
subne: '\u228A',
|
||||
supE: '\u2AC6',
|
||||
supnE: '\u2ACC',
|
||||
supne: '\u228B',
|
||||
swarr: '\u2199',
|
||||
tau: '\u03C4',
|
||||
theta: '\u03B8',
|
||||
thetav: '\u03D1',
|
||||
tilde: '\u02DC',
|
||||
times: '\u00D7',
|
||||
triangle: '\u25B5',
|
||||
triangleq: '\u225C',
|
||||
upsi: '\u03C5',
|
||||
upuparrows: '\u21C8',
|
||||
veebar: '\u22BB',
|
||||
vellip: '\u22EE',
|
||||
weierp: '\u2118',
|
||||
xi: '\u03BE',
|
||||
yen: '\u00A5',
|
||||
zeta: '\u03B6',
|
||||
zigrarr: '\u21DD',
|
||||
|
||||
//
|
||||
// Needed by TeX input jax
|
||||
nbsp: '\u00A0',
|
||||
rsquo: '\u2019',
|
||||
lsquo: '\u2018'
|
||||
};
|
||||
|
||||
/**
|
||||
* The files that have been loaded
|
||||
*/
|
||||
const loaded: {[name: string]: boolean} = {};
|
||||
|
||||
/**
|
||||
* Used by entity files to add more entities to the table
|
||||
*
|
||||
* @param {EntityList} additions The entities to add
|
||||
* @param {string} file The name of the file that they came from
|
||||
*/
|
||||
export function add(additions: EntityList, file: string) {
|
||||
Object.assign(entities, additions);
|
||||
loaded[file] = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to remove an entity from the list, if needed
|
||||
*
|
||||
* @param {string} entity The name of the entity to remove
|
||||
*/
|
||||
export function remove(entity: string) {
|
||||
delete entities[entity];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} text The text whose entities are to be replaced
|
||||
* @return {string} The text with entries replaced
|
||||
*/
|
||||
export function translate(text: string): string {
|
||||
return text.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/ig, replace);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the unicode character for an entity, if found
|
||||
* If not, loads an entity file to see if it is there (and retries after loading)
|
||||
* Otherwire, returns the original entity string
|
||||
*
|
||||
* @param {string} match The complete entity being replaced
|
||||
* @param {string} entity The name of the entity to be replaced
|
||||
* @return {string} The unicode character for the entity, or the entity name (if none found)
|
||||
*/
|
||||
function replace(match: string, entity: string): string {
|
||||
if (entity.charAt(0) === '#') {
|
||||
return numeric(entity.slice(1));
|
||||
}
|
||||
if (entities[entity]) {
|
||||
return entities[entity];
|
||||
}
|
||||
if (options['loadMissingEntities']) {
|
||||
let file = (entity.match(/^[a-zA-Z](fr|scr|opf)$/) ? RegExp.$1 : entity.charAt(0).toLowerCase());
|
||||
if (!loaded[file]) {
|
||||
loaded[file] = true;
|
||||
retryAfter(asyncLoad('./util/entities/' + file + '.js'));
|
||||
}
|
||||
}
|
||||
return match;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} entity The character code point as a string
|
||||
* @return {string} The character(s) with the given code point
|
||||
*/
|
||||
export function numeric(entity: string): string {
|
||||
let n = (entity.charAt(0) === 'x' ?
|
||||
parseInt(entity.slice(1), 16) :
|
||||
parseInt(entity));
|
||||
return String.fromCodePoint(n);
|
||||
}
|
||||
97
node_modules/mathjax-full/ts/util/FunctionList.ts
generated
vendored
Normal file
97
node_modules/mathjax-full/ts/util/FunctionList.ts
generated
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implement FunctionList object
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
import {PrioritizedList, PrioritizedListItem} from './PrioritizedList.js';
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* The FunctionListItem interface (extends PrioritizedListItem<Function>)
|
||||
*/
|
||||
|
||||
export interface FunctionListItem extends PrioritizedListItem<Function> {}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Implements the FunctionList class (extends PrioritizedList<Function>)
|
||||
*/
|
||||
|
||||
export class FunctionList extends PrioritizedList<Function> {
|
||||
|
||||
/**
|
||||
* Executes the functions in the list (in prioritized order),
|
||||
* passing the given data to the functions. If any return
|
||||
* false, the list is terminated.
|
||||
*
|
||||
* @param {any[]} data The array of arguments to pass to the functions
|
||||
* @return {boolean} False if any function stopped the list by
|
||||
* returning false, true otherwise
|
||||
*/
|
||||
public execute(...data: any[]): boolean {
|
||||
for (const item of this) {
|
||||
let result = item.item(...data);
|
||||
if (result === false) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the functions in the list (in prioritized order) asynchronously,
|
||||
* passing the given data to the functions, and doing the next function
|
||||
* only when the previous one completes. If the function returns a
|
||||
* Promise, then use that to control the flow. Otherwise, if the
|
||||
* function returns false, the list is terminated.
|
||||
* This function returns a Promise. If any function in the list fails,
|
||||
* the promise fails. If any function returns false, the promise
|
||||
* succeeds, but passes false as its argument. Otherwise it succeeds
|
||||
* and passes true.
|
||||
*
|
||||
* @param {any[]} data The array of arguments to pass to the functions
|
||||
* @return {Promise} The promise that is satisfied when the function
|
||||
* list completes (with argument true or false
|
||||
* depending on whether some function returned
|
||||
* false or not).
|
||||
*/
|
||||
public asyncExecute(...data: any[]): Promise<void> {
|
||||
let i = -1;
|
||||
let items = this.items;
|
||||
return new Promise((ok: Function, fail: Function) => {
|
||||
(function execute() {
|
||||
while (++i < items.length) {
|
||||
let result = items[i].item(...data);
|
||||
if (result instanceof Promise) {
|
||||
result.then(execute).catch(err => fail(err));
|
||||
return;
|
||||
}
|
||||
if (result === false) {
|
||||
ok(false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
ok(true);
|
||||
})();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
353
node_modules/mathjax-full/ts/util/LinkedList.ts
generated
vendored
Normal file
353
node_modules/mathjax-full/ts/util/LinkedList.ts
generated
vendored
Normal file
@@ -0,0 +1,353 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implement a generic LinkedList object.
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* A symbol used to mark the special node used to indicate
|
||||
* the start and end of the list.
|
||||
*/
|
||||
export const END = Symbol();
|
||||
|
||||
/**
|
||||
* Shorthand type for the functions used to sort the data items
|
||||
*
|
||||
* @template DataClass The type of data stored in the list
|
||||
*/
|
||||
export type SortFn<DataClass> = (a: DataClass, b: DataClass) => boolean;
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* The ListItem interface (for a specific type of data item)
|
||||
*
|
||||
* These are the items in the doubly-linked list.
|
||||
*
|
||||
* @template DataClass The type of data stored in the list
|
||||
*/
|
||||
|
||||
export class ListItem<DataClass> {
|
||||
/**
|
||||
* The data for the list item
|
||||
*/
|
||||
public data: DataClass | symbol;
|
||||
|
||||
/**
|
||||
* Pointers to the next item in the list
|
||||
*/
|
||||
public next: ListItem<DataClass> = null;
|
||||
/**
|
||||
* Pointers to the previous item in the list
|
||||
*/
|
||||
public prev: ListItem<DataClass> = null;
|
||||
|
||||
/**
|
||||
* @param {any} data The data to be stored in the list item
|
||||
* @constructor
|
||||
*/
|
||||
constructor(data: any = null) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Implements the generic LinkedList class
|
||||
*
|
||||
* @template DataClass The type of data stored in the list
|
||||
*/
|
||||
|
||||
export class LinkedList<DataClass> {
|
||||
/**
|
||||
* The linked list
|
||||
*/
|
||||
protected list: ListItem<DataClass>;
|
||||
|
||||
/**
|
||||
* This.list is a special ListItem whose next property
|
||||
* points to the head of the list and whose prev
|
||||
* property points to the tail. This lets us relink
|
||||
* the head and tail items in the same way as any other
|
||||
* item in the list, without having to handle special
|
||||
* cases.
|
||||
*
|
||||
* @param {DataClass[]} args The data items that form the initial list
|
||||
* @constructor
|
||||
*/
|
||||
constructor(...args: DataClass[]) {
|
||||
this.list = new ListItem<DataClass>(END);
|
||||
this.list.next = this.list.prev = this.list;
|
||||
this.push(...args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used for sorting and merging lists (Overridden by subclasses)
|
||||
*
|
||||
* @param {DataClass} a The first item to compare
|
||||
* @param {DataClass} b The second item to compare
|
||||
* @return {boolean} True if a is before b, false otherwise
|
||||
*/
|
||||
public isBefore(a: DataClass, b: DataClass): boolean {
|
||||
return a < b;
|
||||
}
|
||||
|
||||
/**
|
||||
* Push items on the end of the list
|
||||
*
|
||||
* @param {DataClass[]} args The list of data items to be pushed
|
||||
* @return {LinkedList} The LinkedList object (for chaining)
|
||||
*/
|
||||
public push(...args: DataClass[]): LinkedList<DataClass> {
|
||||
for (const data of args) {
|
||||
let item = new ListItem<DataClass>(data);
|
||||
item.next = this.list;
|
||||
item.prev = this.list.prev;
|
||||
this.list.prev = item;
|
||||
item.prev.next = item;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Pop the end item off the list and return its data
|
||||
*
|
||||
* @return {DataClass} The data from the last item in the list
|
||||
*/
|
||||
public pop(): DataClass {
|
||||
let item = this.list.prev;
|
||||
if (item.data === END) {
|
||||
return null;
|
||||
}
|
||||
this.list.prev = item.prev;
|
||||
item.prev.next = this.list;
|
||||
item.next = item.prev = null;
|
||||
return item.data as DataClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Push items at the head of the list
|
||||
*
|
||||
* @param {DataClass[]} args The list of data items to inserted
|
||||
* @return {LinkedList} The LinkedList object (for chaining)
|
||||
*/
|
||||
public unshift(...args: DataClass[]): LinkedList<DataClass> {
|
||||
for (const data of args.slice(0).reverse()) {
|
||||
let item = new ListItem<DataClass>(data);
|
||||
item.next = this.list.next;
|
||||
item.prev = this.list;
|
||||
this.list.next = item;
|
||||
item.next.prev = item;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the head of the list and return its data
|
||||
*
|
||||
* @return {DataClass} The data from the first item in the list
|
||||
*/
|
||||
public shift(): DataClass {
|
||||
let item = this.list.next;
|
||||
if (item.data === END) {
|
||||
return null;
|
||||
}
|
||||
this.list.next = item.next;
|
||||
item.next.prev = this.list;
|
||||
item.next = item.prev = null;
|
||||
return item.data as DataClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove items from the list
|
||||
*
|
||||
* @param {DataClass[]} items The items to remove
|
||||
*/
|
||||
public remove(...items: DataClass[]) {
|
||||
const map = new Map<DataClass, boolean>();
|
||||
for (const item of items) {
|
||||
map.set(item, true);
|
||||
}
|
||||
let item = this.list.next;
|
||||
while (item.data !== END) {
|
||||
const next = item.next;
|
||||
if (map.has(item.data as DataClass)) {
|
||||
item.prev.next = item.next;
|
||||
item.next.prev = item.prev;
|
||||
item.next = item.prev = null;
|
||||
}
|
||||
item = next;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Empty the list
|
||||
*
|
||||
* @return {LinkedList} The LinkedList object (for chaining)
|
||||
*/
|
||||
public clear(): LinkedList<DataClass> {
|
||||
this.list.next.prev = this.list.prev.next = null;
|
||||
this.list.next = this.list.prev = this.list;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* An iterator for the list in forward order
|
||||
*
|
||||
* @yield {DataClass} The next item in the iteration sequence
|
||||
*/
|
||||
public *[Symbol.iterator](): IterableIterator<DataClass> {
|
||||
let current = this.list.next;
|
||||
|
||||
while (current.data !== END) {
|
||||
yield current.data as DataClass;
|
||||
current = current.next;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An iterator for the list in reverse order
|
||||
*
|
||||
* @yield {DataClass} The previous item in the iteration sequence
|
||||
*/
|
||||
public *reversed(): IterableIterator<DataClass> {
|
||||
let current = this.list.prev;
|
||||
|
||||
while (current.data !== END) {
|
||||
yield current.data as DataClass;
|
||||
current = current.prev;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a new item into a sorted list in the correct locations
|
||||
*
|
||||
* @param {DataClass} data The data item to add
|
||||
* @param {SortFn} isBefore The function used to order the data
|
||||
* @param {LinkedList} The LinkedList object (for chaining)
|
||||
*/
|
||||
public insert(data: DataClass, isBefore: SortFn<DataClass> = null) {
|
||||
if (isBefore === null) {
|
||||
isBefore = this.isBefore.bind(this);
|
||||
}
|
||||
let item = new ListItem<DataClass>(data);
|
||||
let cur = this.list.next;
|
||||
while (cur.data !== END && isBefore(cur.data as DataClass, item.data as DataClass)) {
|
||||
cur = cur.next;
|
||||
}
|
||||
item.prev = cur.prev;
|
||||
item.next = cur;
|
||||
cur.prev.next = cur.prev = item;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort the list using an optional sort function
|
||||
*
|
||||
* @param {SortFn} isBefore The function used to order the data
|
||||
* @return {LinkedList} The LinkedList object (for chaining)
|
||||
*/
|
||||
public sort(isBefore: SortFn<DataClass> = null): LinkedList<DataClass> {
|
||||
if (isBefore === null) {
|
||||
isBefore = this.isBefore.bind(this);
|
||||
}
|
||||
//
|
||||
// Make an array of singleton lists
|
||||
//
|
||||
let lists: LinkedList<DataClass>[] = [];
|
||||
for (const item of this) {
|
||||
lists.push(new LinkedList<DataClass>(item as DataClass));
|
||||
}
|
||||
//
|
||||
// Clear current list
|
||||
//
|
||||
this.list.next = this.list.prev = this.list;
|
||||
//
|
||||
// Merge pairs of lists until there is only one left
|
||||
//
|
||||
while (lists.length > 1) {
|
||||
let l1 = lists.shift();
|
||||
let l2 = lists.shift();
|
||||
l1.merge(l2, isBefore);
|
||||
lists.push(l1);
|
||||
}
|
||||
//
|
||||
// Use the final list as our list
|
||||
//
|
||||
if (lists.length) {
|
||||
this.list = lists[0].list;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge a sorted list with another sorted list
|
||||
*
|
||||
* @param {LinkedList} list The list to merge into this instance's list
|
||||
* @param {SortFn} isBefore The function used to order the data
|
||||
* @return {LinkedList} The LinkedList instance (for chaining)
|
||||
*/
|
||||
public merge(list: LinkedList<DataClass>, isBefore: SortFn<DataClass> = null): LinkedList<DataClass> {
|
||||
if (isBefore === null) {
|
||||
isBefore = this.isBefore.bind(this);
|
||||
}
|
||||
//
|
||||
// Get the head of each list
|
||||
//
|
||||
let lcur = this.list.next;
|
||||
let mcur = list.list.next;
|
||||
//
|
||||
// While there is more in both lists
|
||||
//
|
||||
while (lcur.data !== END && mcur.data !== END) {
|
||||
//
|
||||
// If the merge item is before the list item
|
||||
// (we have found where the head of the merge list belongs)
|
||||
// Link the merge list into the main list at this point
|
||||
// and make the merge list be the remainder of the original list.
|
||||
// The merge continues by looking for where the rest of the original
|
||||
// list fits into the newly formed main list (the old merge list).
|
||||
// Otherwise
|
||||
// Go on to the next item in the main list
|
||||
//
|
||||
if (isBefore(mcur.data as DataClass, lcur.data as DataClass)) {
|
||||
[mcur.prev.next, lcur.prev.next] = [lcur, mcur];
|
||||
[mcur.prev, lcur.prev] = [lcur.prev, mcur.prev];
|
||||
[this.list.prev.next, list.list.prev.next] = [list.list, this.list];
|
||||
[this.list.prev, list.list.prev] = [list.list.prev, this.list.prev];
|
||||
[lcur, mcur] = [mcur.next, lcur];
|
||||
} else {
|
||||
lcur = lcur.next;
|
||||
}
|
||||
}
|
||||
//
|
||||
// If there is more to be merged (i.e., we came to the end of the main list),
|
||||
// then link that at the end of the main list.
|
||||
//
|
||||
if (mcur.data !== END) {
|
||||
this.list.prev.next = list.list.next;
|
||||
list.list.next.prev = this.list.prev;
|
||||
list.list.prev.next = this.list;
|
||||
this.list.prev = list.list.prev;
|
||||
list.list.next = list.list.prev = list.list;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
}
|
||||
363
node_modules/mathjax-full/ts/util/Options.ts
generated
vendored
Normal file
363
node_modules/mathjax-full/ts/util/Options.ts
generated
vendored
Normal file
@@ -0,0 +1,363 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements functions for handling option lists
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/* tslint:disable-next-line:jsdoc-require */
|
||||
const OBJECT = {}.constructor;
|
||||
|
||||
/**
|
||||
* Check if an object is an object literal (as opposed to an instance of a class)
|
||||
*/
|
||||
export function isObject(obj: any) {
|
||||
return typeof obj === 'object' && obj !== null &&
|
||||
(obj.constructor === OBJECT || obj.constructor === Expandable);
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Generic list of options
|
||||
*/
|
||||
export type OptionList = {[name: string]: any};
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Used to append an array to an array in default options
|
||||
* E.g., an option of the form
|
||||
*
|
||||
* {
|
||||
* name: {[APPEND]: [1, 2, 3]}
|
||||
* }
|
||||
*
|
||||
* where 'name' is an array in the default options would end up with name having its
|
||||
* original value with 1, 2, and 3 appended.
|
||||
*/
|
||||
export const APPEND = '[+]';
|
||||
|
||||
/**
|
||||
* Used to remove elements from an array in default options
|
||||
* E.g., an option of the form
|
||||
*
|
||||
* {
|
||||
* name: {[REMOVE]: [2]}
|
||||
* }
|
||||
*
|
||||
* where 'name' is an array in the default options would end up with name having its
|
||||
* original value but with any entry of 2 removed So if the original value was [1, 2, 3, 2],
|
||||
* then the final value will be [1, 3] instead.
|
||||
*/
|
||||
export const REMOVE = '[-]';
|
||||
|
||||
|
||||
/**
|
||||
* Provides options for the option utlities.
|
||||
*/
|
||||
export const OPTIONS = {
|
||||
invalidOption: 'warn' as ('fatal' | 'warn'),
|
||||
/**
|
||||
* Function to report messages for invalid options
|
||||
*
|
||||
* @param {string} message The message for the invalid parameter.
|
||||
* @param {string} key The invalid key itself.
|
||||
*/
|
||||
optionError: (message: string, _key: string) => {
|
||||
if (OPTIONS.invalidOption === 'fatal') {
|
||||
throw new Error(message);
|
||||
}
|
||||
console.warn('MathJax: ' + message);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* A Class to use for options that should not produce warnings if an undefined key is used
|
||||
*/
|
||||
export class Expandable {}
|
||||
|
||||
/**
|
||||
* Produces an instance of Expandable with the given values (to be used in defining options
|
||||
* that can use keys that don't have default values). E.g., default options of the form:
|
||||
*
|
||||
* OPTIONS = {
|
||||
* types: expandable({
|
||||
* a: 1,
|
||||
* b: 2
|
||||
* })
|
||||
* }
|
||||
*
|
||||
* would allow user options of
|
||||
*
|
||||
* {
|
||||
* types: {
|
||||
* c: 3
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* without reporting an error.
|
||||
*/
|
||||
export function expandable(def: OptionList) {
|
||||
return Object.assign(Object.create(Expandable.prototype), def);
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Make sure an option is an Array
|
||||
*/
|
||||
export function makeArray(x: any): any[] {
|
||||
return Array.isArray(x) ? x : [x];
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Get all keys and symbols from an object
|
||||
*
|
||||
* @param {Optionlist} def The object whose keys are to be returned
|
||||
* @return {(string | symbol)[]} The list of keys for the object
|
||||
*/
|
||||
export function keys(def: OptionList): (string | symbol)[] {
|
||||
if (!def) {
|
||||
return [];
|
||||
}
|
||||
return (Object.keys(def) as (string | symbol)[]).concat(Object.getOwnPropertySymbols(def));
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Make a deep copy of an object
|
||||
*
|
||||
* @param {OptionList} def The object to be copied
|
||||
* @return {OptionList} The copy of the object
|
||||
*/
|
||||
export function copy(def: OptionList): OptionList {
|
||||
let props: OptionList = {};
|
||||
for (const key of keys(def)) {
|
||||
let prop = Object.getOwnPropertyDescriptor(def, key);
|
||||
let value = prop.value;
|
||||
if (Array.isArray(value)) {
|
||||
prop.value = insert([], value, false);
|
||||
} else if (isObject(value)) {
|
||||
prop.value = copy(value);
|
||||
}
|
||||
if (prop.enumerable) {
|
||||
props[key as string] = prop;
|
||||
}
|
||||
}
|
||||
return Object.defineProperties(def.constructor === Expandable ? expandable({}) : {}, props);
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Insert one object into another (with optional warnings about
|
||||
* keys that aren't in the original)
|
||||
*
|
||||
* @param {OptionList} dst The option list to merge into
|
||||
* @param {OptionList} src The options to be merged
|
||||
* @param {boolean} warn True if a warning should be issued for a src option that isn't already in dst
|
||||
* @return {OptionList} The modified destination option list (dst)
|
||||
*/
|
||||
export function insert(dst: OptionList, src: OptionList, warn: boolean = true): OptionList {
|
||||
for (let key of keys(src) as string[]) {
|
||||
//
|
||||
// Check if the key is valid (i.e., is in the defaults or in an expandable block)
|
||||
//
|
||||
if (warn && dst[key] === undefined && dst.constructor !== Expandable) {
|
||||
if (typeof key === 'symbol') {
|
||||
key = (key as symbol).toString();
|
||||
}
|
||||
OPTIONS.optionError(`Invalid option "${key}" (no default value).`, key);
|
||||
continue;
|
||||
}
|
||||
//
|
||||
// Shorthands for the source and destination values
|
||||
//
|
||||
let sval = src[key], dval = dst[key];
|
||||
//
|
||||
// If the source is an object literal and the destination exists and is either an
|
||||
// object or a function (so can have properties added to it)...
|
||||
//
|
||||
if (isObject(sval) && dval !== null &&
|
||||
(typeof dval === 'object' || typeof dval === 'function')) {
|
||||
const ids = keys(sval);
|
||||
//
|
||||
// Check for APPEND or REMOVE objects:
|
||||
//
|
||||
if (
|
||||
//
|
||||
// If the destination value is an array...
|
||||
//
|
||||
Array.isArray(dval) &&
|
||||
(
|
||||
//
|
||||
// If there is only one key and it is APPEND or REMOVE and the keys value is an array...
|
||||
//
|
||||
(ids.length === 1 && (ids[0] === APPEND || ids[0] === REMOVE) && Array.isArray(sval[ids[0]])) ||
|
||||
//
|
||||
// Or if there are two keys and they are APPEND and REMOVE and both keys' values
|
||||
// are arrays...
|
||||
//
|
||||
(ids.length === 2 && ids.sort().join(',') === APPEND + ',' + REMOVE &&
|
||||
Array.isArray(sval[APPEND]) && Array.isArray(sval[REMOVE]))
|
||||
)
|
||||
) {
|
||||
//
|
||||
// Then remove any values to be removed
|
||||
//
|
||||
if (sval[REMOVE]) {
|
||||
dval = dst[key] = dval.filter(x => sval[REMOVE].indexOf(x) < 0);
|
||||
}
|
||||
//
|
||||
// And append any values to be added (make a copy so as not to modify the original)
|
||||
//
|
||||
if (sval[APPEND]) {
|
||||
dst[key] = [...dval, ...sval[APPEND]];
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Otherwise insert the values of the source object into the destination object
|
||||
//
|
||||
insert(dval, sval, warn);
|
||||
}
|
||||
} else if (Array.isArray(sval)) {
|
||||
//
|
||||
// If the source is an array, replace the destination with an empty array
|
||||
// and copy the source values into it.
|
||||
//
|
||||
dst[key] = [];
|
||||
insert(dst[key], sval, false);
|
||||
} else if (isObject(sval)) {
|
||||
//
|
||||
// If the source is an object literal, set the destination to a copy of it
|
||||
//
|
||||
dst[key] = copy(sval);
|
||||
} else {
|
||||
//
|
||||
// Otherwise set the destination to the source value
|
||||
//
|
||||
dst[key] = sval;
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Merge options without warnings (so we can add new default values into an
|
||||
* existing default list)
|
||||
*
|
||||
* @param {OptionList} options The option list to be merged into
|
||||
* @param {OptionList[]} defs The option lists to merge into the first one
|
||||
* @return {OptionList} The modified options list
|
||||
*/
|
||||
export function defaultOptions(options: OptionList, ...defs: OptionList[]): OptionList {
|
||||
defs.forEach(def => insert(options, def, false));
|
||||
return options;
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Merge options with warnings about undefined ones (so we can merge
|
||||
* user options into the default list)
|
||||
*
|
||||
* @param {OptionList} options The option list to be merged into
|
||||
* @param {OptionList[]} defs The option lists to merge into the first one
|
||||
* @return {OptionList} The modified options list
|
||||
*/
|
||||
export function userOptions(options: OptionList, ...defs: OptionList[]): OptionList {
|
||||
defs.forEach(def => insert(options, def, true));
|
||||
return options;
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Select a subset of options by key name
|
||||
*
|
||||
* @param {OptionList} options The option list from which option values will be taken
|
||||
* @param {string[]} keys The names of the options to extract
|
||||
* @return {OptionList} The option list consisting of only the ones whose keys were given
|
||||
*/
|
||||
export function selectOptions(options: OptionList, ...keys: string[]): OptionList {
|
||||
let subset: OptionList = {};
|
||||
for (const key of keys) {
|
||||
if (options.hasOwnProperty(key)) {
|
||||
subset[key] = options[key];
|
||||
}
|
||||
}
|
||||
return subset;
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Select a subset of options by keys from an object
|
||||
*
|
||||
* @param {OptionList} options The option list from which the option values will be taken
|
||||
* @param {OptionList} object The option list whose keys will be used to select the options
|
||||
* @return {OptionList} The option list consisting of the option values from the first
|
||||
* list whose keys are those from the second list.
|
||||
*/
|
||||
export function selectOptionsFromKeys(options: OptionList, object: OptionList): OptionList {
|
||||
return selectOptions(options, ...Object.keys(object));
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Separate options into sets: the ones having the same keys
|
||||
* as the second object, the third object, etc, and the ones that don't.
|
||||
* (Used to separate an option list into the options needed for several
|
||||
* subobjects.)
|
||||
*
|
||||
* @param {OptionList} options The option list to be split into parts
|
||||
* @param {OptionList[]} objects The list of option lists whose keys are used to break up
|
||||
* the original options into separate pieces.
|
||||
* @return {OptionList[]} The option lists taken from the original based on the
|
||||
* keys of the other objects. The first one in the list
|
||||
* consists of the values not appearing in any of the others
|
||||
* (i.e., whose keys were not in any of the others).
|
||||
*/
|
||||
export function separateOptions(options: OptionList, ...objects: OptionList[]): OptionList[] {
|
||||
let results: OptionList[] = [];
|
||||
for (const object of objects) {
|
||||
let exists: OptionList = {}, missing: OptionList = {};
|
||||
for (const key of Object.keys(options || {})) {
|
||||
(object[key] === undefined ? missing : exists)[key] = options[key];
|
||||
}
|
||||
results.push(exists);
|
||||
options = missing;
|
||||
}
|
||||
results.unshift(options);
|
||||
return results;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Look up a value from object literal, being sure it is an
|
||||
* actual property (not inherited), with a default if not found.
|
||||
*
|
||||
* @param {string} name The name of the key to look up.
|
||||
* @param {OptionList} lookup The list of options to check.
|
||||
* @param {any} def The default value if the key isn't found.
|
||||
*/
|
||||
export function lookup(name: string, lookup: OptionList, def: any = null) {
|
||||
return (lookup.hasOwnProperty(name) ? lookup[name] : def);
|
||||
}
|
||||
|
||||
116
node_modules/mathjax-full/ts/util/PrioritizedList.ts
generated
vendored
Normal file
116
node_modules/mathjax-full/ts/util/PrioritizedList.ts
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements a list sorted by a numeric priority
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* The PrioritizedListItem<DataClass> interface
|
||||
*
|
||||
* @template DataClass The class of data stored in the item
|
||||
*/
|
||||
|
||||
export interface PrioritizedListItem<DataClass> {
|
||||
|
||||
/**
|
||||
* The priority of this item
|
||||
*/
|
||||
priority: number;
|
||||
|
||||
/**
|
||||
* The data for the list item
|
||||
*/
|
||||
item: DataClass;
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Implements the PrioritizedList<DataClass> class
|
||||
*
|
||||
* @template DataClass The class of data stored in the list
|
||||
*/
|
||||
|
||||
export class PrioritizedList<DataClass> {
|
||||
|
||||
/**
|
||||
* The default priority for items added to the list
|
||||
*/
|
||||
public static DEFAULTPRIORITY: number = 5;
|
||||
|
||||
/**
|
||||
* The list of items, sorted by priority (smallest number first)
|
||||
*/
|
||||
protected items: PrioritizedListItem<DataClass>[] = [];
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
constructor() {
|
||||
this.items = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the list iterable, and return the data for the items in the list
|
||||
*
|
||||
* @return {{next: Function}} The object containing the iterator's next() function
|
||||
*/
|
||||
public [Symbol.iterator](): Iterator<PrioritizedListItem<DataClass>> {
|
||||
let i = 0;
|
||||
let items = this.items;
|
||||
return {
|
||||
/* tslint:disable-next-line:jsdoc-require */
|
||||
next(): IteratorResult<PrioritizedListItem<DataClass>> {
|
||||
return {value: items[i++], done: (i > items.length)};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Add an item to the list
|
||||
*
|
||||
* @param {DataClass} item The data for the item to be added
|
||||
* @param {number} priority The priority for the item
|
||||
* @return {DataClass} The data itself
|
||||
*/
|
||||
public add(item: DataClass, priority: number = PrioritizedList.DEFAULTPRIORITY): DataClass {
|
||||
let i = this.items.length;
|
||||
do {
|
||||
i--;
|
||||
} while (i >= 0 && priority < this.items[i].priority);
|
||||
this.items.splice(i + 1, 0, {item: item, priority: priority});
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the list
|
||||
*
|
||||
* @param {DataClass} item The data for the item to be removed
|
||||
*/
|
||||
public remove(item: DataClass) {
|
||||
let i = this.items.length;
|
||||
do {
|
||||
i--;
|
||||
} while (i >= 0 && this.items[i].item !== item);
|
||||
if (i >= 0) {
|
||||
this.items.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
102
node_modules/mathjax-full/ts/util/Retries.ts
generated
vendored
Normal file
102
node_modules/mathjax-full/ts/util/Retries.ts
generated
vendored
Normal file
@@ -0,0 +1,102 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements methods for handling asynchronous actions
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/*
|
||||
* The legacy MathJax object (FIXME: remove this after all v2 code is gone)
|
||||
*/
|
||||
|
||||
declare var MathJax: {Callback: {After: Function}};
|
||||
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Allow us to pass a promise as part of an Error object
|
||||
*/
|
||||
|
||||
export interface RetryError extends Error {
|
||||
retry: Promise<any>;
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* A wrapper for actions that may be asynchronous. This will
|
||||
* rerun the action after the asychronous action completes.
|
||||
* Usually, this is for dynamic loading of files. Legacy
|
||||
* MathJax does that a lot, so we still need it for now, but
|
||||
* may be able to go without it in the future.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* HandleRetriesFor(() => {
|
||||
*
|
||||
* html.findMath()
|
||||
* .compile()
|
||||
* .getMetrics()
|
||||
* .typeset()
|
||||
* .updateDocument();
|
||||
*
|
||||
* }).catch(err => {
|
||||
* console.log(err.message);
|
||||
* });
|
||||
*
|
||||
* @param {Function} code The code to run that might cause retries
|
||||
* @return {Promise} A promise that is satisfied when the code
|
||||
* runs completely, and fails if the code
|
||||
* generates an error (that is not a retry).
|
||||
*/
|
||||
|
||||
export function handleRetriesFor(code: Function): Promise<any> {
|
||||
return new Promise(function run(ok: Function, fail: Function) {
|
||||
try {
|
||||
ok(code());
|
||||
} catch (err) {
|
||||
if (err.retry && err.retry instanceof Promise) {
|
||||
err.retry.then(() => run(ok, fail))
|
||||
.catch((perr: Error) => fail(perr));
|
||||
} else if (err.restart && err.restart.isCallback) {
|
||||
// FIXME: Remove this branch when all legacy code is gone
|
||||
MathJax.Callback.After(() => run(ok, fail), err.restart);
|
||||
} else {
|
||||
fail(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
/**
|
||||
* Tells HandleRetriesFor() to wait for this promise to be fulfilled
|
||||
* before rerunning the code. Causes an error to be thrown, so
|
||||
* calling this terminates the code at that point.
|
||||
*
|
||||
* @param {Promise} promise The promise that must be satisfied before
|
||||
* actions will continue
|
||||
*/
|
||||
|
||||
export function retryAfter(promise: Promise<any>) {
|
||||
let err = new Error('MathJax retry') as RetryError;
|
||||
err.retry = promise;
|
||||
throw err;
|
||||
}
|
||||
127
node_modules/mathjax-full/ts/util/StyleList.ts
generated
vendored
Normal file
127
node_modules/mathjax-full/ts/util/StyleList.ts
generated
vendored
Normal file
@@ -0,0 +1,127 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements the CssStyles class for handling stylesheets
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
/**
|
||||
* The data for a selector
|
||||
*/
|
||||
export type StyleData = {
|
||||
[property: string]: string | number;
|
||||
};
|
||||
|
||||
/**
|
||||
* A list of selectors and their data (basically a stylesheet)
|
||||
*/
|
||||
export type StyleList = {
|
||||
[selector: string]: StyleData;
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* The CssStyles class (for managing a collection of CSS style definitions)
|
||||
*/
|
||||
|
||||
export class CssStyles {
|
||||
/**
|
||||
* The styles as they currently stand
|
||||
*/
|
||||
protected styles: StyleList = {};
|
||||
|
||||
/**
|
||||
* @return {string} The styles as a CSS string
|
||||
*/
|
||||
get cssText(): string {
|
||||
return this.getStyleString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {StyleList} styles The initial styles to use, if any
|
||||
* @constructor
|
||||
*/
|
||||
constructor(styles: StyleList = null) {
|
||||
this.addStyles(styles);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {StyleList} styles The styles to combine with the existing ones
|
||||
*/
|
||||
public addStyles(styles: StyleList) {
|
||||
if (!styles) return;
|
||||
for (const style of Object.keys(styles)) {
|
||||
if (!this.styles[style]) {
|
||||
this.styles[style] = {};
|
||||
}
|
||||
Object.assign(this.styles[style], styles[style]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string[]} selectors The selectors for the styles to remove
|
||||
*/
|
||||
public removeStyles(...selectors: string[]) {
|
||||
for (const selector of selectors) {
|
||||
delete this.styles[selector];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear all the styles
|
||||
*/
|
||||
public clear() {
|
||||
this.styles = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {string} The CSS string for the style list
|
||||
*/
|
||||
public getStyleString(): string {
|
||||
return this.getStyleRules().join('\n\n');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {string[]} An array of rule strings for the style list
|
||||
*/
|
||||
public getStyleRules(): string[] {
|
||||
const selectors = Object.keys(this.styles);
|
||||
const defs: string[] = new Array(selectors.length);
|
||||
let i = 0;
|
||||
for (const selector of selectors) {
|
||||
defs[i++] = selector + ' {\n' + this.getStyleDefString(this.styles[selector]) + '\n}';
|
||||
}
|
||||
return defs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {StyleData} styles The style data to be stringified
|
||||
* @return {string} The CSS string for the given data
|
||||
*/
|
||||
public getStyleDefString(styles: StyleData): string {
|
||||
const properties = Object.keys(styles);
|
||||
const values: string[] = new Array(properties.length);
|
||||
let i = 0;
|
||||
for (const property of properties) {
|
||||
values[i++] = ' ' + property + ': ' + styles[property] + ';';
|
||||
}
|
||||
return values.join('\n');
|
||||
}
|
||||
|
||||
}
|
||||
524
node_modules/mathjax-full/ts/util/Styles.ts
generated
vendored
Normal file
524
node_modules/mathjax-full/ts/util/Styles.ts
generated
vendored
Normal file
@@ -0,0 +1,524 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2018-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements a lite CssStyleDeclaration replacement
|
||||
* (very limited in scope)
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
/**
|
||||
* An object contining name: value pairs
|
||||
*/
|
||||
export type StyleList = {[name: string]: string};
|
||||
|
||||
/**
|
||||
* Data for how to map a combined style (like border) to its children
|
||||
*/
|
||||
export type connection = {
|
||||
children: string[], // suffix names to add to the base name
|
||||
split: (name: string) => void, // function to split the value for the children
|
||||
combine: (name: string) => void // function to combine the child values when one changes
|
||||
};
|
||||
|
||||
/**
|
||||
* A collection of connections
|
||||
*/
|
||||
export type connections = {[name: string]: connection};
|
||||
|
||||
/*********************************************************/
|
||||
/**
|
||||
* Some common children arrays
|
||||
*/
|
||||
const TRBL = ['top', 'right', 'bottom', 'left'];
|
||||
const WSC = ['width', 'style', 'color'];
|
||||
|
||||
/**
|
||||
* Split a style at spaces (taking quotation marks and commas into account)
|
||||
*
|
||||
* @param {string} text The combined styles to be split at spaces
|
||||
* @return {string[]} Array of parts of the style (separated by spaces)
|
||||
*/
|
||||
function splitSpaces(text: string): string[] {
|
||||
const parts = text.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g);
|
||||
const split = [] as string[];
|
||||
while (parts.length > 1) {
|
||||
parts.shift();
|
||||
split.push(parts.shift());
|
||||
}
|
||||
return split;
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/**
|
||||
* Split a top-right-bottom-left group into its parts
|
||||
* Format:
|
||||
* x all are the same value
|
||||
* x y same as x y x y
|
||||
* x y z same as x y z y
|
||||
* x y z w each specified
|
||||
*
|
||||
* @param {string} name The style to be processed
|
||||
*/
|
||||
|
||||
function splitTRBL(name: string) {
|
||||
const parts = splitSpaces(this.styles[name]);
|
||||
if (parts.length === 0) {
|
||||
parts.push('');
|
||||
}
|
||||
if (parts.length === 1) {
|
||||
parts.push(parts[0]);
|
||||
}
|
||||
if (parts.length === 2) {
|
||||
parts.push(parts[0]);
|
||||
}
|
||||
if (parts.length === 3) {
|
||||
parts.push(parts[1]);
|
||||
}
|
||||
for (const child of Styles.connect[name].children) {
|
||||
this.setStyle(this.childName(name, child), parts.shift());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine top-right-bottom-left into one entry
|
||||
* (removing unneeded values)
|
||||
*
|
||||
* @param {string} name The style to be processed
|
||||
*/
|
||||
function combineTRBL(name: string) {
|
||||
const children = Styles.connect[name].children;
|
||||
const parts = [] as string[];
|
||||
for (const child of children) {
|
||||
const part = this.styles[name + '-' + child];
|
||||
if (!part) {
|
||||
delete this.styles[name];
|
||||
return;
|
||||
}
|
||||
parts.push(part);
|
||||
}
|
||||
if (parts[3] === parts[1]) {
|
||||
parts.pop();
|
||||
if (parts[2] === parts[0]) {
|
||||
parts.pop();
|
||||
if (parts[1] === parts[0]) {
|
||||
parts.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
this.styles[name] = parts.join(' ');
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/**
|
||||
* Use the same value for all children
|
||||
*
|
||||
* @param {string} name The style to be processed
|
||||
*/
|
||||
function splitSame(name: string) {
|
||||
for (const child of Styles.connect[name].children) {
|
||||
this.setStyle(this.childName(name, child), this.styles[name]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that all children have the same values and
|
||||
* if so, set the parent to that value
|
||||
*
|
||||
* @param {string} name The style to be processed
|
||||
*/
|
||||
function combineSame(name: string) {
|
||||
const children = [...Styles.connect[name].children];
|
||||
const value = this.styles[this.childName(name, children.shift())];
|
||||
for (const child of children) {
|
||||
if (this.styles[this.childName(name, child)] !== value) {
|
||||
delete this.styles[name];
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.styles[name] = value;
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/**
|
||||
* Patterns for the parts of a boarder
|
||||
*/
|
||||
const BORDER: {[name: string]: RegExp} = {
|
||||
width: /^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,
|
||||
style: /^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/
|
||||
};
|
||||
|
||||
/**
|
||||
* Split a width-style-color border definition
|
||||
*
|
||||
* @param {string} name The style to be processed
|
||||
*/
|
||||
function splitWSC(name: string) {
|
||||
let parts = {width: '', style: '', color: ''} as StyleList;
|
||||
for (const part of splitSpaces(this.styles[name])) {
|
||||
if (part.match(BORDER.width) && parts.width === '') {
|
||||
parts.width = part;
|
||||
} else if (part.match(BORDER.style) && parts.style === '') {
|
||||
parts.style = part;
|
||||
} else {
|
||||
parts.color = part;
|
||||
}
|
||||
}
|
||||
for (const child of Styles.connect[name].children) {
|
||||
this.setStyle(this.childName(name, child), parts[child]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine with-style-color border definition from children
|
||||
*
|
||||
* @param {string} name The style to be processed
|
||||
*/
|
||||
function combineWSC(name: string) {
|
||||
const parts = [] as string[];
|
||||
for (const child of Styles.connect[name].children) {
|
||||
const value = this.styles[this.childName(name, child)];
|
||||
if (value) {
|
||||
parts.push(value);
|
||||
}
|
||||
}
|
||||
if (parts.length) {
|
||||
this.styles[name] = parts.join(' ');
|
||||
} else {
|
||||
delete this.styles[name];
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************/
|
||||
/**
|
||||
* Patterns for the parts of a font declaration
|
||||
*/
|
||||
const FONT: {[name: string]: RegExp} = {
|
||||
style: /^(?:normal|italic|oblique|inherit|initial|unset)$/,
|
||||
variant: new RegExp('^(?:' +
|
||||
['normal|none',
|
||||
'inherit|initial|unset',
|
||||
'common-ligatures|no-common-ligatures',
|
||||
'discretionary-ligatures|no-discretionary-ligatures',
|
||||
'historical-ligatures|no-historical-ligatures',
|
||||
'contextual|no-contextual',
|
||||
'(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)',
|
||||
'small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps',
|
||||
'lining-nums|oldstyle-nums|proportional-nums|tabular-nums',
|
||||
'diagonal-fractions|stacked-fractions',
|
||||
'ordinal|slashed-zero',
|
||||
'jis78|jis83|jis90|jis04|simplified|traditional',
|
||||
'full-width|proportional-width',
|
||||
'ruby'].join('|') + ')$'),
|
||||
weight: /^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,
|
||||
stretch: new RegExp('^(?:' +
|
||||
['normal',
|
||||
'(?:(?:ultra|extra|semi)-)?condensed',
|
||||
'(?:(?:semi|extra|ulta)-)?expanded',
|
||||
'inherit|initial|unset']. join('|') + ')$'),
|
||||
size: new RegExp('^(?:' +
|
||||
['xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller',
|
||||
'[\d.]+%|[\d.]+[a-z]+',
|
||||
'inherit|initial|unset'].join('|') + ')' +
|
||||
'(?:\/(?:normal|[\d.\+](?:%|[a-z]+)?))?$')
|
||||
};
|
||||
|
||||
/**
|
||||
* Split a font declaration into is parts (not perfect but good enough for now)
|
||||
*
|
||||
* @param {string} name The style to be processed
|
||||
*/
|
||||
function splitFont(name: string) {
|
||||
const parts = splitSpaces(this.styles[name]);
|
||||
//
|
||||
// The parts found (array means can be more than one word)
|
||||
//
|
||||
const value = {
|
||||
style: '', variant: [], weight: '', stretch: '',
|
||||
size: '', family: '', 'line-height': ''
|
||||
} as {[name: string]: string | string[]};
|
||||
for (const part of parts) {
|
||||
value.family = part; // assume it is family unless otherwise (family must be present)
|
||||
for (const name of Object.keys(FONT)) {
|
||||
if ((Array.isArray(value[name]) || value[name] === '') && part.match(FONT[name])) {
|
||||
if (name === 'size') {
|
||||
//
|
||||
// Handle size/line-height
|
||||
//
|
||||
const [size, height] = part.split(/\//);
|
||||
value[name] = size;
|
||||
if (height) {
|
||||
value['line-height'] = height;
|
||||
}
|
||||
} else if (value.size === '') {
|
||||
//
|
||||
// style, weight, variant, stretch must appear before size
|
||||
//
|
||||
if (Array.isArray(value[name])) {
|
||||
(value[name] as string[]).push(part);
|
||||
} else {
|
||||
value[name] = part;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
saveFontParts(name, value);
|
||||
delete this.styles[name]; // only use the parts, not the font declaration itself
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The style to be processed
|
||||
* @param {{[name: string]: string | string[]}} value The list of parts detected above
|
||||
*/
|
||||
function saveFontParts(name: string, value: {[name: string]: string | string[]}) {
|
||||
for (const child of Styles.connect[name].children) {
|
||||
const cname = this.childName(name, child);
|
||||
if (Array.isArray(value[child])) {
|
||||
const values = value[child] as string[];
|
||||
if (values.length) {
|
||||
this.styles[cname] = values.join(' ');
|
||||
}
|
||||
} else if (value[child] !== '') {
|
||||
this.styles[cname] = value[child];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine font parts into one (we don't actually do that)
|
||||
*/
|
||||
function combineFont(_name: string) {}
|
||||
|
||||
/*********************************************************/
|
||||
/**
|
||||
* Implements the Styles object (lite version of CssStyleDeclaration)
|
||||
*/
|
||||
export class Styles {
|
||||
|
||||
/**
|
||||
* Patterns for style values and comments
|
||||
*/
|
||||
public static pattern: {[name: string]: RegExp} = {
|
||||
style: /([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,
|
||||
comment: /\/\*[^]*?\*\//g
|
||||
};
|
||||
|
||||
/**
|
||||
* The mapping of parents to children, and how to split and combine them
|
||||
*/
|
||||
public static connect: connections = {
|
||||
padding: {
|
||||
children: TRBL,
|
||||
split: splitTRBL,
|
||||
combine: combineTRBL
|
||||
},
|
||||
|
||||
border: {
|
||||
children: TRBL,
|
||||
split: splitSame,
|
||||
combine: combineSame
|
||||
},
|
||||
'border-top': {
|
||||
children: WSC,
|
||||
split: splitWSC,
|
||||
combine: combineWSC
|
||||
},
|
||||
'border-right': {
|
||||
children: WSC,
|
||||
split: splitWSC,
|
||||
combine: combineWSC
|
||||
},
|
||||
'border-bottom': {
|
||||
children: WSC,
|
||||
split: splitWSC,
|
||||
combine: combineWSC
|
||||
},
|
||||
'border-left': {
|
||||
children: WSC,
|
||||
split: splitWSC,
|
||||
combine: combineWSC
|
||||
},
|
||||
'border-width': {
|
||||
children: TRBL,
|
||||
split: splitTRBL,
|
||||
combine: null // means its children combine to a different parent
|
||||
},
|
||||
'border-style': {
|
||||
children: TRBL,
|
||||
split: splitTRBL,
|
||||
combine: null // means its children combine to a different parent
|
||||
},
|
||||
'border-color': {
|
||||
children: TRBL,
|
||||
split: splitTRBL,
|
||||
combine: null // means its children combine to a different parent
|
||||
},
|
||||
|
||||
font: {
|
||||
children: ['style', 'variant', 'weight', 'stretch', 'line-height', 'size', 'family'],
|
||||
split: splitFont,
|
||||
combine: combineFont
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The list of styles defined for this declaration
|
||||
*/
|
||||
protected styles: StyleList;
|
||||
|
||||
/**
|
||||
* @param {string} cssText The initial definition for the style
|
||||
* @constructor
|
||||
*/
|
||||
constructor(cssText: string = '') {
|
||||
this.parse(cssText);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {string} The CSS string for the styles currently defined
|
||||
*/
|
||||
public get cssText(): string {
|
||||
const styles = [] as string[];
|
||||
for (const name of Object.keys(this.styles)) {
|
||||
const parent = this.parentName(name);
|
||||
if (!this.styles[parent]) {
|
||||
styles.push(name + ': ' + this.styles[name] + ';');
|
||||
}
|
||||
}
|
||||
return styles.join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the style to set
|
||||
* @param {string|number|boolean} value The value to set it to
|
||||
*/
|
||||
public set(name: string, value: string | number | boolean) {
|
||||
name = this.normalizeName(name);
|
||||
this.setStyle(name, value as string);
|
||||
//
|
||||
// If there is no combine function ,the children combine to
|
||||
// a separate parent (e.g., border-width sets border-top-width, etc.
|
||||
// and combines to border-top)
|
||||
//
|
||||
if (Styles.connect[name] && !Styles.connect[name].combine) {
|
||||
this.combineChildren(name);
|
||||
delete this.styles[name];
|
||||
}
|
||||
//
|
||||
// If we just changed a child, we need to try to combine
|
||||
// it with its parent's other children
|
||||
//
|
||||
while (name.match(/-/)) {
|
||||
name = this.parentName(name);
|
||||
if (!Styles.connect[name]) break;
|
||||
Styles.connect[name].combine.call(this, name);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the style to get
|
||||
* @return {string} The value of the style (or empty string if not defined)
|
||||
*/
|
||||
public get(name: string): string {
|
||||
name = this.normalizeName(name);
|
||||
return (this.styles.hasOwnProperty(name) ? this.styles[name] : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the style to set (without causing parent updates)
|
||||
* @param {string} value The value to set it to
|
||||
*/
|
||||
protected setStyle(name: string, value: string) {
|
||||
this.styles[name] = value;
|
||||
if (Styles.connect[name] && Styles.connect[name].children) {
|
||||
Styles.connect[name].split.call(this, name);
|
||||
}
|
||||
if (value === '') {
|
||||
delete this.styles[name];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the style whose parent is to be combined
|
||||
*/
|
||||
protected combineChildren(name: string) {
|
||||
const parent = this.parentName(name);
|
||||
for (const child of Styles.connect[name].children) {
|
||||
const cname = this.childName(parent, child);
|
||||
Styles.connect[cname].combine.call(this, cname);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the style whose parent style is to be found
|
||||
* @return {string} The name of the parent, or '' if none
|
||||
*/
|
||||
protected parentName(name: string): string {
|
||||
const parent = name.replace(/-[^-]*$/, '');
|
||||
return (name === parent ? '' : parent);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of the parent style
|
||||
* @param {string} child The suffix to be added to the parent
|
||||
* @preturn {string} The combined name
|
||||
*/
|
||||
protected childName(name: string, child: string) {
|
||||
//
|
||||
// If the child contains a dash, it is already the fill name
|
||||
//
|
||||
if (child.match(/-/)) {
|
||||
return child;
|
||||
}
|
||||
//
|
||||
// For non-combining styles, like border-width, insert
|
||||
// the child name before the find word, e.g., border-top-width
|
||||
//
|
||||
if (Styles.connect[name] && !Styles.connect[name].combine) {
|
||||
child += name.replace(/.*-/, '-');
|
||||
name = this.parentName(name);
|
||||
}
|
||||
return name + '-' + child;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name The name of a style to normalize
|
||||
* @return {string} The name converted from CamelCase to lowercase with dashes
|
||||
*/
|
||||
protected normalizeName(name: string): string {
|
||||
return name.replace(/[A-Z]/g, c => '-' + c.toLowerCase());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} cssText A style text string to be parsed into separate styles
|
||||
* (by using this.set(), we get all the sub-styles created
|
||||
* as well as the merged style shorthands)
|
||||
*/
|
||||
protected parse(cssText: string = '') {
|
||||
let PATTERN = (this.constructor as typeof Styles).pattern;
|
||||
this.styles = {};
|
||||
const parts = cssText.replace(PATTERN.comment, '').split(PATTERN.style);
|
||||
while (parts.length > 1) {
|
||||
let [space, name, value] = parts.splice(0, 3);
|
||||
if (space.match(/[^\s\n]/)) return;
|
||||
this.set(name, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
36
node_modules/mathjax-full/ts/util/asyncLoad/node.ts
generated
vendored
Normal file
36
node_modules/mathjax-full/ts/util/asyncLoad/node.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2019-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements asynchronous loading for use with node applications
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
import {mathjax} from '../../mathjax.js';
|
||||
import * as path from 'path';
|
||||
|
||||
declare var require: (name: string) => any;
|
||||
declare var __dirname: string;
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
|
||||
if (!mathjax.asyncLoad && typeof require !== 'undefined') {
|
||||
mathjax.asyncLoad = (name: string) => {
|
||||
return require(name.charAt(0) === '.' ? path.resolve(root, name) : name);
|
||||
};
|
||||
}
|
||||
4
node_modules/mathjax-full/ts/util/asyncLoad/path.d.ts
generated
vendored
Normal file
4
node_modules/mathjax-full/ts/util/asyncLoad/path.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
declare module 'path' {
|
||||
export function dirname(dir: string): string;
|
||||
export function resolve(root: string, name: string): string;
|
||||
}
|
||||
45
node_modules/mathjax-full/ts/util/asyncLoad/system.ts
generated
vendored
Normal file
45
node_modules/mathjax-full/ts/util/asyncLoad/system.ts
generated
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2019-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements asynchronous loading for use with SystemJS
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
import {mathjax} from '../../mathjax.js';
|
||||
|
||||
declare var System: {import: (name: string, url?: string) => any};
|
||||
declare var __dirname: string;
|
||||
|
||||
let root = 'file://' + __dirname.replace(/\/\/[^\/]*$/, '/');
|
||||
|
||||
if (!mathjax.asyncLoad && typeof System !== 'undefined' && System.import) {
|
||||
mathjax.asyncLoad = (name: string) => {
|
||||
return System.import(name, root);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} URL the base URL to use for loading relative paths
|
||||
*/
|
||||
export function setBaseURL(URL: string) {
|
||||
root = URL;
|
||||
if (!root.match(/\/$/)) {
|
||||
root += '/';
|
||||
}
|
||||
}
|
||||
83
node_modules/mathjax-full/ts/util/entities/a.ts
generated
vendored
Normal file
83
node_modules/mathjax-full/ts/util/entities/a.ts
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
AElig: '\u00C6',
|
||||
AMP: '\u0026',
|
||||
Aacute: '\u00C1',
|
||||
Abreve: '\u0102',
|
||||
Acirc: '\u00C2',
|
||||
Acy: '\u0410',
|
||||
Agrave: '\u00C0',
|
||||
Alpha: '\u0391',
|
||||
Amacr: '\u0100',
|
||||
And: '\u2A53',
|
||||
Aogon: '\u0104',
|
||||
Aring: '\u00C5',
|
||||
Assign: '\u2254',
|
||||
Atilde: '\u00C3',
|
||||
Auml: '\u00C4',
|
||||
aacute: '\u00E1',
|
||||
abreve: '\u0103',
|
||||
ac: '\u223E',
|
||||
acE: '\u223E\u0333',
|
||||
acd: '\u223F',
|
||||
acirc: '\u00E2',
|
||||
acy: '\u0430',
|
||||
aelig: '\u00E6',
|
||||
af: '\u2061',
|
||||
agrave: '\u00E0',
|
||||
alefsym: '\u2135',
|
||||
amacr: '\u0101',
|
||||
andand: '\u2A55',
|
||||
andd: '\u2A5C',
|
||||
andslope: '\u2A58',
|
||||
andv: '\u2A5A',
|
||||
ange: '\u29A4',
|
||||
angle: '\u2220',
|
||||
angmsdaa: '\u29A8',
|
||||
angmsdab: '\u29A9',
|
||||
angmsdac: '\u29AA',
|
||||
angmsdad: '\u29AB',
|
||||
angmsdae: '\u29AC',
|
||||
angmsdaf: '\u29AD',
|
||||
angmsdag: '\u29AE',
|
||||
angmsdah: '\u29AF',
|
||||
angrt: '\u221F',
|
||||
angrtvb: '\u22BE',
|
||||
angrtvbd: '\u299D',
|
||||
angst: '\u00C5',
|
||||
angzarr: '\u237C',
|
||||
aogon: '\u0105',
|
||||
ap: '\u2248',
|
||||
apE: '\u2A70',
|
||||
apacir: '\u2A6F',
|
||||
apid: '\u224B',
|
||||
apos: '\u0027',
|
||||
approx: '\u2248',
|
||||
approxeq: '\u224A',
|
||||
aring: '\u00E5',
|
||||
ast: '\u002A',
|
||||
asymp: '\u2248',
|
||||
asympeq: '\u224D',
|
||||
atilde: '\u00E3',
|
||||
auml: '\u00E4',
|
||||
awconint: '\u2233',
|
||||
awint: '\u2A11'
|
||||
}, 'a');
|
||||
53
node_modules/mathjax-full/ts/util/entities/all.ts
generated
vendored
Normal file
53
node_modules/mathjax-full/ts/util/entities/all.ts
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Loads all the entity files (used to avoid dynamic loading)
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
import './a.js';
|
||||
import './b.js';
|
||||
import './c.js';
|
||||
import './d.js';
|
||||
import './e.js';
|
||||
import './f.js';
|
||||
import './g.js';
|
||||
import './h.js';
|
||||
import './i.js';
|
||||
import './j.js';
|
||||
import './k.js';
|
||||
import './l.js';
|
||||
import './m.js';
|
||||
import './n.js';
|
||||
import './o.js';
|
||||
import './p.js';
|
||||
import './q.js';
|
||||
import './r.js';
|
||||
import './s.js';
|
||||
import './t.js';
|
||||
import './u.js';
|
||||
import './v.js';
|
||||
import './w.js';
|
||||
import './x.js';
|
||||
import './y.js';
|
||||
import './z.js';
|
||||
|
||||
import './fr.js';
|
||||
import './opf.js';
|
||||
import './scr.js';
|
||||
110
node_modules/mathjax-full/ts/util/entities/b.ts
generated
vendored
Normal file
110
node_modules/mathjax-full/ts/util/entities/b.ts
generated
vendored
Normal file
@@ -0,0 +1,110 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Barv: '\u2AE7',
|
||||
Barwed: '\u2306',
|
||||
Bcy: '\u0411',
|
||||
Bernoullis: '\u212C',
|
||||
Beta: '\u0392',
|
||||
Bumpeq: '\u224E',
|
||||
bNot: '\u2AED',
|
||||
backcong: '\u224C',
|
||||
backepsilon: '\u03F6',
|
||||
barvee: '\u22BD',
|
||||
barwed: '\u2305',
|
||||
barwedge: '\u2305',
|
||||
bbrk: '\u23B5',
|
||||
bbrktbrk: '\u23B6',
|
||||
bcong: '\u224C',
|
||||
bcy: '\u0431',
|
||||
bdquo: '\u201E',
|
||||
becaus: '\u2235',
|
||||
because: '\u2235',
|
||||
bemptyv: '\u29B0',
|
||||
bepsi: '\u03F6',
|
||||
bernou: '\u212C',
|
||||
bigcap: '\u22C2',
|
||||
bigcup: '\u22C3',
|
||||
bigvee: '\u22C1',
|
||||
bigwedge: '\u22C0',
|
||||
bkarow: '\u290D',
|
||||
blacksquare: '\u25AA',
|
||||
blacktriangleright: '\u25B8',
|
||||
blank: '\u2423',
|
||||
blk12: '\u2592',
|
||||
blk14: '\u2591',
|
||||
blk34: '\u2593',
|
||||
block: '\u2588',
|
||||
bne: '\u003D\u20E5',
|
||||
bnequiv: '\u2261\u20E5',
|
||||
bnot: '\u2310',
|
||||
bot: '\u22A5',
|
||||
bottom: '\u22A5',
|
||||
boxDL: '\u2557',
|
||||
boxDR: '\u2554',
|
||||
boxDl: '\u2556',
|
||||
boxDr: '\u2553',
|
||||
boxH: '\u2550',
|
||||
boxHD: '\u2566',
|
||||
boxHU: '\u2569',
|
||||
boxHd: '\u2564',
|
||||
boxHu: '\u2567',
|
||||
boxUL: '\u255D',
|
||||
boxUR: '\u255A',
|
||||
boxUl: '\u255C',
|
||||
boxUr: '\u2559',
|
||||
boxV: '\u2551',
|
||||
boxVH: '\u256C',
|
||||
boxVL: '\u2563',
|
||||
boxVR: '\u2560',
|
||||
boxVh: '\u256B',
|
||||
boxVl: '\u2562',
|
||||
boxVr: '\u255F',
|
||||
boxbox: '\u29C9',
|
||||
boxdL: '\u2555',
|
||||
boxdR: '\u2552',
|
||||
boxh: '\u2500',
|
||||
boxhD: '\u2565',
|
||||
boxhU: '\u2568',
|
||||
boxhd: '\u252C',
|
||||
boxhu: '\u2534',
|
||||
boxuL: '\u255B',
|
||||
boxuR: '\u2558',
|
||||
boxv: '\u2502',
|
||||
boxvH: '\u256A',
|
||||
boxvL: '\u2561',
|
||||
boxvR: '\u255E',
|
||||
boxvh: '\u253C',
|
||||
boxvl: '\u2524',
|
||||
boxvr: '\u251C',
|
||||
bprime: '\u2035',
|
||||
breve: '\u02D8',
|
||||
brvbar: '\u00A6',
|
||||
bsemi: '\u204F',
|
||||
bsim: '\u223D',
|
||||
bsime: '\u22CD',
|
||||
bsolb: '\u29C5',
|
||||
bsolhsub: '\u27C8',
|
||||
bullet: '\u2022',
|
||||
bump: '\u224E',
|
||||
bumpE: '\u2AAE',
|
||||
bumpe: '\u224F',
|
||||
bumpeq: '\u224F'
|
||||
}, 'b');
|
||||
108
node_modules/mathjax-full/ts/util/entities/c.ts
generated
vendored
Normal file
108
node_modules/mathjax-full/ts/util/entities/c.ts
generated
vendored
Normal file
@@ -0,0 +1,108 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
CHcy: '\u0427',
|
||||
COPY: '\u00A9',
|
||||
Cacute: '\u0106',
|
||||
CapitalDifferentialD: '\u2145',
|
||||
Cayleys: '\u212D',
|
||||
Ccaron: '\u010C',
|
||||
Ccedil: '\u00C7',
|
||||
Ccirc: '\u0108',
|
||||
Cconint: '\u2230',
|
||||
Cdot: '\u010A',
|
||||
Cedilla: '\u00B8',
|
||||
Chi: '\u03A7',
|
||||
ClockwiseContourIntegral: '\u2232',
|
||||
CloseCurlyDoubleQuote: '\u201D',
|
||||
CloseCurlyQuote: '\u2019',
|
||||
Colon: '\u2237',
|
||||
Colone: '\u2A74',
|
||||
Conint: '\u222F',
|
||||
CounterClockwiseContourIntegral: '\u2233',
|
||||
cacute: '\u0107',
|
||||
capand: '\u2A44',
|
||||
capbrcup: '\u2A49',
|
||||
capcap: '\u2A4B',
|
||||
capcup: '\u2A47',
|
||||
capdot: '\u2A40',
|
||||
caps: '\u2229\uFE00',
|
||||
caret: '\u2041',
|
||||
caron: '\u02C7',
|
||||
ccaps: '\u2A4D',
|
||||
ccaron: '\u010D',
|
||||
ccedil: '\u00E7',
|
||||
ccirc: '\u0109',
|
||||
ccups: '\u2A4C',
|
||||
ccupssm: '\u2A50',
|
||||
cdot: '\u010B',
|
||||
cedil: '\u00B8',
|
||||
cemptyv: '\u29B2',
|
||||
cent: '\u00A2',
|
||||
centerdot: '\u00B7',
|
||||
chcy: '\u0447',
|
||||
checkmark: '\u2713',
|
||||
cir: '\u25CB',
|
||||
cirE: '\u29C3',
|
||||
cire: '\u2257',
|
||||
cirfnint: '\u2A10',
|
||||
cirmid: '\u2AEF',
|
||||
cirscir: '\u29C2',
|
||||
clubsuit: '\u2663',
|
||||
colone: '\u2254',
|
||||
coloneq: '\u2254',
|
||||
comma: '\u002C',
|
||||
commat: '\u0040',
|
||||
compfn: '\u2218',
|
||||
complement: '\u2201',
|
||||
complexes: '\u2102',
|
||||
cong: '\u2245',
|
||||
congdot: '\u2A6D',
|
||||
conint: '\u222E',
|
||||
coprod: '\u2210',
|
||||
copy: '\u00A9',
|
||||
copysr: '\u2117',
|
||||
crarr: '\u21B5',
|
||||
cross: '\u2717',
|
||||
csub: '\u2ACF',
|
||||
csube: '\u2AD1',
|
||||
csup: '\u2AD0',
|
||||
csupe: '\u2AD2',
|
||||
cudarrl: '\u2938',
|
||||
cudarrr: '\u2935',
|
||||
cularrp: '\u293D',
|
||||
cupbrcap: '\u2A48',
|
||||
cupcap: '\u2A46',
|
||||
cupcup: '\u2A4A',
|
||||
cupdot: '\u228D',
|
||||
cupor: '\u2A45',
|
||||
cups: '\u222A\uFE00',
|
||||
curarrm: '\u293C',
|
||||
curlyeqprec: '\u22DE',
|
||||
curlyeqsucc: '\u22DF',
|
||||
curren: '\u00A4',
|
||||
curvearrowleft: '\u21B6',
|
||||
curvearrowright: '\u21B7',
|
||||
cuvee: '\u22CE',
|
||||
cuwed: '\u22CF',
|
||||
cwconint: '\u2232',
|
||||
cwint: '\u2231',
|
||||
cylcty: '\u232D'
|
||||
}, 'c');
|
||||
106
node_modules/mathjax-full/ts/util/entities/d.ts
generated
vendored
Normal file
106
node_modules/mathjax-full/ts/util/entities/d.ts
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
DD: '\u2145',
|
||||
DDotrahd: '\u2911',
|
||||
DJcy: '\u0402',
|
||||
DScy: '\u0405',
|
||||
DZcy: '\u040F',
|
||||
Darr: '\u21A1',
|
||||
Dashv: '\u2AE4',
|
||||
Dcaron: '\u010E',
|
||||
Dcy: '\u0414',
|
||||
DiacriticalAcute: '\u00B4',
|
||||
DiacriticalDot: '\u02D9',
|
||||
DiacriticalDoubleAcute: '\u02DD',
|
||||
DiacriticalGrave: '\u0060',
|
||||
DiacriticalTilde: '\u02DC',
|
||||
Dot: '\u00A8',
|
||||
DotDot: '\u20DC',
|
||||
DoubleContourIntegral: '\u222F',
|
||||
DoubleDownArrow: '\u21D3',
|
||||
DoubleLeftArrow: '\u21D0',
|
||||
DoubleLeftRightArrow: '\u21D4',
|
||||
DoubleLeftTee: '\u2AE4',
|
||||
DoubleLongLeftArrow: '\u27F8',
|
||||
DoubleLongLeftRightArrow: '\u27FA',
|
||||
DoubleLongRightArrow: '\u27F9',
|
||||
DoubleRightArrow: '\u21D2',
|
||||
DoubleUpArrow: '\u21D1',
|
||||
DoubleUpDownArrow: '\u21D5',
|
||||
DownArrowBar: '\u2913',
|
||||
DownArrowUpArrow: '\u21F5',
|
||||
DownBreve: '\u0311',
|
||||
DownLeftRightVector: '\u2950',
|
||||
DownLeftTeeVector: '\u295E',
|
||||
DownLeftVectorBar: '\u2956',
|
||||
DownRightTeeVector: '\u295F',
|
||||
DownRightVectorBar: '\u2957',
|
||||
DownTeeArrow: '\u21A7',
|
||||
Dstrok: '\u0110',
|
||||
dArr: '\u21D3',
|
||||
dHar: '\u2965',
|
||||
darr: '\u2193',
|
||||
dash: '\u2010',
|
||||
dashv: '\u22A3',
|
||||
dbkarow: '\u290F',
|
||||
dblac: '\u02DD',
|
||||
dcaron: '\u010F',
|
||||
dcy: '\u0434',
|
||||
dd: '\u2146',
|
||||
ddagger: '\u2021',
|
||||
ddotseq: '\u2A77',
|
||||
demptyv: '\u29B1',
|
||||
dfisht: '\u297F',
|
||||
dharl: '\u21C3',
|
||||
dharr: '\u21C2',
|
||||
diam: '\u22C4',
|
||||
diamond: '\u22C4',
|
||||
diamondsuit: '\u2666',
|
||||
diams: '\u2666',
|
||||
die: '\u00A8',
|
||||
disin: '\u22F2',
|
||||
divide: '\u00F7',
|
||||
divonx: '\u22C7',
|
||||
djcy: '\u0452',
|
||||
dlcorn: '\u231E',
|
||||
dlcrop: '\u230D',
|
||||
dollar: '\u0024',
|
||||
doteq: '\u2250',
|
||||
dotminus: '\u2238',
|
||||
doublebarwedge: '\u2306',
|
||||
downarrow: '\u2193',
|
||||
downdownarrows: '\u21CA',
|
||||
downharpoonleft: '\u21C3',
|
||||
downharpoonright: '\u21C2',
|
||||
drbkarow: '\u2910',
|
||||
drcorn: '\u231F',
|
||||
drcrop: '\u230C',
|
||||
dscy: '\u0455',
|
||||
dsol: '\u29F6',
|
||||
dstrok: '\u0111',
|
||||
dtri: '\u25BF',
|
||||
dtrif: '\u25BE',
|
||||
duarr: '\u21F5',
|
||||
duhar: '\u296F',
|
||||
dwangle: '\u29A6',
|
||||
dzcy: '\u045F',
|
||||
dzigrarr: '\u27FF'
|
||||
}, 'd');
|
||||
86
node_modules/mathjax-full/ts/util/entities/e.ts
generated
vendored
Normal file
86
node_modules/mathjax-full/ts/util/entities/e.ts
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
ENG: '\u014A',
|
||||
ETH: '\u00D0',
|
||||
Eacute: '\u00C9',
|
||||
Ecaron: '\u011A',
|
||||
Ecirc: '\u00CA',
|
||||
Ecy: '\u042D',
|
||||
Edot: '\u0116',
|
||||
Egrave: '\u00C8',
|
||||
Emacr: '\u0112',
|
||||
EmptySmallSquare: '\u25FB',
|
||||
EmptyVerySmallSquare: '\u25AB',
|
||||
Eogon: '\u0118',
|
||||
Epsilon: '\u0395',
|
||||
Equal: '\u2A75',
|
||||
Esim: '\u2A73',
|
||||
Eta: '\u0397',
|
||||
Euml: '\u00CB',
|
||||
eDDot: '\u2A77',
|
||||
eDot: '\u2251',
|
||||
eacute: '\u00E9',
|
||||
easter: '\u2A6E',
|
||||
ecaron: '\u011B',
|
||||
ecirc: '\u00EA',
|
||||
ecolon: '\u2255',
|
||||
ecy: '\u044D',
|
||||
edot: '\u0117',
|
||||
ee: '\u2147',
|
||||
eg: '\u2A9A',
|
||||
egrave: '\u00E8',
|
||||
egsdot: '\u2A98',
|
||||
el: '\u2A99',
|
||||
elinters: '\u23E7',
|
||||
elsdot: '\u2A97',
|
||||
emacr: '\u0113',
|
||||
emptyset: '\u2205',
|
||||
emptyv: '\u2205',
|
||||
emsp: '\u2003',
|
||||
emsp13: '\u2004',
|
||||
emsp14: '\u2005',
|
||||
eng: '\u014B',
|
||||
ensp: '\u2002',
|
||||
eogon: '\u0119',
|
||||
epar: '\u22D5',
|
||||
eparsl: '\u29E3',
|
||||
eplus: '\u2A71',
|
||||
epsilon: '\u03B5',
|
||||
eqcirc: '\u2256',
|
||||
eqcolon: '\u2255',
|
||||
eqsim: '\u2242',
|
||||
eqslantgtr: '\u2A96',
|
||||
eqslantless: '\u2A95',
|
||||
equals: '\u003D',
|
||||
equest: '\u225F',
|
||||
equiv: '\u2261',
|
||||
equivDD: '\u2A78',
|
||||
eqvparsl: '\u29E5',
|
||||
erarr: '\u2971',
|
||||
esdot: '\u2250',
|
||||
esim: '\u2242',
|
||||
euml: '\u00EB',
|
||||
euro: '\u20AC',
|
||||
excl: '\u0021',
|
||||
exist: '\u2203',
|
||||
expectation: '\u2130',
|
||||
exponentiale: '\u2147'
|
||||
}, 'e');
|
||||
54
node_modules/mathjax-full/ts/util/entities/f.ts
generated
vendored
Normal file
54
node_modules/mathjax-full/ts/util/entities/f.ts
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Fcy: '\u0424',
|
||||
FilledSmallSquare: '\u25FC',
|
||||
Fouriertrf: '\u2131',
|
||||
fallingdotseq: '\u2252',
|
||||
fcy: '\u0444',
|
||||
female: '\u2640',
|
||||
ffilig: '\uFB03',
|
||||
fflig: '\uFB00',
|
||||
ffllig: '\uFB04',
|
||||
filig: '\uFB01',
|
||||
fjlig: '\u0066\u006A',
|
||||
fllig: '\uFB02',
|
||||
fltns: '\u25B1',
|
||||
fnof: '\u0192',
|
||||
forall: '\u2200',
|
||||
forkv: '\u2AD9',
|
||||
fpartint: '\u2A0D',
|
||||
frac12: '\u00BD',
|
||||
frac13: '\u2153',
|
||||
frac14: '\u00BC',
|
||||
frac15: '\u2155',
|
||||
frac16: '\u2159',
|
||||
frac18: '\u215B',
|
||||
frac23: '\u2154',
|
||||
frac25: '\u2156',
|
||||
frac34: '\u00BE',
|
||||
frac35: '\u2157',
|
||||
frac38: '\u215C',
|
||||
frac45: '\u2158',
|
||||
frac56: '\u215A',
|
||||
frac58: '\u215D',
|
||||
frac78: '\u215E',
|
||||
frasl: '\u2044'
|
||||
}, 'f');
|
||||
73
node_modules/mathjax-full/ts/util/entities/fr.ts
generated
vendored
Normal file
73
node_modules/mathjax-full/ts/util/entities/fr.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Afr: '\uD835\uDD04',
|
||||
Bfr: '\uD835\uDD05',
|
||||
Cfr: '\u212D',
|
||||
Dfr: '\uD835\uDD07',
|
||||
Efr: '\uD835\uDD08',
|
||||
Ffr: '\uD835\uDD09',
|
||||
Gfr: '\uD835\uDD0A',
|
||||
Hfr: '\u210C',
|
||||
Ifr: '\u2111',
|
||||
Jfr: '\uD835\uDD0D',
|
||||
Kfr: '\uD835\uDD0E',
|
||||
Lfr: '\uD835\uDD0F',
|
||||
Mfr: '\uD835\uDD10',
|
||||
Nfr: '\uD835\uDD11',
|
||||
Ofr: '\uD835\uDD12',
|
||||
Pfr: '\uD835\uDD13',
|
||||
Qfr: '\uD835\uDD14',
|
||||
Rfr: '\u211C',
|
||||
Sfr: '\uD835\uDD16',
|
||||
Tfr: '\uD835\uDD17',
|
||||
Ufr: '\uD835\uDD18',
|
||||
Vfr: '\uD835\uDD19',
|
||||
Wfr: '\uD835\uDD1A',
|
||||
Xfr: '\uD835\uDD1B',
|
||||
Yfr: '\uD835\uDD1C',
|
||||
Zfr: '\u2128',
|
||||
afr: '\uD835\uDD1E',
|
||||
bfr: '\uD835\uDD1F',
|
||||
cfr: '\uD835\uDD20',
|
||||
dfr: '\uD835\uDD21',
|
||||
efr: '\uD835\uDD22',
|
||||
ffr: '\uD835\uDD23',
|
||||
gfr: '\uD835\uDD24',
|
||||
hfr: '\uD835\uDD25',
|
||||
ifr: '\uD835\uDD26',
|
||||
jfr: '\uD835\uDD27',
|
||||
kfr: '\uD835\uDD28',
|
||||
lfr: '\uD835\uDD29',
|
||||
mfr: '\uD835\uDD2A',
|
||||
nfr: '\uD835\uDD2B',
|
||||
ofr: '\uD835\uDD2C',
|
||||
pfr: '\uD835\uDD2D',
|
||||
qfr: '\uD835\uDD2E',
|
||||
rfr: '\uD835\uDD2F',
|
||||
sfr: '\uD835\uDD30',
|
||||
tfr: '\uD835\uDD31',
|
||||
ufr: '\uD835\uDD32',
|
||||
vfr: '\uD835\uDD33',
|
||||
wfr: '\uD835\uDD34',
|
||||
xfr: '\uD835\uDD35',
|
||||
yfr: '\uD835\uDD36',
|
||||
zfr: '\uD835\uDD37'
|
||||
}, 'fr');
|
||||
77
node_modules/mathjax-full/ts/util/entities/g.ts
generated
vendored
Normal file
77
node_modules/mathjax-full/ts/util/entities/g.ts
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
GJcy: '\u0403',
|
||||
GT: '\u003E',
|
||||
Gammad: '\u03DC',
|
||||
Gbreve: '\u011E',
|
||||
Gcedil: '\u0122',
|
||||
Gcirc: '\u011C',
|
||||
Gcy: '\u0413',
|
||||
Gdot: '\u0120',
|
||||
GreaterGreater: '\u2AA2',
|
||||
Gt: '\u226B',
|
||||
gE: '\u2267',
|
||||
gacute: '\u01F5',
|
||||
gammad: '\u03DD',
|
||||
gbreve: '\u011F',
|
||||
gcirc: '\u011D',
|
||||
gcy: '\u0433',
|
||||
gdot: '\u0121',
|
||||
ge: '\u2265',
|
||||
gel: '\u22DB',
|
||||
geq: '\u2265',
|
||||
geqq: '\u2267',
|
||||
geqslant: '\u2A7E',
|
||||
ges: '\u2A7E',
|
||||
gescc: '\u2AA9',
|
||||
gesdot: '\u2A80',
|
||||
gesdoto: '\u2A82',
|
||||
gesdotol: '\u2A84',
|
||||
gesl: '\u22DB\uFE00',
|
||||
gesles: '\u2A94',
|
||||
gg: '\u226B',
|
||||
ggg: '\u22D9',
|
||||
gjcy: '\u0453',
|
||||
gl: '\u2277',
|
||||
glE: '\u2A92',
|
||||
gla: '\u2AA5',
|
||||
glj: '\u2AA4',
|
||||
gnapprox: '\u2A8A',
|
||||
gneq: '\u2A88',
|
||||
gneqq: '\u2269',
|
||||
grave: '\u0060',
|
||||
gsim: '\u2273',
|
||||
gsime: '\u2A8E',
|
||||
gsiml: '\u2A90',
|
||||
gtcc: '\u2AA7',
|
||||
gtcir: '\u2A7A',
|
||||
gtlPar: '\u2995',
|
||||
gtquest: '\u2A7C',
|
||||
gtrapprox: '\u2A86',
|
||||
gtrarr: '\u2978',
|
||||
gtrdot: '\u22D7',
|
||||
gtreqless: '\u22DB',
|
||||
gtreqqless: '\u2A8C',
|
||||
gtrless: '\u2277',
|
||||
gtrsim: '\u2273',
|
||||
gvertneqq: '\u2269\uFE00',
|
||||
gvnE: '\u2269\uFE00'
|
||||
}, 'g');
|
||||
46
node_modules/mathjax-full/ts/util/entities/h.ts
generated
vendored
Normal file
46
node_modules/mathjax-full/ts/util/entities/h.ts
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
HARDcy: '\u042A',
|
||||
Hcirc: '\u0124',
|
||||
HilbertSpace: '\u210B',
|
||||
HorizontalLine: '\u2500',
|
||||
Hstrok: '\u0126',
|
||||
hArr: '\u21D4',
|
||||
hairsp: '\u200A',
|
||||
half: '\u00BD',
|
||||
hamilt: '\u210B',
|
||||
hardcy: '\u044A',
|
||||
harr: '\u2194',
|
||||
harrcir: '\u2948',
|
||||
hcirc: '\u0125',
|
||||
hearts: '\u2665',
|
||||
heartsuit: '\u2665',
|
||||
hercon: '\u22B9',
|
||||
hksearow: '\u2925',
|
||||
hkswarow: '\u2926',
|
||||
hoarr: '\u21FF',
|
||||
homtht: '\u223B',
|
||||
horbar: '\u2015',
|
||||
hslash: '\u210F',
|
||||
hstrok: '\u0127',
|
||||
hybull: '\u2043',
|
||||
hyphen: '\u2010'
|
||||
}, 'h');
|
||||
80
node_modules/mathjax-full/ts/util/entities/i.ts
generated
vendored
Normal file
80
node_modules/mathjax-full/ts/util/entities/i.ts
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
IEcy: '\u0415',
|
||||
IJlig: '\u0132',
|
||||
IOcy: '\u0401',
|
||||
Iacute: '\u00CD',
|
||||
Icirc: '\u00CE',
|
||||
Icy: '\u0418',
|
||||
Idot: '\u0130',
|
||||
Igrave: '\u00CC',
|
||||
Imacr: '\u012A',
|
||||
Implies: '\u21D2',
|
||||
Int: '\u222C',
|
||||
Iogon: '\u012E',
|
||||
Iota: '\u0399',
|
||||
Itilde: '\u0128',
|
||||
Iukcy: '\u0406',
|
||||
Iuml: '\u00CF',
|
||||
iacute: '\u00ED',
|
||||
ic: '\u2063',
|
||||
icirc: '\u00EE',
|
||||
icy: '\u0438',
|
||||
iecy: '\u0435',
|
||||
iexcl: '\u00A1',
|
||||
iff: '\u21D4',
|
||||
igrave: '\u00EC',
|
||||
ii: '\u2148',
|
||||
iiiint: '\u2A0C',
|
||||
iiint: '\u222D',
|
||||
iinfin: '\u29DC',
|
||||
iiota: '\u2129',
|
||||
ijlig: '\u0133',
|
||||
imacr: '\u012B',
|
||||
image: '\u2111',
|
||||
imagline: '\u2110',
|
||||
imagpart: '\u2111',
|
||||
imof: '\u22B7',
|
||||
imped: '\u01B5',
|
||||
in: '\u2208',
|
||||
incare: '\u2105',
|
||||
infintie: '\u29DD',
|
||||
inodot: '\u0131',
|
||||
int: '\u222B',
|
||||
integers: '\u2124',
|
||||
intercal: '\u22BA',
|
||||
intlarhk: '\u2A17',
|
||||
intprod: '\u2A3C',
|
||||
iocy: '\u0451',
|
||||
iogon: '\u012F',
|
||||
iprod: '\u2A3C',
|
||||
iquest: '\u00BF',
|
||||
isin: '\u2208',
|
||||
isinE: '\u22F9',
|
||||
isindot: '\u22F5',
|
||||
isins: '\u22F4',
|
||||
isinsv: '\u22F3',
|
||||
isinv: '\u2208',
|
||||
it: '\u2062',
|
||||
itilde: '\u0129',
|
||||
iukcy: '\u0456',
|
||||
iuml: '\u00EF'
|
||||
}, 'i');
|
||||
29
node_modules/mathjax-full/ts/util/entities/j.ts
generated
vendored
Normal file
29
node_modules/mathjax-full/ts/util/entities/j.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Jcirc: '\u0134',
|
||||
Jcy: '\u0419',
|
||||
Jsercy: '\u0408',
|
||||
Jukcy: '\u0404',
|
||||
jcirc: '\u0135',
|
||||
jcy: '\u0439',
|
||||
jsercy: '\u0458',
|
||||
jukcy: '\u0454'
|
||||
}, 'j');
|
||||
31
node_modules/mathjax-full/ts/util/entities/k.ts
generated
vendored
Normal file
31
node_modules/mathjax-full/ts/util/entities/k.ts
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
KHcy: '\u0425',
|
||||
KJcy: '\u040C',
|
||||
Kappa: '\u039A',
|
||||
Kcedil: '\u0136',
|
||||
Kcy: '\u041A',
|
||||
kcedil: '\u0137',
|
||||
kcy: '\u043A',
|
||||
kgreen: '\u0138',
|
||||
khcy: '\u0445',
|
||||
kjcy: '\u045C'
|
||||
}, 'k');
|
||||
173
node_modules/mathjax-full/ts/util/entities/l.ts
generated
vendored
Normal file
173
node_modules/mathjax-full/ts/util/entities/l.ts
generated
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
LJcy: '\u0409',
|
||||
LT: '\u003C',
|
||||
Lacute: '\u0139',
|
||||
Lang: '\u27EA',
|
||||
Laplacetrf: '\u2112',
|
||||
Lcaron: '\u013D',
|
||||
Lcedil: '\u013B',
|
||||
Lcy: '\u041B',
|
||||
LeftArrowBar: '\u21E4',
|
||||
LeftDoubleBracket: '\u27E6',
|
||||
LeftDownTeeVector: '\u2961',
|
||||
LeftDownVectorBar: '\u2959',
|
||||
LeftRightVector: '\u294E',
|
||||
LeftTeeArrow: '\u21A4',
|
||||
LeftTeeVector: '\u295A',
|
||||
LeftTriangleBar: '\u29CF',
|
||||
LeftUpDownVector: '\u2951',
|
||||
LeftUpTeeVector: '\u2960',
|
||||
LeftUpVectorBar: '\u2958',
|
||||
LeftVectorBar: '\u2952',
|
||||
LessLess: '\u2AA1',
|
||||
Lmidot: '\u013F',
|
||||
LowerLeftArrow: '\u2199',
|
||||
LowerRightArrow: '\u2198',
|
||||
Lstrok: '\u0141',
|
||||
Lt: '\u226A',
|
||||
lAarr: '\u21DA',
|
||||
lArr: '\u21D0',
|
||||
lAtail: '\u291B',
|
||||
lBarr: '\u290E',
|
||||
lE: '\u2266',
|
||||
lHar: '\u2962',
|
||||
lacute: '\u013A',
|
||||
laemptyv: '\u29B4',
|
||||
lagran: '\u2112',
|
||||
lang: '\u27E8',
|
||||
langd: '\u2991',
|
||||
langle: '\u27E8',
|
||||
laquo: '\u00AB',
|
||||
larr: '\u2190',
|
||||
larrb: '\u21E4',
|
||||
larrbfs: '\u291F',
|
||||
larrfs: '\u291D',
|
||||
larrhk: '\u21A9',
|
||||
larrpl: '\u2939',
|
||||
larrsim: '\u2973',
|
||||
lat: '\u2AAB',
|
||||
latail: '\u2919',
|
||||
late: '\u2AAD',
|
||||
lates: '\u2AAD\uFE00',
|
||||
lbarr: '\u290C',
|
||||
lbbrk: '\u2772',
|
||||
lbrke: '\u298B',
|
||||
lbrksld: '\u298F',
|
||||
lbrkslu: '\u298D',
|
||||
lcaron: '\u013E',
|
||||
lcedil: '\u013C',
|
||||
lceil: '\u2308',
|
||||
lcub: '\u007B',
|
||||
lcy: '\u043B',
|
||||
ldca: '\u2936',
|
||||
ldquo: '\u201C',
|
||||
ldquor: '\u201E',
|
||||
ldrdhar: '\u2967',
|
||||
ldrushar: '\u294B',
|
||||
ldsh: '\u21B2',
|
||||
leftarrow: '\u2190',
|
||||
leftarrowtail: '\u21A2',
|
||||
leftharpoondown: '\u21BD',
|
||||
leftharpoonup: '\u21BC',
|
||||
leftrightarrow: '\u2194',
|
||||
leftrightarrows: '\u21C6',
|
||||
leftrightharpoons: '\u21CB',
|
||||
leftrightsquigarrow: '\u21AD',
|
||||
leg: '\u22DA',
|
||||
leq: '\u2264',
|
||||
leqq: '\u2266',
|
||||
leqslant: '\u2A7D',
|
||||
les: '\u2A7D',
|
||||
lescc: '\u2AA8',
|
||||
lesdot: '\u2A7F',
|
||||
lesdoto: '\u2A81',
|
||||
lesdotor: '\u2A83',
|
||||
lesg: '\u22DA\uFE00',
|
||||
lesges: '\u2A93',
|
||||
lessapprox: '\u2A85',
|
||||
lesseqgtr: '\u22DA',
|
||||
lesseqqgtr: '\u2A8B',
|
||||
lessgtr: '\u2276',
|
||||
lesssim: '\u2272',
|
||||
lfisht: '\u297C',
|
||||
lfloor: '\u230A',
|
||||
lg: '\u2276',
|
||||
lgE: '\u2A91',
|
||||
lhard: '\u21BD',
|
||||
lharu: '\u21BC',
|
||||
lharul: '\u296A',
|
||||
lhblk: '\u2584',
|
||||
ljcy: '\u0459',
|
||||
ll: '\u226A',
|
||||
llarr: '\u21C7',
|
||||
llcorner: '\u231E',
|
||||
llhard: '\u296B',
|
||||
lltri: '\u25FA',
|
||||
lmidot: '\u0140',
|
||||
lmoustache: '\u23B0',
|
||||
lnapprox: '\u2A89',
|
||||
lneq: '\u2A87',
|
||||
lneqq: '\u2268',
|
||||
loang: '\u27EC',
|
||||
loarr: '\u21FD',
|
||||
lobrk: '\u27E6',
|
||||
longleftarrow: '\u27F5',
|
||||
longleftrightarrow: '\u27F7',
|
||||
longrightarrow: '\u27F6',
|
||||
looparrowleft: '\u21AB',
|
||||
lopar: '\u2985',
|
||||
loplus: '\u2A2D',
|
||||
lotimes: '\u2A34',
|
||||
lowbar: '\u005F',
|
||||
lozenge: '\u25CA',
|
||||
lozf: '\u29EB',
|
||||
lpar: '\u0028',
|
||||
lparlt: '\u2993',
|
||||
lrarr: '\u21C6',
|
||||
lrcorner: '\u231F',
|
||||
lrhar: '\u21CB',
|
||||
lrhard: '\u296D',
|
||||
lrm: '\u200E',
|
||||
lrtri: '\u22BF',
|
||||
lsaquo: '\u2039',
|
||||
lsh: '\u21B0',
|
||||
lsim: '\u2272',
|
||||
lsime: '\u2A8D',
|
||||
lsimg: '\u2A8F',
|
||||
lsqb: '\u005B',
|
||||
lsquo: '\u2018',
|
||||
lsquor: '\u201A',
|
||||
lstrok: '\u0142',
|
||||
ltcc: '\u2AA6',
|
||||
ltcir: '\u2A79',
|
||||
ltdot: '\u22D6',
|
||||
lthree: '\u22CB',
|
||||
ltlarr: '\u2976',
|
||||
ltquest: '\u2A7B',
|
||||
ltrPar: '\u2996',
|
||||
ltrie: '\u22B4',
|
||||
ltrif: '\u25C2',
|
||||
lurdshar: '\u294A',
|
||||
luruhar: '\u2966',
|
||||
lvertneqq: '\u2268\uFE00',
|
||||
lvnE: '\u2268\uFE00'
|
||||
}, 'l');
|
||||
55
node_modules/mathjax-full/ts/util/entities/m.ts
generated
vendored
Normal file
55
node_modules/mathjax-full/ts/util/entities/m.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Map: '\u2905',
|
||||
Mcy: '\u041C',
|
||||
MediumSpace: '\u205F',
|
||||
Mellintrf: '\u2133',
|
||||
Mu: '\u039C',
|
||||
mDDot: '\u223A',
|
||||
male: '\u2642',
|
||||
maltese: '\u2720',
|
||||
map: '\u21A6',
|
||||
mapsto: '\u21A6',
|
||||
mapstodown: '\u21A7',
|
||||
mapstoleft: '\u21A4',
|
||||
mapstoup: '\u21A5',
|
||||
marker: '\u25AE',
|
||||
mcomma: '\u2A29',
|
||||
mcy: '\u043C',
|
||||
mdash: '\u2014',
|
||||
measuredangle: '\u2221',
|
||||
micro: '\u00B5',
|
||||
mid: '\u2223',
|
||||
midast: '\u002A',
|
||||
midcir: '\u2AF0',
|
||||
middot: '\u00B7',
|
||||
minus: '\u2212',
|
||||
minusb: '\u229F',
|
||||
minusd: '\u2238',
|
||||
minusdu: '\u2A2A',
|
||||
mlcp: '\u2ADB',
|
||||
mldr: '\u2026',
|
||||
mnplus: '\u2213',
|
||||
models: '\u22A7',
|
||||
mp: '\u2213',
|
||||
mstpos: '\u223E',
|
||||
mumap: '\u22B8'
|
||||
}, 'm');
|
||||
214
node_modules/mathjax-full/ts/util/entities/n.ts
generated
vendored
Normal file
214
node_modules/mathjax-full/ts/util/entities/n.ts
generated
vendored
Normal file
@@ -0,0 +1,214 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
NJcy: '\u040A',
|
||||
Nacute: '\u0143',
|
||||
Ncaron: '\u0147',
|
||||
Ncedil: '\u0145',
|
||||
Ncy: '\u041D',
|
||||
NegativeMediumSpace: '\u200B',
|
||||
NegativeThickSpace: '\u200B',
|
||||
NegativeThinSpace: '\u200B',
|
||||
NegativeVeryThinSpace: '\u200B',
|
||||
NewLine: '\u000A',
|
||||
NoBreak: '\u2060',
|
||||
NonBreakingSpace: '\u00A0',
|
||||
Not: '\u2AEC',
|
||||
NotCongruent: '\u2262',
|
||||
NotCupCap: '\u226D',
|
||||
NotEqualTilde: '\u2242\u0338',
|
||||
NotGreaterFullEqual: '\u2267\u0338',
|
||||
NotGreaterGreater: '\u226B\u0338',
|
||||
NotGreaterLess: '\u2279',
|
||||
NotGreaterSlantEqual: '\u2A7E\u0338',
|
||||
NotGreaterTilde: '\u2275',
|
||||
NotHumpDownHump: '\u224E\u0338',
|
||||
NotHumpEqual: '\u224F\u0338',
|
||||
NotLeftTriangleBar: '\u29CF\u0338',
|
||||
NotLessGreater: '\u2278',
|
||||
NotLessLess: '\u226A\u0338',
|
||||
NotLessSlantEqual: '\u2A7D\u0338',
|
||||
NotLessTilde: '\u2274',
|
||||
NotNestedGreaterGreater: '\u2AA2\u0338',
|
||||
NotNestedLessLess: '\u2AA1\u0338',
|
||||
NotPrecedesEqual: '\u2AAF\u0338',
|
||||
NotReverseElement: '\u220C',
|
||||
NotRightTriangleBar: '\u29D0\u0338',
|
||||
NotSquareSubset: '\u228F\u0338',
|
||||
NotSquareSubsetEqual: '\u22E2',
|
||||
NotSquareSuperset: '\u2290\u0338',
|
||||
NotSquareSupersetEqual: '\u22E3',
|
||||
NotSubset: '\u2282\u20D2',
|
||||
NotSucceedsEqual: '\u2AB0\u0338',
|
||||
NotSucceedsTilde: '\u227F\u0338',
|
||||
NotSuperset: '\u2283\u20D2',
|
||||
NotTildeEqual: '\u2244',
|
||||
NotTildeFullEqual: '\u2247',
|
||||
NotTildeTilde: '\u2249',
|
||||
Ntilde: '\u00D1',
|
||||
Nu: '\u039D',
|
||||
nGg: '\u22D9\u0338',
|
||||
nGt: '\u226B\u20D2',
|
||||
nGtv: '\u226B\u0338',
|
||||
nLl: '\u22D8\u0338',
|
||||
nLt: '\u226A\u20D2',
|
||||
nLtv: '\u226A\u0338',
|
||||
nabla: '\u2207',
|
||||
nacute: '\u0144',
|
||||
nang: '\u2220\u20D2',
|
||||
nap: '\u2249',
|
||||
napE: '\u2A70\u0338',
|
||||
napid: '\u224B\u0338',
|
||||
napos: '\u0149',
|
||||
napprox: '\u2249',
|
||||
natural: '\u266E',
|
||||
naturals: '\u2115',
|
||||
nbsp: '\u00A0',
|
||||
nbump: '\u224E\u0338',
|
||||
nbumpe: '\u224F\u0338',
|
||||
ncap: '\u2A43',
|
||||
ncaron: '\u0148',
|
||||
ncedil: '\u0146',
|
||||
ncong: '\u2247',
|
||||
ncongdot: '\u2A6D\u0338',
|
||||
ncup: '\u2A42',
|
||||
ncy: '\u043D',
|
||||
ndash: '\u2013',
|
||||
ne: '\u2260',
|
||||
neArr: '\u21D7',
|
||||
nearhk: '\u2924',
|
||||
nearrow: '\u2197',
|
||||
nedot: '\u2250\u0338',
|
||||
nequiv: '\u2262',
|
||||
nesear: '\u2928',
|
||||
nesim: '\u2242\u0338',
|
||||
nexist: '\u2204',
|
||||
nexists: '\u2204',
|
||||
ngE: '\u2267\u0338',
|
||||
nge: '\u2271',
|
||||
ngeq: '\u2271',
|
||||
ngeqq: '\u2267\u0338',
|
||||
ngeqslant: '\u2A7E\u0338',
|
||||
nges: '\u2A7E\u0338',
|
||||
ngsim: '\u2275',
|
||||
ngt: '\u226F',
|
||||
ngtr: '\u226F',
|
||||
nhArr: '\u21CE',
|
||||
nhpar: '\u2AF2',
|
||||
ni: '\u220B',
|
||||
nis: '\u22FC',
|
||||
nisd: '\u22FA',
|
||||
niv: '\u220B',
|
||||
njcy: '\u045A',
|
||||
nlArr: '\u21CD',
|
||||
nlE: '\u2266\u0338',
|
||||
nldr: '\u2025',
|
||||
nle: '\u2270',
|
||||
nleftarrow: '\u219A',
|
||||
nleftrightarrow: '\u21AE',
|
||||
nleq: '\u2270',
|
||||
nleqq: '\u2266\u0338',
|
||||
nleqslant: '\u2A7D\u0338',
|
||||
nles: '\u2A7D\u0338',
|
||||
nless: '\u226E',
|
||||
nlsim: '\u2274',
|
||||
nlt: '\u226E',
|
||||
nltri: '\u22EA',
|
||||
nltrie: '\u22EC',
|
||||
nmid: '\u2224',
|
||||
notin: '\u2209',
|
||||
notinE: '\u22F9\u0338',
|
||||
notindot: '\u22F5\u0338',
|
||||
notinva: '\u2209',
|
||||
notinvb: '\u22F7',
|
||||
notinvc: '\u22F6',
|
||||
notni: '\u220C',
|
||||
notniva: '\u220C',
|
||||
notnivb: '\u22FE',
|
||||
notnivc: '\u22FD',
|
||||
npar: '\u2226',
|
||||
nparallel: '\u2226',
|
||||
nparsl: '\u2AFD\u20E5',
|
||||
npart: '\u2202\u0338',
|
||||
npolint: '\u2A14',
|
||||
npr: '\u2280',
|
||||
nprcue: '\u22E0',
|
||||
npre: '\u2AAF\u0338',
|
||||
nprec: '\u2280',
|
||||
npreceq: '\u2AAF\u0338',
|
||||
nrArr: '\u21CF',
|
||||
nrarrc: '\u2933\u0338',
|
||||
nrarrw: '\u219D\u0338',
|
||||
nrightarrow: '\u219B',
|
||||
nrtri: '\u22EB',
|
||||
nrtrie: '\u22ED',
|
||||
nsc: '\u2281',
|
||||
nsccue: '\u22E1',
|
||||
nsce: '\u2AB0\u0338',
|
||||
nshortmid: '\u2224',
|
||||
nshortparallel: '\u2226',
|
||||
nsim: '\u2241',
|
||||
nsime: '\u2244',
|
||||
nsimeq: '\u2244',
|
||||
nsmid: '\u2224',
|
||||
nspar: '\u2226',
|
||||
nsqsube: '\u22E2',
|
||||
nsqsupe: '\u22E3',
|
||||
nsub: '\u2284',
|
||||
nsubE: '\u2AC5\u0338',
|
||||
nsube: '\u2288',
|
||||
nsubset: '\u2282\u20D2',
|
||||
nsubseteq: '\u2288',
|
||||
nsubseteqq: '\u2AC5\u0338',
|
||||
nsucc: '\u2281',
|
||||
nsucceq: '\u2AB0\u0338',
|
||||
nsup: '\u2285',
|
||||
nsupE: '\u2AC6\u0338',
|
||||
nsupe: '\u2289',
|
||||
nsupset: '\u2283\u20D2',
|
||||
nsupseteq: '\u2289',
|
||||
nsupseteqq: '\u2AC6\u0338',
|
||||
ntgl: '\u2279',
|
||||
ntilde: '\u00F1',
|
||||
ntlg: '\u2278',
|
||||
ntriangleleft: '\u22EA',
|
||||
ntrianglelefteq: '\u22EC',
|
||||
ntriangleright: '\u22EB',
|
||||
ntrianglerighteq: '\u22ED',
|
||||
num: '\u0023',
|
||||
numero: '\u2116',
|
||||
numsp: '\u2007',
|
||||
nvHarr: '\u2904',
|
||||
nvap: '\u224D\u20D2',
|
||||
nvge: '\u2265\u20D2',
|
||||
nvgt: '\u003E\u20D2',
|
||||
nvinfin: '\u29DE',
|
||||
nvlArr: '\u2902',
|
||||
nvle: '\u2264\u20D2',
|
||||
nvlt: '\u003C\u20D2',
|
||||
nvltrie: '\u22B4\u20D2',
|
||||
nvrArr: '\u2903',
|
||||
nvrtrie: '\u22B5\u20D2',
|
||||
nvsim: '\u223C\u20D2',
|
||||
nwArr: '\u21D6',
|
||||
nwarhk: '\u2923',
|
||||
nwarrow: '\u2196',
|
||||
nwnear: '\u2927'
|
||||
}, 'n');
|
||||
84
node_modules/mathjax-full/ts/util/entities/o.ts
generated
vendored
Normal file
84
node_modules/mathjax-full/ts/util/entities/o.ts
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
OElig: '\u0152',
|
||||
Oacute: '\u00D3',
|
||||
Ocirc: '\u00D4',
|
||||
Ocy: '\u041E',
|
||||
Odblac: '\u0150',
|
||||
Ograve: '\u00D2',
|
||||
Omacr: '\u014C',
|
||||
Omicron: '\u039F',
|
||||
OpenCurlyDoubleQuote: '\u201C',
|
||||
OpenCurlyQuote: '\u2018',
|
||||
Or: '\u2A54',
|
||||
Oslash: '\u00D8',
|
||||
Otilde: '\u00D5',
|
||||
Otimes: '\u2A37',
|
||||
Ouml: '\u00D6',
|
||||
OverBracket: '\u23B4',
|
||||
OverParenthesis: '\u23DC',
|
||||
oS: '\u24C8',
|
||||
oacute: '\u00F3',
|
||||
oast: '\u229B',
|
||||
ocir: '\u229A',
|
||||
ocirc: '\u00F4',
|
||||
ocy: '\u043E',
|
||||
odash: '\u229D',
|
||||
odblac: '\u0151',
|
||||
odiv: '\u2A38',
|
||||
odot: '\u2299',
|
||||
odsold: '\u29BC',
|
||||
oelig: '\u0153',
|
||||
ofcir: '\u29BF',
|
||||
ogon: '\u02DB',
|
||||
ograve: '\u00F2',
|
||||
ogt: '\u29C1',
|
||||
ohbar: '\u29B5',
|
||||
ohm: '\u03A9',
|
||||
oint: '\u222E',
|
||||
olarr: '\u21BA',
|
||||
olcir: '\u29BE',
|
||||
olcross: '\u29BB',
|
||||
oline: '\u203E',
|
||||
olt: '\u29C0',
|
||||
omacr: '\u014D',
|
||||
omid: '\u29B6',
|
||||
ominus: '\u2296',
|
||||
opar: '\u29B7',
|
||||
operp: '\u29B9',
|
||||
oplus: '\u2295',
|
||||
orarr: '\u21BB',
|
||||
ord: '\u2A5D',
|
||||
order: '\u2134',
|
||||
orderof: '\u2134',
|
||||
ordf: '\u00AA',
|
||||
ordm: '\u00BA',
|
||||
origof: '\u22B6',
|
||||
oror: '\u2A56',
|
||||
orslope: '\u2A57',
|
||||
orv: '\u2A5B',
|
||||
oslash: '\u00F8',
|
||||
otilde: '\u00F5',
|
||||
otimes: '\u2297',
|
||||
otimesas: '\u2A36',
|
||||
ouml: '\u00F6',
|
||||
ovbar: '\u233D'
|
||||
}, 'o');
|
||||
73
node_modules/mathjax-full/ts/util/entities/opf.ts
generated
vendored
Normal file
73
node_modules/mathjax-full/ts/util/entities/opf.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Aopf: '\uD835\uDD38',
|
||||
Bopf: '\uD835\uDD39',
|
||||
Copf: '\u2102',
|
||||
Dopf: '\uD835\uDD3B',
|
||||
Eopf: '\uD835\uDD3C',
|
||||
Fopf: '\uD835\uDD3D',
|
||||
Gopf: '\uD835\uDD3E',
|
||||
Hopf: '\u210D',
|
||||
Iopf: '\uD835\uDD40',
|
||||
Jopf: '\uD835\uDD41',
|
||||
Kopf: '\uD835\uDD42',
|
||||
Lopf: '\uD835\uDD43',
|
||||
Mopf: '\uD835\uDD44',
|
||||
Nopf: '\u2115',
|
||||
Oopf: '\uD835\uDD46',
|
||||
Popf: '\u2119',
|
||||
Qopf: '\u211A',
|
||||
Ropf: '\u211D',
|
||||
Sopf: '\uD835\uDD4A',
|
||||
Topf: '\uD835\uDD4B',
|
||||
Uopf: '\uD835\uDD4C',
|
||||
Vopf: '\uD835\uDD4D',
|
||||
Wopf: '\uD835\uDD4E',
|
||||
Xopf: '\uD835\uDD4F',
|
||||
Yopf: '\uD835\uDD50',
|
||||
Zopf: '\u2124',
|
||||
aopf: '\uD835\uDD52',
|
||||
bopf: '\uD835\uDD53',
|
||||
copf: '\uD835\uDD54',
|
||||
dopf: '\uD835\uDD55',
|
||||
eopf: '\uD835\uDD56',
|
||||
fopf: '\uD835\uDD57',
|
||||
gopf: '\uD835\uDD58',
|
||||
hopf: '\uD835\uDD59',
|
||||
iopf: '\uD835\uDD5A',
|
||||
jopf: '\uD835\uDD5B',
|
||||
kopf: '\uD835\uDD5C',
|
||||
lopf: '\uD835\uDD5D',
|
||||
mopf: '\uD835\uDD5E',
|
||||
nopf: '\uD835\uDD5F',
|
||||
oopf: '\uD835\uDD60',
|
||||
popf: '\uD835\uDD61',
|
||||
qopf: '\uD835\uDD62',
|
||||
ropf: '\uD835\uDD63',
|
||||
sopf: '\uD835\uDD64',
|
||||
topf: '\uD835\uDD65',
|
||||
uopf: '\uD835\uDD66',
|
||||
vopf: '\uD835\uDD67',
|
||||
wopf: '\uD835\uDD68',
|
||||
xopf: '\uD835\uDD69',
|
||||
yopf: '\uD835\uDD6A',
|
||||
zopf: '\uD835\uDD6B'
|
||||
}, 'opf');
|
||||
78
node_modules/mathjax-full/ts/util/entities/p.ts
generated
vendored
Normal file
78
node_modules/mathjax-full/ts/util/entities/p.ts
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Pcy: '\u041F',
|
||||
Poincareplane: '\u210C',
|
||||
Pr: '\u2ABB',
|
||||
Prime: '\u2033',
|
||||
Proportion: '\u2237',
|
||||
par: '\u2225',
|
||||
para: '\u00B6',
|
||||
parallel: '\u2225',
|
||||
parsim: '\u2AF3',
|
||||
parsl: '\u2AFD',
|
||||
part: '\u2202',
|
||||
pcy: '\u043F',
|
||||
percnt: '\u0025',
|
||||
permil: '\u2030',
|
||||
perp: '\u22A5',
|
||||
pertenk: '\u2031',
|
||||
phmmat: '\u2133',
|
||||
phone: '\u260E',
|
||||
pitchfork: '\u22D4',
|
||||
planck: '\u210F',
|
||||
planckh: '\u210E',
|
||||
plankv: '\u210F',
|
||||
plus: '\u002B',
|
||||
plusacir: '\u2A23',
|
||||
plusb: '\u229E',
|
||||
pluscir: '\u2A22',
|
||||
plusdo: '\u2214',
|
||||
plusdu: '\u2A25',
|
||||
pluse: '\u2A72',
|
||||
plusmn: '\u00B1',
|
||||
plussim: '\u2A26',
|
||||
plustwo: '\u2A27',
|
||||
pm: '\u00B1',
|
||||
pointint: '\u2A15',
|
||||
pound: '\u00A3',
|
||||
pr: '\u227A',
|
||||
prE: '\u2AB3',
|
||||
prcue: '\u227C',
|
||||
pre: '\u2AAF',
|
||||
prec: '\u227A',
|
||||
precapprox: '\u2AB7',
|
||||
preccurlyeq: '\u227C',
|
||||
preceq: '\u2AAF',
|
||||
precsim: '\u227E',
|
||||
primes: '\u2119',
|
||||
prnE: '\u2AB5',
|
||||
prnap: '\u2AB9',
|
||||
prnsim: '\u22E8',
|
||||
prod: '\u220F',
|
||||
profalar: '\u232E',
|
||||
profline: '\u2312',
|
||||
profsurf: '\u2313',
|
||||
prop: '\u221D',
|
||||
propto: '\u221D',
|
||||
prsim: '\u227E',
|
||||
prurel: '\u22B0',
|
||||
puncsp: '\u2008'
|
||||
}, 'p');
|
||||
28
node_modules/mathjax-full/ts/util/entities/q.ts
generated
vendored
Normal file
28
node_modules/mathjax-full/ts/util/entities/q.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
QUOT: '\u0022',
|
||||
qint: '\u2A0C',
|
||||
qprime: '\u2057',
|
||||
quaternions: '\u210D',
|
||||
quatint: '\u2A16',
|
||||
quest: '\u003F',
|
||||
questeq: '\u225F'
|
||||
}, 'q');
|
||||
132
node_modules/mathjax-full/ts/util/entities/r.ts
generated
vendored
Normal file
132
node_modules/mathjax-full/ts/util/entities/r.ts
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
RBarr: '\u2910',
|
||||
REG: '\u00AE',
|
||||
Racute: '\u0154',
|
||||
Rang: '\u27EB',
|
||||
Rarrtl: '\u2916',
|
||||
Rcaron: '\u0158',
|
||||
Rcedil: '\u0156',
|
||||
Rcy: '\u0420',
|
||||
ReverseElement: '\u220B',
|
||||
ReverseUpEquilibrium: '\u296F',
|
||||
Rho: '\u03A1',
|
||||
RightArrowBar: '\u21E5',
|
||||
RightDoubleBracket: '\u27E7',
|
||||
RightDownTeeVector: '\u295D',
|
||||
RightDownVectorBar: '\u2955',
|
||||
RightTeeVector: '\u295B',
|
||||
RightTriangleBar: '\u29D0',
|
||||
RightUpDownVector: '\u294F',
|
||||
RightUpTeeVector: '\u295C',
|
||||
RightUpVectorBar: '\u2954',
|
||||
RightVectorBar: '\u2953',
|
||||
RoundImplies: '\u2970',
|
||||
RuleDelayed: '\u29F4',
|
||||
rAarr: '\u21DB',
|
||||
rArr: '\u21D2',
|
||||
rAtail: '\u291C',
|
||||
rBarr: '\u290F',
|
||||
rHar: '\u2964',
|
||||
race: '\u223D\u0331',
|
||||
racute: '\u0155',
|
||||
radic: '\u221A',
|
||||
raemptyv: '\u29B3',
|
||||
rang: '\u27E9',
|
||||
rangd: '\u2992',
|
||||
range: '\u29A5',
|
||||
rangle: '\u27E9',
|
||||
raquo: '\u00BB',
|
||||
rarr: '\u2192',
|
||||
rarrap: '\u2975',
|
||||
rarrb: '\u21E5',
|
||||
rarrbfs: '\u2920',
|
||||
rarrc: '\u2933',
|
||||
rarrfs: '\u291E',
|
||||
rarrhk: '\u21AA',
|
||||
rarrlp: '\u21AC',
|
||||
rarrpl: '\u2945',
|
||||
rarrsim: '\u2974',
|
||||
rarrw: '\u219D',
|
||||
ratail: '\u291A',
|
||||
ratio: '\u2236',
|
||||
rationals: '\u211A',
|
||||
rbarr: '\u290D',
|
||||
rbbrk: '\u2773',
|
||||
rbrke: '\u298C',
|
||||
rbrksld: '\u298E',
|
||||
rbrkslu: '\u2990',
|
||||
rcaron: '\u0159',
|
||||
rcedil: '\u0157',
|
||||
rceil: '\u2309',
|
||||
rcub: '\u007D',
|
||||
rcy: '\u0440',
|
||||
rdca: '\u2937',
|
||||
rdldhar: '\u2969',
|
||||
rdquo: '\u201D',
|
||||
rdquor: '\u201D',
|
||||
rdsh: '\u21B3',
|
||||
real: '\u211C',
|
||||
realine: '\u211B',
|
||||
realpart: '\u211C',
|
||||
reals: '\u211D',
|
||||
rect: '\u25AD',
|
||||
reg: '\u00AE',
|
||||
rfisht: '\u297D',
|
||||
rfloor: '\u230B',
|
||||
rhard: '\u21C1',
|
||||
rharu: '\u21C0',
|
||||
rharul: '\u296C',
|
||||
rightarrow: '\u2192',
|
||||
rightarrowtail: '\u21A3',
|
||||
rightharpoondown: '\u21C1',
|
||||
rightharpoonup: '\u21C0',
|
||||
rightleftarrows: '\u21C4',
|
||||
rightleftharpoons: '\u21CC',
|
||||
rightsquigarrow: '\u219D',
|
||||
risingdotseq: '\u2253',
|
||||
rlarr: '\u21C4',
|
||||
rlhar: '\u21CC',
|
||||
rlm: '\u200F',
|
||||
rmoustache: '\u23B1',
|
||||
rnmid: '\u2AEE',
|
||||
roang: '\u27ED',
|
||||
roarr: '\u21FE',
|
||||
robrk: '\u27E7',
|
||||
ropar: '\u2986',
|
||||
roplus: '\u2A2E',
|
||||
rotimes: '\u2A35',
|
||||
rpar: '\u0029',
|
||||
rpargt: '\u2994',
|
||||
rppolint: '\u2A12',
|
||||
rrarr: '\u21C9',
|
||||
rsaquo: '\u203A',
|
||||
rsh: '\u21B1',
|
||||
rsqb: '\u005D',
|
||||
rsquo: '\u2019',
|
||||
rsquor: '\u2019',
|
||||
rthree: '\u22CC',
|
||||
rtrie: '\u22B5',
|
||||
rtrif: '\u25B8',
|
||||
rtriltri: '\u29CE',
|
||||
ruluhar: '\u2968',
|
||||
rx: '\u211E'
|
||||
}, 'r');
|
||||
164
node_modules/mathjax-full/ts/util/entities/s.ts
generated
vendored
Normal file
164
node_modules/mathjax-full/ts/util/entities/s.ts
generated
vendored
Normal file
@@ -0,0 +1,164 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
SHCHcy: '\u0429',
|
||||
SHcy: '\u0428',
|
||||
SOFTcy: '\u042C',
|
||||
Sacute: '\u015A',
|
||||
Sc: '\u2ABC',
|
||||
Scaron: '\u0160',
|
||||
Scedil: '\u015E',
|
||||
Scirc: '\u015C',
|
||||
Scy: '\u0421',
|
||||
ShortDownArrow: '\u2193',
|
||||
ShortLeftArrow: '\u2190',
|
||||
ShortRightArrow: '\u2192',
|
||||
ShortUpArrow: '\u2191',
|
||||
Sub: '\u22D0',
|
||||
Sup: '\u22D1',
|
||||
sacute: '\u015B',
|
||||
sbquo: '\u201A',
|
||||
sc: '\u227B',
|
||||
scE: '\u2AB4',
|
||||
scaron: '\u0161',
|
||||
sccue: '\u227D',
|
||||
sce: '\u2AB0',
|
||||
scedil: '\u015F',
|
||||
scirc: '\u015D',
|
||||
scpolint: '\u2A13',
|
||||
scsim: '\u227F',
|
||||
scy: '\u0441',
|
||||
sdotb: '\u22A1',
|
||||
sdote: '\u2A66',
|
||||
seArr: '\u21D8',
|
||||
searhk: '\u2925',
|
||||
searrow: '\u2198',
|
||||
semi: '\u003B',
|
||||
seswar: '\u2929',
|
||||
setminus: '\u2216',
|
||||
setmn: '\u2216',
|
||||
sext: '\u2736',
|
||||
sfrown: '\u2322',
|
||||
shchcy: '\u0449',
|
||||
shcy: '\u0448',
|
||||
shortmid: '\u2223',
|
||||
shortparallel: '\u2225',
|
||||
shy: '\u00AD',
|
||||
sigmaf: '\u03C2',
|
||||
sim: '\u223C',
|
||||
simdot: '\u2A6A',
|
||||
sime: '\u2243',
|
||||
simeq: '\u2243',
|
||||
simg: '\u2A9E',
|
||||
simgE: '\u2AA0',
|
||||
siml: '\u2A9D',
|
||||
simlE: '\u2A9F',
|
||||
simplus: '\u2A24',
|
||||
simrarr: '\u2972',
|
||||
slarr: '\u2190',
|
||||
smallsetminus: '\u2216',
|
||||
smashp: '\u2A33',
|
||||
smeparsl: '\u29E4',
|
||||
smid: '\u2223',
|
||||
smt: '\u2AAA',
|
||||
smte: '\u2AAC',
|
||||
smtes: '\u2AAC\uFE00',
|
||||
softcy: '\u044C',
|
||||
sol: '\u002F',
|
||||
solb: '\u29C4',
|
||||
solbar: '\u233F',
|
||||
spadesuit: '\u2660',
|
||||
spar: '\u2225',
|
||||
sqcap: '\u2293',
|
||||
sqcaps: '\u2293\uFE00',
|
||||
sqcup: '\u2294',
|
||||
sqcups: '\u2294\uFE00',
|
||||
sqsub: '\u228F',
|
||||
sqsube: '\u2291',
|
||||
sqsubset: '\u228F',
|
||||
sqsubseteq: '\u2291',
|
||||
sqsup: '\u2290',
|
||||
sqsupe: '\u2292',
|
||||
sqsupset: '\u2290',
|
||||
sqsupseteq: '\u2292',
|
||||
squ: '\u25A1',
|
||||
square: '\u25A1',
|
||||
squarf: '\u25AA',
|
||||
squf: '\u25AA',
|
||||
srarr: '\u2192',
|
||||
ssetmn: '\u2216',
|
||||
ssmile: '\u2323',
|
||||
sstarf: '\u22C6',
|
||||
star: '\u2606',
|
||||
starf: '\u2605',
|
||||
straightepsilon: '\u03F5',
|
||||
straightphi: '\u03D5',
|
||||
strns: '\u00AF',
|
||||
subdot: '\u2ABD',
|
||||
sube: '\u2286',
|
||||
subedot: '\u2AC3',
|
||||
submult: '\u2AC1',
|
||||
subplus: '\u2ABF',
|
||||
subrarr: '\u2979',
|
||||
subset: '\u2282',
|
||||
subseteq: '\u2286',
|
||||
subseteqq: '\u2AC5',
|
||||
subsetneq: '\u228A',
|
||||
subsetneqq: '\u2ACB',
|
||||
subsim: '\u2AC7',
|
||||
subsub: '\u2AD5',
|
||||
subsup: '\u2AD3',
|
||||
succ: '\u227B',
|
||||
succapprox: '\u2AB8',
|
||||
succcurlyeq: '\u227D',
|
||||
succeq: '\u2AB0',
|
||||
succnapprox: '\u2ABA',
|
||||
succneqq: '\u2AB6',
|
||||
succnsim: '\u22E9',
|
||||
succsim: '\u227F',
|
||||
sum: '\u2211',
|
||||
sung: '\u266A',
|
||||
sup: '\u2283',
|
||||
sup1: '\u00B9',
|
||||
sup2: '\u00B2',
|
||||
sup3: '\u00B3',
|
||||
supdot: '\u2ABE',
|
||||
supdsub: '\u2AD8',
|
||||
supe: '\u2287',
|
||||
supedot: '\u2AC4',
|
||||
suphsol: '\u27C9',
|
||||
suphsub: '\u2AD7',
|
||||
suplarr: '\u297B',
|
||||
supmult: '\u2AC2',
|
||||
supplus: '\u2AC0',
|
||||
supset: '\u2283',
|
||||
supseteq: '\u2287',
|
||||
supseteqq: '\u2AC6',
|
||||
supsetneq: '\u228B',
|
||||
supsetneqq: '\u2ACC',
|
||||
supsim: '\u2AC8',
|
||||
supsub: '\u2AD4',
|
||||
supsup: '\u2AD6',
|
||||
swArr: '\u21D9',
|
||||
swarhk: '\u2926',
|
||||
swarrow: '\u2199',
|
||||
swnwar: '\u292A',
|
||||
szlig: '\u00DF'
|
||||
}, 's');
|
||||
73
node_modules/mathjax-full/ts/util/entities/scr.ts
generated
vendored
Normal file
73
node_modules/mathjax-full/ts/util/entities/scr.ts
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Ascr: '\uD835\uDC9C',
|
||||
Bscr: '\u212C',
|
||||
Cscr: '\uD835\uDC9E',
|
||||
Dscr: '\uD835\uDC9F',
|
||||
Escr: '\u2130',
|
||||
Fscr: '\u2131',
|
||||
Gscr: '\uD835\uDCA2',
|
||||
Hscr: '\u210B',
|
||||
Iscr: '\u2110',
|
||||
Jscr: '\uD835\uDCA5',
|
||||
Kscr: '\uD835\uDCA6',
|
||||
Lscr: '\u2112',
|
||||
Mscr: '\u2133',
|
||||
Nscr: '\uD835\uDCA9',
|
||||
Oscr: '\uD835\uDCAA',
|
||||
Pscr: '\uD835\uDCAB',
|
||||
Qscr: '\uD835\uDCAC',
|
||||
Rscr: '\u211B',
|
||||
Sscr: '\uD835\uDCAE',
|
||||
Tscr: '\uD835\uDCAF',
|
||||
Uscr: '\uD835\uDCB0',
|
||||
Vscr: '\uD835\uDCB1',
|
||||
Wscr: '\uD835\uDCB2',
|
||||
Xscr: '\uD835\uDCB3',
|
||||
Yscr: '\uD835\uDCB4',
|
||||
Zscr: '\uD835\uDCB5',
|
||||
ascr: '\uD835\uDCB6',
|
||||
bscr: '\uD835\uDCB7',
|
||||
cscr: '\uD835\uDCB8',
|
||||
dscr: '\uD835\uDCB9',
|
||||
escr: '\u212F',
|
||||
fscr: '\uD835\uDCBB',
|
||||
gscr: '\u210A',
|
||||
hscr: '\uD835\uDCBD',
|
||||
iscr: '\uD835\uDCBE',
|
||||
jscr: '\uD835\uDCBF',
|
||||
kscr: '\uD835\uDCC0',
|
||||
lscr: '\uD835\uDCC1',
|
||||
mscr: '\uD835\uDCC2',
|
||||
nscr: '\uD835\uDCC3',
|
||||
oscr: '\u2134',
|
||||
pscr: '\uD835\uDCC5',
|
||||
qscr: '\uD835\uDCC6',
|
||||
rscr: '\uD835\uDCC7',
|
||||
sscr: '\uD835\uDCC8',
|
||||
tscr: '\uD835\uDCC9',
|
||||
uscr: '\uD835\uDCCA',
|
||||
vscr: '\uD835\uDCCB',
|
||||
wscr: '\uD835\uDCCC',
|
||||
xscr: '\uD835\uDCCD',
|
||||
yscr: '\uD835\uDCCE',
|
||||
zscr: '\uD835\uDCCF'
|
||||
}, 'scr');
|
||||
80
node_modules/mathjax-full/ts/util/entities/t.ts
generated
vendored
Normal file
80
node_modules/mathjax-full/ts/util/entities/t.ts
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
THORN: '\u00DE',
|
||||
TRADE: '\u2122',
|
||||
TSHcy: '\u040B',
|
||||
TScy: '\u0426',
|
||||
Tab: '\u0009',
|
||||
Tau: '\u03A4',
|
||||
Tcaron: '\u0164',
|
||||
Tcedil: '\u0162',
|
||||
Tcy: '\u0422',
|
||||
ThickSpace: '\u205F\u200A',
|
||||
ThinSpace: '\u2009',
|
||||
TripleDot: '\u20DB',
|
||||
Tstrok: '\u0166',
|
||||
target: '\u2316',
|
||||
tbrk: '\u23B4',
|
||||
tcaron: '\u0165',
|
||||
tcedil: '\u0163',
|
||||
tcy: '\u0442',
|
||||
tdot: '\u20DB',
|
||||
telrec: '\u2315',
|
||||
there4: '\u2234',
|
||||
therefore: '\u2234',
|
||||
thetasym: '\u03D1',
|
||||
thickapprox: '\u2248',
|
||||
thicksim: '\u223C',
|
||||
thinsp: '\u2009',
|
||||
thkap: '\u2248',
|
||||
thksim: '\u223C',
|
||||
thorn: '\u00FE',
|
||||
timesb: '\u22A0',
|
||||
timesbar: '\u2A31',
|
||||
timesd: '\u2A30',
|
||||
tint: '\u222D',
|
||||
toea: '\u2928',
|
||||
top: '\u22A4',
|
||||
topbot: '\u2336',
|
||||
topcir: '\u2AF1',
|
||||
topfork: '\u2ADA',
|
||||
tosa: '\u2929',
|
||||
tprime: '\u2034',
|
||||
trade: '\u2122',
|
||||
triangledown: '\u25BF',
|
||||
triangleleft: '\u25C3',
|
||||
trianglelefteq: '\u22B4',
|
||||
triangleright: '\u25B9',
|
||||
trianglerighteq: '\u22B5',
|
||||
tridot: '\u25EC',
|
||||
trie: '\u225C',
|
||||
triminus: '\u2A3A',
|
||||
triplus: '\u2A39',
|
||||
trisb: '\u29CD',
|
||||
tritime: '\u2A3B',
|
||||
trpezium: '\u23E2',
|
||||
tscy: '\u0446',
|
||||
tshcy: '\u045B',
|
||||
tstrok: '\u0167',
|
||||
twixt: '\u226C',
|
||||
twoheadleftarrow: '\u219E',
|
||||
twoheadrightarrow: '\u21A0'
|
||||
}, 't');
|
||||
86
node_modules/mathjax-full/ts/util/entities/u.ts
generated
vendored
Normal file
86
node_modules/mathjax-full/ts/util/entities/u.ts
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Uacute: '\u00DA',
|
||||
Uarr: '\u219F',
|
||||
Uarrocir: '\u2949',
|
||||
Ubrcy: '\u040E',
|
||||
Ubreve: '\u016C',
|
||||
Ucirc: '\u00DB',
|
||||
Ucy: '\u0423',
|
||||
Udblac: '\u0170',
|
||||
Ugrave: '\u00D9',
|
||||
Umacr: '\u016A',
|
||||
UnderBracket: '\u23B5',
|
||||
UnderParenthesis: '\u23DD',
|
||||
Uogon: '\u0172',
|
||||
UpArrowBar: '\u2912',
|
||||
UpArrowDownArrow: '\u21C5',
|
||||
UpEquilibrium: '\u296E',
|
||||
UpTeeArrow: '\u21A5',
|
||||
UpperLeftArrow: '\u2196',
|
||||
UpperRightArrow: '\u2197',
|
||||
Upsi: '\u03D2',
|
||||
Uring: '\u016E',
|
||||
Utilde: '\u0168',
|
||||
Uuml: '\u00DC',
|
||||
uArr: '\u21D1',
|
||||
uHar: '\u2963',
|
||||
uacute: '\u00FA',
|
||||
uarr: '\u2191',
|
||||
ubrcy: '\u045E',
|
||||
ubreve: '\u016D',
|
||||
ucirc: '\u00FB',
|
||||
ucy: '\u0443',
|
||||
udarr: '\u21C5',
|
||||
udblac: '\u0171',
|
||||
udhar: '\u296E',
|
||||
ufisht: '\u297E',
|
||||
ugrave: '\u00F9',
|
||||
uharl: '\u21BF',
|
||||
uharr: '\u21BE',
|
||||
uhblk: '\u2580',
|
||||
ulcorn: '\u231C',
|
||||
ulcorner: '\u231C',
|
||||
ulcrop: '\u230F',
|
||||
ultri: '\u25F8',
|
||||
umacr: '\u016B',
|
||||
uml: '\u00A8',
|
||||
uogon: '\u0173',
|
||||
uparrow: '\u2191',
|
||||
updownarrow: '\u2195',
|
||||
upharpoonleft: '\u21BF',
|
||||
upharpoonright: '\u21BE',
|
||||
uplus: '\u228E',
|
||||
upsih: '\u03D2',
|
||||
upsilon: '\u03C5',
|
||||
urcorn: '\u231D',
|
||||
urcorner: '\u231D',
|
||||
urcrop: '\u230E',
|
||||
uring: '\u016F',
|
||||
urtri: '\u25F9',
|
||||
utdot: '\u22F0',
|
||||
utilde: '\u0169',
|
||||
utri: '\u25B5',
|
||||
utrif: '\u25B4',
|
||||
uuarr: '\u21C8',
|
||||
uuml: '\u00FC',
|
||||
uwangle: '\u29A7'
|
||||
}, 'u');
|
||||
67
node_modules/mathjax-full/ts/util/entities/v.ts
generated
vendored
Normal file
67
node_modules/mathjax-full/ts/util/entities/v.ts
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
VDash: '\u22AB',
|
||||
Vbar: '\u2AEB',
|
||||
Vcy: '\u0412',
|
||||
Vdashl: '\u2AE6',
|
||||
Verbar: '\u2016',
|
||||
Vert: '\u2016',
|
||||
VerticalLine: '\u007C',
|
||||
VerticalSeparator: '\u2758',
|
||||
VeryThinSpace: '\u200A',
|
||||
vArr: '\u21D5',
|
||||
vBar: '\u2AE8',
|
||||
vBarv: '\u2AE9',
|
||||
vDash: '\u22A8',
|
||||
vangrt: '\u299C',
|
||||
varepsilon: '\u03F5',
|
||||
varkappa: '\u03F0',
|
||||
varnothing: '\u2205',
|
||||
varphi: '\u03D5',
|
||||
varpi: '\u03D6',
|
||||
varpropto: '\u221D',
|
||||
varr: '\u2195',
|
||||
varrho: '\u03F1',
|
||||
varsigma: '\u03C2',
|
||||
varsubsetneq: '\u228A\uFE00',
|
||||
varsubsetneqq: '\u2ACB\uFE00',
|
||||
varsupsetneq: '\u228B\uFE00',
|
||||
varsupsetneqq: '\u2ACC\uFE00',
|
||||
vartheta: '\u03D1',
|
||||
vartriangleleft: '\u22B2',
|
||||
vartriangleright: '\u22B3',
|
||||
vcy: '\u0432',
|
||||
vdash: '\u22A2',
|
||||
vee: '\u2228',
|
||||
veeeq: '\u225A',
|
||||
verbar: '\u007C',
|
||||
vert: '\u007C',
|
||||
vltri: '\u22B2',
|
||||
vnsub: '\u2282\u20D2',
|
||||
vnsup: '\u2283\u20D2',
|
||||
vprop: '\u221D',
|
||||
vrtri: '\u22B3',
|
||||
vsubnE: '\u2ACB\uFE00',
|
||||
vsubne: '\u228A\uFE00',
|
||||
vsupnE: '\u2ACC\uFE00',
|
||||
vsupne: '\u228B\uFE00',
|
||||
vzigzag: '\u299A'
|
||||
}, 'v');
|
||||
29
node_modules/mathjax-full/ts/util/entities/w.ts
generated
vendored
Normal file
29
node_modules/mathjax-full/ts/util/entities/w.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
Wcirc: '\u0174',
|
||||
wcirc: '\u0175',
|
||||
wedbar: '\u2A5F',
|
||||
wedge: '\u2227',
|
||||
wedgeq: '\u2259',
|
||||
wp: '\u2118',
|
||||
wr: '\u2240',
|
||||
wreath: '\u2240'
|
||||
}, 'w');
|
||||
41
node_modules/mathjax-full/ts/util/entities/x.ts
generated
vendored
Normal file
41
node_modules/mathjax-full/ts/util/entities/x.ts
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
xcap: '\u22C2',
|
||||
xcirc: '\u25EF',
|
||||
xcup: '\u22C3',
|
||||
xdtri: '\u25BD',
|
||||
xhArr: '\u27FA',
|
||||
xharr: '\u27F7',
|
||||
xlArr: '\u27F8',
|
||||
xlarr: '\u27F5',
|
||||
xmap: '\u27FC',
|
||||
xnis: '\u22FB',
|
||||
xodot: '\u2A00',
|
||||
xoplus: '\u2A01',
|
||||
xotime: '\u2A02',
|
||||
xrArr: '\u27F9',
|
||||
xrarr: '\u27F6',
|
||||
xsqcup: '\u2A06',
|
||||
xuplus: '\u2A04',
|
||||
xutri: '\u25B3',
|
||||
xvee: '\u22C1',
|
||||
xwedge: '\u22C0'
|
||||
}, 'x');
|
||||
35
node_modules/mathjax-full/ts/util/entities/y.ts
generated
vendored
Normal file
35
node_modules/mathjax-full/ts/util/entities/y.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
YAcy: '\u042F',
|
||||
YIcy: '\u0407',
|
||||
YUcy: '\u042E',
|
||||
Yacute: '\u00DD',
|
||||
Ycirc: '\u0176',
|
||||
Ycy: '\u042B',
|
||||
Yuml: '\u0178',
|
||||
yacute: '\u00FD',
|
||||
yacy: '\u044F',
|
||||
ycirc: '\u0177',
|
||||
ycy: '\u044B',
|
||||
yicy: '\u0457',
|
||||
yucy: '\u044E',
|
||||
yuml: '\u00FF'
|
||||
}, 'y');
|
||||
36
node_modules/mathjax-full/ts/util/entities/z.ts
generated
vendored
Normal file
36
node_modules/mathjax-full/ts/util/entities/z.ts
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as Entities from '../Entities.js';
|
||||
|
||||
Entities.add({
|
||||
ZHcy: '\u0416',
|
||||
Zacute: '\u0179',
|
||||
Zcaron: '\u017D',
|
||||
Zcy: '\u0417',
|
||||
Zdot: '\u017B',
|
||||
ZeroWidthSpace: '\u200B',
|
||||
Zeta: '\u0396',
|
||||
zacute: '\u017A',
|
||||
zcaron: '\u017E',
|
||||
zcy: '\u0437',
|
||||
zdot: '\u017C',
|
||||
zeetrf: '\u2128',
|
||||
zhcy: '\u0436',
|
||||
zwj: '\u200D',
|
||||
zwnj: '\u200C'
|
||||
}, 'z');
|
||||
157
node_modules/mathjax-full/ts/util/lengths.ts
generated
vendored
Normal file
157
node_modules/mathjax-full/ts/util/lengths.ts
generated
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Utility functions for handling dimensions (lengths)
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
/**
|
||||
* A very large number
|
||||
*/
|
||||
export const BIGDIMEN = 1000000;
|
||||
|
||||
/**
|
||||
* Sizes of various units in pixels
|
||||
*/
|
||||
export const UNITS: {[unit: string]: number} = {
|
||||
px: 1,
|
||||
'in': 96, // 96 px to an inch
|
||||
cm: 96 / 2.54, // 2.54 cm to an inch
|
||||
mm: 96 / 25.4 // 10 mm to a cm
|
||||
};
|
||||
|
||||
/**
|
||||
* Sizes of various relative units in em's
|
||||
*/
|
||||
export const RELUNITS: {[unit: string]: number} = {
|
||||
em: 1,
|
||||
ex: .431, // this.TEX.x_height;
|
||||
pt: 1 / 10, // 10 pt to an em
|
||||
pc: 12 / 10, // 12 pc to a pt
|
||||
mu: 1 / 18 // 18mu to an em for the scriptlevel
|
||||
};
|
||||
|
||||
/**
|
||||
* The various named spaces
|
||||
*/
|
||||
export const MATHSPACE: {[name: string]: number} = {
|
||||
/* tslint:disable:whitespace */
|
||||
veryverythinmathspace: 1/18,
|
||||
verythinmathspace: 2/18,
|
||||
thinmathspace: 3/18,
|
||||
mediummathspace: 4/18,
|
||||
thickmathspace: 5/18,
|
||||
verythickmathspace: 6/18,
|
||||
veryverythickmathspace: 7/18,
|
||||
negativeveryverythinmathspace: -1/18,
|
||||
negativeverythinmathspace: -2/18,
|
||||
negativethinmathspace: -3/18,
|
||||
negativemediummathspace: -4/18,
|
||||
negativethickmathspace: -5/18,
|
||||
negativeverythickmathspace: -6/18,
|
||||
negativeveryverythickmathspace: -7/18,
|
||||
/* tslint:enable */
|
||||
|
||||
thin: .04,
|
||||
medium: .06,
|
||||
thick: .1,
|
||||
|
||||
normal: 1,
|
||||
big: 2,
|
||||
small: 1 / Math.sqrt(2),
|
||||
|
||||
infinity: BIGDIMEN
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|number} length A dimension (giving number and units) to be converted to ems
|
||||
* @param {number} size The default size of the dimension (for percentage values)
|
||||
* @param {number} scale The current scaling factor (to handle absolute units)
|
||||
* @param {number} em The size of an em in pixels
|
||||
* @return {number} The dimension converted to ems
|
||||
*/
|
||||
export function length2em(length: string | number, size: number = 0, scale: number = 1, em: number = 16): number {
|
||||
if (typeof length !== 'string') {
|
||||
length = String(length);
|
||||
}
|
||||
if (length === '' || length == null) {
|
||||
return size;
|
||||
}
|
||||
if (MATHSPACE[length]) {
|
||||
return MATHSPACE[length];
|
||||
}
|
||||
let match = length.match(/^\s*([-+]?(?:\.\d+|\d+(?:\.\d*)?))?(pt|em|ex|mu|px|pc|in|mm|cm|%)?/);
|
||||
if (!match) {
|
||||
return size;
|
||||
}
|
||||
let m = parseFloat(match[1] || '1'), unit = match[2];
|
||||
if (UNITS.hasOwnProperty(unit)) {
|
||||
return m * UNITS[unit] / em / scale;
|
||||
}
|
||||
if (RELUNITS.hasOwnProperty(unit)) {
|
||||
return m * RELUNITS[unit];
|
||||
}
|
||||
if (unit === '%') {
|
||||
return m / 100 * size; // percentage of the size
|
||||
}
|
||||
return m * size; // relative to size
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} m A number to be shown as a percent
|
||||
* @return {string} The number m as a percent
|
||||
*/
|
||||
export function percent(m: number): string {
|
||||
return (100 * m).toFixed(1).replace(/\.?0+$/, '') + '%';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} m A number to be shown in ems
|
||||
* @return {string} The number with units of ems
|
||||
*/
|
||||
export function em(m: number): string {
|
||||
if (Math.abs(m) < .001) return '0';
|
||||
return (m.toFixed(3).replace(/\.?0+$/, '')) + 'em';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number} m A number to be shown in ems, but rounded to pixel boundaries
|
||||
* @param {number} em The number of pixels in an em
|
||||
* @return {string} The number with units of em
|
||||
*/
|
||||
export function emRounded(m: number, em: number = 16): string {
|
||||
m = (Math.round(m * em) + .05) / em;
|
||||
if (Math.abs(m) < .001) return '0em';
|
||||
return m.toFixed(3).replace(/\.?0+$/, '') + 'em';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {number} m A number of em's to be shown as pixels
|
||||
* @param {number} M The minimum number of pixels to allow
|
||||
* @param {number} em The number of pixels in an em
|
||||
* @return {string} The number with units of px
|
||||
*/
|
||||
export function px(m: number, M: number = -BIGDIMEN, em: number = 16): string {
|
||||
m *= em;
|
||||
if (M && m < M) m = M;
|
||||
if (Math.abs(m) < .1) return '0';
|
||||
return m.toFixed(1).replace(/\.0$/, '') + 'px';
|
||||
}
|
||||
38
node_modules/mathjax-full/ts/util/numeric.ts
generated
vendored
Normal file
38
node_modules/mathjax-full/ts/util/numeric.ts
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2018-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements some numeric utility functions
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {number[]} A The array to sum
|
||||
* @return {number} The summ of the elements in A
|
||||
*/
|
||||
export function sum(A: number[]): number {
|
||||
return A.reduce((a, b) => a + b, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {number[]} A The array whose maximum entry is sought
|
||||
* @return {number} The largest entry in the array
|
||||
*/
|
||||
export function max(A: number[]): number {
|
||||
return A.reduce((a, b) => Math.max(a, b), 0);
|
||||
}
|
||||
84
node_modules/mathjax-full/ts/util/string.ts
generated
vendored
Normal file
84
node_modules/mathjax-full/ts/util/string.ts
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
/*************************************************************
|
||||
*
|
||||
* Copyright (c) 2017-2022 The MathJax Consortium
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Implements some string utility functions
|
||||
*
|
||||
* @author dpvc@mathjax.org (Davide Cervone)
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Sort strings by length
|
||||
*
|
||||
* @param {string} a First string to be compared
|
||||
* @param {string} b Second string to be compared
|
||||
* @return {number} -1 id a < b, 0 of a === b, 1 if a > b
|
||||
*/
|
||||
export function sortLength(a: string, b: string): number {
|
||||
return a.length !== b.length ? b.length - a.length : a === b ? 0 : a < b ? -1 : 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quote a string for use in regular expressions
|
||||
*
|
||||
* @param {string} text The text whose regex characters are to be quoted
|
||||
* @return {string} The quoted string
|
||||
*/
|
||||
export function quotePattern(text: string): string {
|
||||
return text.replace(/([\^$(){}+*?\-|\[\]\:\\])/g, '\\$1');
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a UTF-8 string to an array of unicode code points
|
||||
*
|
||||
* @param {string} text The string to be turned into unicode positions
|
||||
* @return {number[]} Array of numbers representing the string's unicode character positions
|
||||
*/
|
||||
export function unicodeChars(text: string): number[] {
|
||||
return Array.from(text).map((c) => c.codePointAt(0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an array of unicode code points to a string
|
||||
*
|
||||
* @param {number[]} data The array of unicode code points
|
||||
* @return {string} The string consisting of the characters at those points
|
||||
*/
|
||||
export function unicodeString(data: number[]): string {
|
||||
return String.fromCodePoint(...data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if a value is a percentage
|
||||
*
|
||||
* @param {string} x The string to test
|
||||
* @return {boolean} True if the string ends with a percent sign
|
||||
*/
|
||||
export function isPercent(x: string): boolean {
|
||||
return !!x.match(/%\s*$/);
|
||||
}
|
||||
|
||||
/**
|
||||
* Split a space-separated string of values
|
||||
*
|
||||
* @param {string} x The string to be split
|
||||
* @return {string[]} The list of white-space-separated "words" in the string
|
||||
*/
|
||||
export function split(x: string): string[] {
|
||||
return x.trim().split(/\s+/);
|
||||
}
|
||||
Reference in New Issue
Block a user