@mark1russell7/text 0.0.20 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{error-6yypUDJz.js → error-CD4shWxA.js} +1 -1
- package/build/{error-6yypUDJz.js.map → error-CD4shWxA.js.map} +1 -1
- package/build/{escape-vfOeIxac.js → escape-DX64sGOl.js} +1 -1
- package/build/{escape-vfOeIxac.js.map → escape-DX64sGOl.js.map} +1 -1
- package/build/index.js +2 -2
- package/build/plain-text.js +1 -1
- package/build/print.js +1 -1
- package/build/redact.js +1 -1
- package/build/{references-BFiMj2LL.js → references-DDLxNrsx.js} +1 -1
- package/build/{references-BFiMj2LL.js.map → references-DDLxNrsx.js.map} +1 -1
- package/build/references.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-
|
|
1
|
+
{"version":3,"file":"error-CD4shWxA.js","names":[],"sources":["../src/error.ts"],"sourcesContent":["/**\n * This module has the text of a thrown value.\n */\n\n/**\n * This function gives the text of a thrown value, for a log line or a message on a screen. It does not throw.\n *\n * - An object with a `message` text gives that text. The check reads the field, not `instanceof Error`, so an error\n * from another realm (a `vm` context or an `iframe`) also gives its message.\n * - An `Error` with a `message` that is not a text gives `String(message)`. The brand check of\n * `Object.prototype.toString` finds an `Error` of each realm.\n * - Each other value gives `String(value)`.\n * - When `String` throws, the function gives the tag of `Object.prototype.toString`, for example `[object Object]`.\n * - A revoked `Proxy` gives its `typeof` in brackets: `[object]`.\n *\n * @param error - The thrown value. It can be any value.\n * @returns The text of the value.\n */\nexport function errorMessage(error: unknown): string {\n try {\n if (typeof error === \"object\" && error !== null && \"message\" in error) {\n const message: unknown = error.message;\n if (typeof message === \"string\") return message;\n if (Object.prototype.toString.call(error) === \"[object Error]\") return String(message);\n }\n return String(error);\n } catch {\n // String() throws for an object with no prototype, for a toString that throws and for a message getter that throws.\n try {\n return Object.prototype.toString.call(error);\n } catch {\n // A revoked Proxy throws also here. The operator typeof never throws.\n return `[${typeof error}]`;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAgB,aAAa,OAAwB;CACnD,IAAI;EACF,IAAI,OAAO,UAAU,YAAY,UAAU,QAAQ,aAAa,OAAO;GACrE,MAAM,UAAmB,MAAM;GAC/B,IAAI,OAAO,YAAY,UAAU,OAAO;GACxC,IAAI,OAAO,UAAU,SAAS,KAAK,KAAK,MAAM,kBAAkB,OAAO,OAAO,OAAO;EACvF;EACA,OAAO,OAAO,KAAK;CACrB,QAAQ;EAEN,IAAI;GACF,OAAO,OAAO,UAAU,SAAS,KAAK,KAAK;EAC7C,QAAQ;GAEN,OAAO,IAAI,OAAO,MAAM;EAC1B;CACF;AACF"}
|
|
@@ -80,4 +80,4 @@ function escapeWorkflowProperty(text) {
|
|
|
80
80
|
}
|
|
81
81
|
export { escapeWorkflowData as a, escapeRegExp as i, escapeHtml as n, escapeWorkflowProperty as o, escapeMarkdown as r, escapeAttribute as t };
|
|
82
82
|
|
|
83
|
-
//# sourceMappingURL=escape-
|
|
83
|
+
//# sourceMappingURL=escape-DX64sGOl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escape-
|
|
1
|
+
{"version":3,"file":"escape-DX64sGOl.js","names":[],"sources":["../src/escape.ts"],"sourcesContent":["/**\n * This module has the escapes of plain text for five targets. The targets are HTML content, an HTML attribute, a\n * regular expression, one line of Markdown and a GitHub Actions workflow command. Each function changes only the characters that have a meaning in its target.\n */\n\nconst HTML: Readonly<Record<string, string>> = { \"&\": \"&\", \"<\": \"<\", \">\": \">\" };\nconst ATTRIBUTE: Readonly<Record<string, string>> = { ...HTML, '\"': \""\", \"'\": \"'\" };\n\n/**\n * This function escapes a text for the content of an HTML element. It changes `&`, `<` and `>` to named character\n * references. The quotes stay, because they have no meaning in element content.\n *\n * @param text - The plain text.\n * @returns The text with `&`, `<` and `>` in place of the three characters.\n */\nexport function escapeHtml(text: string): string {\n return text.replace(/[&<>]/g, (char) => HTML[char] ?? char);\n}\n\n/**\n * This function escapes a text for an HTML attribute value in double quotes or in single quotes. It changes `&`, `<`,\n * `>`, `\"` and `'`. The result is also correct in element content.\n *\n * @param text - The plain text.\n * @returns The text with `&`, `<`, `>`, `"` and `'` in place of the five characters.\n */\nexport function escapeAttribute(text: string): string {\n return text.replace(/[&<>\"']/g, (char) => ATTRIBUTE[char] ?? char);\n}\n\n/**\n * This function escapes a text for the pattern of a regular expression, outside a character class. It puts a backslash\n * before each syntax character of ECMAScript: `^ $ \\ . * + ? ( ) [ ] { } |`. The pattern matches only the text, with\n * the flag `u`, with the flag `v` and with no flag.\n *\n * @param text - The plain text.\n * @returns A pattern for `new RegExp` that matches the text.\n */\nexport function escapeRegExp(text: string): string {\n return text.replace(/[\\\\^$.*+?()[\\]{}|]/g, \"\\\\$&\");\n}\n\n/**\n * This function escapes a text for one line of CommonMark or GitHub Markdown: a paragraph, a heading or a table cell.\n * It puts a backslash before each ASCII punctuation character, and changes each line end to a space.\n *\n * A backslash before an ASCII punctuation character always gives the character itself. Thus no character of the result\n * starts emphasis, code, a link, HTML, an entity, a list or a table column. Four spaces at the start of a line still\n * make a code block.\n *\n * @param text - The plain text.\n * @returns The text for one line of Markdown.\n */\nexport function escapeMarkdown(text: string): string {\n return text.replace(/\\r\\n?|\\n/g, \" \").replace(/[!-/:-@[-`{-~]/g, \"\\\\$&\");\n}\n\n/**\n * This function escapes a text for the data of a GitHub Actions workflow command, the part after `::`. It changes `%`,\n * the carriage return and the line feed to `%25`, `%0D` and `%0A`, so the command stays on one line.\n *\n * @param text - The plain text.\n * @returns The data of the command. The runner decodes it to the text.\n */\nexport function escapeWorkflowData(text: string): string {\n return text.replaceAll(\"%\", \"%25\").replaceAll(\"\\r\", \"%0D\").replaceAll(\"\\n\", \"%0A\");\n}\n\n/**\n * This function escapes a text for a property value of a GitHub Actions workflow command, for example `title=`. It\n * changes the characters of `escapeWorkflowData`, and also `:` and `,` to `%3A` and `%2C`.\n *\n * @param text - The plain text.\n * @returns The property value. The runner decodes it to the text.\n */\nexport function escapeWorkflowProperty(text: string): string {\n return escapeWorkflowData(text).replaceAll(\":\", \"%3A\").replaceAll(\",\", \"%2C\");\n}\n"],"mappings":";;;;;AAKA,MAAM,OAAyC;CAAE,KAAK;CAAS,KAAK;CAAQ,KAAK;AAAO;AACxF,MAAM,YAA8C;CAAE,GAAG;CAAM,MAAK;CAAU,KAAK;AAAQ;;;;;;;;AAS3F,SAAgB,WAAW,MAAsB;CAC/C,OAAO,KAAK,QAAQ,WAAW,SAAS,KAAK,SAAS,IAAI;AAC5D;;;;;;;;AASA,SAAgB,gBAAgB,MAAsB;CACpD,OAAO,KAAK,QAAQ,aAAa,SAAS,UAAU,SAAS,IAAI;AACnE;;;;;;;;;AAUA,SAAgB,aAAa,MAAsB;CACjD,OAAO,KAAK,QAAQ,uBAAuB,MAAM;AACnD;;;;;;;;;;;;AAaA,SAAgB,eAAe,MAAsB;CACnD,OAAO,KAAK,QAAQ,aAAa,GAAG,CAAC,CAAC,QAAQ,mBAAmB,MAAM;AACzE;;;;;;;;AASA,SAAgB,mBAAmB,MAAsB;CACvD,OAAO,KAAK,WAAW,KAAK,KAAK,CAAC,CAAC,WAAW,MAAM,KAAK,CAAC,CAAC,WAAW,MAAM,KAAK;AACnF;;;;;;;;AASA,SAAgB,uBAAuB,MAAsB;CAC3D,OAAO,mBAAmB,IAAI,CAAC,CAAC,WAAW,KAAK,KAAK,CAAC,CAAC,WAAW,KAAK,KAAK;AAC9E"}
|
package/build/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { countOf } from "./english.js";
|
|
2
|
-
import { t as errorMessage } from "./error-
|
|
3
|
-
import { a as escapeWorkflowData, i as escapeRegExp, n as escapeHtml, o as escapeWorkflowProperty, r as escapeMarkdown, t as escapeAttribute } from "./escape-
|
|
2
|
+
import { t as errorMessage } from "./error-CD4shWxA.js";
|
|
3
|
+
import { a as escapeWorkflowData, i as escapeRegExp, n as escapeHtml, o as escapeWorkflowProperty, r as escapeMarkdown, t as escapeAttribute } from "./escape-DX64sGOl.js";
|
|
4
4
|
import { searchKey, wordSearch } from "./search.js";
|
|
5
5
|
export { countOf, errorMessage, escapeAttribute, escapeHtml, escapeMarkdown, escapeRegExp, escapeWorkflowData, escapeWorkflowProperty, searchKey, wordSearch };
|
package/build/plain-text.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { scanHtml } from "./html.js";
|
|
2
|
-
import { t as decodeReferences } from "./references-
|
|
2
|
+
import { t as decodeReferences } from "./references-DDLxNrsx.js";
|
|
3
3
|
// src/plain-text.ts
|
|
4
4
|
/**
|
|
5
5
|
* The plain text of a part of HTML: the entry `@mark1russell7/text/plain-text`. It is `scanHtml` of `./html`, then
|
package/build/print.js
CHANGED
package/build/redact.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"references-BFiMj2LL.js","names":[],"sources":["../src/html-references.ts","../src/references.ts"],"sourcesContent":["/**\n * This module has the named character references of HTML. The script `scripts/html-references.ts` made it. Do not\n * edit it. Start the script again to make it.\n *\n * The source is the table of the HTML Living Standard, `https://html.spec.whatwg.org/entities.json`. Copyright WHATWG\n * (Apple, Google, Mozilla, Microsoft). The table has the license CC BY 4.0,\n * `https://creativecommons.org/licenses/by/4.0/`. The SHA-256 of the source file is\n * `d741d877ac77c4194c4ad526b5b4a19aef8dfe411ab840a466891cdbb9f362e6`.\n *\n * The script changed the format of the table, not its content. The source has 2231 names. 106 of them are\n * legacy names, which are in the source with a semicolon and with no semicolon.\n */\n\n/**\n * The names and the values of the named character references. The names with one value make one group. A comma or a\n * line end comes between two groups. Each group has these parts:\n *\n * - the first code point of the value, as the difference from the first code point of the group before it,\n * - a plus sign and the second code point, only for a value with two code points,\n * - an equals sign and the names of the group, with a space between two names.\n *\n * Each number is in base 36. A name has no ampersand and no semicolon. A star after a name tells that the name is also\n * correct with no semicolon. The groups are in the order of their values. The longest name has 31 characters, and the\n * longest legacy name has 6 characters.\n */\nexport const NAMED_REFERENCES: string =\n `9=Tab,1=NewLine,n=excl,1=QUOT* quot*,1=num,1=dollar,1=percnt,1=AMP* amp*,1=apos,1=lpar,1=rpar,1=ast midast,1=plus\n1=comma,2=period,1=sol,b=colon,1=semi,1=LT* lt*,0+6he=nvlt,1=equals,0+6hx=bne,1=GT* gt*,0+6he=nvgt,1=quest,1=commat\nr=lbrack lsqb,1=bsol,1=rbrack rsqb,1=Hat,1=UnderBar lowbar,1=DiacriticalGrave grave,6+2y=fjlig,l=lbrace lcub\n1=VerticalLine verbar vert,1=rbrace rcub,z=NonBreakingSpace nbsp*,1=iexcl*,1=cent*,1=pound*,1=curren*,1=yen*\n1=brvbar*,1=sect*,1=Dot DoubleDot die uml*,1=COPY* copy*,1=ordf*,1=laquo*,1=not*,1=shy*,1=REG* circledR reg*\n1=macr* strns,1=deg*,1=PlusMinus plusmn* pm,1=sup2*,1=sup3*,1=DiacriticalAcute acute*,1=micro*,1=para*\n1=CenterDot centerdot middot*,1=Cedilla cedil*,1=sup1*,1=ordm*,1=raquo*,1=frac14*,1=frac12* half,1=frac34*,1=iquest*\n1=Agrave*,1=Aacute*,1=Acirc*,1=Atilde*,1=Auml*,1=Aring* angst,1=AElig*,1=Ccedil*,1=Egrave*,1=Eacute*,1=Ecirc*\n1=Euml*,1=Igrave*,1=Iacute*,1=Icirc*,1=Iuml*,1=ETH*,1=Ntilde*,1=Ograve*,1=Oacute*,1=Ocirc*,1=Otilde*,1=Ouml*\n1=times*,1=Oslash*,1=Ugrave*,1=Uacute*,1=Ucirc*,1=Uuml*,1=Yacute*,1=THORN*,1=szlig*,1=agrave*,1=aacute*,1=acirc*\n1=atilde*,1=auml*,1=aring*,1=aelig*,1=ccedil*,1=egrave*,1=eacute*,1=ecirc*,1=euml*,1=igrave*,1=iacute*,1=icirc*\n1=iuml*,1=eth*,1=ntilde*,1=ograve*,1=oacute*,1=ocirc*,1=otilde*,1=ouml*,1=div divide*,1=oslash*,1=ugrave*,1=uacute*\n1=ucirc*,1=uuml*,1=yacute*,1=thorn*,1=yuml*,1=Amacr,1=amacr,1=Abreve,1=abreve,1=Aogon,1=aogon,1=Cacute,1=cacute\n1=Ccirc,1=ccirc,1=Cdot,1=cdot,1=Ccaron,1=ccaron,1=Dcaron,1=dcaron,1=Dstrok,1=dstrok,1=Emacr,1=emacr,3=Edot,1=edot\n1=Eogon,1=eogon,1=Ecaron,1=ecaron,1=Gcirc,1=gcirc,1=Gbreve,1=gbreve,1=Gdot,1=gdot,1=Gcedil,2=Hcirc,1=hcirc,1=Hstrok\n1=hstrok,1=Itilde,1=itilde,1=Imacr,1=imacr,3=Iogon,1=iogon,1=Idot,1=imath inodot,1=IJlig,1=ijlig,1=Jcirc,1=jcirc\n1=Kcedil,1=kcedil,1=kgreen,1=Lacute,1=lacute,1=Lcedil,1=lcedil,1=Lcaron,1=lcaron,1=Lmidot,1=lmidot,1=Lstrok,1=lstrok\n1=Nacute,1=nacute,1=Ncedil,1=ncedil,1=Ncaron,1=ncaron,1=napos,1=ENG,1=eng,1=Omacr,1=omacr,3=Odblac,1=odblac,1=OElig\n1=oelig,1=Racute,1=racute,1=Rcedil,1=rcedil,1=Rcaron,1=rcaron,1=Sacute,1=sacute,1=Scirc,1=scirc,1=Scedil,1=scedil\n1=Scaron,1=scaron,1=Tcedil,1=tcedil,1=Tcaron,1=tcaron,1=Tstrok,1=tstrok,1=Utilde,1=utilde,1=Umacr,1=umacr,1=Ubreve\n1=ubreve,1=Uring,1=uring,1=Udblac,1=udblac,1=Uogon,1=uogon,1=Wcirc,1=wcirc,1=Ycirc,1=ycirc,1=Yuml,1=Zacute,1=zacute\n1=Zdot,1=zdot,1=Zcaron,1=zcaron,k=fnof,z=imped,1s=gacute,1u=jmath,3z=circ,1=Hacek caron,h=Breve breve\n1=DiacriticalDot dot,1=ring,1=ogon,1=DiacriticalTilde tilde,1=DiacriticalDoubleAcute dblac,1g=DownBreve,3k=Alpha\n1=Beta,1=Gamma,1=Delta,1=Epsilon,1=Zeta,1=Eta,1=Theta,1=Iota,1=Kappa,1=Lambda,1=Mu,1=Nu,1=Xi,1=Omicron,1=Pi,1=Rho\n2=Sigma,1=Tau,1=Upsilon,1=Phi,1=Chi,1=Psi,1=Omega ohm,8=alpha,1=beta,1=gamma,1=delta,1=epsi epsilon,1=zeta,1=eta\n1=theta,1=iota,1=kappa,1=lambda,1=mu,1=nu,1=xi,1=omicron,1=pi,1=rho,1=sigmaf sigmav varsigma,1=sigma,1=tau\n1=upsi upsilon,1=phi,1=chi,1=psi,1=omega,8=thetasym thetav vartheta,1=Upsi upsih,3=phiv straightphi varphi\n1=piv varpi,6=Gammad,1=digamma gammad,j=kappav varkappa,1=rhov varrho,4=epsiv straightepsilon varepsilon\n1=backepsilon bepsi,b=IOcy,1=DJcy,1=GJcy,1=Jukcy,1=DScy,1=Iukcy,1=YIcy,1=Jsercy,1=LJcy,1=NJcy,1=TSHcy,1=KJcy,2=Ubrcy\n1=DZcy,1=Acy,1=Bcy,1=Vcy,1=Gcy,1=Dcy,1=IEcy,1=ZHcy,1=Zcy,1=Icy,1=Jcy,1=Kcy,1=Lcy,1=Mcy,1=Ncy,1=Ocy,1=Pcy,1=Rcy,1=Scy\n1=Tcy,1=Ucy,1=Fcy,1=KHcy,1=TScy,1=CHcy,1=SHcy,1=SHCHcy,1=HARDcy,1=Ycy,1=SOFTcy,1=Ecy,1=YUcy,1=YAcy,1=acy,1=bcy,1=vcy\n1=gcy,1=dcy,1=iecy,1=zhcy,1=zcy,1=icy,1=jcy,1=kcy,1=lcy,1=mcy,1=ncy,1=ocy,1=pcy,1=rcy,1=scy,1=tcy,1=ucy,1=fcy,1=khcy\n1=tscy,1=chcy,1=shcy,1=shchcy,1=hardcy,1=ycy,1=softcy,1=ecy,1=yucy,1=yacy,2=iocy,1=djcy,1=gjcy,1=jukcy,1=dscy\n1=iukcy,1=yicy,1=jsercy,1=ljcy,1=njcy,1=tshcy,1=kjcy,2=ubrcy,1=dzcy,5gj=ensp,1=emsp,1=emsp13,1=emsp14,2=numsp\n1=puncsp,1=ThinSpace thinsp,1=VeryThinSpace hairsp\n1=NegativeMediumSpace NegativeThickSpace NegativeThinSpace NegativeVeryThinSpace ZeroWidthSpace,1=zwnj,1=zwj,1=lrm\n1=rlm,1=dash hyphen,3=ndash,1=mdash,1=horbar,1=Verbar Vert,2=OpenCurlyQuote lsquo,1=CloseCurlyQuote rsquo rsquor\n1=lsquor sbquo,2=OpenCurlyDoubleQuote ldquo,1=CloseCurlyDoubleQuote rdquo rdquor,1=bdquo ldquor,2=dagger\n1=Dagger ddagger,1=bull bullet,3=nldr,1=hellip mldr,a=permil,1=pertenk,1=prime,1=Prime,1=tprime,1=backprime bprime\n4=lsaquo,1=rsaquo,4=OverBar oline,3=caret,2=hybull,1=frasl,b=bsemi,8=qprime,8=MediumSpace,0+6bu=ThickSpace,1=NoBreak\n1=ApplyFunction af,1=InvisibleTimes it,1=InvisibleComma ic,21=euro,1b=TripleDot tdot,1=DotDot,12=Copf complexes\n3=incare,5=gscr,1=HilbertSpace Hscr hamilt,1=Hfr Poincareplane,1=Hopf quaternions,1=planckh\n1=hbar hslash planck plankv,1=Iscr imagline,1=Ifr Im image imagpart,1=Laplacetrf Lscr lagran,1=ell,2=Nopf naturals\n1=numero,1=copysr,1=weierp wp,1=Popf primes,1=Qopf rationals,1=Rscr realine,1=Re Rfr real realpart,1=Ropf reals,1=rx\n4=TRADE trade,2=Zopf integers,3=mho,1=Zfr zeetrf,1=iiota,3=Bernoullis Bscr bernou,1=Cayleys Cfr,2=escr\n1=Escr expectation,1=Fouriertrf Fscr,2=Mellintrf Mscr phmmat,1=order orderof oscr,1=alefsym aleph,1=beth,1=gimel\n1=daleth,d=CapitalDifferentialD DD,1=DifferentialD dd,1=ExponentialE ee exponentiale,1=ImaginaryI ii,b=frac13\n1=frac23,1=frac15,1=frac25,1=frac35,1=frac45,1=frac16,1=frac56,1=frac18,1=frac38,1=frac58,1=frac78\n1e=LeftArrow ShortLeftArrow larr leftarrow slarr,1=ShortUpArrow UpArrow uarr uparrow\n1=RightArrow ShortRightArrow rarr rightarrow srarr,1=DownArrow ShortDownArrow darr downarrow\n1=LeftRightArrow harr leftrightarrow,1=UpDownArrow updownarrow varr,1=UpperLeftArrow nwarr nwarrow\n1=UpperRightArrow nearr nearrow,1=LowerRightArrow searr searrow,1=LowerLeftArrow swarr swarrow,1=nlarr nleftarrow\n1=nrarr nrightarrow,2=rarrw rightsquigarrow,0+mw=nrarrw,1=Larr twoheadleftarrow,1=Uarr,1=Rarr twoheadrightarrow\n1=Darr,1=larrtl leftarrowtail,1=rarrtl rightarrowtail,1=LeftTeeArrow mapstoleft,1=UpTeeArrow mapstoup\n1=RightTeeArrow map mapsto,1=DownTeeArrow mapstodown,2=hookleftarrow larrhk,1=hookrightarrow rarrhk\n1=larrlp looparrowleft,1=looparrowright rarrlp,1=harrw leftrightsquigarrow,1=nharr nleftrightarrow,2=Lsh lsh\n1=Rsh rsh,1=ldsh,1=rdsh,2=crarr,1=cularr curvearrowleft,1=curarr curvearrowright,3=circlearrowleft olarr\n1=circlearrowright orarr,1=LeftVector leftharpoonup lharu,1=DownLeftVector leftharpoondown lhard\n1=RightUpVector uharr upharpoonright,1=LeftUpVector uharl upharpoonleft,1=RightVector rharu rightharpoonup\n1=DownRightVector rhard rightharpoondown,1=RightDownVector dharr downharpoonright\n1=LeftDownVector dharl downharpoonleft,1=RightArrowLeftArrow rightleftarrows rlarr,1=UpArrowDownArrow udarr\n1=LeftArrowRightArrow leftrightarrows lrarr,1=leftleftarrows llarr,1=upuparrows uuarr,1=rightrightarrows rrarr\n1=ddarr downdownarrows,1=ReverseEquilibrium leftrightharpoons lrhar,1=Equilibrium rightleftharpoons rlhar\n1=nLeftarrow nlArr,1=nLeftrightarrow nhArr,1=nRightarrow nrArr,1=DoubleLeftArrow Leftarrow lArr\n1=DoubleUpArrow Uparrow uArr,1=DoubleRightArrow Implies Rightarrow rArr,1=DoubleDownArrow Downarrow dArr\n1=DoubleLeftRightArrow Leftrightarrow hArr iff,1=DoubleUpDownArrow Updownarrow vArr,1=nwArr,1=neArr,1=seArr,1=swArr\n1=Lleftarrow lAarr,1=Rrightarrow rAarr,2=zigrarr,7=LeftArrowBar larrb,1=RightArrowBar rarrb,g=DownArrowUpArrow duarr\n8=loarr,1=roarr,1=hoarr,1=ForAll forall,1=comp complement,1=PartialD part,0+mw=npart,1=Exists exist\n1=NotExists nexist nexists,1=empty emptyset emptyv varnothing,2=Del nabla,1=Element in isin isinv\n1=NotElement notin notinva,2=ReverseElement SuchThat ni niv,1=NotReverseElement notni notniva,3=Product prod\n1=Coproduct coprod,1=Sum sum,1=minus,1=MinusPlus mnplus mp,1=dotplus plusdo\n2=Backslash setminus setmn smallsetminus ssetmn,1=lowast,1=SmallCircle compfn,2=Sqrt radic\n3=Proportional prop propto varpropto vprop,1=infin,1=angrt,1=ang angle,0+6he=nang,1=angmsd measuredangle,1=angsph\n1=VerticalBar mid shortmid smid,1=NotVerticalBar nmid nshortmid nsmid\n1=DoubleVerticalBar par parallel shortparallel spar,1=NotDoubleVerticalBar npar nparallel nshortparallel nspar\n1=and wedge,1=or vee,1=cap,0+1e68=caps,1=cup,0+1e68=cups,1=Integral int,1=Int,1=iiint tint\n1=ContourIntegral conint oint,1=Conint DoubleContourIntegral,1=Cconint,1=cwint,1=ClockwiseContourIntegral cwconint\n1=CounterClockwiseContourIntegral awconint,1=Therefore there4 therefore,1=Because becaus because,1=ratio\n1=Colon Proportion,1=dotminus minusd,2=mDDot,1=homtht,1=Tilde sim thicksim thksim,0+6he=nvsim,1=backsim bsim\n0+mp=race,1=ac mstpos,0+mr=acE,1=acd,1=VerticalTilde wr wreath,1=NotTilde nsim,1=EqualTilde eqsim esim\n0+mw=NotEqualTilde nesim,1=TildeEqual sime simeq,1=NotTildeEqual nsime nsimeq,1=TildeFullEqual cong,1=simne\n1=NotTildeFullEqual ncong,1=TildeTilde ap approx asymp thickapprox thkap,1=NotTildeTilde nap napprox,1=ape approxeq\n1=apid,0+mw=napid,1=backcong bcong,1=CupCap asympeq,0+6he=nvap,1=Bumpeq HumpDownHump bump,0+mw=NotHumpDownHump nbump\n1=HumpEqual bumpe bumpeq,0+mw=NotHumpEqual nbumpe,1=DotEqual doteq esdot,0+mw=nedot,1=doteqdot eDot\n1=efDot fallingdotseq,1=erDot risingdotseq,1=Assign colone coloneq,1=ecolon eqcolon,1=ecir eqcirc,1=circeq cire\n2=wedgeq,1=veeeq,2=triangleq trie,3=equest questeq,1=NotEqual ne,1=Congruent equiv,0+6hx=bnequiv\n1=NotCongruent nequiv,2=le leq,0+6he=nvle,1=GreaterEqual ge geq,0+6he=nvge,1=LessFullEqual lE leqq,0+mw=nlE nleqq\n1=GreaterFullEqual gE geqq,0+mw=NotGreaterFullEqual ngE ngeqq,1=lnE lneqq,0+1e68=lvertneqq lvnE,1=gnE gneqq\n0+1e68=gvertneqq gvnE,1=Lt NestedLessLess ll,0+mw=NotLessLess nLtv,0+6he=nLt,1=Gt NestedGreaterGreater gg\n0+mw=NotGreaterGreater nGtv,0+6he=nGt,1=between twixt,1=NotCupCap,1=NotLess nless nlt,1=NotGreater ngt ngtr\n1=NotLessEqual nle nleq,1=NotGreaterEqual nge ngeq,1=LessTilde lesssim lsim,1=GreaterTilde gsim gtrsim\n1=NotLessTilde nlsim,1=NotGreaterTilde ngsim,1=LessGreater lessgtr lg,1=GreaterLess gl gtrless,1=NotLessGreater ntlg\n1=NotGreaterLess ntgl,1=Precedes pr prec,1=Succeeds sc succ,1=PrecedesSlantEqual prcue preccurlyeq\n1=SucceedsSlantEqual sccue succcurlyeq,1=PrecedesTilde precsim prsim,1=SucceedsTilde scsim succsim\n0+mw=NotSucceedsTilde,1=NotPrecedes npr nprec,1=NotSucceeds nsc nsucc,1=sub subset,0+6he=NotSubset nsubset vnsub\n1=Superset sup supset,0+6he=NotSuperset nsupset vnsup,1=nsub,1=nsup,1=SubsetEqual sube subseteq\n1=SupersetEqual supe supseteq,1=NotSubsetEqual nsube nsubseteq,1=NotSupersetEqual nsupe nsupseteq,1=subne subsetneq\n0+1e68=varsubsetneq vsubne,1=supne supsetneq,0+1e68=varsupsetneq vsupne,2=cupdot,1=UnionPlus uplus\n1=SquareSubset sqsub sqsubset,0+mw=NotSquareSubset,1=SquareSuperset sqsup sqsupset,0+mw=NotSquareSuperset\n1=SquareSubsetEqual sqsube sqsubseteq,1=SquareSupersetEqual sqsupe sqsupseteq,1=SquareIntersection sqcap\n0+1e68=sqcaps,1=SquareUnion sqcup,0+1e68=sqcups,1=CirclePlus oplus,1=CircleMinus ominus,1=CircleTimes otimes,1=osol\n1=CircleDot odot,1=circledcirc ocir,1=circledast oast,2=circleddash odash,1=boxplus plusb,1=boxminus minusb\n1=boxtimes timesb,1=dotsquare sdotb,1=RightTee vdash,1=LeftTee dashv,1=DownTee top,1=UpTee bot bottom perp,2=models\n1=DoubleRightTee vDash,1=Vdash,1=Vvdash,1=VDash,1=nvdash,1=nvDash,1=nVdash,1=nVDash,1=prurel\n2=LeftTriangle vartriangleleft vltri,1=RightTriangle vartriangleright vrtri,1=LeftTriangleEqual ltrie trianglelefteq\n0+6he=nvltrie,1=RightTriangleEqual rtrie trianglerighteq,0+6he=nvrtrie,1=origof,1=imof,1=multimap mumap,1=hercon\n1=intcal intercal,1=veebar,2=barvee,1=angrtvb,1=lrtri,1=Wedge bigwedge xwedge,1=Vee bigvee xvee\n1=Intersection bigcap xcap,1=Union bigcup xcup,1=Diamond diam diamond,1=sdot,1=Star sstarf,1=divideontimes divonx\n1=bowtie,1=ltimes,1=rtimes,1=leftthreetimes lthree,1=rightthreetimes rthree,1=backsimeq bsime,1=curlyvee cuvee\n1=curlywedge cuwed,1=Sub Subset,1=Sup Supset,1=Cap,1=Cup,1=fork pitchfork,1=epar,1=lessdot ltdot,1=gtdot gtrdot,1=Ll\n0+mw=nLl,1=Gg ggg,0+mw=nGg,1=LessEqualGreater leg lesseqgtr,0+1e68=lesg,1=GreaterEqualLess gel gtreqless,0+1e68=gesl\n3=cuepr curlyeqprec,1=cuesc curlyeqsucc,1=NotPrecedesSlantEqual nprcue,1=NotSucceedsSlantEqual nsccue\n1=NotSquareSubsetEqual nsqsube,1=NotSquareSupersetEqual nsqsupe,3=lnsim,1=gnsim,1=precnsim prnsim,1=scnsim succnsim\n1=NotLeftTriangle nltri ntriangleleft,1=NotRightTriangle nrtri ntriangleright\n1=NotLeftTriangleEqual nltrie ntrianglelefteq,1=NotRightTriangleEqual nrtrie ntrianglerighteq,1=vellip,1=ctdot\n1=utdot,1=dtdot,1=disin,1=isinsv,1=isins,1=isindot,0+mw=notindot,1=notinvc,1=notinvb,2=isinE,0+mw=notinE,1=nisd\n1=xnis,1=nis,1=notnivc,1=notnivb,7=barwed barwedge,1=Barwed doublebarwedge,2=LeftCeiling lceil,1=RightCeiling rceil\n1=LeftFloor lfloor,1=RightFloor rfloor,1=drcrop,1=dlcrop,1=urcrop,1=ulcrop,1=bnot,2=profline,1=profsurf,2=telrec\n1=target,6=ulcorn ulcorner,1=urcorn urcorner,1=dlcorn llcorner,1=drcorn lrcorner,3=frown sfrown,1=smile ssmile\na=cylcty,1=profalar,8=topbot,7=ovbar,2=solbar,1p=angzarr,1g=lmoust lmoustache,1=rmoust rmoustache,3=OverBracket tbrk\n1=UnderBracket bbrk,1=bbrktbrk,12=OverParenthesis,1=UnderParenthesis,1=OverBrace,1=UnderBrace,3=trpezium,5=elinters\n1o=blank,4l=circledS oS,1k=HorizontalLine boxh,2=boxv,a=boxdr,4=boxdl,4=boxur,4=boxul,4=boxvr,8=boxvl,8=boxhd\n8=boxhu,8=boxvh,k=boxH,1=boxV,1=boxdR,1=boxDr,1=boxDR,1=boxdL,1=boxDl,1=boxDL,1=boxuR,1=boxUr,1=boxUR,1=boxuL\n1=boxUl,1=boxUL,1=boxvR,1=boxVr,1=boxVR,1=boxvL,1=boxVl,1=boxVL,1=boxHd,1=boxhD,1=boxHD,1=boxHu,1=boxhU,1=boxHU\n1=boxvH,1=boxVh,1=boxVH,k=uhblk,4=lhblk,4=block,9=blk14,1=blk12,1=blk34,e=Square squ square\n9=FilledVerySmallSquare blacksquare squarf squf,1=EmptyVerySmallSquare,2=rect,1=marker,3=fltns,2=bigtriangleup xutri\n1=blacktriangle utrif,1=triangle utri,3=blacktriangleright rtrif,1=rtri triangleright,4=bigtriangledown xdtri\n1=blacktriangledown dtrif,1=dtri triangledown,3=blacktriangleleft ltrif,1=ltri triangleleft,7=loz lozenge,1=cir\nx=tridot,3=bigcirc xcirc,9=ultri,1=urtri,1=lltri,1=EmptySmallSquare,1=FilledSmallSquare,9=bigstar starf,1=star\n8=phone,1e=female,2=male,u=spades spadesuit,3=clubs clubsuit,2=hearts heartsuit,1=diamondsuit diams,4=sung,3=flat\n1=natur natural,1=sharp,4k=check checkmark,4=cross,9=malt maltese,m=sext,y=VerticalSeparator,q=lbbrk,1=rbbrk\n2d=bsolhsub,1=suphsol,t=LeftDoubleBracket lobrk,1=RightDoubleBracket robrk,1=LeftAngleBracket lang langle\n1=RightAngleBracket rang rangle,1=Lang,1=Rang,1=loang,1=roang,8=LongLeftArrow longleftarrow xlarr\n1=LongRightArrow longrightarrow xrarr,1=LongLeftRightArrow longleftrightarrow xharr\n1=DoubleLongLeftArrow Longleftarrow xlArr,1=DoubleLongRightArrow Longrightarrow xrArr\n1=DoubleLongLeftRightArrow Longleftrightarrow xhArr,2=longmapsto xmap,3=dzigrarr,77=nvlArr,1=nvrArr,1=nvHarr,1=Map\n7=lbarr,1=bkarow rbarr,1=lBarr,1=dbkarow rBarr,1=RBarr drbkarow,1=DDotrahd,1=UpArrowBar,1=DownArrowBar,3=Rarrtl\n3=latail,1=ratail,1=lAtail,1=rAtail,1=larrfs,1=rarrfs,1=larrbfs,1=rarrbfs,3=nwarhk,1=nearhk,1=hksearow searhk\n1=hkswarow swarhk,1=nwnear,1=nesear toea,1=seswar tosa,1=swnwar,9=rarrc,0+mw=nrarrc,2=cudarrr,1=ldca,1=rdca\n1=cudarrl,1=larrpl,3=curarrm,1=cularrp,8=rarrpl,3=harrcir,1=Uarrocir,1=lurdshar,1=ldrushar,3=LeftRightVector\n1=RightUpDownVector,1=DownLeftRightVector,1=LeftUpDownVector,1=LeftVectorBar,1=RightVectorBar,1=RightUpVectorBar\n1=RightDownVectorBar,1=DownLeftVectorBar,1=DownRightVectorBar,1=LeftUpVectorBar,1=LeftDownVectorBar,1=LeftTeeVector\n1=RightTeeVector,1=RightUpTeeVector,1=RightDownTeeVector,1=DownLeftTeeVector,1=DownRightTeeVector,1=LeftUpTeeVector\n1=LeftDownTeeVector,1=lHar,1=uHar,1=rHar,1=dHar,1=luruhar,1=ldrdhar,1=ruluhar,1=rdldhar,1=lharul,1=llhard,1=rharul\n1=lrhard,1=UpEquilibrium udhar,1=ReverseUpEquilibrium duhar,1=RoundImplies,1=erarr,1=simrarr,1=larrsim,1=rarrsim\n1=rarrap,1=ltlarr,2=gtrarr,1=subrarr,2=suplarr,1=lfisht,1=rfisht,1=ufisht,1=dfisht,6=lopar,1=ropar,5=lbrke,1=rbrke\n1=lbrkslu,1=rbrksld,1=lbrksld,1=rbrkslu,1=langd,1=rangd,1=lparlt,1=rpargt,1=gtlPar,1=ltrPar,4=vzigzag,2=vangrt\n1=angrtvbd,7=ange,1=range,1=dwangle,1=uwangle,1=angmsdaa,1=angmsdab,1=angmsdac,1=angmsdad,1=angmsdae,1=angmsdaf\n1=angmsdag,1=angmsdah,1=bemptyv,1=demptyv,1=cemptyv,1=raemptyv,1=laemptyv,1=ohbar,1=omid,1=opar,2=operp,2=olcross\n1=odsold,2=olcir,1=ofcir,1=olt,1=ogt,1=cirscir,1=cirE,1=solb,1=bsolb,4=boxbox,4=trisb,1=rtriltri,1=LeftTriangleBar\n0+mw=NotLeftTriangleBar,1=RightTriangleBar,0+mw=NotRightTriangleBar,c=iinfin,1=infintie,1=nvinfin,5=eparsl\n1=smeparsl,1=eqvparsl,6=blacklozenge lozf,9=RuleDelayed,2=dsol,a=bigodot xodot,1=bigoplus xoplus,1=bigotimes xotime\n2=biguplus xuplus,2=bigsqcup xsqcup,6=iiiint qint,1=fpartint,3=cirfnint,1=awint,1=rppolint,1=scpolint,1=npolint\n1=pointint,1=quatint,1=intlarhk,b=pluscir,1=plusacir,1=simplus,1=plusdu,1=plussim,1=plustwo,2=mcomma,1=minusdu\n3=loplus,1=roplus,1=Cross,1=timesd,1=timesbar,2=smashp,1=lotimes,1=rotimes,1=otimesas,1=Otimes,1=odiv,1=triplus\n1=triminus,1=tritime,1=intprod iprod,3=amalg,1=capdot,2=ncup,1=ncap,1=capand,1=cupor,1=cupcap,1=capcup,1=cupbrcap\n1=capbrcup,1=cupcup,1=capcap,1=ccups,1=ccaps,3=ccupssm,3=And,1=Or,1=andand,1=oror,1=orslope,1=andslope,2=andv,1=orv\n1=andd,1=ord,2=wedbar,7=sdote,4=simdot,3=congdot,0+mw=ncongdot,1=easter,1=apacir,1=apE,0+mw=napE,1=eplus,1=pluse\n1=Esim,1=Colone,1=Equal,2=ddotseq eDDot,1=equivDD,1=ltcir,1=gtcir,1=ltquest,1=gtquest,1=LessSlantEqual leqslant les\n0+mw=NotLessSlantEqual nleqslant nles,1=GreaterSlantEqual geqslant ges,0+mw=NotGreaterSlantEqual ngeqslant nges\n1=lesdot,1=gesdot,1=lesdoto,1=gesdoto,1=lesdotor,1=gesdotol,1=lap lessapprox,1=gap gtrapprox,1=lne lneq,1=gne gneq\n1=lnap lnapprox,1=gnap gnapprox,1=lEg lesseqqgtr,1=gEl gtreqqless,1=lsime,1=gsime,1=lsimg,1=gsiml,1=lgE,1=glE\n1=lesges,1=gesles,1=els eqslantless,1=egs eqslantgtr,1=elsdot,1=egsdot,1=el,1=eg,3=siml,1=simg,1=simlE,1=simgE\n1=LessLess,0+mw=NotNestedLessLess,1=GreaterGreater,0+mw=NotNestedGreaterGreater,2=glj,1=gla,1=ltcc,1=gtcc,1=lescc\n1=gescc,1=smt,1=lat,1=smte,0+1e68=smtes,1=late,0+1e68=lates,1=bumpE,1=PrecedesEqual pre preceq\n0+mw=NotPrecedesEqual npre npreceq,1=SucceedsEqual sce succeq,0+mw=NotSucceedsEqual nsce nsucceq,3=prE,1=scE\n1=precneqq prnE,1=scnE succneqq,1=prap precapprox,1=scap succapprox,1=precnapprox prnap,1=scnap succnapprox,1=Pr\n1=Sc,1=subdot,1=supdot,1=subplus,1=supplus,1=submult,1=supmult,1=subedot,1=supedot,1=subE subseteqq\n0+mw=nsubE nsubseteqq,1=supE supseteqq,0+mw=nsupE nsupseteqq,1=subsim,1=supsim,3=subnE subsetneqq\n0+1e68=varsubsetneqq vsubnE,1=supnE supsetneqq,0+1e68=varsupsetneqq vsupnE,3=csub,1=csup,1=csube,1=csupe,1=subsup\n1=supsub,1=subsub,1=supsup,1=suphsub,1=supdsub,1=forkv,1=topfork,1=mlcp,9=Dashv DoubleLeftTee,2=Vdashl,1=Barv,1=vBar\n1=vBarv,2=Vbar,1=Not,1=bNot,1=rnmid,1=cirmid,1=midcir,1=topcir,1=nhpar,1=parsim,a=parsl,0+6hx=nparsl,1537=fflig\n1=filig,1=fllig,1=ffilig,1=ffllig,16zc=Ascr,2=Cscr,1=Dscr,3=Gscr,3=Jscr,1=Kscr,3=Nscr,1=Oscr,1=Pscr,1=Qscr,2=Sscr\n1=Tscr,1=Uscr,1=Vscr,1=Wscr,1=Xscr,1=Yscr,1=Zscr,1=ascr,1=bscr,1=cscr,1=dscr,2=fscr,2=hscr,1=iscr,1=jscr,1=kscr\n1=lscr,1=mscr,1=nscr,2=pscr,1=qscr,1=rscr,1=sscr,1=tscr,1=uscr,1=vscr,1=wscr,1=xscr,1=yscr,1=zscr,1h=Afr,1=Bfr,2=Dfr\n1=Efr,1=Ffr,1=Gfr,3=Jfr,1=Kfr,1=Lfr,1=Mfr,1=Nfr,1=Ofr,1=Pfr,1=Qfr,2=Sfr,1=Tfr,1=Ufr,1=Vfr,1=Wfr,1=Xfr,1=Yfr,2=afr\n1=bfr,1=cfr,1=dfr,1=efr,1=ffr,1=gfr,1=hfr,1=ifr,1=jfr,1=kfr,1=lfr,1=mfr,1=nfr,1=ofr,1=pfr,1=qfr,1=rfr,1=sfr,1=tfr\n1=ufr,1=vfr,1=wfr,1=xfr,1=yfr,1=zfr,1=Aopf,1=Bopf,2=Dopf,1=Eopf,1=Fopf,1=Gopf,2=Iopf,1=Jopf,1=Kopf,1=Lopf,1=Mopf\n2=Oopf,4=Sopf,1=Topf,1=Uopf,1=Vopf,1=Wopf,1=Xopf,1=Yopf,2=aopf,1=bopf,1=copf,1=dopf,1=eopf,1=fopf,1=gopf,1=hopf\n1=iopf,1=jopf,1=kopf,1=lopf,1=mopf,1=nopf,1=oopf,1=popf,1=qopf,1=ropf,1=sopf,1=topf,1=uopf,1=vopf,1=wopf,1=xopf\n1=yopf,1=zopf`;\n","/**\n * This module decodes the character references of HTML content, with no DOM. The table of the named references has\n * 2231 names. It is in a separate entry, so a bundle that only scans HTML does not get the table.\n */\nimport { NAMED_REFERENCES } from \"./html-references.ts\";\n\n/**\n * The values of the code points 0x80 to 0x9F in a numeric character reference, from the table of the standard. They are\n * the characters of windows-1252. The five code points that windows-1252 does not have stay as they are.\n */\nconst C1_VALUES =\n \"\\u20AC\\u0081\\u201A\\u0192\\u201E\\u2026\\u2020\\u2021\\u02C6\\u2030\\u0160\\u2039\\u0152\\u008D\\u017D\\u008F\" +\n \"\\u0090\\u2018\\u2019\\u201C\\u201D\\u2022\\u2013\\u2014\\u02DC\\u2122\\u0161\\u203A\\u0153\\u009D\\u017E\\u0178\";\n\n/** The value of each named character reference. A name with `;` is a key, and a legacy name is also a key with no `;`. */\nlet named: Map<string, string> | undefined;\n/** The length of the longest name, with no `;`. */\nlet longestName = 0;\n/** The length of the longest legacy name. */\nlet longestLegacy = 0;\n\n/** This function reads the table of the named character references one time, when the decoder first needs it. */\nfunction namedReferences(): Map<string, string> {\n if (named !== undefined) return named;\n const table = new Map<string, string>();\n let point = 0;\n for (const group of NAMED_REFERENCES.split(/[,\\n]/)) {\n const equals = group.indexOf(\"=\");\n const [first = \"\", second] = group.slice(0, equals).split(\"+\");\n point += parseInt(first, 36);\n const value = second === undefined ? String.fromCodePoint(point) : String.fromCodePoint(point, parseInt(second, 36));\n for (const entry of group.slice(equals + 1).split(\" \")) {\n const legacy = entry.endsWith(\"*\");\n const name = legacy ? entry.slice(0, -1) : entry;\n table.set(`${name};`, value);\n longestName = Math.max(longestName, name.length);\n if (legacy) {\n table.set(name, value);\n longestLegacy = Math.max(longestLegacy, name.length);\n }\n }\n }\n named = table;\n return table;\n}\n\n/** This function tells if a code unit is an ASCII letter or an ASCII digit. */\nconst isAlphanumeric = (code: number): boolean => (code >= 0x30 && code <= 0x39) || ((code | 0x20) >= 0x61 && (code | 0x20) <= 0x7a);\n\n/** This function gives the value of a code unit as a decimal or a hexadecimal digit, or -1 for a different code unit. */\nfunction digitOf(code: number, hex: boolean): number {\n if (code >= 0x30 && code <= 0x39) return code - 0x30;\n const lower = code | 0x20;\n return hex && lower >= 0x61 && lower <= 0x66 ? lower - 0x61 + 10 : -1;\n}\n\n/** A character reference that the decoder found: its value, and the index after its last character. */\ninterface Reference {\n readonly value: string;\n readonly end: number;\n}\n\n/**\n * This function reads the numeric character reference at the \"&\" at `amp`, with the fixes of the standard. It gives\n * undefined when no digit follows \"&#\" or \"&#x\".\n */\nfunction readNumeric(text: string, amp: number): Reference | undefined {\n let at = amp + 2;\n const hex = (text.charCodeAt(at) | 0x20) === 0x78;\n if (hex) at += 1;\n const start = at;\n let point = 0;\n for (let digit = digitOf(text.charCodeAt(at), hex); digit !== -1; digit = digitOf(text.charCodeAt(at), hex)) {\n // A value above 0x10FFFF stays at 0x110000. Thus a long run of digits does not make a number that is too large.\n point = Math.min(point * (hex ? 16 : 10) + digit, 0x110000);\n at += 1;\n }\n if (at === start) return undefined;\n if (text.charCodeAt(at) === 0x3b) at += 1;\n if (point === 0 || point > 0x10ffff || (point >= 0xd800 && point <= 0xdfff)) return { value: \"\\uFFFD\", end: at };\n if (point >= 0x80 && point <= 0x9f) return { value: C1_VALUES.charAt(point - 0x80), end: at };\n return { value: String.fromCodePoint(point), end: at };\n}\n\n/**\n * This function reads the named character reference at the \"&\" at `amp`. The longest name wins. It gives undefined when\n * no name of the table follows the \"&\".\n */\nfunction readNamed(text: string, amp: number): Reference | undefined {\n const from = amp + 1;\n if (!isAlphanumeric(text.charCodeAt(from))) return undefined;\n const table = namedReferences();\n // A run of letters and digits that is longer than the longest name is not a name. Thus each \"&\" reads few characters.\n let at = from;\n while (at - from <= longestName && isAlphanumeric(text.charCodeAt(at))) at += 1;\n if (text.charCodeAt(at) === 0x3b) {\n const value = table.get(text.slice(from, at + 1));\n if (value !== undefined) return { value, end: at + 1 };\n }\n // With no `;`, only a legacy name can match: the longest legacy name at the start of the run.\n for (let end = Math.min(at, from + longestLegacy); end > from; end -= 1) {\n const value = table.get(text.slice(from, end));\n if (value !== undefined) return { value, end };\n }\n return undefined;\n}\n\n/**\n * This function decodes the character references of a text, as the tokenizer of the HTML Living Standard does in the\n * content of an element. Use it on the `text` of a scan of `scanHtml`.\n *\n * - A named reference gets its value from the table of the standard. The longest name wins.\n * - A legacy name, for example `&` or `¬`, is also correct with no semicolon. Thus `¬it;` gives `¬it;`.\n * - A decimal or hexadecimal reference, for example `’` or `’`, gives its code point. The semicolon is optional.\n * - The value 0, a surrogate and a value above `0x10FFFF` give U+FFFD.\n * - The values `0x80` to `0x9F` give the characters of windows-1252, from the table of the standard.\n * - An ampersand with no reference after it stays as text. The function changes no other character.\n *\n * The function does not throw, and it is linear in the length of the text. The result is not longer than the text.\n *\n * @param text - The text of HTML content, with its character references.\n * @returns The text with the value of each character reference in place of the reference.\n */\nexport function decodeReferences(text: string): string {\n let amp = text.indexOf(\"&\");\n if (amp === -1) return text;\n const parts: string[] = [];\n let at = 0;\n while (amp !== -1) {\n const reference = text.charCodeAt(amp + 1) === 0x23 ? readNumeric(text, amp) : readNamed(text, amp);\n if (reference === undefined) amp = text.indexOf(\"&\", amp + 1);\n else {\n parts.push(text.slice(at, amp), reference.value);\n at = reference.end;\n amp = text.indexOf(\"&\", at);\n }\n }\n parts.push(text.slice(at));\n return parts.join(\"\");\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"references-DDLxNrsx.js","names":[],"sources":["../src/html-references.ts","../src/references.ts"],"sourcesContent":["/**\n * This module has the named character references of HTML. The script `scripts/html-references.ts` made it. Do not\n * edit it. Start the script again to make it.\n *\n * The source is the table of the HTML Living Standard, `https://html.spec.whatwg.org/entities.json`. Copyright WHATWG\n * (Apple, Google, Mozilla, Microsoft). The table has the license CC BY 4.0,\n * `https://creativecommons.org/licenses/by/4.0/`. The SHA-256 of the source file is\n * `d741d877ac77c4194c4ad526b5b4a19aef8dfe411ab840a466891cdbb9f362e6`.\n *\n * The script changed the format of the table, not its content. The source has 2231 names. 106 of them are\n * legacy names, which are in the source with a semicolon and with no semicolon.\n */\n\n/**\n * The names and the values of the named character references. The names with one value make one group. A comma or a\n * line end comes between two groups. Each group has these parts:\n *\n * - the first code point of the value, as the difference from the first code point of the group before it,\n * - a plus sign and the second code point, only for a value with two code points,\n * - an equals sign and the names of the group, with a space between two names.\n *\n * Each number is in base 36. A name has no ampersand and no semicolon. A star after a name tells that the name is also\n * correct with no semicolon. The groups are in the order of their values. The longest name has 31 characters, and the\n * longest legacy name has 6 characters.\n */\nexport const NAMED_REFERENCES: string =\n `9=Tab,1=NewLine,n=excl,1=QUOT* quot*,1=num,1=dollar,1=percnt,1=AMP* amp*,1=apos,1=lpar,1=rpar,1=ast midast,1=plus\n1=comma,2=period,1=sol,b=colon,1=semi,1=LT* lt*,0+6he=nvlt,1=equals,0+6hx=bne,1=GT* gt*,0+6he=nvgt,1=quest,1=commat\nr=lbrack lsqb,1=bsol,1=rbrack rsqb,1=Hat,1=UnderBar lowbar,1=DiacriticalGrave grave,6+2y=fjlig,l=lbrace lcub\n1=VerticalLine verbar vert,1=rbrace rcub,z=NonBreakingSpace nbsp*,1=iexcl*,1=cent*,1=pound*,1=curren*,1=yen*\n1=brvbar*,1=sect*,1=Dot DoubleDot die uml*,1=COPY* copy*,1=ordf*,1=laquo*,1=not*,1=shy*,1=REG* circledR reg*\n1=macr* strns,1=deg*,1=PlusMinus plusmn* pm,1=sup2*,1=sup3*,1=DiacriticalAcute acute*,1=micro*,1=para*\n1=CenterDot centerdot middot*,1=Cedilla cedil*,1=sup1*,1=ordm*,1=raquo*,1=frac14*,1=frac12* half,1=frac34*,1=iquest*\n1=Agrave*,1=Aacute*,1=Acirc*,1=Atilde*,1=Auml*,1=Aring* angst,1=AElig*,1=Ccedil*,1=Egrave*,1=Eacute*,1=Ecirc*\n1=Euml*,1=Igrave*,1=Iacute*,1=Icirc*,1=Iuml*,1=ETH*,1=Ntilde*,1=Ograve*,1=Oacute*,1=Ocirc*,1=Otilde*,1=Ouml*\n1=times*,1=Oslash*,1=Ugrave*,1=Uacute*,1=Ucirc*,1=Uuml*,1=Yacute*,1=THORN*,1=szlig*,1=agrave*,1=aacute*,1=acirc*\n1=atilde*,1=auml*,1=aring*,1=aelig*,1=ccedil*,1=egrave*,1=eacute*,1=ecirc*,1=euml*,1=igrave*,1=iacute*,1=icirc*\n1=iuml*,1=eth*,1=ntilde*,1=ograve*,1=oacute*,1=ocirc*,1=otilde*,1=ouml*,1=div divide*,1=oslash*,1=ugrave*,1=uacute*\n1=ucirc*,1=uuml*,1=yacute*,1=thorn*,1=yuml*,1=Amacr,1=amacr,1=Abreve,1=abreve,1=Aogon,1=aogon,1=Cacute,1=cacute\n1=Ccirc,1=ccirc,1=Cdot,1=cdot,1=Ccaron,1=ccaron,1=Dcaron,1=dcaron,1=Dstrok,1=dstrok,1=Emacr,1=emacr,3=Edot,1=edot\n1=Eogon,1=eogon,1=Ecaron,1=ecaron,1=Gcirc,1=gcirc,1=Gbreve,1=gbreve,1=Gdot,1=gdot,1=Gcedil,2=Hcirc,1=hcirc,1=Hstrok\n1=hstrok,1=Itilde,1=itilde,1=Imacr,1=imacr,3=Iogon,1=iogon,1=Idot,1=imath inodot,1=IJlig,1=ijlig,1=Jcirc,1=jcirc\n1=Kcedil,1=kcedil,1=kgreen,1=Lacute,1=lacute,1=Lcedil,1=lcedil,1=Lcaron,1=lcaron,1=Lmidot,1=lmidot,1=Lstrok,1=lstrok\n1=Nacute,1=nacute,1=Ncedil,1=ncedil,1=Ncaron,1=ncaron,1=napos,1=ENG,1=eng,1=Omacr,1=omacr,3=Odblac,1=odblac,1=OElig\n1=oelig,1=Racute,1=racute,1=Rcedil,1=rcedil,1=Rcaron,1=rcaron,1=Sacute,1=sacute,1=Scirc,1=scirc,1=Scedil,1=scedil\n1=Scaron,1=scaron,1=Tcedil,1=tcedil,1=Tcaron,1=tcaron,1=Tstrok,1=tstrok,1=Utilde,1=utilde,1=Umacr,1=umacr,1=Ubreve\n1=ubreve,1=Uring,1=uring,1=Udblac,1=udblac,1=Uogon,1=uogon,1=Wcirc,1=wcirc,1=Ycirc,1=ycirc,1=Yuml,1=Zacute,1=zacute\n1=Zdot,1=zdot,1=Zcaron,1=zcaron,k=fnof,z=imped,1s=gacute,1u=jmath,3z=circ,1=Hacek caron,h=Breve breve\n1=DiacriticalDot dot,1=ring,1=ogon,1=DiacriticalTilde tilde,1=DiacriticalDoubleAcute dblac,1g=DownBreve,3k=Alpha\n1=Beta,1=Gamma,1=Delta,1=Epsilon,1=Zeta,1=Eta,1=Theta,1=Iota,1=Kappa,1=Lambda,1=Mu,1=Nu,1=Xi,1=Omicron,1=Pi,1=Rho\n2=Sigma,1=Tau,1=Upsilon,1=Phi,1=Chi,1=Psi,1=Omega ohm,8=alpha,1=beta,1=gamma,1=delta,1=epsi epsilon,1=zeta,1=eta\n1=theta,1=iota,1=kappa,1=lambda,1=mu,1=nu,1=xi,1=omicron,1=pi,1=rho,1=sigmaf sigmav varsigma,1=sigma,1=tau\n1=upsi upsilon,1=phi,1=chi,1=psi,1=omega,8=thetasym thetav vartheta,1=Upsi upsih,3=phiv straightphi varphi\n1=piv varpi,6=Gammad,1=digamma gammad,j=kappav varkappa,1=rhov varrho,4=epsiv straightepsilon varepsilon\n1=backepsilon bepsi,b=IOcy,1=DJcy,1=GJcy,1=Jukcy,1=DScy,1=Iukcy,1=YIcy,1=Jsercy,1=LJcy,1=NJcy,1=TSHcy,1=KJcy,2=Ubrcy\n1=DZcy,1=Acy,1=Bcy,1=Vcy,1=Gcy,1=Dcy,1=IEcy,1=ZHcy,1=Zcy,1=Icy,1=Jcy,1=Kcy,1=Lcy,1=Mcy,1=Ncy,1=Ocy,1=Pcy,1=Rcy,1=Scy\n1=Tcy,1=Ucy,1=Fcy,1=KHcy,1=TScy,1=CHcy,1=SHcy,1=SHCHcy,1=HARDcy,1=Ycy,1=SOFTcy,1=Ecy,1=YUcy,1=YAcy,1=acy,1=bcy,1=vcy\n1=gcy,1=dcy,1=iecy,1=zhcy,1=zcy,1=icy,1=jcy,1=kcy,1=lcy,1=mcy,1=ncy,1=ocy,1=pcy,1=rcy,1=scy,1=tcy,1=ucy,1=fcy,1=khcy\n1=tscy,1=chcy,1=shcy,1=shchcy,1=hardcy,1=ycy,1=softcy,1=ecy,1=yucy,1=yacy,2=iocy,1=djcy,1=gjcy,1=jukcy,1=dscy\n1=iukcy,1=yicy,1=jsercy,1=ljcy,1=njcy,1=tshcy,1=kjcy,2=ubrcy,1=dzcy,5gj=ensp,1=emsp,1=emsp13,1=emsp14,2=numsp\n1=puncsp,1=ThinSpace thinsp,1=VeryThinSpace hairsp\n1=NegativeMediumSpace NegativeThickSpace NegativeThinSpace NegativeVeryThinSpace ZeroWidthSpace,1=zwnj,1=zwj,1=lrm\n1=rlm,1=dash hyphen,3=ndash,1=mdash,1=horbar,1=Verbar Vert,2=OpenCurlyQuote lsquo,1=CloseCurlyQuote rsquo rsquor\n1=lsquor sbquo,2=OpenCurlyDoubleQuote ldquo,1=CloseCurlyDoubleQuote rdquo rdquor,1=bdquo ldquor,2=dagger\n1=Dagger ddagger,1=bull bullet,3=nldr,1=hellip mldr,a=permil,1=pertenk,1=prime,1=Prime,1=tprime,1=backprime bprime\n4=lsaquo,1=rsaquo,4=OverBar oline,3=caret,2=hybull,1=frasl,b=bsemi,8=qprime,8=MediumSpace,0+6bu=ThickSpace,1=NoBreak\n1=ApplyFunction af,1=InvisibleTimes it,1=InvisibleComma ic,21=euro,1b=TripleDot tdot,1=DotDot,12=Copf complexes\n3=incare,5=gscr,1=HilbertSpace Hscr hamilt,1=Hfr Poincareplane,1=Hopf quaternions,1=planckh\n1=hbar hslash planck plankv,1=Iscr imagline,1=Ifr Im image imagpart,1=Laplacetrf Lscr lagran,1=ell,2=Nopf naturals\n1=numero,1=copysr,1=weierp wp,1=Popf primes,1=Qopf rationals,1=Rscr realine,1=Re Rfr real realpart,1=Ropf reals,1=rx\n4=TRADE trade,2=Zopf integers,3=mho,1=Zfr zeetrf,1=iiota,3=Bernoullis Bscr bernou,1=Cayleys Cfr,2=escr\n1=Escr expectation,1=Fouriertrf Fscr,2=Mellintrf Mscr phmmat,1=order orderof oscr,1=alefsym aleph,1=beth,1=gimel\n1=daleth,d=CapitalDifferentialD DD,1=DifferentialD dd,1=ExponentialE ee exponentiale,1=ImaginaryI ii,b=frac13\n1=frac23,1=frac15,1=frac25,1=frac35,1=frac45,1=frac16,1=frac56,1=frac18,1=frac38,1=frac58,1=frac78\n1e=LeftArrow ShortLeftArrow larr leftarrow slarr,1=ShortUpArrow UpArrow uarr uparrow\n1=RightArrow ShortRightArrow rarr rightarrow srarr,1=DownArrow ShortDownArrow darr downarrow\n1=LeftRightArrow harr leftrightarrow,1=UpDownArrow updownarrow varr,1=UpperLeftArrow nwarr nwarrow\n1=UpperRightArrow nearr nearrow,1=LowerRightArrow searr searrow,1=LowerLeftArrow swarr swarrow,1=nlarr nleftarrow\n1=nrarr nrightarrow,2=rarrw rightsquigarrow,0+mw=nrarrw,1=Larr twoheadleftarrow,1=Uarr,1=Rarr twoheadrightarrow\n1=Darr,1=larrtl leftarrowtail,1=rarrtl rightarrowtail,1=LeftTeeArrow mapstoleft,1=UpTeeArrow mapstoup\n1=RightTeeArrow map mapsto,1=DownTeeArrow mapstodown,2=hookleftarrow larrhk,1=hookrightarrow rarrhk\n1=larrlp looparrowleft,1=looparrowright rarrlp,1=harrw leftrightsquigarrow,1=nharr nleftrightarrow,2=Lsh lsh\n1=Rsh rsh,1=ldsh,1=rdsh,2=crarr,1=cularr curvearrowleft,1=curarr curvearrowright,3=circlearrowleft olarr\n1=circlearrowright orarr,1=LeftVector leftharpoonup lharu,1=DownLeftVector leftharpoondown lhard\n1=RightUpVector uharr upharpoonright,1=LeftUpVector uharl upharpoonleft,1=RightVector rharu rightharpoonup\n1=DownRightVector rhard rightharpoondown,1=RightDownVector dharr downharpoonright\n1=LeftDownVector dharl downharpoonleft,1=RightArrowLeftArrow rightleftarrows rlarr,1=UpArrowDownArrow udarr\n1=LeftArrowRightArrow leftrightarrows lrarr,1=leftleftarrows llarr,1=upuparrows uuarr,1=rightrightarrows rrarr\n1=ddarr downdownarrows,1=ReverseEquilibrium leftrightharpoons lrhar,1=Equilibrium rightleftharpoons rlhar\n1=nLeftarrow nlArr,1=nLeftrightarrow nhArr,1=nRightarrow nrArr,1=DoubleLeftArrow Leftarrow lArr\n1=DoubleUpArrow Uparrow uArr,1=DoubleRightArrow Implies Rightarrow rArr,1=DoubleDownArrow Downarrow dArr\n1=DoubleLeftRightArrow Leftrightarrow hArr iff,1=DoubleUpDownArrow Updownarrow vArr,1=nwArr,1=neArr,1=seArr,1=swArr\n1=Lleftarrow lAarr,1=Rrightarrow rAarr,2=zigrarr,7=LeftArrowBar larrb,1=RightArrowBar rarrb,g=DownArrowUpArrow duarr\n8=loarr,1=roarr,1=hoarr,1=ForAll forall,1=comp complement,1=PartialD part,0+mw=npart,1=Exists exist\n1=NotExists nexist nexists,1=empty emptyset emptyv varnothing,2=Del nabla,1=Element in isin isinv\n1=NotElement notin notinva,2=ReverseElement SuchThat ni niv,1=NotReverseElement notni notniva,3=Product prod\n1=Coproduct coprod,1=Sum sum,1=minus,1=MinusPlus mnplus mp,1=dotplus plusdo\n2=Backslash setminus setmn smallsetminus ssetmn,1=lowast,1=SmallCircle compfn,2=Sqrt radic\n3=Proportional prop propto varpropto vprop,1=infin,1=angrt,1=ang angle,0+6he=nang,1=angmsd measuredangle,1=angsph\n1=VerticalBar mid shortmid smid,1=NotVerticalBar nmid nshortmid nsmid\n1=DoubleVerticalBar par parallel shortparallel spar,1=NotDoubleVerticalBar npar nparallel nshortparallel nspar\n1=and wedge,1=or vee,1=cap,0+1e68=caps,1=cup,0+1e68=cups,1=Integral int,1=Int,1=iiint tint\n1=ContourIntegral conint oint,1=Conint DoubleContourIntegral,1=Cconint,1=cwint,1=ClockwiseContourIntegral cwconint\n1=CounterClockwiseContourIntegral awconint,1=Therefore there4 therefore,1=Because becaus because,1=ratio\n1=Colon Proportion,1=dotminus minusd,2=mDDot,1=homtht,1=Tilde sim thicksim thksim,0+6he=nvsim,1=backsim bsim\n0+mp=race,1=ac mstpos,0+mr=acE,1=acd,1=VerticalTilde wr wreath,1=NotTilde nsim,1=EqualTilde eqsim esim\n0+mw=NotEqualTilde nesim,1=TildeEqual sime simeq,1=NotTildeEqual nsime nsimeq,1=TildeFullEqual cong,1=simne\n1=NotTildeFullEqual ncong,1=TildeTilde ap approx asymp thickapprox thkap,1=NotTildeTilde nap napprox,1=ape approxeq\n1=apid,0+mw=napid,1=backcong bcong,1=CupCap asympeq,0+6he=nvap,1=Bumpeq HumpDownHump bump,0+mw=NotHumpDownHump nbump\n1=HumpEqual bumpe bumpeq,0+mw=NotHumpEqual nbumpe,1=DotEqual doteq esdot,0+mw=nedot,1=doteqdot eDot\n1=efDot fallingdotseq,1=erDot risingdotseq,1=Assign colone coloneq,1=ecolon eqcolon,1=ecir eqcirc,1=circeq cire\n2=wedgeq,1=veeeq,2=triangleq trie,3=equest questeq,1=NotEqual ne,1=Congruent equiv,0+6hx=bnequiv\n1=NotCongruent nequiv,2=le leq,0+6he=nvle,1=GreaterEqual ge geq,0+6he=nvge,1=LessFullEqual lE leqq,0+mw=nlE nleqq\n1=GreaterFullEqual gE geqq,0+mw=NotGreaterFullEqual ngE ngeqq,1=lnE lneqq,0+1e68=lvertneqq lvnE,1=gnE gneqq\n0+1e68=gvertneqq gvnE,1=Lt NestedLessLess ll,0+mw=NotLessLess nLtv,0+6he=nLt,1=Gt NestedGreaterGreater gg\n0+mw=NotGreaterGreater nGtv,0+6he=nGt,1=between twixt,1=NotCupCap,1=NotLess nless nlt,1=NotGreater ngt ngtr\n1=NotLessEqual nle nleq,1=NotGreaterEqual nge ngeq,1=LessTilde lesssim lsim,1=GreaterTilde gsim gtrsim\n1=NotLessTilde nlsim,1=NotGreaterTilde ngsim,1=LessGreater lessgtr lg,1=GreaterLess gl gtrless,1=NotLessGreater ntlg\n1=NotGreaterLess ntgl,1=Precedes pr prec,1=Succeeds sc succ,1=PrecedesSlantEqual prcue preccurlyeq\n1=SucceedsSlantEqual sccue succcurlyeq,1=PrecedesTilde precsim prsim,1=SucceedsTilde scsim succsim\n0+mw=NotSucceedsTilde,1=NotPrecedes npr nprec,1=NotSucceeds nsc nsucc,1=sub subset,0+6he=NotSubset nsubset vnsub\n1=Superset sup supset,0+6he=NotSuperset nsupset vnsup,1=nsub,1=nsup,1=SubsetEqual sube subseteq\n1=SupersetEqual supe supseteq,1=NotSubsetEqual nsube nsubseteq,1=NotSupersetEqual nsupe nsupseteq,1=subne subsetneq\n0+1e68=varsubsetneq vsubne,1=supne supsetneq,0+1e68=varsupsetneq vsupne,2=cupdot,1=UnionPlus uplus\n1=SquareSubset sqsub sqsubset,0+mw=NotSquareSubset,1=SquareSuperset sqsup sqsupset,0+mw=NotSquareSuperset\n1=SquareSubsetEqual sqsube sqsubseteq,1=SquareSupersetEqual sqsupe sqsupseteq,1=SquareIntersection sqcap\n0+1e68=sqcaps,1=SquareUnion sqcup,0+1e68=sqcups,1=CirclePlus oplus,1=CircleMinus ominus,1=CircleTimes otimes,1=osol\n1=CircleDot odot,1=circledcirc ocir,1=circledast oast,2=circleddash odash,1=boxplus plusb,1=boxminus minusb\n1=boxtimes timesb,1=dotsquare sdotb,1=RightTee vdash,1=LeftTee dashv,1=DownTee top,1=UpTee bot bottom perp,2=models\n1=DoubleRightTee vDash,1=Vdash,1=Vvdash,1=VDash,1=nvdash,1=nvDash,1=nVdash,1=nVDash,1=prurel\n2=LeftTriangle vartriangleleft vltri,1=RightTriangle vartriangleright vrtri,1=LeftTriangleEqual ltrie trianglelefteq\n0+6he=nvltrie,1=RightTriangleEqual rtrie trianglerighteq,0+6he=nvrtrie,1=origof,1=imof,1=multimap mumap,1=hercon\n1=intcal intercal,1=veebar,2=barvee,1=angrtvb,1=lrtri,1=Wedge bigwedge xwedge,1=Vee bigvee xvee\n1=Intersection bigcap xcap,1=Union bigcup xcup,1=Diamond diam diamond,1=sdot,1=Star sstarf,1=divideontimes divonx\n1=bowtie,1=ltimes,1=rtimes,1=leftthreetimes lthree,1=rightthreetimes rthree,1=backsimeq bsime,1=curlyvee cuvee\n1=curlywedge cuwed,1=Sub Subset,1=Sup Supset,1=Cap,1=Cup,1=fork pitchfork,1=epar,1=lessdot ltdot,1=gtdot gtrdot,1=Ll\n0+mw=nLl,1=Gg ggg,0+mw=nGg,1=LessEqualGreater leg lesseqgtr,0+1e68=lesg,1=GreaterEqualLess gel gtreqless,0+1e68=gesl\n3=cuepr curlyeqprec,1=cuesc curlyeqsucc,1=NotPrecedesSlantEqual nprcue,1=NotSucceedsSlantEqual nsccue\n1=NotSquareSubsetEqual nsqsube,1=NotSquareSupersetEqual nsqsupe,3=lnsim,1=gnsim,1=precnsim prnsim,1=scnsim succnsim\n1=NotLeftTriangle nltri ntriangleleft,1=NotRightTriangle nrtri ntriangleright\n1=NotLeftTriangleEqual nltrie ntrianglelefteq,1=NotRightTriangleEqual nrtrie ntrianglerighteq,1=vellip,1=ctdot\n1=utdot,1=dtdot,1=disin,1=isinsv,1=isins,1=isindot,0+mw=notindot,1=notinvc,1=notinvb,2=isinE,0+mw=notinE,1=nisd\n1=xnis,1=nis,1=notnivc,1=notnivb,7=barwed barwedge,1=Barwed doublebarwedge,2=LeftCeiling lceil,1=RightCeiling rceil\n1=LeftFloor lfloor,1=RightFloor rfloor,1=drcrop,1=dlcrop,1=urcrop,1=ulcrop,1=bnot,2=profline,1=profsurf,2=telrec\n1=target,6=ulcorn ulcorner,1=urcorn urcorner,1=dlcorn llcorner,1=drcorn lrcorner,3=frown sfrown,1=smile ssmile\na=cylcty,1=profalar,8=topbot,7=ovbar,2=solbar,1p=angzarr,1g=lmoust lmoustache,1=rmoust rmoustache,3=OverBracket tbrk\n1=UnderBracket bbrk,1=bbrktbrk,12=OverParenthesis,1=UnderParenthesis,1=OverBrace,1=UnderBrace,3=trpezium,5=elinters\n1o=blank,4l=circledS oS,1k=HorizontalLine boxh,2=boxv,a=boxdr,4=boxdl,4=boxur,4=boxul,4=boxvr,8=boxvl,8=boxhd\n8=boxhu,8=boxvh,k=boxH,1=boxV,1=boxdR,1=boxDr,1=boxDR,1=boxdL,1=boxDl,1=boxDL,1=boxuR,1=boxUr,1=boxUR,1=boxuL\n1=boxUl,1=boxUL,1=boxvR,1=boxVr,1=boxVR,1=boxvL,1=boxVl,1=boxVL,1=boxHd,1=boxhD,1=boxHD,1=boxHu,1=boxhU,1=boxHU\n1=boxvH,1=boxVh,1=boxVH,k=uhblk,4=lhblk,4=block,9=blk14,1=blk12,1=blk34,e=Square squ square\n9=FilledVerySmallSquare blacksquare squarf squf,1=EmptyVerySmallSquare,2=rect,1=marker,3=fltns,2=bigtriangleup xutri\n1=blacktriangle utrif,1=triangle utri,3=blacktriangleright rtrif,1=rtri triangleright,4=bigtriangledown xdtri\n1=blacktriangledown dtrif,1=dtri triangledown,3=blacktriangleleft ltrif,1=ltri triangleleft,7=loz lozenge,1=cir\nx=tridot,3=bigcirc xcirc,9=ultri,1=urtri,1=lltri,1=EmptySmallSquare,1=FilledSmallSquare,9=bigstar starf,1=star\n8=phone,1e=female,2=male,u=spades spadesuit,3=clubs clubsuit,2=hearts heartsuit,1=diamondsuit diams,4=sung,3=flat\n1=natur natural,1=sharp,4k=check checkmark,4=cross,9=malt maltese,m=sext,y=VerticalSeparator,q=lbbrk,1=rbbrk\n2d=bsolhsub,1=suphsol,t=LeftDoubleBracket lobrk,1=RightDoubleBracket robrk,1=LeftAngleBracket lang langle\n1=RightAngleBracket rang rangle,1=Lang,1=Rang,1=loang,1=roang,8=LongLeftArrow longleftarrow xlarr\n1=LongRightArrow longrightarrow xrarr,1=LongLeftRightArrow longleftrightarrow xharr\n1=DoubleLongLeftArrow Longleftarrow xlArr,1=DoubleLongRightArrow Longrightarrow xrArr\n1=DoubleLongLeftRightArrow Longleftrightarrow xhArr,2=longmapsto xmap,3=dzigrarr,77=nvlArr,1=nvrArr,1=nvHarr,1=Map\n7=lbarr,1=bkarow rbarr,1=lBarr,1=dbkarow rBarr,1=RBarr drbkarow,1=DDotrahd,1=UpArrowBar,1=DownArrowBar,3=Rarrtl\n3=latail,1=ratail,1=lAtail,1=rAtail,1=larrfs,1=rarrfs,1=larrbfs,1=rarrbfs,3=nwarhk,1=nearhk,1=hksearow searhk\n1=hkswarow swarhk,1=nwnear,1=nesear toea,1=seswar tosa,1=swnwar,9=rarrc,0+mw=nrarrc,2=cudarrr,1=ldca,1=rdca\n1=cudarrl,1=larrpl,3=curarrm,1=cularrp,8=rarrpl,3=harrcir,1=Uarrocir,1=lurdshar,1=ldrushar,3=LeftRightVector\n1=RightUpDownVector,1=DownLeftRightVector,1=LeftUpDownVector,1=LeftVectorBar,1=RightVectorBar,1=RightUpVectorBar\n1=RightDownVectorBar,1=DownLeftVectorBar,1=DownRightVectorBar,1=LeftUpVectorBar,1=LeftDownVectorBar,1=LeftTeeVector\n1=RightTeeVector,1=RightUpTeeVector,1=RightDownTeeVector,1=DownLeftTeeVector,1=DownRightTeeVector,1=LeftUpTeeVector\n1=LeftDownTeeVector,1=lHar,1=uHar,1=rHar,1=dHar,1=luruhar,1=ldrdhar,1=ruluhar,1=rdldhar,1=lharul,1=llhard,1=rharul\n1=lrhard,1=UpEquilibrium udhar,1=ReverseUpEquilibrium duhar,1=RoundImplies,1=erarr,1=simrarr,1=larrsim,1=rarrsim\n1=rarrap,1=ltlarr,2=gtrarr,1=subrarr,2=suplarr,1=lfisht,1=rfisht,1=ufisht,1=dfisht,6=lopar,1=ropar,5=lbrke,1=rbrke\n1=lbrkslu,1=rbrksld,1=lbrksld,1=rbrkslu,1=langd,1=rangd,1=lparlt,1=rpargt,1=gtlPar,1=ltrPar,4=vzigzag,2=vangrt\n1=angrtvbd,7=ange,1=range,1=dwangle,1=uwangle,1=angmsdaa,1=angmsdab,1=angmsdac,1=angmsdad,1=angmsdae,1=angmsdaf\n1=angmsdag,1=angmsdah,1=bemptyv,1=demptyv,1=cemptyv,1=raemptyv,1=laemptyv,1=ohbar,1=omid,1=opar,2=operp,2=olcross\n1=odsold,2=olcir,1=ofcir,1=olt,1=ogt,1=cirscir,1=cirE,1=solb,1=bsolb,4=boxbox,4=trisb,1=rtriltri,1=LeftTriangleBar\n0+mw=NotLeftTriangleBar,1=RightTriangleBar,0+mw=NotRightTriangleBar,c=iinfin,1=infintie,1=nvinfin,5=eparsl\n1=smeparsl,1=eqvparsl,6=blacklozenge lozf,9=RuleDelayed,2=dsol,a=bigodot xodot,1=bigoplus xoplus,1=bigotimes xotime\n2=biguplus xuplus,2=bigsqcup xsqcup,6=iiiint qint,1=fpartint,3=cirfnint,1=awint,1=rppolint,1=scpolint,1=npolint\n1=pointint,1=quatint,1=intlarhk,b=pluscir,1=plusacir,1=simplus,1=plusdu,1=plussim,1=plustwo,2=mcomma,1=minusdu\n3=loplus,1=roplus,1=Cross,1=timesd,1=timesbar,2=smashp,1=lotimes,1=rotimes,1=otimesas,1=Otimes,1=odiv,1=triplus\n1=triminus,1=tritime,1=intprod iprod,3=amalg,1=capdot,2=ncup,1=ncap,1=capand,1=cupor,1=cupcap,1=capcup,1=cupbrcap\n1=capbrcup,1=cupcup,1=capcap,1=ccups,1=ccaps,3=ccupssm,3=And,1=Or,1=andand,1=oror,1=orslope,1=andslope,2=andv,1=orv\n1=andd,1=ord,2=wedbar,7=sdote,4=simdot,3=congdot,0+mw=ncongdot,1=easter,1=apacir,1=apE,0+mw=napE,1=eplus,1=pluse\n1=Esim,1=Colone,1=Equal,2=ddotseq eDDot,1=equivDD,1=ltcir,1=gtcir,1=ltquest,1=gtquest,1=LessSlantEqual leqslant les\n0+mw=NotLessSlantEqual nleqslant nles,1=GreaterSlantEqual geqslant ges,0+mw=NotGreaterSlantEqual ngeqslant nges\n1=lesdot,1=gesdot,1=lesdoto,1=gesdoto,1=lesdotor,1=gesdotol,1=lap lessapprox,1=gap gtrapprox,1=lne lneq,1=gne gneq\n1=lnap lnapprox,1=gnap gnapprox,1=lEg lesseqqgtr,1=gEl gtreqqless,1=lsime,1=gsime,1=lsimg,1=gsiml,1=lgE,1=glE\n1=lesges,1=gesles,1=els eqslantless,1=egs eqslantgtr,1=elsdot,1=egsdot,1=el,1=eg,3=siml,1=simg,1=simlE,1=simgE\n1=LessLess,0+mw=NotNestedLessLess,1=GreaterGreater,0+mw=NotNestedGreaterGreater,2=glj,1=gla,1=ltcc,1=gtcc,1=lescc\n1=gescc,1=smt,1=lat,1=smte,0+1e68=smtes,1=late,0+1e68=lates,1=bumpE,1=PrecedesEqual pre preceq\n0+mw=NotPrecedesEqual npre npreceq,1=SucceedsEqual sce succeq,0+mw=NotSucceedsEqual nsce nsucceq,3=prE,1=scE\n1=precneqq prnE,1=scnE succneqq,1=prap precapprox,1=scap succapprox,1=precnapprox prnap,1=scnap succnapprox,1=Pr\n1=Sc,1=subdot,1=supdot,1=subplus,1=supplus,1=submult,1=supmult,1=subedot,1=supedot,1=subE subseteqq\n0+mw=nsubE nsubseteqq,1=supE supseteqq,0+mw=nsupE nsupseteqq,1=subsim,1=supsim,3=subnE subsetneqq\n0+1e68=varsubsetneqq vsubnE,1=supnE supsetneqq,0+1e68=varsupsetneqq vsupnE,3=csub,1=csup,1=csube,1=csupe,1=subsup\n1=supsub,1=subsub,1=supsup,1=suphsub,1=supdsub,1=forkv,1=topfork,1=mlcp,9=Dashv DoubleLeftTee,2=Vdashl,1=Barv,1=vBar\n1=vBarv,2=Vbar,1=Not,1=bNot,1=rnmid,1=cirmid,1=midcir,1=topcir,1=nhpar,1=parsim,a=parsl,0+6hx=nparsl,1537=fflig\n1=filig,1=fllig,1=ffilig,1=ffllig,16zc=Ascr,2=Cscr,1=Dscr,3=Gscr,3=Jscr,1=Kscr,3=Nscr,1=Oscr,1=Pscr,1=Qscr,2=Sscr\n1=Tscr,1=Uscr,1=Vscr,1=Wscr,1=Xscr,1=Yscr,1=Zscr,1=ascr,1=bscr,1=cscr,1=dscr,2=fscr,2=hscr,1=iscr,1=jscr,1=kscr\n1=lscr,1=mscr,1=nscr,2=pscr,1=qscr,1=rscr,1=sscr,1=tscr,1=uscr,1=vscr,1=wscr,1=xscr,1=yscr,1=zscr,1h=Afr,1=Bfr,2=Dfr\n1=Efr,1=Ffr,1=Gfr,3=Jfr,1=Kfr,1=Lfr,1=Mfr,1=Nfr,1=Ofr,1=Pfr,1=Qfr,2=Sfr,1=Tfr,1=Ufr,1=Vfr,1=Wfr,1=Xfr,1=Yfr,2=afr\n1=bfr,1=cfr,1=dfr,1=efr,1=ffr,1=gfr,1=hfr,1=ifr,1=jfr,1=kfr,1=lfr,1=mfr,1=nfr,1=ofr,1=pfr,1=qfr,1=rfr,1=sfr,1=tfr\n1=ufr,1=vfr,1=wfr,1=xfr,1=yfr,1=zfr,1=Aopf,1=Bopf,2=Dopf,1=Eopf,1=Fopf,1=Gopf,2=Iopf,1=Jopf,1=Kopf,1=Lopf,1=Mopf\n2=Oopf,4=Sopf,1=Topf,1=Uopf,1=Vopf,1=Wopf,1=Xopf,1=Yopf,2=aopf,1=bopf,1=copf,1=dopf,1=eopf,1=fopf,1=gopf,1=hopf\n1=iopf,1=jopf,1=kopf,1=lopf,1=mopf,1=nopf,1=oopf,1=popf,1=qopf,1=ropf,1=sopf,1=topf,1=uopf,1=vopf,1=wopf,1=xopf\n1=yopf,1=zopf`;\n","/**\n * This module decodes the character references of HTML content, with no DOM. The table of the named references has\n * 2231 names. It is in a separate entry, so a bundle that only scans HTML does not get the table.\n */\nimport { NAMED_REFERENCES } from \"./html-references.ts\";\n\n/**\n * The values of the code points 0x80 to 0x9F in a numeric character reference, from the table of the standard. They are\n * the characters of windows-1252. The five code points that windows-1252 does not have stay as they are.\n */\nconst C1_VALUES =\n \"\\u20AC\\u0081\\u201A\\u0192\\u201E\\u2026\\u2020\\u2021\\u02C6\\u2030\\u0160\\u2039\\u0152\\u008D\\u017D\\u008F\" +\n \"\\u0090\\u2018\\u2019\\u201C\\u201D\\u2022\\u2013\\u2014\\u02DC\\u2122\\u0161\\u203A\\u0153\\u009D\\u017E\\u0178\";\n\n/** The value of each named character reference. A name with `;` is a key, and a legacy name is also a key with no `;`. */\nlet named: Map<string, string> | undefined;\n/** The length of the longest name, with no `;`. */\nlet longestName = 0;\n/** The length of the longest legacy name. */\nlet longestLegacy = 0;\n\n/** This function reads the table of the named character references one time, when the decoder first needs it. */\nfunction namedReferences(): Map<string, string> {\n if (named !== undefined) return named;\n const table = new Map<string, string>();\n let point = 0;\n for (const group of NAMED_REFERENCES.split(/[,\\n]/)) {\n const equals = group.indexOf(\"=\");\n const [first = \"\", second] = group.slice(0, equals).split(\"+\");\n point += parseInt(first, 36);\n const value = second === undefined ? String.fromCodePoint(point) : String.fromCodePoint(point, parseInt(second, 36));\n for (const entry of group.slice(equals + 1).split(\" \")) {\n const legacy = entry.endsWith(\"*\");\n const name = legacy ? entry.slice(0, -1) : entry;\n table.set(`${name};`, value);\n longestName = Math.max(longestName, name.length);\n if (legacy) {\n table.set(name, value);\n longestLegacy = Math.max(longestLegacy, name.length);\n }\n }\n }\n named = table;\n return table;\n}\n\n/** This function tells if a code unit is an ASCII letter or an ASCII digit. */\nconst isAlphanumeric = (code: number): boolean => (code >= 0x30 && code <= 0x39) || ((code | 0x20) >= 0x61 && (code | 0x20) <= 0x7a);\n\n/** This function gives the value of a code unit as a decimal or a hexadecimal digit, or -1 for a different code unit. */\nfunction digitOf(code: number, hex: boolean): number {\n if (code >= 0x30 && code <= 0x39) return code - 0x30;\n const lower = code | 0x20;\n return hex && lower >= 0x61 && lower <= 0x66 ? lower - 0x61 + 10 : -1;\n}\n\n/** A character reference that the decoder found: its value, and the index after its last character. */\ninterface Reference {\n readonly value: string;\n readonly end: number;\n}\n\n/**\n * This function reads the numeric character reference at the \"&\" at `amp`, with the fixes of the standard. It gives\n * undefined when no digit follows \"&#\" or \"&#x\".\n */\nfunction readNumeric(text: string, amp: number): Reference | undefined {\n let at = amp + 2;\n const hex = (text.charCodeAt(at) | 0x20) === 0x78;\n if (hex) at += 1;\n const start = at;\n let point = 0;\n for (let digit = digitOf(text.charCodeAt(at), hex); digit !== -1; digit = digitOf(text.charCodeAt(at), hex)) {\n // A value above 0x10FFFF stays at 0x110000. Thus a long run of digits does not make a number that is too large.\n point = Math.min(point * (hex ? 16 : 10) + digit, 0x110000);\n at += 1;\n }\n if (at === start) return undefined;\n if (text.charCodeAt(at) === 0x3b) at += 1;\n if (point === 0 || point > 0x10ffff || (point >= 0xd800 && point <= 0xdfff)) return { value: \"\\uFFFD\", end: at };\n if (point >= 0x80 && point <= 0x9f) return { value: C1_VALUES.charAt(point - 0x80), end: at };\n return { value: String.fromCodePoint(point), end: at };\n}\n\n/**\n * This function reads the named character reference at the \"&\" at `amp`. The longest name wins. It gives undefined when\n * no name of the table follows the \"&\".\n */\nfunction readNamed(text: string, amp: number): Reference | undefined {\n const from = amp + 1;\n if (!isAlphanumeric(text.charCodeAt(from))) return undefined;\n const table = namedReferences();\n // A run of letters and digits that is longer than the longest name is not a name. Thus each \"&\" reads few characters.\n let at = from;\n while (at - from <= longestName && isAlphanumeric(text.charCodeAt(at))) at += 1;\n if (text.charCodeAt(at) === 0x3b) {\n const value = table.get(text.slice(from, at + 1));\n if (value !== undefined) return { value, end: at + 1 };\n }\n // With no `;`, only a legacy name can match: the longest legacy name at the start of the run.\n for (let end = Math.min(at, from + longestLegacy); end > from; end -= 1) {\n const value = table.get(text.slice(from, end));\n if (value !== undefined) return { value, end };\n }\n return undefined;\n}\n\n/**\n * This function decodes the character references of a text, as the tokenizer of the HTML Living Standard does in the\n * content of an element. Use it on the `text` of a scan of `scanHtml`.\n *\n * - A named reference gets its value from the table of the standard. The longest name wins.\n * - A legacy name, for example `&` or `¬`, is also correct with no semicolon. Thus `¬it;` gives `¬it;`.\n * - A decimal or hexadecimal reference, for example `’` or `’`, gives its code point. The semicolon is optional.\n * - The value 0, a surrogate and a value above `0x10FFFF` give U+FFFD.\n * - The values `0x80` to `0x9F` give the characters of windows-1252, from the table of the standard.\n * - An ampersand with no reference after it stays as text. The function changes no other character.\n *\n * The function does not throw, and it is linear in the length of the text. The result is not longer than the text.\n *\n * @param text - The text of HTML content, with its character references.\n * @returns The text with the value of each character reference in place of the reference.\n */\nexport function decodeReferences(text: string): string {\n let amp = text.indexOf(\"&\");\n if (amp === -1) return text;\n const parts: string[] = [];\n let at = 0;\n while (amp !== -1) {\n const reference = text.charCodeAt(amp + 1) === 0x23 ? readNumeric(text, amp) : readNamed(text, amp);\n if (reference === undefined) amp = text.indexOf(\"&\", amp + 1);\n else {\n parts.push(text.slice(at, amp), reference.value);\n at = reference.end;\n amp = text.indexOf(\"&\", at);\n }\n }\n parts.push(text.slice(at));\n return parts.join(\"\");\n}\n"],"mappings":"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"}
|
package/build/references.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as decodeReferences } from "./references-
|
|
1
|
+
export { t as decodeReferences } from "./references-DDLxNrsx.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@mark1russell7/text",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.21",
|
|
5
5
|
"description": "Plain text helpers: the escapes for HTML, attributes, patterns, Markdown and workflow commands, English word forms (countOf, listOf), a word search (wordSearch), the text of a thrown value (errorMessage), the orders of texts by code units and by code points (compareCodeUnits, compareCodePoints), the removal of secrets (redactSecrets) and the shapes of tokens and of secrets by their context (findSecretShapes, redactSecretShapes, findSecretShapesInValue, CONTEXT_SHAPES, isSecretName), and lengths in code units, code points and graphemes with truncation and padding (textLength, truncate, pad), the marked parts of a text (partsAt, partsOf), a scan of HTML for its text and its start tags (scanHtml) with the decode of its character references (decodeReferences) and its plain text (plainText), and a printer of lines and tables to streams that the caller gives (createPrinter).",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"text",
|